81 void noteOn( StkFloat frequency, StkFloat amplitude );
90 StkFloat
tick(
unsigned int channel = 0 );
113inline StkFloat VoicForm :: tick(
unsigned int )
116 temp = onepole_.
tick( onezero_.tick( voiced_->tick() ) );
117 temp += noiseEnv_.tick() * noise_.tick();
118 lastFrame_[0] = filters_[0].tick(temp);
119 lastFrame_[0] += filters_[1].tick(temp);
120 lastFrame_[0] += filters_[2].tick(temp);
121 lastFrame_[0] += filters_[3].tick(temp);
129 return lastFrame_[0];
134 unsigned int nChannels = lastFrame_.
channels();
135#if defined(_STK_DEBUG_)
136 if ( channel > frames.
channels() - nChannels ) {
137 oStream_ <<
"VoicForm::tick(): channel and StkFrames arguments are incompatible!";
138 handleError( StkError::FUNCTION_ARGUMENT );
142 StkFloat *samples = &frames[channel];
143 unsigned int j, hop = frames.
channels() - nChannels;
144 if ( nChannels == 1 ) {
145 for (
unsigned int i=0; i<frames.
frames(); i++, samples += hop )
149 for (
unsigned int i=0; i<frames.
frames(); i++, samples += hop ) {
151 for ( j=1; j<nChannels; j++ )
152 *samples++ = lastFrame_[j];
STK linear line envelope class.
Definition Envelope.h:23
void setTarget(StkFloat target)
Set the target value.
STK instrument abstract base class.
Definition Instrmnt.h:20
STK noise generator.
Definition Noise.h:22
STK one-pole filter class.
Definition OnePole.h:21
STK one-zero filter class.
Definition OneZero.h:21
StkFloat tick(StkFloat input)
Input one sample to the filter and return one output.
Definition OneZero.h:79
STK "singing" looped soundfile class.
Definition SingWave.h:26
void noteOn(void)
Start a note.
Definition SingWave.h:72
void setSweepRate(StkFloat rate)
Set the sweep rate.
Definition SingWave.h:63
void setGainTarget(StkFloat target)
Set the gain target value.
Definition SingWave.h:69
An STK class to handle vectorized audio data.
Definition Stk.h:279
unsigned int channels(void) const
Return the number of channels represented by the data.
Definition Stk.h:416
unsigned int frames(void) const
Return the number of sample frames represented by the data.
Definition Stk.h:419
The STK namespace.
Definition ADSR.h:6