Is it possible to configure RPi as a MIDI device? I'd like it to show up as a MIDI device on my computer when connected via USB OTG to my computer.

  • have you done any research before posting your question?
    – jsotola
    May 29, 2019 at 19:08
  • I understand that my question sends the vibes that I did zero research, but I have indeed done quite a lot of research. I always do. All I’ve found is how to connect MIDI devices to the RPi, and not how to turn the RPi into a recognizeable MIDI device.
    – vaid
    May 29, 2019 at 21:22
  • I agree what you are saying - knowing how to connect a midi device to rpi is not the same thing as asking rpi to pretend to be a midi device. Let me think about it and see if I can suggest anything. I will start my research with the following posts - raspberrypi.stackexchange.com/questions/98016/… raspberrypi.stackexchange.com/questions/96083/…
    – tlfong01
    May 30, 2019 at 1:59
  • Now let me suggest something. First, we need to agree on the midi controller hardware. Let us start with a 16 key controller. We can use a keypad to simulate the controller - Multiple GPIO Buttons raspberrypi.stackexchange.com/questions/98440/… If we can use Rpi to detect which key is pressed, then we have completed the hardware part. Of course we can use more sophisicated key pad, such as Hall effect, which is analogue, so we can use ADC to detect more things, like pressure of key presses etc, but this is an improvement of first step. . to continue, ...
    – tlfong01
    May 30, 2019 at 3:50
  • a) You'll need a pi zero or zero w. b) it's simple as gist.github.com/gbaman/50b6cca61dd1c3f88f41 (though you may need to find more recent instructions as those are for jessie - but that's your research for you) May 30, 2019 at 3:52

1 Answer 1


OTG does not work on most Pi models due to hardware restrictions.

To enable OTG on the Pi Zero, see Andrew Mulholland's blog post Raspberry Pi Zero – Programming over USB!, and the linked guide. (To summarize: add dtoverlay=dwc2 to /boot/config.txt, and load the dwc2 and g_midi modules.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.