Clearing and Resetting Function
I am trying to use various function objects to set envelopes and other parameters for a synth inside a poly. I have been unsuccessful at getting the receiving function object to clear and then reset with the new parameters. I had used a clear message to reset it but it didn't seem to work but perhaps I missed something in the process. You can see it in this patch.
Also I need to be able to set the duration of the function dynamically while it maintains the same envelope. For example, if the first duration is 2000 ms with a certain envelope I will then want to keep the same envelope but have the duration at 8000 ms. Here is the subpatch that has the ideas I am working with. I understand my messages have only up to 1000 ms in them but I am not sure how to maintain the same envelope while altering the duration while on the fly.
Can you post the poly~ patch that's playing it? It looks like things are in place, but I can't see what's feeding into it so it's hard to know for sure.
Here's how I might handle it. The first patch is BasicFMVox~, the second is the patch that plays it.
yep. Read through the reference for [function] - you'll find "setdomain $1" in there...
Your patch looks good Peter. I need to take a closer look there. here is the patch the poly is inside. I guess that is what you are looking for. Also below it is another attempt at trying to rest it that didn't work. I need to study your patch and see hopw you solved it.
Ah. I think I see what the problem is now. When you send messages to the poly voice, it only sends to the targeted voice. (voice 1 by default) Before your messages, you need to send target 0 (target all voices) to the inlet to target all voices.
Where in the chain of events would I put the "target 0". I've tried it in several places but to no avail.
Each inlet would need it before you send the message.
I might alternately recommend simply replacing the extra inlets with send and receive.