31 FilterSpecification(
unsigned numTaps = 0,
unsigned numBands = 0,
double *freqs = NULL,
double *resps = NULL,
double *weights = NULL);
85 void setTaps(
unsigned numTaps,
float *tapDelays);
100 void remez(
double h[],
int numtaps,
int numband,
double bands[],
double des[],
double weight[],
int type);
void setNumTaps(unsigned numTaps)
void resetDLine()
zero-out mDline and reallocate memory if necessary;
AdditiveInstrument.h – Sum-of-sines synthesis instrument class.
Effect – mix-in for classes that have unit generators as inputs (like filters).
sample * mDLine
mNumTaps length delay line
void nextBuffer(Buffer &outputBuffer, unsigned outBufNum)
The work method...
void setFrequencies(double *frequencies)
Accessors.
unsigned mNumTaps
number of taps desired
double * mTapData
the FIR tap weights (created by the planFilter method)
float sample
(could be changed to int, or double)
void planFilter()
method to plan the filter (execute the search/iterate algorithm)
FilterSpecification(unsigned numTaps=0, unsigned numBands=0, double *freqs=NULL, double *resps=NULL, double *weights=NULL)
Constructors.
double * mWeights
band error weights (mNumBands)
unsigned mOffset
offset "pointer" for loop counting Here are the sample buffers (dynamically allocated) ...
unsigned mNumBands
length of specification
Buffer – the multi-channel sample buffer class (passed around between generators and IO guys)...
double * mResponses
band responses (mNumBands)
FIR(UnitGenerator &in, unsigned numTaps=2, float *tapDelay=NULL)
Various constructors Takes a UGen, and optionally the number of taps and the tap IR array...
void setResponses(double *responses)
void setWeights(double *weights)
double * mFrequencies
band edge frequencies (2 * mNumBands)
void readTaps(char *fileName)
void setTaps(unsigned numTaps, float *tapDelays)
void remez(double h[], int numtaps, int numband, double bands[], double des[], double weight[], int type)
Parks-McClellan/Remez FIR filter design algorithm.
Base class of CSL exceptions (written upper-case). Has a string message.
FilterSpecification * mFilterSpec