Raspberry Pi | No connected (Midi) Devices

Sonic Pi installs fine on the Raspberry PI and plays audio but, for some reason, it doesn’t detect MIDI devices.

I hooked up an USB M-Audio keyboard and can “see” it when I enter aplay -l
When I enter amidi --port=“hw:1,0,0” --dump I can see MIDI values when tapping on the keyboard#s keys … so, it looks like the raspberry is perfectly happy with the MIDI keyboard.

I tried resetting MIDI in Sonic PI and disable/enable MIDI subsystems but no luck so far. I tried other MIDI gear and eventhough I can “see” the gear through the CLI, Sonic PI is not having it … … … what else can I try?

Hi, sorry you’re having issues. Which version of Sonic Pi are you running?

Hi - the latest Sonic PI that comes with (the latest) Raspian is 3.1.0 - that’s what I am running.

Hi, the last version that I officially released (and support) for the Raspberry Pi is v3.0.1.

Version 3.1 was built by the Raspberry Pi Foundation and unfortunately doesn’t have functioning OSC-out and MIDI in/out.

I offered to build an official release for them if they would fund my time but they declined.

If you want to use MIDI then you either need to use v3.0.1, build Sonic Pi yourself or switch to PC or Mac.

Oh ok - that info will now save me a lot of time! I have Sonic PI running on my laptop (so I can explore the syntax); I am comparing Sonic PI with TidalCycles you see. Ultimately, I’d like to build a standalone project based on the Raspberry PI to act as a MIDI master-clock and, at the same time, code whilst other MIDI gear is jamming in sync. Thanks for the support!

This script will build version 3.2.0 for you on latest Raspbian Buster. I used a pi4 with 4gB of ram.

Sam I have been learning both the RP and your SonicPi and I came across a DAC to ADC hat by Blokas called Pisounds but because of the virus being backed up and delaied . but any way from what I have learned so far it will do midi with the RPi 3 and 4 but like I said I have not got it yet have you work with the Pisound or know any resources that I may learn more from . I am trying to build a sound edit studio with useing the pi stuff . I 'studying python, linux, and other things that I’ve seen on here . but I amay be learning but I am not a pro yet. I studied midi in the 80 and 90 so most of my know how is old school stuff apple II e, commador Basic lang So all this pi stuff is just having to relearn and learn new langs but I’m a 49 year old nerd that just need the way shown . So if you have any resources that you may share for us old school nerds to learn from that would be the greatest THANKS THE WORLD TO WHAT YOU HAVE GIVEN SO FAR .

1 Like

Hi Nate
Well I’m a retired 72 year old nerd, still going strong with Sonic Pi!!
I’ve got two Pi SoundCards and they work well. (I think they have a new version which is better compatible with a Pi4 so make sure you get the latest if you buy one). I find Sonic-Pi on a Pi is a great resource and use it with both midi keyboard and software synths like Helm. With the PiSound board the latency is not bad.
Also you can use the PiSound board with a ModeP install which Blokas (the PiSound maker) supply. I use that on a separate Pi and PiSound Combo.

Hi - what release of Raspbian are you using?
I am after the a Raspbian release that has Sonic Pi v3.0.1. onboard.

… there are many to pick from: http://downloads.raspberrypi.org/raspbian/images/

I build my own Sonic Pi 3.2.0 from source on Pi4. I am working on a downloadable bundle that can be installed. NOT a .deb file, but one that copies a working Sonic PI 3.2.0 onto your Pi (latest Raspbian Buster) and can run it there.
Undergoing final testing to test it doesn’t cause any problems, and is easy to uninstall again.
If you want to use SP 3.0.2 then you want the latest Raspbian Scratch which I would guess is about distribution, but this will NOT run on a Pi4, but will on earlier machines.

I think the latest Rasbian Stretch is http://downloads.raspberrypi.org/raspbian/images/raspbian-2019-04-09/

1 Like

Cheers - I’ll give that a try … and also the bundle when you make it available … would great to run a latest release of Sonic PI on the PI. I am assuming that MIDI in/out should work? – anyways, let’s see what 3.0.2. Is like first.

yeah Robin I had gotten the RPi 4b as so as I was next on a waiting list Go thje new SonicPi ves just waiting to be able to get the Pisound card as so as the virus thing in China gets back to sending Electoric out again. SO I just keep reading the sonic news tnotes and would like a book or something I could read, take note in and try ex. like I do here by copying code and putting it into the Sonic pi but still I crave for more .Ever since a kid I never bet a gamer ,I’ve alawys been the one trying to write my stuff and Music has been my life so finding RPi and Sonic PI I was like HEY TIME TO WAKE UP and get back to creating again. I volunteer at a local Non profit Radio KXCR 90.7 FM here and what to start a Sonic Eltro Show So as so as I get all the Sound Pi gear I I plan on doing my own plus useing other people from here stuf to broadcast on air credit given of couse but yeah thats my goal . If you or any one could or world like to be a part of my future show I’m all open to the help that is so greatfully given here I love this site THANKS AGAIN EVERY ONE.

2 Likes

