MIDI

Drive OBS events with Musical Instrument Digital Interface (MIDI) messages.

MIDI messages are received from a device. A device could be an app, like TouchOSC, or hardware, like a MIDI controller.

The User creates a text sources to store and display incoming and outgoing messages.

A text source is used because changes to a text source are easily observed by WebSocket clients. When a text source is updated an "InputSettingsChanged" event is sent to webSocket clients. See the Processing MIDI Messages tutorial for a complete example.

obs_midi_io.excalidraw.png

Install Python dependencies

This script uses the `Python rtmidi Library.

  1. Open the Terminal app
  2. Enter the pip command
 python3.11 -m pip install python-rtmidi

Add the MIDI io Script to OBS

The "MIDI io" script and accompanying OBS Collection can be found on Github.
python midi io repo

Import the MIDI io OBS Collection

  1. Download the MID io Collection
  2. In OBS, from the menu select Scene Collection > Import
  3. Import the collection
  4. Choose the collection Scene Collection

Add the MIDI io Script

  1. Download the MIDI io Script
  2. In OBS, from the menu select Tools > Scripts
  3. Click the + Add script button

Configure MIDI Devices

Add MIDI Devices

Connect MIDI devices to your computer before opening OBS.

Enter the number of devices to monitor

MIDI Device Settings

MIDI Device: a list of available devices
Device Input Name: a Text Source to store messages coming in to OBS from the MIDI device
Device Output Name: a Text Source to store messages going out from OBS to the MIDI

Pasted image 20251122170135.png