Update to Modulate to allow noise rate control.

This commit is contained in:
Gary Scavone
2019-02-05 20:34:18 -05:00
parent f8550110d6
commit 8de7543266

View File

@@ -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 );