[PD] retrigger [tabread4~] sampler without clicks
morph_2016 at yahoo.co.uk
Thu May 15 20:48:08 CEST 2014
An alternative method is to delay the audio by 5ms at all times. Then, when a transition occurs, do a very fast fade out/fade in with vline:
[delwrite~ $0-thisbuffer 5]
[delread~ $0-thisbuffer 5]
| [r changeChunk]
| [0 5, 1 3.5 6.5(
The reasoning behind the value of 3.5 for the fade in and 6.5 for the delay:
A block of samples is 64 samples, or just over 1.41ms at 44.1KHz sample rate. Changing the sample or position of tabread4~ probably involves some non-signal rate processing, and that could happen any time between 0 and 1.41etc ms after the position or sample is changed. So if we wait an extra 1.5ms plus the 5ms delay before fading back in, we definitely will not get the click.
Works for me! The next Ninja Jamm update will contain this fix.
Ninja Jamm - a revolutionary new music remix app from Ninja Tune and Seeper, for iPhone and iPad
Gemnotes-0.2: Live music notation for Pure Data, now with dynamics!
On Tuesday, 22 April 2014, 17:08, Miller Puckette <msp at ucsd.edu> wrote:
Hi Federico -
>tabread4~ doesn't interpolate between values of the input signal, or to put
>it another way, whast it does as a result of any input sample has no effect
>on what it will do on the next one. (It interpolates across the values of
>the table instead.)
>One pretty good way to deal with discontinuities when moving discontinuously
>between samples is described here:
>On Tue, Apr 22, 2014 at 01:00:49PM -0300, Federico Galland wrote:
>> I'm working on a granular sampler borrowing parts of the patch on pd-tutorial (http://www.pd-tutorial.com/english/ch03s07.html).
>> Everything works smoothly except for one little annoying problem. If I fire the sample before the last one is through, sometimes I get a click at the beggining of the playback.
>> This is happening on a percussive sound (rapid envelope attack) so I'm guessing it's got something to do with [tabread4~] failing to interpolate between whatever the last amplitude value was and the first wavetable value.
>> This http://crca.ucsd.edu/~msp/techniques/latest/book-html/node63.html can probably be used to solve my problem, but I can't figure out how (or where in the patch) I should implement it.
>> Any clues would be greatly appreciated.
>> Thanks a lot, and have a good one.
>> ps. I tried to comment the patch to make it understandable. It is still, however a work in progress. Let me know of any questions.
>> Federico Galland <federicogalland at gmail.com>
>> Pd-list at iem.at mailing list
>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>Pd-list at iem.at mailing list
>UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
More information about the Pd-list