#include <LPC.h>

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 |
| Butter * | mLoPass |
| Filters and FFT for analysis. | |
| Butter * | mHiPass |
| hi-pass filter | |
| FFT * | mFFT |
| FFT for pitch est. | |
| FILE * | mCoeffFile |
| file ptr for the coefficient file | |
| SoundFile * | mResidFile |
| sound file for the residual file | |
| LPCAnalyzer::LPCAnalyzer | ( | UnitGenerator & | in, | |
| unsigned | size = CGestalt::blockSize(), |
|||
| unsigned | hopSize = CGestalt::blockSize(), |
|||
| unsigned | order = 50 | |||
| ) |
Forward FFT = analysis.
References csl::Buffer::allocateBuffers(), BW_HIGH_PASS, BW_LOW_PASS, csl::CSL_FFT_REAL, csl::kCopy, csl::kLPCCoeff, csl::Buffer::mBuffers, csl::UnitGenerator::mCopyPolicy, mFFT, mFilterCoefficients, mFilterInput, mHiPass, mLoPass, mLPCCoefficients, mLPCResidual, mPCCoefficients, mRing, mTempBuffer, csl::Buffer::mType, mWindowBuffer, mWindowSize, and csl::Window::window().
| LPCAnalyzer::~LPCAnalyzer | ( | ) |
References closeFiles().
| unsigned csl::LPCAnalyzer::windowSize | ( | ) | [inline] |
| 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 | |||
| ) |
set the file names and open the files
References CSL_LPC_LKEY, csl::lpc_header::duration, csl::lpc_header::filesize, csl::CGestalt::frameRate(), csl::lpc_header::hopSize, csl::lpc_header::keyword, kSoundFileFormatAIFF, mCoeffFile, mHopSize, mLPCOrder, mPreEmphasis, mResidFile, mWindowSize, csl::lpc_header::order, csl::lpc_header::preEmphasis, and csl::lpc_header::windowSize.
| void csl::LPCAnalyzer::setPreEmphasis | ( | double | factor | ) | [inline] |
References mPreEmphasis.
| void csl::LPCAnalyzer::setBWExpansion | ( | double | factor | ) | [inline] |
References mBWExpansion.
| void LPCAnalyzer::closeFiles | ( | ) |
| 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] |
really compute the next buffer given an offset base channel; this is called by nextBuffer, possibly multiple times
Reimplemented from csl::UnitGenerator.
References csl::frame_header::centroid, counter, CSL_HPS_DEPTH, csl::frame_header::formant1, csl::frame_header::formant2, csl::CGestalt::frameRate(), csl::frame_header::freqest1, csl::frame_header::freqest2, csl::frame_header::hifreq, csl::Effect::inPort(), csl::frame_header::isTransition, testkiss::j, csl::frame_header::lofreq, csl::Port::mBuffer, csl::Buffer::mBuffers, csl::frame_header::MIDIKey, csl::frame_header::noisiness, csl::Effect::pullInput(), csl::frame_header::resid, csl::frame_header::rmsamp, csl::frame_header::smoothfreq, and csl::frame_header::zeroes.
unsigned csl::LPCAnalyzer::mWindowSize [protected] |
unsigned csl::LPCAnalyzer::mHopSize [protected] |
unsigned csl::LPCAnalyzer::mLPCOrder [protected] |
double csl::LPCAnalyzer::mPredErr [protected] |
double csl::LPCAnalyzer::mPreEmphasis [protected] |
double csl::LPCAnalyzer::mBWExpansion [protected] |
bool csl::LPCAnalyzer::mOverwriteOutput [protected] |
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().
Buffer csl::LPCAnalyzer::mTempBuffer [protected] |
Buffer csl::LPCAnalyzer::mWindowBuffer [protected] |
Buffer csl::LPCAnalyzer::mLPCCoefficients [protected] |
Buffer csl::LPCAnalyzer::mFilterCoefficients [protected] |
Buffer csl::LPCAnalyzer::mFilterInput [protected] |
Buffer csl::LPCAnalyzer::mPCCoefficients [protected] |
Buffer csl::LPCAnalyzer::mLPCResidual [protected] |
RingBuffer csl::LPCAnalyzer::mRing [protected] |
used for the analysis UGens
Referenced by LPCAnalyzer().
Butter* csl::LPCAnalyzer::mLoPass [protected] |
Butter* csl::LPCAnalyzer::mHiPass [protected] |
FFT* csl::LPCAnalyzer::mFFT [protected] |
FILE* csl::LPCAnalyzer::mCoeffFile [protected] |
SoundFile* csl::LPCAnalyzer::mResidFile [protected] |
1.5.8