Hi,
On 08/03/16 16:25, jlistshit wrote:
Hi everyone, this is my first post here. I'm a composer from Berlin.
This question might have been asked before:
In PD vanilla: How can i detect jumps from negative to positive values in an
array?
I am using until with tabread, and just that little bit of porcessing, which
gives me a bang or a 1, when the phase changes, is missing.
Any insight appreciated and thank you in advance.
If you want the challenge and satisfaction of working it out for
yourself, don't look at the attached solution. A few hints:
a binary 0/1 message stream makes detecting transitions easier
[t f f] with crossed wires can act as a one-float-message delay line
you can use the cold right inlet of an object to store a value for later
Claude
--
http://mathr.co.uk
#N canvas 1 51 623 419 10;
#X obj 67 29 table \$0-tab;
#X obj 68 57 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X msg 68 102 100;
#X obj 68 124 until;
#X obj 68 165 f 0;
#X obj 105 164 + 1;
#X obj 68 77 t b b b;
#X msg 113 141 0;
#X obj 68 187 t f f;
#X obj 98 210 tabread \$0-tab;
#X obj 106 311 >;
#X obj 99 233 >= 0;
#X obj 99 255 t f f;
#X msg 211 286 1;
#X obj 68 339 spigot;
#X obj 68 366 print crossing-to-positive;
#X text 243 298 assumes value before table starts is 0;
#X text 243 280 reset accumulator (previous value);
#X text 144 233 convert signal to binary 0 1;
#X text 143 255 crossed wires from trigger act as a 1-message delay
;
#X text 137 317 keep only crossings from negative \, try != for both
ways;
#X text 110 115 generate table-size bangs;
#X text 146 141 reset counter;
#X text 138 166 counter idiom;
#X text 168 29 draw some wiggles in this table;
#X text 93 56 then detect zero-crossings;
#X connect 1 0 6 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 4 0 8 0;
#X connect 5 0 4 1;
#X connect 6 0 2 0;
#X connect 6 1 7 0;
#X connect 6 2 13 0;
#X connect 7 0 4 1;
#X connect 8 0 14 0;
#X connect 8 1 9 0;
#X connect 9 0 11 0;
#X connect 10 0 14 1;
#X connect 11 0 12 0;
#X connect 12 0 10 1;
#X connect 12 1 10 0;
#X connect 13 0 10 1;
#X connect 14 0 15 0;
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list