Info Jun, 23 2024

Maestro MPTK V2.12.1 will be soon available!

New Features

  • MPTK_ThreadMidiPriority: MIDI thread priority to improve reading stability.
  • MPTK_ThreadMidiWait: MIDI thread waiting in milliseconds.
  • IntegratedThreadMidi: MIDI reader integrated into the audio thread for more stable reading (can only be set by the inspector).
    Enabled “Thread Audio” in the MidiFilePlayer prefab (can’t be modified at runtime). The MIDI reader will be call by the Audio playback with a more stable and precise frequency. Really needed for low perf devices.
  • MPTK_CalculateTiming: Now, refresh all timing in the MIDI file: Tempo Map, Signature Map, Realtime, Measure, Beat.
  • MPTK_EventLastNote: Get the last MIDI event which holds a note-on.
  • MPTK_FindLastNote: Find the last MIDI event note-on.
  • MPTK_StopPlayOnLastNote: MIDI playing stop at the last note found in the MIDI.

Demo & MVP

  • TestMidiFilePlayerScript: new possibilities for “Modify MIDI And Play” feature and redesign.
  • EuclideanRhythm: light redesign.


  • Correct MPTKTempo.FindSegment from a time (thanks cihadturhan_unity).
  • Correct MidiFilePlayer.Duration: now take into account the duration of the last note-on event (thanks Izanol).


New Features v2.11.1 in the Inspector
New design for the TestMidiFilePlayer demo

Info May, 28 2024

Maestro MPTK V2.12.0 is available! Explore the newest release and its exceptional sound quality, honoring the FluidSynth legacy.

New Features

  • Update of the core MIDI synth from fluidsynth 1.3 to fluidsynth 2.3. Incredible new sound!
  • Ability to read and write META text with UTF8 encoding (out of MIDI standard).
  • DSP and iir filters in 64 bits.
  • Added MPTK_RawSeek function for instant looping.
  • Added MPTK_WebRequestError attribute for MidiFileExternalPlayer.

Demo & MVP

  • Added MIDI Viewer. Some colored line effects that move in relation to the music.
  • Added MVP demo TheSimplestRandomPlayer.
  • Added inner loop in TestMidiFilePlayerScript demo.
  • New MVP demo load midi and play.


  • Oboe integration – correct assembly + many bugs.
  • Apply UI scale to all IMGUI demos.


  • MidiFilePlayer.MPTK_PulseLength deprecated, replaced by MPTK_Pulse.

Also don’t miss the new page with demos available as build.

Info May, 26 2024

Maestro MPTK V2.12.0 is currently in the release candidate phase! Soon available!

Now, all demos are build and available. Explore the newest release and its exceptional sound quality, honoring the FluidSynth legacy.

Info April, 24 2024

I have often this complex question: which class, attribute, or method I should use to get from relative time to absolute time and at the same time accommodate tempo and signature changes.

