Distorted sound Patchbox OS

Hi, just finished installing the headless M8c application (Laamaa) on Patchbox OS. When i start the app (or any module) the sound comes out terribly distorted with lots of noise and crackles. On Raspbian it sounded clean and crisp, but due to issues with alsamixer, pulseaudio and jackd, i switched to Patchbox OS.
My settings are a samplerate of 44100, 512 and a setting of 3. No external audiocard (except Teensy 4.1). I’m using a Raspberry Pi4 with 2 gb.
I could buy the Pisound, but first i want to be sure that audio is gonna work before spending about 100 euros….

Take a close look at your power supply , even the official raspberry pi supply caused me trouble like you described

2 Likes

Thanks for answering. The power supply i’m using is a 5 volts 3 Amp model. What do you recommend ? Could i power the Raspberry Pi with a suitable powerbank ? The goal is to make a handheld Dirtywave M8 clone with a touchscreen.

Just adding some findings….
When playing PianoTeq with audio output set to Jack, there is also this distorsion and notes playing octaves below from what they supposed to sound. Switching over to Alsa the distorsion disappears and everything sounds crisp and clean. As for my M8c application this would be the solution, be it that i cannot route audio to Alsa since there is an input (M8/Teensy) and an output (headphones) , so i need Jack as a service.
Is the Teensy drawing so much power that it could cause the distorsion ?
Would like some help from users who succesfully installed M8 headless application

Update: outputting a test tone with PureData results in distorsion with Jack settings, clean tone with Alsa settings. Disconnecting Teensy has no effect, same results on a Raspberry Pi3B.

Hi, I’m having similar problems, a constant buzzing sound mixed in with the inputs. I switched power supply to an official raspberry pi one which seemed to help at first but now i’m back to this terrible buzz. Any recommendations for an appropriate power supply would be great, thanks

I’d recommend GitHub - jasonporritt/rg351_m8c: m8 headless for rg351 devices on an Anbernic RG351V.
This enclosure already contains buttons, battery, touchscreen, headphone out, even a speaker.
Works wonderfully.

Thanks ! I will give it a try and order one. In already own a Polyend Tracker, wich is a great device, but for even an more handheld experience i’ve looked at the M8 from Dirtywave, but they are so hard to get.
Merry Christmas !

Have you tried this, instead?

It runs perfectly on Patchbox OS. I’ll update it soon to convert it into a module.

Good luck

Yes, i tried your instructions to the letter. The M8 client runs perfectly, but not the sound. I don’t think the fault is in your repo, because choosing another module gives the same result, be it played through Jack. When played only through Alsa there is no distorsion. Could it be, that Alsa uses samplerates of 48000 and Jack (so also Teensy) needs 44100 and the process of resampling causes sound artefacts ? I’ve tried setting Alsa on 44100 but i get messages like “need 48000, get 44100” and more errors.
Just my guess…… Using PulseAudio i see an incoming signal, but there is no audible output. So thats also no solution so far….
But making a module for the M8c would be great ! Music trackers are the way to go in 2023 !

Sorry to hear that. I don’t think it’s sample rate related, because I can run on different sample rates, except when I connect my MC-101. In that case, I’m forced to use 44100.

If none of the modules work, I’m guessing it’s an audio configuration issue. What audio output are you using at the moment?

I though I was doing great with the module, but unfortunatelly I can’t install the module that I created. I hope someone can help me.

Well, i’m no software developer :wink:. For all i know now, is that outputting every music app in Patchbox via Jack is giving me distorsion. It’ s a kind of pulsating (around 100-120 hrtz ?) lower frequent added distorsion added to the signal. I upgraded Jackd, quite a lot of modifications were made, but no improvement whatsoever. As i mentioned before, Alsa is clean and distorsion free.
Anyway, thanks for spending time looking into my problem. I don’t want to reinstall Patchbox for the 3th or 4th time, so i try my luck with the Anbernic device …

