From 55c3ea4ef9ce62c84c70b1553b34811f5a9e9511 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 8 Mar 2009 02:20:42 -0700 Subject: [PATCH] fixed phase randomness knob to affect both channels. I'm probably going to end up removing this knob but for now it's fixed. --- plugins/triple_oscillator/triple_oscillator.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plugins/triple_oscillator/triple_oscillator.cpp b/plugins/triple_oscillator/triple_oscillator.cpp index 5f0a0c64e..a628eb284 100644 --- a/plugins/triple_oscillator/triple_oscillator.cpp +++ b/plugins/triple_oscillator/triple_oscillator.cpp @@ -210,8 +210,10 @@ void oscillatorObject::applyPhaseRandomness( void ) float max = phoff + phr / 2.0f; // TODO replace this with a better random function phoff = min + ( (float)rand() / (float)RAND_MAX ) * (max - min); - m_phaseOffsetLeft = ( phoff + sphdet ) / 360.0f; + + phoff = min + ( (float)rand() / (float)RAND_MAX ) * (max - min); + m_phaseOffsetRight = phoff / 360.0f; } @@ -227,11 +229,7 @@ void oscillatorObject::updatePhaseOffsetLeft( void ) void oscillatorObject::updatePhaseOffsetRight( void ) { - float phoff = m_phaseOffsetModel.value(); - - // get rid of negative values - while( phoff < 0.0f ) phoff += 360.0f; - m_phaseOffsetRight = phoff / 360.0f; + m_phaseOffsetRight = m_phaseOffsetModel.value() / 360.0f; }