Daisy Seed 6kHz oscillation noise in multi-effects pedal (Flick)

I’ve been working on a specialized Reverb+Delay+Tremolo pedal called the Flick ( GitHub - joulupukki/Flick: The Flick is a Reverb-Tremolo-Delay pedal based on Daisy Seed and written for the FunBox and Hothouse DSP platforms · GitHub ). It’s open source and works on both the Hothouse and FunBox. My sample rate is 48 kHz and block size is 8.

This week I was doing some other testing and cranked a couple of my tube amps to max and noticed an odd digital oscillation noise. When I loaded it into a spectrum analyzer (Pro-Q in Logic Pro), I noticed that it had a peak at 6 kHz. When I temporarily mod my code to be full passthrough (no DSP processing), the oscillation doesn’t happen.

Any ideas?

I’d try block size=4, to see if the noise goes up to 12kHz.

1 Like

Sure enough, it bumps it up to 12kHz.

Yeah, as I change the block size up or down, the oscillation moves the opposite direction.

Correction. Trying passthrough again shows me that the 6kHz spike is there, it’s just not as much as when I start processing controls and using the ADC.

So I’m wondering, is this due to the Daisy Seed’s DMA/codec timing? It seems like it’s getting added after the DAC so any notch filters I add in code can’t affect it. At lower playing volumes it’s not audible which is at least good, but if I push my amp into distortion, I start hearing it. Is this an inherent flaw in the Daisy’s hardware design and it needs better decoupling on the coded power pins or an improved ground plane separation between analog and digital sections? I dunno, grasping at straws here a bit.

I’ve been trying something that I think solves my particular problem.

Basically, I changed the hardware sample rate to 96kHz and the block size to 4. This puts the callback frequency at 24kHz (above hearing). Then, I process DSP every other sample, keeping the CPU usage down and effectively still have 48kHz. I read the hardware controls (knobs/etc) every 4th callback (same as original rate) and duplicate the samples to fill the 96kHz buffer.

All effect Init calls still use 48kHz and so far, so good!

I discovered that with 96kHz and a block size of 4, the CPU couldn’t keep up when doing harmonic tremolo. So … I changed the block size to 6. That moves the callback frequency to 16kHz and it’s a little lower in dB output and much better than the 6kHz noise.

More investigation into this problem. I changed the compiler to optimize for speed and also reworked some of my code to do less inside of the audio callback, especially inside the tight samples loop and now I have it all working with 96kHz sample rate and block size of 4. Hopefully, if someone else stumbles across this, it may help.