Crunchy/clippy sound plays during playback

setup: Raspberry Pi running 3.2.2 (systems are still 32 bit for now).
Student’s track, when playing back starts to get “crunchy” with pops and clicks. I’ve had this happen before and restarting Sonic Pi usually fixes the issue. I assume it’s a resource backup problem. We restarted SP and that didn’t fix it, so we rebooted the RPi. Running no other software on the desktop, the sound returns after about 15-20 seconds of playback, repeatably.

Load average: 3.75 2.17 1.07

There are CPU spikes, but nothing is sitting at 100% for more than a moment.
Memory usage is around 14%.
VNCserver is running and that’s how she’s connecting. A local USB headset.
What suggestions do you have?
She is using a bunch of external (very small) samples, each assigned to a variable and those variables are put in a list for sample playback.

Do you have the issue when running directly from the Pi, so no VNC and no USB headset?

I have not tried to direct connect their RPis to a monitor.
I’m running SP on my Windows 10 machine and every now and then I get the same sound as well, same USB headset, that always corrects when I restart SP.
I’ll note, I was recording a track from SP when I realized it was making the poppy sound and the recording captured that as well.
To be clear, the USB headset is connected TO the RPi.

Can you try ditching the USB headset and using some plane old headphones on the audio out of the Raspberry Pi?

We did not. I’ll have to give that a shot. She was able to capture a recording and the unit has moved on for her, but I’ll do testing. I’ve rarely used an analogue connection with SP, so I can’t talk about my previous experience.
I’m also hoping that the new setup for next year with the 64bit and v4 of SP might make a difference… unless 5 comes out by then :wink: