Explore internal parameters of the MIDI Sequencer and the MIDI Synth.
*** Under construction ***
Enable debug features
Some MPTK debug functions can be activated with scripting define symbols. You can define these symbols in Unity menu Edit / Project Settings … and Player tab. Don’t forget to click on button apply when modifying the symbols, that will compiling the C# scripts and unlock debug features.
Warning: enabling these debug functions will consume more CPU and memory. Remove them when you want to publish a version of your app.
DEBUG_PERF_MIDI
Calculate time for the MIDI sequencer execution.
- StatDeltaThreadMidiMS: perhaps, the most important information, it’s the time between two call of the MIDI sequencer. Measure the time accuracy of the music. Calculate also StatDeltaThreadMidiMIN, StatDeltaThreadMidiMAX, StatDeltaThreadMidiMA (average). A value of 10 ms is very good, above 30 ms you might notice some rhyme variations.
- StatReadMidiMS: time to read a group of MIDI event (same ticks). In general very low.
- StatProcessMidiMS: time to process the group of events. For example: to create each note-on voice and initialize synthesizer parameters.
- StatDeltaTimeMidi