Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   Tutorial


DelayA Class Reference

#include <DelayA.h>

Inheritance diagram for DelayA:

Delay Filter Stk List of all members.

Detailed Description

STK allpass interpolating delay line class.

This Delay subclass implements a fractional- length digital delay-line using a first-order allpass filter. A fixed maximum length of 4095 and a delay of 0.5 is set using the default constructor. Alternatively, the delay and maximum length can be set during instantiation with an overloaded constructor.

An allpass filter has unity magnitude gain but variable phase delay properties, making it useful in achieving fractional delays without affecting a signal's frequency magnitude response. In order to achieve a maximally flat phase delay response, the minimum delay possible in this implementation is limited to a value of 0.5.

by Perry R. Cook and Gary P. Scavone, 1995 - 2004.

Definition at line 30 of file DelayA.h.

Public Member Functions

 DelayA ()
 Default constructor creates a delay-line with maximum length of 4095 samples and zero delay.

 DelayA (StkFloat delay, unsigned long maxDelay)
 Overloaded constructor which specifies the current and maximum delay-line lengths.

 ~DelayA ()
 Class destructor.

void clear ()
 Clears the internal state of the delay line.

void setDelay (StkFloat delay)
 Set the delay-line length.

StkFloat getDelay (void)
 Return the current delay-line length.

StkFloat nextOut (void)
 Return the value which will be output by the next call to tick().

StkFloat tick (StkFloat sample)
 Input one sample to the delayline and return one output.

virtual StkFloat * tick (StkFloat *vector, unsigned int vectorSize)
 Input vectorSize samples to the delayline and return an equal number of outputs in vector.

virtual StkFramestick (StkFrames &frames, unsigned int channel=1)
 Take a channel of the StkFrames object as inputs to the delayline and replace with corresponding outputs.


Constructor & Destructor Documentation

DelayA::DelayA StkFloat  delay,
unsigned long  maxDelay
 

Overloaded constructor which specifies the current and maximum delay-line lengths.

An StkError will be thrown if the delay parameter is less than zero, the maximum delay parameter is less than one, or the delay parameter is greater than the maxDelay value.


Member Function Documentation

void DelayA::setDelay StkFloat  delay  ) 
 

Set the delay-line length.

The valid range for theDelay is from 0.5 to the maximum delay-line length.

StkFloat DelayA::nextOut void   )  [virtual]
 

Return the value which will be output by the next call to tick().

This method is valid only for delay settings greater than zero!

Reimplemented from Delay.

virtual StkFrames& DelayA::tick StkFrames frames,
unsigned int  channel = 1
[virtual]
 

Take a channel of the StkFrames object as inputs to the delayline and replace with corresponding outputs.

The channel argument should be one or greater (the first channel is specified by 1). An StkError will be thrown if the channel argument is zero or it is greater than the number of channels in the StkFrames object.

Reimplemented from Delay.


The documentation for this class was generated from the following file:
The Synthesis ToolKit in C++ (STK)
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.