Class ChordDescriptor
Represents an object that describes a chord.
Inheritance
ChordDescriptor
Assembly: Melanchall.DryWetMidi.dll
Syntax
public sealed class ChordDescriptor
Constructors
ChordDescriptor(IEnumerable<Note>, SevenBitNumber, ITimeSpan)
Initializes a new instance of the
ChordDescriptor with the specified notes,
velocity and length.
Declaration
public ChordDescriptor(IEnumerable<Note> notes, SevenBitNumber velocity, ITimeSpan length)
Parameters
Exceptions
Type |
Condition |
ArgumentNullException |
One of the following errors occurred:
-
notes is null . -
length is null .
|
Properties
Length
Gets the length of the chord.
Declaration
public ITimeSpan Length { get; }
Property Value
Notes
Gets the notes of the chord.
Declaration
public IEnumerable<Note> Notes { get; }
Property Value
Velocity
Gets the velocity of the chord.
Declaration
public SevenBitNumber Velocity { 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
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
Operators
operator ==(ChordDescriptor, ChordDescriptor)
Declaration
public static bool operator ==(ChordDescriptor chordDescriptor1, ChordDescriptor chordDescriptor2)
Parameters
Returns
Type |
Description |
bool |
true if the descriptors are equal, false otherwise. |
operator !=(ChordDescriptor, ChordDescriptor)
Declaration
public static bool operator !=(ChordDescriptor chordDescriptor1, ChordDescriptor chordDescriptor2)
Parameters
Returns
Type |
Description |
bool |
false if the descriptors are equal, true otherwise. |