36 Sitar( StkFloat lowestFrequency = 8.0 );
48 void pluck( StkFloat amplitude );
51 void noteOn( StkFloat frequency, StkFloat amplitude );
54 void noteOff( StkFloat amplitude );
57 StkFloat
tick(
unsigned int channel = 0 );
79 StkFloat targetDelay_;
85 if ( fabs(targetDelay_ - delay_) > 0.001 ) {
86 if ( targetDelay_ < delay_ )
93 lastFrame_[0] = delayLine_.
tick( loopFilter_.
tick( delayLine_.
lastOut() * loopGain_ ) +
94 (amGain_ * envelope_.
tick() * noise_.
tick()));
101 unsigned int nChannels = lastFrame_.
channels();
102 #if defined(_STK_DEBUG_)
103 if ( channel > frames.
channels() - nChannels ) {
104 oStream_ <<
"Sitar::tick(): channel and StkFrames arguments are incompatible!";
109 StkFloat *samples = &frames[channel];
110 unsigned int j, hop = frames.
channels() - nChannels;
111 if ( nChannels == 1 ) {
112 for (
unsigned int i=0; i<frames.
frames(); i++, samples += hop )
116 for (
unsigned int i=0; i<frames.
frames(); i++, samples += hop ) {
118 for ( j=1; j<nChannels; j++ )
119 *samples++ = lastFrame_[j];