So I decided to create a post, look here: MIDI ticks, duration and real-time with MPTK – Maestro MPTK (

Have your say in case of lack of clarity or error detected!

Info April, 17 2024

Finally, version 2.11.3 has been renamed to version 2.12.0. A big enhancement will be available.

Just a recall: the MPTK core synth is based on the wonderful Fluidsynth which has been translated from C to C# to propose a good integration to Unity. But MPTK was based on Fluidsynth 1.4, so a good refresh to Fluidsynth version 2.3 is in progress.

Thanks to Jonah for pointing this out. Have a look at his site it is fascinating.

Migration from Fluidsynth is not an easy task but this is now done:

  • Now MPTK sounds very close to the Fluidsynth sound, thanks to the new Modulator and Generator processing.
  • Will facilitate future integration of Fluidsynth enhancements.
  • MPTK stays compliant to IL2CPP, so the Fluidsynth performance is preserved!

An Oboe integration update will be also available and also new APK demos . Look for details here.

Info Marsh, 09 2024

Version 2.11.3 is in progress:

  • ExtendedText attribut for lyrics and all META text:
    If the value is true, Text for META (e.g. lyrics) will be write with UTF8 encoding. The default is false.
    The MIDI standard only allows ASCII characters for this META, but with this extension you will be able to read and display characters like Korean, Chinese, Japanese and even French accented letters
    To enable reading of UTF8 characters from an MPTK MIDI player, set the MidiFilePlayer#MPTK_ExtendedText attribut to true.

    This is an MPTK extension of the MIDI standard, so if you read your MIDI file with another application, you may not find your original text unless encoding/decoding attributs are available.


mfw.AddText(track: 1, tick: absoluteTime, typeMeta: MPTKMeta.Lyric, text: "only ASCII"); mfw.AddText(track: 1, tick: absoluteTime, typeMeta: MPTKMeta.Lyric, text: "リリックテキスト"); mfw.AddText(track: 1, tick: absoluteTime, typeMeta: MPTKMeta.Lyric, text: "抒情文字"); mfw.AddText(track: 1, tick: absoluteTime, typeMeta: MPTKMeta.Lyric, text: "가사 텍스트"); mfw.AddText(track: 1, tick: absoluteTime, typeMeta: MPTKMeta.Lyric, text: "français éôè"); mfw.AddText(track: 1, tick: absoluteTime, typeMeta: MPTKMeta.Lyric, text: "Norsk språk");
Code language: C# (cs)

Info 14 February 2024

Version 2.11.2 is available on the Unity store with a technical improvement and a new feature:

  • Technical improvement:
    • All MPTK sources are provided, which is great for understanding how MPTK works. However, a drawback is that when a change is made, even in your own script, the entire MPTK is recompiled, leading to unnecessary delays. The upcoming version split the sources into three assemblies, resulting in better separation and improved efficiency for your creations.
    • If your app doesn’t define assemblies, this change won’t affect anything (just better building perf!). However, if you do have assemblies, you’ll need to reference the MidiPlayer.Run assembly in your own assembly. In general you will have only MidiPlayer.Run to reference.
Three assemblies
Three assemblies
  • New feature (Pro only):
    • The upcoming feature will allow you to create an MPTK runtime without including a SoundFont. With one line, an enhanced API will facilitate downloading, caching, and loading a SoundFont while your application is running. Another benefit is that you’ll be able to offer different sets of instruments to your users, which is perfect for implementing your in-app purchasing feature.
    • Look at this post for detailed information.
    • Here for the API

Info 12 December 2023

Version 2.11.1 is available on the Unity store with two fix:

  • Remove weird using inserted by Unity. A “using UnityEngine.Purchasing” has been added to the script fluid_voice.cs
    It’s not the first time, does anyone have an explanation why Unity sometime adds unwanted using directive?
  • Align MIDI list events in demo TestMidiFileLoad.

Info 4 December 2023

Version 2.11.0 available on the Unity store!


Maestro MPTK attained the age of maturity. This new version is mainly focused on consistency and simplification. I hope you will appreciate it!

Unfortunately, API consistency affects existing projects. A helper is available to assist you with the migration. We tried to minimize your changes and provide a complete documentation.

  • Migration helper here
  • API v2.11.0
  • Older API v2.10.0
  • API change in short:
    • The MidiSynth class became too large, so we split this class into three classes:
      • MPTKChannel / MPTKChannels
      • MPTKEffectSoundFont
      • MPTKEffectUnity
      • Others MidiSynth members are not concerned.
    • Some naming error
      • MidiFileWriter2 renamed to MPTKWriter,
      • Range was not a good word for scale, so renamed to Scale
      • Remove prefix MPTK_ when not useful.
    • MidiFileLoader deprecated, replaced by MidiFilePlayer.
Migration v2.11.0 helper
Helper Here


  • Sometimes playing MIDI in MidiFileSetup stop. The AudioSource need to be restarted. Corrected.
  • Corrected some design, type and translation in various parts. Thanks @Silverknight!
  • MPTK_EnablePresetDrum is now available in the MidiStreamPlayer inspector. Value forced to true has been removed from this prefab.

Attempt to reduce the Garbage Collector impact

Luckily Maestro has a very good memory allocation management. When running in a built or even from the Unity Editor (without the legacy IMGUI) there is never time loss in the MIDI player or MIDI Synth.

On the other hand, all Maestro demo or editor extensions which are built with IMGUI (for example MIDI Editor) suffer of this complex issue. The only way is to translate all these demos and editor extensions to UI Toolkit. The new Unity way to build user interface. But it’s a lot of work for a low enhancement …

Info August, 27 2023

Maestro, 5 Years Old Anniversary!

Discover all the gifts with the version 2.10.0 in the release notes:

New features


  • MidiFilePlayer: correct issue last notes not de-queueed at the end of the MIDI
  • SoundFont setup: correct LoadType change not applied when extracting samples
  • global: correct build error (reference to Unity Editor)


  • Base Unity version is now 2021.3.29 LTS
    • To always offer new features.
    • Of course Maestro is compliant with higher version.
  • Insertion of Maestro prefab in your hierarchy now preserves the link with the original prefab.
    • But, take care, if you change the prefab in the project, all prefabs in your scenes will be modified! 
  • Midi Editor (pro)
    • Displaying measures in Midi Editor with time signature change
    • Looping based on the new MPTKInnerLoop class
    • Mute/unmute channel
    • Open or close section
    • Add button prev/next measure
    • Add tool-tip
    • Add editable META text and Tempo section
  • Midi Sequencer
    • Able to disable WaitThreadMidi in the inspector for accurate timing precision
  • MidiFileWriter2 (pro)
    • MPTK_Addxxxx methods now return the MIDI event created.
    • Split MPTK_ConvertTickToMilli and MPTK_DurationTickToMilli and now based on Tempo_Map
    • Enhancement for MPTK_ImportFromEventsList
    • MPTK_ConvertMilliToTick and MPTK_ConvertTickToMilli based on the Tempo map
  • MidiSynth (pro)
    • OnMidiEvent must return a boolean (change from C# Action to Func) to keep or skip the event.
    • OnMidiEvent must return a boolean. true to keep the event, false to skip it.
    • Check that DSPBufferSize is a multple of 64, display an error in case of not.
    • SetTempo store only microsecondsPerQuarterNote in value, BPM is not stored in Duration


  • Maestro prefabs added to the scene as a link to the original prefab.

MIDI Editor redesigned

MIDI Editor Design
MIDI Editor inside Maestro MPTK

Info August,10 2023

  • Have a look to This page is for you. you will discover Euterpe, an impressive MIDI Editor build with Unity and Maestro, of course :-).
  • I’m adding a new feature to Maestro. Why not using Text Meta MIDI events for some processing on the MIDI music? It will be possible to create these meta events with a MIDI editor, from Maestro (with MidiFileWriter2 or the Midi Editor integrated to the Unity Editor, saving and loading as standard MIDI. Of course, these processing will be working only with Maestro.

    The more obvious will be to integrate MIDI loop information directly into the MIDI, like this for looping between tick 2000 and 3000n 3 times:

mfw.MPTK_AddText(track: 1, absoluteTime, MPTKMeta.TextEvent, "@MPTK_ACTION:INNER_LOOP_TICK(1500,2000,4000,3)");

Info July, 28 2023

  • A new version will be soon available with cool new features! That will be a 2.10.0:
    • New attributes Measure and Beat associated to each MIDI events.
    • OnBeatEvent added.
    • Loop precisely inside the MIDI player with OnEventInnerLoop and the new class MPTKInnerLoop.
    • Time signature change.
    • New feature for the MIDI Editor.
  • Warning: with Mac M1 and M2 architecture, in some case the DSP buffer length is not a multiple of 64: no sound will be produced or error will be displayed. Try to change the ‘DSP Buffer Size’ in the Unity Editor menu ‘Edit / Project Settings / Audio’.
    A dedicated Maestro error log message will be displayed with the next version.

Info Jun, 10 2023

  • If you want to understand how to manage Maestro prefab (MidiFilePlayer, MidiStreamPlay, …) when switching between scenes, I recommend you this post.
  • Interesting talk with Blinko about MIDI looping on Discord.
    • Current looping mode is designed to replay a long part of a MIDI not a few events. The MIDI sequencer is running in a system thread to get accuracy but the looping is done in Unity update() process
    • So it’s not really accurate for looping short sequence. More of that, all “silent” MIDI events (tempo change, preset change, controller change, …) are replayed from the start of the MIDI
    • A new feature, something like “MPTK_InnerLoop” will be added … soon!

Info May, 17 2023

  • Warning: if you are publishing an app for Android and using IL2CPP and set managed code stripping, you will not get music in your app. That will be corrected in the next version. Nevertheless, if you have an urgent need, contact me, I will push you the change to be done (quite simple).
  • Version 2.9.2 is in progress:
    • Add Preserve attribute to disable Unity linker strips (see above).
    • Add MIDI real time message to MidiKeyboard plugins.
    • TestMidiKeyboard:
      • Better design
      • Play a MIDI file with an external synth.
    • MIDI Editor:
      • Calculate and display real time related to the tempo change.
      • Add Meta section with tempo change and Text event (will be useful for sync with your app action!)

Info May, 07 2023

Version 2.9.1 available.

MIDI Editor inside Maestro MPTK

Info April, 30 2023

  • Horrible regression with the last version. The change of the FLUID_ATTEN_POWER_FACTOR value was not a good idea.
  • Thank Silverknight to inform me and for the help to correct. I will restore to the previous value ASAP.
  • In the meantime, you can change this value in fluid_conv.cs to -531.509f. I apologize for this issue.

Info April, 26 2022

The Unity Editor Extension for creating MIDI file is ready, look here and on this site here.

PS: the MIDI Editor works only in the Unity Editor not integrated in a standalone application.

Info February, 20 2022

Version 2.9 will be soon published. The base class of the MIDI reader/writer has been rewritten.

That was mandatory for the sequencer (and a lot of works!). But the first benefit was for the MidiFileWriter2 class which has been largely rewritten. Now based only on MPTKEvent it’s easier to create a MIDI file by script.

For example, it’s now possible to join MIDI files when MIDI is playing! A new demo about this features will be also available.

BTW, the sequencer is behind the schedule. A first version will be available but with limited possibilities (no saving, no velocity edit, …). That will be an opportunity to talk with you about the future of the sequencer!

Info December, 28 2022

Info November, 29 2022

  • Version 2.9.6 is available!
  • Correction of the calculation of the RealTime attribute in MPTKEvent class. The time was not correct after processing a Tempo Change MIDI event. Thanks to Ken Scott for the tip, see here his app Chaotic.
  • Light redesign of the SoundFont setup windows.
  • Correction for Unity Editor player Midi (Midi File Player Setup window). Apply default value fir the MIDI player:
MPTK_StartPlayAtFirstNote = false; // was true MPTK_EnableChangeTempo = true; MPTK_ApplyRealTimeModulator = true; MPTK_ApplyModLfo = true; MPTK_ApplyVibLfo = true; MPTK_ReleaseSameNote = true; MPTK_KillByExclusiveClass = true; MPTK_EnablePanChange = true; MPTK_KeepPlayingNonLooped = true; MPTK_KeepEndTrack = true; MPTK_MidiIndex = indexEditItem; MPTK_KeepNoteOff = false; // was true
Code language: C# (cs)
  • New methods for the HelperNoteLabel class.
    • LabelC4FromMidi
    • NoteNumber
    • OctaveNumber
  • Documentation correction.

Info November, 02 2022

  • Thank you for your vote for the Unity WebGL issue! Now the issue is in Active state. I hope that the Unity team will find soon a solution.

Info October, 04 2022

  • Site update, everything’s back in order!
  • Some disturbance on the site

Info September, 27 2022

  • V2.89.5 is available!
    • Now playing MIDI is also possible in editor mode. It will be more easy to check your MIDI without running an app. Perhaps the premise of a built-in sequencer editor 🙂
    • Add some stat calculation from MIDI file in the editor. It’s also very useful to understand how to process a MIDI file without running an app.
    • New MVP demo: read a MIDI file, add some MIDI events, and write in a MIDI file with a few lines of script (see SimplestMidiWriter). Pro version.
    • Corrected: MidiFileWriter2.MPTK_LoadFromFile is now working.
    • Method MidiLoad.MPTK_LoadFile is now available only in PRO version.
    • MidiKeyboard (connect an external synth) is now available for CPU Silicon (M1, M2, …) on Mac. Pro version.
  • Here a video:
  • Have Fun!

Info September, 10 2022

  • Good news for the WebGL compatibility, a Unity issue is open. Please, we need your up-vote to accelerate the process. Thanks.
  • V2.89.5 is ready ready to be deployed. I like the editor extension that allows you to play a MIDI without running an application, I hope you like it too!
  • Here a video:

Info August, 20 2022

  • V2.89.5 is in progress …
    • Now playing MIDI is also possible in editor mode. It will be more easy to check your MIDI without running an app. Perhaps the premise of a built-in sequencer editor ?
    • Add some stat calculation from MIDI file in the editor. It’s also very useful to understand how to process a MIDI file without running an app.
    • New MVP demo: read a MIDI file, add some MIDI events, and write in a MIDI file with a few lines of script (see SimplestMidiWriter). Pro version.
    • Corrected: MidiFileWriter2.MPTK_LoadFromFile is now working.
    • Method MidiLoad.MPTK_LoadFile is now available only in PRO version.
    • MidiKeyboard (connect an external synth) is now available for CPU Silicon (M1, M2, …) on Mac. Pro version.

Info July, 15 2022

  • V2.89.4 is available!
    • New SoundFont Import: select sample format (experimental).
    • New MVP Free: TheSimplestMidiGenerator, a “Hello world” demo.
    • Replacing obsolete Unity API functions.
    • MPTK_Play is now available for MidiFilePlayer and MidiSpatializer prefab (Pro).
    • Improvement of the pause on distance when Spatialization is on.

Info May, 29 2022

  • V2.89.3 is available!
    • Update to integrate the last version of Oboe (Fight Android Audio Latency)
    • Change tempo by script with MPTK_Tempo very easily. Ex:MPTK_Tempo = 120 (before, only MPTK_Speed was able to change the speed)
    • New MVP example to show how integrate in a few lines of script a MIDI device (Maestro Pro).

Info April, 22 2022

  • Hello Maestros! Just to inform you for some possible disturbance to access Maestro MPTK site
    I’m migrating this web site to another web hosting company and registrar. I hope that you will not have too much issues! Take me inform.

Info Marsh, 21 2022

  • V2.89.2 is available!
    • Update MidiFilePlayer inspector: add filter on the popup MIDI list for selecting a MIDI.
    • Corrected MidiStreamPlayer which was not able to spatilize the sound (Unity Spatialization).
    • Update TestMidiStream: demo how to play MIDI events with the keyboard. 0-9: play notes, Arrow keys: change preset.
    • Apply Sample Rate setting when loading SoundFont to be able to play Vorbis samples (Thank to Paul).
    • Add exception detection on all callback (like OnEventNotesMidi) to help detecting error in your script.
    • New design for MIDI and SoundFont Setup Windows. Now works fine with MacOS :)

Info December, 08 2021

  • V2.89.2 is in progress!
  • New page on the web site for sharing with us your creation. Contact us!

Info November, 30 2021

Info October, 11 2021

  • Version 2.89.1 is available!. It’s a patch version, some fixes and quick enhancements.
    • Add helper link for the MidiFileLoader inspector and a related page on the web site.
    • Add delayed start to MPTK_Play (Pro version)
    • Add delayed stop to MPTK_Stop (Pro version)
    • Add short script demo for MIDI looping
    • Correct instantiation for all MPTK OnEventxxxx to avoid crash in rare cases.
    • Corrected: Preset change for channel 9 was disabled
    • New kind of demos are also available: MVP (for Minimum Viable Product) has just enough core features to effectively deploy the product, and not more. Very efficient to understand how using Maestro.
      • MVP Free: MidiLoop and TheSimplestMidiLoader
      • MVP Pro: Spatializer3D for spatializing MIDI by tracks in a few lines of code

Info September, 6 2021

  • Finally it’s a version 2.89.0 because there is a lot of new functions! See below:
  • OnMidiEvent can be used like a preprocessor of the MIDI events: it’s possible to change the value of the MIDI events in real time . [Pro]
  • MPTK_TransExcludedChannel method useful to exclude a channel for transposing (in general, channel 9 for drums).
  • MPTK_keepPlayingNonLooped properties: when set to true, NoteOff or Duration for non-looped samples are ignored and the samples play through to the end.
  • Synth rate can be set to any value from the inspector or with MPTK_SynthRate.
  • Output rate and buffer size can be modified when playing but only for test purpose.
  • Added changing output rate and buffer size for iOS, but stay experimental.
  • MPTK_ChannelPresetChange: apply bank and preset change even if not available but return false.
  • MPTK_ChannelForcedPresetSet: apply bank and preset change even if not available but return false, able now to force bank.
  • MPTK_RealTime properties: real time since the start of the MIDI.
  • MPTK_KeepEndTrack properties: when set to true, meta MIDI event End Track are keep. Default is false.
  • MPTK_TickLastNote properties: tick position for the last note-on found.
  • MPTK_PositionLastNote properties: real time position in millisecond for the last note-on found in the MIDI.

See Version release for a full description.
Have Fun!​

Info August, 24

Info July, 23

Info July, 19

  • version V2.88.3 in progress …

Info June, 21

  • Oyez! Oyez! Version 2.88.2 is available!
  • Very important, please read if you have issue when updating: package manager is buggy with some Unity versions. Try to use the latest LTS Unity version possible. For today:
    • With Unity 2020: LTS Release 2020.3.12f1,
    • With Unity 2019: LTS Release 2019.4.28f1

Info June, 18

  • Finally, we choose Unity 2019.4.28 to ensure a good stability. Obviously, Maestro remains also compatible with higher Unity versions.
  • We hope the version 2.88.2 will be available beginning newt week.
  • Have Fun!

Info June, 17

  • Finalizing the spatialisation by tracks took longer than expected … but the version is now ready.
  • Helas, we got a minor setback when publishing version 2.88.2 with the 2017. Unity team say : “New assets should not be submitted through Unity versions earlier than 2018.4.0 LTS”
  • While we are at it, we decided to move Maestro to a recent Unity version: the LTS 2020.3.0 or 2019.4.28.
  • We hope that developers who need to use an earlier version will be able to do so!

Info May, 22

  • Version 2.88.2 on the road!
  • Get a look here on this discord server dedicated to Maestro app’s. It’s a funny place for talking about new version, explain your need, exchange between users. But I’m a newbie with discord, I need your help to animate this server and your advice. You are all welcome!!!
  • Some new methods added:
    • MidiFilePlayer.MPTK_ReadMidiEvents
    • MPTKEvent.MTPK_GetSynthParameterDefaultValue, MTPK_GetSynthParameterLabel, MTPK_GetSynthParameterListGenerator, MTPK_ClearSynthParameter [Pro].
    • MidiFileLoader.MPTK_SearchMidiToPlay
  • Demo SpatializerFly: new look and capacity to defined 3D sound by midi tracks on top of midi channels.

Info April, 19

  • Version 2.881 is available! Fast review!
  • A user report some difficulties to update with this new version. Contact me if you have difficulties or error after updating. Unity Package Manager seems not absolutely reliable.
  • Main new functions
    • Midi Meta Event KeySignature and TimeSignature are now processed!
    • Look at the new entry in the MPTK menu: version detail and quick access to documentation and a new windows give a quick access to the 15 demos available.

Info Marsh, 23

  • Version 2.88 is on the way !
    • Soon, a little change for the name “Midi Player Tool Kit” name … to be continued.
    • Always more accuracy for the midi player:
      • Better calculation of the real time of each midi events . Now, takes into account Tempo Change.
      • A new properties with each midi events give you the time of the event. See RealTime in MPTKEvent class.
    • A lot of improvements for MidiFileWriter2!!!
      • Get automatic creation and ending of tracks.
      • Create a list of midi events and play it with the internal MPTK midi sequencer (no temp file created).
      • Dedicated methods to create each kind of midi event
    • Thanks for your comments, talks, mails, that help me to make MPTK better!!!

Info December, 29

  • Version 2.87 Pro is available !
  • New features available :
    • New MPTK event triggered by the audio engine. Absolutely essential if you are writing something like a sequencer or a rhythm game. Generated Music becomes very accurate !
    • Read a full description here.
    • Update of the “Midi Euclidean Rhythms” demo. Mainly to check the added event but also with a lot of good function to play music.

Info December, 02

  • Oyez! Oyez! version 2.86 is available. Thank to a very quick validation in 3 hours by the Unity team this morning.
  • Main new features:
    • Android: Ready to fight latency with the integration of the Unity asset Oboe. No code to write, just bought Oboe! [Pro].
    • Synthesizer: Real time synth parameters modification. Now you can hange the default SoundFont generator value (ADSR, LFO, Effect, …) by script for each voices [Pro].
    • Midi Device: To reduce latency with Midi keyboard, add possibility for reading midi events from a device with a callback [Pro].
    • See “version change” for other features.
  • Look here for Oboe integration in MPTK

Some screen shot …

Synth parameters available for real time change:


This demo (with MPTK Pro) is useful to test latency but also the MPTK synthesizer voices run time effects and running different players at the same time. So, there is two prefabs MidiStreamPlayer for the drums and one MidiFilePlayer for the midi running at the same time.

An APK is available for those who want to test on their Android. Ask me by email, i will send you a link to the APK Euclidean Rhythm. Of course, I would be very happy to have your return.

Info November, 16

  • New class MidiFileWriter2 but the previous (MidiFileWriter) is maintain until the next major version. MidiFileWriter2 proposes a more consistent behavior with the others classes of MPTK and new helpful functions.
  • Warm your keyboard! Midi output device capabilities on top of Midi reading has been added [Pro]. As usual, a demo (simple) is available.
  • And as usual, some issues corrected, see Release Notes.Have Fun!

​Infos october, 02

  • We had a talk with a person wondered if a sequencer is available with MPTK. The answer is yes and no! Yes there is a Midi Sequencer able to play Midi file in background, and no, there is not an User Interface to create you own sequence. We considered that there is a lot of free sequencers able to do that better than with Unity which is limited with it’s Graphical User Interface (GUI). But the question is open! Please, give your opinion if you think that a GUI Sequencer in MPTK could be interesting. Thank by advance for your response.

Infos september,18 (a lot of news!):

  • Please, have a look to this Important update on the MPTK web site : Scripting with MPTK. I hope that will help persons who want to develop scripts with MPTK.
  • If you want to update MPTK to 2.841, please remove your previous version: delete folder MidiPlayer from the project tab. I apologize for that, but sync update don’t remove source file which are deleted in the new version, so conflict are detected.
  • Version 2.841 s available on the store :)
  • Horrible! The design of the two editors windows, Midi File Setup and Sound Font Setup, was ugly with Unity 2019 and 2020. Thank Unity to modify the default style of GUI!!! Corrected with this version.
  • You often ask for this function: add all Midi from a folder. Done!

