MIDI out on RPI4

I’m attempting to change from Sonic Pi on my MacBook to an RPI so that I can continue using SPI to live loop MIDI to external hardware such as Volcas and similar things. Everything was and still is fine on the MacBook but I’m struggling to get to the same place on the RPI.

I can see (using the aconnect command) the USB to MIDI cable and some devices that connect via USB such as a Korg SQ-1, but I can’t seem to connect to a Volca or even see any MIDI devices listed in Sonic Pi. Any ideas about what I need to do? OSX uses the Audio MIDI setup utility to get it all organised so do I need something similar for the Raspberry Pi and if so has anyone managed to get something like this working?



Unfortunately MIDI support is broken on the RPi4 or any Pi running Buster.

It’s a long story, but essentially the Pi Foundation terminated my funding prematurely. Despite that, I still built and released version 3 of Sonic Pi for the Pi and delivered it to them for release on the Stretch version of Raspbian.

Pi Trading then released the Buster version of Raspbian and included v2.1 of Sonic Pi - effectively silently downgrading all their users to a much older version of Sonic Pi without any warning or notice on their lengthy release blog post.

When I pointed this out they initially claimed there was no downgrade?!? And then once they realised there actually was I offered to make them a new release for Buster if they could fund the development work. They declined.

Subsequently they made their own release of v3.1 and unfortunately didn’t do a good job and failed to build the MIDI / OSC support correctly. This is now shipping on their latest Raspbian and is unfortunately completely out of my control.

As the RP4 requires Buster, I can’t recommend it at all for Sonic Pi if you want to use MIDI or outgoing OSC.

The only ways forward from this that I can imagine are:

  1. The Pi Foundation or Trading company fund me to make a proper release
  2. They build it correctly themselves (or get someone else to)
  3. Someone does the hard work of releasing v3.1 doe Debian proper and it then makes its way int Raspbian like any other Debian package.

Sorry for the inconvenience.

Thanks for the explanation. Is there any variation of NOOBS and Sonic Pi that would actually allow me to send MIDI messages out? I’m aiming to integrate live coding with live instruments and eventually want an audio analyser to generate MIDI information that feeds into SPI so a Raspberry Pi seems a sensible way to do it. If it’s not possible then I’ll reluctantly have to keep my laptop in the firing line at gigs.

Is there anyone at Pi Trading or the foundation that I could contact about this?

Sam has answered the question for you. However there are two further possibilities.
The first (if your PI is a Pi2 or Pi3) is to stick to Raspbian Stretch. This can run Sonic-Pi 3.0.1 which will allow midi input and external OSC messages.
The second is to build Sonic Pi from source yourself. I have done this on a Pi4 running Raspbian Buster and it works very well. It takes around half an hour to do.
In fact I built Sonic Pi 3.2dev first (the latest development version), but then built a version 3.1. This was altered slightly from version 3.1 for Mac to incorporate solutions for a couple of bugs, but is otherwise the same as the version 3.1 for Mac, and performs similarly. It also runs on a Pi2 and Pi3 running Buster, although performance is not quite as good.
I did some notes on the 3.2dev build here


Can you get midi baudrate out of any RPi ?