csl::LPCAnalyzer Class Reference

#include <LPC.h>

Inheritance diagram for csl::LPCAnalyzer:

csl::Effect csl::UnitGenerator csl::Controllable csl::Model

List of all members.

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.
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.
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


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)

Constructor & Destructor Documentation

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

LPCAnalyzer::~LPCAnalyzer (  ) 

References closeFiles().


Member Function Documentation

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

no setters

References mWindowSize.

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

References mHopSize.

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

References mLPCOrder.

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

References mLPCCoefficients.

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

References mLPCResidual.

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

References mPredErr.

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

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

References mPreEmphasis.

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

References mBWExpansion.

void LPCAnalyzer::closeFiles (  ) 

close the files

References mCoeffFile, and mResidFile.

Referenced by ~LPCAnalyzer().

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

References mOverwriteOutput.

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

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

References mUseWindow.

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


Member Data Documentation

unsigned csl::LPCAnalyzer::mWindowSize [protected]

input window size

Referenced by LPCAnalyzer(), setFileNames(), and windowSize().

unsigned csl::LPCAnalyzer::mHopSize [protected]

input hop size

Referenced by hopSize(), and setFileNames().

unsigned csl::LPCAnalyzer::mLPCOrder [protected]

LPC order.

Referenced by LPCOrder(), and setFileNames().

double csl::LPCAnalyzer::mPredErr [protected]

LPC pred.error.

Referenced by getError().

double csl::LPCAnalyzer::mPreEmphasis [protected]

LPC pre-emph factor.

Referenced by setFileNames(), and setPreEmphasis().

double csl::LPCAnalyzer::mBWExpansion [protected]

LPC bandwidth expansion factor.

Referenced by setBWExpansion().

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

Referenced by setOverwrite().

bool csl::LPCAnalyzer::mUseWindow [protected]

whether to use a rectangular or Hamming window

Referenced by setUseWindow().

Protected buffers and analysis objects.

the input buffer

Referenced by LPCAnalyzer().

Buffer to store window.

Referenced by LPCAnalyzer().

the LPC reflection coefficients

Referenced by getCoefficients(), and LPCAnalyzer().

the LPC filter coefficients

Referenced by LPCAnalyzer().

the LPC filter input store

Referenced by LPCAnalyzer().

the LPC PC coefficients

Referenced by LPCAnalyzer().

the LPC residual

Referenced by getResidual(), and LPCAnalyzer().

used for the analysis UGens

Referenced by LPCAnalyzer().

Filters and FFT for analysis.

low-pass filter

Referenced by LPCAnalyzer().

hi-pass filter

Referenced by LPCAnalyzer().

FFT for pitch est.

Referenced by LPCAnalyzer().

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

file ptr for the coefficient file

Referenced by closeFiles(), and setFileNames().

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

sound file for the residual file

Referenced by closeFiles(), and setFileNames().


The documentation for this class was generated from the following files:

Generated on Thu Sep 17 23:14:17 2009 for CSL by  doxygen 1.5.8