↓ Skip to main content
  1. Home projects/

midiHost: a Raspberry Pi MIDI router

··Index: 4·

midiHost turns a Raspberry Pi 2 with a small PiTFT screen and four buttons into a standalone USB MIDI host, so that my Akai MPK mini Play can play other instruments without a computer in between.

Incoming MIDI events go into a queue on a dispatcher thread and pass through a chain of filters (transpose, channel mapping, controller mapping, pressure to CC) before they’re sent on. There are two targets I set it up to talk to:

  • A Novation Circuit gets notes on channel 1 or 2, one channel per synth.
  • A Korg Kaossilator Pro+ gets a custom filter that turns notes into positions on its XY pad. X comes from the note and Y from a knob on the keyboard.
midiHost: MIDI events go into a queue, through a chain of filters, and out to a Novation Circuit or a Korg KaossilatorMIDIkeyboardqueuedispatcher threadtransposechannel, controller mappingpressure to CCNovationCircuitKorgKaossilator Pro+custom filter: note to XY padRaspberry Pi 2 with PiTFT: curses screen, 4 buttons switch modes
MIDI events from the keyboard through the filter chain to two instruments

On the little screen there’s a text-mode (curses) interface, and the four hardware buttons are used to switch modes, and the code itself is based on the filter example from python-rtmidi.

Source on GitHub.

Related