Help to set up a microphone to toggle mute/unmute on an audio track when the microphone detects audio

Simon Bradley's icon

Hi,

Im a novice with Ableton, and I am working on a small project which I thought might be easy to do. I have an audio track playing on loop, and I want to have a microphone set up to act like an on/off switch for the mute button. So when the microphone detects a sound signal, the audio will fade out to mute, where it will stay muted until another sound signal is picked up and the audio fades back in.

I have used a CV envelope which fades in and out when the microphone detects audio, but it’s not acting like a switch for a binary mute/unmute

Looking online, it looks like I need to create something in Max to have a toggle, but I can’t really find any info on how I can actually do this.

Does anyone have any info on how I could make this in Max for Live?

Thank you,