Sending Reaper MIDI to Unreal Engine

Setting up Reaper to send MIDI to Unreal Engine

Setting up Reaper

  • Install loopMIDI (This allows us to create a loopback MIDI device)

  • Add a new MIDI device in loopMIDI called unreal_port loopMIDI

  • Enable new MIDI output in Reaper via Options -> Preferences -> Audio -> MIDI Devices

    Only enable the MIDI Output

  • Setup MIDI output routing per track

    • Either via the Routing Matrix (View -> Routing Matrix) route-matrix OR
    • Track routing settings (IO button on track) route-track

Set each track to a separate MIDI channel, so each track number maps to its corresponding channel number.

Setting up Unreal Engine

Heavily based on this forum thread

  • Enable MIDI Device Support Plugin midi-plugin

  • Import Midi Blueprints

  • Create Blueprint Interface with OnNoteAction and OffNoteAction functions called MidiListener

  • Set Game Instance Class via Edit -> Project Settings -> Maps & Modes -> Game Instance -> Game Instance Class game-instance

  • Set MidiDeviceId in MidiManager to map to the output of unreal_port (You can find this out from the debug logs in the console)

  • Place MidiDebug in the scene to print note debug information to the console

  • Place TestListener in the scene and set MidiChannel to whichever track # in Reaper

Test it out

If you have added MIDI to the track, set the MidiInput number and MidiChannel number on the TestListener. Hit play in Unreal Engine and then Play in Reaper, the TestListener cube should respond to MIDI input.