MusIT

Deeper dive in MPTK


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.

Unity menu Edit / Project Settings …

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

DEBUG_PERF_AUDIO

DEBUG_STATUS_STAT

DEBUG_HISTO_SYNTH

Display in user interface

Have any Question or Comment?

Leave a Reply

Your email address will not be published. Required fields are marked *

I accept that my given data and my IP address is sent to a server in the USA only for the purpose of spam prevention through the Akismet program.More information on Akismet and GDPR.

Get MPTK from the Unity store

If you like Midi Player Tool Kit, please leave a review on the Asset Store. It’s very appreciated!!!

Maestro MPTK on ChatGPT!

From various MPTK documentation sources, @DarkSky42 has created a custom LLM based on ChatGPT. You can now ask all the questions you want and get a good level of answer: request code example, verify your source code, explain the MPTK demo …

Contact

If you have questions, please don’t hesitate to contact us via the dedicated Unity forum or our Discord  channel.

Reach the Discord archive by topic.

We are always happy to discuss your projects!