Hi!
I'm making a synth editor for the PD synth API. I'm finding that when using the LFO for amplitude modulation I get a lot of clicks and pops when playing back the sample.
To reproduce the issue:
run the PDX below
Enable vibrato. Use the dpad to navigate to the top right on-off switch and press A or crank forwards.
Set vibrato depth to 1 by highlighting the depth control using the dpad and cranking forwards.
Press B to play back the synth occasionally. Listen for pops while it plays back, they should be quite common.
Experiment with different vibrato wave types by highlighting the wave selector on the vibrato module and either pressing A or cranking to change the LFO wave type. PDFXR.pdx.zip (127.4 KB)
The only workaround I'm aware of (and bear in mind I haven't actually tried this out) would be to use playdate->sound->channel->addCallbackSource to create your own source, and do all of the raw audio generation, mixing, and effects processing yourself. That however would be like using a rocket launcher to kill a mosquito, because you're basically writing your own audio driver and you give up most of the advantage of using the Playdate sound API in the first place!
I agree this issue needs to be addressed for volume modulators to be of proper use, because without it there will always be nasty clicks and pops the moment you change a channel's volume to any significant degree.
Actually, I just realized my last post isn't correct. You could write a custom SoundEffect and use that to adjust a channel's volume smoothly, since those have the ability to modify every sample that's coming through the channel. That probably wouldn't be very hard to do. Then you could still use the rest of the Playdate audio API, with the exception of the bits for controlling volume, and instead of those you'd keep a channel at full volume and only adjust its volume using your SoundEffect.