Hello, I feel like I've been blowing the forum up recently, sorry if I'm coming across as needy
This seems like it would be discussed a lot online but I cannot find relevant advice on it despite some intensive searching.
I'm running a Pure Data audio patch on a RPi, with an external USB soundcard. The patch samples from an external microphone and plays back the sounds in a sequence to a beat. When this 'beat sequence' playback happens, it is routed and recorded as another discrete sound file. Recording and playback are triggered by buttons connected via an Arduino Nano and the pduino object.
As I've been working towards my deadline to finish the device and ship it, the patch has become more prone to a specific audio glitch where it freezes mid sound, kind of like a skipping CD. I've experienced this before on other projects but never this frequently! I would assume I am demanding more than I should of the RPi, but I don't feel like it's a particularly processing-heavy project.
Are there ways I can avoid this glitching/skipping/freezing, either by making changes within the patch or by somehow optimizing the way my RPi is set up and running? It's only required to run this patch, so I'm wondering if purging a load of unneeded software that came with the OS might help.
Here's the patch in case that is a useful reference (I have a few abstractions I've put in there):
Any advice gratefully received - I'm worried this won't be up to a usable standard if it keeps glitching out during use!