Well yeah Eric myself I’m at the stage of trying many diff vers of OS to learn from all their quoratzes I am new to the Raspberry Pi I have both 3b and 4b for it had two USB3 and Hdmi mini ports . So as far I have an old Noobs OS on the 3b, the newest Raspbian 4.19 on the 4b , a Linux Ubuntu on with my wins 7 so I’m still in the relearning of programing but as soon as I get my pisound card for the R pi 4b I’ll be up dating my learned info for others but as of right now I’m waiting like the rest of the world for things to be able to come from China. As far as My Midi Music equipment I have an Old school Ensonic EPS 16plus Digital Sampler Workstation that runs on its own OS. And has midi in out and through with line in for sampling external sounds too. So I’m up to my butt in diff OS trying to learn how to get them to be able to work together and if there is any others trying thing like me .

I have now ditched the idea of trying to run the latest Sonic Pi on a raspberry -too painfull- and have gone for a mini pc running Windows 10. So far so good. This will also allow me to quite easily run Tidal Cycles also.

This is perhaps for another thread but is it normal for Sonic Pi to stop a running session when, for example, you accidentally, change a parameter, such as resonance, beyond its range? Tidal Cycles just warns you that the “submitted” code is invalid a keeps on running with the old code … so no (embarrassing) stops and restarts.

In the Preferences pane (Alt-p on your mini pc), in the ‘Audio’ tab there is a section called ‘Synths and FX’.
You most likely have the check box in this section labelled ‘Safe Mode’ checked on. This prevents you from running code which contains synth or fx opt values that may possibly produce undesirable/unpleasant/uncomfortable results like potentially loud clicks/buzzes/etc.
You may of course un-check the ‘Safe Mode’ checkbox to allow code to be uninterrupted in these cases, if you are prepared to accept the potential risk caused by values outside the ‘normal’ ranges :slight_smile:

Hi,
I am working on a museum exhibit in which a Teensy sends MIDI over USB messages to a Raspberry Pi running Sonic Pi 3.3.1

In the IO menu under MIDI Inputs all I can see is “No Connected Inputs” however the Pi can see the MIDI NOTE_ON and NOTE_OFF cues coming from the Teensy if I monitor using the Protokol diagnostic tool by Hexler who make OSC Touch Protokol | hexler.net

The ability for Sonic Pi to run on a Raspberry Pi is a big tick in its favour as it avoids having to supply and manage a desktop PC or Mac. Is it still the case that MIDI input is unsupported in Sonic Pi running on the Raspberry Pi?

Thanks,
Michael

Midi does work on RPI with 3.3.1 or, if you have the latest release OS this comes with a version of SP3.2 and this will also work with midi. However, not all devices show up as inputs. Can you see your device if you type aconnect -l in a terminal? If so, you can connect it to the midi_through_port which Sonic Pi will see using the aconnect command, or alternatively using Qjackctl connection window. I use this with synths like Qsynth to connect to the PI. An external hardware keyboard should show up in the midi input list. My Oxygen8 certainly does and I use it frequently with SP on a RPi.

Hi Robin,
Happy New Year

Are you saying that some devices will show up as MIDI inputs on the Pi? It would surprise me that if some do, that the Teensy doesn’t, as it is renowned for the quality of the USB MIDI implementation and this is why we are using it.

Yes it shows up:

2021-12-31-161025_1920x1080_scrot

 

I’m sorry Robin but I don’t know how to do either of the above or have the knowledge to choose between the two alternatives. Would you be kind enough to suggest the most robust option and to link me to some documentation on how to do both?

By robust I mean best survives restarts of the app or reboots of the Pi.

Do you mean your external MIDII hardware shows up without having to “connect it to the midi_through_port which Sonic Pi will see using the aconnect command, or alternatively using Qjackctl connection window” or after you have made these connections.

I’ll give more detail tomorrow if I’ve time, but two points.

Yes my external keyboard shows up as a midi device directly in the midi list in SP.

Are you using the SP 3.3.1 downloaded from the sonic-pi.net site? You should see something like midi_through_midi_through_port-0_14_0 listed in the midi ports. (The 14 may be different)
If you plug in a hardware keyboard it should show up something like usb_oxygen_8_v2_usb_oxygen_8_v2_midi_1_28_0 It is a quirk of the midi implementation in SP that at present you get rather a complicated port name.

If you don’t get the through port I don’t think your SP midi is working. If you are using the latest version of Raspberry Pi OS this has version 3.2.2 with working midi. In this case the port shows as midi_through_port-0

Happy new year (in 10 minutes here!)

Yes I am running 3.3.1 I did a command line install as per instructions on the sonic-pi.net homepage. I can’t show you a screengrab as I am limited to one image per post :cry:

I don’t see anything listed in MIDI inputs when the Teensy is plugged in in spite of it being recognised by the OS via aconnect and by Protokol.

I plugged in a Keith McMillen Instruments QuNexus K708 and you can see that the OS recognises it via aconnect but this device does not become available as a MIDI input either.


 

As the evidence is pointing to an installation problem I will:
a) download latest Raspberry Pi OS with all the trimmings to a new SD card and see how SP 3.2.2 behaves
b) create a fresh Raspbian image (without application software) on a new SD card and download the 3.3.1 .deb again