Envelope follower mapped to parameter to toggle it max/min with each hit

Share your favorite Ableton Live tips, tricks, and techniques.
Post Reply
Totenmusik
Posts: 1
Joined: Tue Jan 10, 2006 8:07 am

Envelope follower mapped to parameter to toggle it max/min with each hit

Post by Totenmusik » 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

yur2die4
Posts: 7153
Joined: Sat Oct 03, 2009 3:02 am
Location: Menasha, Wisconsin
Contact:

Re: Envelope follower mapped to parameter to toggle it max/min with each hit

Post by yur2die4 » Fri Nov 25, 2022 12:39 pm

I’m sure someone will chime in on this. I have limited knowledge for programming, but I think they sometimes refer to that kind of trigger as a ‘radio’ button, or toggle switch. And, although it doesn’t seem common in practice, I’d think this should be a pretty common conceptual thing for programming. So hopefully that helps with searches, or that someone else hops in with a solution.

Post Reply