36 void reset(
void ) { lastFrame_[0] = 0.0; };
51 StkFloat
lastOut(
void )
const {
return lastFrame_[0]; };
54 StkFloat
tick(
void );
68 void sampleRateChanged( StkFloat newRate, StkFloat oldRate );
73 StkFloat vibratoGain_;
75 unsigned int noiseRate_;
76 unsigned int noiseCounter_;
83 lastFrame_[0] = vibratoGain_ * vibrato_.
tick();
84 if ( noiseCounter_++ >= noiseRate_ ) {
94 #if defined(_STK_DEBUG_)
95 if ( channel >= frames.
channels() ) {
96 oStream_ <<
"Modulate::tick(): channel and StkFrames arguments are incompatible!";
101 StkFloat *samples = &frames[channel];
102 unsigned int hop = frames.
channels();
103 for (
unsigned int i=0; i<frames.
frames(); i++, samples += hop )
STK abstract unit generator parent class.
Definition: Generator.h:21
STK periodic/random modulator.
Definition: Modulate.h:24
void setVibratoGain(StkFloat gain)
Set the periodic (vibrato) gain.
Definition: Modulate.h:42
StkFloat tick(void)
Compute and return one output sample.
Definition: Modulate.h:80
void setVibratoRate(StkFloat rate)
Set the periodic (vibrato) rate or frequency in Hz.
Definition: Modulate.h:39
void reset(void)
Reset internal state.
Definition: Modulate.h:36
void setRandomRate(StkFloat rate)
Set the periodic (vibrato) rate or frequency in Hz.
Definition: Modulate.h:45
Modulate(void)
Class constructor.
StkFloat lastOut(void) const
Return the last computed output value.
Definition: Modulate.h:51
void setRandomGain(StkFloat gain)
Set the random modulation gain.
~Modulate(void)
Class destructor.
STK noise generator.
Definition: Noise.h:22
StkFloat lastOut(void) const
Return the last computed output value.
Definition: Noise.h:40
StkFloat tick(void)
Compute and return one output sample.
Definition: Noise.h:59
STK one-pole filter class.
Definition: OnePole.h:21
StkFloat tick(StkFloat input)
Input one sample to the filter and return one output.
Definition: OnePole.h:80
STK sinusoid oscillator class.
Definition: SineWave.h:26
void setFrequency(StkFloat frequency)
Set the data interpolation rate based on a looping frequency.
StkFloat tick(void)
Compute and return one output sample.
Definition: SineWave.h:99
An STK class to handle vectorized audio data.
Definition: Stk.h:287
unsigned int channels(void) const
Return the number of channels represented by the data.
Definition: Stk.h:415
unsigned int frames(void) const
Return the number of sample frames represented by the data.
Definition: Stk.h:418
static void handleError(const char *message, StkError::Type type)
Static function for error reporting and handling using c-strings.
static StkFloat sampleRate(void)
Static method that returns the current STK sample rate.
Definition: Stk.h:156
The STK namespace.
Definition: ADSR.h:8