Search Results for

    Show / Hide Table of Contents

    Class ChordUtilities

    Utilities for working with Chord.
    Inheritance
    object
    ChordUtilities
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Melanchall.DryWetMidi.MusicTheory
    Assembly: Melanchall.DryWetMidi.dll
    Syntax
    public static class ChordUtilities

    Methods

    GetIntervalsBetweenNotes(Chord)

    Gets intervals between notes of the specified chord. For example, +4 and +3 for C major (+4 for C and E, +3 for E and G).
    Declaration
    public static IEnumerable<Interval> GetIntervalsBetweenNotes(this Chord chord)
    Parameters
    Type Name Description
    Chord chord Chord to get intervals between notes.
    Returns
    Type Description
    IEnumerable<Interval> Intervals between notes of the chord.
    Exceptions
    Type Condition
    ArgumentNullException chord is null.

    GetIntervalsFromRootNote(Chord)

    Gets intervals from the root note of the specified chord. For example, +4 and +7 for C major (+4 for C and E, +7 for C and G).
    Declaration
    public static IEnumerable<Interval> GetIntervalsFromRootNote(this Chord chord)
    Parameters
    Type Name Description
    Chord chord Chord to get intervals from root note.
    Returns
    Type Description
    IEnumerable<Interval> Intervals from the root note of the chord.
    Exceptions
    Type Condition
    ArgumentNullException chord is null.
    InvalidOperationException Some intervals are greater than MaxValue.

    GetInversions(Chord)

    Gets the collection of chord's inversions.
    Declaration
    public static IEnumerable<Chord> GetInversions(this Chord chord)
    Parameters
    Type Name Description
    Chord chord
    Returns
    Type Description
    IEnumerable<Chord> Collection of chord's inversions.

    ResolveNotes(Chord, Octave)

    Resolves notes of the specified chord.
    Declaration
    public static IEnumerable<Note> ResolveNotes(this Chord chord, Octave octave)
    Parameters
    Type Name Description
    Chord chord Chord to resolve notes.
    Octave octave Octave to resolve notes of the chord.
    Returns
    Type Description
    IEnumerable<Note> Notes of the chord regarding to octave.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • chord is null.
    • octave is null.

    ResolveRootNote(Chord, Octave)

    Resolves root note of the specified chord.
    Declaration
    public static Note ResolveRootNote(this Chord chord, Octave octave)
    Parameters
    Type Name Description
    Chord chord Chord to resolve root note.
    Octave octave Octave to resolve root note of the chord.
    Returns
    Type Description
    Note Root note of the chord regarding to octave.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • chord is null.
    • octave is null.
    In this article
    Back to top 2024 / Generated by DocFX