annotate sv/filter/DSP.h @ 107:c3ac34b2e45b

correct bugs after DAN review
author lbajardsilogic
date Thu, 13 Sep 2007 12:42:44 +0000
parents afcf540ae3a2
children 32ee519c9919
rev   line source
lbajardsilogic@79 1
lbajardsilogic@79 2
lbajardsilogic@79 3
lbajardsilogic@79 4
lbajardsilogic@79 5 #define PI 3.14179
lbajardsilogic@79 6
lbajardsilogic@79 7 void intobyte(int num, char* pbyte1 ,char* pbyte2);
lbajardsilogic@79 8
lbajardsilogic@79 9 void cart2pol(float* cart, float* mags, float* phases, int framesize);
lbajardsilogic@79 10
lbajardsilogic@79 11 void pol2cart(float* cart, float* mags, float* phases, int framesize);
lbajardsilogic@79 12
lbajardsilogic@79 13 void hanning(float* window, int framesize);
lbajardsilogic@79 14
lbajardsilogic@79 15 //This function is the standard phase vocoder propagation technique using the hetrodyned phase increment.
lbajardsilogic@79 16 //The previous frame and phases is always assumed to be the last 'current' frame. This is fine in when the TSM factor is
lbajardsilogic@79 17 //is not changed. If you change the TSM factor the instantaneous frequency estimates will be wrong since the actual difference
lbajardsilogic@79 18 //in time between the 2 analysis frames will have changed when the factor changed. This will propagate a phase error
lbajardsilogic@79 19 void updatephases(float* c_phase,float* p_phase,float* c_synthphase, float* p_synthphase, int framesize,float hopfactor,float interpfactor);
lbajardsilogic@79 20
lbajardsilogic@79 21 //This function is almost identical to updatephases(). The only difference is that automatically resets the current synthesis phases
lbajardsilogic@79 22 //to the analysis phases when any change in TSM is invoked. This inhibits the projection of the phase error
lbajardsilogic@79 23 //but causes some grinding on whenever the TSM slider is tweeked.
lbajardsilogic@79 24 void updatephases2(float* c_phase,float* p_phase,float* c_synthphase, float* p_synthphase, int framesize,float hopfactor,float interpfactor);
lbajardsilogic@79 25
lbajardsilogic@79 26
lbajardsilogic@79 27 void rotatephases_peaklocked(float* c_phase, float* p_phase, float* c_synthphase, float* p_synthphase, int framesize, float interpfactor);
lbajardsilogic@79 28
lbajardsilogic@79 29 void rotatephases(float* c_phase, float* p_phase, float* c_synthphase, float* p_synthphase, int framesize, float interpfactor);
lbajardsilogic@79 30
lbajardsilogic@79 31
lbajardsilogic@79 32 bool transient_detect(float* L_mags, float* R_mags, float* pL_mags, float* pR_mags, float drumthresh, float framesize);
lbajardsilogic@79 33
lbajardsilogic@79 34 void sintable(float* sinewave, float length, float sr);
lbajardsilogic@79 35
lbajardsilogic@79 36 void cur2last(float* c_phase, float* c_synthphase, float* p_synthphase, int framesize);
lbajardsilogic@79 37
lbajardsilogic@79 38 int findpeaks(float* c_mags, float* p_mags, float framesize, float* peak_locations);