Conceptual Schemas & Use Cases

Maestro Conceptual Views

Two Main Modes for Playing Music

  • In Green on the schema: play music from a MIDI file with full interaction with your application (MidiFilePlayer, MPTKWriter, MidiExternalPlay, MidiInReader MidiListPlayer, MidiSpatializer).
  • In Orange on the schema:  create and play your music at run-time in your application (MidiStreamPlayer, MidiKeyboard, MPTKChordBuilder, MPTKChordLib, MPTKRangeLib). Typically, music is created in your Update() method.

Simplified view:

Simplified MPTK Conceptual Schema
Simplified MPTK Conceptual Schema

Detailed view:

MPTK Conceptual Schema
MPTK Conceptual Schema

These two modes Green and Orange can be combined in any way around the central MPTKEvent class, which describes a MIDI event.

Maestro Unity Prefabs & Classes

MPTK Prefabs & Class Schema
MPTK Prefabs & Class Schema

Three Prefabs are available with the Free version

  • MidiFilePlayer:
    • Play music from a MIDI file, fully controlling the speed, position, quantization, channel, instrument, effect, and loop. Navigate to a specific position as needed.
      • It is not necessary to write a C# script for playing music playback.
      • The easier and quick way to add music to your app.
      • Obviously you don’t need to be a musician, there is a lot of MIDI files available on internet, often for free.
      • The Integrated Maestro MIDI Editor is also capable of creating your MIDI sequences [Pro].
  • MidiStreamPlayer:
    • Generate and perform music through your algorithm.
      • Play music by creating MIDI event (note-on, preset change, control change, …) in relation with your Unity action (see MPTKEvent class).
      • From your Unity Update() method or on Unity event.
      • Generative music is at your fingertips.
  • MidiFileLoader:
    • Load a MIDI file for analysis or processing by accessing to all the MIDI events: note, tempo, text, instrument, … No player onboarded.

Four Prefabs are available with the Pro version

  • MidiListPlayer:
    • Play music from a list of MIDI files.
      • Overlap between MIDI
      • Play part of a midi.
      • Loop …
  • MidiExternalPlay:
    • Play a MIDI directly with an URL from the Web or anywhere from the device (desktop or mobile).
  • MidiInReader:
    • Read MIDI events from a MIDI keyboard.
    • Play directly, or do all that you want with the MIDI events (see MPTKEvent class).
  • MidiSpatializer:
    • Play music from a MIDI files with the spatializer ready for a 3D environment where each instruments can be localized in space.

There is surely a prefab for your need! All you have to do is to add one of this prefab to your scene.

MPTK Prefab
MPTK Prefab

Main Maestro Classes

Quick overview of the main classes:

  • MPTKEvent class
    • It’s a central class for all others Maestro prefabs and classes!
      • Create MIDI events or interact with the attribute of a MIDI message.
      • Play and stop a note.
      • Modify in real time default internal synthesizer generators values.
      • Change instrument (preset, patch, …).
      • Change controllers values.
      • Access for the parameters of each voice.
  • MPTKWriter class [Pro]
    • Generate and export MIDI files programmatically.
    • Play directly as an external MIDI or directly with MPTK.
    • Insert/append MIDI to a MIDI at run-time
    • The MIDI Editor functionality is encapsulated build with this class.
  • MidiKeyboard class [Pro]
    • Connect external MIDI keyboard
    • By script:
      • List device
      • Open / Close the selected device
      • Read or write MIDI event to the device

Look here for a detailed description of each classes, prefabs, methods, attributes, … and a lot of code samples.

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