Search Results for

    Show / Hide Table of Contents

    Class TimedObjectUtilities

    Extension methods for objects that implement the ITimedObject interface.
    Inheritance
    object
    TimedObjectUtilities
    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 TimedObjectUtilities

    Methods

    AddObjects(EventsCollection, IEnumerable<ITimedObject>)

    Adds the specified collection of objects to EventsCollection.
    Declaration
    public static void AddObjects(this EventsCollection eventsCollection, IEnumerable<ITimedObject> timedObjects)
    Parameters
    Type Name Description
    EventsCollection eventsCollection EventsCollection to add objects to.
    IEnumerable<ITimedObject> timedObjects Objects to add to eventsCollection.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • eventsCollection is null.
    • timedObjects is null.

    AddObjects(TrackChunk, IEnumerable<ITimedObject>)

    Adds the specified collection of objects to TrackChunk.
    Declaration
    public static void AddObjects(this TrackChunk trackChunk, IEnumerable<ITimedObject> timedObjects)
    Parameters
    Type Name Description
    TrackChunk trackChunk TrackChunk to add objects to.
    IEnumerable<ITimedObject> timedObjects Objects to add to trackChunk.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • trackChunk is null.
    • timedObjects is null.

    AtTime<TObject>(IEnumerable<TObject>, ITimeSpan, TempoMap)

    Filters collection of ITimedObject to return objects at the specified time.
    Declaration
    public static IEnumerable<TObject> AtTime<TObject>(this IEnumerable<TObject> objects, ITimeSpan time, TempoMap tempoMap) where TObject : ITimedObject
    Parameters
    Type Name Description
    IEnumerable<TObject> objects A collection to filter.
    ITimeSpan time Time to filter objects by.
    TempoMap tempoMap Tempo map to filter objects by time.
    Returns
    Type Description
    IEnumerable<TObject> A collection that contains objects from the input sequence that are at the specified time.
    Type Parameters
    Name Description
    TObject The type of the elements of objects.
    Remarks
    Note that changes made on the objects returned by this method will not be saved to an underlying data source (events collection, track chunk, file). To change properties of timed objects and save them you need to use a manager appropriate for an object's type.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • objects is null.
    • time is null.
    • tempoMap is null.

    AtTime<TObject>(IEnumerable<TObject>, long)

    Filters collection of ITimedObject to return objects at the specified time.
    Declaration
    public static IEnumerable<TObject> AtTime<TObject>(this IEnumerable<TObject> objects, long time) where TObject : ITimedObject
    Parameters
    Type Name Description
    IEnumerable<TObject> objects A collection to filter.
    long time Time to filter objects by.
    Returns
    Type Description
    IEnumerable<TObject> A collection that contains objects from the input sequence that are at the specified time.
    Type Parameters
    Name Description
    TObject The type of the elements of objects.
    Remarks
    Note that changes made on the objects returned by this method will not be saved to an underlying data source (events collection, track chunk, file). To change properties of timed objects and save them you need to use a manager appropriate for an object's type.
    Exceptions
    Type Condition
    ArgumentNullException objects is null.
    ArgumentOutOfRangeException time is negative.

    ProcessObjects(EventsCollection, ObjectType, Action<ITimedObject>, ObjectDetectionSettings, ObjectProcessingHint)

    Performs the specified action on each object contained in the EventsCollection. Objects for processing will be selected by the specified object type. More info in the Processing objects: ProcessObjects article.
    Declaration
    public static int ProcessObjects(this EventsCollection eventsCollection, ObjectType objectType, Action<ITimedObject> action, ObjectDetectionSettings settings = null, ObjectProcessingHint hint = ObjectProcessingHint.Default)
    Parameters
    Type Name Description
    EventsCollection eventsCollection EventsCollection to search for objects to process.
    ObjectType objectType Types of objects to process (for example, ObjectType.Chord | ObjectType.TimedEvent).
    Action<ITimedObject> action The action to perform on each object contained in the eventsCollection.
    ObjectDetectionSettings settings Settings according to which objects should be detected and built.
    ObjectProcessingHint 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 objects.
    Remarks
    Note that you can always use an object manager to perform any manipulations with objects but dedicated methods of the TimedObjectUtilities 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.

    ProcessObjects(EventsCollection, ObjectType, Action<ITimedObject>, Predicate<ITimedObject>, ObjectDetectionSettings, ObjectProcessingHint)

    Performs the specified action on objects contained in the EventsCollection. Objects for processing will be selected by the specified object type and matching predicate. More info in the Processing objects: ProcessObjects article.
    Declaration
    public static int ProcessObjects(this EventsCollection eventsCollection, ObjectType objectType, Action<ITimedObject> action, Predicate<ITimedObject> match, ObjectDetectionSettings settings = null, ObjectProcessingHint hint = ObjectProcessingHint.Default)
    Parameters
    Type Name Description
    EventsCollection eventsCollection EventsCollection to search for objects to process.
    ObjectType objectType Types of objects to process (for example, ObjectType.Chord | ObjectType.TimedEvent).
    Action<ITimedObject> action The action to perform on each object contained in the eventsCollection.
    Predicate<ITimedObject> match The predicate that defines the conditions of an object to process. Predicate should return true for an object to process.
    ObjectDetectionSettings settings Settings according to which objects should be detected and built.
    ObjectProcessingHint 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 objects.
    Remarks
    Note that you can always use an object manager to perform any manipulations with objects but dedicated methods of the TimedObjectUtilities 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.

    ProcessObjects(MidiFile, ObjectType, Action<ITimedObject>, ObjectDetectionSettings, ObjectProcessingHint)

    Performs the specified action on each object contained in MidiFile. Objects for processing will be selected by the specified object type. More info in the Processing objects: ProcessObjects article.
    Declaration
    public static int ProcessObjects(this MidiFile file, ObjectType objectType, Action<ITimedObject> action, ObjectDetectionSettings settings = null, ObjectProcessingHint hint = ObjectProcessingHint.Default)
    Parameters
    Type Name Description
    MidiFile file MidiFile to search for objects to process.
    ObjectType objectType Types of objects to process (for example, ObjectType.Chord | ObjectType.TimedEvent).
    Action<ITimedObject> action The action to perform on each object contained in the file.
    ObjectDetectionSettings settings Settings according to which objects should be detected and built.
    ObjectProcessingHint 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 objects.
    Remarks
    Note that you can always use an object manager to perform any manipulations with objects but dedicated methods of the TimedObjectUtilities 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.

    ProcessObjects(MidiFile, ObjectType, Action<ITimedObject>, Predicate<ITimedObject>, ObjectDetectionSettings, ObjectProcessingHint)

    Performs the specified action on objects contained in MidiFile. Objects for processing will be selected by the specified object type and matching predicate. More info in the Processing objects: ProcessObjects article.
    Declaration
    public static int ProcessObjects(this MidiFile file, ObjectType objectType, Action<ITimedObject> action, Predicate<ITimedObject> match, ObjectDetectionSettings settings = null, ObjectProcessingHint hint = ObjectProcessingHint.Default)
    Parameters
    Type Name Description
    MidiFile file MidiFile to search for objects to process.
    ObjectType objectType Types of objects to process (for example, ObjectType.Chord | ObjectType.TimedEvent).
    Action<ITimedObject> action The action to perform on each object contained in the file.
    Predicate<ITimedObject> match The predicate that defines the conditions of an object to process. Predicate should return true for an object to process.
    ObjectDetectionSettings settings Settings according to which objects should be detected and built.
    ObjectProcessingHint 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 objects.
    Remarks
    Note that you can always use an object manager to perform any manipulations with objects but dedicated methods of the TimedObjectUtilities 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.

    ProcessObjects(TrackChunk, ObjectType, Action<ITimedObject>, ObjectDetectionSettings, ObjectProcessingHint)

    Performs the specified action on each object contained in the TrackChunk. Objects for processing will be selected by the specified object type. More info in the Processing objects: ProcessObjects article.
    Declaration
    public static int ProcessObjects(this TrackChunk trackChunk, ObjectType objectType, Action<ITimedObject> action, ObjectDetectionSettings settings = null, ObjectProcessingHint hint = ObjectProcessingHint.Default)
    Parameters
    Type Name Description
    TrackChunk trackChunk TrackChunk to search for objects to process.
    ObjectType objectType Types of objects to process (for example, ObjectType.Chord | ObjectType.TimedEvent).
    Action<ITimedObject> action The action to perform on each object contained in the trackChunk.
    ObjectDetectionSettings settings Settings according to which objects should be detected and built.
    ObjectProcessingHint 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 objects.
    Remarks
    Note that you can always use an object manager to perform any manipulations with objects but dedicated methods of the TimedObjectUtilities 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.

    ProcessObjects(TrackChunk, ObjectType, Action<ITimedObject>, Predicate<ITimedObject>, ObjectDetectionSettings, ObjectProcessingHint)

    Performs the specified action on objects contained in the TrackChunk. Objects for processing will be selected by the specified object type and matching predicate. More info in the Processing objects: ProcessObjects article.
    Declaration
    public static int ProcessObjects(this TrackChunk trackChunk, ObjectType objectType, Action<ITimedObject> action, Predicate<ITimedObject> match, ObjectDetectionSettings settings = null, ObjectProcessingHint hint = ObjectProcessingHint.Default)
    Parameters
    Type Name Description
    TrackChunk trackChunk TrackChunk to search for objects to process.
    ObjectType objectType Types of objects to process (for example, ObjectType.Chord | ObjectType.TimedEvent).
    Action<ITimedObject> action The action to perform on each object contained in the trackChunk.
    Predicate<ITimedObject> match The predicate that defines the conditions of an object to process. Predicate should return true for an object to process.
    ObjectDetectionSettings settings Settings according to which objects should be detected and built.
    ObjectProcessingHint 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 objects.
    Remarks
    Note that you can always use an object manager to perform any manipulations with objects but dedicated methods of the TimedObjectUtilities 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.

    ProcessObjects(IEnumerable<TrackChunk>, ObjectType, Action<ITimedObject>, ObjectDetectionSettings, ObjectProcessingHint)

    Performs the specified action on each object contained in the collection of TrackChunk. Objects for processing will be selected by the specified object type. More info in the Processing objects: ProcessObjects article.
    Declaration
    public static int ProcessObjects(this IEnumerable<TrackChunk> trackChunks, ObjectType objectType, Action<ITimedObject> action, ObjectDetectionSettings settings = null, ObjectProcessingHint hint = ObjectProcessingHint.Default)
    Parameters
    Type Name Description
    IEnumerable<TrackChunk> trackChunks The collection of TrackChunk to search for objects to process.
    ObjectType objectType Types of objects to process (for example, ObjectType.Chord | ObjectType.TimedEvent).
    Action<ITimedObject> action The action to perform on each object contained in the trackChunks.
    ObjectDetectionSettings settings Settings according to which objects should be detected and built.
    ObjectProcessingHint 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 objects.
    Remarks
    Note that you can always use an object manager to perform any manipulations with objects but dedicated methods of the TimedObjectUtilities 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.

    ProcessObjects(IEnumerable<TrackChunk>, ObjectType, Action<ITimedObject>, Predicate<ITimedObject>, ObjectDetectionSettings, ObjectProcessingHint)

    Performs the specified action on objects contained in the collection of TrackChunk. Objects for processing will be selected by the specified object type and matching predicate. More info in the Processing objects: ProcessObjects article.
    Declaration
    public static int ProcessObjects(this IEnumerable<TrackChunk> trackChunks, ObjectType objectType, Action<ITimedObject> action, Predicate<ITimedObject> match, ObjectDetectionSettings settings = null, ObjectProcessingHint hint = ObjectProcessingHint.Default)
    Parameters
    Type Name Description
    IEnumerable<TrackChunk> trackChunks The collection of TrackChunk to search for objects to process.
    ObjectType objectType Types of objects to process (for example, ObjectType.Chord | ObjectType.TimedEvent).
    Action<ITimedObject> action The action to perform on each object contained in the trackChunks.
    Predicate<ITimedObject> match The predicate that defines the conditions of an object to process. Predicate should return true for an object to process.
    ObjectDetectionSettings settings Settings according to which objects should be detected and built.
    ObjectProcessingHint 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 objects.
    Remarks
    Note that you can always use an object manager to perform any manipulations with objects but dedicated methods of the TimedObjectUtilities 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.

    RemoveObjects(EventsCollection, ObjectType, ObjectDetectionSettings)

    Removes all objects of the specified type from EventsCollection. More info in the Removing objects: RemoveObjects article.
    Declaration
    public static int RemoveObjects(this EventsCollection eventsCollection, ObjectType objectType, ObjectDetectionSettings settings = null)
    Parameters
    Type Name Description
    EventsCollection eventsCollection EventsCollection to search for objects to remove.
    ObjectType objectType Types of objects to remove (for example, ObjectType.Chord | ObjectType.Note).
    ObjectDetectionSettings settings Settings according to which objects should be detected and built.
    Returns
    Type Description
    int Count of removed objects.
    Exceptions
    Type Condition
    ArgumentNullException eventsCollection is null.

    RemoveObjects(EventsCollection, ObjectType, Predicate<ITimedObject>, ObjectDetectionSettings)

    Removes objects from EventsCollection. Objects for removing will be selected by the specified object type and matching predicate. More info in the Removing objects: RemoveObjects article.
    Declaration
    public static int RemoveObjects(this EventsCollection eventsCollection, ObjectType objectType, Predicate<ITimedObject> match, ObjectDetectionSettings settings = null)
    Parameters
    Type Name Description
    EventsCollection eventsCollection EventsCollection to search for objects to remove.
    ObjectType objectType Types of objects to remove (for example, ObjectType.Chord | ObjectType.Note).
    Predicate<ITimedObject> match The predicate that defines the conditions of an object to remove. Predicate should return true for an object that must be removed.
    ObjectDetectionSettings settings Settings according to which objects should be detected and built.
    Returns
    Type Description
    int Count of removed objects.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • eventsCollection is null.
    • match is null.

    RemoveObjects(MidiFile, ObjectType, ObjectDetectionSettings)

    Removes all objects of the specified type from the MidiFile. More info in the Removing objects: RemoveObjects article.
    Declaration
    public static int RemoveObjects(this MidiFile file, ObjectType objectType, ObjectDetectionSettings settings = null)
    Parameters
    Type Name Description
    MidiFile file MidiFile to search for objects to remove.
    ObjectType objectType Types of objects to remove (for example, ObjectType.Chord | ObjectType.Note).
    ObjectDetectionSettings settings Settings according to which objects should be detected and built.
    Returns
    Type Description
    int Count of removed objects.
    Exceptions
    Type Condition
    ArgumentNullException file is null.

    RemoveObjects(MidiFile, ObjectType, Predicate<ITimedObject>, ObjectDetectionSettings)

    Removes objects from MidiFile. Objects for removing will be selected by the specified object type and matching predicate. More info in the Removing objects: RemoveObjects article.
    Declaration
    public static int RemoveObjects(this MidiFile file, ObjectType objectType, Predicate<ITimedObject> match, ObjectDetectionSettings settings = null)
    Parameters
    Type Name Description
    MidiFile file MidiFile to search for objects to remove.
    ObjectType objectType Types of objects to remove (for example, ObjectType.Chord | ObjectType.Note).
    Predicate<ITimedObject> match The predicate that defines the conditions of an object to remove. Predicate should return true for an object that must be removed.
    ObjectDetectionSettings settings Settings according to which objects should be detected and built.
    Returns
    Type Description
    int Count of removed objects.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • file is null.
    • match is null.

    RemoveObjects(TrackChunk, ObjectType, ObjectDetectionSettings)

    Removes all objects of the specified type from TrackChunk. More info in the Removing objects: RemoveObjects article.
    Declaration
    public static int RemoveObjects(this TrackChunk trackChunk, ObjectType objectType, ObjectDetectionSettings settings = null)
    Parameters
    Type Name Description
    TrackChunk trackChunk TrackChunk to search for objects to remove.
    ObjectType objectType Types of objects to remove (for example, ObjectType.Chord | ObjectType.Note).
    ObjectDetectionSettings settings Settings according to which objects should be detected and built.
    Returns
    Type Description
    int Count of removed objects.
    Exceptions
    Type Condition
    ArgumentNullException trackChunk is null.

    RemoveObjects(TrackChunk, ObjectType, Predicate<ITimedObject>, ObjectDetectionSettings)

    Removes objects from TrackChunk. Objects for removing will be selected by the specified object type and matching predicate. More info in the Removing objects: RemoveObjects article.
    Declaration
    public static int RemoveObjects(this TrackChunk trackChunk, ObjectType objectType, Predicate<ITimedObject> match, ObjectDetectionSettings settings = null)
    Parameters
    Type Name Description
    TrackChunk trackChunk TrackChunk to search for objects to remove.
    ObjectType objectType Types of objects to remove (for example, ObjectType.Chord | ObjectType.Note).
    Predicate<ITimedObject> match The predicate that defines the conditions of an object to remove. Predicate should return true for an object that must be removed.
    ObjectDetectionSettings settings Settings according to which objects should be detected and built.
    Returns
    Type Description
    int Count of removed objects.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • trackChunk is null.
    • match is null.

    RemoveObjects(IEnumerable<TrackChunk>, ObjectType, ObjectDetectionSettings)

    Removes all objects of the specified type from the collection of TrackChunk. More info in the Removing objects: RemoveObjects article.
    Declaration
    public static int RemoveObjects(this IEnumerable<TrackChunk> trackChunks, ObjectType objectType, ObjectDetectionSettings settings = null)
    Parameters
    Type Name Description
    IEnumerable<TrackChunk> trackChunks The collection of TrackChunk to search for objects to remove.
    ObjectType objectType Types of objects to remove (for example, ObjectType.Chord | ObjectType.Note).
    ObjectDetectionSettings settings Settings according to which objects should be detected and built.
    Returns
    Type Description
    int Count of removed objects.
    Exceptions
    Type Condition
    ArgumentNullException trackChunks is null.

    RemoveObjects(IEnumerable<TrackChunk>, ObjectType, Predicate<ITimedObject>, ObjectDetectionSettings)

    Removes objects from the collection of TrackChunk. Objects for removing will be selected by the specified object type and matching predicate. More info in the Removing objects: RemoveObjects article.
    Declaration
    public static int RemoveObjects(this IEnumerable<TrackChunk> trackChunks, ObjectType objectType, Predicate<ITimedObject> match, ObjectDetectionSettings settings = null)
    Parameters
    Type Name Description
    IEnumerable<TrackChunk> trackChunks The collection of TrackChunk to search for objects to remove.
    ObjectType objectType Types of objects to remove (for example, ObjectType.Chord | ObjectType.Note).
    Predicate<ITimedObject> match The predicate that defines the conditions of an object to remove. Predicate should return true for an object that must be removed.
    ObjectDetectionSettings settings Settings according to which objects should be detected and built.
    Returns
    Type Description
    int Count of removed objects.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • trackChunks is null.
    • match is null.

    SetTime<TObject>(TObject, ITimeSpan, TempoMap)

    Sets time of the specified object in terms of ITimeSpan.
    Declaration
    public static TObject SetTime<TObject>(this TObject obj, ITimeSpan time, TempoMap tempoMap) where TObject : ITimedObject
    Parameters
    Type Name Description
    TObject obj Object to set time of.
    ITimeSpan time New time of the obj.
    TempoMap tempoMap TempoMap used to calculate new time in ticks.
    Returns
    Type Description
    TObject The same object the method was called on.
    Type Parameters
    Name Description
    TObject The type of the obj.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • obj is null.
    • time is null.
    • tempoMap is null.
    • One of the objects is null.

    TimeAs(ITimedObject, TimeSpanType, TempoMap)

    Gets time of an ITimedObject as an instance of time span defined by the specified time span type.
    Declaration
    public static ITimeSpan TimeAs(this ITimedObject obj, TimeSpanType timeType, TempoMap tempoMap)
    Parameters
    Type Name Description
    ITimedObject obj Object to get time of.
    TimeSpanType timeType The type of time span to convert the time of obj to.
    TempoMap tempoMap Tempo map to calculate time of the obj.
    Returns
    Type Description
    ITimeSpan Time of the specified object as an instance of time span defined by the timeType.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • obj is null.
    • tempoMap is null.
    InvalidEnumArgumentException timeType specified an invalid value.

    TimeAs<TTime>(ITimedObject, TempoMap)

    Gets time of an ITimedObject as an instance of type that implements the ITimeSpan interface.
    Declaration
    public static TTime TimeAs<TTime>(this ITimedObject obj, TempoMap tempoMap) where TTime : ITimeSpan
    Parameters
    Type Name Description
    ITimedObject obj Object to get time of.
    TempoMap tempoMap Tempo map to calculate time of the obj.
    Returns
    Type Description
    TTime Time of the specified object as an instance of TTime.
    Type Parameters
    Name Description
    TTime Type that will represent the time of the obj.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • obj is null.
    • tempoMap is null.
    NotSupportedException TTime is not supported.

    ToFile(IEnumerable<ITimedObject>)

    Creates a MIDI file with the specified timed objects.
    Declaration
    public static MidiFile ToFile(this IEnumerable<ITimedObject> timedObjects)
    Parameters
    Type Name Description
    IEnumerable<ITimedObject> timedObjects Collection of objects to create a MIDI file from.
    Returns
    Type Description
    MidiFile MidiFile containing the timedObjects.
    Remarks
    Note that only MIDI events allowed by SMF specification will be added to result MIDI file. So instances of TimedEvent containing SystemCommonEvent or SystemRealTimeEvent won't be added.
    Exceptions
    Type Condition
    ArgumentNullException timedObjects is null.

    ToTrackChunk(IEnumerable<ITimedObject>)

    Creates a track chunk with the specified objects.
    Declaration
    public static TrackChunk ToTrackChunk(this IEnumerable<ITimedObject> timedObjects)
    Parameters
    Type Name Description
    IEnumerable<ITimedObject> timedObjects Collection of objects to create a track chunk from.
    Returns
    Type Description
    TrackChunk TrackChunk containing the timedObjects.
    Remarks
    Note that only MIDI events allowed by SMF specification will be added to result track chunk. So instances of TimedEvent containing SystemCommonEvent or SystemRealTimeEvent won't be added.
    Exceptions
    Type Condition
    ArgumentNullException timedObjects is null.
    In this article
    Back to top 2024 / Generated by DocFX