#N canvas 420 85 558 562 10;
#X obj 2 302 cnv 3 550 3 empty empty inlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 2 399 cnv 3 550 3 empty empty outlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 2 453 cnv 3 550 3 empty empty arguments 8 12 0 13 #dcdcdc #000000 0;
#X obj 78 311 cnv 17 3 17 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 78 408 cnv 17 3 17 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 78 333 cnv 17 3 60 empty empty 1 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 2 542 cnv 1 550 1 empty empty empty 0 0 0 4 #fcfcfc #fcfcfc 0;
#X obj 2 521 cnv 15 552 21 empty empty empty 20 12 0 14 #e0e0e0 #202020 0;
#X obj 303 268 print unchanged;
#X text 134 312 anything;
#X text 134 363 anything;
#X text 134 408 anything;
#X obj 78 429 cnv 17 3 17 empty empty 1 5 9 0 16 #dcdcdc #9c9c9c 0;
#X text 134 429 anything;
#X text 98 333 set <anything>;
#X text 92 462 1) float/symbol;
#X text 92 479 2) float/symbol;
#X text 192 428 - the input message if no substitution occurred;
#X msg 312 198 set 5 10;
#X msg 287 150 this that;
#X obj 138 237 cyclone/substitute that this;
#X obj 138 267 print substituted;
#X text 92 497 3) float/symbol;
#X text 52 91 [substitute] exchanges an element (the first argument) in an input message to another one (second argument).;
#X text 190 312 - any message to have elements substituted or not;
#X text 192 408 - the substituted message if a substitution occurred;
#X text 192 462 - the match element that should be replaced (default 0);
#X text 192 479 - the replacement for the match (default 0);
#N canvas 761 94 470 284 first_only 0;
#X text 80 19 [substitute] will replace all recurring elements in a message \, but if you have a 3rd argument \, it operates in "first only" mode \, where only the first element is replaced., f 53;
#X obj 248 134 cyclone/substitute foo bar 1;
#X obj 64 134 cyclone/substitute foo bar;
#X obj 64 192 cyclone/prepend set;
#X obj 248 191 cyclone/prepend set;
#X msg 248 227 bang;
#X msg 64 227 bang;
#X msg 248 90 foo 1 foo 2 foo 3;
#X obj 258 162 loadbang;
#X connect 1 0 4 0;
#X connect 2 0 3 0;
#X connect 3 0 6 0;
#X connect 4 0 5 0;
#X connect 7 0 1 0;
#X connect 7 0 2 0;
#X connect 8 0 4 0;
#X connect 8 0 3 0;
#X restore 452 256 pd first_only \; mode;
#X msg 138 168 1 2 3 4 5;
#X msg 115 145 5 5 5 4 4 4;
#X msg 303 174 4 5;
#X text 192 497 - any float or symbol sets susbtitute to "first only" mode;
#X text 190 333 -;
#X text 202 333 set followed by 2 items sets the 1st element to be substituted by the 2nd (other elements are ignored);
#X text 190 363 -;
#X text 202 364 sets the 1st element to be substituted by the 2nd \, other elements are ignored (basically the same as "set");
#X msg 158 197 this and that;
#X obj 4 5 ./header substitute;
#X text 22 63 Substitute elements in messages;
#X connect 18 0 20 1;
#X connect 19 0 20 1;
#X connect 20 0 21 0;
#X connect 20 1 8 0;
#X connect 29 0 20 0;
#X connect 30 0 20 0;
#X connect 31 0 20 1;
#X connect 37 0 20 0;
