[PD] recording to array in loop mode?

Frank Barknecht fbar at footils.org
Tue Jan 19 13:05:04 CET 2010


Hallo,
Frank Barknecht hat gesagt: // Frank Barknecht wrote:

> Mike Moser-Booth hat gesagt: // Mike Moser-Booth wrote:
> 
> > If I'm not mistaken, I believe the trick to getting this to work is to  
> > make sure the array size is a multiple of the block size. [tabwrite~]  
> > conforms to block boundaries, to if you bang it in the middle of a  
> > block, it won't begin writing until the end of the block. That's  
> > probably where the clicks are coming from.
> 
> The actual size of the array doesn't matter: If you have for example an array
> of size 300, you could record and playback only the first 256 samples (4*64)
> with block-quantized objects. Just ignore the last 44 samples. 

Anyway, attached is a tabwrite~-based looping recorder. I use a [bang~] based
metro to start recording there, and some DSP order forcing to make sure, the table
is written before it is read to be able to get a delay time of zero as well.

Ciao
-- 
Frank
-------------- next part --------------
#N canvas 173 114 659 491 10;
#X floatatom 228 81 5 0 0 0 - - -;
#X obj 228 295 dac~;
#X obj 228 272 *~ 0;
#X obj 270 270 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 6600 1;
#X obj 445 141 table \$0-x 6400;
#X floatatom 348 71 5 0 0 1 blocks - -;
#X obj 368 139 timer;
#X obj 368 120 t b b;
#X obj 368 163 change;
#X floatatom 368 186 5 0 0 0 - - -;
#N canvas 0 0 453 361 blockmetro 0;
#X obj 151 93 bang~;
#X obj 151 139 f;
#X obj 185 139 + 1;
#X obj 151 167 mod 1;
#X obj 263 88 inlet;
#X obj 263 113 max 1;
#X obj 151 259 outlet;
#X obj 151 193 select 0;
#X connect 0 0 1 0;
#X connect 1 0 3 0;
#X connect 2 0 1 1;
#X connect 3 0 2 0;
#X connect 3 0 7 0;
#X connect 4 0 5 0;
#X connect 5 0 3 1;
#X connect 7 0 6 0;
#X restore 348 92 pd blockmetro;
#X obj 228 101 osc~ 200;
#N canvas 0 0 450 300 write 0;
#X obj 122 65 inlet~;
#X obj 256 63 inlet;
#X obj 123 230 outlet~;
#X obj 123 140 tabwrite~ \$0-x;
#X connect 0 0 3 0;
#X connect 1 0 3 0;
#X restore 228 125 pd write;
#N canvas 0 0 450 300 read 0;
#X obj 122 65 inlet~;
#X obj 256 63 inlet;
#X obj 123 230 outlet~;
#X obj 122 110 tabplay~ \$0-x;
#X obj 210 159 timer;
#X floatatom 210 183 8 0 0 0 - - -;
#X obj 210 140 t b b;
#X connect 1 0 3 0;
#X connect 3 0 2 0;
#X connect 3 1 6 0;
#X connect 4 0 5 0;
#X connect 6 0 4 0;
#X connect 6 1 4 1;
#X restore 229 167 pd read;
#X text 437 119 buffer of 100 blocks of size 64 each;
#X text 30 114 DSP order forcing;
#X text 17 139 See G04.execution.order.pd;
#X connect 0 0 11 0;
#X connect 2 0 1 0;
#X connect 2 0 1 1;
#X connect 3 0 2 1;
#X connect 5 0 10 0;
#X connect 6 0 8 0;
#X connect 7 0 6 0;
#X connect 7 1 6 1;
#X connect 8 0 9 0;
#X connect 10 0 7 0;
#X connect 10 0 12 1;
#X connect 10 0 13 1;
#X connect 11 0 12 0;
#X connect 12 0 13 0;
#X connect 13 0 2 0;


More information about the Pd-list mailing list