42 Mandolin( StkFloat lowestFrequency );
63 void pluck( StkFloat amplitude );
66 void pluck( StkFloat amplitude,StkFloat position );
69 void noteOn( StkFloat frequency, StkFloat amplitude );
72 void noteOff( StkFloat amplitude );
78 StkFloat
tick(
unsigned int channel = 0 );
98 StkFloat pluckAmplitude_;
104 if ( !soundfile_[mic_].isFinished() )
105 temp = soundfile_[mic_].
tick() * pluckAmplitude_;
107 lastFrame_[0] = strings_[0].
tick( temp );
108 lastFrame_[0] += strings_[1].
tick( temp );
109 lastFrame_[0] *= 0.2;
111 return lastFrame_[0];
116 unsigned int nChannels = lastFrame_.
channels();
117 #if defined(_STK_DEBUG_)
118 if ( channel > frames.
channels() - nChannels ) {
119 oStream_ <<
"Mandolin::tick(): channel and StkFrames arguments are incompatible!";
124 StkFloat *samples = &frames[channel];
125 unsigned int j, hop = frames.
channels() - nChannels;
126 if ( nChannels == 1 ) {
127 for (
unsigned int i=0; i<frames.
frames(); i++, samples += hop )
131 for (
unsigned int i=0; i<frames.
frames(); i++, samples += hop ) {
133 for ( j=1; j<nChannels; j++ )
134 *samples++ = lastFrame_[j];