58 Saxofony( StkFloat lowestFrequency );
79 void noteOn( StkFloat frequency, StkFloat amplitude );
82 void noteOff( StkFloat amplitude );
88 StkFloat
tick(
unsigned int channel = 0 );
109 StkFloat outputGain_;
111 StkFloat vibratoGain_;
118 StkFloat pressureDiff;
119 StkFloat breathPressure;
123 breathPressure = envelope_.
tick();
124 breathPressure += breathPressure * noiseGain_ * noise_.
tick();
125 breathPressure += breathPressure * vibratoGain_ * vibrato_.
tick();
127 temp = -0.95 * filter_.
tick( delays_[0].
lastOut() );
128 lastFrame_[0] = temp - delays_[1].
lastOut();
129 pressureDiff = breathPressure - lastFrame_[0];
130 delays_[1].
tick( temp );
131 delays_[0].
tick( breathPressure - (pressureDiff * reedTable_.
tick(pressureDiff)) - temp );
133 lastFrame_[0] *= outputGain_;
134 return lastFrame_[0];
139 unsigned int nChannels = lastFrame_.
channels();
140 #if defined(_STK_DEBUG_)
141 if ( channel > frames.
channels() - nChannels ) {
142 oStream_ <<
"Saxofony::tick(): channel and StkFrames arguments are incompatible!";
147 StkFloat *samples = &frames[channel];
148 unsigned int j, hop = frames.
channels() - nChannels;
149 if ( nChannels == 1 ) {
150 for (
unsigned int i=0; i<frames.
frames(); i++, samples += hop )
154 for (
unsigned int i=0; i<frames.
frames(); i++, samples += hop ) {
156 for ( j=1; j<nChannels; j++ )
157 *samples++ = lastFrame_[j];