Search Results for

    Show / Hide Table of Contents

    Class ChordsManagingUtilities

    Extension methods for chords managing.
    Inheritance
    object
    ChordsManagingUtilities
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Melanchall.DryWetMidi.Interaction
    Assembly: Melanchall.DryWetMidi.dll
    Syntax
    public static class ChordsManagingUtilities

    Methods

    GetChords(EventsCollection, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)

    Gets chords contained in the specified EventsCollection. More info in the Getting objects: GetChords article.
    Declaration
    public static ICollection<Chord> GetChords(this EventsCollection eventsCollection, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null)
    Parameters
    Type Name Description
    EventsCollection eventsCollection EventsCollection to search for chords.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    Returns
    Type Description
    ICollection<Chord> Collection of chords contained in eventsCollection ordered by time.
    Exceptions
    Type Condition
    ArgumentNullException eventsCollection is null.
    See Also
    ProcessChords(EventsCollection, Action<Chord>, Predicate<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings, ChordProcessingHint)
    ProcessChords(EventsCollection, Action<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings, ChordProcessingHint)
    RemoveChords(EventsCollection, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)
    RemoveChords(EventsCollection, Predicate<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)
    GetObjectsUtilities

    GetChords(MidiFile, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)

    Gets chords contained in the specified MidiFile. More info in the Getting objects: GetChords article.
    Declaration
    public static ICollection<Chord> GetChords(this MidiFile file, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null)
    Parameters
    Type Name Description
    MidiFile file MidiFile to search for chords.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    Returns
    Type Description
    ICollection<Chord> Collection of chords contained in file ordered by time.
    Exceptions
    Type Condition
    ArgumentNullException file is null.
    See Also
    ProcessChords(MidiFile, Action<Chord>, Predicate<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings, ChordProcessingHint)
    ProcessChords(MidiFile, Action<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings, ChordProcessingHint)
    RemoveChords(MidiFile, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)
    RemoveChords(MidiFile, Predicate<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)
    GetObjectsUtilities

    GetChords(TrackChunk, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)

    Gets chords contained in the specified TrackChunk. More info in the Getting objects: GetChords article.
    Declaration
    public static ICollection<Chord> GetChords(this TrackChunk trackChunk, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null)
    Parameters
    Type Name Description
    TrackChunk trackChunk TrackChunk to search for chords.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    Returns
    Type Description
    ICollection<Chord> Collection of chords contained in trackChunk ordered by time.
    Exceptions
    Type Condition
    ArgumentNullException trackChunk is null.
    See Also
    ProcessChords(TrackChunk, Action<Chord>, Predicate<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings, ChordProcessingHint)
    ProcessChords(TrackChunk, Action<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings, ChordProcessingHint)
    RemoveChords(TrackChunk, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)
    RemoveChords(TrackChunk, Predicate<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)
    GetObjectsUtilities

    GetChords(IEnumerable<MidiEvent>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)

    Gets chords contained in the specified collection of MidiEvent. More info in the Getting objects: GetChords article.
    Declaration
    public static ICollection<Chord> GetChords(this IEnumerable<MidiEvent> midiEvents, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null)
    Parameters
    Type Name Description
    IEnumerable<MidiEvent> midiEvents Collection ofMidiFile to search for chords.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    Returns
    Type Description
    ICollection<Chord> Collection of chords contained in midiEvents ordered by time.
    Exceptions
    Type Condition
    ArgumentNullException midiEvents is null.

    GetChords(IEnumerable<TrackChunk>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)

    Gets chords contained in the specified collection of TrackChunk. More info in the Getting objects: GetChords article.
    Declaration
    public static ICollection<Chord> GetChords(this IEnumerable<TrackChunk> trackChunks, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null)
    Parameters
    Type Name Description
    IEnumerable<TrackChunk> trackChunks Track chunks to search for chords.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    Returns
    Type Description
    ICollection<Chord> Collection of chords contained in trackChunks ordered by time.
    Exceptions
    Type Condition
    ArgumentNullException trackChunks is null.
    See Also
    ProcessChords(IEnumerable<TrackChunk>, Action<Chord>, Predicate<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings, ChordProcessingHint)
    ProcessChords(IEnumerable<TrackChunk>, Action<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings, ChordProcessingHint)
    RemoveChords(IEnumerable<TrackChunk>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)
    RemoveChords(IEnumerable<TrackChunk>, Predicate<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)
    GetObjectsUtilities

    GetChords(IEnumerable<Note>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)

    Creates chords from notes.
    Declaration
    public static IEnumerable<Chord> GetChords(this IEnumerable<Note> notes, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null)
    Parameters
    Type Name Description
    IEnumerable<Note> notes Notes to create chords from.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    Returns
    Type Description
    IEnumerable<Chord> Collection of chords made up from notes.
    Exceptions
    Type Condition
    ArgumentNullException notes is null.

    GetMusicTheoryChord(Chord)

    Returns Chord containing notes of the specified Chord.
    Declaration
    public static Chord GetMusicTheoryChord(this Chord chord)
    Parameters
    Type Name Description
    Chord chord Chord to get music theory chord from.
    Returns
    Type Description
    Chord Chord containing notes of the chord.
    Exceptions
    Type Condition
    ArgumentNullException chord is null.

    ManageChords(EventsCollection, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings, TimedObjectsComparer)

    Creates an instance of the TimedObjectsManager<TObject> initializing it with the specified events collection. More info in the Objects managers article.
    Declaration
    public static TimedObjectsManager<Chord> ManageChords(this EventsCollection eventsCollection, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, TimedObjectsComparer comparer = null)
    Parameters
    Type Name Description
    EventsCollection eventsCollection EventsCollection that holds chords to manage.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    TimedObjectsComparer comparer Comparer that will be used to order objects on enumerating and saving objects back to the eventsCollection via SaveChanges() or Dispose().
    Returns
    Type Description
    TimedObjectsManager<Chord> An instance of the TimedObjectsManager<TObject> that can be used to manage chords represented by the eventsCollection.
    Exceptions
    Type Condition
    ArgumentNullException eventsCollection is null.

    ManageChords(TrackChunk, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings, TimedObjectsComparer)

    Creates an instance of the TimedObjectsManager<TObject> initializing it with the events collection of the specified track chunk. More info in the Objects managers article.
    Declaration
    public static TimedObjectsManager<Chord> ManageChords(this TrackChunk trackChunk, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, TimedObjectsComparer comparer = null)
    Parameters
    Type Name Description
    TrackChunk trackChunk TrackChunk that holds chords to manage.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    TimedObjectsComparer comparer Comparer that will be used to order objects on enumerating and saving objects back to the trackChunk via SaveChanges() or Dispose().
    Returns
    Type Description
    TimedObjectsManager<Chord> An instance of the TimedObjectsManager<TObject> that can be used to manage chords represented by the trackChunk.
    Exceptions
    Type Condition
    ArgumentNullException trackChunk is null.

    ProcessChords(EventsCollection, Action<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings, ChordProcessingHint)

    Performs the specified action on each Chord contained in the EventsCollection. More info in the Processing objects: ProcessChords article.
    Declaration
    public static int ProcessChords(this EventsCollection eventsCollection, Action<Chord> action, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, ChordProcessingHint hint = ChordProcessingHint.Default)
    Parameters
    Type Name Description
    EventsCollection eventsCollection EventsCollection to search for chords to process.
    Action<Chord> action The action to perform on each Chord contained in the eventsCollection.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    ChordProcessingHint hint Hint which tells the processing algorithm how it can optimize its performance. The default value is Default.
    Returns
    Type Description
    int Count of processed chords.
    Remarks
    Note that you can always use an object manager to perform any manipulations with chords but dedicated methods of the ChordsManagingUtilities will always be faster and will consume less memory.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • eventsCollection is null.
    • action is null.
    See Also
    ProcessObjects(EventsCollection, ObjectType, Action<ITimedObject>, ObjectDetectionSettings, ObjectProcessingHint)

    ProcessChords(EventsCollection, Action<Chord>, Predicate<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings, ChordProcessingHint)

    Performs the specified action on each Chord contained in the EventsCollection. More info in the Processing objects: ProcessChords article.
    Declaration
    public static int ProcessChords(this EventsCollection eventsCollection, Action<Chord> action, Predicate<Chord> match, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, ChordProcessingHint hint = ChordProcessingHint.Default)
    Parameters
    Type Name Description
    EventsCollection eventsCollection EventsCollection to search for chords to process.
    Action<Chord> action The action to perform on each Chord contained in the eventsCollection.
    Predicate<Chord> match The predicate that defines the conditions of the Chord to process.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    ChordProcessingHint hint Hint which tells the processing algorithm how it can optimize its performance. The default value is Default.
    Returns
    Type Description
    int Count of processed chords.
    Remarks
    Note that you can always use an object manager to perform any manipulations with chords but dedicated methods of the ChordsManagingUtilities will always be faster and will consume less memory.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • eventsCollection is null.
    • action is null.
    • match is null.
    See Also
    ProcessObjects(EventsCollection, ObjectType, Action<ITimedObject>, Predicate<ITimedObject>, ObjectDetectionSettings, ObjectProcessingHint)

    ProcessChords(MidiFile, Action<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings, ChordProcessingHint)

    Performs the specified action on each Chord contained in the MidiFile. More info in the Processing objects: ProcessChords article.
    Declaration
    public static int ProcessChords(this MidiFile file, Action<Chord> action, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, ChordProcessingHint hint = ChordProcessingHint.Default)
    Parameters
    Type Name Description
    MidiFile file MidiFile to search for chords to process.
    Action<Chord> action The action to perform on each Chord contained in the file.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    ChordProcessingHint hint Hint which tells the processing algorithm how it can optimize its performance. The default value is Default.
    Returns
    Type Description
    int Count of processed chords.
    Remarks
    Note that you can always use an object manager to perform any manipulations with chords but dedicated methods of the ChordsManagingUtilities will always be faster and will consume less memory.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • file is null.
    • action is null.
    See Also
    ProcessObjects(MidiFile, ObjectType, Action<ITimedObject>, ObjectDetectionSettings, ObjectProcessingHint)

    ProcessChords(MidiFile, Action<Chord>, Predicate<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings, ChordProcessingHint)

    Performs the specified action on each Chord contained in the MidiFile. More info in the Processing objects: ProcessChords article.
    Declaration
    public static int ProcessChords(this MidiFile file, Action<Chord> action, Predicate<Chord> match, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, ChordProcessingHint hint = ChordProcessingHint.Default)
    Parameters
    Type Name Description
    MidiFile file MidiFile to search for chords to process.
    Action<Chord> action The action to perform on each Chord contained in the file.
    Predicate<Chord> match The predicate that defines the conditions of the Chord to process.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    ChordProcessingHint hint Hint which tells the processing algorithm how it can optimize its performance. The default value is Default.
    Returns
    Type Description
    int Count of processed chords.
    Remarks
    Note that you can always use an object manager to perform any manipulations with chords but dedicated methods of the ChordsManagingUtilities will always be faster and will consume less memory.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • file is null.
    • action is null.
    • match is null.
    See Also
    ProcessObjects(MidiFile, ObjectType, Action<ITimedObject>, Predicate<ITimedObject>, ObjectDetectionSettings, ObjectProcessingHint)

    ProcessChords(TrackChunk, Action<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings, ChordProcessingHint)

    Performs the specified action on each Chord contained in the TrackChunk. More info in the Processing objects: ProcessChords article.
    Declaration
    public static int ProcessChords(this TrackChunk trackChunk, Action<Chord> action, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, ChordProcessingHint hint = ChordProcessingHint.Default)
    Parameters
    Type Name Description
    TrackChunk trackChunk TrackChunk to search for chords to process.
    Action<Chord> action The action to perform on each Chord contained in the trackChunk.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    ChordProcessingHint hint Hint which tells the processing algorithm how it can optimize its performance. The default value is Default.
    Returns
    Type Description
    int Count of processed chords.
    Remarks
    Note that you can always use an object manager to perform any manipulations with chords but dedicated methods of the ChordsManagingUtilities will always be faster and will consume less memory.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • trackChunk is null.
    • action is null.
    See Also
    ProcessObjects(TrackChunk, ObjectType, Action<ITimedObject>, ObjectDetectionSettings, ObjectProcessingHint)

    ProcessChords(TrackChunk, Action<Chord>, Predicate<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings, ChordProcessingHint)

    Performs the specified action on each Chord contained in the TrackChunk. More info in the Processing objects: ProcessChords article.
    Declaration
    public static int ProcessChords(this TrackChunk trackChunk, Action<Chord> action, Predicate<Chord> match, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, ChordProcessingHint hint = ChordProcessingHint.Default)
    Parameters
    Type Name Description
    TrackChunk trackChunk TrackChunk to search for chords to process.
    Action<Chord> action The action to perform on each Chord contained in the trackChunk.
    Predicate<Chord> match The predicate that defines the conditions of the Chord to process.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    ChordProcessingHint hint Hint which tells the processing algorithm how it can optimize its performance. The default value is Default.
    Returns
    Type Description
    int Count of processed chords.
    Remarks
    Note that you can always use an object manager to perform any manipulations with chords but dedicated methods of the ChordsManagingUtilities will always be faster and will consume less memory.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • trackChunk is null.
    • action is null.
    • match is null.
    See Also
    ProcessObjects(TrackChunk, ObjectType, Action<ITimedObject>, Predicate<ITimedObject>, ObjectDetectionSettings, ObjectProcessingHint)

    ProcessChords(IEnumerable<TrackChunk>, Action<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings, ChordProcessingHint)

    Performs the specified action on each Chord contained in the collection of TrackChunk. More info in the Processing objects: ProcessChords article.
    Declaration
    public static int ProcessChords(this IEnumerable<TrackChunk> trackChunks, Action<Chord> action, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, ChordProcessingHint hint = ChordProcessingHint.Default)
    Parameters
    Type Name Description
    IEnumerable<TrackChunk> trackChunks Collection of TrackChunk to search for chords to process.
    Action<Chord> action The action to perform on each Chord contained in the trackChunks.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    ChordProcessingHint hint Hint which tells the processing algorithm how it can optimize its performance. The default value is Default.
    Returns
    Type Description
    int Count of processed chords.
    Remarks
    Note that you can always use an object manager to perform any manipulations with chords but dedicated methods of the ChordsManagingUtilities will always be faster and will consume less memory.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • trackChunks is null.
    • action is null.
    See Also
    ProcessObjects(IEnumerable<TrackChunk>, ObjectType, Action<ITimedObject>, ObjectDetectionSettings, ObjectProcessingHint)

    ProcessChords(IEnumerable<TrackChunk>, Action<Chord>, Predicate<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings, ChordProcessingHint)

    Performs the specified action on each Chord contained in the collection of TrackChunk. More info in the Processing objects: ProcessChords article.
    Declaration
    public static int ProcessChords(this IEnumerable<TrackChunk> trackChunks, Action<Chord> action, Predicate<Chord> match, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, ChordProcessingHint hint = ChordProcessingHint.Default)
    Parameters
    Type Name Description
    IEnumerable<TrackChunk> trackChunks Collection of TrackChunk to search for chords to process.
    Action<Chord> action The action to perform on each Chord contained in the trackChunks.
    Predicate<Chord> match The predicate that defines the conditions of the Chord to process.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    ChordProcessingHint hint Hint which tells the processing algorithm how it can optimize its performance. The default value is Default.
    Returns
    Type Description
    int Count of processed chords.
    Remarks
    Note that you can always use an object manager to perform any manipulations with chords but dedicated methods of the ChordsManagingUtilities will always be faster and will consume less memory.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • trackChunks is null.
    • action is null.
    • match is null.
    See Also
    ProcessObjects(IEnumerable<TrackChunk>, ObjectType, Action<ITimedObject>, Predicate<ITimedObject>, ObjectDetectionSettings, ObjectProcessingHint)

    RemoveChords(EventsCollection, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)

    Removes all chords from the EventsCollection. More info in the Removing objects: RemoveChords article.
    Declaration
    public static int RemoveChords(this EventsCollection eventsCollection, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null)
    Parameters
    Type Name Description
    EventsCollection eventsCollection EventsCollection to search for chords to remove.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    Returns
    Type Description
    int Count of removed chords.
    Exceptions
    Type Condition
    ArgumentNullException eventsCollection is null.
    See Also
    RemoveObjects(EventsCollection, ObjectType, ObjectDetectionSettings)

    RemoveChords(EventsCollection, Predicate<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)

    Removes chords that match the specified conditions from the EventsCollection. More info in the Removing objects: RemoveChords article.
    Declaration
    public static int RemoveChords(this EventsCollection eventsCollection, Predicate<Chord> match, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null)
    Parameters
    Type Name Description
    EventsCollection eventsCollection EventsCollection to search for chords to remove.
    Predicate<Chord> match The predicate that defines the conditions of the Chord to remove.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    Returns
    Type Description
    int Count of removed chords.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • eventsCollection is null.
    • match is null.
    See Also
    RemoveObjects(EventsCollection, ObjectType, Predicate<ITimedObject>, ObjectDetectionSettings)

    RemoveChords(MidiFile, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)

    Removes all chords from the MidiFile. More info in the Removing objects: RemoveChords article.
    Declaration
    public static int RemoveChords(this MidiFile file, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null)
    Parameters
    Type Name Description
    MidiFile file MidiFile to search for chords to remove.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    Returns
    Type Description
    int Count of removed chords.
    Exceptions
    Type Condition
    ArgumentNullException file is null.
    See Also
    RemoveObjects(MidiFile, ObjectType, ObjectDetectionSettings)

    RemoveChords(MidiFile, Predicate<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)

    Removes chords that match the specified conditions from the MidiFile. More info in the Removing objects: RemoveChords article.
    Declaration
    public static int RemoveChords(this MidiFile file, Predicate<Chord> match, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null)
    Parameters
    Type Name Description
    MidiFile file MidiFile to search for chords to remove.
    Predicate<Chord> match The predicate that defines the conditions of the Chord to remove.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    Returns
    Type Description
    int Count of removed chords.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • file is null.
    • match is null.
    See Also
    RemoveObjects(MidiFile, ObjectType, Predicate<ITimedObject>, ObjectDetectionSettings)

    RemoveChords(TrackChunk, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)

    Removes all chords from the TrackChunk. More info in the Removing objects: RemoveChords article.
    Declaration
    public static int RemoveChords(this TrackChunk trackChunk, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null)
    Parameters
    Type Name Description
    TrackChunk trackChunk TrackChunk to search for chords to remove.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    Returns
    Type Description
    int Count of removed chords.
    Exceptions
    Type Condition
    ArgumentNullException trackChunk is null.
    See Also
    RemoveObjects(TrackChunk, ObjectType, ObjectDetectionSettings)

    RemoveChords(TrackChunk, Predicate<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)

    Removes chords that match the specified conditions from the TrackChunk. More info in the Removing objects: RemoveChords article.
    Declaration
    public static int RemoveChords(this TrackChunk trackChunk, Predicate<Chord> match, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null)
    Parameters
    Type Name Description
    TrackChunk trackChunk TrackChunk to search for chords to remove.
    Predicate<Chord> match The predicate that defines the conditions of the Chord to remove.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    Returns
    Type Description
    int Count of removed chords.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • trackChunk is null.
    • match is null.
    See Also
    RemoveObjects(TrackChunk, ObjectType, Predicate<ITimedObject>, ObjectDetectionSettings)

    RemoveChords(IEnumerable<TrackChunk>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)

    Removes all chords from the collection of TrackChunk. More info in the Removing objects: RemoveChords article.
    Declaration
    public static int RemoveChords(this IEnumerable<TrackChunk> trackChunks, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null)
    Parameters
    Type Name Description
    IEnumerable<TrackChunk> trackChunks Collection of TrackChunk to search for chords to remove.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    Returns
    Type Description
    int Count of removed chords.
    Exceptions
    Type Condition
    ArgumentNullException trackChunks is null.
    See Also
    RemoveObjects(IEnumerable<TrackChunk>, ObjectType, ObjectDetectionSettings)

    RemoveChords(IEnumerable<TrackChunk>, Predicate<Chord>, ChordDetectionSettings, NoteDetectionSettings, TimedEventDetectionSettings)

    Removes chords that match the specified conditions from the collection of TrackChunk. More info in the Removing objects: RemoveChords article.
    Declaration
    public static int RemoveChords(this IEnumerable<TrackChunk> trackChunks, Predicate<Chord> match, ChordDetectionSettings settings = null, NoteDetectionSettings noteDetectionSettings = null, TimedEventDetectionSettings timedEventDetectionSettings = null)
    Parameters
    Type Name Description
    IEnumerable<TrackChunk> trackChunks Collection of TrackChunk to search for chords to remove.
    Predicate<Chord> match The predicate that defines the conditions of the Chord to remove.
    ChordDetectionSettings settings Settings according to which chords should be detected and built.
    NoteDetectionSettings noteDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes for chords.
    Returns
    Type Description
    int Count of removed chords.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • trackChunks is null.
    • match is null.
    See Also
    RemoveObjects(IEnumerable<TrackChunk>, ObjectType, Predicate<ITimedObject>, ObjectDetectionSettings)
    In this article
    Back to top 2024 / Generated by DocFX