aboutsummaryrefslogtreecommitdiff
path: root/externals/grill
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill')
-rw-r--r--externals/grill/fftease/config-pd-darwin.txt2
-rw-r--r--externals/grill/fftease/config-pd-linux.txt2
-rw-r--r--externals/grill/fftease/config-pd-msvc.txt2
-rw-r--r--externals/grill/fftease/fftease.dsp64
-rw-r--r--externals/grill/fftease/license.txt1
-rw-r--r--externals/grill/fftease/makefile.pd-darwin2
-rw-r--r--externals/grill/fftease/makefile.pd-linux2
-rw-r--r--externals/grill/fftease/makefile.pd-msvc2
-rw-r--r--externals/grill/fftease/media/nixon.aiffbin0 -> 449214 bytes
-rw-r--r--externals/grill/fftease/media/schubert.aiffbin0 -> 451774 bytes
-rw-r--r--externals/grill/fftease/pd/burrow.pd71
-rw-r--r--externals/grill/fftease/pd/cross.pd77
-rw-r--r--externals/grill/fftease/pd/dentist.pd49
-rw-r--r--externals/grill/fftease/pd/disarray.pd68
-rw-r--r--externals/grill/fftease/pd/drown.pd61
-rw-r--r--externals/grill/fftease/pd/ether.pd67
-rw-r--r--externals/grill/fftease/pd/morphine.pd77
-rw-r--r--externals/grill/fftease/pd/scrape.pd72
-rw-r--r--externals/grill/fftease/pd/shapee.pd62
-rw-r--r--externals/grill/fftease/pd/swinger.pd62
-rw-r--r--externals/grill/fftease/pd/taint.pd83
-rw-r--r--externals/grill/fftease/pd/thresher.pd44
-rw-r--r--externals/grill/fftease/pd/vacancy.pd97
-rw-r--r--externals/grill/fftease/pd/xsyn.pd61
-rw-r--r--externals/grill/fftease/readme.txt22
-rw-r--r--externals/grill/fftease/src/burrow~.cpp7
-rw-r--r--externals/grill/fftease/src/convert.c84
-rw-r--r--externals/grill/fftease/src/cross~.cpp58
-rw-r--r--externals/grill/fftease/src/dentist~.cpp22
-rw-r--r--externals/grill/fftease/src/disarray~.cpp17
-rw-r--r--externals/grill/fftease/src/drown~.cpp12
-rw-r--r--externals/grill/fftease/src/ether~.cpp5
-rw-r--r--externals/grill/fftease/src/fftease.cpp24
-rw-r--r--externals/grill/fftease/src/fold.c29
-rw-r--r--externals/grill/fftease/src/leanconvert.c57
-rw-r--r--externals/grill/fftease/src/main.h10
-rw-r--r--externals/grill/fftease/src/morphine~.cpp15
-rw-r--r--externals/grill/fftease/src/pv.h2
-rw-r--r--externals/grill/fftease/src/scrape~.cpp27
-rw-r--r--externals/grill/fftease/src/shapee~.cpp21
-rw-r--r--externals/grill/fftease/src/swinger~.cpp48
-rw-r--r--externals/grill/fftease/src/taint~.cpp7
-rw-r--r--externals/grill/fftease/src/thresher~.cpp12
-rw-r--r--externals/grill/fftease/src/vacancy~.cpp34
-rw-r--r--externals/grill/fftease/src/xsyn~.cpp10
45 files changed, 1317 insertions, 234 deletions
diff --git a/externals/grill/fftease/config-pd-darwin.txt b/externals/grill/fftease/config-pd-darwin.txt
index 3a60714a..029cb47c 100644
--- a/externals/grill/fftease/config-pd-darwin.txt
+++ b/externals/grill/fftease/config-pd-darwin.txt
@@ -1,8 +1,6 @@
# FFTease - A set of Live Spectral Processors
# Originally written by Eric Lyon and Christopher Penrose for the Max/MSP platform
#
-# This flext port is based on the jMax port of Christian Klippel
-#
# Copyright (c)Thomas Grill (xovo@gmx.net)
# For information on usage and redistribution, and for a DISCLAIMER OF ALL
# WARRANTIES, see the file, "license.txt," in this distribution.
diff --git a/externals/grill/fftease/config-pd-linux.txt b/externals/grill/fftease/config-pd-linux.txt
index bbbf8da2..527900a6 100644
--- a/externals/grill/fftease/config-pd-linux.txt
+++ b/externals/grill/fftease/config-pd-linux.txt
@@ -1,8 +1,6 @@
# FFTease - A set of Live Spectral Processors
# Originally written by Eric Lyon and Christopher Penrose for the Max/MSP platform
#
-# This flext port is based on the jMax port of Christian Klippel
-#
# Copyright (c)Thomas Grill (xovo@gmx.net)
# For information on usage and redistribution, and for a DISCLAIMER OF ALL
# WARRANTIES, see the file, "license.txt," in this distribution.
diff --git a/externals/grill/fftease/config-pd-msvc.txt b/externals/grill/fftease/config-pd-msvc.txt
index a4e0015a..ee4283a7 100644
--- a/externals/grill/fftease/config-pd-msvc.txt
+++ b/externals/grill/fftease/config-pd-msvc.txt
@@ -1,8 +1,6 @@
# FFTease - A set of Live Spectral Processors
# Originally written by Eric Lyon and Christopher Penrose for the Max/MSP platform
#
-# This flext port is based on the jMax port of Christian Klippel
-#
# Copyright (c)Thomas Grill (xovo@gmx.net)
# For information on usage and redistribution, and for a DISCLAIMER OF ALL
# WARRANTIES, see the file, "license.txt," in this distribution.
diff --git a/externals/grill/fftease/fftease.dsp b/externals/grill/fftease/fftease.dsp
index f817f356..6f82a52b 100644
--- a/externals/grill/fftease/fftease.dsp
+++ b/externals/grill/fftease/fftease.dsp
@@ -198,6 +198,65 @@ SOURCE=.\readme.txt
# Begin Group "ori.jmax"
# PROP Default_Filter ""
+# Begin Group "pv"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\ori.jmax\convert.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\ori.jmax\convert_new.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\ori.jmax\fft.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\ori.jmax\fft4.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\ori.jmax\fold.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\ori.jmax\leanconvert.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\ori.jmax\leanunconvert.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\ori.jmax\makewindows.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\ori.jmax\overlapadd.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\ori.jmax\pv.h
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\ori.jmax\unconvert.c
+# PROP Exclude_From_Build 1
+# End Source File
+# End Group
# Begin Source File
SOURCE=.\ori.jmax\burrow~.c
@@ -275,11 +334,6 @@ SOURCE=.\ori.jmax\thresher~.c
# End Source File
# Begin Source File
-SOURCE=.\ori.jmax\unconvert.c
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
SOURCE=.\ori.jmax\vacancy~.c
# PROP Exclude_From_Build 1
# End Source File
diff --git a/externals/grill/fftease/license.txt b/externals/grill/fftease/license.txt
index a8303e67..501b0d7a 100644
--- a/externals/grill/fftease/license.txt
+++ b/externals/grill/fftease/license.txt
@@ -1,7 +1,6 @@
FFTease - A set of Live Spectral Processors
Originally written by Eric Lyon and Christopher Penrose for the Max/MSP platform
-This flext port is based on the jMax port of Christian Klippel
Copyright (c)Thomas Grill (xovo@gmx.net)
---------------------------------------------------------
diff --git a/externals/grill/fftease/makefile.pd-darwin b/externals/grill/fftease/makefile.pd-darwin
index 16a94291..8d6c736f 100644
--- a/externals/grill/fftease/makefile.pd-darwin
+++ b/externals/grill/fftease/makefile.pd-darwin
@@ -1,8 +1,6 @@
# FFTease - A set of Live Spectral Processors
# Originally written by Eric Lyon and Christopher Penrose for the Max/MSP platform
#
-# This flext port is based on the jMax port of Christian Klippel
-#
# Copyright (c)Thomas Grill (xovo@gmx.net)
# For information on usage and redistribution, and for a DISCLAIMER OF ALL
# WARRANTIES, see the file, "license.txt," in this distribution.
diff --git a/externals/grill/fftease/makefile.pd-linux b/externals/grill/fftease/makefile.pd-linux
index c6a99338..8f2361ab 100644
--- a/externals/grill/fftease/makefile.pd-linux
+++ b/externals/grill/fftease/makefile.pd-linux
@@ -1,8 +1,6 @@
# FFTease - A set of Live Spectral Processors
# Originally written by Eric Lyon and Christopher Penrose for the Max/MSP platform
#
-# This flext port is based on the jMax port of Christian Klippel
-#
# Copyright (c)Thomas Grill (xovo@gmx.net)
# For information on usage and redistribution, and for a DISCLAIMER OF ALL
# WARRANTIES, see the file, "license.txt," in this distribution.
diff --git a/externals/grill/fftease/makefile.pd-msvc b/externals/grill/fftease/makefile.pd-msvc
index 45611f13..f842ee62 100644
--- a/externals/grill/fftease/makefile.pd-msvc
+++ b/externals/grill/fftease/makefile.pd-msvc
@@ -1,8 +1,6 @@
# FFTease - A set of Live Spectral Processors
# Originally written by Eric Lyon and Christopher Penrose for the Max/MSP platform
#
-# This flext port is based on the jMax port of Christian Klippel
-#
# Copyright (c)Thomas Grill (xovo@gmx.net)
# For information on usage and redistribution, and for a DISCLAIMER OF ALL
# WARRANTIES, see the file, "license.txt," in this distribution.
diff --git a/externals/grill/fftease/media/nixon.aiff b/externals/grill/fftease/media/nixon.aiff
new file mode 100644
index 00000000..3a58dc2b
--- /dev/null
+++ b/externals/grill/fftease/media/nixon.aiff
Binary files differ
diff --git a/externals/grill/fftease/media/schubert.aiff b/externals/grill/fftease/media/schubert.aiff
new file mode 100644
index 00000000..5e72ffc3
--- /dev/null
+++ b/externals/grill/fftease/media/schubert.aiff
Binary files differ
diff --git a/externals/grill/fftease/pd/burrow.pd b/externals/grill/fftease/pd/burrow.pd
index 8b66f0f5..e4adade1 100644
--- a/externals/grill/fftease/pd/burrow.pd
+++ b/externals/grill/fftease/pd/burrow.pd
@@ -1,32 +1,72 @@
-#N canvas 398 240 594 360 12;
+#N canvas 143 237 600 366 12;
#X msg 17 161 getattributes;
#X obj 391 278 print A;
#X obj 161 210 burrow~ -30 -18 0;
#X obj 17 78 tgl 20 1 empty empty enable_dsp 0 -6 0 10 -225271 -1 -1
1 1;
#X msg 17 103 enable \$1;
-#X obj 184 78 tgl 20 0 empty empty inverse_filtering 0 -6 0 10 -225271
--1 -1 1 1;
-#X msg 184 102 invert \$1;
-#X obj 373 78 nbx 5 18 -100 0 0 0 empty empty filtering_threshold(dB)
-0 -6 0 10 -225271 -1 -1 -82 256;
+#X obj 211 78 tgl 20 0 empty empty inverse_filtering 0 -6 0 10 -225271
+-1 -1 0 1;
+#X msg 211 102 invert \$1;
+#X obj 373 78 nbx 5 18 -100 0 0 1 empty empty filtering_threshold(dB)
+0 -6 0 10 -225271 -1 -1 -30 256;
#X msg 373 100 thresh \$1;
-#X obj 374 145 nbx 5 18 -100 0 0 0 empty empty filter_multiplier(dB)
-0 -6 0 10 -225271 -1 -1 -12 256;
+#X obj 374 145 nbx 5 18 -100 0 0 1 empty empty filter_multiplier(dB)
+0 -6 0 10 -225271 -1 -1 -18 256;
#X msg 374 167 mult \$1;
#X obj 161 275 *~;
#X obj 202 280 hsl 128 15 0.001 10 1 1 empty empty volume -2 -6 0 10
--261681 -1 -1 8000 1;
+-261681 -1 -1 10000 1;
#X obj 150 312 dac~;
-#X obj 162 162 adc~ 1;
#X text 390 297 print attributes;
#X text 15 143 list attributes;
#X obj 16 8 cnv 15 550 40 empty empty burrow~ 10 22 0 24 -260818 -1
0;
#X text 188 8 FFTease (C)Lyon \, Penrose (for Max/MSP);
#X text 188 28 flext port by Thomas Grill;
-#X obj 292 162 adc~ 2;
#X text 222 231 threshold \, multiplier \, invert;
+#X obj 138 80 bng 25 250 50 0 empty empty start 0 -6 0 8 -261689 -1
+-1;
+#N canvas 35 47 456 306 schubert 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/schubert.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 233 172 pd schubert;
+#N canvas 35 47 460 310 nixon 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/nixon.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 161 172 pd nixon;
+#X msg 17 259 getthresh;
+#X msg 17 284 getmult;
+#X msg 17 234 getinvert;
+#X text 15 213 get attributes;
#X connect 0 0 2 0;
#X connect 2 0 11 0;
#X connect 2 1 1 0;
@@ -41,5 +81,10 @@
#X connect 11 0 13 0;
#X connect 11 0 13 1;
#X connect 12 0 11 1;
-#X connect 14 0 2 0;
-#X connect 20 0 2 1;
+#X connect 20 0 21 0;
+#X connect 20 0 22 0;
+#X connect 21 0 2 1;
+#X connect 22 0 2 0;
+#X connect 23 0 2 0;
+#X connect 24 0 2 0;
+#X connect 25 0 2 0;
diff --git a/externals/grill/fftease/pd/cross.pd b/externals/grill/fftease/pd/cross.pd
index 9801cf09..593927c7 100644
--- a/externals/grill/fftease/pd/cross.pd
+++ b/externals/grill/fftease/pd/cross.pd
@@ -1,22 +1,72 @@
-#N canvas 140 138 596 362 12;
+#N canvas 275 53 604 370 12;
#X obj 17 78 tgl 20 1 empty empty enable_dsp 0 -6 0 10 -225271 -1 -1
1 1;
#X msg 17 103 enable \$1;
-#X obj 284 86 nbx 5 18 -100 0 0 0 empty empty threshold(dB) 0 -6 0
-10 -225271 -1 -1 0 256;
+#X obj 312 84 nbx 5 18 -100 0 0 1 empty empty threshold(dB) 0 -6 0
+10 -225271 -1 -1 -86 256;
#X obj 161 275 *~;
#X obj 202 280 hsl 128 15 0.001 10 1 1 empty empty volume -2 -6 0 10
--261681 -1 -1 8500 1;
+-261681 -1 -1 11800 1;
#X obj 150 312 dac~;
#X obj 16 8 cnv 15 550 40 empty empty cross~ 10 22 0 24 -260818 -1
0;
#X text 188 8 FFTease (C)Lyon \, Penrose (for Max/MSP);
#X text 188 28 flext port by Thomas Grill;
#X obj 161 210 cross~;
-#X obj 284 163 sig~;
-#X obj 283 115 + 100;
-#X obj 284 138 dbtorms;
-#X obj 162 162 adc~ 1 2;
+#X obj 312 161 sig~;
+#X obj 311 113 + 100;
+#X obj 312 136 dbtorms;
+#X obj 161 80 bng 25 250 50 0 empty empty start 0 -6 0 8 -261689 -1
+-1;
+#N canvas 35 47 456 306 schubert 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/schubert.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 162 175 pd schubert;
+#N canvas 35 47 460 310 nixon 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/nixon.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 183 142 pd nixon;
+#X msg 17 161 getattributes;
+#X text 15 143 list attributes;
+#X text 15 215 get attributes;
+#X obj 445 85 tgl 25 1 empty empty memorize 0 -6 0 10 -225271 -1 -1
+1 1;
+#X text 371 182 partials below the threshold;
+#X text 370 200 are taken from the previous;
+#X text 370 216 frame;
+#X obj 391 278 print A;
+#X text 390 297 print attributes;
+#X msg 17 234 getmemorize;
+#X text 373 165 memorize defaults to 1;
+#X msg 445 117 memorize \$1;
#X connect 0 0 1 0;
#X connect 1 0 9 0;
#X connect 2 0 11 0;
@@ -24,8 +74,15 @@
#X connect 3 0 5 1;
#X connect 4 0 3 1;
#X connect 9 0 3 0;
+#X connect 9 1 23 0;
#X connect 10 0 9 2;
#X connect 11 0 12 0;
#X connect 12 0 10 0;
-#X connect 13 0 9 0;
-#X connect 13 1 9 1;
+#X connect 13 0 14 0;
+#X connect 13 0 15 0;
+#X connect 14 0 9 0;
+#X connect 15 0 9 1;
+#X connect 16 0 9 0;
+#X connect 19 0 27 0;
+#X connect 25 0 9 0;
+#X connect 27 0 9 0;
diff --git a/externals/grill/fftease/pd/dentist.pd b/externals/grill/fftease/pd/dentist.pd
index 5bcabbd3..7434e57a 100644
--- a/externals/grill/fftease/pd/dentist.pd
+++ b/externals/grill/fftease/pd/dentist.pd
@@ -1,9 +1,9 @@
-#N canvas 140 138 598 364 12;
+#N canvas 45 260 600 366 12;
#X obj 17 78 tgl 20 1 empty empty enable_dsp 0 -6 0 10 -225271 -1 -1
1 1;
#X msg 17 103 enable \$1;
-#X obj 374 91 nbx 5 18 0 20000 0 0 empty empty knee_frq 0 -6 0 10 -225271
--1 -1 1375 256;
+#X obj 417 91 nbx 5 18 0 20000 0 0 empty empty knee_frq 0 -6 0 10 -225271
+-1 -1 0 256;
#X obj 211 272 *~;
#X obj 252 277 hsl 128 15 0.001 10 1 1 empty empty volume -2 -6 0 10
-261681 -1 -1 10200 1;
@@ -14,16 +14,38 @@
#X text 198 28 flext port by Thomas Grill;
#X msg 14 181 getattributes;
#X obj 432 255 print A;
-#X obj 294 90 bng 25 250 50 0 empty empty reshuffle 0 -6 0 8 -225271
+#X obj 337 90 bng 25 250 50 0 empty empty reshuffle 0 -6 0 8 -225271
-1 -1;
-#X msg 374 123 knee \$1;
-#X obj 452 91 nbx 5 18 0 1000 0 0 empty empty teeth 0 -6 0 10 -225271
--1 -1 6 256;
-#X msg 452 123 teeth \$1;
-#X text 343 207 knee frq. \, teeth;
-#X obj 211 207 dentist~ 1000 10;
-#X obj 211 84 adc~ 1;
+#X msg 417 123 knee \$1;
+#X obj 495 91 nbx 5 18 0 1000 0 0 empty empty teeth 0 -6 0 10 -225271
+-1 -1 0 256;
+#X msg 495 123 teeth \$1;
+#X text 348 209 knee frq. \, teeth;
+#X obj 211 208 dentist~ 1000 10;
#X text 14 164 list attributes;
+#X obj 212 92 bng 25 250 50 0 empty empty start 0 -6 0 8 -261689 -1
+-1;
+#N canvas 35 47 456 306 schubert 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/schubert.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 212 156 pd schubert;
+#X text 15 222 get attributes;
+#X msg 15 239 getknee;
+#X msg 15 267 getteeth;
#X connect 0 0 1 0;
#X connect 1 0 16 0;
#X connect 2 0 12 0;
@@ -37,4 +59,7 @@
#X connect 14 0 16 0;
#X connect 16 0 3 0;
#X connect 16 1 10 0;
-#X connect 17 0 16 0;
+#X connect 18 0 19 0;
+#X connect 19 0 16 0;
+#X connect 21 0 16 0;
+#X connect 22 0 16 0;
diff --git a/externals/grill/fftease/pd/disarray.pd b/externals/grill/fftease/pd/disarray.pd
index 3bdd36b4..b07a619d 100644
--- a/externals/grill/fftease/pd/disarray.pd
+++ b/externals/grill/fftease/pd/disarray.pd
@@ -1,12 +1,12 @@
-#N canvas 140 138 600 366 12;
+#N canvas 68 275 606 372 12;
#X obj 17 78 tgl 20 1 empty empty enable_dsp 0 -6 0 10 -225271 -1 -1
1 1;
#X msg 17 103 enable \$1;
-#X obj 369 88 nbx 5 18 0 20000 0 0 empty empty knee_frq 0 -6 0 10 -225271
--1 -1 0 256;
+#X obj 369 88 nbx 5 18 0 20000 0 1 empty empty knee_frq 0 -6 0 10 -225271
+-1 -1 1300 256;
#X obj 211 272 *~;
#X obj 252 277 hsl 128 15 0.001 10 1 1 empty empty volume -2 -6 0 10
--261681 -1 -1 8600 1;
+-261681 -1 -1 9600 1;
#X obj 200 309 dac~;
#X obj 16 8 cnv 15 550 40 empty empty disarray~ 10 22 0 24 -260818
-1 0;
@@ -14,28 +14,54 @@
#X text 206 27 flext port by Thomas Grill;
#X msg 14 181 getattributes;
#X obj 427 281 print A;
-#X obj 211 84 adc~ 1;
#X text 14 164 list attributes;
#X obj 211 217 disarray~ 1300 0 20;
-#X msg 369 120 freq \$1;
-#X obj 296 87 bng 25 250 50 0 empty empty reshuffle 0 -6 0 8 -225271
+#X obj 281 89 bng 25 250 50 0 empty empty reshuffle 0 -6 0 10 -225271
-1 -1;
-#X obj 454 88 nbx 5 18 0 1000 0 0 empty empty shuffle_count 0 -6 0
-10 -225271 -1 -1 0 256;
-#X msg 454 120 shcnt \$1;
-#X text 292 199 knee frq \, quality \, shuffle count;
+#X obj 454 88 nbx 5 18 0 1000 0 1 empty empty shuffle_count 0 -6 0
+10 -225271 -1 -1 20 256;
#X text 424 300 attributes;
+#X text 15 219 get attributes;
+#X obj 207 89 bng 25 250 50 0 empty empty start 0 -6 0 8 -261689 -1
+-1;
+#N canvas 35 47 456 306 schubert 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/schubert.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 212 154 pd schubert;
+#X msg 369 120 knee \$1;
+#X msg 454 120 partials \$1;
+#X msg 15 238 getknee;
+#X msg 16 263 getpartials;
+#X text 292 199 knee frq \, quality \, partials;
+#X text 367 218 (these are the defaults);
#X connect 0 0 1 0;
-#X connect 1 0 13 0;
-#X connect 2 0 14 0;
+#X connect 1 0 12 0;
+#X connect 2 0 19 0;
#X connect 3 0 5 0;
#X connect 3 0 5 1;
#X connect 4 0 3 1;
-#X connect 9 0 13 0;
-#X connect 11 0 13 0;
-#X connect 13 0 3 0;
-#X connect 13 1 10 0;
-#X connect 14 0 13 0;
-#X connect 15 0 13 0;
-#X connect 16 0 17 0;
-#X connect 17 0 13 0;
+#X connect 9 0 12 0;
+#X connect 12 0 3 0;
+#X connect 12 1 10 0;
+#X connect 13 0 12 0;
+#X connect 14 0 20 0;
+#X connect 17 0 18 0;
+#X connect 18 0 12 0;
+#X connect 19 0 12 0;
+#X connect 20 0 12 0;
+#X connect 21 0 12 0;
+#X connect 22 0 12 0;
diff --git a/externals/grill/fftease/pd/drown.pd b/externals/grill/fftease/pd/drown.pd
new file mode 100644
index 00000000..2e492311
--- /dev/null
+++ b/externals/grill/fftease/pd/drown.pd
@@ -0,0 +1,61 @@
+#N canvas 140 138 612 378 12;
+#X obj 17 90 tgl 20 1 empty empty enable_dsp 0 -6 0 10 -225271 -1 -1
+1 1;
+#X msg 17 115 enable \$1;
+#X obj 166 272 *~;
+#X obj 207 277 hsl 128 15 0.001 1000 1 1 empty empty volume -2 -6 0
+10 -261681 -1 -1 9700 1;
+#X obj 155 309 dac~;
+#X obj 16 8 cnv 15 550 40 empty empty drown~ 10 22 0 24 -260818 -1
+0;
+#X text 206 7 FFTease (C)Lyon \, Penrose (for Max/MSP);
+#X text 206 27 flext port by Thomas Grill;
+#X obj 294 97 nbx 5 18 -100 0 0 1 empty empty threshold 0 -6 0 10 -225271
+-1 -1 -75 256;
+#X obj 166 88 bng 25 250 50 0 empty empty start 0 -6 0 8 -261689 -1
+-1;
+#N canvas 35 47 456 306 schubert 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/schubert.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 166 126 pd schubert;
+#X obj 166 217 drown~;
+#X obj 384 174 sig~ 1;
+#X obj 385 99 nbx 5 18 -100 10 0 1 empty empty multiplication_factor
+0 -6 0 10 -225271 -1 -1 -18 256;
+#X obj 292 175 sig~ 1;
+#X obj 294 125 + 100;
+#X obj 385 125 + 100;
+#X obj 385 148 dbtorms;
+#X obj 293 149 dbtorms;
+#X obj 405 324 denude~;
+#X text 403 345 alternative naming;
+#X connect 0 0 1 0;
+#X connect 1 0 11 0;
+#X connect 2 0 4 0;
+#X connect 2 0 4 1;
+#X connect 3 0 2 1;
+#X connect 8 0 15 0;
+#X connect 9 0 10 0;
+#X connect 10 0 11 0;
+#X connect 11 0 2 0;
+#X connect 12 0 11 2;
+#X connect 13 0 16 0;
+#X connect 14 0 11 1;
+#X connect 15 0 18 0;
+#X connect 16 0 17 0;
+#X connect 17 0 12 0;
+#X connect 18 0 14 0;
diff --git a/externals/grill/fftease/pd/ether.pd b/externals/grill/fftease/pd/ether.pd
index 3448f300..720fe466 100644
--- a/externals/grill/fftease/pd/ether.pd
+++ b/externals/grill/fftease/pd/ether.pd
@@ -1,10 +1,10 @@
-#N canvas 140 138 600 366 12;
+#N canvas 140 138 602 368 12;
#X obj 17 78 tgl 20 1 empty empty enable_dsp 0 -6 0 10 -225271 -1 -1
1 1;
#X msg 17 103 enable \$1;
#X obj 211 272 *~;
#X obj 252 277 hsl 128 15 0.001 10 1 1 empty empty volume -2 -6 0 10
--261681 -1 -1 7800 1;
+-261681 -1 -1 8600 1;
#X obj 200 309 dac~;
#X obj 16 8 cnv 15 550 40 empty empty ether~ 10 22 0 24 -260818 -1
0;
@@ -13,16 +13,57 @@
#X msg 14 181 getattributes;
#X obj 427 281 print A;
#X text 14 164 list attributes;
-#X obj 419 87 nbx 5 18 0 1000 0 0 empty empty index 0 -6 0 10 -225271
--1 -1 56 256;
+#X obj 499 84 nbx 5 18 0 1000 0 0 empty empty index 0 -6 0 10 -225271
+-1 -1 22 256;
#X text 424 300 attributes;
-#X msg 307 120 invert \$1;
-#X obj 307 86 tgl 25 0 empty empty invert 0 -6 0 8 -225271 -1 -1 1
+#X msg 387 117 invert \$1;
+#X obj 387 83 tgl 25 0 empty empty invert 0 -6 0 8 -225271 -1 -1 0
1;
-#X msg 419 119 index \$1;
+#X msg 499 116 index \$1;
#X obj 211 217 ether~ 1;
-#X text 280 215 quality \, invert \, index;
-#X obj 211 84 adc~;
+#X text 287 212 quality \, invert \, index;
+#X obj 211 88 bng 25 250 50 0 empty empty start 0 -6 0 8 -261689 -1
+-1;
+#N canvas 35 47 456 306 schubert 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/schubert.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 271 172 pd schubert;
+#N canvas 35 47 460 310 nixon 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/nixon.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 212 148 pd nixon;
+#X text 15 213 get attributes;
+#X msg 15 230 getinvert;
+#X msg 16 259 getindex;
+#X text 287 228 (defaults are 0 \, 0 \, 0);
#X connect 0 0 1 0;
#X connect 1 0 16 0;
#X connect 2 0 4 0;
@@ -35,5 +76,9 @@
#X connect 15 0 16 0;
#X connect 16 0 2 0;
#X connect 16 1 9 0;
-#X connect 18 0 16 0;
-#X connect 18 1 16 1;
+#X connect 18 0 19 0;
+#X connect 18 0 20 0;
+#X connect 19 0 16 1;
+#X connect 20 0 16 0;
+#X connect 22 0 16 0;
+#X connect 23 0 16 0;
diff --git a/externals/grill/fftease/pd/morphine.pd b/externals/grill/fftease/pd/morphine.pd
new file mode 100644
index 00000000..b8ae6f2f
--- /dev/null
+++ b/externals/grill/fftease/pd/morphine.pd
@@ -0,0 +1,77 @@
+#N canvas 140 138 606 372 12;
+#X obj 17 78 tgl 20 1 empty empty enable_dsp 0 -6 0 10 -225271 -1 -1
+1 1;
+#X msg 17 103 enable \$1;
+#X obj 211 272 *~;
+#X obj 252 277 hsl 128 15 0.001 10 1 1 empty empty volume -2 -6 0 10
+-261681 -1 -1 10000 1;
+#X obj 200 309 dac~;
+#X obj 16 8 cnv 15 550 40 empty empty morphine~ 10 22 0 24 -260818
+-1 0;
+#X text 206 7 FFTease (C)Lyon \, Penrose (for Max/MSP);
+#X text 206 27 flext port by Thomas Grill;
+#X msg 14 181 getattributes;
+#X obj 427 281 print A;
+#X text 14 164 list attributes;
+#X obj 414 86 nbx 5 18 0.001 1 1 1 empty empty index 0 -6 0 10 -225271
+-1 -1 0.001 256;
+#X text 424 300 attributes;
+#X msg 414 110 index \$1;
+#X obj 211 88 bng 25 250 50 0 empty empty start 0 -6 0 8 -261689 -1
+-1;
+#N canvas 35 47 456 306 schubert 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/schubert.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 210 184 pd schubert;
+#N canvas 35 47 460 310 nixon 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/nixon.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 307 186 pd nixon;
+#X text 15 215 get attributes;
+#X msg 16 234 getindex;
+#X text 477 87 (0...1);
+#X obj 211 217 morphine~ 0.05;
+#X text 336 219 index (defaults to 0);
+#X connect 0 0 1 0;
+#X connect 1 0 20 0;
+#X connect 2 0 4 0;
+#X connect 2 0 4 1;
+#X connect 3 0 2 1;
+#X connect 8 0 20 0;
+#X connect 11 0 13 0;
+#X connect 13 0 20 0;
+#X connect 14 0 15 0;
+#X connect 14 0 16 0;
+#X connect 15 0 20 0;
+#X connect 16 0 20 1;
+#X connect 18 0 20 0;
+#X connect 20 0 2 0;
+#X connect 20 1 9 0;
diff --git a/externals/grill/fftease/pd/scrape.pd b/externals/grill/fftease/pd/scrape.pd
new file mode 100644
index 00000000..c99187ee
--- /dev/null
+++ b/externals/grill/fftease/pd/scrape.pd
@@ -0,0 +1,72 @@
+#N canvas 140 138 606 372 12;
+#X obj 17 78 tgl 20 1 empty empty enable_dsp 0 -6 0 10 -225271 -1 -1
+1 1;
+#X msg 17 103 enable \$1;
+#X obj 211 272 *~;
+#X obj 252 277 hsl 128 15 0.001 10 1 1 empty empty volume -2 -6 0 10
+-261681 -1 -1 9800 1;
+#X obj 200 309 dac~;
+#X obj 16 8 cnv 15 550 40 empty empty scrape~ 10 22 0 24 -260818 -1
+0;
+#X text 206 7 FFTease (C)Lyon \, Penrose (for Max/MSP);
+#X text 206 27 flext port by Thomas Grill;
+#X msg 14 181 getattributes;
+#X obj 427 281 print A;
+#X text 14 164 list attributes;
+#X obj 423 90 nbx 5 18 10 20000 1 1 empty empty knee 0 -6 0 10 -225271
+-1 -1 1000 256;
+#X text 424 300 attributes;
+#X obj 211 88 bng 25 250 50 0 empty empty start 0 -6 0 8 -261689 -1
+-1;
+#N canvas 35 47 456 306 schubert 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/schubert.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 210 184 pd schubert;
+#X text 15 215 get attributes;
+#X obj 319 89 nbx 5 18 -100 0 0 1 empty empty multiplier 0 -6 0 10
+-225271 -1 -1 -60 256;
+#X obj 318 183 sig~ 1;
+#X obj 318 116 + 100;
+#X obj 318 143 dbtorms;
+#X msg 16 234 getknee;
+#X msg 16 257 getcutoff;
+#X msg 423 114 knee \$1;
+#X obj 505 90 nbx 5 18 10 20000 1 1 empty empty cutoff 0 -6 0 10 -225271
+-1 -1 2000 256;
+#X msg 505 114 cutoff \$1;
+#X obj 211 217 scrape~ 1000 2000;
+#X text 361 219 knee \, cutoff;
+#X connect 0 0 1 0;
+#X connect 1 0 25 0;
+#X connect 2 0 4 0;
+#X connect 2 0 4 1;
+#X connect 3 0 2 1;
+#X connect 8 0 25 0;
+#X connect 11 0 22 0;
+#X connect 13 0 14 0;
+#X connect 14 0 25 0;
+#X connect 16 0 18 0;
+#X connect 17 0 25 1;
+#X connect 18 0 19 0;
+#X connect 19 0 17 0;
+#X connect 20 0 25 0;
+#X connect 21 0 25 0;
+#X connect 22 0 25 0;
+#X connect 23 0 24 0;
+#X connect 24 0 25 0;
+#X connect 25 0 2 0;
+#X connect 25 1 9 0;
diff --git a/externals/grill/fftease/pd/shapee.pd b/externals/grill/fftease/pd/shapee.pd
new file mode 100644
index 00000000..75305fb0
--- /dev/null
+++ b/externals/grill/fftease/pd/shapee.pd
@@ -0,0 +1,62 @@
+#N canvas 140 138 612 378 12;
+#X obj 17 78 tgl 20 1 empty empty enable_dsp 0 -6 0 10 -225271 -1 -1
+1 1;
+#X msg 17 103 enable \$1;
+#X obj 211 272 *~;
+#X obj 252 277 hsl 128 15 0.001 10 1 1 empty empty volume -2 -6 0 10
+-261681 -1 -1 10700 1;
+#X obj 200 309 dac~;
+#X obj 16 8 cnv 15 550 40 empty empty shapee~ 10 22 0 24 -260818 -1
+0;
+#X text 206 7 FFTease (C)Lyon \, Penrose (for Max/MSP);
+#X text 206 27 flext port by Thomas Grill;
+#X obj 211 88 bng 25 250 50 0 empty empty start 0 -6 0 8 -261689 -1
+-1;
+#N canvas 35 47 458 308 schubert 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/schubert.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 210 184 pd schubert;
+#N canvas 35 47 460 310 nixon 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/nixon.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 307 184 pd nixon;
+#X text 298 219 quality (defaults to 0);
+#X obj 211 217 shapee~ 1;
+#X connect 0 0 1 0;
+#X connect 1 0 12 0;
+#X connect 2 0 4 0;
+#X connect 2 0 4 1;
+#X connect 3 0 2 1;
+#X connect 8 0 9 0;
+#X connect 8 0 10 0;
+#X connect 9 0 12 0;
+#X connect 10 0 12 1;
+#X connect 12 0 2 0;
diff --git a/externals/grill/fftease/pd/swinger.pd b/externals/grill/fftease/pd/swinger.pd
new file mode 100644
index 00000000..deb7058f
--- /dev/null
+++ b/externals/grill/fftease/pd/swinger.pd
@@ -0,0 +1,62 @@
+#N canvas 275 53 610 376 12;
+#X obj 17 78 tgl 20 1 empty empty enable_dsp 0 -6 0 10 -225271 -1 -1
+1 1;
+#X msg 17 103 enable \$1;
+#X obj 198 275 *~;
+#X obj 239 280 hsl 128 15 0.001 10 1 1 empty empty volume -2 -6 0 10
+-261681 -1 -1 10300 1;
+#X obj 187 312 dac~;
+#X obj 16 8 cnv 15 550 40 empty empty swinger~ 10 22 0 24 -260818 -1
+0;
+#X text 188 8 FFTease (C)Lyon \, Penrose (for Max/MSP);
+#X text 188 28 flext port by Thomas Grill;
+#X obj 198 80 bng 25 250 50 0 empty empty start 0 -6 0 8 -261689 -1
+-1;
+#N canvas 35 47 456 306 schubert 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/schubert.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 199 175 pd schubert;
+#N canvas 35 47 460 310 nixon 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/nixon.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 274 144 pd nixon;
+#X obj 198 210 swinger~ 1;
+#X text 284 210 quality (defaults to 0);
+#X connect 0 0 1 0;
+#X connect 1 0 11 0;
+#X connect 2 0 4 0;
+#X connect 2 0 4 1;
+#X connect 3 0 2 1;
+#X connect 8 0 9 0;
+#X connect 8 0 10 0;
+#X connect 9 0 11 0;
+#X connect 10 0 11 1;
+#X connect 11 0 2 0;
diff --git a/externals/grill/fftease/pd/taint.pd b/externals/grill/fftease/pd/taint.pd
new file mode 100644
index 00000000..00f859af
--- /dev/null
+++ b/externals/grill/fftease/pd/taint.pd
@@ -0,0 +1,83 @@
+#N canvas 140 138 614 380 12;
+#X obj 17 78 tgl 20 1 empty empty enable_dsp 0 -6 0 10 -225271 -1 -1
+1 1;
+#X msg 17 103 enable \$1;
+#X obj 211 272 *~;
+#X obj 252 277 hsl 128 15 0.001 10 1 1 empty empty volume -2 -6 0 10
+-261681 -1 -1 10000 1;
+#X obj 200 309 dac~;
+#X obj 16 8 cnv 15 550 40 empty empty taint~ 10 22 0 24 -260818 -1
+0;
+#X text 206 7 FFTease (C)Lyon \, Penrose (for Max/MSP);
+#X text 206 27 flext port by Thomas Grill;
+#X msg 14 181 getattributes;
+#X obj 427 281 print A;
+#X text 14 164 list attributes;
+#X obj 480 89 nbx 5 18 -100 0 0 1 empty empty thresh 0 -6 0 10 -225271
+-1 -1 -60 256;
+#X text 424 300 attributes;
+#X obj 211 88 bng 25 250 50 0 empty empty start 0 -6 0 8 -261689 -1
+-1;
+#N canvas 35 47 456 306 schubert 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/schubert.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 210 184 pd schubert;
+#N canvas 35 47 460 310 nixon 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/nixon.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 302 185 pd nixon;
+#X text 15 215 get attributes;
+#X obj 211 217 taint~ -60 0;
+#X msg 481 125 thresh \$1;
+#X obj 391 89 tgl 25 1 empty empty invert 0 -6 0 10 -225271 -1 -1 0
+1;
+#X msg 391 125 invert \$1;
+#X msg 16 258 getthresh;
+#X msg 16 234 getinvert;
+#X text 319 217 threshold \, invert (default -10 \, 0);
+#X connect 0 0 1 0;
+#X connect 1 0 17 0;
+#X connect 2 0 4 0;
+#X connect 2 0 4 1;
+#X connect 3 0 2 1;
+#X connect 8 0 17 0;
+#X connect 11 0 18 0;
+#X connect 13 0 14 0;
+#X connect 13 0 15 0;
+#X connect 14 0 17 0;
+#X connect 15 0 17 1;
+#X connect 17 0 2 0;
+#X connect 17 1 9 0;
+#X connect 18 0 17 0;
+#X connect 19 0 20 0;
+#X connect 20 0 17 0;
+#X connect 21 0 17 0;
+#X connect 22 0 17 0;
diff --git a/externals/grill/fftease/pd/thresher.pd b/externals/grill/fftease/pd/thresher.pd
new file mode 100644
index 00000000..13201212
--- /dev/null
+++ b/externals/grill/fftease/pd/thresher.pd
@@ -0,0 +1,44 @@
+#N canvas 140 138 626 392 12;
+#X obj 17 86 tgl 20 1 empty empty enable_dsp 0 -6 0 10 -225271 -1 -1
+1 1;
+#X msg 17 111 enable \$1;
+#X obj 219 288 *~;
+#X obj 260 293 hsl 128 15 0.001 10 1 1 empty empty volume -2 -6 0 10
+-261681 -1 -1 10300 1;
+#X obj 208 325 dac~;
+#X obj 16 8 cnv 15 550 40 empty empty thresher~ 10 22 0 24 -260818
+-1 0;
+#X text 206 7 FFTease (C)Lyon \, Penrose (for Max/MSP);
+#X text 206 27 flext port by Thomas Grill;
+#X obj 467 297 print A;
+#X text 464 316 attributes;
+#X obj 219 92 bng 25 250 50 0 empty empty start 0 -6 0 8 -261689 -1
+-1;
+#N canvas 35 47 460 310 nixon 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/nixon.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 219 184 pd nixon;
+#X obj 218 227 thresher~;
+#X connect 0 0 1 0;
+#X connect 1 0 12 0;
+#X connect 2 0 4 0;
+#X connect 2 0 4 1;
+#X connect 3 0 2 1;
+#X connect 10 0 11 0;
+#X connect 11 0 12 0;
+#X connect 12 0 2 0;
+#X connect 12 1 8 0;
diff --git a/externals/grill/fftease/pd/vacancy.pd b/externals/grill/fftease/pd/vacancy.pd
new file mode 100644
index 00000000..b191f16a
--- /dev/null
+++ b/externals/grill/fftease/pd/vacancy.pd
@@ -0,0 +1,97 @@
+#N canvas 140 138 622 388 12;
+#X obj 17 78 tgl 20 1 empty empty enable_dsp 0 -6 0 10 -225271 -1 -1
+1 1;
+#X msg 17 103 enable \$1;
+#X obj 179 284 *~;
+#X obj 220 289 hsl 128 15 0.001 10 1 1 empty empty volume -2 -6 0 10
+-261681 -1 -1 11000 1;
+#X obj 168 321 dac~;
+#X obj 16 8 cnv 15 550 40 empty empty vacancy~ 10 22 0 24 -260818 -1
+0;
+#X text 206 7 FFTease (C)Lyon \, Penrose (for Max/MSP);
+#X text 206 27 flext port by Thomas Grill;
+#X msg 14 181 getattributes;
+#X obj 427 293 print A;
+#X text 14 164 list attributes;
+#X obj 276 91 nbx 5 18 -100 0 0 1 empty empty threshold 0 -6 0 10 -225271
+-1 -1 -31 256;
+#X text 424 312 attributes;
+#X obj 179 88 bng 25 250 50 0 empty empty start 0 -6 0 8 -261689 -1
+-1;
+#N canvas 35 47 456 306 schubert 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/schubert.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 180 174 pd schubert;
+#N canvas 35 47 460 310 nixon 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/nixon.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 316 175 pd nixon;
+#X text 15 215 get attributes;
+#X msg 275 129 thresh \$1;
+#X obj 363 91 tgl 25 1 empty empty invert 0 -6 0 10 -225271 -1 -1 0
+1;
+#X msg 363 127 invert \$1;
+#X msg 16 235 getthresh;
+#X msg 16 259 getinvert;
+#X obj 179 203 vacancy~ -30 0 1 0;
+#X obj 451 91 tgl 25 1 empty empty use_rms 0 -6 0 10 -225271 -1 -1
+1 1;
+#X obj 520 91 tgl 25 1 empty empty swap_phase 0 -6 0 10 -225271 -1
+-1 0 1;
+#X msg 451 127 rms \$1;
+#X msg 520 127 swap \$1;
+#X text 256 226 threshold \, invert \, rms \, swap;
+#X msg 16 283 getrms;
+#X msg 17 308 getswap;
+#X connect 0 0 1 0;
+#X connect 1 0 22 0;
+#X connect 2 0 4 0;
+#X connect 2 0 4 1;
+#X connect 3 0 2 1;
+#X connect 8 0 22 0;
+#X connect 11 0 17 0;
+#X connect 13 0 14 0;
+#X connect 13 0 15 0;
+#X connect 14 0 22 0;
+#X connect 15 0 22 1;
+#X connect 17 0 22 0;
+#X connect 18 0 19 0;
+#X connect 19 0 22 0;
+#X connect 20 0 22 0;
+#X connect 21 0 22 0;
+#X connect 22 0 2 0;
+#X connect 22 1 9 0;
+#X connect 23 0 25 0;
+#X connect 24 0 26 0;
+#X connect 25 0 22 0;
+#X connect 26 0 22 0;
+#X connect 28 0 22 0;
+#X connect 29 0 22 0;
diff --git a/externals/grill/fftease/pd/xsyn.pd b/externals/grill/fftease/pd/xsyn.pd
new file mode 100644
index 00000000..e665bfd8
--- /dev/null
+++ b/externals/grill/fftease/pd/xsyn.pd
@@ -0,0 +1,61 @@
+#N canvas 140 138 589 373 12;
+#X obj 17 78 tgl 20 1 empty empty enable_dsp 0 -6 0 10 -225271 -1 -1
+1 1;
+#X msg 17 103 enable \$1;
+#X obj 214 284 *~;
+#X obj 255 289 hsl 128 15 0.001 10 1 1 empty empty volume -2 -6 0 10
+-261681 -1 -1 10500 1;
+#X obj 203 321 dac~;
+#X obj 16 8 cnv 15 550 40 empty empty xsyn~ 10 22 0 24 -260818 -1 0
+;
+#X text 206 7 FFTease (C)Lyon \, Penrose (for Max/MSP);
+#X text 206 27 flext port by Thomas Grill;
+#X obj 214 88 bng 25 250 50 0 empty empty start 0 -6 0 8 -261689 -1
+-1;
+#N canvas 35 47 456 306 schubert 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/schubert.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 215 174 pd schubert;
+#N canvas 35 47 460 310 nixon 0;
+#X obj 51 234 outlet~;
+#X obj 51 188 readsf~ 1;
+#X obj 51 19 inlet;
+#X msg 27 80 1;
+#X obj 52 115 t f b;
+#X obj 51 44 route bang 1 0;
+#X msg 86 149 open ../media/nixon.aiff;
+#X connect 1 0 0 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 4 1 6 0;
+#X connect 5 0 3 0;
+#X connect 5 1 4 0;
+#X connect 5 2 1 0;
+#X connect 6 0 1 0;
+#X restore 249 150 pd nixon;
+#X obj 214 203 xsyn~;
+#X connect 0 0 1 0;
+#X connect 1 0 11 0;
+#X connect 2 0 4 0;
+#X connect 2 0 4 1;
+#X connect 3 0 2 1;
+#X connect 8 0 9 0;
+#X connect 8 0 10 0;
+#X connect 9 0 11 0;
+#X connect 10 0 11 1;
+#X connect 11 0 2 0;
diff --git a/externals/grill/fftease/readme.txt b/externals/grill/fftease/readme.txt
index b00adbdc..fefd498f 100644
--- a/externals/grill/fftease/readme.txt
+++ b/externals/grill/fftease/readme.txt
@@ -1,8 +1,6 @@
FFTease - A set of Live Spectral Processors
Originally written by Eric Lyon and Christopher Penrose for the Max/MSP platform
-This flext port is based on the jMax port of Christian Klippel
-
Copyright (c)Thomas Grill (xovo@gmx.net)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
@@ -57,28 +55,36 @@ You must have the following "Source Trees" defined:
PORTING NOTES:
+The example audio files schubert.aiff and nixon.aiff have been thankfully taken from
+Christian Klippels FFTease jMax port.
+
+
- pv-lib:
- gcc (OSX) complains about _cfft being defined by pv-lib and pd.... any problems with that?
- cross:
+ - STRANGE: spectral amplitude in channel1 is undefined if gainer <= threshie
+ -> value of previous frame is used then
+ - (jmax) BUG: a2 for i == N2 is calculated from buffer1
- what about the class members for "correction"?! (superfluous)
- dentist:
- tooth count ("teeth") is preserved and checked on every reshuffle
- - different knee correction
- - BUG: crash beim Einstellen von teeth
+ - use different knee correction
- disarray:
- different frequency correction
- - TODO: check whether freq oder number of bins should be selectable
+ - check whether freq oder number of bins should be selectable -> frequency!
- ether:
- possibility to change qual?
- scrape:
- - maxamp is computed (from spectral amplitudes) before this is initialized!! -> corrected
+ - maxamp is computed (from spectral amplitudes) before these are set!! (function frowned) -> corrected
+
+- shapee:
+ - danger of div by 0... corrected
- swinger:
- - phase is calculated from signal1 (instead of correct signal 2)!! (jMax version)
+ - (jmax) phase is calculated from signal1 (instead of correct signal 2)!!
-- \ No newline at end of file
diff --git a/externals/grill/fftease/src/burrow~.cpp b/externals/grill/fftease/src/burrow~.cpp
index 8398bbbb..fcfaf22e 100644
--- a/externals/grill/fftease/src/burrow~.cpp
+++ b/externals/grill/fftease/src/burrow~.cpp
@@ -55,7 +55,7 @@ V burrow::setup(t_classid c)
burrow::burrow(I argc,const t_atom *argv):
- fftease(4,F_STEREO|F_BALANCED|F_BITSHUFFLE|F_CONVERT),
+ fftease(4,F_STEREO|F_BALANCED|F_BITSHUFFLE|F_NOPH2),
_thresh_dB(-30),_mult_dB(-18),
_invert(false)
{
@@ -88,13 +88,12 @@ burrow::burrow(I argc,const t_atom *argv):
}
-V burrow::Transform(I _N2,S *const *in)
+V burrow::Transform(I _N,S *const *in)
{
- const I _N = _N2*2;
register const F thr = _threshold,mul = _multiplier;
// use simple threshold from second signal to trigger filtering
- // transform does not need phase of signal 2 (-> optimize it!)
+ // transform does not need phase of signal 2
if(_invert)
for (I i = 0; i <= _N; i += 2)
diff --git a/externals/grill/fftease/src/convert.c b/externals/grill/fftease/src/convert.c
index 07500f90..006e4cf7 100644
--- a/externals/grill/fftease/src/convert.c
+++ b/externals/grill/fftease/src/convert.c
@@ -12,7 +12,8 @@
void convert(float *S, float *C, int N2, float *lastphase, float fundamental, float factor )
{
- float phase, phasediff;
+#if 1
+ float phase,phasediff;
int even,odd;
float a,b;
int i;
@@ -26,20 +27,62 @@ void convert(float *S, float *C, int N2, float *lastphase, float fundamental, f
if ( C[even] == 0. )
phasediff = 0.;
else {
- phasediff = ( phase = -atan2( b, a ) ) - lastphase[i];
+ phase = -atan2( b, a );
+ phasediff = fmod(phase - lastphase[i] + (PV_2PI+PV_PI), PV_2PI)-PV_PI;
lastphase[i] = phase;
-
- while ( phasediff > PV_PI ) phasediff -= PV_2PI;
- while ( phasediff < -PV_PI ) phasediff += PV_2PI;
}
C[odd] = phasediff*factor + i*fundamental;
}
+#else
+ float phase,
+ phasediff;
+ int real,
+ imag,
+ amp,
+ freq;
+ float a,
+ b;
+ int i;
+
+ float myTWOPI, myPI;
+
+ myTWOPI = 8.*atan(1.);
+ myPI = 4.*atan(1.);
+
+
+ for ( i = 0; i <= N2; i++ ) {
+ imag = freq = ( real = amp = i<<1 ) + 1;
+ a = ( i == N2 ? S[1] : S[real] );
+ b = ( i == 0 || i == N2 ? 0. : S[imag] );
+
+ C[amp] = hypot( a, b );
+ if ( C[amp] == 0. )
+ phasediff = 0.;
+ else {
+ phasediff = ( phase = -atan2( b, a ) ) - lastphase[i];
+ lastphase[i] = phase;
+
+ // TG: DANGEROUS!!!! (and slow, if lastphase not correctly initialized)
+ while ( phasediff > myPI )
+ phasediff -= myTWOPI;
+ while ( phasediff < -myPI )
+ phasediff += myTWOPI;
+ }
+ C[freq] = phasediff*factor + i*fundamental;
+ /*
+ if( i > 8 && i < 12 ) {
+ fprintf(stderr,"convert freq %d: %f\n",i, C[freq]);
+ }
+ */
+ }
+#endif
}
void unconvert(float *C, float *S, int N2, float *lastphase, float fundamental, float factor )
{
+#if 1
int i,even,odd;
float mag,phase;
@@ -57,4 +100,35 @@ void unconvert(float *C, float *S, int N2, float *lastphase, float fundamental,
else
S[1] = mag*cos( phase );
}
+#else
+ int i,
+ real,
+ imag,
+ amp,
+ freq;
+ float mag,
+ phase;
+
+ for ( i = 0; i <= N2; i++ ) {
+
+ imag = freq = ( real = amp = i<<1 ) + 1;
+
+ if ( i == N2 )
+ real = 1;
+
+ mag = C[amp];
+ lastphase[i] += C[freq] - i*fundamental;
+ phase = lastphase[i]*factor;
+ S[real] = mag*cos( phase );
+
+ if ( i != N2 )
+ S[imag] = -mag*sin( phase );
+ /*
+ if( i == 10 ) {
+ fprintf(stderr,"unconvert: amp: %f freq: %f funda %f fac %f\n", C[amp],C[freq],fundamental,factor);
+ }
+ */
+ }
+
+#endif
}
diff --git a/externals/grill/fftease/src/cross~.cpp b/externals/grill/fftease/src/cross~.cpp
index e794d761..9b56d6e4 100644
--- a/externals/grill/fftease/src/cross~.cpp
+++ b/externals/grill/fftease/src/cross~.cpp
@@ -15,21 +15,39 @@ WARRANTIES, see the file, "license.txt," in this distribution.
class cross:
public fftease
{
- FLEXT_HEADER(cross,fftease)
+ FLEXT_HEADER_S(cross,fftease,setup)
public:
cross();
protected:
+ F *amps;
+ BL memory;
+
+ virtual V Set();
+ virtual V Clear();
+ virtual V Delete();
+
virtual V Transform(I _N2,S *const *in);
+
+private:
+ static V setup(t_classid c);
+
+ FLEXT_ATTRVAR_B(memory)
};
FLEXT_LIB_DSP("fftease, cross~",cross)
+V cross::setup(t_classid c)
+{
+ FLEXT_CADDATTR_VAR1(c,"memorize",memory);
+}
+
cross::cross():
- fftease(2,F_STEREO|F_BALANCED|F_BITSHUFFLE|F_CONVERT)
+ fftease(2,F_STEREO|F_BALANCED|F_BITSHUFFLE|F_NOPH2),
+ memory(true)
{
AddInSignal("Messages and driver signal");
AddInSignal("Filter signal");
@@ -37,14 +55,38 @@ cross::cross():
AddOutSignal("Transformed signal");
}
-V cross::Transform(I _N2,S *const *in)
+V cross::Clear()
+{
+ amps = NULL;
+ fftease::Clear();
+}
+
+V cross::Delete()
+{
+ fftease::Delete();
+ if(amps) delete[] amps;
+}
+
+V cross::Set()
+{
+ fftease::Set();
+ const I _N2 = get_N()/2;
+ amps = new F[_N2];
+ ZeroMem(amps,_N2*sizeof(*amps));
+}
+
+V cross::Transform(I _N,S *const *in)
{
// filled only once per signal vector!!
register const F threshie = *in[0];
+ F *amp = amps;
+
+ for (I i = 0; i <= _N; i += 2,amp++)
+ if( _channel2[i] > threshie )
+ *amp = _channel1[i] *= _channel2[i];
+ else if(memory)
+ // retrieve previous value
+ _channel1[i] = *amp;
- const I _N = _N2*2;
- for (I i = 0; i <= _N; i += 2) {
- // modulate amp2 with amp1 (if over threshold)
- if(_channel1[i] > threshie ) _channel2[i] *= _channel1[i];
- }
}
+
diff --git a/externals/grill/fftease/src/dentist~.cpp b/externals/grill/fftease/src/dentist~.cpp
index 14a08688..ec854adf 100644
--- a/externals/grill/fftease/src/dentist~.cpp
+++ b/externals/grill/fftease/src/dentist~.cpp
@@ -24,7 +24,7 @@ protected:
virtual V Transform(I _N2,S *const *in);
- I *_bin_selection;
+ BL *_bin_selection;
I _teeth;
F _knee;
I _max_bin; // determined by _knee and fundamental frequency
@@ -63,7 +63,7 @@ V dentist::setup(t_classid c)
dentist::dentist(I argc,const t_atom *argv):
- fftease(4,F_BALANCED|F_BITSHUFFLE|F_CONVERT),
+ fftease(4,F_BALANCED|F_BITSHUFFLE),
_knee(500),_teeth(10)
{
/* parse and set object's options given */
@@ -86,15 +86,13 @@ dentist::dentist(I argc,const t_atom *argv):
V dentist::Clear()
{
- fftease::Clear();
-
_bin_selection = NULL;
+ fftease::Clear();
}
V dentist::Delete()
{
fftease::Delete();
-
if(_bin_selection) delete[] _bin_selection;
}
@@ -119,17 +117,17 @@ V dentist::Set()
{
fftease::Set();
- _bin_selection = new I[get_N()/2];
+ _bin_selection = new BL[get_N()/2];
// calculation of _max_bin
ms_knee(_knee);
}
-V dentist::Transform(I _N2,S *const *in)
+V dentist::Transform(I _N,S *const *in)
{
- for(I i = 0; i < _N2 ; i++){
- if( !_bin_selection[i] ) _channel1[i*2] = 0;
- }
+ const BL *bs = _bin_selection;
+ for(I i = 0; i < _N ; i += 2)
+ if(!*(bs++)) _channel1[i] = 0;
}
@@ -145,7 +143,7 @@ V dentist::reset_shuffle()
// clear and set random bins
I i;
for( i = 0; i < _N2; i++ )
- _bin_selection[i] = 0;
+ _bin_selection[i] = false;
for( i = 0; i < t; i++ )
- _bin_selection[rand()%_max_bin] = 1;
+ _bin_selection[rand()%_max_bin] = true;
}
diff --git a/externals/grill/fftease/src/disarray~.cpp b/externals/grill/fftease/src/disarray~.cpp
index e297131d..f9837408 100644
--- a/externals/grill/fftease/src/disarray~.cpp
+++ b/externals/grill/fftease/src/disarray~.cpp
@@ -53,13 +53,13 @@ V disarray::setup(t_classid c)
{
FLEXT_CADDBANG(c,0,reset_shuffle);
- FLEXT_CADDATTR_VAR(c,"freq",_freq,ms_freq);
- FLEXT_CADDATTR_VAR1(c,"shcnt",_shuffle_count);
+ FLEXT_CADDATTR_VAR(c,"knee",_freq,ms_freq);
+ FLEXT_CADDATTR_VAR1(c,"partials",_shuffle_count);
}
disarray::disarray(I argc,const t_atom *argv):
- fftease(2,F_BITSHUFFLE|F_CONVERT),
+ fftease(2,F_BITSHUFFLE),
_freq(1300),_qual(false),_shuffle_count(20)
{
/* parse and set object's options given */
@@ -79,7 +79,7 @@ disarray::disarray(I argc,const t_atom *argv):
if(CanbeInt(argv[2]))
_shuffle_count = GetAInt(argv[2]);
else
- post("%s - Shufflecount must be an integer value - set to %0i",thisName(),_shuffle_count);
+ post("%s - Partials must be an integer value - set to %0i",thisName(),_shuffle_count);
}
Mult(_qual?4:2);
@@ -92,8 +92,8 @@ disarray::disarray(I argc,const t_atom *argv):
V disarray::Clear()
{
- fftease::Clear();
_shuffle_in = _shuffle_out = NULL;
+ fftease::Clear();
}
V disarray::Delete()
@@ -134,13 +134,14 @@ V disarray::ms_freq(F f)
inline V swap(F &a,F &b) { F t = a; a = b; b = t; }
inline V swap(I &a,I &b) { I t = a; a = b; b = t; }
-V disarray::Transform(I _N2,S *const *in)
+V disarray::Transform(I _N,S *const *in)
{
I shcnt = _shuffle_count;
if(shcnt < 0) shcnt = 0;
- else if(shcnt > _N2) shcnt = _N2;
+ else if(shcnt > _N/2) shcnt = _N/2;
for(I i = 0; i < shcnt; i++)
+ // leave phase, just swap amplitudes
swap(_channel1[ _shuffle_in[i] * 2 ],_channel1[ _shuffle_out[i] * 2]);
}
@@ -153,7 +154,7 @@ V disarray::reset_shuffle()
for( i = 0; i < _N2; i++ )
_shuffle_out[i] = _shuffle_in[i] = i ;
- for( i = 0; i < 10000; i++ ) {
+ for( i = 0; i < _max_bin*2; i++ ) {
I p1 = _shuffle_out[ rand()%_max_bin ];
I p2 = _shuffle_out[ rand()%_max_bin ];
swap(_shuffle_out[ p1 ],_shuffle_out[ p2 ]);
diff --git a/externals/grill/fftease/src/drown~.cpp b/externals/grill/fftease/src/drown~.cpp
index 171fbaf8..88803aa8 100644
--- a/externals/grill/fftease/src/drown~.cpp
+++ b/externals/grill/fftease/src/drown~.cpp
@@ -18,17 +18,17 @@ class drown:
FLEXT_HEADER(drown,fftease)
public:
- drown(I argc,const t_atom *argv);
+ drown();
protected:
virtual V Transform(I n,S *const *in);
};
-FLEXT_LIB_DSP_V("fftease, drown~ denude~",drown)
+FLEXT_LIB_DSP("fftease, drown~ denude~",drown)
-drown::drown(I argc,const t_atom *argv):
- fftease(4,F_BALANCED|F_CONVERT)
+drown::drown():
+ fftease(4,F_BALANCED)
{
AddInSignal("Messages and input signal");
AddInSignal("Threshold generator signal");
@@ -37,13 +37,11 @@ drown::drown(I argc,const t_atom *argv):
}
-V drown::Transform(I _N2,S *const *in)
+V drown::Transform(I _N,S *const *in)
{
// only first value of the signal vectors
const F thresh = *in[0],mult = *in[1];
- const I _N = _N2*2;
-
// make up low amplitude bins
for (I i = 0; i <= _N; i += 2)
if(_channel1[i] < thresh) _channel1[i] *= mult;
diff --git a/externals/grill/fftease/src/ether~.cpp b/externals/grill/fftease/src/ether~.cpp
index f75a6632..b8db17f8 100644
--- a/externals/grill/fftease/src/ether~.cpp
+++ b/externals/grill/fftease/src/ether~.cpp
@@ -46,7 +46,7 @@ V ether::setup(t_classid c)
ether::ether(I argc,const t_atom *argv):
- fftease(2,F_STEREO|F_BITSHUFFLE|F_CONVERT),
+ fftease(2,F_STEREO|F_BITSHUFFLE),
_qual(false),_threshMult(0),_invert(false)
{
/* parse and set object's options given */
@@ -66,9 +66,8 @@ ether::ether(I argc,const t_atom *argv):
}
-V ether::Transform(I _N2,S *const *in)
+V ether::Transform(I _N,S *const *in)
{
- const I _N = _N2*2;
const BL inv = _invert;
const F threshMult = _threshMult?_threshMult:1;
diff --git a/externals/grill/fftease/src/fftease.cpp b/externals/grill/fftease/src/fftease.cpp
index f67ed28f..5be59c0e 100644
--- a/externals/grill/fftease/src/fftease.cpp
+++ b/externals/grill/fftease/src/fftease.cpp
@@ -23,6 +23,7 @@ fftease::~fftease() {}
BL fftease::Init()
{
Clear();
+ Set();
return flext_dsp::Init();
}
@@ -92,18 +93,18 @@ V fftease::m_signal(I n,S *const *in,S *const *out)
if(_flags&F_STEREO) rfft( _buffer2, _N2,1);
}
- if(_flags&F_BITSHUFFLE) {
- leanconvert( _buffer1, _channel1, _N2 );
- if(_flags&F_STEREO) leanconvert( _buffer2, _channel2, _N2 );
+ if(!(_flags&F_NOSPEC)) {
+ leanconvert( _buffer1, _channel1, _N2 , !(_flags&F_NOAMP1),!(_flags&F_NOPH1));
+ if(_flags&F_STEREO) leanconvert( _buffer2, _channel2, _N2 ,!(_flags&F_NOAMP2),!(_flags&F_NOPH2) );
}
// ---- BEGIN --------------------------------
- Transform(_N2,in+((_flags&F_STEREO)?1:2));
+ Transform(_N,in+((_flags&F_STEREO)?2:1));
// ---- END --------------------------------
- if(_flags&F_CONVERT) {
+ if(!(_flags&F_NOSPEC)) {
leanunconvert( _channel1, _buffer1, _N2 );
if(_flags&F_STEREO) leanunconvert( _channel2, _buffer2, _N2 );
}
@@ -139,14 +140,23 @@ void fftease::Set()
/* assign memory to the buffers */
_input1 = new F[_Nw];
+ ZeroMem(_input1,_Nw*sizeof(*_input1));
_buffer1 = new F[_N];
- if(_flags&(F_CONVERT|F_CRES)) _channel1 = new F[_N+2];
+ if(!(_flags&F_NOSPEC) || (_flags&F_SPECRES)) {
+ _channel1 = new F[_N+2];
+ ZeroMem(_channel1,(_N+2)*sizeof(*_channel1));
+ }
if(_flags&F_STEREO) {
_input2 = new F[_Nw];
+ ZeroMem(_input2,_Nw*sizeof(*_input2));
_buffer2 = new F[_N];
- if(_flags&(F_CONVERT|F_CRES)) _channel2 = new F[_N+2];
+ if(!(_flags&F_NOSPEC) || (_flags&F_SPECRES)) {
+ _channel2 = new F[_N+2];
+ ZeroMem(_channel2,(_N+2)*sizeof(*_channel2));
+ }
}
_output = new F[_Nw];
+ ZeroMem(_output,_Nw*sizeof(*_output));
if(_flags&F_BITSHUFFLE) {
_bitshuffle = new I[_N*2];
diff --git a/externals/grill/fftease/src/fold.c b/externals/grill/fftease/src/fold.c
index 2c380032..5b9ce476 100644
--- a/externals/grill/fftease/src/fold.c
+++ b/externals/grill/fftease/src/fold.c
@@ -6,6 +6,7 @@
*/
void fold( float *I, float *W, int Nw, float *O, int N, int n )
{
+#if 1
int i;
for ( i = 0; i < N; i++ ) O[i] = 0.;
@@ -16,6 +17,21 @@ void fold( float *I, float *W, int Nw, float *O, int N, int n )
O[n] += I[i]*W[i];
if ( ++n == N ) n = 0;
}
+#else
+ int i;
+
+ for ( i = 0; i < N; i++ )
+ O[i] = 0.;
+
+ while ( n < 0 )
+ n += N;
+ n %= N;
+ for ( i = 0; i < Nw; i++ ) {
+ O[n] += I[i]*W[i];
+ if ( ++n == N )
+ n = 0;
+ }
+#endif
}
@@ -26,6 +42,7 @@ 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 )
{
+#if 1
int i ;
while ( n < 0 ) n += N ;
n %= N ;
@@ -34,5 +51,17 @@ void overlapadd( float *I, int N, float *W, float *O, int Nw, int n )
O[i] += I[n]*W[i] ;
if ( ++n == N ) n = 0 ;
}
+#else
+ int i ;
+ while ( n < 0 )
+ n += N ;
+ n %= N ;
+ for ( i = 0 ; i < Nw ; i++ ) {
+ O[i] += I[n]*W[i] ;
+ if ( ++n == N )
+ n = 0 ;
+ }
+
+#endif
}
diff --git a/externals/grill/fftease/src/leanconvert.c b/externals/grill/fftease/src/leanconvert.c
index ecb6bc54..0c567ca8 100644
--- a/externals/grill/fftease/src/leanconvert.c
+++ b/externals/grill/fftease/src/leanconvert.c
@@ -1,23 +1,49 @@
#include "pv.h"
-void leanconvert( float *S, float *C, int N2 )
+void leanconvert( float *S, float *C, int N2 , int amp, int ph)
{
+#if 1
register int i;
- float a = S[0]; // real value at f=0
- float b = S[1]; // real value at f=Nyquist
+ float a = fabs(S[0]); // real value at f=0
+ float b = fabs(S[1]); // real value at f=Nyquist
- C[0] = fabs(a);
+ C[0] = a;
C[1] = 0;
S += 2,C += 2;
- for ( i = 1; i < N2; i++,S += 2,C += 2 ) {
- C[0] = hypot( S[0], S[1] );
- C[1] = -atan2( S[1], S[0] );
+ if(amp && ph) {
+ for ( i = 1; i < N2; i++,S += 2,C += 2 ) {
+ C[0] = hypot( S[0], S[1] );
+ C[1] = -atan2( S[1], S[0] );
+ }
+ }
+ else if(amp) {
+ for ( i = 1; i < N2; i++,S += 2,C += 2 )
+ C[0] = hypot( S[0], S[1] );
+ }
+ else if(ph) {
+ for ( i = 1; i < N2; i++,S += 2,C += 2 )
+ C[1] = -atan2( S[1], S[0] );
}
- C[0] = fabs(b);
+ C[0] = b;
C[1] = 0;
+#else
+
+ int real, imag,
+ amp, phase;
+ float a, b;
+ int i;
+
+ for ( i = 0; i <= N2; i++ ) {
+ imag = phase = ( real = amp = i<<1 ) + 1;
+ a = ( i == N2 ? S[1] : S[real] );
+ b = ( i == 0 || i == N2 ? 0. : S[imag] );
+ C[amp] = hypot( a, b );
+ C[phase] = -atan2( b, a );
+ }
+#endif
}
@@ -29,6 +55,7 @@ void leanconvert( float *S, float *C, int N2 )
void leanunconvert( float *C, float *S, int N2 )
{
+#if 1
register int i;
S[0] = fabs(C[0]);
@@ -39,5 +66,19 @@ void leanunconvert( float *C, float *S, int N2 )
S[0] = C[0] * cos( C[1] );
S[1] = -C[0] * sin( C[1] );
}
+#else
+ int real, imag,
+ amp, phase;
+ float a, b;
+ register int i;
+
+ for ( i = 0; i <= N2; i++ ) {
+ imag = phase = ( real = amp = i<<1 ) + 1;
+ S[real] = *(C+amp) * cos( *(C+phase) );
+ if ( i != N2 )
+ S[imag] = -*(C+amp) * sin( *(C+phase) );
+ }
+
+#endif
}
diff --git a/externals/grill/fftease/src/main.h b/externals/grill/fftease/src/main.h
index 0ee99584..3cbcc430 100644
--- a/externals/grill/fftease/src/main.h
+++ b/externals/grill/fftease/src/main.h
@@ -63,7 +63,7 @@ protected:
virtual V Set();
virtual V Clear();
virtual V Delete();
- virtual V Transform(I _N2,S *const *in) = 0;
+ virtual V Transform(I _N,S *const *in) = 0;
V Mult(I n) { _mult = n; MakeVar(); }
@@ -83,8 +83,12 @@ protected:
F_STEREO = 0x01,
F_BALANCED = 0x02,
F_BITSHUFFLE = 0x04,
- F_CONVERT = 0x08,F_CRES = 0x10,
- F_RMS = 0x20
+ F_NOSPEC = 0x08,F_SPECRES = 0x10,
+ F_RMS = 0x20,
+ F_NOAMP1 = 0x100,
+ F_NOPH1 = 0x200,
+ F_NOAMP2 = 0x400,
+ F_NOPH2 = 0x800,
};
I _flags;
diff --git a/externals/grill/fftease/src/morphine~.cpp b/externals/grill/fftease/src/morphine~.cpp
index 14ba0971..23c2cca9 100644
--- a/externals/grill/fftease/src/morphine~.cpp
+++ b/externals/grill/fftease/src/morphine~.cpp
@@ -51,8 +51,8 @@ V morphine::setup(t_classid c)
morphine::morphine(I argc,const t_atom *argv):
- fftease(4,F_STEREO|F_BALANCED|F_BITSHUFFLE|F_CONVERT),
- _index(1)
+ fftease(4,F_STEREO|F_BALANCED|F_BITSHUFFLE),
+ _index(0)
{
/* parse and set object's options given */
if(argc >= 1) {
@@ -69,8 +69,8 @@ morphine::morphine(I argc,const t_atom *argv):
V morphine::Clear()
{
- fftease::Clear();
_picks = NULL;
+ fftease::Clear();
}
V morphine::Delete()
@@ -93,8 +93,9 @@ I morphine::sortpicks( const void *a, const void *b )
return 0;
}
-V morphine::Transform(I _N2,S *const *in)
+V morphine::Transform(I _N,S *const *in)
{
+ const I _N2 = _N/2;
I i;
for ( i = 0; i <= _N2; i++ ) {
// find amplitude differences between home and visitors
@@ -105,10 +106,12 @@ V morphine::Transform(I _N2,S *const *in)
// sort our differences in ascending order
qsort( _picks, _N2+1, sizeof(pickme), sortpicks );
- const I morphindex2 = (I)(_index*(_N2+1)+.5)*2;
+ I ix2 = (I)(_index*(_N2+1)+.5)*2;
+ if(ix2 < 0) ix2 = 0;
+ else if(ix2 > _N+2) ix2 = _N+2;
// choose the bins that are least different first
- for (i=0; i <= morphindex2; i += 2) {
+ for (i=0; i < ix2; i += 2) {
_channel1[i] = _channel2[i];
_channel1[i+1] = _channel2[i+1];
}
diff --git a/externals/grill/fftease/src/pv.h b/externals/grill/fftease/src/pv.h
index 0927c17c..23fbd841 100644
--- a/externals/grill/fftease/src/pv.h
+++ b/externals/grill/fftease/src/pv.h
@@ -46,7 +46,7 @@ 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 );
+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 );
diff --git a/externals/grill/fftease/src/scrape~.cpp b/externals/grill/fftease/src/scrape~.cpp
index e31374bd..04366614 100644
--- a/externals/grill/fftease/src/scrape~.cpp
+++ b/externals/grill/fftease/src/scrape~.cpp
@@ -39,11 +39,17 @@ private:
inline V ms_knee(F knee) { _knee = knee; UpdThrFun(); }
inline V ms_cutoff(F cutoff) { _cutoff = cutoff; UpdThrFun(); }
+ inline V ms_thresh1(F thr) { _thresh1 = thr; UpdThrFun(); }
+ inline V ms_thresh2(F thr) { _thresh2 = thr; UpdThrFun(); }
FLEXT_ATTRGET_F(_knee)
FLEXT_CALLSET_F(ms_knee)
FLEXT_ATTRGET_F(_cutoff)
FLEXT_CALLSET_F(ms_cutoff)
+ FLEXT_ATTRGET_F(_thresh1)
+ FLEXT_CALLSET_F(ms_thresh1)
+ FLEXT_ATTRGET_F(_thresh2)
+ FLEXT_CALLSET_F(ms_thresh2)
};
FLEXT_LIB_DSP_V("fftease, scrape~",scrape)
@@ -53,11 +59,13 @@ V scrape::setup(t_classid c)
{
FLEXT_CADDATTR_VAR(c,"knee",_knee,ms_knee);
FLEXT_CADDATTR_VAR(c,"cutoff",_cutoff,ms_cutoff);
+ FLEXT_CADDATTR_VAR(c,"thresh1",_thresh1,ms_thresh1);
+ FLEXT_CADDATTR_VAR(c,"thresh2",_thresh2,ms_thresh2);
}
scrape::scrape(I argc,const t_atom *argv):
- fftease(4,F_BALANCED|F_BITSHUFFLE|F_CONVERT),
+ fftease(4,F_BALANCED|F_BITSHUFFLE),
_thresh1(.0001),_thresh2(.09),
_knee(1000),_cutoff(4000)
@@ -87,8 +95,8 @@ scrape::scrape(I argc,const t_atom *argv):
V scrape::Clear()
{
- fftease::Clear();
_threshfunc = NULL;
+ fftease::Clear();
}
V scrape::Delete()
@@ -128,18 +136,19 @@ V scrape::UpdThrFun()
\remark maxamp is calculated later than in the original FFTease scrape~ object
*/
-V scrape::Transform(I _N2,S *const *in)
+V scrape::Transform(I _N,S *const *in)
{
const F fmult = *in[0];
+ const F *thrf = _threshfunc;
I i;
F maxamp = 1.;
- for( i = 0; i <= _N2; i++ )
- if(maxamp < _channel1[i*2])
- maxamp = _channel1[i*2];
+ for( i = 0; i <= _N; i += 2 )
+ if(maxamp < _channel1[i])
+ maxamp = _channel1[i];
- for( i = 0; i <= _N2; i++ )
- if(_channel1[i*2] < _threshfunc[i] * maxamp)
- _channel1[i*2] *= fmult;
+ for( i = 0; i <= _N; i += 2 )
+ if(_channel1[i] < *(thrf++) * maxamp)
+ _channel1[i] *= fmult;
}
diff --git a/externals/grill/fftease/src/shapee~.cpp b/externals/grill/fftease/src/shapee~.cpp
index 0af5aa93..b42ba46f 100644
--- a/externals/grill/fftease/src/shapee~.cpp
+++ b/externals/grill/fftease/src/shapee~.cpp
@@ -31,7 +31,7 @@ FLEXT_LIB_DSP_V("fftease, shapee~",shapee)
shapee::shapee(I argc,const t_atom *argv):
- fftease(2,F_STEREO|F_BITSHUFFLE|F_CONVERT),
+ fftease(2,F_STEREO|F_BITSHUFFLE),
_qual(false)
{
/* parse and set object's options given */
@@ -54,16 +54,23 @@ shapee::shapee(I argc,const t_atom *argv):
AddOutSignal("Transformed signal");
}
+#define THRESH 0.000001
-V shapee::Transform(I _N2,S *const *in)
+V shapee::Transform(I _N,S *const *in)
{
// lets just shape the entire signal in groups of three
- const I _N = _N2*2;
I i;
- for ( i=2; i < _N+2; i += 6 ) {
- F lowerMult = _channel1[i-2] / _channel1[i];
- F upperMult = _channel1[i+2] / _channel1[i];
+ for ( i=2; i <= _N; i += 6 ) {
+ const F ref = _channel1[i];
+ F lowerMult,upperMult;
+
+ if(!ref)
+ lowerMult = upperMult = 1;
+ else {
+ lowerMult = _channel1[i-2] / ref;
+ upperMult = _channel1[i+2] / ref;
+ }
F newCenter = ( _channel2[i-2]+_channel2[i]+_channel2[i+2] ) / (upperMult + lowerMult + 1);
_channel2[i-2] = lowerMult * newCenter;
@@ -71,7 +78,7 @@ V shapee::Transform(I _N2,S *const *in)
_channel2[i] = newCenter;
}
- for ( i=0; i < _N; i+=2 ) {
+ for ( i=0; i <= _N; i+=2 ) {
_channel1[i] = _channel2[i];
if ( _channel1[i] == 0. )
_channel1[i+1] = 0.;
diff --git a/externals/grill/fftease/src/swinger~.cpp b/externals/grill/fftease/src/swinger~.cpp
index b2ecba34..143bf5de 100644
--- a/externals/grill/fftease/src/swinger~.cpp
+++ b/externals/grill/fftease/src/swinger~.cpp
@@ -21,44 +21,44 @@ class swinger:
FLEXT_HEADER(swinger,fftease)
public:
- swinger();
+ swinger(I argc,const t_atom *argv);
protected:
+ BL _qual;
+
virtual V Transform(I n,S *const *in);
};
-FLEXT_LIB_DSP("fftease, swinger~",swinger)
+FLEXT_LIB_DSP_V("fftease, swinger~",swinger)
-swinger::swinger():
- fftease(2,F_STEREO|F_BITSHUFFLE)
+swinger::swinger(I argc,const t_atom *argv):
+ fftease(2,F_STEREO|F_BITSHUFFLE|F_NOPH1|F_NOAMP2),
+ _qual(false)
{
+ /* parse and set object's options given */
+ if(argc >= 1) {
+ if(CanbeBool(argv[0]))
+ _qual = GetABool(argv[0]);
+ else
+ post("%s - Quality must be a boolean value - set to %0i",thisName(),_qual?1:0);
+ }
+
+ if(_qual) {
+ Mult(4);
+ _flags |= F_BALANCED;
+ }
+ else
+ Mult(2);
+
AddInSignal("Messages and input signal");
AddInSignal("Signal to supply phase information");
AddOutSignal("Transformed signal");
}
-V swinger::Transform(I _N2,S *const *in)
+V swinger::Transform(I _N,S *const *in)
{
- for (I i = 0; i <= _N2; i++ ) {
- const I even = i*2,odd = even+1;
-
- // convert to polar coordinates from complex values
- // replace signal one's phases with those of signal two
- const F a1 = ( i == _N2 ? _buffer1[1] : _buffer1[even] );
- const F b1 = ( i == 0 || i == _N2 ? 0. : _buffer1[odd] );
- // amplitude only
- const F amp = hypot( a1, b1 );
-
- const F a2 = ( i == _N2 ? _buffer2[1] : _buffer2[even] );
- const F b2 = ( i == 0 || i == _N2 ? 0. : _buffer2[odd] );
- // phase only
- const F ph = -atan2( b2, a2 );
-
- _buffer1[even] = amp * cos( ph );
- if ( i != _N2 )
- _buffer1[odd] = -amp * sin( ph );
- }
+ for (I i = 0; i <= _N; i += 2) _channel1[i+1] = _channel2[i+1];
}
diff --git a/externals/grill/fftease/src/taint~.cpp b/externals/grill/fftease/src/taint~.cpp
index 18b7c076..82c38f0e 100644
--- a/externals/grill/fftease/src/taint~.cpp
+++ b/externals/grill/fftease/src/taint~.cpp
@@ -42,13 +42,13 @@ FLEXT_LIB_DSP_V("fftease, taint~",taint)
V taint::setup(t_classid c)
{
- FLEXT_CADDATTR_VAR(c,"threshold",_threshdB,ms_thresh);
+ FLEXT_CADDATTR_VAR(c,"thresh",_threshdB,ms_thresh);
FLEXT_CADDATTR_VAR1(c,"invert",_invert);
}
taint::taint(I argc,const t_atom *argv):
- fftease(4,F_STEREO|F_BALANCED|F_BITSHUFFLE|F_CONVERT),
+ fftease(4,F_STEREO|F_BALANCED|F_BITSHUFFLE|F_NOPH2),
_threshdB(-10),_invert(false)
{
/* parse and set object's options given */
@@ -74,9 +74,8 @@ taint::taint(I argc,const t_atom *argv):
}
-V taint::Transform(I _N2,S *const *in)
+V taint::Transform(I _N,S *const *in)
{
- const I _N = _N2*2;
register const F thr = _threshold;
if(_invert) {
diff --git a/externals/grill/fftease/src/thresher~.cpp b/externals/grill/fftease/src/thresher~.cpp
index 241dad12..2f186c92 100644
--- a/externals/grill/fftease/src/thresher~.cpp
+++ b/externals/grill/fftease/src/thresher~.cpp
@@ -57,7 +57,9 @@ void thresher::Set()
_compositeFrame = new F[_N+2];
_framesLeft = new I[_N2+1];
_c_lastphase_in = new F[_N2+1];
+ ZeroMem(_c_lastphase_in,(_N2+1)*sizeof(*_c_lastphase_in));
_c_lastphase_out = new F[_N2+1];
+ ZeroMem(_c_lastphase_out,(_N2+1)*sizeof(*_c_lastphase_out));
_c_fundamental = _R/_N;
_c_factor_in = _R/(_D * PV_2PI);
@@ -88,18 +90,16 @@ void thresher::Delete()
thresher::thresher():
- fftease(4,F_BALANCED|F_BITSHUFFLE|F_CRES)
+ fftease(4,F_BALANCED|F_BITSHUFFLE|F_NOSPEC|F_SPECRES)
{
AddInSignal("Messages and input signal");
AddOutSignal("Transformed signal");
}
-V thresher::Transform(I _N2,S *const *in)
+V thresher::Transform(I _N,S *const *in)
{
- const I _N = _N2*2;
-
- convert( _buffer1, _channel1, _N2, _c_lastphase_in, _c_fundamental, _c_factor_in );
+ convert( _buffer1, _channel1, _N/2, _c_lastphase_in, _c_fundamental, _c_factor_in );
I *fr = _framesLeft;
if( _firstFrame ) {
@@ -122,5 +122,5 @@ V thresher::Transform(I _N2,S *const *in)
}
}
- unconvert( _compositeFrame, _buffer1, _N2, _c_lastphase_out, _c_fundamental, _c_factor_out );
+ unconvert( _compositeFrame, _buffer1, _N/2, _c_lastphase_out, _c_fundamental, _c_factor_out );
}
diff --git a/externals/grill/fftease/src/vacancy~.cpp b/externals/grill/fftease/src/vacancy~.cpp
index 4377290d..881a3ca2 100644
--- a/externals/grill/fftease/src/vacancy~.cpp
+++ b/externals/grill/fftease/src/vacancy~.cpp
@@ -24,6 +24,7 @@ protected:
virtual V Transform(I n,S *const *in);
V ms_thresh(F thr) { _threshold = FromdB(_threshdB = thr); }
+ V ms_userms(BL r) { if(r) _flags |= F_RMS; else _flags &= ~F_RMS; }
F _threshold,_threshdB;
BL _invert,_useRms,_swapPhase;
@@ -34,7 +35,8 @@ private:
FLEXT_ATTRGET_F(_threshdB)
FLEXT_CALLSET_F(ms_thresh)
FLEXT_ATTRVAR_B(_invert)
- FLEXT_ATTRVAR_B(_useRms)
+ FLEXT_ATTRGET_B(_useRms)
+ FLEXT_CALLSET_B(ms_userms)
FLEXT_ATTRVAR_B(_swapPhase)
};
@@ -43,15 +45,15 @@ FLEXT_LIB_DSP_V("fftease, vacancy~",vacancy)
V vacancy::setup(t_classid c)
{
- FLEXT_CADDATTR_VAR(c,"threshold",_threshdB,ms_thresh);
+ FLEXT_CADDATTR_VAR(c,"thresh",_threshdB,ms_thresh);
FLEXT_CADDATTR_VAR1(c,"invert",_invert);
- FLEXT_CADDATTR_VAR1(c,"rms",_useRms);
- FLEXT_CADDATTR_VAR1(c,"swapphase",_swapPhase);
+ FLEXT_CADDATTR_VAR(c,"rms",_useRms,ms_userms);
+ FLEXT_CADDATTR_VAR1(c,"swap",_swapPhase);
}
vacancy::vacancy(I argc,const t_atom *argv):
- fftease(2,F_BITSHUFFLE|F_CONVERT),
+ fftease(2,F_STEREO|F_BITSHUFFLE),
_threshdB(-30),_invert(false),_useRms(true),_swapPhase(false)
{
/* parse and set object's options given */
@@ -84,6 +86,7 @@ vacancy::vacancy(I argc,const t_atom *argv):
}
ms_thresh(_threshdB);
+ ms_userms(_useRms);
AddInSignal("Messages and input signal");
AddInSignal("Reference signal");
@@ -91,36 +94,41 @@ vacancy::vacancy(I argc,const t_atom *argv):
}
-V vacancy::Transform(I _N2,S *const *in)
+V vacancy::Transform(I _N,S *const *in)
{
const F useme = _useRms?_rms * _threshold:_threshold;
- const I _N = _N2;
// composite here please
- if (_invert)
- if (_swapPhase)
+ if (_invert) {
+ if (_swapPhase) {
for (I i=0; i < _N; i+=2 )
if ( _channel1[i] > useme && _channel2[i] < _channel1[i] ) {
_channel1[i] = _channel2[i];
_channel1[i+1] = _channel2[i+1];
}
- else
+ }
+ else {
for (I i=0; i < _N; i+=2 )
if ( _channel1[i] > useme && _channel2[i] < _channel1[i] ) {
_channel1[i] = _channel2[i];
if ( _channel1[i+1] == 0. ) _channel1[i+1] = _channel2[i+1];
}
- else
- if (_swapPhase)
+ }
+ }
+ else {
+ if (_swapPhase) {
for (I i=0; i < _N; i+=2 )
if ( _channel1[i] < useme && _channel2[i] > _channel1[i] ) {
_channel1[i] = _channel2[i];
_channel1[i+1] = _channel2[i+1];
}
- else
+ }
+ else {
for (I i=0; i < _N; i+=2 )
if ( _channel1[i] < useme && _channel2[i] > _channel1[i] ) {
_channel1[i] = _channel2[i];
if ( _channel1[i+1] == 0. ) _channel1[i+1] = _channel2[i+1];
}
+ }
+ }
}
diff --git a/externals/grill/fftease/src/xsyn~.cpp b/externals/grill/fftease/src/xsyn~.cpp
index e509c827..89e84868 100644
--- a/externals/grill/fftease/src/xsyn~.cpp
+++ b/externals/grill/fftease/src/xsyn~.cpp
@@ -28,7 +28,7 @@ FLEXT_LIB_DSP("fftease, xsyn~",xsyn)
xsyn::xsyn():
- fftease(2,F_STEREO|F_BITSHUFFLE|F_CONVERT)
+ fftease(2,F_STEREO|F_BITSHUFFLE|F_NOPH2)
{
AddInSignal("Messages and source signal 1");
AddInSignal("Source signal 2");
@@ -36,17 +36,15 @@ xsyn::xsyn():
}
-V xsyn::Transform(I _N2,S *const *in)
+V xsyn::Transform(I _N,S *const *in)
{
- const I _N = _N2*2;
-
F maxamp = 0;
I i;
- for( i = 0; i < _N; i+= 2 )
+ for( i = 0; i <= _N; i+= 2 )
if(_channel2[i] > maxamp ) maxamp = _channel2[i];
const F f = maxamp?1./maxamp:1.;
- for( i = 0; i < _N; i+= 2 )
+ for( i = 0; i <= _N; i+= 2 )
_channel1[i] *= (_channel2[i] * f);
}