aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/fftease
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/fftease')
-rw-r--r--externals/grill/fftease/config-pd-darwin.txt6
-rw-r--r--externals/grill/fftease/makefile.max-msvc2
-rw-r--r--externals/grill/fftease/makefile.pd-darwin9
-rw-r--r--externals/grill/fftease/makefile.pd-msvc2
-rw-r--r--externals/grill/fftease/maxmsp/fftease-objectmappings.txt29
-rwxr-xr-xexternals/grill/fftease/maxmsp/fftease4.PICTbin26550 -> 8002 bytes
-rw-r--r--externals/grill/fftease/src/fftease.cpp33
-rw-r--r--externals/grill/fftease/src/main.cpp19
-rw-r--r--externals/grill/fftease/src/thresher~.cpp6
9 files changed, 59 insertions, 47 deletions
diff --git a/externals/grill/fftease/config-pd-darwin.txt b/externals/grill/fftease/config-pd-darwin.txt
index 755a8c0e..10bb0bd8 100644
--- a/externals/grill/fftease/config-pd-darwin.txt
+++ b/externals/grill/fftease/config-pd-darwin.txt
@@ -12,7 +12,7 @@
# where is PD installed?
-PDDIR=/usr/local/pd
+PDDIR=/usr/local/lib/pd
# where are the PD header files?
# leave it blank if it is a system directory (like /usr/local/include),
@@ -20,7 +20,7 @@ PDDIR=/usr/local/pd
PDPATH=${PDDIR}/src
# where is the PD executable?
-PD=${PDDIR}/bin/pd
+PD=/usr/local/bin/pd
# where do the flext libraries reside?
FLEXTPATH=${PDDIR}/flext
@@ -34,4 +34,4 @@ INSTPATH=${PDDIR}/extra
# additional compiler flags
# (check if they fit for your system!)
-UFLAGS=-malign-power -maltivec
+UFLAGS=-malign-power -faltivec -maltivec
diff --git a/externals/grill/fftease/makefile.max-msvc b/externals/grill/fftease/makefile.max-msvc
index b1ed7e24..8ed282f2 100644
--- a/externals/grill/fftease/makefile.max-msvc
+++ b/externals/grill/fftease/makefile.max-msvc
@@ -36,7 +36,7 @@ LIBS=$(LIBS) maxapi.lib maxaudio.lib
# compiler definitions and flags
DEFS=/DFLEXT_SYS=1 $(UFLAGS)
-CFLAGS=/ML /GR- /GD /Ox /GX
+CFLAGS=/ML /GR- /GD /Ox /GX /Zp2
# the rest can stay untouched
# ----------------------------------------------
diff --git a/externals/grill/fftease/makefile.pd-darwin b/externals/grill/fftease/makefile.pd-darwin
index b33a5ff9..c0f1b0a4 100644
--- a/externals/grill/fftease/makefile.pd-darwin
+++ b/externals/grill/fftease/makefile.pd-darwin
@@ -23,10 +23,11 @@ FLEXTLIB=${FLEXTPATH}/flext.a
INCLUDES=${PDPATH} ${FLEXTPATH}
LIBPATH=
FLAGS=-DFLEXT_SYS=2 ${UFLAGS}
-CFLAGS=-O6 -Wno-unused -Wno-parentheses -Wno-switch -Wstrict-prototypes -fno-exceptions -fno-rtti
-LIBS=m
+CFLAGS=-O2 -Wno-unused -Wno-parentheses -Wno-switch -Wstrict-prototypes
+CPPFLAGS=-fno-exceptions -fno-rtti
+LIBS=
LDFLAGS=-bundle -bundle_loader ${PD}
-FRAMEWORKS=Carbon
+FRAMEWORKS=Carbon vecLib
# ---------------------------------------------
# the rest can stay untouched
@@ -51,7 +52,7 @@ $(TARGDIR):
-mkdir $(TARGDIR)
$(TARGDIR)/%.o : $(DIR)/%.cpp
- $(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES)) $< -o $@
+ $(CXX) -c $(CPPFLAGS) $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES)) $< -o $@
$(TARGDIR)/%.co : $(DIR)/%.c
$(CC) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES)) $< -o $@
diff --git a/externals/grill/fftease/makefile.pd-msvc b/externals/grill/fftease/makefile.pd-msvc
index f10b2ac3..778dd9cc 100644
--- a/externals/grill/fftease/makefile.pd-msvc
+++ b/externals/grill/fftease/makefile.pd-msvc
@@ -22,7 +22,7 @@ LIBS=pd.lib flext-pdwin.lib
# compiler definitions and flags
DEFS=/DFLEXT_SYS=2
-CFLAGS=/GR- /GX- /GD /Ox
+CFLAGS=/GR- /GX- /GD /Ox
# the rest can stay untouched
# ----------------------------------------------
diff --git a/externals/grill/fftease/maxmsp/fftease-objectmappings.txt b/externals/grill/fftease/maxmsp/fftease-objectmappings.txt
new file mode 100644
index 00000000..d75f6194
--- /dev/null
+++ b/externals/grill/fftease/maxmsp/fftease-objectmappings.txt
@@ -0,0 +1,29 @@
+max objectfile burrow~ fftease;
+max objectfile cross~ fftease;
+max objectfile dentist~ fftease;
+max objectfile disarray~ fftease;
+max objectfile drown~ fftease;
+max objectfile ether~ fftease;
+max objectfile morphine~ fftease;
+max objectfile scrape~ fftease;
+max objectfile shapee~ fftease;
+max objectfile swinger~ fftease;
+max objectfile taint~ fftease;
+max objectfile thresher~ fftease;
+max objectfile vacancy~ fftease;
+max objectfile xsyn~ fftease;
+
+max oblist FFTease burrow~;
+max oblist FFTease cross~;
+max oblist FFTease dentist~;
+max oblist FFTease disarray~;
+max oblist FFTease drown~;
+max oblist FFTease ether~;
+max oblist FFTease morphine~;
+max oblist FFTease scrape~;
+max oblist FFTease shapee~;
+max oblist FFTease swinger~;
+max oblist FFTease taint~;
+max oblist FFTease thresher~;
+max oblist FFTease vacancy~;
+max oblist FFTease xsyn~;
diff --git a/externals/grill/fftease/maxmsp/fftease4.PICT b/externals/grill/fftease/maxmsp/fftease4.PICT
index 571999d7..cb2a1502 100755
--- a/externals/grill/fftease/maxmsp/fftease4.PICT
+++ b/externals/grill/fftease/maxmsp/fftease4.PICT
Binary files differ
diff --git a/externals/grill/fftease/src/fftease.cpp b/externals/grill/fftease/src/fftease.cpp
index 378ae8ce..9a7641c1 100644
--- a/externals/grill/fftease/src/fftease.cpp
+++ b/externals/grill/fftease/src/fftease.cpp
@@ -35,10 +35,9 @@ V fftease::Exit()
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;
+ if(n != blsz || sr != smprt) {
+ blsz = n;
smprt = sr;
MakeVar();
@@ -51,15 +50,15 @@ 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 _N = get_N(),_Nw = _N,_N2 = _N/2; //,_Nw2 = _Nw/2;
/* fill our retaining buffers */
- _inCount += _D;
+ _inCount += n;
if(_flags&F_STEREO) {
- for(i = 0; i < _N-_D ; i++ ) {
- _input1[i] = _input1[i+_D];
- _input2[i] = _input2[i+_D];
+ 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++) {
_input1[i] = in[0][j];
@@ -67,8 +66,8 @@ V fftease::m_signal(I n,S *const *in,S *const *out)
}
}
else {
- for (i = 0 ; i < _N-_D ; i++ )
- _input1[i] = _input1[i+_D];
+ 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];
}
@@ -130,11 +129,11 @@ V fftease::m_signal(I n,S *const *in,S *const *out)
/* set our output and adjust our retaining output buffer */
const F mult = 1./_N;
- for ( i = 0; i < _D; i++ )
+ for ( i = 0; i < n; i++ )
out[0][i] = _output[i] * mult;
- for ( i = 0; i < _N-_D; i++ )
- _output[i] = _output[i+_D];
+ for ( i = 0; i < _N-n; i++ )
+ _output[i] = _output[i+n];
for (; i < _N; i++ )
_output[i] = 0.;
}
@@ -143,7 +142,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 n = Blocksize(),_N = n*Mult(),_Nw = _N,_N2 = _N/2; //,_Nw2 = _Nw/2;
_inCount = -_Nw;
@@ -175,7 +174,7 @@ void fftease::Set()
_c_lastphase_out = new F[_N2+1];
ZeroMem(_c_lastphase_out,(_N2+1)*sizeof(*_c_lastphase_out));
- _c_factor_in = Samplerate()/(_D * PV_2PI);
+ _c_factor_in = Samplerate()/(n * PV_2PI);
}
}
@@ -192,9 +191,9 @@ void fftease::Set()
_Wanal = new F[_Nw];
_Wsyn = new F[_Nw];
if(_flags&F_BALANCED)
- makewindows( _Hwin, _Wanal, _Wsyn, _Nw, _N, _D, 0);
+ makewindows( _Hwin, _Wanal, _Wsyn, _Nw, _N, n, 0);
else
- makehanning( _Hwin, _Wanal, _Wsyn, _Nw, _N, _D, 0,0);
+ makehanning( _Hwin, _Wanal, _Wsyn, _Nw, _N, n, 0,0);
}
void fftease::Clear()
diff --git a/externals/grill/fftease/src/main.cpp b/externals/grill/fftease/src/main.cpp
index 3ce33e8f..75bea448 100644
--- a/externals/grill/fftease/src/main.cpp
+++ b/externals/grill/fftease/src/main.cpp
@@ -20,7 +20,7 @@ static V fftease_main()
post("FFTease - A set of Live Spectral Processors");
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("flext port (version " FFTEASE_VERSION ") provided by Thomas Grill, (C)2003-2004");
post("-------------------------------------------------------------------");
post("");
@@ -44,23 +44,6 @@ static V fftease_main()
FLEXT_DSP_SETUP(pvoc);
*/
-
-#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
}
// setup the library
diff --git a/externals/grill/fftease/src/thresher~.cpp b/externals/grill/fftease/src/thresher~.cpp
index 29b042be..f8d16ab0 100644
--- a/externals/grill/fftease/src/thresher~.cpp
+++ b/externals/grill/fftease/src/thresher~.cpp
@@ -49,8 +49,8 @@ void thresher::Set()
{
fftease::Set();
- const F _R = Samplerate();
- const I _D = Blocksize(),_N = get_N(),_N2 = _N/2;
+ const F rate = Samplerate();
+ const I n = Blocksize(),_N = get_N(),_N2 = _N/2;
_compositeFrame = new F[_N+2];
_framesLeft = new I[_N2+1];
@@ -58,7 +58,7 @@ void thresher::Set()
_firstFrame = true;
_moveThreshold = .00001 ;
F _maxHoldTime = 5.0 ;
- _maxHoldFrames = (I)(_maxHoldTime *_R/_D);
+ _maxHoldFrames = (I)(_maxHoldTime *rate/n);
}
void thresher::Clear()