Forums > MaxMSP

smoothing discontinuities in continuously writing buffer

April 23, 2014 | 9:50 am

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.

– Pasted Max Patch, click to expand. –

April 23, 2014 | 11:34 am

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…


April 23, 2014 | 11:38 am

Antialias, that sounds like a good solution. Would you mind posting your patch?
thanks!


April 23, 2014 | 3:06 pm

here you go– attaching all necessary abstractions and 3rd parties i think…


April 23, 2014 | 4:37 pm

plus the crossfader courtesy Gerhard Eckel

Attachments:
  1. crossfader.maxpat

April 23, 2014 | 7:15 pm

or build it based on tapin~ instead of buffer~.


Viewing 6 posts - 1 through 6 (of 6 total)