 
    
   
Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial
   36   Sitar( StkFloat lowestFrequency = 8.0 );
 
   48   void pluck( StkFloat amplitude );
 
   51   void noteOn( StkFloat frequency, StkFloat amplitude );
 
   57   StkFloat 
tick( 
unsigned int channel = 0 );
 
   79   StkFloat targetDelay_;
 
   85   if ( fabs(targetDelay_ - delay_) > 0.001 ) {
 
   86     if ( targetDelay_ < delay_ )
 
   93   lastFrame_[0] = delayLine_.
tick( loopFilter_.
tick( delayLine_.
lastOut() * loopGain_ ) + 
 
   94                                 (amGain_ * envelope_.
tick() * noise_.
tick()));
 
  101   unsigned int nChannels = lastFrame_.
channels();
 
  102 #if defined(_STK_DEBUG_) 
  103   if ( channel > frames.
channels() - nChannels ) {
 
  104     oStream_ << 
"Sitar::tick(): channel and StkFrames arguments are incompatible!";
 
  109   StkFloat *samples = &frames[channel];
 
  110   unsigned int j, hop = frames.
channels() - nChannels;
 
  111   if ( nChannels == 1 ) {
 
  112     for ( 
unsigned int i=0; i<frames.
frames(); i++, samples += hop )
 
  116     for ( 
unsigned int i=0; i<frames.
frames(); i++, samples += hop ) {
 
  118       for ( j=1; j<nChannels; j++ )
 
  119         *samples++ = lastFrame_[j];
 
  
void noteOn(StkFloat frequency, StkFloat amplitude)
Start a note with the given frequency and amplitude.
STK ADSR envelope class.
Definition: ADSR.h:25
void pluck(StkFloat amplitude)
Pluck the string with the given amplitude using the current frequency.
unsigned int frames(void) const
Return the number of sample frames represented by the data.
Definition: Stk.h:407
StkFloat tick(StkFloat input)
Input one sample to the filter and return one output.
Definition: DelayA.h:137
StkFloat tick(unsigned int channel=0)
Compute and return one output sample.
Definition: Sitar.h:83
void setFrequency(StkFloat frequency)
Set instrument parameters for a particular frequency.
StkFloat tick(void)
Compute and return one output sample.
Definition: Noise.h:59
An STK class to handle vectorized audio data.
Definition: Stk.h:276
void setDelay(StkFloat delay)
Set the delay-line length.
StkFloat tick(StkFloat input)
Input one sample to the filter and return one output.
Definition: OneZero.h:79
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.
void clear(void)
Reset and clear all internal state.
Sitar(StkFloat lowestFrequency=8.0)
Class constructor, taking the lowest desired playing frequency.
STK allpass interpolating delay line class.
Definition: DelayA.h:29
void noteOff(StkFloat amplitude)
Stop a note with the given amplitude (speed of decay).
STK one-zero filter class.
Definition: OneZero.h:21
STK noise generator.
Definition: Noise.h:22
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:20
~Sitar(void)
Class destructor.
StkFloat lastOut(void) const
Return the last computed output value.
Definition: DelayA.h:80
STK sitar string model class.
Definition: Sitar.h:33