Change noncyclic smoothing behaviour #3137

Merged
merged 1 commit into from Dec 29, 2016

Projects

None yet

2 participants

@DeRobyJ
Contributor
DeRobyJ commented Nov 27, 2016 edited

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:

  • Open a Waveshaper in master and any sine-wave instrument (preferably with some attack time to listen the distortion better)
  • Don't edit the waveshape graph manually, just apply the Smooth button many times
  • Play the sine-wave instrument

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)

@DeRobyJ DeRobyJ changed the title from Changes noncyclic smoothing behaviour to Change noncyclic smoothing behaviour Nov 27, 2016
@Umcaruje
Member

This looks good for me, has been open for a while with no objections. Tested it out and works good. Merging 👍

@Umcaruje Umcaruje merged commit 0bf7b13 into LMMS:master Dec 29, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment