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;