smoothing discontinuities in continuously writing buffer

    Apr 23 2014 | 4:50 pm
    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
    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.

    • Apr 23 2014 | 6:34 pm
      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…
    • Apr 23 2014 | 6:38 pm
      Antialias, that sounds like a good solution. Would you mind posting your patch? thanks!
    • Apr 23 2014 | 10:06 pm
      here you go-- attaching all necessary abstractions and 3rd parties i think...
    • Apr 23 2014 | 11:37 pm
      plus the crossfader courtesy Gerhard Eckel
    • Apr 24 2014 | 2:15 am
      or build it based on tapin~ instead of buffer~.