Search Results for

    Show / Hide Table of Contents

    Class TempoMapManagingUtilities

    Extension methods for managing tempo map. More info in the Tempo map article.
    Inheritance
    object
    TempoMapManagingUtilities
    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 TempoMapManagingUtilities

    Methods

    GetTempoMap(MidiFile)

    Gets tempo map of the specified MIDI file.
    Declaration
    public static TempoMap GetTempoMap(this MidiFile file)
    Parameters
    Type Name Description
    MidiFile file MIDI file to get tempo map of.
    Returns
    Type Description
    TempoMap Tempo map of the file.
    Exceptions
    Type Condition
    ArgumentNullException file is null.

    GetTempoMap(IEnumerable<TrackChunk>, TimeDivision)

    Gets tempo map represented by the specified time division and events collections of the specified track chunks.
    Declaration
    public static TempoMap GetTempoMap(this IEnumerable<TrackChunk> trackChunks, TimeDivision timeDivision)
    Parameters
    Type Name Description
    IEnumerable<TrackChunk> trackChunks Collection of TrackChunk which hold events that represent tempo map of a MIDI file.
    TimeDivision timeDivision MIDI file time division which specifies the meaning of the time used by events of the file.
    Returns
    Type Description
    TempoMap Tempo map represented by the trackChunks and timeDivision.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • trackChunks is null.
    • timeDivision is null.

    ManageTempoMap(MidiFile)

    Creates an instance of the TempoMapManager initializing it with the events collections of the specified MIDI file. More info in the Tempo map article.
    Declaration
    public static TempoMapManager ManageTempoMap(this MidiFile file)
    Parameters
    Type Name Description
    MidiFile file MIDI file to manage tempo map of.
    Returns
    Type Description
    TempoMapManager An instance of the TempoMapManager that can be used to manage tempo map of the file.
    Exceptions
    Type Condition
    ArgumentNullException file is null.

    ManageTempoMap(IEnumerable<EventsCollection>, TimeDivision)

    Creates an instance of the TempoMapManager initializing it with the specified events collections and time division. More info in the Tempo map article.
    Declaration
    public static TempoMapManager ManageTempoMap(this IEnumerable<EventsCollection> eventsCollections, TimeDivision timeDivision)
    Parameters
    Type Name Description
    IEnumerable<EventsCollection> eventsCollections Collection of EventsCollection which hold events that represent tempo map of a MIDI file.
    TimeDivision timeDivision MIDI file time division which specifies the meaning of the time used by events of the file.
    Returns
    Type Description
    TempoMapManager An instance of the TempoMapManager that can be used to manage tempo map represented by the eventsCollections and timeDivision.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • eventsCollections is null.
    • timeDivision is null.

    ManageTempoMap(IEnumerable<TrackChunk>, TimeDivision)

    Creates an instance of the TempoMapManager initializing it with the specified time division and events collections of the specified track chunks. More info in the Tempo map article.
    Declaration
    public static TempoMapManager ManageTempoMap(this IEnumerable<TrackChunk> trackChunks, TimeDivision timeDivision)
    Parameters
    Type Name Description
    IEnumerable<TrackChunk> trackChunks Collection of TrackChunk which hold events that represent tempo map of a MIDI file.
    TimeDivision timeDivision MIDI file time division which specifies the meaning of the time used by events of the file.
    Returns
    Type Description
    TempoMapManager An instance of the TempoMapManager that can be used to manage tempo map represented by the trackChunks and timeDivision.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • trackChunks is null.
    • timeDivision is null.

    ReplaceTempoMap(MidiFile, TempoMap)

    Replaces tempo map contained in the specified MidiFile with another one.
    Declaration
    public static void ReplaceTempoMap(this MidiFile file, TempoMap tempoMap)
    Parameters
    Type Name Description
    MidiFile file MidiFile holding a tempo map to replace.
    TempoMap tempoMap Tempo map to replace the one contained in the file.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • file is null.
    • tempoMap is null.

    ReplaceTempoMap(IEnumerable<EventsCollection>, TempoMap)

    Replaces tempo map contained in the specified collection of the EventsCollection with another one.
    Declaration
    public static void ReplaceTempoMap(this IEnumerable<EventsCollection> eventsCollections, TempoMap tempoMap)
    Parameters
    Type Name Description
    IEnumerable<EventsCollection> eventsCollections Collection of the EventsCollection holding a tempo map to replace.
    TempoMap tempoMap Tempo map to replace the one contained in the eventsCollections.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • eventsCollections is null.
    • tempoMap is null.

    ReplaceTempoMap(IEnumerable<TrackChunk>, TempoMap)

    Replaces tempo map contained in the specified collection of the TrackChunk with another one.
    Declaration
    public static void ReplaceTempoMap(this IEnumerable<TrackChunk> trackChunks, TempoMap tempoMap)
    Parameters
    Type Name Description
    IEnumerable<TrackChunk> trackChunks Collection of the TrackChunk holding a tempo map to replace.
    TempoMap tempoMap Tempo map to replace the one contained in the trackChunks.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • trackChunks is null.
    • tempoMap is null.
    In this article
    Back to top 2024 / Generated by DocFX