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.