routines for different Fast Fourier Transform Algorithms More...
#include "sms.h"#include <gsl/gsl_matrix.h>#include <gsl/gsl_linalg.h>#include <gsl/gsl_blas.h>
Defines | |
| #define | COEF ( 8 * powf(PI, 2)) |
| #define | CHOLESKY 1 |
Functions | |
| void | FreeDCepstrum (CepstrumMatrices *m) |
| void | AllocateDCepstrum (int nPoints, int nCoeff, CepstrumMatrices *m) |
| void | sms_dCepstrum (int sizeCepstrum, sfloat *pCepstrum, int sizeFreq, sfloat *pFreq, sfloat *pMag, sfloat fLambda, int iMaxFreq) |
| Discrete Cepstrum Transform. | |
| void | sms_dCepstrumEnvelope (int sizeCepstrum, sfloat *pCepstrum, int sizeEnv, sfloat *pEnv) |
| Spectrum Envelope from Cepstrum. | |
| void | sms_spectralEnvelope (SMS_Data *pSmsData, SMS_SEnvParams *pSpecEnvParams) |
| main function for computing spectral envelope from sinusoidal peaks | |
routines for different Fast Fourier Transform Algorithms
| #define CHOLESKY 1 |
| #define COEF ( 8 * powf(PI, 2)) |
Referenced by sms_dCepstrum().
| void AllocateDCepstrum | ( | int | nPoints, | |
| int | nCoeff, | |||
| CepstrumMatrices * | m | |||
| ) |
References FreeDCepstrum().
Referenced by sms_dCepstrum().

| void FreeDCepstrum | ( | CepstrumMatrices * | m | ) |
Referenced by AllocateDCepstrum().
| void sms_dCepstrum | ( | int | sizeCepstrum, | |
| sfloat * | pCepstrum, | |||
| int | sizeFreq, | |||
| sfloat * | pFreq, | |||
| sfloat * | pMag, | |||
| sfloat | fLambda, | |||
| int | iMaxFreq | |||
| ) |
Discrete Cepstrum Transform.
method for computing cepstrum aenalysis from a discrete set of partial peaks (frequency and amplitude)
This implementation is owed to the help of Jordi Janer (thanks!) from the MTG, along with the following paper: "Regularization Techniques for Discrete Cepstrum Estimation" Olivier Cappe and Eric Moulines, IEEE Signal Processing Letters, Vol. 3 No.4, April 1996
| sizeCepstrum | order+1 of the discrete cepstrum | |
| pCepstrum | pointer to output array of cepstrum coefficients | |
| sizeFreq | number of partials peaks (the size of pFreq should be the same as pMag | |
| pFreq | pointer to partial peak frequencies (hertz) | |
| pMag | pointer to partial peak magnitudes (linear) | |
| fLambda | regularization factor | |
| iMaxFreq | maximum frequency of cepstrum |
References AllocateDCepstrum(), COEF, PI, PI_2, sfloat, and sms_sine().
Referenced by sms_spectralEnvelope().

| void sms_dCepstrumEnvelope | ( | int | sizeCepstrum, | |
| sfloat * | pCepstrum, | |||
| int | sizeEnv, | |||
| sfloat * | pEnv | |||
| ) |
Spectrum Envelope from Cepstrum.
from a set of cepstrum coefficients, compute the spectrum envelope
| sizeCepstrum | order + 1 of the cepstrum | |
| pCepstrum | pointer to array of cepstrum coefficients | |
| sizeEnv | size of spectrum envelope (max frequency in bins) |
| pEnv | pointer to output spectrum envelope (real part only) |
References EXP, sfloat, sms_error(), sms_fft(), and sms_power2().
Referenced by sms_spectralEnvelope().

| void sms_spectralEnvelope | ( | SMS_Data * | pSmsData, | |
| SMS_SEnvParams * | pSpecEnvParams | |||
| ) |
main function for computing spectral envelope from sinusoidal peaks
Magnitudes should already be in linear for this function. If pSmsData->iEnvelope == SMS_ENV_CEP, will return cepstrum coefficeints If pSmsData->iEnvelope == SMS_ENV_FBINS, will return linear magnitude spectrum
| pSmsData | pointer to SMS_Data structure with all the arrays necessary | |
| pSpecEnvParams | pointer to a structure of parameters for spectral enveloping |
References SMS_SEnvParams::fLambda, SMS_SEnvParams::iAnchor, SMS_SEnvParams::iMaxFreq, SMS_SEnvParams::iOrder, SMS_SEnvParams::iType, SMS_SEnvParams::nCoeff, SMS_Data::nEnvCoeff, SMS_Data::nTracks, SMS_Data::pFSinAmp, SMS_Data::pFSinFreq, SMS_Data::pSpecEnv, sfloat, sms_dCepstrum(), sms_dCepstrumEnvelope(), SMS_ENV_FBINS, and sms_error().
Referenced by sms_analyze().

1.6.1