40 StifKarp( StkFloat lowestFrequency = 8.0 );
66 void pluck( StkFloat amplitude );
69 void noteOn( StkFloat frequency, StkFloat amplitude );
72 void noteOff( StkFloat amplitude );
78 StkFloat
tick(
unsigned int channel = 0 );
98 unsigned long length_;
100 StkFloat baseLoopGain_;
101 StkFloat lastFrequency_;
102 StkFloat lastLength_;
103 StkFloat stretching_;
104 StkFloat pluckAmplitude_;
105 StkFloat pickupPosition_;
111 StkFloat temp = delayLine_.
lastOut() * loopGain_;
114 for (
int i=0; i<4; i++)
115 temp = biquad_[i].
tick(temp);
118 temp = filter_.
tick(temp);
120 lastFrame_[0] = delayLine_.
tick(temp);
121 lastFrame_[0] = lastFrame_[0] - combDelay_.
tick( lastFrame_[0] );
122 return lastFrame_[0];
127 unsigned int nChannels = lastFrame_.
channels();
128 #if defined(_STK_DEBUG_)
129 if ( channel > frames.
channels() - nChannels ) {
130 oStream_ <<
"StifKarp::tick(): channel and StkFrames arguments are incompatible!";
135 StkFloat *samples = &frames[channel];
136 unsigned int j, hop = frames.
channels() - nChannels;
137 if ( nChannels == 1 ) {
138 for (
unsigned int i=0; i<frames.
frames(); i++, samples += hop )
142 for (
unsigned int i=0; i<frames.
frames(); i++, samples += hop ) {
144 for ( j=1; j<nChannels; j++ )
145 *samples++ = lastFrame_[j];