Version 2.84 is available on the store

  • Now switching between Midi playing is immediate.
  • Add functions to facilitate integration with Bolt [Pro]
  • Start and Stop playing gradually (ramp-up) [Pro].
  • Now Midi play also with Time.timeScale = 0.
  • And globally, a lot of enhancements on the demos (7 for free, 6 more with the pro version).

Version 2.83 is available on the store

  • This version adds great enhancement for spatialization. MPTK is ready for Virtual Reality and Augmented Reality applications
  • The spatialization by channel/instrument [Pro] defined the position of each instruments in the 3D world.
  • Have a look the the video below: you can fly inside a whole orchestra and listen for each instrument individually. The demo is available with the Pro version.

Main 2.82 new functions:

  • Builder for music range and chord which is useful for algo music – [Pro]
  • Integration with PlayerMaker and Adventure Creator – [Pro]
  • Spatialization capabilities, ready for your Virtual Reality project. [All versions]

Main 2.81 new functions:

  • Add fluidsynth effects for standard SoundFont effects and integration with Unity effects [Pro]
  • Add integration with Cinematic Sequencer – Slate [Pro]
    Watch here a quick tuto:

and the dedicated page on the MPTK web site.

Version 2.7

  • Midi Sequencer totally rewrited from the awesome fluidsynth: better processing of midi pause, change position, change tempo, speed, …
  • Separate thread: better performance for complex Midi when a lot of samples are played simultaneously. Parameters are availables to adjust the level of performance need.
  • Load SoundFont from the web or desktop while running. It is no longer necessary to load the SoundFont in the DB before playing [PRO]
  • Start playing from the first note.
  • Pause when focus loss. Essential for smartphone !
  • Set default interpolation mode to Linear for a better sound (previous version was set to None).

