MusIT

Use Cases

Maestro Conceptual Views

Two Main Modes for Playing Music

  • Green on the schema: play music from a MIDI file within your app (MidiFilePlayer, MidiFileWriter2, MidiExternalPlay, MidiInReader MidiListPlayer, MidiSpatializer).
  • Orange on the schema:  create your music at run-time in your app (MidiStreamPlayer, MidiKeyboard, MPTKChordBuilder, MPTKChordLib, MPTKRangeLib). Typically, music is created in your Update() method.

Simplified view:

Detailed view:

These two modes can be combined as you want around the central class MPTKEvent which describes a MIDI event.

Maestro Unity Prefabs & Classes

Three Prefabs available with the Free version

  • MidiFilePlayer:
    • Play music from a MIDI file with a full control of  speed, position, quantization, channel, instrument, loop, move to specific position …
      • No C# script needed to add music, playing music can be done with the Unity Editor.
      • 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.
      • Integrated Maestro MIDI Editor can also be used to create your MIDI sequence [Pro].
  • MidiStreamPlayer:
    • Create and play music from your algorithm.
      • Play music by creating MIDI event (note-on, preset change, control change, …) in relation with your Unity action (see MPTKEvent class).
      • Generally from your 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 on boarded.

Four Prefabs 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.

 

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.
  • MidiFileWriter2 class [Pro]
    • MIDI Editor is built with this class.
    • Create and export MIDI files by script
    • Play directly.
    • Insert/append MIDI to a MIDI at run-time
  • 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!!!

Contact

If you have any questions, please don’t hesitate to reach out to us with the dedicated Unity forum or on our Discord  channel

We always enjoy discussing 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