 
    
   
Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial
   38   DelayA( StkFloat delay = 0.5, 
unsigned long maxDelay = 4095 );
 
   66   StkFloat 
getDelay( 
void )
 const { 
return delay_; };
 
   74   StkFloat 
tapOut( 
unsigned long tapDelay );
 
   77   void tapIn( StkFloat value, 
unsigned long tapDelay );
 
   80   StkFloat 
lastOut( 
void )
 const { 
return lastFrame_[0]; };
 
   89   StkFloat 
tick( StkFloat input );
 
  115   unsigned long inPoint_;
 
  116   unsigned long outPoint_;
 
  121   StkFloat nextOutput_;
 
  129     nextOutput_ = -coeff_ * lastFrame_[0];
 
  130     nextOutput_ += apInput_ + ( coeff_ * inputs_[outPoint_] );
 
  139   inputs_[inPoint_++] = input * gain_;
 
  142   if ( inPoint_ == inputs_.
size() )
 
  149   apInput_ = inputs_[outPoint_++];
 
  150   if ( outPoint_ == inputs_.
size() )
 
  153   return lastFrame_[0];
 
  158 #if defined(_STK_DEBUG_) 
  159   if ( channel >= frames.
channels() ) {
 
  160     oStream_ << 
"DelayA::tick(): channel and StkFrames arguments are incompatible!";
 
  165   StkFloat *samples = &frames[channel];
 
  166   unsigned int hop = frames.
channels();
 
  167   for ( 
unsigned int i=0; i<frames.
frames(); i++, samples += hop ) {
 
  168     inputs_[inPoint_++] = *samples * gain_;
 
  169     if ( inPoint_ == inputs_.
size() ) inPoint_ = 0;
 
  171     lastFrame_[0] = *samples;
 
  173     apInput_ = inputs_[outPoint_++];
 
  174     if ( outPoint_ == inputs_.
size() ) outPoint_ = 0;
 
  182 #if defined(_STK_DEBUG_) 
  184     oStream_ << 
"DelayA::tick(): channel and StkFrames arguments are incompatible!";
 
  189   StkFloat *iSamples = &iFrames[iChannel];
 
  190   StkFloat *oSamples = &oFrames[oChannel];
 
  192   for ( 
unsigned int i=0; i<iFrames.
frames(); i++, iSamples += iHop, oSamples += oHop ) {
 
  193     inputs_[inPoint_++] = *iSamples * gain_;
 
  194     if ( inPoint_ == inputs_.
size() ) inPoint_ = 0;
 
  196     lastFrame_[0] = *oSamples;
 
  198     apInput_ = inputs_[outPoint_++];
 
  199     if ( outPoint_ == inputs_.
size() ) outPoint_ = 0;
 
  
void setMaximumDelay(unsigned long delay)
Set the maximum delay-line length.
DelayA(StkFloat delay=0.5, unsigned long maxDelay=4095)
Default constructor creates a delay-line with maximum length of 4095 samples and delay = 0....
unsigned int frames(void) const
Return the number of sample frames represented by the data.
Definition: Stk.h:407
size_t size() const
Returns the total number of audio samples represented by the object.
Definition: Stk.h:362
StkFloat tick(StkFloat input)
Input one sample to the filter and return one output.
Definition: DelayA.h:137
~DelayA()
Class destructor.
unsigned long getMaximumDelay(void)
Get the maximum delay-line length.
Definition: DelayA.h:47
An STK class to handle vectorized audio data.
Definition: Stk.h:276
void setDelay(StkFloat delay)
Set the delay-line length.
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 tapOut(unsigned long tapDelay)
Return the value at tapDelay samples from the delay-line input.
STK allpass interpolating delay line class.
Definition: DelayA.h:29
StkFloat nextOut(void)
Return the value which will be output by the next call to tick().
Definition: DelayA.h:125
StkFloat getDelay(void) const
Return the current delay-line length.
Definition: DelayA.h:66
The STK namespace.
Definition: ADSR.h:6
void clear(void)
Clears all internal states of the delay line.
void tapIn(StkFloat value, unsigned long tapDelay)
Set the value at tapDelay samples from the delay-line input.
STK abstract filter class.
Definition: Filter.h:23
StkFloat lastOut(void) const
Return the last computed output value.
Definition: DelayA.h:80