Also, for advanced needs, three preprocessors directives are available to help understanding the performance:


The demo TestMidiFilePlayerScripting has been adapted to display the performance KPI.

Version 2.65 available:

⭐ Add Midi input functions (Windows and MacOS only) [PRO]. Thank to the new Prefab MidiInReader and the API to read a Midi keyboard. Integrate your Midi keyboard in a few clicks!
⭐ Change Unity Audio buffer size and synth rate for again better tempo accuracy, better sound, low latency.
⭐Full rewrite of the MidiListPlayer Inspector [PRO]. Now you can play part of a Midi, choose time to start and stop, choose overlap before the next Midi in the list.
⭐See also the new demo based on Euclidean Rhythm Algo. It’s a rhythm box that could become a complete application.
⭐ Preview of the new Midi file setup : new function to analyze the midi file, new design of the page, ….
⭐Correct an issue with the Sustain control which can generate CPU overload
⭐Add Pitch change midi event

See below demonstrations …

Build a Rhythm Box:

Build a Midi Game:

Midi Player Tool Kit is a package able to play music from Midi files in your application or from your own algo. There is no need of external component or device.

Thank to SoundFont for adding hundred sounds of instruments for playing Midi files

  • No scripting C# or JS is mandatory: specific inspector defined all your needs directly in Unity editor. See an overview here (V2).
  • Add Midi Audio Source Prefab in your scene as much as you want.
  • Add Midi files (from the web or from your composition) as much as you want.
  • Play / Paused automatically based on distance.
  • API available (V2) to integrate MPTK in your application.

