surge-synthesizer / surge

Synthesizer plug-in (previously released as Vember Audio Surge)
https://surge-synthesizer.github.io/
GNU General Public License v3.0
3.03k stars 388 forks source link

Wavetable "morph" smoothing lag #7696

Open blancoberg opened 2 weeks ago

blancoberg commented 2 weeks ago

Bug Description: The wavetable morph parameter has a ~15ms smoothing lag. Compare to other parameters like pitch, the morph parameter lerps to the new value instead of setting in somewhat directly.

Surge XT Version

Reproduction Steps:

Removing this line in "WaveTableOscillator.cpp":

float shape = l_shape.v;

And replacing it with this:

float shape = limit_range(localcopy[id_shape].f, 0.f, 1.f); 

Fixes the issue. ( This was suggested by @baconpaul for testing )

Expected Behavior: The morph parameter should change at the same speed as any other parameter, with as little lag as possible.

Computer Information (please complete the following!):

Additional Information:

blancoberg commented 2 weeks ago

this test is a wavetable that plays a sine wave at 2x speed until it arrives to the last frame where it runs at 1x with any interpolation in between the frames.

How to use the test preset: When playing a legato note between C4 and C5, it should stay on C4. The note should not have time to switch before arriving to the last frame.

Demonstration: https://youtu.be/FxMLi7NjKuc

Morph lag test.zip