I have been using Frank B.'s wonderful abstraction [polypoly] (which is
a revision and improvement of [nqpoly]) and getting great results with
it. In fact, I'll publish a synth based on it very soon now -- just as
soon as I work out this final issue.
I added an extra inlet to [polypoly] in order to be able to send a
"clear" message to the [poly] object within it, which manages all the
dynamically-created voices. I did this because imperfect input can
sometimes drop a note-off and leave a note hanging, and it never gets
de-allocated or released by [poly] -- that's what the "clear" message
accomplishes.
This actually worked great, with one small problem -- the $0-poly
subpatch, which is where the magic of [polypoly] mostly seems to occur,
doesn't respond well to editing of its parent. There's dynamic
instantiation using $0- variables going on here, and I think that's what
is getting messed up by editing -- these extra lines appear in the
edited version:
#X obj 50 60 r 1002-in1;
#X obj 199 60 r 1002-in2;
#X obj 50 200 throw~ 1002-out0;
#X obj 199 200 throw~ 1002-out1;
and the subpatch invocation is this:
#N canvas 7 455 362 318 1002-poly 0; (edited)
instead of:
#N canvas 7 455 362 318 \$0-poly 0; (original)
These cause startup errors, although after that, everything seems to
work fine.
I'm not sure how to correctly edit self-modifying patches such as this.
What's the trick? Should I just edit the text directly? I've attached
the modified version of [polypoly]. By the way, Frank, will [polypoly]
be made available from CVS? I think it's the best thing since sliced bread.
Phil Stone
UC Davis