Class Repeater
Provides a way to repeat MIDI data using different options. More info in the
Repeater article.
Assembly: Melanchall.DryWetMidi.dll
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. |
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
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
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
Exceptions
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
Exceptions