You are a legend. This video is EXACTLY what I needed to find. I look forward to making this project and supporting you on Patreon. I am currently stumbling through making a Raspberry Pi 3B+ into a custom arcade button synth as a gift for my niece. Software synth is (www.fluidsynth.org/) that thankfully has a c library, for keyboard input to simulate button presses during development, and library to programmatically connect the arcade buttons to the synth. Arcade buttons are wired to the GPIO pins and speakers connected through the onboard headphone out. Me thinks it already works well enough to put a smile on my nieces face :) but this video will help me take these pursuits to the nth power in under 10 ms. Now that's real time :D I've studied music and computer science so naturally I wanted to lower the latency as low as it would go. I seem to have botched the use of jack on this go around and was generally flummoxed by this task of slimming down and/or optimizing the rpi environment for the purposes of realtime/low latency audio. I figured running without the GUI was a good place to start, but after that my ideas ran dry. I'm thrilled to have watched this informative video and find out that this is not only possible, but achievable on the cheaper rpi zero w! Can't wait to try!
Whew! Well that was fun! I'm all about using the console when I can. Anything to save those precious and limited resources on the Pi. I hope this helps and inspires you guys to make your own single-purpose musical Pi devices.
Great to know about those aliases! Wow! That would have saved me a lot of hassle originally :-) Definitely going to try that out next time. I'd love to try out that RealtimePi distro too! Thanks for the comment!
Great video. I’ve been doing similar configurations but I really like that you put in the extra effort to keep this as light weight and elegant as possible
Thank you finally someone is making this. It didn’t work so well for raspberry pi 3 (no plus) . Anyone has a solution for this, would be more than welcomed.
I'm going to try merging two guides of yours /headless sunvox for rpi and this one/ to accomplish headless synth and when I need to easy change any parameter in sunvox (like midi mapping etc.) just connect rpi to a screen via hdmi and do it! Thanks Marky for everything!
Hi Emorija! So sorry for the late response. I sometimes don't get all the comment notifications for some reason or another. My apologies. I'm very excited to hear about your idea on merging guides and creating something totally unique! That's what it's all about. You'll have to send me an update if you get something neat up and running. I'd love to hear about your progress.
Marky, thank you for the brilliant tutorial! If anyone is having issues with JACK, please look at your .jackrc and possibly you will have to change the -dhw argument to look like this this: /usr/bin/jackd -P70 -p16 -t2000 -dalsa -dhw:1,0 -p256 -n3 -r44100 -s & Thanks again!
Pretty cool! I've set this up on a raspberry pi 3 and an M-Audio FastTrack USB. Using RT raspian distro mentioned by HarryStylesXD. Right now I'm playing around with Jackd settings to minimize/eliminate xruns... Thanks for the great video!
Awesome man! Glad to hear. They can be a little tricky to get rid of. Sticking with 256 frames seems to do the job for me. It's not perfect latency, but good enough for most of the stuff I play. That is REALLY cool that there's an RT distro with the support right out of the box. What a time saver that would be! I'd love a distro for the Pi that's just geared around setting up the right Audio and MIDI devices right outta the gate. One of these days that might be a future project. Thanks for watching as always!
Marky Shaw Ya know, I was disappointed with the amount of xruns so I decided to redo with just the stock raspbian lite distro from rpi's website. Works a HELL of a lot better for me with the stock kernel as opposed to the RT kernel, at least that specific distro. Go figure.... Think I'l get another SD card and do some experimenting compiling a RT PREEMT kernel myself. I've been intending to do this for some time. Just been lazy I guess...
There are some errors in the blog written description: - ldconfig requires sudo prefix. - The reference to "usr/share/dbus/system.conf" should be to "usr/share/dbus-1/system.conf", These slowed me down a bit and I had to go back to the video to figure out what you actually did. Also, you could just use wget to download the required files rather than install "links" and browse for them. (That is what I did.) A question: Why bother with JACK? I got it all working with ALSA which must surely be lighter. For a single application system like this, one would have thought that JACK was an overhead that is not required. I even got fluidsynth working on the same raspberry pi using just ALSA which automatically mixed the audio and allows MIDI connections with aconnect. Thanks for a great set of videos and instructions. I was able to get this working in an evening. Now to case it all up...
@@whelanbdubs Sorry, I'm not sure this sounds right. ALSA is used anyway. JACK adds mixing, routing, etc. but sits on top of ALSA. My experience is that JACK does not mask any deficiency in the underlying interface and can add sufficient overhead to impact performance. JACK is a great layer for multiple audio client implementation but gives little benefit for single clients.
@@DJDiskmachine You can disable pulse audio and just use ALSA. Pulse and JACK each provide a layer which (amongst other things) serves multiple audio clients, mixing and routing signals. For a single audio application, performance can be improved by removing superfluous layers. I experience about 2% CPU usage by JACK on a Raspberry Pi 4. I would prefer those CPU cycles were doing something useful rather than adding a bit more latency and increased risk of xrun 😁.
@@brianwalton3151Thanks for your informed response. Why is the latency and quality considerably less with a straight ALSA configuration in sunvox? Funny enough, I can't get the JACK midi working with this config currently, and I am trying ALSA(so much easier to set up). Even though I'm running in the console, I'm still getting some pops and crackle, although light. My headless JACK config is much more solid. I would love for ALSA to be the champ here, it is plug and play essentially.
Absolutely awesome video as usual! Thanks a lot for the descriptions, you made a wonderful and easy to follow explanation. I have an old Rasp Pi from the first models. I'll try to see if this works on that old piece as a monophonic synth.
Will there be one on the latest Buster release? It looks like there are a couple questionable spots regarding permissions and dbus-1 instead of dbus within the usr/share.
May I ask you to create a general assembly together with SunVox, for the raspberry pi zero? Ready to install and use? Because not everyone will be able to repeat such a complex setting. But this is a very cool synthesizer on such a compact hardware. And if you want, you can arrange it for little money or for donate. What do you think?
This is awesome, well done! Q: Can I run this on Pi 4 that has the full gui loaded as well? Also how can I use my arduino I have connected to the Pi which has a 4x3 array of buttons (Arduino digital pins 4 to 11 set as a midi device) instead of an external keyboard?
Hey there! Absolutely. It runs much easier in the GUI honestly. I have some other older videos that go over the process with the standard version of Raspbian (non-lite) which you are welcome to checkout! Essentially it's just a matter of installing SunVox, installing libSDL, and setting up QJackCtl. The process is way easier. As far as using the Arduino, I'm not very experienced using them, however if the device you have basically just mimics keyboard strokes, then you might want to look in to the program "jack-keyboard" which allows you to send JACK MIDI events using a PC Keyboard. I have some more Pi Synth stuff on the way! Stay tuned my friend and thanks for visiting!
@@MarkyShaw Appreciate your response and the jackctl works well. How do I map a key on the jack-keyboard to say control the sustain or pitch or change the wave?
Hi Marky! Thanks for all of your work and putting up these cool projects. They really helped me get through the pandemic. I can't currently access the text that you have on your website that describes this process. Can you please update that? Thanks again!
Hey there Bryan! I'm super glad to hear that you enjoy the videos! I have been itching to get back to it! Dang life being all busy and what not! Hopefully soon! I totally had an old link to the blog on there when i was on a different website platform. I just went ahead and updated it back and have the original page restored again. I hope those instructions help! Give it a shot and let me know. I'm sure they could use some updating. But I'd be happy to assist if you need it. Thank you and happy holidays!
@@MarkyShaw happy holidays to you and thanks again for everything you do! I've got a pi zero 2 now and it's crazy what you can do with these versus the old ones. Hope you'll have new videos coming out in the future. Take care!
Super nicely done! Very interesting to run something like this on just a little Pi. I would rather use it with an audio input to add real-time effects to my guitar. My second thought is to get one of these small 7" tablets (x86 or ARM) and see if it also works. That way you also have a little screen so you can see a little bit more what's you're doing.
Nice guide, thx for putting this together! I am trying to get this running on a RPi 3 using an usb sound card. All works fine except: The first note played (whether with pc-keyboard or midi-keyboard, after a period of silence) does show up in SunVox immediately, however no sound or a very late sound (>1 sec) is produced. Can you give me a pointer where to look?
all seems fine up to the point where I run sunvox; it print some lines and the is stuck at the line sunvox v1.9.5d feb 20 2020 driver:alsa 32 bit floating-point sample rate: 44100 arch: arm OS: raspberry pi linux
Been messing with this all day , only just managed to get sunvox lo fi running , it’s slow as hell do you have an image I could download , I am useless at Linux
Hey there Jason! I seem to have had this problem once before with a particular version of SunVox that wasn't working so well. Try editing your your SunVox config file manually... nano ~/.config/SunVox/sunvox_config.ini Add the line "softrender" to the bottom of the file and save it. Try starting up SunVox and see if that helps! Let me know my friend. We'll get you working :-)
Marky Shaw cheers mate , I’ll try this , I need to get a usb sound card as well ,that’s gonna help a lot , gonna put this on the back burner for a while as I’ve just bought a novation circuit
You are a legend. This video is EXACTLY what I needed to find. I look forward to making this project and supporting you on Patreon.
I am currently stumbling through making a Raspberry Pi 3B+ into a custom arcade button synth as a gift for my niece. Software synth is (www.fluidsynth.org/) that thankfully has a c library, for keyboard input to simulate button presses during development, and library to programmatically connect the arcade buttons to the synth. Arcade buttons are wired to the GPIO pins and speakers connected through the onboard headphone out. Me thinks it already works well enough to put a smile on my nieces face :) but this video will help me take these pursuits to the nth power in under 10 ms. Now that's real time :D
I've studied music and computer science so naturally I wanted to lower the latency as low as it would go. I seem to have botched the use of jack on this go around and was generally flummoxed by this task of slimming down and/or optimizing the rpi environment for the purposes of realtime/low latency audio. I figured running without the GUI was a good place to start, but after that my ideas ran dry. I'm thrilled to have watched this informative video and find out that this is not only possible, but achievable on the cheaper rpi zero w! Can't wait to try!
i like your explanation, because it is showingme that you have the knowledge...not just copying some instructions from others. it is not common. Thanx
Thanks a lot for heavy lifting and doing this walkthrough! It's quite an achievement to get SunVox running without xorg.
Whew! Well that was fun! I'm all about using the console when I can. Anything to save those precious and limited resources on the Pi. I hope this helps and inspires you guys to make your own single-purpose musical Pi devices.
Great to know about those aliases! Wow! That would have saved me a lot of hassle originally :-) Definitely going to try that out next time. I'd love to try out that RealtimePi distro too! Thanks for the comment!
Great video. I’ve been doing similar configurations but I really like that you put in the extra effort to keep this as light weight and elegant as possible
"Links is the best web browser on the planet". The BEST statement on yt ever as links saved my life so many times!
Thank you finally someone is making this. It didn’t work so well for raspberry pi 3 (no plus) . Anyone has a solution for this, would be more than welcomed.
Thank you. I don't know why I was trying to run a2j instead of a2jmidid at boot and it failed. Your video was truly helpful.
I'm going to try merging two guides of yours /headless sunvox for rpi and this one/ to accomplish headless synth and when I need to easy change any parameter in sunvox (like midi mapping etc.) just connect rpi to a screen via hdmi and do it!
Thanks Marky for everything!
Hi Emorija! So sorry for the late response. I sometimes don't get all the comment notifications for some reason or another. My apologies. I'm very excited to hear about your idea on merging guides and creating something totally unique! That's what it's all about. You'll have to send me an update if you get something neat up and running. I'd love to hear about your progress.
Marky, thank you for the brilliant tutorial!
If anyone is having issues with JACK, please look at your .jackrc and possibly you will have to change the -dhw argument to look like this this:
/usr/bin/jackd -P70 -p16 -t2000 -dalsa -dhw:1,0 -p256 -n3 -r44100 -s &
Thanks again!
Pretty cool! I've set this up on a raspberry pi 3 and an M-Audio FastTrack USB. Using RT raspian distro mentioned by HarryStylesXD. Right now I'm playing around with Jackd settings to minimize/eliminate xruns... Thanks for the great video!
Awesome man! Glad to hear. They can be a little tricky to get rid of. Sticking with 256 frames seems to do the job for me. It's not perfect latency, but good enough for most of the stuff I play. That is REALLY cool that there's an RT distro with the support right out of the box. What a time saver that would be! I'd love a distro for the Pi that's just geared around setting up the right Audio and MIDI devices right outta the gate. One of these days that might be a future project. Thanks for watching as always!
Marky Shaw Ya know, I was disappointed with the amount of xruns so I decided to redo with just the stock raspbian lite distro from rpi's website. Works a HELL of a lot better for me with the stock kernel as opposed to the RT kernel, at least that specific distro. Go figure.... Think I'l get another SD card and do some experimenting compiling a RT PREEMT kernel myself. I've been intending to do this for some time. Just been lazy I guess...
There are some errors in the blog written description:
- ldconfig requires sudo prefix.
- The reference to "usr/share/dbus/system.conf" should be to "usr/share/dbus-1/system.conf",
These slowed me down a bit and I had to go back to the video to figure out what you actually did.
Also, you could just use wget to download the required files rather than install "links" and browse for them. (That is what I did.)
A question: Why bother with JACK? I got it all working with ALSA which must surely be lighter. For a single application system like this, one would have thought that JACK was an overhead that is not required. I even got fluidsynth working on the same raspberry pi using just ALSA which automatically mixed the audio and allows MIDI connections with aconnect.
Thanks for a great set of videos and instructions. I was able to get this working in an evening. Now to case it all up...
Thanks for the correction on the path to dbus!
Won't the application default to pulseaudio if you skip the Jack part?
You may have "got it working" with ALSA, but the glitches will be more apparrent and require a larger buffer.
@@whelanbdubs Sorry, I'm not sure this sounds right. ALSA is used anyway. JACK adds mixing, routing, etc. but sits on top of ALSA. My experience is that JACK does not mask any deficiency in the underlying interface and can add sufficient overhead to impact performance. JACK is a great layer for multiple audio client implementation but gives little benefit for single clients.
@@DJDiskmachine You can disable pulse audio and just use ALSA. Pulse and JACK each provide a layer which (amongst other things) serves multiple audio clients, mixing and routing signals. For a single audio application, performance can be improved by removing superfluous layers. I experience about 2% CPU usage by JACK on a Raspberry Pi 4. I would prefer those CPU cycles were doing something useful rather than adding a bit more latency and increased risk of xrun 😁.
@@brianwalton3151Thanks for your informed response. Why is the latency and quality considerably less with a straight ALSA configuration in sunvox? Funny enough, I can't get the JACK midi working with this config currently, and I am trying ALSA(so much easier to set up). Even though I'm running in the console, I'm still getting some pops and crackle, although light. My headless JACK config is much more solid. I would love for ALSA to be the champ here, it is plug and play essentially.
Can you do a video showing the setup of a raspberry Pi with Supercollider headless? Thanks! great video
sunvoxos - sounds great
Absolutely awesome video as usual! Thanks a lot for the descriptions, you made a wonderful and easy to follow explanation. I have an old Rasp Pi from the first models. I'll try to see if this works on that old piece as a monophonic synth.
Will there be one on the latest Buster release? It looks like there are a couple questionable spots regarding permissions and dbus-1 instead of dbus within the usr/share.
Fricking awesome video! gonna try this!
May I ask you to create a general assembly together with SunVox, for the raspberry pi zero? Ready to install and use? Because not everyone will be able to repeat such a complex setting. But this is a very cool synthesizer on such a compact hardware. And if you want, you can arrange it for little money or for donate. What do you think?
This is awesome, well done! Q: Can I run this on Pi 4 that has the full gui loaded as well? Also how can I use my arduino I have connected to the Pi which has a 4x3 array of buttons (Arduino digital pins 4 to 11 set as a midi device) instead of an external keyboard?
Hey there! Absolutely. It runs much easier in the GUI honestly. I have some other older videos that go over the process with the standard version of Raspbian (non-lite) which you are welcome to checkout! Essentially it's just a matter of installing SunVox, installing libSDL, and setting up QJackCtl. The process is way easier. As far as using the Arduino, I'm not very experienced using them, however if the device you have basically just mimics keyboard strokes, then you might want to look in to the program "jack-keyboard" which allows you to send JACK MIDI events using a PC Keyboard. I have some more Pi Synth stuff on the way! Stay tuned my friend and thanks for visiting!
@@MarkyShaw Appreciate your response and the jackctl works well. How do I map a key on the jack-keyboard to say control the sustain or pitch or change the wave?
Great video! Is it possible to add a shutdown command to the script when we quit sunvox? Thanks for these awesome videos, I have tried them all.
Hi Marky! Thanks for all of your work and putting up these cool projects. They really helped me get through the pandemic. I can't currently access the text that you have on your website that describes this process. Can you please update that? Thanks again!
Hey there Bryan! I'm super glad to hear that you enjoy the videos! I have been itching to get back to it! Dang life being all busy and what not! Hopefully soon! I totally had an old link to the blog on there when i was on a different website platform. I just went ahead and updated it back and have the original page restored again. I hope those instructions help! Give it a shot and let me know. I'm sure they could use some updating. But I'd be happy to assist if you need it. Thank you and happy holidays!
I forgot to mention that I updated the link in the description itself. It's a slightly different URL now.
@@MarkyShaw happy holidays to you and thanks again for everything you do! I've got a pi zero 2 now and it's crazy what you can do with these versus the old ones. Hope you'll have new videos coming out in the future. Take care!
Super nicely done! Very interesting to run something like this on just a little Pi.
I would rather use it with an audio input to add real-time effects to my guitar.
My second thought is to get one of these small 7" tablets (x86 or ARM) and see if it also works.
That way you also have a little screen so you can see a little bit more what's you're doing.
Thanks this is awesome. Saved me figuring all this config stuff out.
this seems awesome... so if we wanted to use a touch screen monitor, would we need to load the drivers as well
Nice guide, thx for putting this together! I am trying to get this running on a RPi 3 using an usb sound card. All works fine except: The first note played (whether with pc-keyboard or midi-keyboard, after a period of silence) does show up in SunVox immediately, however no sound or a very late sound (>1 sec) is produced. Can you give me a pointer where to look?
Solved. My (BT-)speaker goes into some kind of sleep mode after 5 sec's. Other speaker and solved!
It is very cool manual!!!
You really know your Linux, man! :-)
all seems fine up to the point where I run sunvox; it print some lines and the is stuck at the line
sunvox v1.9.5d feb 20 2020 driver:alsa 32 bit floating-point sample rate: 44100 arch: arm OS: raspberry pi linux
Very very nice video , it may help me a lot.
Can I use zero w to play sonic pi??
Been messing with this all day , only just managed to get sunvox lo fi running , it’s slow as hell do you have an image I could download , I am useless at Linux
Hey there Jason! I seem to have had this problem once before with a particular version of SunVox that wasn't working so well. Try editing your your SunVox config file manually... nano ~/.config/SunVox/sunvox_config.ini
Add the line "softrender" to the bottom of the file and save it. Try starting up SunVox and see if that helps!
Let me know my friend. We'll get you working :-)
Marky Shaw cheers mate , I’ll try this , I need to get a usb sound card as well ,that’s gonna help a lot , gonna put this on the back burner for a while as I’ve just bought a novation circuit
Very nice! Thank you!
I lost you at 5:40 what do i need to type to get there? im a noob in this sorry. :)