From 6cd13727bdb8e2d08ab571fd7428a25264097d08 Mon Sep 17 00:00:00 2001 From: "Christopher A. Oliver" Date: Thu, 2 Jul 2020 09:17:59 -0400 Subject: [PATCH] Make initial phase for sync mode send some sound out of aux. With zero phase, the aux output was misleadingly silent. --- plaits/dsp/engine/virtual_analog_engine.cc | 2 +- plaits/dsp/oscillator/variable_shape_oscillator.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plaits/dsp/engine/virtual_analog_engine.cc b/plaits/dsp/engine/virtual_analog_engine.cc index 8f137bd3c..76dfad263 100644 --- a/plaits/dsp/engine/virtual_analog_engine.cc +++ b/plaits/dsp/engine/virtual_analog_engine.cc @@ -39,7 +39,7 @@ using namespace stmlib; void VirtualAnalogEngine::Init(BufferAllocator* allocator) { primary_.Init(); - auxiliary_.Init(); + auxiliary_.Init(0.25f); sync_.Init(); variable_saw_.Init(); diff --git a/plaits/dsp/oscillator/variable_shape_oscillator.h b/plaits/dsp/oscillator/variable_shape_oscillator.h index 47d250a71..272bc3acb 100644 --- a/plaits/dsp/oscillator/variable_shape_oscillator.h +++ b/plaits/dsp/oscillator/variable_shape_oscillator.h @@ -44,8 +44,8 @@ class VariableShapeOscillator { VariableShapeOscillator() { } ~VariableShapeOscillator() { } - void Init() { - master_phase_ = 0.0f; + void Init(float initphase=0.0f) { + master_phase_ = initphase; slave_phase_ = 0.0f; next_sample_ = 0.0f; previous_pw_ = 0.5f;