hi, I am trying to build a dynamic abstraction (oscbank~ <n>). don't know if this is possible. I created this (attached) patch, and get stack overflow when I create the oscbank~ object.
On Sat May 06, 2006 at 01:20:21AM +0200, Federico wrote:
hi, I am trying to build a dynamic abstraction (oscbank~ <n>). don't know if this is possible. I created this (attached) patch, and get stack overflow when I create the oscbank~ object.
check out nqpoly4 and dyn/dyn~ (not sure which is which)
or SC/Chuck...
-- Federico
#N canvas 592 106 450 560 10; #X obj 80 227 $1; #X text 110 228 number of osc~; #X obj 134 24 loadbang; #X obj 80 252 until; #X obj 40 20 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 80 63 t b b b; #X obj 124 121 s pd-oscbank.pd; #X msg 124 92 obj 500 200 outlet~; #X obj 80 288 i; #X obj 107 288 + 1; #X msg 102 206 1; #X msg 68 403 connect $1 0 0 0; #X msg 181 443 obj 500 200 inlet~; #X msg 200 405 obj 500 200 osc~; #X obj 200 477 s pd-oscbank.pd; #X obj 68 532 s pd-oscbank.pd; #X text 134 321 obj count; #X obj 68 382 + 1; #X obj 80 353 t f f b b; #X obj 80 320 + 22; #X msg 89 503 connect $1 0 $2 0; #X obj 89 441 expr $i1+1 ; $i1+2; #X obj 89 479 pack 0 0; #X connect 0 0 3 0; #X connect 2 0 5 0; #X connect 3 0 8 0; #X connect 4 0 5 0; #X connect 5 0 0 0; #X connect 5 1 10 0; #X connect 5 2 7 0; #X connect 7 0 6 0; #X connect 8 0 9 0; #X connect 8 0 19 0; #X connect 9 0 8 0; #X connect 10 0 8 1; #X connect 11 0 15 0; #X connect 12 0 14 0; #X connect 13 0 14 0; #X connect 17 0 11 0; #X connect 18 0 17 0; #X connect 18 1 21 0; #X connect 18 2 12 0; #X connect 18 3 13 0; #X connect 19 0 18 0; #X connect 20 0 15 0; #X connect 21 0 22 0; #X connect 21 1 22 1; #X connect 22 0 20 0;
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Federico wrote:
hi, I am trying to build a dynamic abstraction (oscbank~ <n>). don't know if this is possible. I created this (attached) patch, and get stack overflow when I create the oscbank~ object.
OK, I got the patch working (see attachment). now you can instantiate an [oscbank~ 10] object, and have 10 osc~s inside an abstraction wich has 10 inlet~ and 1 outlet~.
if you create a second instance of oscbank~ some unpredictable result happens, because sending messages to the pd-oscbank~.pd window, would send msgs to ALL instances.
how do I make those changes be local to ONE instance?
#N canvas 385 331 551 405 10; #X obj 11 201 until; #X obj 11 229 i; #X obj 40 229 + 1; #X msg 52 201 0; #X obj 11 309 pack 0 0 0; #X msg 11 335 obj $1 20 inlet~ , obj $1 50 osc~ , connect $2 0 $3 0 , connect $3 0 12 0; #X obj 11 256 expr $i1*50+10 ; 14+$i1*2 ; 14+$i1*2+1; #X msg 130 256 obj 50 80 /~ $1 , obj 50 100 outlet~ , connect 12 0 13 0; #X obj 11 176 t f b f; #X obj 11 131 loadbang; #X obj 11 152 $1; #X obj 11 372 s pd-oscbank~.pd; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 1 0 6 0; #X connect 2 0 1 1; #X connect 3 0 1 1; #X connect 4 0 5 0; #X connect 5 0 11 0; #X connect 6 0 4 0; #X connect 6 1 4 1; #X connect 6 2 4 2; #X connect 7 0 11 0; #X connect 8 0 0 0; #X connect 8 1 3 0; #X connect 8 2 7 0; #X connect 9 0 10 0; #X connect 10 0 8 0;
hi federico
attached a solution with namecanvas. apparently [namecanvas] is obsolete (according to the help file) but i think it does a pretty good job here. anyway.
i removed the connection part because i was to lazy to do that.
cheers eni
On May 6, 2006, at 2:35 PM, Federico wrote:
hi, I am trying to build a dynamic abstraction (oscbank~ <n>). don't know if this is possible. I created this (attached) patch, and get stack overflow when I create the oscbank~ object.
OK, I got the patch working (see attachment). now you can instantiate an [oscbank~ 10] object, and have 10 osc~s inside an abstraction wich has 10 inlet~ and 1 outlet~.
if you create a second instance of oscbank~ some unpredictable result happens, because sending messages to the pd-oscbank~.pd window, would send msgs to ALL instances.
how do I make those changes be local to ONE instance?