Here is an addendum to a problem I posted earlier on the maxmsp list.
Symptom 1: multiple instances of the same abstraction (which contains a js
object for the purpose of creation dynamic number of audio outputs) create
objects ok when included in the same file (see poly_test.pat below), their
#0 argument is for some reason cross-polluted. So if we have a "boo" and
"bao" instance, both of them will be for some reason instantiated as "boo"
in this case.
Symptom 2: matters are worse when using this in conjunction with poly~ (see
main.pat below) where sometimes instance 1 fails to create objects. I tried
for the most part minimizes failure to create objects, but (depending on the
time it takes to instantiate poly object, especially in the case of more
complex objects) its success rate is impossible to assess consistently. I
also tried using setname message which would be responsible for
instantiating object's name via external message and that does not work
Expected behavior: multiple instances should instantiate as per their #0
vars and create/delete objects as expected.
FWIW, I tried changing js filenames as well as making two different
(identical) abstractions with different filenames in hope to make them more
different, neither of which had any bearing in this case.
Any insight in this matter is most appreciated.
NB: in order for this example to work, please use exact .pat and .js names
//poly_test.pat (single instance)
//main.pat (poly~ example)
inlets=3; //instance/reset (bang), cols, rows
if (inlet==0 && val>0)
else if (inlet==1 && val>0 && val
else if (inlet==2 && val>0 && val
//else post ("dac2.js reports invalid data " + val + "n");
if (cols && rows && instance && name)
if (initialized) destructor();
//make new ones and connect them
for (i=0; i
"dac2~", (i+1), name + "_" + instance + "_" + (i+1));
for (i=0; i
if (inlet==0) destructor();
//a kind of destructor: remove old outputs
//post(i + "n");
Ivica Ico Bukvic, D.M.A.
Composition, Music Technology, CCTAD, CHCI
Dept. of Music - 0240
Blacksburg, VA 24061
(540) 231-5034 (fax)