40 StifKarp( StkFloat lowestFrequency = 10.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 );
99 StkFloat baseLoopGain_;
100 StkFloat lastFrequency_;
101 StkFloat lastLength_;
102 StkFloat stretching_;
103 StkFloat pluckAmplitude_;
104 StkFloat pickupPosition_;
110 StkFloat temp = delayLine_.
lastOut() * loopGain_;
113 for (
int i=0; i<4; i++)
114 temp = biquad_[i].
tick(temp);
117 temp = filter_.
tick(temp);
119 lastFrame_[0] = delayLine_.
tick(temp);
120 lastFrame_[0] = lastFrame_[0] - combDelay_.
tick( lastFrame_[0] );
121 return lastFrame_[0];
126 unsigned int nChannels = lastFrame_.
channels();
127 #if defined(_STK_DEBUG_)
128 if ( channel > frames.
channels() - nChannels ) {
129 oStream_ <<
"StifKarp::tick(): channel and StkFrames arguments are incompatible!";
134 StkFloat *samples = &frames[channel];
135 unsigned int j, hop = frames.
channels() - nChannels;
136 if ( nChannels == 1 ) {
137 for (
unsigned int i=0; i<frames.
frames(); i++, samples += hop )
141 for (
unsigned int i=0; i<frames.
frames(); i++, samples += hop ) {
143 for ( j=1; j<nChannels; j++ )
144 *samples++ = lastFrame_[j];