I really tried to get decent audio out of the Raspberry Pi

Discussion of all things Raspberry Pi / Raspberry Pi 2 related

Moderators: khz, MattKingUSA

User avatar
Digital Larry
Established Member
Posts: 135
Joined: Thu Jan 09, 2014 5:25 am

I really tried to get decent audio out of the Raspberry Pi

Postby Digital Larry » Sat Dec 07, 2019 7:26 am

Was using a Pi 3B model 1.2 or something along those lines. Just couldn't get rid of the audio glitching. First I tried Raspbian Buster, then I tried the Patchbox LL/RT OS and it didn't help enough. The bundled piano instrument demo sounded awful. I figured something must fundamentally be wrong with my setup, because it's hard to imagine someone promoting something that messed up. I did not try a different Pi. By the time I got to thinking about that I discovered I had a better option at hand.

I realized I had a 7 year old i5/4GB Macbook Pro sitting on the shelf gathering dust so I just put Ubuntu Studio 19.10 on it. Back to my SooperLooper and Hydrogen setup. Works great, no glitches or XRUNs at 48000/256/2 JACK settings.

I got some of the 2nd production run of Raspberry Pis way back when. I love the Raspberry Pi. I use them at work. I'm covered with them. But I didn't have a great time trying to get recordable audio out of one. I only spent a week or two though. Maybe there's something I overlooked?

I followed the instructions to turn off as much as I could, but I still needed the GUI and I still needed the network. Somebody seems to be using it with decent results. What's the secret?

Although, now that I'm on the Macbook, I'm less enamored of the 7" LCD I was using, as some application dialogs don't even fit, leaving you wondering what's on the lower half.

User avatar
Linuxmusician01
Established Member
Posts: 697
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland

Re: I really tried to get decent audio out of the Raspberry Pi

Postby Linuxmusician01 » Sat Dec 07, 2019 12:54 pm

Other than Kodi or Retropie a GUI and the Pi don't mix if you ask me... Having said that, Kodi delivers good audio via HDMI. The all new Pi 4 maybe powerful enough for running a GUI and applications at the same time, but those micro-HDMI ports would irritate the hell out of me (and it cannot run Retropie).

Love the Pi as a portable mediacenter and portable classic gaming machine though. I'm gonna take it with me again tonight to my friends house to watch movies and maybe to play some Combat from the Atari 2600. :wink:

User avatar
Digital Larry
Established Member
Posts: 135
Joined: Thu Jan 09, 2014 5:25 am

Re: I really tried to get decent audio out of the Raspberry Pi

Postby Digital Larry » Sat Dec 07, 2019 3:31 pm

Linuxmusician01 wrote:Other than Kodi or Retropie a GUI and the Pi don't mix if you ask me... Having said that, Kodi delivers good audio via HDMI. The all new Pi 4 maybe powerful enough for running a GUI and applications at the same time, but those micro-HDMI ports would irritate the hell out of me (and it cannot run Retropie).

Well, my first tests of Patchbox were indeed over HDMI as I was connected to the TV in the living room. I made some 30 second sine waves and faded the ends in Audacity, then imported 3 different frequencies of that into 3 loops of SooperLooper. Sine waves make glitches really obvious. I didn't hear any. Went downstairs to the "studio" and plugged in USB, ggerble-glick-poot-etc.

Now I gotta work on the Macbook Ubuntu Studio thing a bit as it is not exactly 100% glitch free. I think in that case it is largely a matter of removing unneeded services. It seemed like the screen saver/timeout monitor introduced a number of xruns for example. Someone also told me I should try very hard to get PulseAudio off, which qjackctl shows me is still there. I did get up at 1 AM and spent an hour silently recording my new magnum opus which is built up from 3 bass tracks going doot-doot-doot along with a jazzy little drum beat.

I realized that Hydrogen's released binary version does not include per note "probability" while building from top of tree source does. So I'll build hydrogen again! I'm getting good at building sooperlooper too. The Ubuntu Studio did not have the wxWidgets 2.8 libs in the repo, so I just went with 3.0 instead. Miraculously I did not have any compilation or runtime errors like I had on the Pi. I might go door to door today to see if anyone needs help compiling SooperLooper. You never know when people are struggling. :D

