Clearing and Resetting Function

artmusicsouth's icon
Max Patch
Copy patch and select New From Clipboard in Max.

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.

Max Patch
Copy patch and select New From Clipboard in Max.

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.

Peter McCulloch's icon

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.

Peter McCulloch's icon
Max Patch
Copy patch and select New From Clipboard in Max.
Max Patch
Copy patch and select New From Clipboard in Max.

Here's how I might handle it. The first patch is BasicFMVox~, the second is the patch that plays it.

Wetterberg's icon

yep. Read through the reference for [function] - you'll find "setdomain $1" in there...

artmusicsouth's icon
Max Patch
Copy patch and select New From Clipboard in Max.
Max Patch
Copy patch and select New From Clipboard in Max.

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.

Peter McCulloch's icon

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.

artmusicsouth's icon

Where in the chain of events would I put the "target 0". I've tried it in several places but to no avail.

Peter McCulloch's icon

Each inlet would need it before you send the message.

I might alternately recommend simply replacing the extra inlets with send and receive.

artmusicsouth's icon