Update of /cvsroot/pure-data/externals/grill/fftease/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2275/src
Modified Files: fftease.cpp main.cpp thresher~.cpp Log Message: ""
Index: fftease.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/fftease/src/fftease.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** fftease.cpp 25 Jan 2003 04:39:43 -0000 1.8 --- fftease.cpp 24 Feb 2004 03:35:52 -0000 1.9 *************** *** 36,43 **** V fftease::m_dsp(I n,S *const *,S *const *) { - const I _D = n; const F sr = Samplerate(); ! if(_D != blsz || sr != smprt) { ! blsz = _D; smprt = sr; MakeVar(); --- 36,42 ---- V fftease::m_dsp(I n,S *const *,S *const *) { const F sr = Samplerate(); ! if(n != blsz || sr != smprt) { ! blsz = n; smprt = sr; MakeVar(); *************** *** 52,64 **** /* declare working variables */ I i; ! const I _D = n,_N = get_N(),_Nw = _N,_N2 = _N/2; //,_Nw2 = _Nw/2;
/* fill our retaining buffers */ ! _inCount += _D;
if(_flags&F_STEREO) { ! for(i = 0; i < _N-_D ; i++ ) { ! _input1[i] = _input1[i+_D]; ! _input2[i] = _input2[i+_D]; } for(I j = 0; i < _N; i++,j++) { --- 51,63 ---- /* declare working variables */ I i; ! const I _N = get_N(),_Nw = _N,_N2 = _N/2; //,_Nw2 = _Nw/2;
/* fill our retaining buffers */ ! _inCount += n;
if(_flags&F_STEREO) { ! for(i = 0; i < _N-n ; i++ ) { ! _input1[i] = _input1[i+n]; ! _input2[i] = _input2[i+n]; } for(I j = 0; i < _N; i++,j++) { *************** *** 68,73 **** } else { ! for (i = 0 ; i < _N-_D ; i++ ) ! _input1[i] = _input1[i+_D]; for (I j = 0; i < _N; i++,j++ ) _input1[i] = in[0][j]; --- 67,72 ---- } else { ! for (i = 0 ; i < _N-n ; i++ ) ! _input1[i] = _input1[i+n]; for (I j = 0; i < _N; i++,j++ ) _input1[i] = in[0][j]; *************** *** 131,139 **** /* set our output and adjust our retaining output buffer */ const F mult = 1./_N; ! for ( i = 0; i < _D; i++ ) out[0][i] = _output[i] * mult;
! for ( i = 0; i < _N-_D; i++ ) ! _output[i] = _output[i+_D]; for (; i < _N; i++ ) _output[i] = 0.; --- 130,138 ---- /* set our output and adjust our retaining output buffer */ const F mult = 1./_N; ! for ( i = 0; i < n; i++ ) out[0][i] = _output[i] * mult;
! for ( i = 0; i < _N-n; i++ ) ! _output[i] = _output[i+n]; for (; i < _N; i++ ) _output[i] = 0.; *************** *** 144,148 **** { /* preset the objects data */ ! const I _D = Blocksize(),_N = _D*Mult(),_Nw = _N,_N2 = _N/2; //,_Nw2 = _Nw/2;
_inCount = -_Nw; --- 143,147 ---- { /* preset the objects data */ ! const I n = Blocksize(),_N = n*Mult(),_Nw = _N,_N2 = _N/2; //,_Nw2 = _Nw/2;
_inCount = -_Nw; *************** *** 176,180 **** ZeroMem(_c_lastphase_out,(_N2+1)*sizeof(*_c_lastphase_out));
! _c_factor_in = Samplerate()/(_D * PV_2PI); } } --- 175,179 ---- ZeroMem(_c_lastphase_out,(_N2+1)*sizeof(*_c_lastphase_out));
! _c_factor_in = Samplerate()/(n * PV_2PI); } } *************** *** 193,199 **** _Wsyn = new F[_Nw]; if(_flags&F_BALANCED) ! makewindows( _Hwin, _Wanal, _Wsyn, _Nw, _N, _D, 0); else ! makehanning( _Hwin, _Wanal, _Wsyn, _Nw, _N, _D, 0,0); }
--- 192,198 ---- _Wsyn = new F[_Nw]; if(_flags&F_BALANCED) ! makewindows( _Hwin, _Wanal, _Wsyn, _Nw, _N, n, 0); else ! makehanning( _Hwin, _Wanal, _Wsyn, _Nw, _N, n, 0,0); }
Index: main.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/fftease/src/main.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** main.cpp 30 Mar 2003 02:56:54 -0000 1.5 --- main.cpp 24 Feb 2004 03:35:52 -0000 1.6 *************** *** 21,25 **** post("Originally written by Eric Lyon and Christopher Penrose for MAX/MSP"); post(""); ! post("flext port (version " FFTEASE_VERSION ") provided by Thomas Grill, (C)2003"); post("-------------------------------------------------------------------"); post(""); --- 21,25 ---- post("Originally written by Eric Lyon and Christopher Penrose for MAX/MSP"); post(""); ! post("flext port (version " FFTEASE_VERSION ") provided by Thomas Grill, (C)2003-2004"); post("-------------------------------------------------------------------"); post(""); *************** *** 45,65 ****
*/ - - #if FLEXT_SYS == FLEXT_SYS_MAX - finder_addclass((C *)"FFTease",(C *)"burrow~"); - finder_addclass((C *)"FFTease",(C *)"cross~"); - finder_addclass((C *)"FFTease",(C *)"dentist~"); - finder_addclass((C *)"FFTease",(C *)"disarray~"); - finder_addclass((C *)"FFTease",(C *)"drown~"); - finder_addclass((C *)"FFTease",(C *)"ether~"); - finder_addclass((C *)"FFTease",(C *)"morphine~"); - finder_addclass((C *)"FFTease",(C *)"scrape~"); - finder_addclass((C *)"FFTease",(C *)"shapee~"); - finder_addclass((C *)"FFTease",(C *)"swinger~"); - finder_addclass((C *)"FFTease",(C *)"taint~"); - finder_addclass((C *)"FFTease",(C *)"thresher~"); - finder_addclass((C *)"FFTease",(C *)"vacancy~"); - finder_addclass((C *)"FFTease",(C *)"xsyn~"); - #endif }
--- 45,48 ----
Index: thresher~.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/fftease/src/thresher~.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** thresher~.cpp 25 Jan 2003 04:39:43 -0000 1.5 --- thresher~.cpp 24 Feb 2004 03:35:52 -0000 1.6 *************** *** 50,55 **** fftease::Set();
! const F _R = Samplerate(); ! const I _D = Blocksize(),_N = get_N(),_N2 = _N/2;
_compositeFrame = new F[_N+2]; --- 50,55 ---- fftease::Set();
! const F rate = Samplerate(); ! const I n = Blocksize(),_N = get_N(),_N2 = _N/2;
_compositeFrame = new F[_N+2]; *************** *** 59,63 **** _moveThreshold = .00001 ; F _maxHoldTime = 5.0 ; ! _maxHoldFrames = (I)(_maxHoldTime *_R/_D); }
--- 59,63 ---- _moveThreshold = .00001 ; F _maxHoldTime = 5.0 ; ! _maxHoldFrames = (I)(_maxHoldTime *rate/n); }