You've already forked torvalds-GuitarPedal
mirror of
https://github.com/torvalds/GuitarPedal.git
synced 2026-07-15 00:44:11 +00:00
I was debugging the slight crackling noise when turning the effect selector knob wildly around, and realized that it has nothing to do with the display power changes: it appears that it was just because I had been testing with a build that was set for 96kHz audio samples, and calling the init function was simply sometimes enough to overload the poor CPU even with just a couple of effects enabled. And turning the effects knob with all the subtlety of an angry stone-mason on crack - as I was doing for testing - just ended up doing the more expensive init code for effects that weren't even enabled as I was scrolling through them all. So I'll leave the extra caps in the design because they won't hurt, but the real fix is to (a) not do that 96kHz audio because we really just don't have the CPU resources for it and (b) be a tiny bit smarter about calling the effect init function. Side note: the 96kHz sample rate does work, but right now both the USB audio interface code and the FFT for the tuner are hardcoded for 48kHZ. Both of those should be easy to fix: the FFT is easy enough to just change to do a 8x downsampling, and the USB audio could either downsample the signal or it would just expose a 96kHz end result. The "not really enough CPU resources" could be fixed too, by just having a "High Res" mode that limits the effect selection. Not that it makes much sense for any of the current effects to do a higher sampling rate, but I was looking at some of the more extreme fuzz effects, and it looks like emulating them might actually benefit from maybe doing it at 96kHz because otherwise you get nasty digital effects. Maybe. Anyway, false alarm on the sound quality just from an experiment I had forgotten about. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>