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