Efficient way to enable/disable filters

Status
Not open for further replies.
For my audio project I want to be able to enable/disable filters like reverb, bitcrushers, delays, lowpass, etc on the sounds generated by my oscillators. I want to use some toggle switches to do it and I'm wondering what would be the most efficient way to implement such a feature.

thanks!
 
Maybe put the "amp" object before or after the filter, and use gain of 1.0 and 0 to turn the signal on/off.

Or if the filters go into mixers, just control the channels with those signal using gain of 0 and 1.0.

Both the amp and mixer have code that checks for gain of 0 and 1.0. The math is skipped in those cases, so they really do act as efficient switches. All other gain settings do cause them to do the math that multiplies every sample.
 
Status
Not open for further replies.
Back
Top