MIDI out on RPI4

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

2 Likes