[PD] msg problem: calculate 2 sinesum and normalize both

eni eni at mild.ch
Fri Jul 22 09:21:23 CEST 2005


hi list

I'm building a dynamic additive synth with sinesum-cosinesum.
but I've some problems with [sine

When pd (0.38-4-extended-RC1) calculates 2 sinesum and normalizes
them it seems that the order is rather important .

the following examples work (osx pd0.37-1)  as expected ,
in pd0.38-4 the first msg doesn't update the last array correctly .

[;
array1 sinesum 16 0 0.5 0 0.5 1;
array1 normalize 1;
array2 sinesum 16 0 0.5 0 0.5 1;
array2 normalize 1(

[;
array1 sinesum 16 0 0.5 0 0.5 1;
array2 sinesum 16 0 0.5 0 0.5 1;
array1 normalize 1;
array2 normalize 1(

I must use the order of the first msg.
In my solution I just bang the msg twice [t b b]
(works but isn't it a dirty-hack?)
I wonder if that needs more cpu???

an other (dirty)solution I thought was to delay the normalize but I 
couldn't figure out a deltime
which was stable 50ms sometimes display both array and sometimes not!

thanx eni


#N canvas 250 81 293 333 10;
#N canvas 0 22 450 300 graph1 0;
#X array out2 19 float 0;
#X coords 0 1 18 -1 128 128 1;
#X restore 45 154 graph;
#N canvas 0 22 450 300 graph1 0;
#X array out 19 float 0;
#X coords 0 1 18 -1 128 128 1;
#X restore 45 19 graph;
#N canvas 654 47 502 520 doesnt 0;
#X obj 57 148 t b b b b;
#X msg 57 260 \; out2 normalize 1;
#X msg 95 198 \; out normalize 1;
#X obj 18 295 t b b b b;
#X msg 18 407 \; out2 normalize 1;
#X msg 56 345 \; out normalize 1;
#X obj 18 129 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 57 129 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X text 82 127 <- calculate 2 (co)sinesum;
#X text 17 11 I have this behaviour(bug?) in pd-0.38-4-extended-RC1.app
in pd-0.37-1 it works fine as expected. (mac os x 10.3.8);
#X msg 76 229 \; out2 sinesum 16 0 -0.5 0 0.5 1;
#X msg 115 167 \; out sinesum 16 0 -0.5 0 0.5 1;
#X msg 76 314 \; out cosinesum 64 0 -0.9 -0.8 -0.7 -0.6 -0.5 -1;
#X msg 37 376 \; out2 cosinesum 64 0 -0.9 -0.8 -0.7 -0.6 -0.5 -1;
#X text 16 57 if you click once pd updates the size in both array but
the values of sinesum just in the first array. the second still has
its old values. if you click TWICE on the same bng both array have
the same curve.;
#X connect 0 0 1 0;
#X connect 0 1 10 0;
#X connect 0 2 2 0;
#X connect 0 3 11 0;
#X connect 3 0 4 0;
#X connect 3 1 13 0;
#X connect 3 2 5 0;
#X connect 3 3 12 0;
#X connect 6 0 3 0;
#X connect 7 0 0 0;
#X restore 186 36 pd doesnt;
#N canvas 0 22 490 508 doeswork 0;
#X obj 18 65 t b b b b;
#X msg 18 177 \; out2 normalize 1;
#X msg 36 145 \; out normalize 1;
#X obj 18 275 t b b b b;
#X msg 56 114 \; out2 sinesum 16 -1 -0.5 0 0.5 1;
#X msg 18 387 \; out2 normalize 1;
#X msg 36 356 \; out normalize 1;
#X msg 76 294 \; out cosinesum 64 0.9 -0.9 -0.8 -0.7 -0.6 -0.5 -1;
#X obj 18 253 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 18 41 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X msg 76 84 \; out sinesum 16 -1 -0.5 0 0.5 1;
#X msg 56 325 \; out2 cosinesum 64 0.9 -0.9 -0.8 -0.7 -0.6 -0.5 -1
;
#X connect 0 0 1 0;
#X connect 0 1 2 0;
#X connect 0 2 4 0;
#X connect 0 3 10 0;
#X connect 3 0 5 0;
#X connect 3 1 6 0;
#X connect 3 2 11 0;
#X connect 3 3 7 0;
#X connect 8 0 3 0;
#X connect 9 0 0 0;
#X restore 186 56 pd doeswork;





More information about the Pd-list mailing list