Prefab MidiInReader

Use case

MidiInReader is a prefab, available in the Pro version, that allows you to

  • Read MIDI events from a MIDI keyboard connected to your computer.
  • Play audio directly with the MPTK Synth without any scripting.
  • With scripting, you can process any MIDI event to do … whatever you want!

Only one MidiInReader is allowed by project. There is no sense to have more than one !

This prefab is based on the class MidiKeyBoard. Use this class if you also need to send MIDI messages to the device. The prefab MidiInReader is specialised to read MIDI messages from a MIDI device.

Installation

For connecting external MIDI device, Unity needs the Maestro MIDI keyboard in order to propose core functions as:

  • List devices connected,
  • Select and open devices
  • Read Midi messages.

See here how-to setup the Maestro MIDI keyboard plugin.

Tips: some Unity information about plugin.

Known limitations

  • Available for Windows 10 64 bits and MacOs 10.1 and after
  • Not available on Android and IOs.
  • Not able to process Sysex messages (perhaps in the future if there is a need)

Parameters

  • Read Midi Events: Midi events from the keyboard are read.
  • Log Midi Events: log information about events in console.
  • Send To MPTK Synth: midi events are played in real time with the internal MPTK synth.
  • On Event Input Midi: be notified when a new event is read from your keyboard. Trigger a method in your script and do … what you want to do !
    For example, in the demo, each events are displayed and play with the MPTK Synth.

When running the TestMidiInReader demo:

With this demo, all the MIDI events are read from the MIDI device then displayed and played with the MPTK Synth.

Read MIDI events from an external MIDI device
Read MIDI events from an external MIDI device

Others Foldout

Get Creative Tools from the Unity store

If you enjoy these creative tools, please leave a review on the Unity Asset Store! Your feedback and support motivate me to keep improving them and creating new features.

Skills for AI assistants

Maestro MPTK now includes AI Skills to help your favorite AI assistant build projects with Maestro! Don’t miss this detailed guide.

AI Skills for Creature Kit are in development.

Note: The custom MPTK LLM has been deprecated.

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!

Creature Kit – Wild Beasts Demo

Creature Kit – Beast Generator – Creating a Beast in Unity

Add MIDI Music With 3 Clicks for Free

Midi Synth : Real Time Voice Effect Change

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

Euclidean Rhythm demo

Demo on itch!