aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/fftease
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-01-20 10:17:54 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-01-20 10:17:54 +0000
commitf734613d6fac0f1f4b5f0f6a1afbad4436e90863 (patch)
tree757ddf3259e5704086e61ca3955e3ca2977cd146 /externals/grill/fftease
parentdebbd7dd11ed535baa150e254a27f582e46a7339 (diff)
""
svn path=/trunk/; revision=348
Diffstat (limited to 'externals/grill/fftease')
-rw-r--r--externals/grill/fftease/config-pd-darwin.txt4
-rw-r--r--externals/grill/fftease/config-pd-linux.txt4
-rw-r--r--externals/grill/fftease/makefile.pd-darwin4
-rw-r--r--externals/grill/fftease/src/burrow~.cpp4
-rw-r--r--externals/grill/fftease/src/dentist~.cpp2
-rw-r--r--externals/grill/fftease/src/disarray~.cpp2
-rw-r--r--externals/grill/fftease/src/ether~.cpp2
-rw-r--r--externals/grill/fftease/src/fft.c8
-rw-r--r--externals/grill/fftease/src/fft4.c2
-rw-r--r--externals/grill/fftease/src/fftease.cpp21
-rw-r--r--externals/grill/fftease/src/pv.h6
11 files changed, 33 insertions, 26 deletions
diff --git a/externals/grill/fftease/config-pd-darwin.txt b/externals/grill/fftease/config-pd-darwin.txt
index 029cb47c..fa2127b6 100644
--- a/externals/grill/fftease/config-pd-darwin.txt
+++ b/externals/grill/fftease/config-pd-darwin.txt
@@ -28,4 +28,6 @@ TARGDIR=./pd-darwin
# (leave blank to omit installation)
INSTPATH=/usr/local/pd/extra
-
+# additional compiler flags
+# (check if they fit for your system!)
+# UFLAGS=-maltivec
diff --git a/externals/grill/fftease/config-pd-linux.txt b/externals/grill/fftease/config-pd-linux.txt
index 527900a6..6d59bc71 100644
--- a/externals/grill/fftease/config-pd-linux.txt
+++ b/externals/grill/fftease/config-pd-linux.txt
@@ -25,5 +25,9 @@ TARGDIR=./pd-linux
# (leave blank to omit installation)
INSTPATH=/usr/local/lib/pd/extra
+# additional compiler flags
+# (check if they fit for your system!)
+UFLAGS=-mcpu=pentiumpro # gcc 2.95
+# UFLAGS=-mcpu=pentium3 -msse # gcc 3.2
diff --git a/externals/grill/fftease/makefile.pd-darwin b/externals/grill/fftease/makefile.pd-darwin
index 8d6c736f..91f830b3 100644
--- a/externals/grill/fftease/makefile.pd-darwin
+++ b/externals/grill/fftease/makefile.pd-darwin
@@ -22,8 +22,8 @@ FLEXTLIB=${FLEXTPATH}/flext.a
# compiler+linker stuff
INCLUDES=${PDPATH} ${FLEXTPATH}
LIBPATH=
-FLAGS=-DPD -Dunix -DMACOSX
-CFLAGS=-O6 -Wno-unused -Wno-parentheses -Wno-switch -Wstrict-prototypes # -maltivec
+FLAGS=-DFLEXT_SYS=2 ${UFLAGS}
+CFLAGS=-O6 -Wno-unused -Wno-parentheses -Wno-switch -Wstrict-prototypes -fno-exceptions -fno-rtti
#CFLAGS=-g
LIBS=m
LDFLAGS=-bundle -bundle_loader ${PD}
diff --git a/externals/grill/fftease/src/burrow~.cpp b/externals/grill/fftease/src/burrow~.cpp
index fcfaf22e..36873a5d 100644
--- a/externals/grill/fftease/src/burrow~.cpp
+++ b/externals/grill/fftease/src/burrow~.cpp
@@ -56,8 +56,8 @@ V burrow::setup(t_classid c)
burrow::burrow(I argc,const t_atom *argv):
fftease(4,F_STEREO|F_BALANCED|F_BITSHUFFLE|F_NOPH2),
- _thresh_dB(-30),_mult_dB(-18),
- _invert(false)
+ _invert(false),
+ _thresh_dB(-30),_mult_dB(-18)
{
/* parse and set object's options given */
if(argc >= 1) {
diff --git a/externals/grill/fftease/src/dentist~.cpp b/externals/grill/fftease/src/dentist~.cpp
index ec854adf..3cdcfd90 100644
--- a/externals/grill/fftease/src/dentist~.cpp
+++ b/externals/grill/fftease/src/dentist~.cpp
@@ -64,7 +64,7 @@ V dentist::setup(t_classid c)
dentist::dentist(I argc,const t_atom *argv):
fftease(4,F_BALANCED|F_BITSHUFFLE),
- _knee(500),_teeth(10)
+ _teeth(10),_knee(500),_max_bin(0)
{
/* parse and set object's options given */
if(argc >= 1) {
diff --git a/externals/grill/fftease/src/disarray~.cpp b/externals/grill/fftease/src/disarray~.cpp
index f9837408..01e67226 100644
--- a/externals/grill/fftease/src/disarray~.cpp
+++ b/externals/grill/fftease/src/disarray~.cpp
@@ -60,7 +60,7 @@ V disarray::setup(t_classid c)
disarray::disarray(I argc,const t_atom *argv):
fftease(2,F_BITSHUFFLE),
- _freq(1300),_qual(false),_shuffle_count(20)
+ _qual(false),_shuffle_count(20),_max_bin(0),_freq(1300)
{
/* parse and set object's options given */
if(argc >= 1) {
diff --git a/externals/grill/fftease/src/ether~.cpp b/externals/grill/fftease/src/ether~.cpp
index b8db17f8..80cd2df2 100644
--- a/externals/grill/fftease/src/ether~.cpp
+++ b/externals/grill/fftease/src/ether~.cpp
@@ -47,7 +47,7 @@ V ether::setup(t_classid c)
ether::ether(I argc,const t_atom *argv):
fftease(2,F_STEREO|F_BITSHUFFLE),
- _qual(false),_threshMult(0),_invert(false)
+ _qual(false),_invert(false),_threshMult(0)
{
/* parse and set object's options given */
if(argc >= 1) {
diff --git a/externals/grill/fftease/src/fft.c b/externals/grill/fftease/src/fft.c
index 4cd31199..844cddd5 100644
--- a/externals/grill/fftease/src/fft.c
+++ b/externals/grill/fftease/src/fft.c
@@ -12,7 +12,7 @@ bitreverse( float *x, int N );
static float sqr(float x) { return x*x; }
-void rfft( float *x, int N, int forward )
+void pv_rfft( float *x, int N, int forward )
{
float c1,c2,
h1r,h1i,
@@ -37,7 +37,7 @@ void rfft( float *x, int N, int forward )
c1 = 0.5;
if ( forward ) {
c2 = -0.5;
- cfft( x, N, forward );
+ pv_cfft( x, N, forward );
xr = x[0];
xi = x[1];
} else {
@@ -80,7 +80,7 @@ void rfft( float *x, int N, int forward )
if ( forward )
x[1] = xr;
else
- cfft( x, N, forward );
+ pv_cfft( x, N, forward );
}
/* cfft replaces float array x containing NC complex values
@@ -90,7 +90,7 @@ void rfft( float *x, int N, int forward )
recursive Fast Fourier transform method due to Danielson
and Lanczos. NC MUST be a power of 2. */
-void cfft( float *x, int NC, int forward )
+void pv_cfft( float *x, int NC, int forward )
{
float wr,wi,
wpr,wpi,
diff --git a/externals/grill/fftease/src/fft4.c b/externals/grill/fftease/src/fft4.c
index ffb3574d..70127b47 100644
--- a/externals/grill/fftease/src/fft4.c
+++ b/externals/grill/fftease/src/fft4.c
@@ -32,7 +32,7 @@ void init_rdft(int n, int *ip, float *w)
}
-void rdft(int n, int isgn, float *a, int *ip, float *w)
+void pv_rdft(int n, int isgn, float *a, int *ip, float *w)
{
int j,
diff --git a/externals/grill/fftease/src/fftease.cpp b/externals/grill/fftease/src/fftease.cpp
index 5be59c0e..6d1da836 100644
--- a/externals/grill/fftease/src/fftease.cpp
+++ b/externals/grill/fftease/src/fftease.cpp
@@ -13,9 +13,10 @@ WARRANTIES, see the file, "license.txt," in this distribution.
fftease::fftease(I mult,I flags):
- _mult(mult),_flags(flags),_N(0),
_inCount(0),
- blsz(0),smprt(0)
+ _flags(flags),
+ blsz(0),smprt(0),
+ _mult(mult),_N(0)
{}
fftease::~fftease() {}
@@ -50,7 +51,7 @@ V fftease::m_signal(I n,S *const *in,S *const *out)
{
/* declare working variables */
I i;
- const I _D = n,_N = get_N(),_Nw = _N,_N2 = _N/2,_Nw2 = _Nw/2;
+ const I _D = n,_N = get_N(),_Nw = _N,_N2 = _N/2; //,_Nw2 = _Nw/2;
/* fill our retaining buffers */
_inCount += _D;
@@ -85,12 +86,12 @@ V fftease::m_signal(I n,S *const *in,S *const *out)
/* do an fft */
if(_flags&F_BITSHUFFLE) {
- rdft( _N, 1, _buffer1, _bitshuffle, _trigland );
- if(_flags&F_STEREO) rdft( _N, 1, _buffer2, _bitshuffle, _trigland );
+ pv_rdft( _N, 1, _buffer1, _bitshuffle, _trigland );
+ if(_flags&F_STEREO) pv_rdft( _N, 1, _buffer2, _bitshuffle, _trigland );
}
else {
- rfft( _buffer1, _N2, 1);
- if(_flags&F_STEREO) rfft( _buffer2, _N2,1);
+ pv_rfft( _buffer1, _N2, 1);
+ if(_flags&F_STEREO) pv_rfft( _buffer2, _N2,1);
}
if(!(_flags&F_NOSPEC)) {
@@ -112,9 +113,9 @@ V fftease::m_signal(I n,S *const *in,S *const *out)
/* do an inverse fft */
if(_flags&F_BITSHUFFLE)
- rdft( _N, -1, _buffer1, _bitshuffle, _trigland );
+ pv_rdft( _N, -1, _buffer1, _bitshuffle, _trigland );
else
- rfft( _buffer1, _N2, 0);
+ pv_rfft( _buffer1, _N2, 0);
/* dewindow our result */
overlapadd( _buffer1, _N, _Wsyn, _output, _Nw, _inCount);
@@ -134,7 +135,7 @@ V fftease::m_signal(I n,S *const *in,S *const *out)
void fftease::Set()
{
/* preset the objects data */
- const I _D = Blocksize(),_N = _D*Mult(),_Nw = _N,_N2 = _N/2,_Nw2 = _Nw/2;
+ const I _D = Blocksize(),_N = _D*Mult(),_Nw = _N; //,_N2 = _N/2,_Nw2 = _Nw/2;
_inCount = -_Nw;
diff --git a/externals/grill/fftease/src/pv.h b/externals/grill/fftease/src/pv.h
index 23fbd841..1a555ec7 100644
--- a/externals/grill/fftease/src/pv.h
+++ b/externals/grill/fftease/src/pv.h
@@ -41,15 +41,15 @@ typedef struct {
} Bound;
void init_rdft(int n, int *ip, float *w);
-void rdft(int n, int isgn, float *a, int *ip, float *w);
+void pv_rdft(int n, int isgn, float *a, int *ip, float *w);
void fold( float *I, float *W, int Nw, float *O, int N, int n );
void overlapadd(float *I, int N, float *W, float *O, int Nw, int n );
void makehanning( float *H, float *A, float *S, int Nw, int N, int I, int osc, int odd );
void makewindows( float *H, float *A, float *S, int Nw, int N, int I, int osc );
void leanconvert( float *S, float *C, int N2 , int amp, int ph );
void leanunconvert( float *C, float *S, int N2 );
-void rfft( float *x, int N, int forward );
-void cfft( float *x, int NC, int forward );
+void pv_rfft( float *x, int N, int forward );
+void pv_cfft( float *x, int NC, int forward );
void convert_new(float *S, float *C, int N2, float *lastphase, float fundamental, float factor );
void convert(float *S, float *C, int N2, float *lastphase, float fundamental, float factor );
void unconvert(float *C, float *S, int N2, float *lastphase, float fundamental, float factor );