Midi in Udon
Since the 1980s, MIDI has connected musical instruments in imaginative ways. We've included it in VRChat so you can build worlds that respond to real-time instruments and prerecorded performances.
Read more about MIDI on Wikipedia.

There are two ways to work with MIDI in your Udon worlds:
-
Realtime data from an instrument plugged into your computer.
-
Playback of MIDI data along with audio files.
Either way, you'll be working with Udon's MIDI Events, detailed below.
Midi Events
MidiNoteOn
Triggered when a 'Note On' message is received. Either triggered by MIDI playback, or by pressing a key/button on your device. Outputs:
int channelMIDI Channel that received the event, 0-15.int numberNote number from 0-127 (your MIDI Device may not output the full range)int velocityNumber from 0-127 representing the speed at which the note was triggered, if supported by your MIDI device.
MidiNoteOff
Triggered when a 'Note Off' message is received, typically by releasing a key/button on your device. Outputs:
int channelMidi Channel that received the event, 0-15.int numberNote number from 0-127 (your midi Device may not output the full range)int velocityThis value is typically 0 for Note Off events, but may vary depending on your device.
MidiControlChange
Triggered when a control change is received. These are typically sent by knobs and sliders on your Midi device. Outputs:
int channelMidi Channel that received the event, 0-15.int numberControl number from 0-127.int valueNumber from 0-127 representing the value sent by your controller. For some knobs that can spin endlessly rather than being limited by physical start/end positions, this value might be simply 0 and 1 or some other range indicating "positive" and "negative" increments that you must manage on your own.