Contains information about the tempo change.
More...
Public Member Functions | |
| MPTKTempo (int index, long fromTick=0, long toTick=long.MaxValue, double fromTime=0d, double pulse=0d, int microsecondsPerQuarterNote=0) | |
| Create a tempo segment with default value More... | |
| double | CalculateTime (long tick) |
| override string | ToString () |
Static Public Member Functions | |
| static void | CalculateMap (int deltaTicksPerQuarterNote, List< MPTKEvent > mptkEvents, List< MPTKTempo > temposMap) |
| static int | FindSegment (List< MPTKTempo > tempoMap, float timeSearch, int fromIndex=0) |
| static int | FindSegment (List< MPTKTempo > tempoMap, long tickSearch, int fromIndex=0) |
Public Attributes | |
| long | FromTick |
| double | FromTime |
| int | Index |
| int | MicrosecondsPerQuarterNote |
| double | Pulse |
| long | ToTick |
Static Public Attributes | |
| static int | DeltaTicksPerQuarterNote |
Contains information about the tempo change.
| MidiPlayerTK.MPTKTempo.MPTKTempo | ( | int | index, |
| long | fromTick = 0, |
||
| long | toTick = long.MaxValue, |
||
| double | fromTime = 0d, |
||
| double | pulse = 0d, |
||
| int | microsecondsPerQuarterNote = 0 |
||
| ) |
Create a tempo segment with default value
| index | |
| fromTick | default 0 |
| toTick | default ong.MaxValue |
| fromTime | default 0 |
| pulse | default 0 |
| microsecondsPerQuarterNote | default 0 |
|
static |
Create a tempo map from a MIDI events list with tempo change.
An allocated tempo map must be defined in parameter but the content will be cleared.
| deltaTicksPerQuarterNote | |
| mptkEvents | |
| temposMap |
| double MidiPlayerTK.MPTKTempo.CalculateTime | ( | long | tick | ) |
Realtime in milliseconds for this tick in this segment
| tick |
|
static |
Find an index in the tempo change list from a time position in millisecond.
| tempoMap | List of tempo map build with MPTK_CalculateTempoMap |
| timeSearch | search from this time in millisecond |
| fromIndex | search from this index position in the TempoMap list (for optimization) |
|
static |
Find an index in the tempo change list from a tick position.
| tempoMap | List of tempo map build with MPTK_CalculateTempoMap |
| tickSearch | search from this tick value |
| fromIndex | search from this index position in the list (for optimization) |
| override string MidiPlayerTK.MPTKTempo.ToString | ( | ) |
String description of this segment
|
static |
This information is mandatory to calculate start/end measure and beat.
| long MidiPlayerTK.MPTKTempo.FromTick |
Tick start of this segment
| double MidiPlayerTK.MPTKTempo.FromTime |
Exact time in milliseconds to reach this tempo or signature change
| int MidiPlayerTK.MPTKTempo.Index |
Index of this segment if added to a list of tempo map with #MPTK_CalculateTempoMap
| int MidiPlayerTK.MPTKTempo.MicrosecondsPerQuarterNote |
BPM = 60000000 / MicrosecondsPerQuarterNote
| double MidiPlayerTK.MPTKTempo.Pulse |
Duration in millisecond of a MIDI tick in this segment. The pulse length is the minimum time in millisecond between two MIDI events.
| long MidiPlayerTK.MPTKTempo.ToTick |
Tick end of this segment