Open anthonyalfimov opened 2 years ago
Currently, pre- and post-saturation gain is handled by two GainModules. They use ValueSmoothingTypes::Multiplicative
smoothing type for the gain value, so during the smoothing period the pre-boost and post-cut values don't match. This is most likely the cause of the problem.
The issue is connected to the smoothing of the "Drive" parameter. However, it is not caused by using multiplicative smoothing on separate pre- and post-saturation gain values. Even when there's just a singe smoothed "Drive" value, the issue persists.
The issue is universal for all smoothed parameters. The top post and the title are updated accordingly.
While this issue is noticeable only with certain parameters, I believe the best approach is to address this on the level of the SmoothedValue
object. E.g., a derived class that checks if the playback has just started, and in that case sets the new value immediately.
Audio parameter smoothing only occurs when the plugin is processing audio. When a parameter is changed while transport is stopped, it updates the target value for smoothing. But smoothing only starts when transport is started. This can lead to unwanted artefacts.
The specific case where I discovered this issue is bouncing the plugin output.
This issue currently is most prominent with the "Drive" parameter and when changing the "FX Type" from "Delay" to "Chorus" or "Flanger".
Changing the "Drive" parameter when transport is stopped results in a transient boost in wet signal when playback is started: