Search Results for

    Show / Hide Table of Contents

    Class NoteDescriptor

    Represents an object that describes a note.
    Inheritance
    object
    NoteDescriptor
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Melanchall.DryWetMidi.Composing
    Assembly: Melanchall.DryWetMidi.dll
    Syntax
    public sealed class NoteDescriptor

    Constructors

    NoteDescriptor(Note, SevenBitNumber, ITimeSpan)

    Initializes a new instance of the NoteDescriptor with the specified note, velocity and length.
    Declaration
    public NoteDescriptor(Note note, SevenBitNumber velocity, ITimeSpan length)
    Parameters
    Type Name Description
    Note note Note.
    SevenBitNumber velocity Velocity of the note.
    ITimeSpan length Length of the note.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • note is null.
    • length is null.

    Properties

    Length

    Gets the length of the note.
    Declaration
    public ITimeSpan Length { get; }
    Property Value
    Type Description
    ITimeSpan

    Note

    Gets the note.
    Declaration
    public Note Note { get; }
    Property Value
    Type Description
    Note

    Velocity

    Gets the velocity of the note.
    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 ==(NoteDescriptor, NoteDescriptor)

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

    operator !=(NoteDescriptor, NoteDescriptor)

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