/ lmms Public
Change noncyclic smoothing behaviour #3137
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge.
LMMS Waveshaper (and Dynamics Processor) work with a non-bipolar graph, mirroring the changes made in the positive domain to the negative domain.
This means that if the first value of the graph isn't at 0, it will create a jump right at the graph origin, between negative and positive, resulting in distortion.
Which is fine, of course, but the current smoothing method actually smooths the first (and the final) points of the graph, creating a jump when the user didn't draw one.
How to reproduce unwanted distortion:
Without having touched the graph, you created distortion.
The effect's even easier to listen if you use the Waveshaper as a compressor, with a steeper line from origin to about point (0.8, 0.5), and then applying smooth: you will have a smoother curve at (0.8, 0.5), but also a non-zero initial point.
This change disables smoothing to the initial and final points. As a result, smoothing a default, 45°, Waveshaper won't affect it.
For now I put the unwanted lines in comments.
(the only plugins affected are waveshaper and dynamics processor, other plugins use the normal, cyclic, smooth method)