Hi again,
I'm happily creating subpatches and filling them with dynamic subpatches (thanks again, Jonathan), but now I'm stuck on something more subtle. I'm doing something like this:
[b] | [symbol G] | [; pd-exp-$1 msg 20 235 /analysis/level/$1; (
to dynamically add a [/analysis/level/G ( message box to subpatch 'exp-G'. However, what I really want that message box to say is:
[/analysis/level/G $1(
so I can do something useful with that message. How do I get '$1' into that message box, dynamically?
Phil
Hello Phil, See the patch attached ++
Jack
Le mercredi 02 septembre 2009 à 22:09 -0700, Phil Stone a écrit :
Hi again,
I'm happily creating subpatches and filling them with dynamic subpatches (thanks again, Jonathan), but now I'm stuck on something more subtle. I'm doing something like this:
[b] | [symbol G] | [; pd-exp-$1 msg 20 235 /analysis/level/$1; (
to dynamically add a [/analysis/level/G ( message box to subpatch 'exp-G'. However, what I really want that message box to say is:
[/analysis/level/G $1(
so I can do something useful with that message. How do I get '$1' into that message box, dynamically?
Phil
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
very neat.
Jack wrote:
Hello Phil, See the patch attached ++
Jack
Le mercredi 02 septembre 2009 à 22:09 -0700, Phil Stone a écrit :
Hi again,
I'm happily creating subpatches and filling them with dynamic subpatches (thanks again, Jonathan), but now I'm stuck on something more subtle. I'm doing something like this:
[b] | [symbol G] | [; pd-exp-$1 msg 20 235 /analysis/level/$1; (
to dynamically add a [/analysis/level/G ( message box to subpatch 'exp-G'. However, what I really want that message box to say is:
[/analysis/level/G $1(
so I can do something useful with that message. How do I get '$1' into that message box, dynamically?
Phil
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
#N canvas 332 97 839 300 10; #N canvas 65 337 450 300 monsouspatch 0; #X restore 23 29 pd monsouspatch; #X obj 23 102 s pd-monsouspatch; #X obj 412 23 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X msg 23 76 obj 0 0 pd monsoussouspatchG; #X obj 412 96 symbol G; #X obj 487 97 makefilename %c1; #X obj 412 122 pack s s; #X msg 487 73 36; #X msg 412 153 ; pd-monsoussouspatch$1 msg 20 235 /analisis/level/$1 $2; #X obj 412 46 t b b; #X text 211 74 <- 1; #X text 437 23 <- 2; #X connect 2 0 9 0; #X connect 3 0 1 0; #X connect 4 0 6 0; #X connect 5 0 6 1; #X connect 6 0 8 0; #X connect 7 0 5 0; #X connect 9 0 4 0; #X connect 9 1 7 0;
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Brilliant hack, Jack - thanks a million! Thanks for your suggestion, too, dmotd.
Phil
Jack wrote:
Hello Phil, See the patch attached ++
Jack
Le mercredi 02 septembre 2009 à 22:09 -0700, Phil Stone a écrit :
Hi again,
I'm happily creating subpatches and filling them with dynamic subpatches (thanks again, Jonathan), but now I'm stuck on something more subtle. I'm doing something like this:
[b] | [symbol G] | [; pd-exp-$1 msg 20 235 /analysis/level/$1; (
to dynamically add a [/analysis/level/G ( message box to subpatch 'exp-G'. However, what I really want that message box to say is:
[/analysis/level/G $1(
so I can do something useful with that message. How do I get '$1' into that message box, dynamically?
Phil
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Phil Stone wrote:
[b] | [symbol G] | [; pd-exp-$1 msg 20 235 /analysis/level/$1; (
to dynamically add a [/analysis/level/G ( message box to subpatch
'exp-G'. However, what I really want that message box to say is:[/analysis/level/G $1(
so I can do something useful with that message. How do I get '$1' into
that message box, dynamically?
pd allows you to use:
[float 1( | [msg (X) (Y) selector $$1( | [s pd-patch]
to set a dollar agument dynamically. *however* this mechanism is only available in the short term
reopen it the second dollar will become commented '$$1', so this technique only applies for a once only approach - perhaps for generating a large repeating structures. this behaviour may in fact be a bug?
the technique i've use, which is a bit of work-around hackery, is to dynamically create a [loadbang]-->[adddollar 1( first, wire that to any subsequent message that needs the dollar argument appended, and finally call the 'loadbang' for the subpatch. its not pretty but works.
perhaps there is a more ellegant solution?
cheers dmotd