How to Use a MIDI Keyboard in Unreal Engine 5 (Blueprints)

Table of Contents

Works in Unreal Engine 5. Updated October 2026.

Quick answer: no plugin purchase needed.

  1. Enable MIDI Device Support in Edit > Plugins and restart.
  2. On BeginPlay, call Find All MIDI Device Info and take the Device ID of your keyboard from Input Devices.
  3. Call Create MIDI Device Input Controller with that ID and save the result in a variable.
  4. Bind On MIDI Note On and On MIDI Note Off on that variable. Each event gives you the Note (60 is middle C) and Velocity (how hard the key was hit).

Step 1: Enable the plugin

Open Edit > Plugins, search for MIDI Device Support, tick it and restart the editor. Plug the keyboard in before you start Unreal: the device list is read when the editor launches.

Step 2: Find your keyboard

In any Blueprint (an Actor in the level or your Game Instance works), on Event BeginPlay:

  1. Call Find All MIDI Device Info.
  2. Loop over Input Devices and print each Device Name to see what Unreal found. Is Already In Use tells you if another app has it open.
  3. Keep the Device ID of the one you want. Shortcuts: Get Default MIDI Input Device ID, or Get MIDI Input Device ID By Name with the name you printed.

Step 3: Open the device and listen

  1. Call Create MIDI Device Input Controller with the Device ID. Leave MIDI Buffer Size at its default.
  2. Promote the return value to a variable. If you don’t keep a reference, the controller can be garbage collected and the events simply stop.
  3. From the variable, drag out Bind Event to On MIDI Note On and create a matching custom event. Do the same for On MIDI Note Off.

Now press a key: the Note On event fires with the note number and velocity.

Common problems

ProblemFix
Keyboard not in the listPlug it in, then restart the editor
Create returns nothingAnother app (often your DAW) has the device open. Close it
Events fire for a while, then stopStore the controller in a variable
Every key also fires Note On with velocity 0Many keyboards send that instead of Note Off. Treat velocity 0 as a release
Notes are an octave offApps disagree on naming: note 60 is “C4” in some and “C3” in others. Trust the number

Using the notes

  • Play a sound: map the note to a pitch in a MetaSound, or to a sample per key.
  • Drive gameplay: a piano game compares the note with the expected one; a rhythm game maps notes to lanes.
  • Use knobs and faders: bind On MIDI Control Change in the same way. Each knob sends a control number and a value from 0 to 127.

MIDI Device Support works on desktop platforms. Reading a USB keyboard on a phone needs extra platform work.

FAQ

Can I read a MIDI keyboard in a packaged game?

Yes. The plugin works in packaged desktop builds, not just the editor.

Can I send MIDI out to a synth or DAW?

Yes. Create MIDI Device Output Controller with an ID from Output Devices sends notes and control changes out.

Can I connect my DAW to Unreal on the same PC?

Yes, through a virtual MIDI port. On Windows, the free loopMIDI tool creates one that both apps can see.

Related tutorials

Making a piano or rhythm game? MIDI Engine 4 PRO handles the song side: MIDI file charts, notes that follow the audio clock, and Perfect to Miss judging. It doesn’t read the keyboard itself. You connect the events from this tutorial in two nodes: on Note On call Press Lane with Get Lane Index For Pitch, and on Note Off call Release Lane. Unreal Engine 5.7 and 5.8.