From 8de7543266131a030411d52fa39d1da0b717a59a Mon Sep 17 00:00:00 2001 From: Gary Scavone Date: Tue, 5 Feb 2019 20:34:18 -0500 Subject: [PATCH] Update to Modulate to allow noise rate control. --- include/Modulate.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/Modulate.h b/include/Modulate.h index e1fe515..c668cc3 100644 --- a/include/Modulate.h +++ b/include/Modulate.h @@ -41,6 +41,9 @@ class Modulate : public Generator //! Set the periodic (vibrato) gain. void setVibratoGain( StkFloat gain ) { vibratoGain_ = gain; }; + //! Set the periodic (vibrato) rate or frequency in Hz. + void setRandomRate( StkFloat rate ) { noiseRate_ = (unsigned int) ( rate * Stk::sampleRate() / 22050.0 ); }; + //! Set the random modulation gain. void setRandomGain( StkFloat gain );