Version 2.7 beta on the road, could be available beginning February

⭐Add capabilities to load soundfont on the fly from local device or from the web [PRO]. It’s now possible to use MPTK without loading a soundfont in the resource folder.
⭐Add new attributes to evaluate accuracy and performance for Midi Playing and SoundFont Synthesizer.
⭐Midi Sequencer and SoundFont Synthesizer are now autonomous (played in separate thread): more accuracy, better performance.
⭐Replaced deprecated WWW method with UnityWebRequest for MidiExternalPlay prefab [PRO].
⭐Corrected timing accuracy with MacOS.
⭐Corrected bad sound when changing tempo or position when playing

Have any Question or Comment?

4 comments on “News!


Thanks Tierry, to clarify im not trying to get an external device to integrate, I have a piano prefab that I want to respond to a midi file so that when it plays the piano keys respond. does that need the pro or will that work with the player in the free and how best to go about this?
Thank you,

Thierry Bachmann

Hello John
Sorry for the delay to answer. I’m not well follow comments on my blog, rather use my discord site or directly by email.
Yes! The free version is enough for doing what you want to do. The prefab MidiStreamPlayer will do easily the job. Ask me if you need more information.


Firstly thanks for making this. I have a quick question. I have put the player into a project I have which responds to MIDI input (either from an external piano input or re-routed input from logic). Is there a simple way for the midi generated from the player to be recognised within the project so that it responds? Apologies if this is an obvious question!

Thierry Bachmann

Hello John,
Thank for your interest with Maestro MPTK!
Integration with an external MIDI device is possible with MPTK Pro.
look here:

If you want just read MIDI events from your device, you can also used the MidiInReader prefab, no script needed:



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!!!


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

We are always happy to discuss your projects!

Add MIDI Music With 3 Clicks for Free

Sound Spatialisation, MPTK is ready for Virtual Reality [Pro]

Sound Spatialisation, MPTK is ready for Virtual Reality [free]

Midi Synth : Real Time Voice Effect Change

Euclidean Rhythm demo

New on Asset Store

Asset Store Partners