 
    
   
Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial
   54   void noteOn( StkFloat frequency, StkFloat amplitude );
 
   57   void noteOff( StkFloat amplitude );
 
   63   StkFloat 
tick( 
unsigned int channel = 0 );
 
   82   StkFloat  baseFrequency_;
 
   89   lastFrame_[0] = loopGain_ * loop_->
tick();
 
   91   lastFrame_[0] += (1.0 - loopGain_) * biquad_.
lastOut();
 
   92   lastFrame_[0] = filter_.
tick( lastFrame_[0] );
 
   93   lastFrame_[0] *= adsr_.
tick();
 
   99   unsigned int nChannels = lastFrame_.
channels();
 
  100 #if defined(_STK_DEBUG_) 
  101   if ( channel > frames.
channels() - nChannels ) {
 
  102     oStream_ << 
"Simple::tick(): channel and StkFrames arguments are incompatible!";
 
  107   StkFloat *samples = &frames[channel];
 
  108   unsigned int j, hop = frames.
channels() - nChannels;
 
  109   if ( nChannels == 1 ) {
 
  110     for ( 
unsigned int i=0; i<frames.
frames(); i++, samples += hop )
 
  114     for ( 
unsigned int i=0; i<frames.
frames(); i++, samples += hop ) {
 
  116       for ( j=1; j<nChannels; j++ )
 
  117         *samples++ = lastFrame_[j];
 
  
void setFrequency(StkFloat frequency)
Set instrument parameters for a particular frequency.
void controlChange(int number, StkFloat value)
Perform the control change specified by number and value (0.0 - 128.0).
STK one-pole filter class.
Definition: OnePole.h:20
STK ADSR envelope class.
Definition: ADSR.h:24
void noteOff(StkFloat amplitude)
Stop a note with the given amplitude (speed of decay).
unsigned int frames(void) const
Return the number of sample frames represented by the data.
Definition: Stk.h:407
STK biquad (two-pole, two-zero) filter class.
Definition: BiQuad.h:20
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 wavetable/noise instrument.
Definition: Simple.h:32
~Simple(void)
Class destructor.
StkFloat tick(unsigned int channel=0)
Compute a sample frame and return the specified channel value.
An STK class to handle vectorized audio data.
Definition: Stk.h:275
void keyOn(void)
Start envelope toward "on" target.
StkFloat lastOut(void) const
Return the last computed output value.
Definition: BiQuad.h:87
Simple(void)
Class constructor.
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.
STK file looping / oscillator class.
Definition: FileLoop.h:26
void noteOn(StkFloat frequency, StkFloat amplitude)
Start a note with the given frequency and amplitude.
STK noise generator.
Definition: Noise.h:21
The STK namespace.
Definition: ADSR.h:6
StkFloat tick(void)
Compute and return one output sample.
Definition: ADSR.h:115
STK instrument abstract base class.
Definition: Instrmnt.h:19
StkFloat tick(StkFloat input)
Input one sample to the filter and return a reference to one output.
Definition: BiQuad.h:119
void keyOff(void)
Start envelope toward "off" target.
StkFloat tick(unsigned int channel=0)
Compute and return one output sample.
Definition: Simple.h:87