Issues with a patch

Hi, I have a couple of problems with this patch which I just made. Firstly when I try to load it onto the owl I get bus error, however, if I load another patch and then go back and try to load it again, it seems to work.

Secondly, I get a clicking noise or static which repeats in time with the length of the delay, this also occurs on another delay patch I wrote and the Simple Delay, in patch library. I’m not sure if this is an issue with the code or a problem with noise from my pedal.

Thanks

I’m not sure what would be causing that. So the Simple Delay produces a periodic click for you on the device, with no input?
What block size are you running at, the default 128 samples per block?

In your patch you are initialising and resetting int playingIndex1 to 0, but then you have (line 104):
buf[i] = buf[i] + vol*loo1[playingIndex1++ -1];
where playingIndex1++ -1 will evaluate to 0-1 which is not so good. Use pre-increment instead: loo1[++playingIndex1 -1]. And make sure you initialise all member variables incl playing/recordingIndex2.

Okay, thanks I’ve changed that code, I still get the bus error when initially loading the patch I think it might be because The patch I have loaded in the first slot uses quit a lot of memory. I was running 1024 samples per block I did try taking it down to 128 but still get some noise, I don’t know if clicking is the right description necessarily but more like static interference that gets worse with more input.