I completely understand. I’m sorry you couldn’t find a solution. Maybe I was just lucky with my cheap USB sound card. Look, if you’re willing to try one last time, buy a cheap USB sound card (similar to mine) and see what happens. Mine costs around €12 on Amazon and worked straight out of the box with no distortion at all (and I didn’t have to make any major modifications to the OS).

Following all the instructions in my repo doesn’t take any longer than 30 minutes. I just tried this morning while testing my module.


Uploaded an audio example from a well known Swedish group, recorded with Audacity on my PC (line in from Raspberry Pi 4 headphone jack out, which is my sound device setup in Alsa), first with Jack chosen as output source, then following with Alsa as an output. So this is just Patchbox audio output, no M8 or Teensy involved. I will look into the audio card solution, i guess the digital ouput signal is converted to analog in the soundcard, so there will be no interfering from Jack ?

Lovely example :wink: I don’t think you’ll be able to easily find the culprit of that distortion. It could be pulseaudio clashing with jack, the audio configurations or something else. Maybe someone more experienced can help, but that’s out of my depth.

I’m using both jack and alsa with the USB audio card and everything runs fine. I disabled pulseaudio, but I didn’t have that distortion before anyway.

You’re so kind looking into and spending time on my problem ! I did a fresh Patchbox install, but same as before. In Alsamixer the M8c is visible, with jack_lsp -A there is no M8 capture or playback device visible, so with a start of m8c.sh i get these errors. Seems we have to ask the Blokas guys for help !

For now i’m looking forward on receiving my Anbernic RG351v and give that a try. And putting money aside for the real thing, a Dirtywave M8.
All the best wishes for 2023 !

No problem. I’m happy to help.

The alsamixer won’t show you M8’s playback or capture levels. You’ll only see the pcm level, but from my experience it doesn’t affect anything.

To enable the M8 playback and capture you’ll need to use alsa_in and alsa_out, followed by jack_connect, as you can see here. These commands, followed by the relevant options, will open the audio interfaces and connect the ins and outs. Without these commands you won’t be able to hear any sound coming from the M8.

Hope this helps clarifying things.

Wish you a fantastic 2023!

Hi,
I know I am resurrecting a month+ thread, but just letting you know that I followed @RowdyVoyeur excellent github tutorial too, using a Rpi3 model B and an inexpensive USB HS-100B audio interface from Amazon and I also get highly distorted and crackling audio. I have tried multiple USB sound cards as well, and get the same distorted result. Do you think this will only work well with a raspberry pi 4 B and up?

Sounds like you tested a lot of different things, but just to make sure - have you also tested different combinations of sampling rates, buffer sizes and periods?

After some experimentation to reduce latency, I found that only certain combinations yield good results. The rest can result in distorted sound. Here are some of my findings: m8c-rpi4/AUDIOGUIDE.md at main · RowdyVoyeur/m8c-rpi4 · GitHub

Thank you for responding, appreciate it.
Just so you know, I am using a Raspberry Pi 3b, a Teensy 4.1 Board, the above mentioned USB soundcard and nothing else. I have no need to connect external midi devices at all for now.

In answer to your question, I have indeed tested multitudes of sampling rates, buffer sizes and periods combinations. I have found that I can get the underlying audio beneath the crackle sounding pretty clear. If the crackle wasn’t there it would be excellent.

So now I have moved on to looking at the m8c.sh file and commenting out everything I see that contains reference to MC101 but that causes all audio to be cut out, I can’t hear anything. If I then uncomment the below I can hear audio but it crackles again.
alsa_in -j “MC101out” -d hw:CARD=MC101,DEV=0 &
sleep 1
I wonder if the crackle has something to do with the midi connection options.
By the way, I barely can make my way around linux, just enough to be horribly dangerous :g

Before sending in this topic, i tested the combination Raspberry Pi and Teensy with a model 3B and 4. Same results….Also every kind of setting, no luck. Finally, i bought an Anbernic RG351v and followed Jason Porrits github. Easy install and worked like a charm. Crisp, hi fidelity sound through the headphone jack. Ditched the Py for other hobby purposes.