User avatar
Linuxmusician01
Established Member
Posts: 697
Joined: Mon Feb 23, 2015 2:38 pm
Location: Holland

Re: I really tried to get decent audio out of the Raspberry Pi

Postby Linuxmusician01 » Sun Dec 08, 2019 1:24 pm

Digital Larry wrote:Well, my first tests of Patchbox were indeed over HDMI as I was connected to the TV in the living room. I made some 30 second sine waves and faded the ends in Audacity, then imported 3 different frequencies of that into 3 loops of SooperLooper. Sine waves make glitches really obvious. I didn't hear any. Went downstairs to the "studio" and plugged in USB, ggerble-glick-poot-etc.

Now I gotta work on the Macbook Ubuntu Studio thing a bit as it is not exactly 100% glitch free. I think in that case it is largely a matter of removing unneeded services. It seemed like the screen saver/timeout monitor introduced a number of xruns for example. Someone also told me I should try very hard to get PulseAudio off, which qjackctl shows me is still there. I did get up at 1 AM and spent an hour silently recording my new magnum opus which is built up from 3 bass tracks going doot-doot-doot along with a jazzy little drum beat.

I realized that Hydrogen's released binary version does not include per note "probability" while building from top of tree source does. So I'll build hydrogen again! I'm getting good at building sooperlooper too. The Ubuntu Studio did not have the wxWidgets 2.8 libs in the repo, so I just went with 3.0 instead. Miraculously I did not have any compilation or runtime errors like I had on the Pi. I might go door to door today to see if anyone needs help compiling SooperLooper. You never know when people are struggling. :D

Thanks for the info. :)

merlyn
Established Member
Posts: 575
Joined: Thu Oct 11, 2018 4:13 pm

Re: I really tried to get decent audio out of the Raspberry Pi

Postby merlyn » Sun Dec 08, 2019 4:13 pm

I haven't tried low latency audio on a Pi, but I have had SonicPi playing back through HDMI without Xruns.

When you say 'glitches' are they actually reported as Xruns by JACK? Sometimes , after going through every setting and configuration -- it's the app. For example using MuseScore in loop there is a glitch every time the loop goes back to the beginning. This is not reported as an Xrun by JACK. (The MuseScore developers need to put in a 'de-clicking envelope').

I have heard the Pi 3 shares a bus between the USB and WIFI, so disabling WIFI is something to try.

Xruns -- The Good, The Bad and The Ugly

  • Acceptable
    OK, I lied -- Xruns are never good. But sometimes they're understandable when the CPU is maxed out. No matter how powerful a system is it can be made to Xrun by decreasing the buffer size, increasing the sample rate or adding more plugins.

  • Bad
    Getting Xruns at a low DSP load is bad, and may be fixed with configuration like prioritising IRQs. Sometimes it's the app -- VCV Rack will not run at a low latency on my system without Xruns, where other software e.g. TAL NoizeMak3r will.
    Xruns when recording must be avoided at all costs -- once they've been recorded there's no way to get rid of them. Xruns on playback can usually be got rid of by increasing the buffer size.

  • Ugly
    A kkkkkkkrrrttkk sound where there was meant to be audio.
Last edited by merlyn on Sun Dec 08, 2019 6:25 pm, edited 1 time in total.

User avatar
Digital Larry
Established Member
Posts: 135
Joined: Thu Jan 09, 2014 5:25 am

Re: I really tried to get decent audio out of the Raspberry Pi

Postby Digital Larry » Sun Dec 08, 2019 6:04 pm

Well, as usual I'm on to something else and set the Pi aside. But no, I could not make a correlation between xruns and glitches. I might try again some time in the future. At the moment I'm trying to figure out how to use this Pi with 7" LCD as an oscilloscope for my modular system. I'd use a cheapie USB audio dongle but for the fact that I want to watch control voltages so really want DC coupling on the input. There are some ADC boards, but... gotta resist the urge to go down another rabbit hole.


Return to “Raspberry Pi”

Who is online

Users browsing this forum: No registered users and 1 guest