I'm building an effect that writes live audio input from a saxophone to a [buffer~] continuously and then outputs grains of varying size (using Nathan Wolek's [grain.pulse~] from his granular toolkit http://www.nathanwolek.com/tag/granular-toolkit/).
The problem is that if a new grain is selected and it happens to be where the buffer is writing, there could be huge jumps in amplitude/across zero crossings and create audible pops.
I've used this effect before but in pieces that didn't have continuous sound coming in (IE percussion pieces) so the effect was masked or not an issue.
I'm at a loss to think of an elegant way to get random sized grains and while smoothing the discontinuity in the continuously-updating buffer…any ideas?
Sample attached with [bpatcher demosound] as input.