[PD] object creation msg to abstraction subpatch

Julian Sorrel tacitdynamite at yahoo.com
Sat Aug 12 19:33:35 CEST 2006


hello all, 
i'm having trouble sending an object creation message to a unique subpatcher [pd $0-subpatch] in an abstraction i'm building.  i've tried sending "obj 250 70 ctlin" to both an appropriately named messagebox and a [s $0-subpatch] object.  is patch-msg object construction not allowed for dynamic variables?  technically i'm not sending a dynamic variable, becuase the $0 number is already "decompressed" by message time in my patch.  i have no idea what's going on because [; pd-"decompressed $0"-subpatch vis 1 ( works fine.  

i have no aversion to using [dyn~] - but i'll be calling numerous instantiations of this abstraction, and i've found before that using [dyn~] in that situation is a bit slow ... so i'd prefer to use patch messages if i can ... 

myer

abstraction title: midibutton
--------------------------------------------------------------------------------------------------------------------
#N canvas 402 0 584 961 12;
#X obj 0 0 cnv 15 100 60 empty \$0-button button-0 5 50 0 14 -233017
-66577 0;
#X obj 0 0 bng 20 250 50 0 empty empty empty 0 -6 0 8 -228992 -1 -1
;
#X obj 194 28 tgl 15 0 empty empty rec 0 -6 0 8 -262144 -1 -1 0 1;
#X obj 56 167 ctlin;
#X obj 54 206 spigot;
#X msg 55 276 obj 250 70 ctlin \$1;
#X obj 358 322 makefilename button-%d;
#X obj 358 298 float \$1;
#X msg 358 347 obj 250 95 send \$1;
#X obj 4 206 sel 0;
#X msg 4 231 bang;
#X obj 81 67 nbx 3 14 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 10
-228992 -1 -1 0 256;
#X obj 55 251 f;
#X msg 148 155 2;
#X msg 148 179 3;
#X obj 358 240 loadbang;
#X msg 468 250 bang;
#X obj 438 293 float \$0;
#X msg 366 405 \; \$1-button label \$2;
#X obj 366 380 pack f s;
#N canvas 0 0 478 328 1132-subpatch 0;
#X restore 272 10 pd \$0-subpatch;
#X obj 57 570 symbol;
#X obj 79 10 nbx 3 14 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 10
-228992 -1 -1 0 256;
#X obj 57 545 makefilename pd-%d-subpatch;
#X obj 57 519 float \$0;
#X msg 383 878 conn 0 0 1 0;
#X obj 57 601 a2l;
#X obj 57 627 glue;
#X msg 5 550 bang;
#X text 2 109 _____________________________;
#X text 231 -7 \; \; \; \; \; \; \; \;;
#X text 257 37 <-- graph on parent;
#X text 146 136 debug;
#X text 252 65 this abstraction is designed to make \; it easy to program
a midi profile \; for your midi instrument. it rec- \; ords a user-entered
ctlin parameter \; and makes a send "button-$1" when \; the record
button is deselected.;
#X text 75 880 once i get the objects created ->;
#X obj 292 296 print a;
#X obj 103 723 print b;
#X text 171 207 <----create a ctlin with the specified param;
#X text 53 348 create a send for the ctlin ------->;
#X text 66 415 name the button ------------------>;
#X text 282 546 <-- send message to subpatch;
#X obj 315 497 t b l;
#X obj 315 472 a2l;
#X msg 57 729 \; \$1;
#X obj 57 653 l2s;
#X text 97 748 comment;
#X obj 352 794 s \$0-subpatch;
#X text -3 748 ---> \; \; \; L----these should be the same \, right?
--->;
#X text 456 230 debug;
#X text 98 627 i have to use [glue] here because [pack] receives \;
lists only in its left inlet - and here i need \; the list on the right
side of the filename.;
#X obj 306 712 makefilename pd-%d-subpatch;
#X msg 306 736 \; \$1 vis 1;
#X text 170 693 so why does this work if other messages don't?;
#X connect 2 0 4 1;
#X connect 2 0 9 0;
#X connect 3 1 4 0;
#X connect 4 0 11 0;
#X connect 4 0 12 1;
#X connect 5 0 35 0;
#X connect 5 0 42 0;
#X connect 5 0 46 0;
#X connect 6 0 8 0;
#X connect 6 0 19 1;
#X connect 7 0 6 0;
#X connect 8 0 35 0;
#X connect 8 0 46 0;
#X connect 8 0 42 0;
#X connect 9 0 10 0;
#X connect 10 0 12 0;
#X connect 12 0 5 0;
#X connect 13 0 4 0;
#X connect 14 0 4 0;
#X connect 15 0 7 0;
#X connect 15 0 17 0;
#X connect 15 0 24 0;
#X connect 16 0 7 0;
#X connect 16 0 17 0;
#X connect 17 0 19 0;
#X connect 17 0 50 0;
#X connect 19 0 18 0;
#X connect 21 0 26 0;
#X connect 23 0 21 1;
#X connect 24 0 23 0;
#X connect 26 0 27 0;
#X connect 27 0 44 0;
#X connect 28 0 21 0;
#X connect 41 0 28 0;
#X connect 41 1 27 1;
#X connect 42 0 41 0;
#X connect 44 0 43 0;
#X connect 44 0 36 0;
#X connect 50 0 51 0;
#X coords 0 0 1 1 200 140 1;


 		
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates starting at 1¢/min.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20060812/9db88c17/attachment.htm>


More information about the Pd-list mailing list