csl::LPCAnalyzer Class Reference

#include <LPC.h>

Inheritance diagram for csl::LPCAnalyzer:

csl::Effect List of all members.

Detailed Description

LPCAnalyzer class takes LPC analysis and returns coefficients and the residual It can write these to two files (if you set the file names), or signal its observers (who would grab its internal state via the getter methods)


Public Member Functions

 LPCAnalyzer (UnitGenerator &in, unsigned size=CGestalt::blockSize(), unsigned hopSize=CGestalt::blockSize(), unsigned order=50)
 Forward FFT = analysis.
 ~LPCAnalyzer ()
unsigned windowSize ()
 no setters
unsigned hopSize ()
unsigned LPCOrder ()
Buffer getCoefficients ()
Buffer getResidual ()
double getError ()
void setFileNames (char *coeff, char *resid)
 set the file names and open the files
void setPreEmphasis (double factor)
void setBWExpansion (double factor)
void closeFiles ()
 close the files
void setOverwrite (bool reuse)
void setUseWindow (bool use)
 analyze a buffer, write it out if the files are set, then signal your observers
void nextBuffer (Buffer &outputBuffer, unsigned outBufNum) throw (CException)

Protected Attributes

unsigned mWindowSize
 input window size
unsigned mHopSize
 input hop size
unsigned mLPCOrder
 LPC order.
double mPredErr
 LPC pred.error.
double mPreEmphasis
 LPC pre-emph factor.
double mBWExpansion
 LPC bandwidth expansion factor.
bool mOverwriteOutput
 whether to replace the output with the input (or the residual) after signalling observers
bool mUseWindow
Buffer mTempBuffer
 Protected buffers and analysis objects the input buffer.
Buffer mWindowBuffer
 Buffer to store window.
Buffer mLPCCoefficients
 the LPC reflection coefficients
Buffer mFilterCoefficients
 the LPC filter coefficients
Buffer mFilterInput
 the LPC filter input store
Buffer mPCCoefficients
 the LPC PC coefficients
Buffer mLPCResidual
 the LPC residual
RingBuffer mRing
ButtermLoPass
 Filters and FFT for analysis low-pass filter.
ButtermHiPass
 hi-pass filter
FFTmFFT
 FFT for pitch est.
FILE * mCoeffFile
 file ptr for the coefficient file
SoundFile * mResidFile
 sound file for the residual file


Constructor & Destructor Documentation

LPCAnalyzer::LPCAnalyzer UnitGenerator in,
unsigned  size = CGestalt::blockSize(),
unsigned  hopSize = CGestalt::blockSize(),
unsigned  order = 50
 

Forward FFT = analysis.

LPCAnalyzer::~LPCAnalyzer  ) 
 


Member Function Documentation

unsigned csl::LPCAnalyzer::windowSize  )  [inline]
 

no setters

unsigned csl::LPCAnalyzer::hopSize  )  [inline]
 

unsigned csl::LPCAnalyzer::LPCOrder  )  [inline]
 

Buffer csl::LPCAnalyzer::getCoefficients  )  [inline]
 

Buffer csl::LPCAnalyzer::getResidual  )  [inline]
 

double csl::LPCAnalyzer::getError  )  [inline]
 

void LPCAnalyzer::setFileNames char *  coeff,
char *  resid
 

set the file names and open the files

void csl::LPCAnalyzer::setPreEmphasis double  factor  )  [inline]
 

void csl::LPCAnalyzer::setBWExpansion double  factor  )  [inline]
 

void LPCAnalyzer::closeFiles  ) 
 

close the files

void csl::LPCAnalyzer::setOverwrite bool  reuse  )  [inline]
 

void csl::LPCAnalyzer::setUseWindow bool  use  )  [inline]
 

analyze a buffer, write it out if the files are set, then signal your observers

void LPCAnalyzer::nextBuffer Buffer outputBuffer,
unsigned  outBufNum
throw (CException)
 


Member Data Documentation

unsigned csl::LPCAnalyzer::mWindowSize [protected]
 

input window size

unsigned csl::LPCAnalyzer::mHopSize [protected]
 

input hop size

unsigned csl::LPCAnalyzer::mLPCOrder [protected]
 

LPC order.

double csl::LPCAnalyzer::mPredErr [protected]
 

LPC pred.error.

double csl::LPCAnalyzer::mPreEmphasis [protected]
 

LPC pre-emph factor.

double csl::LPCAnalyzer::mBWExpansion [protected]
 

LPC bandwidth expansion factor.

bool csl::LPCAnalyzer::mOverwriteOutput [protected]
 

whether to replace the output with the input (or the residual) after signalling observers

bool csl::LPCAnalyzer::mUseWindow [protected]
 

whether to use a rectangular or Hamming window

Buffer csl::LPCAnalyzer::mTempBuffer [protected]
 

Protected buffers and analysis objects the input buffer.

Buffer csl::LPCAnalyzer::mWindowBuffer [protected]
 

Buffer to store window.

Buffer csl::LPCAnalyzer::mLPCCoefficients [protected]
 

the LPC reflection coefficients

Buffer csl::LPCAnalyzer::mFilterCoefficients [protected]
 

the LPC filter coefficients

Buffer csl::LPCAnalyzer::mFilterInput [protected]
 

the LPC filter input store

Buffer csl::LPCAnalyzer::mPCCoefficients [protected]
 

the LPC PC coefficients

Buffer csl::LPCAnalyzer::mLPCResidual [protected]
 

the LPC residual

RingBuffer csl::LPCAnalyzer::mRing [protected]
 

used for the analysis UGens

Butter* csl::LPCAnalyzer::mLoPass [protected]
 

Filters and FFT for analysis low-pass filter.

Butter* csl::LPCAnalyzer::mHiPass [protected]
 

hi-pass filter

FFT* csl::LPCAnalyzer::mFFT [protected]
 

FFT for pitch est.

FILE* csl::LPCAnalyzer::mCoeffFile [protected]
 

file ptr for the coefficient file

SoundFile* csl::LPCAnalyzer::mResidFile [protected]
 

sound file for the residual file


The documentation for this class was generated from the following files:
Generated on Sat Oct 17 14:12:36 2009 for CSL by  doxygen 1.4.5-20051010