Platform Compatibility

MPTK is full operational on Windows, Mac OS, IOs and Android

But there is some limitations:

  • WebGL
    • No playing Midi due to WebGL limitation:
      • Lack of a good threading behaviors.
      • Investigation in progress …
    • Other functions as reading/writing midi events work correctly.
  • Difficulties with some Midi
    • The synthesizer is build in C#. It’s a conversion from the fabulous fluidsynth from langage C.
    • Advantage: MPTK is running on a a lot of devices and it’s easy to add interesting functions.
    • Drawback: C# is less efficient than C. Sound, like piano, with long release time could generate a lot of samples to be played at the sames times. When a lot of samples are played the DSP becomes very busy and sound is bad.
    • Workaround: MPTK monitor the DSP load and release earlier some samples in case of overload.
  • iOS
    • Test ok on iPhone 7 and 8
    • Changing Synth rate is not enable for iOS devices. It seems that the sound devices don’t like changing the default synth rate: 24 kHz by default.
  • Others platforms ?
    • All seems perfect ! But have your say if you have some difficulties.

Before buying, check with the free version, if the free is ok for your need then the pro will be!

Wave Looping

See here more information about the wave looping limitation with WebGL.

Take an example with a sound like a piano. When a piano key is hit (note on), the sound is played from the start of the wave:

  • first the attack+decay phase (a very short phase),
  • then the sound plays the sustain phase until the key is released (note off),
  • then the sound plays the release phase, generally a short phase,
  • then the sound is stopped.
From Wikipedia

See here more information how a synthesizer runs (in particular with envelope).

Note: information about looping is defined in the wave file with dedicated attributes defined when the wave is recorded..

Unfortunately, WebGL don’t use these looping information: the sound is playing from the start to the end of the wave until the key is released: all the steps are repeated: attack / decay / sustain / release. It’s like if you hit the piano key a lot of times! It’s a very weird result.

Note: some sound don’t loop. Generally, it’s the case for the percussion sounds.

Timing accuracy

  • Midi is read (sequencer) and audio is played (synthesizer) in two dedicated threads, not in the Unity thread.
  • Change Unity Audio Parameters: synth rate and buffer size to adapt to your need.

Impact on performance