hi all,
i'm trying to make a patch that includes as a creation argument, a file to be loaded into playsf~ (but my question is valid for a symbol argument for anything i think). in addition, i also want a default file loaded if no creation argument is supplied. i've included a patch that accomplishes everything i need. what i'm wondering is if there is a more elegand solution. as i'm getting more fluent with pd, i'm trying to learn the best practices i can.
note that this uses [init] from iem, but i think this is fairly commonly distributed with pd these days? thanks for any ideas.
matt
#N canvas 142 91 399 364 10; #X msg 171 204 set open $1; #X msg 170 227 open stevie.aif; #X obj 207 56 ii stevie.aif; #X msg 207 102 set $1; #X msg 155 142 stevie.aif; #X obj 77 19 ii $1; #X obj 77 40 route 0; #X obj 207 78 pack s; #X msg 151 111 set $1; #X obj 121 62 t b a; #X obj 151 87 pack s; #X obj 171 178 pack s; #X obj 106 275 readsf~ 2; #X connect 0 0 1 0; #X connect 1 0 12 0; #X connect 2 0 7 0; #X connect 3 0 4 0; #X connect 4 0 11 0; #X connect 5 0 6 0; #X connect 6 0 4 0; #X connect 6 1 9 0; #X connect 7 0 3 0; #X connect 8 0 4 0; #X connect 9 0 4 0; #X connect 9 1 10 0; #X connect 10 0 8 0; #X connect 11 0 0 0;