 
    
   
Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial
   38   Twang( StkFloat lowestFrequency = 50.0 );
 
   74   StkFloat 
lastOut( 
void ) { 
return lastOutput_; };
 
   77   StkFloat 
tick( StkFloat input );
 
  107   StkFloat lastOutput_;
 
  110   StkFloat pluckPosition_;
 
  115   lastOutput_ = delayLine_.
tick( input + loopFilter_.
tick( delayLine_.
lastOut() ) );
 
  116   lastOutput_ -= combDelay_.
tick( lastOutput_ ); 
 
  124 #if defined(_STK_DEBUG_) 
  125   if ( channel >= frames.
channels() ) {
 
  126     oStream_ << 
"Twang::tick(): channel and StkFrames arguments are incompatible!";
 
  131   StkFloat *samples = &frames[channel];
 
  132   unsigned int hop = frames.
channels();
 
  133   for ( 
unsigned int i=0; i<frames.
frames(); i++, samples += hop )
 
  134     *samples = 
tick( *samples );
 
  141 #if defined(_STK_DEBUG_) 
  143     oStream_ << 
"Twang::tick(): channel and StkFrames arguments are incompatible!";
 
  148   StkFloat *iSamples = &iFrames[iChannel];
 
  149   StkFloat *oSamples = &oFrames[oChannel];
 
  151   for ( 
unsigned int i=0; i<iFrames.
frames(); i++, iSamples += iHop, oSamples += oHop )
 
  152     *oSamples = 
tick( *iSamples );
 
  
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
STK enhanced plucked string class.
Definition: Twang.h:34
void clear(void)
Reset and clear all internal state.
void setPluckPosition(StkFloat position)
Set the pluck or "excitation" position along the string (0.0 - 1.0).
STK linear interpolating delay line class.
Definition: DelayL.h:27
An STK class to handle vectorized audio data.
Definition: Stk.h:275
void setLoopFilter(std::vector< StkFloat > coefficients)
Set the loop filter coefficients.
unsigned int channels(void) const
Return the number of channels represented by the data.
Definition: Stk.h:404
STK general finite impulse response filter class.
Definition: Fir.h:30
static void handleError(const char *message, StkError::Type type)
Static function for error reporting and handling using c-strings.
Twang(StkFloat lowestFrequency=50.0)
Class constructor, taking the lowest desired playing frequency.
StkFloat tick(StkFloat input)
Compute and return one output sample.
Definition: Twang.h:113
STK allpass interpolating delay line class.
Definition: DelayA.h:28
void setLowestFrequency(StkFloat frequency)
Set the delayline parameters to allow frequencies as low as specified.
void setFrequency(StkFloat frequency)
Set the delayline parameters for a particular frequency.
StkFloat tick(StkFloat input)
Input one sample to the filter and return one output.
Definition: DelayL.h:163
void setLoopGain(StkFloat loopGain)
Set the nominal loop gain.
The STK namespace.
Definition: ADSR.h:6
StkFloat tick(StkFloat input)
Input one sample to the filter and return one output.
Definition: Fir.h:86
StkFloat lastOut(void) const
Return the last computed output value.
Definition: DelayA.h:80
STK base class.
Definition: Stk.h:132
StkFloat lastOut(void)
Return an StkFrames reference to the last output sample frame.
Definition: Twang.h:74