Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Modern Oscillator Pitch: Lag -> Lipol (#7231)" #7242

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/common/dsp/oscillators/ModernOscillator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ void ModernOscillator::init(float pitch, bool is_display, bool nonzero_init_drif
{
// we need a tiny little portamento since the derivative is pretty
// unstable under super big pitch changes
pitchlag.newValue(pitch);
pitchlag.instantize();
pitchlag.setRate(0.5);
pitchlag.startValue(pitch);
pwidth.setRate(0.001); // 4x slower
sync.setRate(0.001 * BLOCK_SIZE_OS);

Expand Down Expand Up @@ -171,7 +171,7 @@ void ModernOscillator::process_sblk(float pitch, float drift, bool stereo, float

float ud = oscdata->p[mo_unison_detune].get_extended(
localcopy[oscdata->p[mo_unison_detune].param_id_in_scene].f);
pitchlag.newValue(pitch);
pitchlag.startValue(pitch);
sync.newValue(std::max(0.f, localcopy[oscdata->p[mo_sync].param_id_in_scene].f));

float absOff = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/common/dsp/oscillators/ModernOscillator.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ class ModernOscillator : public Oscillator
template <mo_multitypes multitype, bool subOctave, bool FM>
void process_sblk(float pitch, float drift = 0.f, bool stereo = false, float FMdepth = 0.f);

lag<double, true> sawmix, trimix, sqrmix, pwidth, sync, detune, fmdepth;
lipol<double, true> pitchlag, dpbase[MAX_UNISON], dspbase[MAX_UNISON], subdpbase, subdpsbase;
lag<double, true> sawmix, trimix, sqrmix, pwidth, sync, dpbase[MAX_UNISON], dspbase[MAX_UNISON],
subdpbase, subdpsbase, detune, pitchlag, fmdepth;

// character filter
Surge::Oscillator::CharacterFilter<double> charFilt;
Expand Down