📡Midi Receiver

Live input from a computer keyboard or MIDI device

Midi Receiver listens for midi input from an external device. This can be used to synchronize visuals with live played music or using a midi controller.

If neither MIDI Jack or Minis are installed, Midi Receiver displays a warning in the Inspector.

Setup Instructions

Please refer to the following pages for step-by-step instructions to install and configure either Minis or MidiJack. Minis is the newest and preferred solution, while MidiJack is offered for legacy support.

đŸŽ›ī¸Minis Setup (New Input System)đŸšĨMidiJack Setup (Legacy Input)

Midi Receiver Editor

Select the object to view its settings in the Inspector.

For common features, please see Menu Bar and Update Settings.

Save

Saves the current configuration to the PlayerPrefs.

Load

Loads the configuration from the PlayerPrefs.

If a configuration is saved and then the PlayerPrefs Name is changed, the configuration will need to be saved again under the new name. This also may result in the old settings remaining in PlayerPrefs. This doesn't hurt anything but you may want to clear the settings with the old name first before setting a new name, using Erase Configuration.

Auto

If enabled, the configuration is automatically loaded and saved on Awake and Destroy, respectively. Changes are not saved until unloaded or the Save button is pressed.

Map

Upon entering play mode, the current configuration is loaded and Midi Receiver is awaiting midi input to react to the control it is currently mapped to.

To assign a new midi input, press Map to enter listening mode.

The first input detected from any key, knob, or fader is captured and mapping mode ends.

The last received midi note is displayed in the menu bar, as shown above. This can be useful to see which note is being played currently (regardless of mapping). However, please note that the Inspector window does not always repaint. A simple workaround is to move the mouse over the menu bar to make it update.

Mapping Using Scripts or Events

Configuration

Input

Select the input channel (1-16) to receive midi signals.

To see data being received via a midi device, select from the main menu:

Window > MIDI Jack

Note

Select whether the input control is a Note (key on a keyboard) or a Knob (a fader or twist knob).

When using a knob or fader as input, it's range is mapped to the output value for full manual control using the device. Using a note for input, on the other hand, plays and holds the note according to the ADSR settings.

All Octaves

This option is available for note types only. When enabled, notes played are treated the same across all octaves. For example, if you map the note C, it will be triggered when C is played in any octave.

Program Button

This is an optional UI button to allow users to map midi input during runtime. When the button is pressed, it puts Midi Receiver into listening mode and captures the first midi note or knob touched.

PlayerPrefs Name

This defines the basename for PlayerPrefs values to store and retrieve the midi input configuration for this Midi Receiver. By default this name matches the game object name but may be changed if desired. This saves several values into the PlayerPrefs starting with the basename.

As displayed in the PlayerPrefs Editor

Erase Configuration

This removes the values from the PlayerPrefs based on the current name entered. Use this to clear out old settings before renaming a setting.

QWERTY Input

When this option enabled, standard keyboard input can be used to trigger events in lieu of MIDI.

Key Code

The key code can be selected manually in the inspector by using the dropdown menu, or in play mode you can enter mapping mode (press the Map button) to listen for the first key pressed.

Each mapping can have both MIDI and keyboard input. Mapping mode is automatically stopped with each input detected, but you can run Map twice: once to set a MIDI note, and again to set its keyboard equivalent.

Use Any Key

If enabled, no mapping is required and any key on the keyboard will cause MidiReceiver to trigger.

Using the keyboard as input allows MidiReceiver to be used without any MIDI devices and does not require MidiJack or Minis.

Note Processing (ADSR)

Notes are processed using an ADSR envelope (Attack, Delay, Sustain, Release). Please refer to the glossary for an explanation of ADSR.

Please refer to the documentation for Midi Tween for

of these settings.

Instant

If enabled, the midi note immediately triggers this behavior when pressed.

Property Mapping

Map To

Midi input may be mapped directly to a property or to control Midi Tween, Tween

Property

Maps directly to a property.

This works identically to Midi Tween, replicated in Midi Receiver to simplify the setup for basic use. However, either Tween or Midi Tween may be used for additional control.

Tween / Midi Tween

Assign an instance of Tween or Midi Tween to control. Use the Amount slider to blend the influence of the live received midi over the current behavior.

Using Midi Tween, it is possible to combine input from a Midi File with live midi input using Midi Receiver, essentially adding the live signal in with the prerecorded midi. This depends on the Remote Control Pass Thru setting of Midi Tween.

Trigger Only

When this mode is selected, midi input only triggers the Events (registered below) and does not apply directly to any property. Use this mode to pass live midi note values to a custom script.

Events

Unity Events may be used to propagate note on/off events to drive other behaviors. This could be used to trigger particles, animations, or custom scripts. The value passed to these events is the note intensity (velocity), which may be used or ignored by the registered event listeners.

Troubleshooting

Is Midi Supported?

No Midi Received?

Still No Midi Input?

Last updated