smoothing discontinuities in continuously writing buffer
Hi everyone,
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.
I'm working with a system that uses two buffers that are alternately filled by two record objects. Two play objects refer to these buffers. When buffer 1 is being written into, play object 2 plays and vice versa. The outputs from these play objects are crossfaded, triggered by the the sync outs from the record~ objects and edge~. I can post a somewhat messy and uncommented patch if you like…
Antialias, that sounds like a good solution. Would you mind posting your patch?
thanks!
plus the crossfader courtesy Gerhard Eckel
or build it based on tapin~ instead of buffer~.