![]() |
Maestro - Midi Player Tool Kit for Unity Version 2.18.2
|
Query and control playback position, timing, duration, and speed. More...
Position and Duration | |
| double | MidiPlayerTK.MidiFilePlayer.MPTK_Position [get, set] |
| Gets or sets the current position in the MIDI in milliseconds. When a new position is set, the corresponding tick in the MIDI event list is searched for by comparing it with the MPTKEvent.RealTime value, and the current MIDI playback is moved to this new tick position. . | |
| TimeSpan | MidiPlayerTK.MidiFilePlayer.MPTK_Duration [get] |
| Real duration expressed in TimeSpan of the full midi from the first event (tick=0) to the last event. If MPTK_KeepEndTrack is false, the MIDI events End Track are not considered to calculate this time. The tempo changes are taken into account if MPTK_EnableChangeTempo is set to true before loading the MIDI. | |
| float | MidiPlayerTK.MidiFilePlayer.MPTK_DurationMS [get] |
| Real duration expressed in milliseconds of the full MIDI from the first event (tick=0) to the last event. If MPTK_KeepEndTrack is false, the MIDI events End Track are not considered to calculate this time. The tempo changes are taken into account if MPTK_EnableChangeTempo is set to true before loading the MIDI. | |
| long | MidiPlayerTK.MidiFilePlayer.MPTK_TickLast [get] |
| Last tick tick in Midi: it's the value of the tick for the last MIDI event in sequence expressed in number of "ticks". . | |
| long | MidiPlayerTK.MidiFilePlayer.MPTK_TickFirstNote [get] |
| Tick tick for the first note-on found. Most MIDI don't start playing a note immediately. There is often a delay. Use this attribute to known the tick tick where the will start to play a sound. See also MPTK_PositionFirstNote. | |
| long | MidiPlayerTK.MidiFilePlayer.MPTK_TickLastNote [get] |
| Tick tick for the last note-on found. There is often other MIDI events after the last note-on: for example event track-end. Use this attribute to known the tick tick time when all sound will be stop. See also the MPTK_PositionLastNote which provides the last time of the MIDI. | |
| double | MidiPlayerTK.MidiFilePlayer.MPTK_PositionFirstNote [get] |
| Real time tick in milliseconds for the first note-on found. Most MIDI don't start playing a note immediately. There is often a delay. Use this attribute to known the real time which it will start. See also MPTK_TickFirstNote. | |
| double | MidiPlayerTK.MidiFilePlayer.MPTK_PositionLastNote [get] |
| Real time tick in milliseconds for the last note-on found in the MIDI. There is often other MIDI events after the last note-on: for example event track-end. Use this attribute to known the real time when all sound will be stop. See also the MPTK_DurationMS which provides the full time of all MIDI events including track-end, control at the beginning and at the end, .... See also MPTK_TickLastNote. | |
| int | MidiPlayerTK.MidiFilePlayer.MPTK_TrackCount [get] |
| Count of track read in the MIDI file. | |
| long | MidiPlayerTK.MidiFilePlayer.MPTK_TickCurrent [get, set] |
| Gets the tick value of the last MIDI event played. Sets the tick value of the next MIDI event to played. . | |
| bool | MidiPlayerTK.MidiFilePlayer.MPTK_RawSeek [get, set] |
| This parameter controls how the playback position is adjusted within a MIDI file. By default (false), when the playback position is changed, all events except "note-on" are replayed from the start of the MIDI file up to the new position. This ensures the synthesizer is correctly updated with the appropriate context (tempo, selected instruments, controllers, etc.). If set to true, the playback position is updated directly; consequently, the current context is preserved. While this approach can lead to unintended (or amusing!) effects in some MIDI files, it allows for much faster position changes. | |
| MPTKEvent | MidiPlayerTK.MidiFilePlayer.MPTK_LastEventPlayed [get] |
| Last MIDI event played by the MIDI sequencer. | |
| double | MidiPlayerTK.MidiFilePlayer.MPTK_Pulse [get] |
| Length in milliseconds of a MIDI tick. The pulse length is the minimum time in milliseconds between two MIDI events. It's like a definition of graphical resolution but for MIDI: the MIDI sequencer will not be able to play two separate MIDI events in a time below this value. . | |
| TimeSpan | MidiPlayerTK.MidiFilePlayer.MPTK_PlayTime [get] |
| Real time in TimeSpan format from the beginning of play. It's an access to the MIDI timer used by the MIDI sequencer. | |
| double | MidiPlayerTK.MidiFilePlayer.MPTK_RealTime [get] |
| Real time in milliseconds from the beginning of play. It's an access to the MIDI timer used by the MIDI sequencer. | |
| double | MidiPlayerTK.MidiFilePlayer.MPTK_PulseLenght [get] |
| Gets or sets the current position in the MIDI in milliseconds. When a new position is set, the corresponding tick in the MIDI event list is searched for by comparing it with the MPTKEvent.RealTime value, and the current MIDI playback is moved to this new tick position. . | |
MIDI Properties | |
| float | MidiPlayerTK.MidiFilePlayer.MPTK_Speed [get, set] |
| Percentage of the default playback speed. Range 0.1 (10% of the current BPM) to 10 (1000%). Default is 1 for normal speed. Speed also applied to the duration of the sample played at voice level (often multiple voices are played for one note). | |
| bool | MidiPlayerTK.MidiFilePlayer.MPTK_Loop [get, set] |
| double | MidiPlayerTK.MidiFilePlayer.MPTK_Tempo [get, set] |
| Gets or sets the current tempo played by the internal MIDI sequencer (independent from MPTK_Speed). Return QuarterPerMinuteValue similar to BPM (Beat Per Measure). . | |
| string | MidiPlayerTK.MidiFilePlayer.MPTK_SequenceTrackName [get] |
| Gets sequence track name if defined in the MIDI file with MIDI MetaEventType = SequenceTrackName See detail here https://ccrma.stanford.edu/~craig/14q/midifile/MidiFileFormat.html Can be used only when the MIDI is playing. | |
| string | MidiPlayerTK.MidiFilePlayer.MPTK_ProgramName [get] |
| Gets Program track name if defined in the MIDI file with MIDI MetaEventType = ProgramName See detail here https://ccrma.stanford.edu/~craig/14q/midifile/MidiFileFormat.html Can be used only when the MIDI is playing. | |
| string | MidiPlayerTK.MidiFilePlayer.MPTK_TrackInstrumentName [get] |
| Gets Instrument track name if defined in the MIDI file with MIDI MetaEventType = TrackInstrumentName See detail here https://ccrma.stanford.edu/~craig/14q/midifile/MidiFileFormat.html Can be used only when the MIDI is playing. | |
| string | MidiPlayerTK.MidiFilePlayer.MPTK_TextEvent [get] |
| Gets Text if defined in the MIDI file with MIDI MetaEventType = TextEvent See detail here https://ccrma.stanford.edu/~craig/14q/midifile/MidiFileFormat.html Can be used only when the MIDI is playing. | |
| string | MidiPlayerTK.MidiFilePlayer.MPTK_Copyright [get] |
| Gets Copyright if defined in the MIDI file with MIDI MetaEventType = Copyright See detail here https://ccrma.stanford.edu/~craig/14q/midifile/MidiFileFormat.html Can be used only when the MIDI is playing. | |
| List< MPTKEvent > | MidiPlayerTK.MidiFilePlayer.MPTK_MidiEvents [get] |
| Gets a list of all the MPTK MIDI events that are available in the MIDI. . | |
| int | MidiPlayerTK.MidiFilePlayer.MPTK_Quantization [get, set] |
| Level of quantization : | |
| int | MidiPlayerTK.MidiFilePlayer.MPTK_DeltaTicksPerQuarterNote [get] |
| Delta Ticks Per Beat Note. Indicate the duration time in "ticks" which make up a quarter-note. For instance, if 96, then a duration of an eighth-note in the file would be 48. More info here https://paxstellar.fr/2020/09/11/midi-timing/ . | |
| void | MidiPlayerTK.MidiFilePlayer.MPTK_ResetTranspose () |
| Force all notes to return to their original values before transposing. Useful when looping on a MIDI with a transpose value different than 0. When returning to 0 (no transpose) the note value can be reset to their original value. | |
| MPTKEvent.EnumLength | MidiPlayerTK.MidiFilePlayer.MPTK_NoteLength (MPTKEvent note) |
| Return note length as https://en.wikipedia.org/wiki/Note_value. | |
Query and control playback position, timing, duration, and speed.
| void MidiPlayerTK.MidiFilePlayer.MPTK_ResetTranspose | ( | ) |
Force all notes to return to their original values before transposing.
Useful when looping on a MIDI with a transpose value different than 0. When returning to 0 (no transpose) the note value can be reset to their original value.
| MPTKEvent.EnumLength MidiPlayerTK.MidiFilePlayer.MPTK_NoteLength | ( | MPTKEvent | note | ) |
Return note length as https://en.wikipedia.org/wiki/Note_value.
| note |
|
getset |
Gets or sets the current position in the MIDI in milliseconds.
When a new position is set, the corresponding tick in the MIDI event list is searched for by comparing it with the MPTKEvent.RealTime value, and the current MIDI playback is moved to this new tick position.
.
Here, more information about Midi Timing https://paxstellar.fr/2020/09/11/midi-timing/
|
getset |
Gets the tick value of the last MIDI event played.
Sets the tick value of the next MIDI event to played.
.
MIDI tick is an easy way to identify a position in a song independently of the time which could vary with tempo change event.
The count of ticks by quarter is constant all along a MIDI, it's a properties of the whole MIDI. see MPTK_DeltaTicksPerQuarterNote.
With a time signature of 4/4 the ticks length of a bar is 4 * MPTK_DeltaTicksPerQuarterNote.
Here, more information about Midi Timing https://paxstellar.fr/2020/09/11/midi-timing/
|
getset |
This parameter controls how the playback position is adjusted within a MIDI file. By default (false), when the playback position is changed, all events except "note-on" are replayed from the start of the MIDI file up to the new position. This ensures the synthesizer is correctly updated with the appropriate context (tempo, selected instruments, controllers, etc.).
If set to true, the playback position is updated directly; consequently, the current context is preserved.
While this approach can lead to unintended (or amusing!) effects in some MIDI files, it allows for much faster position changes.
|
get |
Length in milliseconds of a MIDI tick. The pulse length is the minimum time in milliseconds between two MIDI events.
It's like a definition of graphical resolution but for MIDI: the MIDI sequencer will not be able to play two separate MIDI events in a time below this value.
.
|
get |
Real time in TimeSpan format from the beginning of play. It's an access to the MIDI timer used by the MIDI sequencer.
|
get |
Real time in milliseconds from the beginning of play. It's an access to the MIDI timer used by the MIDI sequencer.
|
getset |
Percentage of the default playback speed. Range 0.1 (10% of the current BPM) to 10 (1000%). Default is 1 for normal speed.
Speed also applied to the duration of the sample played at voice level (often multiple voices are played for one note).
|
get |
Gets or sets the current position in the MIDI in milliseconds.
When a new position is set, the corresponding tick in the MIDI event list is searched for by comparing it with the MPTKEvent.RealTime value, and the current MIDI playback is moved to this new tick position.
.
Here, more information about Midi Timing https://paxstellar.fr/2020/09/11/midi-timing/
|
getset |
|
getset |
Gets or sets the current tempo played by the internal MIDI sequencer (independent from MPTK_Speed).
Return QuarterPerMinuteValue similar to BPM (Beat Per Measure).
.
|
get |
Gets a list of all the MPTK MIDI events that are available in the MIDI.
.
|
getset |
Level of quantization :
|
get |
Delta Ticks Per Beat Note. Indicate the duration time in "ticks" which make up a quarter-note.
For instance, if 96, then a duration of an eighth-note in the file would be 48.
More info here https://paxstellar.fr/2020/09/11/midi-timing/
.