Class TempoMap
Assembly: Melanchall.DryWetMidi.dll
Syntax
public sealed class TempoMap
Fields
Default
The default tempo map which uses 4/4 time signature and tempo of 500,000 microseconds per quarter note.
Declaration
public static readonly TempoMap Default
Field Value
Properties
TimeDivision
Gets the time division used by a tempo map.
Declaration
public TimeDivision TimeDivision { get; }
Property Value
Methods
Clone()
Declaration
Returns
Type |
Description |
TempoMap |
An instance of the TempoMap which is a clone of the current one. |
Create(TimeDivision)
Creates an instance of the
TempoMap with the specified time division using
default tempo (120 BPM) and default time signature (4/4).
Declaration
public static TempoMap Create(TimeDivision timeDivision)
Parameters
Type |
Name |
Description |
TimeDivision |
timeDivision |
Time division of the tempo map. |
Returns
Exceptions
Create(TimeDivision, Tempo)
Creates an instance of the
TempoMap with the specified time division and
tempo using default time signature (4/4).
Declaration
public static TempoMap Create(TimeDivision timeDivision, Tempo tempo)
Parameters
Type |
Name |
Description |
TimeDivision |
timeDivision |
Time division of the tempo map. |
Tempo |
tempo |
Tempo of the tempo map. |
Returns
Exceptions
Type |
Condition |
ArgumentNullException |
One of the following errors occured:
timeDivision is null .tempo is null .
|
Create(TimeDivision, Tempo, TimeSignature)
Creates an instance of the
TempoMap with the specified time division,
tempo and time signature.
Declaration
public static TempoMap Create(TimeDivision timeDivision, Tempo tempo, TimeSignature timeSignature)
Parameters
Type |
Name |
Description |
TimeDivision |
timeDivision |
Time division of the tempo map. |
Tempo |
tempo |
Tempo of the tempo map. |
TimeSignature |
timeSignature |
Time signature of the tempo map. |
Returns
Type |
Description |
TempoMap |
TempoMap with the specified time division, tempoand time signature. |
Exceptions
Type |
Condition |
ArgumentNullException |
One of the following errors occured:
timeDivision is null .tempo is null .timeSignature is null .
|
Create(TimeDivision, TimeSignature)
Creates an instance of the
TempoMap with the specified time division and
time signature using default tempo (120 BPM).
Declaration
public static TempoMap Create(TimeDivision timeDivision, TimeSignature timeSignature)
Parameters
Type |
Name |
Description |
TimeDivision |
timeDivision |
Time division of the tempo map. |
TimeSignature |
timeSignature |
Time signature of the tempo map. |
Returns
Type |
Description |
TempoMap |
TempoMap with the specified time division and time signature. |
Exceptions
Type |
Condition |
ArgumentNullException |
One of the following errors occured:
timeDivision is null .timeSignature is null .
|
Create(Tempo)
Creates an instance of the
TempoMap with the specified tempo using
default time division (96 ticks per quarter note).
Declaration
public static TempoMap Create(Tempo tempo)
Parameters
Type |
Name |
Description |
Tempo |
tempo |
Tempo of the tempo map. |
Returns
Exceptions
Create(Tempo, TimeSignature)
Creates an instance of the
TempoMap with the specified tempo and
time signature using default time division (96 ticks per quarter note).
Declaration
public static TempoMap Create(Tempo tempo, TimeSignature timeSignature)
Parameters
Type |
Name |
Description |
Tempo |
tempo |
Tempo of the tempo map. |
TimeSignature |
timeSignature |
Time signature of the tempo map. |
Returns
Exceptions
Type |
Condition |
ArgumentNullException |
One of the following errors occured:
tempo is null .timeSignature is null .
|
Create(TimeSignature)
Creates an instance of the
TempoMap with the specified time signature using
default time division (96 ticks per quarter note).
Declaration
public static TempoMap Create(TimeSignature timeSignature)
Parameters
Type |
Name |
Description |
TimeSignature |
timeSignature |
Time signature of the tempo map. |
Returns
Exceptions
GetTempoAtTime(ITimeSpan)
Returns tempo at the specified time.
Declaration
public Tempo GetTempoAtTime(ITimeSpan time)
Parameters
Type |
Name |
Description |
ITimeSpan |
time |
Time to get tempo at. |
Returns
Type |
Description |
Tempo |
Tempo at the time of time . |
Exceptions
GetTempoChanges()
Returns the collection of tempo changes.
Declaration
public IEnumerable<ValueChange<Tempo>> GetTempoChanges()
Returns
GetTimeSignatureAtTime(ITimeSpan)
Returns time signature at the specified time.
Declaration
public TimeSignature GetTimeSignatureAtTime(ITimeSpan time)
Parameters
Type |
Name |
Description |
ITimeSpan |
time |
Time signature to get tempo at. |
Returns
Type |
Description |
TimeSignature |
Time signature at the time of time . |
Exceptions
GetTimeSignatureChanges()
Returns the collection of time signature changes.
Declaration
public IEnumerable<ValueChange<TimeSignature>> GetTimeSignatureChanges()
Returns