This patch shows a way to use the the abgate~ abstraction from the example "Routing a signal to one of two destinations" to route a signal through an audio effect processor, equivalent to using an effect insert in a mixer or a DAW. In order for this example to work correctly, you'll need to have that abstraction, saved with the name abgate~, in the Max file search path.
This patch is similar to the abgate~ abstraction for "Routing a signal to one of two destinations" with a fade from one to the other. However, instead of routing one input signal to one of two outlets, this abstraction permits you to choose one of two input signals to send out its lone outlet.
This patch is quite similar to the onoff~ abstraction for "Turning a signal on or off" with a fade-in or fade-out. Instead of just turning the signal on or off, though, this abstraction routes a signal to one of two outlets (with a fade from one to the other), which you can think of as destination A or destination B, based on whether the number in the right inlet is zero or non-zero.
To turn an audio signal on or off instantly, Max provides the gate~ object. However, if you use gate~ to switch a signal on or off while MSP is on, you're likely to cause an unwanted click due to the sudden discontinuity in signal amplitude.
To create an effects chain for video similar to a guitarist’s pedal board, one needs a bypass mechanism so that disabling one effect doesn’t stop video playback. This can be achieved using gate or ggate.