various filters More...
#include "sms.h"
Defines | |
#define | SMS_EMPH_COEF .9 |
coefficient for pre_emphasis filter | |
Functions | |
sfloat | sms_preEmphasis (float fInput) |
sfloat | sms_deEmphasis (sfloat fInput) |
static sfloat | ZeroPoleFilter (float *pFa, sfloat *pFb, int nCoeff, sfloat fInput) |
function to implement a zero-pole filter | |
void | sms_filterHighPass (int sizeResidual, sfloat *pResidual, int iSamplingRate) |
function to filter a waveform with a high-pass filter | |
void | sms_filterArray (sfloat *pFArray, int size1, int size2, sfloat *pFOutArray) |
a spectral filter |
various filters
#define SMS_EMPH_COEF .9 |
coefficient for pre_emphasis filter
Referenced by sms_deEmphasis(), and sms_preEmphasis().
sfloat sms_deEmphasis | ( | sfloat | fInput | ) |
References sfloat, and SMS_EMPH_COEF.
Referenced by sms_synthesize(), and sms_writeResSound().
void sms_filterArray | ( | sfloat * | pFArray, | |
int | size1, | |||
int | size2, | |||
sfloat * | pFOutArray | |||
) |
a spectral filter
filter each point of the current array by the surounding points using a triangular window
pFArray | two dimensional input array | |
size1 | vertical size of pFArray | |
size2 | horizontal size of pFArray | |
pFOutArray | output array of size size1 |
References sfloat.
Referenced by FilterMagEnv().
void sms_filterHighPass | ( | int | sizeResidual, | |
sfloat * | pResidual, | |||
int | iSamplingRate | |||
) |
function to filter a waveform with a high-pass filter
cutoff =1500 Hz
sizeResidual | size of signal | |
pResidual | pointer to residual signal | |
iSamplingRate | sampling rate of signal |
References sfloat, and ZeroPoleFilter().
Referenced by sms_analyze().
sfloat sms_preEmphasis | ( | float | fInput | ) |
References sfloat, and SMS_EMPH_COEF.
Referenced by sms_fillSoundBuffer().
static sfloat ZeroPoleFilter | ( | float * | pFa, | |
sfloat * | pFb, | |||
int | nCoeff, | |||
sfloat | fInput | |||
) | [static] |
function to implement a zero-pole filter
pFa | pointer to numerator coefficients | |
pFb | pointer to denominator coefficients | |
nCoeff | number of coefficients | |
fInput | input sample |
References sfloat.
Referenced by sms_filterHighPass().