LSP Surge Filter plugin series
This plugin is designed mostly as a workaround for systems which don’t support smooth fade-ins and fade-outs of audio stream on playback start and stop events. Such events may produce noticeable pops, especially when the audio stream is additionally amplified.
For example, the LSP Compressor Stereo – Kompressor Stereo plugin while working in upward mode significantly amplifies the input signal below the threshold. When the audio playbach suddenly appears, the compressor doesn’t stop to amplify the signal instantly. Instead of this, an envelope of the signal is computed by the compressor which contains the reactive part. As the result, the amplification coefficient lowers with some short delay but it is still enough to produce very loud and annoying pop.
This plugin detects start of playback and end of playback by monitoring the RMS envelope of the signal.
If the envelope is below the Fade-In threshold, the plugin doesn’t pass any signal to the output. The plugin triggers smooth fade-in process when the RMS envelope exceeds the Fade-In threshold. To protect the plugin from the accidental fade-out immediately after fade-in (which may be caused by non-significant oscillations of the RMS envelope), additional fade-in timeout is added which allows the envelope to grow enough and to not to trigger fade-in event.
If the envelope goes below the Fade-Out threshold, the plugin performs the smooth fade-out process. The only problem is, that when the RMS fall-off is detected, there’s almost nothing to fade-out. To perform proper fade-out and complete the fade-out at the point where the RMS fall-off was detected, plugin performs lookahead which may yield to long playback delays for big RMS and Fade-Out time values. This introduces the latency from the plugin side which may be computed as a sum of RMS and Fade-Out time. If the plugin issues fade-out, it doesn’t allow to trigger fade-in for the Fade-Out delay time after the fade-out completes. This also saves plugin from issuing accidental fade-in events which can be caused by oscillations of the falling down RMS envelope.