#N canvas 533 48 563 586 10;
#X obj 2 333 cnv 3 550 3 empty empty inlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 2 432 cnv 3 550 3 empty empty outlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 2 517 cnv 3 550 3 empty empty arguments 8 12 0 13 #dcdcdc #000000 0;
#X obj 101 343 cnv 17 3 57 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 101 407 cnv 17 3 17 empty empty 1 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 101 441 cnv 17 3 17 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X floatatom 275 202 5 0 0 0 - - - 0;
#X obj 228 283 tgl 18 0 empty empty empty 0 -6 0 8 #d0d0d0 #000000 #000000 0 1;
#X obj 2 555 cnv 15 552 21 empty empty empty 20 12 0 14 #e0e0e0 #202020 0;
#X obj 275 262 tgl 18 0 empty empty empty 0 -6 0 8 #d0d0d0 #000000 #000000 0 1;
#X obj 182 291 bng 15 250 50 0 empty empty empty 17 7 0 10 #d0d0d0 #404040 #000000;
#X text 173 343 -;
#X text 140 343 bang;
#X text 173 364 -;
#X text 133 364 float;
#X text 173 385 -;
#X text 139 385 list;
#X text 173 408 -;
#X text 133 408 float;
#X text 173 441 -;
#X text 133 441 float;
#X text 173 529 -;
#X text 115 529 1) float;
#X obj 275 285 bng 15 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 182 238 cyclone/trough 4;
#X obj 182 267 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 0 256;
#X obj 185 177 hsl 128 15 -99 99 0 0 empty empty empty -2 -8 0 10 #dcdcdc #000000 #000000 0 0;
#X obj 182 202 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X text 250 307 new trough;
#X obj 228 306 bng 15 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X text 353 214 and outputs it;
#X obj 135 201 bng 17 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X text 189 343 sends current 'trough' value to the left outlet, f 57;
#X text 188 385 2nd number sets new 'trough' \, then 1st element is input;
#X text 60 89 [trough] compares the input to a 'trough' (minimum) value. If it's smaller \, the input becomes the new trough and is sent out. The middle outlet sends 1 when a new trough is set and 0 otherwise. The right outlet sends 1 when the input is not smaller than the trough and 0 otherwise., f 75;
#X text 188 441 the current 'trough' (minimum) value, f 56;
#X text 313 199 <= sets new trough (minimum);
#X text 294 283 not a new trough;
#X text 187 529 initial 'trough' value (default 128);
#N canvas 323 43 581 417 list_input 0;
#X obj 130 294 tgl 18 0 empty empty empty 0 -6 0 8 #d0d0d0 #000000 #000000 0 1;
#X obj 181 294 tgl 18 0 empty empty empty 0 -6 0 8 #d0d0d0 #000000 #000000 0 1;
#X obj 79 297 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #fcfcfc #000000 #000000 0 256;
#X msg 118 206 30 20;
#X msg 96 141 60 70;
#X text 78 315 peak;
#X text 123 324 peak;
#X text 126 314 new;
#X text 175 324 peak;
#X text 172 314 not a;
#X text 75 327 value;
#X obj 96 260 cyclone/peak;
#X text 94 45 [trough] can take a list of two values as an input. In this case \, the 2nd value is set as a new trough value and output. Then \, the first value is input. Check the examples below:;
#X text 141 132 70 is set as a new trough and is output \, then 60 is sent to the object and comes out because it's lesser than the current trough and becomes the new trough value.;
#X text 164 195 20 is set as a new trough and is output \, then 30 is sent to the object but doesn't come out as it is greater than the current trough.;
#X connect 3 0 11 0;
#X connect 4 0 11 0;
#X connect 11 0 2 0;
#X connect 11 1 0 0;
#X connect 11 2 1 0;
#X restore 454 303 pd list_input;
#X text 188 364 a value to be compared with the 'trough' value, f 56;
#X text 188 408 sets new 'trough' value, f 55;
#X obj 101 466 cnv 17 3 17 empty empty 1 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 101 488 cnv 17 3 17 empty empty 2 5 9 0 16 #dcdcdc #9c9c9c 0;
#X text 173 466 -;
#X text 133 466 float;
#X text 173 489 -;
#X text 133 489 float;
#X text 188 466 1 (input is a new trough) / 0 (input is not a new trough);
#X text 188 489 1 (input is not a new trough) / 0 (input is a new trough);
#X text 61 139 Note: In Pd \, [cyclone/trough] only deals with floats \, not ints., f 69;
#X obj 4 3 ./header trhough;
#X text 25 62 Output numbers smaller than the previous;
#X text 89 266 current trough;
#X connect 6 0 24 1;
#X connect 7 0 29 0;
#X connect 9 0 23 0;
#X connect 24 0 25 0;
#X connect 24 1 7 0;
#X connect 24 2 9 0;
#X connect 25 0 10 0;
#X connect 26 0 27 0;
#X connect 27 0 24 0;
#X connect 31 0 24 0;
