Search Results for

    Show / Hide Table of Contents

    Class RepeaterUtilities

    Provides methods to repeat MIDI data using different options. More info in the Repeater article.
    Inheritance
    object
    RepeaterUtilities
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Melanchall.DryWetMidi.Tools
    Assembly: Melanchall.DryWetMidi.dll
    Syntax
    public static class RepeaterUtilities

    Methods

    Repeat(MidiFile, int, RepeatingSettings)

    Repeats a MIDI file specified number of times. More info in the Repeater article.
    Declaration
    public static MidiFile Repeat(this MidiFile midiFile, int repeatsNumber, RepeatingSettings settings = null)
    Parameters
    Type Name Description
    MidiFile midiFile The file to repeat.
    int repeatsNumber Number of times the midiFile should be repeated.
    RepeatingSettings settings Settings according to which the operation should be done.
    Returns
    Type Description
    MidiFile A new instance of the MidiFile which is the midiFile repeated repeatsNumber times using settings.
    Exceptions
    Type Condition
    ArgumentNullException midiFile is null.
    ArgumentOutOfRangeException repeatsNumber is negative.
    ArgumentException Shift of the settings is null for fixed-value shift.

    Repeat(TrackChunk, int, TempoMap, RepeatingSettings)

    Repeats a TrackChunk specified number of times. More info in the Repeater article.
    Declaration
    public static TrackChunk Repeat(this TrackChunk trackChunk, int repeatsNumber, TempoMap tempoMap, RepeatingSettings settings = null)
    Parameters
    Type Name Description
    TrackChunk trackChunk The TrackChunk to repeat.
    int repeatsNumber Number of times the trackChunk should be repeated.
    TempoMap tempoMap Tempo map used to perform time spans calculations.
    RepeatingSettings settings Settings according to which the operation should be done.
    Returns
    Type Description
    TrackChunk A new instance of the TrackChunk which is the trackChunk repeated repeatsNumber times using settings.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • trackChunk is null.
    • tempoMap is null.
    ArgumentOutOfRangeException repeatsNumber is negative.
    ArgumentException Shift of the settings is null for fixed-value shift.

    Repeat(IEnumerable<TrackChunk>, int, TempoMap, RepeatingSettings)

    Repeats a collection of TrackChunk specified number of times. More info in the Repeater article.
    Declaration
    public static ICollection<TrackChunk> Repeat(this IEnumerable<TrackChunk> trackChunks, int repeatsNumber, TempoMap tempoMap, RepeatingSettings settings = null)
    Parameters
    Type Name Description
    IEnumerable<TrackChunk> trackChunks The collection of TrackChunk to repeat.
    int repeatsNumber Number of times the trackChunks should be repeated.
    TempoMap tempoMap Tempo map used to perform time spans calculations.
    RepeatingSettings settings Settings according to which the operation should be done.
    Returns
    Type Description
    ICollection<TrackChunk> A collection of new TrackChunk instances which are the trackChunks repeated repeatsNumber times using settings.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • trackChunks is null.
    • tempoMap is null.
    ArgumentOutOfRangeException repeatsNumber is negative.
    ArgumentException Shift of the settings is null for fixed-value shift.

    Repeat(IEnumerable<ITimedObject>, int, TempoMap, RepeatingSettings)

    Repeats a collection of timed objects specified number of times. More info in the Repeater article.
    Declaration
    public static ICollection<ITimedObject> Repeat(this IEnumerable<ITimedObject> timedObjects, int repeatsNumber, TempoMap tempoMap, RepeatingSettings settings = null)
    Parameters
    Type Name Description
    IEnumerable<ITimedObject> timedObjects The collection of timed objects to repeat.
    int repeatsNumber Number of times the timedObjects should be repeated.
    TempoMap tempoMap Tempo map used to perform time spans calculations.
    RepeatingSettings settings Settings according to which the operation should be done.
    Returns
    Type Description
    ICollection<ITimedObject> A collection of new TrackChunk instances which are the timedObjects repeated repeatsNumber times using settings.
    Exceptions
    Type Condition
    ArgumentNullException

    One of the following errors occurred:

    • timedObjects is null.
    • tempoMap is null.
    ArgumentOutOfRangeException repeatsNumber is negative.
    ArgumentException Shift of the settings is null for fixed-value shift.
    In this article
    Back to top 2024 / Generated by DocFX