Frank Barknecht wrote:
Hallo,
Cesare Marilungo hat gesagt: // Cesare Marilungo wrote:
Frank Barknecht wrote:
This is possible. The additive synth bell example I posted shows one
way how to address each instance seperatly. You get the voice number
as first argument so you can do various things with it inside the
poly-abstraction.
Another example is attached, which is more traditional and is built
around [poly]. Both approaches don't use the voice allocation of
nqpoly4 at all: Nobody forces you to use it, and I generally don't use
it anyways.
I missed that. But the attached patch does what I was trying to do.
Cool!
Actually you've made me think that it would be a good idea to have an
inlet in nqpoly4 for data as produced by the [poly] object. Then one
wouldn't need to make the send/receive pair by hand. Currently nqpoly4
implements one voice allocation algorithm which is a bit limited and
only really useful for granular synthesis, but not so useful for
Midi-inspired polyphony, where the note length isn't known in advance.
I think, a successor of nqpoly4 should not care about voice allocation
at all by itself.
In fact I was trying to the same thing using nqpoly4 voice allocation,
but I wasn't thinking that there's no gain in using it for this kind of
purpose. In fact the abstraction are all instantiated when the nqpoly4
object is created and the bang to the abstraction outlet only tells
nqpoly4 which voice has been freed.
Anyway I've modified your example to make some sounds and I've noticed a
problem. If I edit my voice abstraction and then I use the nqpoly4 right
inlet to reset and reload the abstraction, then one of the voice becomes
silent. I've not understood completely nqpoly4 inner workings but I
guess this is due to the fact that we make it create one more instances
(eg. [nqpoly4 9 ... ] with [poly 8].
This problem is solved by using the same number for both [nqpoly4] and
[poly] and adding a [- 1] between the poly first outlet and pack first
inlet.
I've attached the patches.
Ciao,
c.
Ciao
--
http://www.cesaremarilungo.com
#N canvas 172 438 648 359 10;
#X obj 74 178 poly 8;
#X obj 74 253 s \$0-notes;
#X obj 74 229 pack 0 0 0;
#X obj 75 103 notein;
#X msg 260 107 bang;
#X obj 74 207 - 1;
#X obj 157 179 nqpoly4 8 voice \$0;
#X connect 0 0 5 0;
#X connect 0 1 2 1;
#X connect 0 2 2 2;
#X connect 2 0 1 0;
#X connect 3 0 0 0;
#X connect 3 1 0 1;
#X connect 4 0 6 1;
#X connect 5 0 2 0;
#N canvas 699 311 426 409 10;
#X obj 227 75 inlet;
#X obj 273 75 inlet;
#X obj 226 114 outlet;
#X text 212 53 we don't need this;
#X obj 75 66 r \$3-notes;
#X obj 75 97 route \$1;
#X obj 104 127 print \$1_NOTE;
#X obj 271 271 vline~;
#X obj 76 296 *~;
#X obj 76 365 dac~;
#X obj 76 324 *~ 0.2;
#X obj 75 187 mtof;
#X obj 271 180 select 0;
#X obj 75 164 unpack 0 0;
#X msg 321 237 0 500;
#X obj 324 207 / 127;
#X msg 271 235 \$1 100;
#X obj 76 235 osc~;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 5 0 13 0;
#X connect 7 0 8 1;
#X connect 8 0 10 0;
#X connect 10 0 9 0;
#X connect 10 0 9 1;
#X connect 11 0 17 0;
#X connect 12 0 14 0;
#X connect 12 1 15 0;
#X connect 13 0 11 0;
#X connect 13 1 12 0;
#X connect 14 0 7 0;
#X connect 15 0 16 0;
#X connect 16 0 7 0;
#X connect 17 0 8 0;
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list