54 void noteOn( StkFloat frequency, StkFloat amplitude );
57 void noteOff( StkFloat amplitude );
63 StkFloat
tick(
unsigned int channel = 0 );
82 StkFloat baseFrequency_;
89 lastFrame_[0] = loopGain_ * loop_->
tick();
91 lastFrame_[0] += (1.0 - loopGain_) * biquad_.
lastOut();
92 lastFrame_[0] = filter_.
tick( lastFrame_[0] );
93 lastFrame_[0] *= adsr_.
tick();
99 unsigned int nChannels = lastFrame_.
channels();
100 #if defined(_STK_DEBUG_)
101 if ( channel > frames.
channels() - nChannels ) {
102 oStream_ <<
"Simple::tick(): channel and StkFrames arguments are incompatible!";
107 StkFloat *samples = &frames[channel];
108 unsigned int j, hop = frames.
channels() - nChannels;
109 if ( nChannels == 1 ) {
110 for (
unsigned int i=0; i<frames.
frames(); i++, samples += hop )
114 for (
unsigned int i=0; i<frames.
frames(); i++, samples += hop ) {
116 for ( j=1; j<nChannels; j++ )
117 *samples++ = lastFrame_[j];