[PD] audio buffer-swapping

Greg gkjoyce at gmail.com
Mon Jan 5 23:38:56 CET 2009


I'm not sure if that's the right term for what I'm trying to do.
But what I'm looking for is a way to rewrite a sample very quickly, so
say have some sample you are working with.
Now, you want to work with a different sample, say after a very small
fade-out fade-in (<100ms) or "instantly" in performance terms.
Whether it's a file operation or capturing from dac~ this can't work
with a single array.  I think this could work well having a 1 / 0
switch where you swap your write array and read array.  So you would
bang something and arrayB is where you read from and arrayA is where
you read from, you bang it again and it switches again.
Is there a more elegant way to do this?
Also, I'm not sure how this approach would work, for example if you
had expr generating small curves for use as envelopes of grains that
you wanted to mutate over time.




More information about the Pd-list mailing list