/Users/richardeakin/projects/libsms/trunk/src/hybridize.c File Reference

not yet functional... todo after original release More...

#include "sms.h"
Include dependency graph for hybridize.c:

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

Detailed Description

not yet functional... todo after original release


Define Documentation

#define ENV_THRESHOLD   .01

Referenced by MultiplySpectra().


Function Documentation

static void CompExp ( sfloat *  pFEnv,
float *  pFSpec,
float *  pFWeight,
int  sizeSpec 
) [static]

compress / expand a given spectral envelope

Parameters:
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().

Here is the call graph for this function:

void freeBuffers (  ) 
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

Parameters:
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().

Here is the call graph for this function:

int InterpolateArrays ( sfloat *  pFArray1,
int  sizeArray1,
float *  pFArray2,
int  sizeArray2,
sfloat *  pFArrayOut,
int  sizeArrayOut,
sfloat  fInterpFactor 
)

References sfloat, and sms_spectralApprox().

Here is the call graph for this function:

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

Here is the call graph for this function:

void sms_hybridize ( sfloat *  pFWaveform1,
int  sizeWave1,
float *  pFWaveform2,
int  sizeWave2,
sfloat *  pFWaveform,
SMS_HybParams *  pHybParams 
)

hybridize two waveforms

Parameters:
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().

Here is the call graph for this function:


Variable Documentation

sfloat * pFEnvBuffer [static]
sfloat * pFMagEnv [static]
sfloat * pFMagEnvFilt [static]
sfloat* pFMagSpectrum1 [static]
sfloat * pFMagSpectrum2 [static]
sfloat * pFPhaseSpectrum1 [static]
sfloat * pFPhaseSpectrum2 [static]
sfloat* pFWindow1 = NULL [static]
sfloat * pFWindow2 = NULL [static]
int sizeFft1 [static]

Referenced by InitializeHybrid(), and sms_hybridize().

int sizeFft2 [static]

Referenced by InitializeHybrid(), and sms_hybridize().

int sizeMag1 [static]
int sizeMag2 [static]

Referenced by InitializeHybrid(), and sms_hybridize().

int sizeSmooth [static]

Referenced by FilterMagEnv(), and InitializeHybrid().

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Thu Oct 29 04:08:07 2009 for libsms by  doxygen 1.6.1