![]() |
Maestro - Midi Player Tool Kit for Unity Version 2.18.2
|
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) | |
| Creates a tempo segment with default value. | |
| double | CalculateTime (long tick) |
| Realtime in milliseconds for this tick in this segment. | |
| override string | ToString () |
| String description of this segment. | |
Static Public Member Functions | |
| static int | FindSegment (List< MPTKTempo > tempoMap, long tickSearch, int fromIndex=0) |
| Find an index in the tempo change list from a tick position. | |
| static int | FindSegment (List< MPTKTempo > tempoMap, float timeSearch, int fromIndex=0) |
| Find an index in the tempo change list from a time position in milliseconds. | |
| static void | CalculateMap (int deltaTicksPerQuarterNote, List< MPTKEvent > mptkEvents, List< MPTKTempo > temposMap) |
| Creates 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. | |
Public Attributes | |
| int | Index |
| Index of this segment if added to a list of tempo map with #MPTK_CalculateTempoMap. | |
| long | FromTick |
| Tick start of this segment. | |
| long | ToTick |
| Tick end of this segment. | |
| double | FromTime |
| Exact time in milliseconds to reach this tempo or signature change. | |
| double | Pulse |
| Duration in milliseconds of a MIDI tick in this segment. The pulse length is the minimum time in milliseconds between two MIDI events. . | |
| int | MicrosecondsPerQuarterNote |
| BPM = 60000000 / MicrosecondsPerQuarterNote. | |
Static Public Attributes | |
| static int | DeltaTicksPerQuarterNote |
| This information is mandatory to calculate start/end measure and beat. | |
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 ) |
Creates a tempo segment with default value.
| index | |
| fromTick | default 0 |
| toTick | default ong.MaxValue |
| fromTime | default 0 |
| pulse | default 0 |
| microsecondsPerQuarterNote | default 0 |
|
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) |
|
static |
Find an index in the tempo change list from a time position in milliseconds.
| tempoMap | List of tempo map build with MPTK_CalculateTempoMap |
| timeSearch | search from this time in milliseconds |
| fromIndex | search from this index position in the TempoMap list (for optimization) |
| double MidiPlayerTK.MPTKTempo.CalculateTime | ( | long | tick | ) |
Realtime in milliseconds for this tick in this segment.
| tick |
|
static |
Creates 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.Pulse |
Duration in milliseconds of a MIDI tick in this segment. The pulse length is the minimum time in milliseconds between two MIDI events.
.