![]() |
Maestro - Midi Player Tool Kit for Unity Version 2.19.0
|
Contains information about time signature changes in a MIDI file. More...
Public Member Functions | |
| MPTKSignature (int index, long fromTick=0, long toTick=long.MaxValue, int numberBeatsMeasure=4, int numberQuarterBeat=4) | |
| Creates a signtaure segment with default value. | |
| int | TickToMeasure (long tick) |
| Search a measure from a tick in this segment map. | |
| int | CalculateBeat (long tick, int measure) |
| Calculate beat for this tick and measure position in this segment. | |
| override string | ToString () |
| String description of this segment. | |
Static Public Member Functions | |
| static long | MeasureToTick (List< MPTKSignature > temposMap, int measure) |
| Search a tick position from a measure tempo map. | |
| static void | CalculateMap (int deltaTicksPerQuarterNote, List< MPTKEvent > mptkEvents, List< MPTKSignature > signaturesMap) |
| Creates a signature map from a MIDI events list with time signature. | |
| static void | CalculateMeasureBoundaries (List< MPTKSignature > signaturesMap) |
| Calculate FromMeasure and ToMeasure for all segments in the signature map. | |
| static int | FindSegment (List< MPTKSignature > signMap, long tickSearch, int fromIndex=0) |
| Find a signature change from a tick position in the tempo map. | |
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. | |
| int | NumberBeatsMeasure |
| From TimeSignature event: The numerator counts the number of beats in a mesure. For example a numerator of 4 means that each bar contains four beats. This is important knowing this value because usually the first beat of each bar has extra emphasis. https://paxstellar.fr/2020/09/11/midi-timing/. | |
| int | NumberQuarterBeat |
| From TimeSignature event: Describes of what note value a beat is. | |
| int | FromMeasure |
| Start measure of this segment of event. | |
| int | ToMeasure |
| End measure of this segment of event. | |
Static Public Attributes | |
| static int | DeltaTicksPerQuarterNote |
| This information is mandatory to calculate start/end measure and beat. | |
Contains information about time signature changes in a MIDI file.
| MidiPlayerTK.MPTKSignature.MPTKSignature | ( | int | index, |
| long | fromTick = 0, | ||
| long | toTick = long::MaxValue, | ||
| int | numberBeatsMeasure = 4, | ||
| int | numberQuarterBeat = 4 ) |
Creates a signtaure segment with default value.
| index | |
| fromTick | default 0 |
| toTick | default ong.MaxValue |
| numberBeatsMeasure | default 4 |
| numberQuarterBeat | default 4 |
| int MidiPlayerTK.MPTKSignature.TickToMeasure | ( | long | tick | ) |
Search a measure from a tick in this segment map.
| tick |
|
static |
Search a tick position from a measure tempo map.
| temposMap | List of tempo maps |
| measure | measure to search (start at 1) |
| int MidiPlayerTK.MPTKSignature.CalculateBeat | ( | long | tick, |
| int | measure ) |
Calculate beat for this tick and measure position in this segment.
| tick | tick to search in this segemnt map |
| measure | measure to search in this segemnt map |
|
static |
Creates a signature map from a MIDI events list with time signature.
| deltaTicksPerQuarterNote | |
| mptkEvents | |
| signaturesMap |
|
static |
Calculate FromMeasure and ToMeasure for all segments in the signature map.
| signaturesMap |
|
static |
Find a signature change from a tick position in the tempo map.
| signMap | List of tempo map build with MPTK_CalculateTempoMap |
| tickSearch | search from this tick value |
| fromIndex | search from this index position in the list (for optimazation) |
| override string MidiPlayerTK.MPTKSignature.ToString | ( | ) |
String description of this segment.
| int MidiPlayerTK.MPTKSignature.NumberQuarterBeat |
From TimeSignature event: Describes of what note value a beat is.