diff --git a/include/EnvelopeAndLfoParameters.h b/include/EnvelopeAndLfoParameters.h index bcac7b812..42641c791 100644 --- a/include/EnvelopeAndLfoParameters.h +++ b/include/EnvelopeAndLfoParameters.h @@ -174,8 +174,6 @@ private: sample_t lfoShapeSample( fpp_t _frame_offset ); void updateLfoShapeData(); - void updateRandomWave(); - friend class EnvelopeAndLfoView; diff --git a/include/EnvelopeAndLfoView.h b/include/EnvelopeAndLfoView.h index 2c054d71a..1ad292456 100644 --- a/include/EnvelopeAndLfoView.h +++ b/include/EnvelopeAndLfoView.h @@ -92,7 +92,6 @@ private: ledCheckBox * m_controlEnvAmountCb; float m_randomGraph; - void updateRandomGraph(); } ; #endif diff --git a/src/core/EnvelopeAndLfoParameters.cpp b/src/core/EnvelopeAndLfoParameters.cpp index 4c16f2ecc..066c9132a 100644 --- a/src/core/EnvelopeAndLfoParameters.cpp +++ b/src/core/EnvelopeAndLfoParameters.cpp @@ -221,7 +221,7 @@ inline sample_t EnvelopeAndLfoParameters::lfoShapeSample( fpp_t _frame_offset ) case RandomWave: if( frame == 0 ) { - updateRandomWave(); + m_random = Oscillator::noiseSample( 0.0f ); } shape_sample = m_random; break; @@ -249,14 +249,6 @@ void EnvelopeAndLfoParameters::updateLfoShapeData() -void EnvelopeAndLfoParameters::updateRandomWave() -{ - m_random = Oscillator::noiseSample( 0.0f ); -} - - - - inline void EnvelopeAndLfoParameters::fillLfoLevel( float * _buf, f_cnt_t _frame, const fpp_t _frames ) diff --git a/src/gui/widgets/EnvelopeAndLfoView.cpp b/src/gui/widgets/EnvelopeAndLfoView.cpp index 2cf8bdd43..450724238 100644 --- a/src/gui/widgets/EnvelopeAndLfoView.cpp +++ b/src/gui/widgets/EnvelopeAndLfoView.cpp @@ -537,7 +537,7 @@ void EnvelopeAndLfoView::paintEvent( QPaintEvent * ) case EnvelopeAndLfoParameters::RandomWave: if( x % (int)( 900 * m_lfoSpeedKnob->value() + 1 ) == 0 ) { - updateRandomGraph(); + m_randomGraph = Oscillator::noiseSample( 0.0f ); } val = m_randomGraph; break; @@ -572,13 +572,6 @@ void EnvelopeAndLfoView::paintEvent( QPaintEvent * ) -void EnvelopeAndLfoView::updateRandomGraph() -{ - m_randomGraph = Oscillator::noiseSample( 0.0f ); -} - - - void EnvelopeAndLfoView::lfoUserWaveChanged() {