hi Orm,
that is because ((xval * 1) + yval) * 0 is 0...
As already said, in this case math differs slightly:
$1 == xgain / ygain, $2 == ygain
Check the fixed example (ignore intermediate redrawings).
Ok, there is no vex documentation -- but I guess there are no vex users out there -- just me and a few others here... The main 'vexing' library has not been released yet (wonder if it ever be, now we have vasp to play with?). I released the 'vex' part with no docs, because it seemed to me easy to use, nearly self-explanatory.
Krzysztof
Orm Finnendahl wrote: ...
trying your above example, I can't make it work. Clicking in one of the two message boxes of the attached patch changes buf3 temporarily to buf1, before it switches to buf2. buf3 should display buf1 on receiption of )1 0] and buf2 on receiption of )0 1], right?
I couldn't find any documentation about vex so I'm at loss here.
#N canvas 530 247 450 564 10; #X obj 19 522 vex_form buf3; #N canvas 0 0 450 300 graph1 0; #X array buf1 10 float 1; #A 0 0 0.542855 0.171428 0.0857141 0.0857141 -0.799997 -0.65714 -0.399998 -0.499998 -0.614283; #X coords 0 1 9 -1 200 140 1; #X restore 229 7 graph; #N canvas 0 0 450 300 graph2 0; #X array buf2 10 float 1; #A 0 0 -0.685718 -0.671432 -0.571431 0.242858 0.471431 0.600003 0.614289 0.54286 0; #X coords 0 1 9 -1 200 140 1; #X restore 229 151 graph; #N canvas 0 0 450 300 graph3 0; #X array buf3 10 float 1; #A 0 0 -0.685718 -0.671432 -0.571431 0.242858 0.471431 0.600003 0.614289 0.54286 0; #X coords 0 1 9 -1 200 140 1; #X restore 229 295 graph; #N canvas 0 0 305 364 math 0; #X obj 98 77 moses 0.5; #X obj 156 192 -; #X msg 156 156 1; #X obj 187 265 pack; #X obj 156 227 /; #X obj 181 117 t b 0; #X obj 97 192 -; #X msg 97 156 1; #X obj 61 265 pack; #X obj 61 231 /; #X obj 61 117 t 0 b 0; #X obj 61 319 outlet; #X obj 187 320 outlet; #X obj 98 33 inlet; #X connect 0 0 10 0; #X connect 0 1 5 0; #X connect 1 0 4 0; #X connect 2 0 1 0; #X connect 3 0 12 0; #X connect 4 0 3 0; #X connect 5 0 2 0; #X connect 5 1 1 1; #X connect 5 1 4 1; #X connect 5 1 3 1; #X connect 6 0 9 1; #X connect 6 0 8 1; #X connect 7 0 6 0; #X connect 8 0 11 0; #X connect 9 0 8 0; #X connect 10 0 9 0; #X connect 10 1 7 0; #X connect 10 2 6 1; #X connect 13 0 0 0; #X restore 19 432 pd math; #X obj 19 247 vsl 30 128 0 1 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 0; #X floatatom 19 398 5 0 0 0 - - -; #X msg 19 467 gen concat buf1 , multiply $1 , add buf2 , multiply $2; #X msg 45 493 gen concat buf2 , multiply $1 , add buf1 , multiply $2; #X connect 4 0 7 0; #X connect 4 1 8 0; #X connect 5 0 6 0; #X connect 6 0 4 0; #X connect 7 0 0 0; #X connect 8 0 0 0;