[PD] Displace an array

Frank Barknecht fbar at footils.org
Tue Aug 22 13:35:55 CEST 2006


Hallo,
raul diaz hat gesagt: // raul diaz wrote:

> I have a table which contains a wavelet waveform which is not symmetric.
> I need to displace this waveform to the right in order to make the waveform
> symmetric.
> Somebody knows how to displace to the right an array a specify number of
> samples?

Dump the original table sample by sample then write each sample to a
shifted position in a different table. See attached patch.

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__
-------------- next part --------------
#N canvas 236 59 630 394 10;
#N canvas 0 0 450 300 graph1 0;
#X array shiftme 100 float 2;
#X coords 0 1 99 -1 200 140 1;
#X restore 109 44 graph;
#X obj 366 95 f 100;
#X obj 366 72 t b a;
#X obj 366 232 tabread shiftme;
#X obj 473 295 mod 100;
#X obj 366 187 t a a;
#X obj 475 275 +;
#X obj 366 326 tabwrite shifted;
#N canvas 0 0 450 300 graph1 0;
#X array shifted 100 float 2;
#X coords 0 1 99 -1 200 140 1;
#X restore 109 204 graph;
#X floatatom 366 47 5 0 0 0 - - -;
#N canvas 0 0 390 272 count-to-x 0;
#X obj 69 167 f 0;
#X obj 99 166 + 1;
#X obj 69 126 until;
#X msg 108 125 0;
#X obj 69 59 inlet;
#X obj 69 201 outlet;
#X text 134 79 counts from 0 to incoming number;
#X obj 69 85 t a b;
#X connect 0 0 1 0;
#X connect 0 0 5 0;
#X connect 1 0 0 1;
#X connect 2 0 0 0;
#X connect 3 0 0 1;
#X connect 4 0 7 0;
#X connect 7 0 2 0;
#X connect 7 1 3 0;
#X restore 366 139 pd count-to-x;
#X obj 366 115 t a a;
#X text 426 95 size of table is 100;
#X text 23 103 paint here:;
#X connect 1 0 11 0;
#X connect 2 0 1 0;
#X connect 2 1 6 1;
#X connect 3 0 7 0;
#X connect 4 0 7 1;
#X connect 5 0 3 0;
#X connect 5 1 6 0;
#X connect 6 0 4 0;
#X connect 9 0 2 0;
#X connect 10 0 5 0;
#X connect 11 0 10 0;
#X connect 11 1 4 1;


More information about the Pd-list mailing list