Search Results for

    Show / Hide Table of Contents

    Class ChordDescriptor

    Represents an object that describes a chord.
    Inheritance
    object
    ChordDescriptor
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Melanchall.DryWetMidi.Composing
    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
    Type Name Description
    IEnumerable<Note> notes Notes of the chord.
    SevenBitNumber velocity Velocity of the chord's notes.
    ITimeSpan length Length of the chord.
    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
    Type Description
    ITimeSpan

    Notes

    Gets the notes of the chord.
    Declaration
    public IEnumerable<Note> Notes { get; }
    Property Value
    Type Description
    IEnumerable<Note>

    Velocity

    Gets the velocity of the chord.
    Declaration
    public SevenBitNumber Velocity { get; }
    Property Value
    Type Description
    SevenBitNumber

    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
    object.Equals(object)

    GetHashCode()

    Serves as the default hash function.
    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int A hash code for the current object.
    Overrides
    object.GetHashCode()

    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
    object.ToString()

    Operators

    operator ==(ChordDescriptor, ChordDescriptor)

    Determines if two ChordDescriptor objects are equal.
    Declaration
    public static bool operator ==(ChordDescriptor chordDescriptor1, ChordDescriptor chordDescriptor2)
    Parameters
    Type Name Description
    ChordDescriptor chordDescriptor1 The first ChordDescriptor to compare.
    ChordDescriptor chordDescriptor2 The second ChordDescriptor to compare.
    Returns
    Type Description
    bool true if the descriptors are equal, false otherwise.

    operator !=(ChordDescriptor, ChordDescriptor)

    Determines if two ChordDescriptor objects are not equal.
    Declaration
    public static bool operator !=(ChordDescriptor chordDescriptor1, ChordDescriptor chordDescriptor2)
    Parameters
    Type Name Description
    ChordDescriptor chordDescriptor1 The first ChordDescriptor to compare.
    ChordDescriptor chordDescriptor2 The second ChordDescriptor to compare.
    Returns
    Type Description
    bool false if the descriptors are equal, true otherwise.
    In this article
    Back to top 2024 / Generated by DocFX