#N canvas 396 52 561 593 10;
#X declare -stdpath ./;
#X obj 5 566 cnv 15 552 21 empty empty empty 20 12 0 14 #e0e0e0 #202020 0;
#X obj 5 408 cnv 3 550 3 empty empty inlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 5 463 cnv 3 550 3 empty empty outlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 84 419 cnv 17 3 36 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 84 473 cnv 17 3 17 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X text 129 418 signal;
#X text 129 472 signal;
#X obj 84 497 cnv 17 3 17 empty empty 1 5 9 0 16 #dcdcdc #9c9c9c 0;
#X text 129 497 signal;
#X obj 162 242 cyclone/zerox~;
#X obj 5 529 cnv 3 550 3 empty empty arguments 8 12 0 13 #dcdcdc #000000 0;
#X text 118 540 1) float;
#X text 99 439 set <float>;
#X text 183 439 - set impulse value sent to right outlet;
#X msg 221 206 set 0.5;
#X msg 217 182 set 1;
#X obj 162 181 osc~ 1;
#X obj 106 279 cyclone/snapshot~ 1;
#X obj 106 310 vsl 20 80 -1 1 0 0 empty empty empty 0 -9 0 10 #dcdcdc #000000 #000000 0 1;
#X text 131 383 -1, f 3;
#X text 134 301 1, f 3;
#X text 134 344 0;
#X text 75 88 [zerox~] functions as a zero-crossing detector and/or a zero-crossing counter (for transient detection).;
#X text 76 122 Left outlet outputs a value that corresponds to the number of zero crossings per signal block - so it depends on the block size. Right outlet send an impulse at every zero crossing.;
#X text 183 418 - signal to be analyzed;
#X text 191 539 - float sets impulse value from 0-1 (default 1);
#X text 182 497 - a click (impulse) whenever a zero-crossing is detected;
#X text 182 472 - the number of zero crossings per signal block;
#N canvas 654 222 447 359 frequency 0;
#X obj 254 78 loadbang;
#X obj 254 100 samplerate~;
#X obj 168 226 *~ 0.5;
#X obj 117 139 cyclone/zerox~ 1;
#X obj 117 89 osc~ 1000;
#X obj 168 254 cyclone/snapshot~ 1;
#X floatatom 254 150 0 0 0 0 - - - 0;
#X obj 168 194 *~;
#X text 200 193 multiply by block frequency;
#X text 212 226 half the zero crossings;
#X text 240 294 frequency estimate;
#X text 52 22 An example on how to use [zerox~] to estimate frequency;
#X obj 254 124 / 64;
#X obj 168 293 nbx 6 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X connect 0 0 1 0;
#X connect 1 0 12 0;
#X connect 2 0 5 0;
#X connect 3 0 7 0;
#X connect 4 0 3 0;
#X connect 5 0 13 0;
#X connect 6 0 7 1;
#X connect 7 0 2 0;
#X connect 12 0 6 0;
#X restore 448 314 pd frequency \; estimate;
#N canvas 326 74 413 397 transient 0;
#X obj 146 91 adc~ 1;
#X obj 145 223 vsl 20 128 0 32 0 0 empty empty empty 0 -9 0 10 #dcdcdc #000000 #000000 0 1;
#X text 88 26 Look at the difference between "ssss" and "aaa" or any noisy/transient input as opposed to a tonal and stable one., f 38;
#X obj 146 123 cyclone/zerox~;
#X obj 145 158 cyclone/snapshot~ 1;
#X obj 145 183 nbx 6 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X connect 0 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 5 0 1 0;
#X restore 449 357 pd transient \; detection;
#X obj 499 69 cyclone/dsponoff~;
#X obj 243 323 output~;
#X obj 2 3 ./header zerox~;
#X text 24 59 Detect zero crossings;
#X obj 288 268 declare -stdpath ./;
#X connect 9 1 31 0;
#X connect 14 0 9 0;
#X connect 15 0 9 0;
#X connect 16 0 9 0;
#X connect 16 0 17 0;
#X connect 17 0 18 0;
