 
    
   
Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial
   46   Flute( StkFloat lowestFrequency );
 
   73   void noteOn( StkFloat frequency, StkFloat amplitude );
 
   76   void noteOff( StkFloat amplitude );
 
   82   StkFloat 
tick( 
unsigned int channel = 0 );
 
  105   StkFloat lastFrequency_;
 
  106   StkFloat maxPressure_;
 
  107   StkFloat jetReflection_;
 
  108   StkFloat endReflection_;
 
  110   StkFloat vibratoGain_;
 
  111   StkFloat outputGain_;
 
  118   StkFloat pressureDiff;
 
  119   StkFloat breathPressure;
 
  122   breathPressure = maxPressure_ * adsr_.
tick();
 
  123   breathPressure += breathPressure * ( noiseGain_ * noise_.
tick() + vibratoGain_ * vibrato_.
tick() );
 
  125   StkFloat temp = -filter_.
tick( boreDelay_.
lastOut() );
 
  126   temp = dcBlock_.
tick( temp ); 
 
  128   pressureDiff = breathPressure - (jetReflection_ * temp);
 
  129   pressureDiff = jetDelay_.
tick( pressureDiff );
 
  130   pressureDiff = jetTable_.
tick( pressureDiff ) + (endReflection_ * temp);
 
  131   lastFrame_[0] = (StkFloat) 0.3 * boreDelay_.
tick( pressureDiff );
 
  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_ << 
"Flute::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];
 
  
STK one-pole filter class.
Definition: OnePole.h:20
STK jet table class.
Definition: JetTable.h:23
STK ADSR envelope class.
Definition: ADSR.h:24
STK sinusoid oscillator class.
Definition: SineWave.h:25
void noteOn(StkFloat frequency, StkFloat amplitude)
Start a note with the given frequency and amplitude.
~Flute(void)
Class destructor.
unsigned int frames(void) const
Return the number of sample frames represented by the data.
Definition: Stk.h:407
void setFrequency(StkFloat frequency)
Set instrument parameters for a particular frequency.
StkFloat tick(void)
Compute and return one output sample.
Definition: Noise.h:59
StkFloat tick(StkFloat input)
Input one sample to the filter and return one output.
Definition: OnePole.h:80
STK linear interpolating delay line class.
Definition: DelayL.h:27
Flute(StkFloat lowestFrequency)
Class constructor, taking the lowest desired playing frequency.
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:275
void stopBlowing(StkFloat rate)
Decrease breath velocity with given rate of decrease.
StkFloat tick(void)
Compute and return one output sample.
Definition: SineWave.h:99
StkFloat tick(StkFloat input)
Take one sample input and map to one sample of output.
Definition: JetTable.h:54
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
STK flute physical model class.
Definition: Flute.h:39
void setJetDelay(StkFloat aRatio)
Set the length of the jet delay in terms of a ratio of jet delay to air column delay lengths.
void startBlowing(StkFloat amplitude, StkFloat rate)
Apply breath velocity to instrument with given amplitude and rate of increase.
void setEndReflection(StkFloat coefficient)
Set the reflection coefficient for the air column delay (-1.0 - 1.0).
Definition: Flute.h:61
void noteOff(StkFloat amplitude)
Stop a note with the given amplitude (speed of decay).
StkFloat tick(unsigned int channel=0)
Compute and return one output sample.
Definition: Flute.h:116
StkFloat tick(StkFloat input)
Input one sample to the filter and return one output.
Definition: DelayL.h:163
STK noise generator.
Definition: Noise.h:21
The STK namespace.
Definition: ADSR.h:6
STK one-pole, one-zero filter class.
Definition: PoleZero.h:21
StkFloat tick(void)
Compute and return one output sample.
Definition: ADSR.h:115
STK instrument abstract base class.
Definition: Instrmnt.h:19
void setJetReflection(StkFloat coefficient)
Set the reflection coefficient for the jet delay (-1.0 - 1.0).
Definition: Flute.h:58
void controlChange(int number, StkFloat value)
Perform the control change specified by number and value (0.0 - 128.0).
void clear(void)
Reset and clear all internal state.