Search Results for

    Show / Hide Table of Contents

    Class Repeater

    Provides a way to repeat MIDI data using different options. More info in the Repeater article.
    Inheritance
    object
    Repeater
    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 class Repeater

    Methods

    ProcessPart(PartProcessingContext)

    Processes a new part that will be appended to the previous ones.
    Declaration
    protected virtual void ProcessPart(PartProcessingContext context)
    Parameters
    Type Name Description
    PartProcessingContext context An object holding all the required data to process a part.
    Remarks
    By default the method shifts the data and inserts tempo map events if PreserveTempoMap set to true in settings used for the processing.

    Repeat(MidiFile, int, RepeatingSettings)

    Repeats a MIDI file specified number of times.
    Declaration
    public MidiFile Repeat(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.
    Declaration
    public TrackChunk Repeat(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.
    Declaration
    public ICollection<TrackChunk> Repeat(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.
    Declaration
    public ICollection<ITimedObject> Repeat(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