#N canvas 0 22 546 497 10; #X text 323 467 updated for Pd version 0.26; #X obj 69 137 select 1 2; #X floatatom 69 109 0 0 0 0 - - -; #X obj 69 203 print select-1; #X obj 101 183 print select-2; #X obj 134 160 print select-3; #X floatatom 295 111 0 0 0 0 - - -; #X obj 295 144 pack; #X obj 295 171 route 1 2; #X obj 335 120 t b f; #X floatatom 335 96 0 0 0 0 - - -; #X obj 353 199 unpack; #X floatatom 295 199 0 0 0 0 - - -; #X floatatom 324 199 0 0 0 0 - - -; #X floatatom 353 222 0 0 0 0 - - -; #X floatatom 391 223 0 0 0 0 - - -; #X text 12 9 Pd provides at least four objects for doing conditioonal computations. The "select" object tests its input against its argumt(s) \, and outputs "bang" when they match. The "route" object works similarly but also copies data. In other wors \, "route" takes a list \, tests its first element \, and conditionally passes on the rest of the list. ; #X text 38 251 You also get "spigot" which turns a flow of messages on and off (like the Gate object in Max \, but with the inputs reversed): ; #X floatatom 107 305 0 0 0 0 - - -; #X obj 107 330 spigot; #X floatatom 144 305 0 0 0 0 - - -; #X floatatom 107 354 0 0 0 0 - - -; #X text 174 306 <-- nonzero to open; #X text 139 354 if open \, messages coming in at left are sent to output. ; #X text 37 385 And finally \, "moses" sends numbers to the left if they're less than the argument \, right otherwise:; #X floatatom 107 416 0 0 0 0 - - -; #X floatatom 107 465 0 0 0 0 - - -; #X obj 107 441 moses 5; #X floatatom 151 465 0 0 0 0 - - -; #X connect 1 0 3 0; #X connect 1 1 4 0; #X connect 1 2 5 0; #X connect 2 0 1 0; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 8 0 12 0; #X connect 8 1 13 0; #X connect 8 2 11 0; #X connect 9 0 7 0; #X connect 9 1 7 1; #X connect 10 0 9 0; #X connect 11 0 14 0; #X connect 11 1 15 0; #X connect 18 0 19 0; #X connect 19 0 21 0; #X connect 20 0 19 1; #X connect 25 0 27 0; #X connect 27 0 26 0; #X connect 27 1 28 0;