Search Results for

    Show / Hide Table of Contents

    Class NotesManagingUtilities

    Extension methods for notes managing.
    Inheritance
    object
    NotesManagingUtilities
    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 NotesManagingUtilities

    Methods

    GetMusicTheoryNote(Note)

    Returns Note corresponding to the specified Note.
    Declaration
    public static Note GetMusicTheoryNote(this Note note)
    Parameters
    Type Name Description
    Note note Note to get music theory note from.
    Returns
    Type Description
    Note Note corresponding to the note.
    Exceptions
    Type Condition
    ArgumentNullException note is null.

    GetNotes(EventsCollection, NoteDetectionSettings, TimedEventDetectionSettings)

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

    GetNotes(MidiFile, NoteDetectionSettings, TimedEventDetectionSettings)

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

    GetNotes(TrackChunk, NoteDetectionSettings, TimedEventDetectionSettings)

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

    GetNotes(IEnumerable<MidiEvent>, NoteDetectionSettings, TimedEventDetectionSettings)

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

    GetNotes(IEnumerable<TrackChunk>, NoteDetectionSettings, TimedEventDetectionSettings)

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

    ManageNotes(EventsCollection, 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<Note> ManageNotes(this EventsCollection eventsCollection, NoteDetectionSettings settings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, TimedObjectsComparer comparer = null)
    Parameters
    Type Name Description
    EventsCollection eventsCollection EventsCollection that holds notes to manage.
    NoteDetectionSettings settings Settings according to which notes should be detected and built.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    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<Note> An instance of the TimedObjectsManager<TObject> that can be used to manage notes represented by the eventsCollection.
    Exceptions
    Type Condition
    ArgumentNullException eventsCollection is null.

    ManageNotes(TrackChunk, 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<Note> ManageNotes(this TrackChunk trackChunk, NoteDetectionSettings settings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, TimedObjectsComparer comparer = null)
    Parameters
    Type Name Description
    TrackChunk trackChunk TrackChunk that holds notes to manage.
    NoteDetectionSettings settings Settings according to which notes should be detected and built.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    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<Note> An instance of the TimedObjectsManager<TObject> that can be used to manage notes represented by the trackChunk.
    Exceptions
    Type Condition
    ArgumentNullException trackChunk is null.

    ProcessNotes(EventsCollection, Action<Note>, NoteDetectionSettings, TimedEventDetectionSettings, NoteProcessingHint)

    Performs the specified action on each Note contained in the EventsCollection. More info in the Processing objects: ProcessNotes article.
    Declaration
    public static int ProcessNotes(this EventsCollection eventsCollection, Action<Note> action, NoteDetectionSettings settings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, NoteProcessingHint hint = NoteProcessingHint.Default)
    Parameters
    Type Name Description
    EventsCollection eventsCollection EventsCollection to search for notes to process.
    Action<Note> action The action to perform on each Note contained in the eventsCollection.
    NoteDetectionSettings settings Settings according to which notes should be detected and built.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    NoteProcessingHint 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 notes.
    Remarks
    Note that you can always use an object manager to perform any manipulations with notes but dedicated methods of the NotesManagingUtilities 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)

    ProcessNotes(EventsCollection, Action<Note>, Predicate<Note>, NoteDetectionSettings, TimedEventDetectionSettings, NoteProcessingHint)

    Performs the specified action on each Note contained in the EventsCollection. More info in the Processing objects: ProcessNotes article.
    Declaration
    public static int ProcessNotes(this EventsCollection eventsCollection, Action<Note> action, Predicate<Note> match, NoteDetectionSettings settings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, NoteProcessingHint hint = NoteProcessingHint.Default)
    Parameters
    Type Name Description
    EventsCollection eventsCollection EventsCollection to search for notes to process.
    Action<Note> action The action to perform on each Note contained in the eventsCollection.
    Predicate<Note> match The predicate that defines the conditions of the Note to process.
    NoteDetectionSettings settings Settings according to which notes should be detected and built.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    NoteProcessingHint 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 notes.
    Remarks
    Note that you can always use an object manager to perform any manipulations with notes but dedicated methods of the NotesManagingUtilities 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)

    ProcessNotes(MidiFile, Action<Note>, NoteDetectionSettings, TimedEventDetectionSettings, NoteProcessingHint)

    Performs the specified action on each Note contained in the MidiFile. More info in the Processing objects: ProcessNotes article.
    Declaration
    public static int ProcessNotes(this MidiFile file, Action<Note> action, NoteDetectionSettings settings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, NoteProcessingHint hint = NoteProcessingHint.Default)
    Parameters
    Type Name Description
    MidiFile file MidiFile to search for notes to process.
    Action<Note> action The action to perform on each Note contained in the file.
    NoteDetectionSettings settings Settings according to which notes should be detected and built.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    NoteProcessingHint 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 notes.
    Remarks
    Note that you can always use an object manager to perform any manipulations with notes but dedicated methods of the NotesManagingUtilities 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)

    ProcessNotes(MidiFile, Action<Note>, Predicate<Note>, NoteDetectionSettings, TimedEventDetectionSettings, NoteProcessingHint)

    Performs the specified action on each Note contained in the MidiFile. More info in the Processing objects: ProcessNotes article.
    Declaration
    public static int ProcessNotes(this MidiFile file, Action<Note> action, Predicate<Note> match, NoteDetectionSettings settings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, NoteProcessingHint hint = NoteProcessingHint.Default)
    Parameters
    Type Name Description
    MidiFile file MidiFile to search for notes to process.
    Action<Note> action The action to perform on each Note contained in the file.
    Predicate<Note> match The predicate that defines the conditions of the Note to process.
    NoteDetectionSettings settings Settings according to which notes should be detected and built.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    NoteProcessingHint 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 notes.
    Remarks
    Note that you can always use an object manager to perform any manipulations with notes but dedicated methods of the NotesManagingUtilities 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)

    ProcessNotes(TrackChunk, Action<Note>, NoteDetectionSettings, TimedEventDetectionSettings, NoteProcessingHint)

    Performs the specified action on each Note contained in the TrackChunk. More info in the Processing objects: ProcessNotes article.
    Declaration
    public static int ProcessNotes(this TrackChunk trackChunk, Action<Note> action, NoteDetectionSettings settings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, NoteProcessingHint hint = NoteProcessingHint.Default)
    Parameters
    Type Name Description
    TrackChunk trackChunk TrackChunk to search for notes to process.
    Action<Note> action The action to perform on each Note contained in the trackChunk.
    NoteDetectionSettings settings Settings according to which notes should be detected and built.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    NoteProcessingHint 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 notes.
    Remarks
    Note that you can always use an object manager to perform any manipulations with notes but dedicated methods of the NotesManagingUtilities 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)

    ProcessNotes(TrackChunk, Action<Note>, Predicate<Note>, NoteDetectionSettings, TimedEventDetectionSettings, NoteProcessingHint)

    Performs the specified action on each Note contained in the TrackChunk. More info in the Processing objects: ProcessNotes article.
    Declaration
    public static int ProcessNotes(this TrackChunk trackChunk, Action<Note> action, Predicate<Note> match, NoteDetectionSettings settings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, NoteProcessingHint hint = NoteProcessingHint.Default)
    Parameters
    Type Name Description
    TrackChunk trackChunk TrackChunk to search for notes to process.
    Action<Note> action The action to perform on each Note contained in the trackChunk.
    Predicate<Note> match The predicate that defines the conditions of the Note to process.
    NoteDetectionSettings settings Settings according to which notes should be detected and built.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    NoteProcessingHint 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 notes.
    Remarks
    Note that you can always use an object manager to perform any manipulations with notes but dedicated methods of the NotesManagingUtilities 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)

    ProcessNotes(IEnumerable<TrackChunk>, Action<Note>, NoteDetectionSettings, TimedEventDetectionSettings, NoteProcessingHint)

    Performs the specified action on each Note contained in the collection of TrackChunk. More info in the Processing objects: ProcessNotes article.
    Declaration
    public static int ProcessNotes(this IEnumerable<TrackChunk> trackChunks, Action<Note> action, NoteDetectionSettings settings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, NoteProcessingHint hint = NoteProcessingHint.Default)
    Parameters
    Type Name Description
    IEnumerable<TrackChunk> trackChunks Collection of TrackChunk to search for notes to process.
    Action<Note> action The action to perform on each Note contained in the trackChunks.
    NoteDetectionSettings settings Settings according to which notes should be detected and built.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    NoteProcessingHint 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 notes.
    Remarks
    Note that you can always use an object manager to perform any manipulations with notes but dedicated methods of the NotesManagingUtilities 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)

    ProcessNotes(IEnumerable<TrackChunk>, Action<Note>, Predicate<Note>, NoteDetectionSettings, TimedEventDetectionSettings, NoteProcessingHint)

    Performs the specified action on each Note contained in the collection of TrackChunk. More info in the Processing objects: ProcessNotes article.
    Declaration
    public static int ProcessNotes(this IEnumerable<TrackChunk> trackChunks, Action<Note> action, Predicate<Note> match, NoteDetectionSettings settings = null, TimedEventDetectionSettings timedEventDetectionSettings = null, NoteProcessingHint hint = NoteProcessingHint.Default)
    Parameters
    Type Name Description
    IEnumerable<TrackChunk> trackChunks Collection of TrackChunk to search for notes to process.
    Action<Note> action The action to perform on each Note contained in the trackChunks.
    Predicate<Note> match The predicate that defines the conditions of the Note to process.
    NoteDetectionSettings settings Settings according to which notes should be detected and built.
    TimedEventDetectionSettings timedEventDetectionSettings Settings according to which timed events should be detected and built to construct notes.
    NoteProcessingHint 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 notes.
    Remarks
    Note that you can always use an object manager to perform any manipulations with notes but dedicated methods of the NotesManagingUtilities 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)

    RemoveNotes(EventsCollection, NoteDetectionSettings, TimedEventDetectionSettings)

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

    RemoveNotes(EventsCollection, Predicate<Note>, NoteDetectionSettings, TimedEventDetectionSettings)

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

    One of the following errors occurred:

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

    RemoveNotes(MidiFile, NoteDetectionSettings, TimedEventDetectionSettings)

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

    RemoveNotes(MidiFile, Predicate<Note>, NoteDetectionSettings, TimedEventDetectionSettings)

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

    One of the following errors occurred:

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

    RemoveNotes(TrackChunk, NoteDetectionSettings, TimedEventDetectionSettings)

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

    RemoveNotes(TrackChunk, Predicate<Note>, NoteDetectionSettings, TimedEventDetectionSettings)

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

    One of the following errors occurred:

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

    RemoveNotes(IEnumerable<TrackChunk>, NoteDetectionSettings, TimedEventDetectionSettings)

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

    RemoveNotes(IEnumerable<TrackChunk>, Predicate<Note>, NoteDetectionSettings, TimedEventDetectionSettings)

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