How to make a toggle-and-hold, or basically lock a toggle for a fixed time


#1

Still in newbie mode here... trying to figure out how to set up some dynamic switching between different types of audio processing.

When the audio input meets some condition/test, I have it toggle a particular processing effect on/off.

One problem I'm trying to solve right now, though, is that I'd like to set some kind of lock period on the toggle, so that after it has been toggled once, it can't be toggled again for a duration on the scale of seconds. The point to this is because a signal will often oscillate back and forth between test conditions on shorter timescales than this, but I want the switching to be less sensitive and wait for well-separated triggering events.

It seems like there is likely some way to set up this logic with existing objects, but I"m a little bit at a loss for exactly how. Any tips?

Many thanks...


#2

You could use either a delayed pulse to reset the toggle or even just use the pulselength object:


#3

My first instinct would be to say check out some sort of trigger delay.

I think there are timer objects. They likely measure the time between pulses. Haven't used em yet myself.

You could use a triggered envelope and a > < or == type of object. Your condition triggers the envelopeand, disallows changes while the envelope is running, and when the envelope returns to 0 could you reallow the effect to come on.

No sample patches, sorry. I'm a on train!


#4

I think the timer/pulselength is the way to go, but on the output, invert the signal, then connect the inverted signal to a logic/and object, so your audio trigger is then connected to the other logic/and input, so only when both the audio trigger and the timer/pulselength are high will you be able initiate and trigger your wanted event. But during the timer/pulselength period, the signal will be inverted and will be low so the and object cannot go high.
:grin:


#5

Thanks everyone for the suggestions. I tried a couple of these ideas and none of them quite worked but I did end up figuring out how to adapt it so that it does. What I ended up doing was routing my trigger signal to a counter and applying a condition that I only toggle the effect when the counter value == 1. I use a delayed pulse to reset the counter after a few seconds.

Thanks again for helping me find some of the objects that I ended up needing for this!