Class ChordProgression
Represents a chord progression as a set of chords.
Inheritance
ChordProgression
Assembly: Melanchall.DryWetMidi.dll
Syntax
public sealed class ChordProgression
Constructors
ChordProgression(params Chord[])
Declaration
public ChordProgression(params Chord[] chords)
Parameters
| Type |
Name |
Description |
| Chord[] |
chords |
Chords of the chord progression. |
Exceptions
ChordProgression(IEnumerable<Chord>)
Declaration
public ChordProgression(IEnumerable<Chord> chords)
Parameters
| Type |
Name |
Description |
| IEnumerable<Chord> |
chords |
Chords of the chord progression. |
Exceptions
Properties
Chords
Gets the chords of the chord progression.
Declaration
public IEnumerable<Chord> Chords { get; }
Property Value
Methods
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
The object to compare with the current object. |
Returns
| Type |
Description |
| bool |
true if the specified object is equal to the current object; otherwise, false. |
Overrides
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
| Type |
Description |
| int |
A hash code for the current object. |
Overrides
Parse(string, Scale)
Converts the string representation of a chord progression to its
ChordProgression equivalent.
Declaration
public static ChordProgression Parse(string input, Scale scale)
Parameters
| Type |
Name |
Description |
| string |
input |
A string containing a chord progression to convert. |
| Scale |
scale |
Scale to resolve chords. |
Returns
Exceptions
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
| Type |
Description |
| string |
A string that represents the current object. |
Overrides
TryParse(string, Scale, out ChordProgression)
Converts the string representation of a chord progression to its
ChordProgression equivalent.
A return value indicates whether the conversion succeeded.
Declaration
public static bool TryParse(string input, Scale scale, out ChordProgression chordProgression)
Parameters
| Type |
Name |
Description |
| string |
input |
A string containing a chord progression to convert. |
| Scale |
scale |
Scale to resolve chords. |
| ChordProgression |
chordProgression |
When this method returns, contains the ChordProgression
equivalent of the chord progression contained in input, if the conversion succeeded,
or null if the conversion failed. The conversion fails if the input is null or
Empty, or is not of the correct format. This parameter is passed uninitialized;
any value originally supplied in result will be overwritten. |
Returns
| Type |
Description |
| bool |
true if input was converted successfully; otherwise, false. |
Operators
operator ==(ChordProgression, ChordProgression)
Declaration
public static bool operator ==(ChordProgression chordProgression1, ChordProgression chordProgression2)
Parameters
Returns
| Type |
Description |
| bool |
true if the chord progressions are equal, false otherwise. |
operator !=(ChordProgression, ChordProgression)
Declaration
public static bool operator !=(ChordProgression chordProgression1, ChordProgression chordProgression2)
Parameters
Returns
| Type |
Description |
| bool |
false if the chord progressions are equal, true otherwise. |