not yet functional... todo after original release More...
#include "sms.h"
Defines | |
#define | ENV_THRESHOLD .01 |
Functions | |
static int | InitializeHybrid (int sizeWave1, int sizeWave2, SMS_HybParams *pHybParams) |
initialize static arrays | |
void | freeBuffers () |
free buffers | |
static void | CompExp (sfloat *pFEnv, float *pFSpec, float *pFWeight, int sizeSpec) |
compress / expand a given spectral envelope | |
static int | FilterMagEnv (sfloat *pFMagEnv, float *pFMagEnvFilt, int sizeMag) |
static int | MultiplySpectra (sfloat *pFMagEnv, float *pFMagSpectrum, int sizeMag, sfloat *pFMagSpectrum2, int sizeMag2, SMS_HybParams *pHybParams) |
void | HybridizeMag (sfloat *pIWaveform1, int sizeWave1, float *pIWaveform2, int sizeWave2, sfloat *pFWaveform, SMS_HybParams *pHybParams) |
int | InterpolateArrays (sfloat *pFArray1, int sizeArray1, float *pFArray2, int sizeArray2, sfloat *pFArrayOut, int sizeArrayOut, sfloat fInterpFactor) |
void | sms_hybridize (sfloat *pFWaveform1, int sizeWave1, float *pFWaveform2, int sizeWave2, sfloat *pFWaveform, SMS_HybParams *pHybParams) |
hybridize two waveforms | |
Variables | |
static sfloat * | pFWindow1 = NULL |
static sfloat * | pFWindow2 = NULL |
static int | sizeFft1 |
static int | sizeFft2 |
static int | sizeMag1 |
static int | sizeMag2 |
static int | sizeSmooth |
static sfloat * | pFMagSpectrum1 |
static sfloat * | pFMagSpectrum2 |
static sfloat * | pFPhaseSpectrum1 |
static sfloat * | pFPhaseSpectrum2 |
static sfloat * | pFMagEnv |
static sfloat * | pFEnvBuffer |
static sfloat * | pFMagEnvFilt |
not yet functional... todo after original release
#define ENV_THRESHOLD .01 |
Referenced by MultiplySpectra().
static void CompExp | ( | sfloat * | pFEnv, | |
float * | pFSpec, | |||
float * | pFWeight, | |||
int | sizeSpec | |||
) | [static] |
compress / expand a given spectral envelope
pFEnv | hmm.. | |
pFSpec | hmmm... | |
pFWeight | hmmmm... | |
sizeSpec | size of the spectrum |
References sfloat.
Referenced by MultiplySpectra().
static int FilterMagEnv | ( | sfloat * | pFMagEnv, | |
float * | pFMagEnvFilt, | |||
int | sizeMag | |||
) | [static] |
References pFEnvBuffer, sfloat, sizeSmooth, and sms_filterArray().
Referenced by sms_hybridize().
void freeBuffers | ( | ) |
free buffers
References pFEnvBuffer, pFMagEnv, pFMagEnvFilt, pFMagSpectrum1, pFMagSpectrum2, pFPhaseSpectrum1, pFPhaseSpectrum2, pFWindow1, and pFWindow2.
void HybridizeMag | ( | sfloat * | pIWaveform1, | |
int | sizeWave1, | |||
float * | pIWaveform2, | |||
int | sizeWave2, | |||
sfloat * | pFWaveform, | |||
SMS_HybParams * | pHybParams | |||
) |
References pFWindow1, and pFWindow2.
Referenced by sms_hybridize().
static int InitializeHybrid | ( | int | sizeWave1, | |
int | sizeWave2, | |||
SMS_HybParams * | pHybParams | |||
) | [static] |
initialize static arrays
sizeWave1 | size of waveform 1 | |
sizeWave2 | size of waveform 2 | |
pHybParams | parameters for hybridization |
References LOG2, pFEnvBuffer, pFMagEnv, pFMagEnvFilt, pFMagSpectrum1, pFMagSpectrum2, pFPhaseSpectrum1, pFPhaseSpectrum2, pFWindow1, pFWindow2, sfloat, sizeFft1, sizeFft2, sizeMag1, sizeMag2, sizeSmooth, sms_getWindow(), and SMS_WIN_HAMMING.
Referenced by sms_hybridize().
int InterpolateArrays | ( | sfloat * | pFArray1, | |
int | sizeArray1, | |||
float * | pFArray2, | |||
int | sizeArray2, | |||
sfloat * | pFArrayOut, | |||
int | sizeArrayOut, | |||
sfloat | fInterpFactor | |||
) |
static int MultiplySpectra | ( | sfloat * | pFMagEnv, | |
float * | pFMagSpectrum, | |||
int | sizeMag, | |||
sfloat * | pFMagSpectrum2, | |||
int | sizeMag2, | |||
SMS_HybParams * | pHybParams | |||
) | [static] |
References CompExp(), ENV_THRESHOLD, MAX, sfloat, and sizeMag1.
Referenced by sms_hybridize().
void sms_hybridize | ( | sfloat * | pFWaveform1, | |
int | sizeWave1, | |||
float * | pFWaveform2, | |||
int | sizeWave2, | |||
sfloat * | pFWaveform, | |||
SMS_HybParams * | pHybParams | |||
) |
hybridize two waveforms
pFWaveform1 | excitation waveform | |
sizeWave1 | size of excitation waveform | |
pFWaveform2 | hybridization waveform | |
sizeWave2 | size of hybridization waveform | |
pFWaveform | output waveform (hybridized) | |
pHybParams | pointer to strucutre of control parameterscontrol parameters |
References FilterMagEnv(), HybridizeMag(), InitializeHybrid(), MultiplySpectra(), pFMagEnv, pFMagEnvFilt, pFMagSpectrum1, pFMagSpectrum2, pFPhaseSpectrum1, pFPhaseSpectrum2, pFWindow1, pFWindow2, sizeFft1, sizeFft2, sizeMag1, sizeMag2, and sms_spectralApprox().
sfloat * pFEnvBuffer [static] |
Referenced by FilterMagEnv(), freeBuffers(), and InitializeHybrid().
sfloat * pFMagEnv [static] |
Referenced by freeBuffers(), InitializeHybrid(), and sms_hybridize().
sfloat * pFMagEnvFilt [static] |
Referenced by freeBuffers(), InitializeHybrid(), and sms_hybridize().
sfloat* pFMagSpectrum1 [static] |
Referenced by freeBuffers(), InitializeHybrid(), and sms_hybridize().
sfloat * pFMagSpectrum2 [static] |
Referenced by freeBuffers(), InitializeHybrid(), and sms_hybridize().
sfloat * pFPhaseSpectrum1 [static] |
Referenced by freeBuffers(), InitializeHybrid(), and sms_hybridize().
sfloat * pFPhaseSpectrum2 [static] |
Referenced by freeBuffers(), InitializeHybrid(), and sms_hybridize().
sfloat* pFWindow1 = NULL [static] |
Referenced by freeBuffers(), HybridizeMag(), InitializeHybrid(), and sms_hybridize().
sfloat * pFWindow2 = NULL [static] |
Referenced by freeBuffers(), HybridizeMag(), InitializeHybrid(), and sms_hybridize().
int sizeFft1 [static] |
Referenced by InitializeHybrid(), and sms_hybridize().
int sizeFft2 [static] |
Referenced by InitializeHybrid(), and sms_hybridize().
int sizeMag1 [static] |
Referenced by InitializeHybrid(), MultiplySpectra(), and sms_hybridize().
int sizeMag2 [static] |
Referenced by InitializeHybrid(), and sms_hybridize().
int sizeSmooth [static] |
Referenced by FilterMagEnv(), and InitializeHybrid().