at the moment i'm trying to find a way for a dynamic voice management by dynamic creation of abstractions.
in the attached patch you can adjust the count of voices by pressing the "up" and "dn" key to increase or decrease the number of voices. in effect, there will be created or cut "multi_osc~" abstractions within the "pd synth" subpatch according to the adjusted number.
my problem is now, that this only works if you use all voices the [poly] object is set to (in the attached example 4..), because if you only have three generators in the subpatch, every 4th note will lead to an empty [router] outlet. if there was a way to set the voices in the [poly] object also dynamically, this would be no problem. has someones got an idea how to fix that?
-
Dynamic voice management
-
how about making your own version of [poly] as an abstraction? that way you can do what you want with it,
-
You might want to take a look at the [nqpoly4] object. It sounds similar to what you're doing.
-
@mod said:
how about making your own version of [poly] as an abstraction? that way you can do what you want with it,
?? uh, i guess, that's not really a trivial thing to do!? ok, you could use a counter to generate a voice number and a [pack] object to pack the pitch/velocity pairs to that voice number. but when i hit for example one key and keep holding it down while i hit another key (now the second voice will be triggered...) - when i let the first key go after a while, how can i set the velocity of the corresponding "triple" (voice#, pitch, velo) to zero again?
has somebody built something like this yet? would be cool, if i could have a look to an existing patch...i don't have a clue!edit: ok, after hours of trial and error, i'm quite sure, that the way i planned it - by using a midi triggered counter to generate the voice-number - it won't be possible to build a poly-like abstraction:
when a key is held down while pressing other keys, the corresponding voice-number has to be "saved" somehow, for only the left voices will be used... the other issue that i have is, how to get the velocity values to change back to zero within the "midi triple messages", when the key will let go again...
i really have no idea how to figure that out - can someone help?
sorry for my poor english..... -
heres one idea
use voice nr as index to a table where you keep the pitches.
see attached
-
oh, i edited my last post while you send a comment - cool, i'll check it out! thank you!
-
ok good L
-
man, thank you, that's awesome! this was a good patch to get me started. it took some time until i figured out, how your patch works (i'm pretty bad at reverse engeneering..) but after some modification, it works quite well for the moment! merci!
-
okay, i improved the patch above and added the dynamic poly abstraction.
but i have one issue, i can't figure out:
when i generate for example 4 [multi_osc~] abstractions in the [pd synth] patch (pressing the "up" button to value 4), and i hit some keys on my midikeyboard, then always the 4th voice will make no sound.... but when i try to check the outputs of the [route] object with some numberboxes, to verify that all voices will be routed correctly, then it suddenly works.
it seems that i have to manually create one more object in the synth subpatch to get all voices run correctly!?
has someone's got an idea what's that about? strange... -
This is a known issue with abstractions--something about the DSP tree needing to be updated. For some reason adding a connection after loading fixes it. I don't know if you're doing this (I can't open you're zip file), but if not try putting a [switch~] in the abstraction and turning it on when it is called and off when it is finished.
-
Sorry for the bump, but this is some great work here.
Toxonic, do you (or anyone else) know the message for sending the creation argument in your [pack] sub-patch? -
Whoops, spoke too soon. Now I'm really sorry for the bump.
Creation argument just follows the name of the abstraction being created. Duh.
In this case: [obj $3 $5 $7 $8(
Thanks for the patch.