Envelope follower mapped to parameter to toggle it max/min with each hit
Posted: Fri Nov 25, 2022 3:52 am
Hi! This seems like it should be simple, and I have tried to figure it out myself, but . . .
I have audio going into an envelope follower, and have used the map function to control a parameter. The audio source is basically percussive with space in between hits. Of course the parameter follows the rise and fall of the envelope from the follower (and I see how to invert its response), but I don't want that. I want the signal to the envelope follower to cause the parameter to go to the maximum output value on the first hit, and then send the minimum value on the second hit, and then continue to do this with each subsequent hit. Basically creating a toggle that alternates between max and min with each successive trigger from the envelope. The target parameter is not a switch or an on/off. And anyways, when mapped to a switch, the switch is on for any value above zero and then off for zero. So even if I was targeting a switch, I would want the switch to STAY on until the next pulse from the env follower, THEN turn off (and continue to toggle with each subsequent hit.) It is amazingly hard to google a solution because every result assumes that I'm trying to go with the default behavior, or NOT toggle, or whatever.
I have Live 11 full suite, so I have access to M4L, I just can't figure out how to accomplish this with M4L (or otherwise.) Hoping someone who understands my goal can suggest a solution, or point me to something that already does this that I have missed.
Thanks!
Totenmusik
I have audio going into an envelope follower, and have used the map function to control a parameter. The audio source is basically percussive with space in between hits. Of course the parameter follows the rise and fall of the envelope from the follower (and I see how to invert its response), but I don't want that. I want the signal to the envelope follower to cause the parameter to go to the maximum output value on the first hit, and then send the minimum value on the second hit, and then continue to do this with each subsequent hit. Basically creating a toggle that alternates between max and min with each successive trigger from the envelope. The target parameter is not a switch or an on/off. And anyways, when mapped to a switch, the switch is on for any value above zero and then off for zero. So even if I was targeting a switch, I would want the switch to STAY on until the next pulse from the env follower, THEN turn off (and continue to toggle with each subsequent hit.) It is amazingly hard to google a solution because every result assumes that I'm trying to go with the default behavior, or NOT toggle, or whatever.
I have Live 11 full suite, so I have access to M4L, I just can't figure out how to accomplish this with M4L (or otherwise.) Hoping someone who understands my goal can suggest a solution, or point me to something that already does this that I have missed.
Thanks!
Totenmusik