diff --git a/src/common/dsp/oscillators/WavetableOscillator.cpp b/src/common/dsp/oscillators/WavetableOscillator.cpp index 742361198d6..9a7b7f3fa0b 100644 --- a/src/common/dsp/oscillators/WavetableOscillator.cpp +++ b/src/common/dsp/oscillators/WavetableOscillator.cpp @@ -84,7 +84,9 @@ void WavetableOscillator::init(float pitch, bool is_display, bool nonzero_init_d // nointerp adjusts the tableid range so that it scans the whole wavetable // rather than wavetable from first to second to last frame nointerp = !oscdata->p[wt_morph].extend_range; - float shape = oscdata->p[wt_morph].val.f; + + float shape = l_shape.v; + float intpart; shape *= ((float)oscdata->wt.n_tables - 1.f + nointerp) * 0.99999f; tableipol = modff(shape, &intpart);