 
    
   
Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial
   81   void noteOn( StkFloat frequency, StkFloat amplitude );
 
   90   StkFloat 
tick( 
unsigned int channel = 0 );
 
  116   StkFloat outputGain_;
 
  118   StkFloat vibratoGain_;
 
  123   StkFloat pressureDiff;
 
  124   StkFloat breathPressure;
 
  128   breathPressure = envelope_.
tick(); 
 
  129   breathPressure += breathPressure * noiseGain_ * noise_.
tick();
 
  130   breathPressure += breathPressure * vibratoGain_ * vibrato_.
tick();
 
  133   pressureDiff = delays_[0].
lastOut() - breathPressure;
 
  136   StkFloat pa = breathPressure + pressureDiff * reedTable_.
tick( pressureDiff );
 
  137   StkFloat pb = delays_[1].
lastOut();
 
  140   lastFrame_[0] = delays_[0].
tick( vent_.
lastOut()+pb );
 
  141   lastFrame_[0] *= outputGain_;
 
  146   StkFloat pth = tonehole_.
lastOut();
 
  147   temp = scatter_ * (pa + pb - 2 * pth);
 
  149   delays_[2].
tick( filter_.
tick(pa + temp) * -0.95 );
 
  150   delays_[1].
tick( pb + temp );
 
  151   tonehole_.
tick( pa + pb - pth + temp );
 
  153   return lastFrame_[0];
 
  158   unsigned int nChannels = lastFrame_.
channels();
 
  159 #if defined(_STK_DEBUG_) 
  160   if ( channel > frames.
channels() - nChannels ) {
 
  161     oStream_ << 
"BlowHole::tick(): channel and StkFrames arguments are incompatible!";
 
  166   StkFloat *samples = &frames[channel];
 
  167   unsigned int j, hop = frames.
channels() - nChannels;
 
  168   if ( nChannels == 1 ) {
 
  169     for ( 
unsigned int i=0; i<frames.
frames(); i++, samples += hop )
 
  173     for ( 
unsigned int i=0; i<frames.
frames(); i++, samples += hop ) {
 
  175       for ( j=1; j<nChannels; j++ )
 
  176         *samples++ = lastFrame_[j];
 
  
void setTonehole(StkFloat newValue)
Set the tonehole state (0.0 = closed, 1.0 = fully open).
STK sinusoid oscillator class.
Definition: SineWave.h:26
STK reed table class.
Definition: ReedTable.h:28
unsigned int frames(void) const
Return the number of sample frames represented by the data.
Definition: Stk.h:407
void noteOff(StkFloat amplitude)
Stop a note with the given amplitude (speed of decay).
StkFloat tick(StkFloat input)
Take one sample input and map to one sample of output.
Definition: ReedTable.h:81
StkFloat tick(void)
Compute and return one output sample.
Definition: Noise.h:59
void startBlowing(StkFloat amplitude, StkFloat rate)
Apply breath pressure to instrument with given amplitude and rate of increase.
STK linear interpolating delay line class.
Definition: DelayL.h:28
StkFloat lastOut(void) const
Return the last computed output value.
Definition: DelayL.h:76
An STK class to handle vectorized audio data.
Definition: Stk.h:276
void stopBlowing(StkFloat rate)
Decrease breath pressure with given rate of decrease.
STK clarinet physical model with one register hole and one tonehole.
Definition: BlowHole.h:51
StkFloat tick(void)
Compute and return one output sample.
Definition: SineWave.h:99
StkFloat tick(StkFloat input)
Input one sample to the filter and return one output.
Definition: OneZero.h:79
STK linear line envelope class.
Definition: Envelope.h:22
StkFloat tick(void)
Compute and return one output sample.
Definition: Envelope.h:88
unsigned int channels(void) const
Return the number of channels represented by the data.
Definition: Stk.h:404
static void handleError(const char *message, StkError::Type type)
Static function for error reporting and handling using c-strings.
StkFloat tick(StkFloat input)
Input one sample to the filter and return one output.
Definition: PoleZero.h:79
void controlChange(int number, StkFloat value)
Perform the control change specified by number and value (0.0 - 128.0).
~BlowHole(void)
Class destructor.
void setVent(StkFloat newValue)
Set the register hole state (0.0 = closed, 1.0 = fully open).
STK one-zero filter class.
Definition: OneZero.h:21
StkFloat tick(StkFloat input)
Input one sample to the filter and return one output.
Definition: DelayL.h:163
BlowHole(StkFloat lowestFrequency)
Class constructor.
STK noise generator.
Definition: Noise.h:22
The STK namespace.
Definition: ADSR.h:6
void setFrequency(StkFloat frequency)
Set instrument parameters for a particular frequency.
StkFloat tick(unsigned int channel=0)
Compute and return one output sample.
Definition: BlowHole.h:121
STK one-pole, one-zero filter class.
Definition: PoleZero.h:22
STK instrument abstract base class.
Definition: Instrmnt.h:20
void noteOn(StkFloat frequency, StkFloat amplitude)
Start a note with the given frequency and amplitude.
void clear(void)
Reset and clear all internal state.
StkFloat lastOut(void) const
Return the last computed output value.
Definition: PoleZero.h:62