view sv/filter/DSP.h @ 99:ca1f73f027f5

fix the play checkBox bug
author benoitrigolleau
date Wed, 11 Jul 2007 12:18:15 +0000
parents afcf540ae3a2
children 32ee519c9919
line wrap: on
line source




#define PI 3.14179

void intobyte(int num, char* pbyte1 ,char* pbyte2);

void cart2pol(float* cart, float* mags, float* phases, int framesize);

void pol2cart(float* cart, float* mags, float* phases, int framesize);

void hanning(float* window, int framesize);

//This function is the standard phase vocoder propagation technique using the hetrodyned phase increment.
//The previous frame and phases is always assumed to be the last 'current' frame. This is fine in when the TSM factor is 
//is not changed. If you change the TSM factor the instantaneous frequency estimates will be wrong since the actual difference 
//in time between the 2 analysis frames will have changed when the factor changed. This will propagate a phase error 
void updatephases(float* c_phase,float* p_phase,float* c_synthphase, float* p_synthphase, int framesize,float hopfactor,float interpfactor);

//This function is almost identical to updatephases(). The only difference is that automatically resets the current synthesis phases 
//to the analysis phases when any change in TSM is invoked. This inhibits the projection of the phase error
//but causes some grinding on whenever the TSM slider is tweeked.
void updatephases2(float* c_phase,float* p_phase,float* c_synthphase, float* p_synthphase, int framesize,float hopfactor,float interpfactor);


void rotatephases_peaklocked(float* c_phase, float* p_phase, float* c_synthphase, float* p_synthphase, int framesize, float interpfactor);

void rotatephases(float* c_phase, float* p_phase, float* c_synthphase, float* p_synthphase, int framesize, float interpfactor);


bool transient_detect(float* L_mags, float* R_mags, float* pL_mags, float* pR_mags, float drumthresh, float framesize);

void sintable(float* sinewave, float length, float sr);

void cur2last(float* c_phase, float* c_synthphase, float* p_synthphase, int framesize);

int findpeaks(float* c_mags, float* p_mags, float framesize, float* peak_locations);