From 32e228d1ca60d479025f5c10479ac866208e11ae Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 27 Aug 2008 22:27:30 +0000 Subject: merged in relevant changes from the v0-40 pd-extended release branch svn path=/trunk/externals/creb/; revision=10266 --- Makefile | 11 + Makefile.config.in | 2 +- README | 2 +- README.darcs | 11 + README.extcvs | 16 + abs/rms~.pd | 8 + bootstrap | 3 + doc/bdiag~-help.pd | 97 ++++++ doc/bdiag~.pd | 97 ------ doc/bfft~-help.pd | 18 ++ doc/bfft~.pd | 18 -- doc/biquadseries~-help.pd | 22 ++ doc/biquadseries~.pd | 22 -- doc/bitsplit~-help.pd | 45 +++ doc/bitsplit~.pd | 45 --- doc/blocknorm~-help.pd | 77 +++++ doc/blocknorm~.pd | 77 ----- doc/blosc~-help.pd | 110 +++++++ doc/blosc~.pd | 110 ------- doc/bmatrix~-help.pd | 10 + doc/bmatrix~.pd | 10 - doc/bwin~-help.pd | 53 +++ doc/bwin~.pd | 53 --- doc/cheby~-help.pd | 43 +++ doc/cheby~.pd | 43 --- doc/clog~-help.pd | 8 + doc/clog~.pd | 8 - doc/dist~-help.pd | 17 + doc/dist~.pd | 17 - doc/dwt~-help.pd | 72 +++++ doc/dwt~.pd | 72 ----- doc/dynwav~-help.pd | 25 ++ doc/dynwav~.pd | 25 -- doc/eadsr~-help.pd | 57 ++++ doc/eadsr~.pd | 57 ---- doc/ead~-help.pd | 40 +++ doc/ead~.pd | 40 --- doc/ear~-help.pd | 35 ++ doc/ear~.pd | 35 -- doc/fdn~-help.pd | 61 ++++ doc/fdn~.pd | 61 ---- doc/ffpoly-help.pd | 35 ++ doc/ffpoly.pd | 35 -- doc/filterortho~-help.pd | 58 ++++ doc/filterortho~.pd | 58 ---- doc/fwarp-help.pd | 37 +++ doc/fwarp.pd | 37 --- doc/junction~-help.pd | 56 ++++ doc/junction~.pd | 56 ---- doc/lattice~-help.pd | 65 ++++ doc/lattice~.pd | 65 ---- doc/matrix~-help.pd | 10 + doc/matrix~.pd | 10 - doc/permut~-help.pd | 19 ++ doc/permut~.pd | 19 -- doc/qmult~-help.pd | 63 ++++ doc/qmult~.pd | 63 ---- doc/qnorm~-help.pd | 35 ++ doc/qnorm~.pd | 35 -- doc/ratio-help.pd | 18 ++ doc/ratio.pd | 18 -- doc/resofilt~-help.pd | 79 +++++ doc/resofilt~.pd | 79 ----- doc/sbosc~-help.pd | 36 +++ doc/sbosc~.pd | 36 --- doc/scrollgrid1D~-help.pd | 111 +++++++ doc/scrollgrid1D~.pd | 111 ------- doc/tabreadmix~-help.pd | 45 +++ doc/tabreadmix~.pd | 45 --- doc/xfm~-help.pd | 106 ++++++ doc/xfm~.pd | 106 ------ modules++/biquadseries.cc | 128 -------- modules++/biquadseries~.cc | 128 ++++++++ modules++/blosc.cc | 782 --------------------------------------------- modules++/blosc~.cc | 773 ++++++++++++++++++++++++++++++++++++++++++++ modules++/filterortho.cc | 133 -------- modules++/filterortho~.cc | 133 ++++++++ modules/bmatrix~.c | 154 +++++++++ modules/bwin~.c | 171 ++++++++++ modules/cmath~.c | 16 +- modules/dwt~.c | 4 +- modules/ffpoly.c | 2 +- modules/matrix~.c | 154 --------- modules/window~.c | 168 ---------- 84 files changed, 2984 insertions(+), 2941 deletions(-) create mode 100644 README.darcs create mode 100644 README.extcvs create mode 100644 abs/rms~.pd create mode 100644 bootstrap create mode 100644 doc/bdiag~-help.pd delete mode 100644 doc/bdiag~.pd create mode 100644 doc/bfft~-help.pd delete mode 100644 doc/bfft~.pd create mode 100644 doc/biquadseries~-help.pd delete mode 100644 doc/biquadseries~.pd create mode 100644 doc/bitsplit~-help.pd delete mode 100644 doc/bitsplit~.pd create mode 100644 doc/blocknorm~-help.pd delete mode 100644 doc/blocknorm~.pd create mode 100644 doc/blosc~-help.pd delete mode 100644 doc/blosc~.pd create mode 100644 doc/bmatrix~-help.pd delete mode 100644 doc/bmatrix~.pd create mode 100644 doc/bwin~-help.pd delete mode 100644 doc/bwin~.pd create mode 100644 doc/cheby~-help.pd delete mode 100644 doc/cheby~.pd create mode 100644 doc/clog~-help.pd delete mode 100644 doc/clog~.pd create mode 100644 doc/dist~-help.pd delete mode 100644 doc/dist~.pd create mode 100644 doc/dwt~-help.pd delete mode 100644 doc/dwt~.pd create mode 100644 doc/dynwav~-help.pd delete mode 100644 doc/dynwav~.pd create mode 100644 doc/eadsr~-help.pd delete mode 100644 doc/eadsr~.pd create mode 100644 doc/ead~-help.pd delete mode 100644 doc/ead~.pd create mode 100644 doc/ear~-help.pd delete mode 100644 doc/ear~.pd create mode 100644 doc/fdn~-help.pd delete mode 100644 doc/fdn~.pd create mode 100644 doc/ffpoly-help.pd delete mode 100644 doc/ffpoly.pd create mode 100644 doc/filterortho~-help.pd delete mode 100644 doc/filterortho~.pd create mode 100644 doc/fwarp-help.pd delete mode 100644 doc/fwarp.pd create mode 100644 doc/junction~-help.pd delete mode 100644 doc/junction~.pd create mode 100644 doc/lattice~-help.pd delete mode 100644 doc/lattice~.pd create mode 100644 doc/matrix~-help.pd delete mode 100644 doc/matrix~.pd create mode 100644 doc/permut~-help.pd delete mode 100644 doc/permut~.pd create mode 100644 doc/qmult~-help.pd delete mode 100644 doc/qmult~.pd create mode 100644 doc/qnorm~-help.pd delete mode 100644 doc/qnorm~.pd create mode 100644 doc/ratio-help.pd delete mode 100644 doc/ratio.pd create mode 100644 doc/resofilt~-help.pd delete mode 100644 doc/resofilt~.pd create mode 100644 doc/sbosc~-help.pd delete mode 100644 doc/sbosc~.pd create mode 100644 doc/scrollgrid1D~-help.pd delete mode 100644 doc/scrollgrid1D~.pd create mode 100644 doc/tabreadmix~-help.pd delete mode 100644 doc/tabreadmix~.pd create mode 100644 doc/xfm~-help.pd delete mode 100644 doc/xfm~.pd delete mode 100644 modules++/biquadseries.cc create mode 100644 modules++/biquadseries~.cc delete mode 100644 modules++/blosc.cc create mode 100644 modules++/blosc~.cc delete mode 100644 modules++/filterortho.cc create mode 100644 modules++/filterortho~.cc create mode 100644 modules/bmatrix~.c create mode 100644 modules/bwin~.c delete mode 100644 modules/matrix~.c delete mode 100644 modules/window~.c diff --git a/Makefile b/Makefile index 57935dd..fa5b563 100644 --- a/Makefile +++ b/Makefile @@ -27,3 +27,14 @@ install: install -m 644 doc/*.pd $(prefix)/lib/pd/doc/5.reference install -d $(prefix)/lib/pd/doc/creb install -m 644 doc/examples/*.pd $(prefix)/lib/pd/doc/creb + + +bootstrap: + . bootstrap + +# snapshot after release +snapshot: bootstrap + bin/dist-snapshot -d + +# to make a release, increment the version number in darcs and run +# bin/dist-snapshot diff --git a/Makefile.config.in b/Makefile.config.in index 6ba5eb6..204525c 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -7,7 +7,7 @@ CREB_VERSION = 0.9.2 DEFS = -DPD -DCREB_VERSION=\"$(CREB_VERSION)\" CFLAGS = $(DEFS) -O2 -funroll-loops -fomit-frame-pointer \ - -Wall -W -Wstrict-prototypes -Werror \ + -Wall -W -Wstrict-prototypes \ -Wno-unused -Wno-parentheses -Wno-switch # -Wshadow INCLUDE = -I$(PD_INCLUDE_DIR) -I../include -I../include/dspi diff --git a/README b/README index b4c81c8..3eb5cdd 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ CREB - compl. red. ext. blk. some externals for pure data -Copyright (c) by Tom Schouten +Copyright (c) by Tom Schouten This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/README.darcs b/README.darcs new file mode 100644 index 0000000..774657e --- /dev/null +++ b/README.darcs @@ -0,0 +1,11 @@ +to update type + + darcs pull + +after getting/pulling, do + + . bootstrap + +this will generate the configure scripts, so you can + + ./configure && make diff --git a/README.extcvs b/README.extcvs new file mode 100644 index 0000000..0f8bbc0 --- /dev/null +++ b/README.extcvs @@ -0,0 +1,16 @@ + +NOTE FOR THE PURE DATA EXTERNALS CVS + +if you need to change anything to the source files here, let me know at +to prevent i overwrite your changes when i update the CVS from my darcs archive at: + + http://zwizwa.be/darcs/creb + +i update like this: + + * update from darcs tree + * update from sourceforge cvs + * briefly look over changes, take mine as master + * commit darcs + sourceforge + + diff --git a/abs/rms~.pd b/abs/rms~.pd new file mode 100644 index 0000000..a755340 --- /dev/null +++ b/abs/rms~.pd @@ -0,0 +1,8 @@ +#N canvas 190 209 347 206 10; +#X obj 113 45 inlet~; +#X obj 114 72 env~; +#X obj 115 98 dbtorms; +#X obj 113 134 outlet; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; diff --git a/bootstrap b/bootstrap new file mode 100644 index 0000000..ebee4b9 --- /dev/null +++ b/bootstrap @@ -0,0 +1,3 @@ +#!/bin/bash +autoconf +chmod +x bin/* diff --git a/doc/bdiag~-help.pd b/doc/bdiag~-help.pd new file mode 100644 index 0000000..f5e835f --- /dev/null +++ b/doc/bdiag~-help.pd @@ -0,0 +1,97 @@ +#N canvas 34 203 724 407 10; +#X obj 34 45 metro; +#X msg 34 20 bang; +#X floatatom 76 20 5 0 0; +#X obj 34 327 dist~ 1; +#X obj 24 359 dac~; +#N canvas 731 115 262 403 systemparams 1; +#X floatatom 81 47 5 0 0; +#X floatatom 125 47 5 0 0; +#X floatatom 81 74 5 0 0; +#X floatatom 125 74 5 0 0; +#X floatatom 81 102 5 0 0; +#X floatatom 125 102 5 0 0; +#X floatatom 81 129 5 0 0; +#X floatatom 125 129 5 0 0; +#X floatatom 81 157 5 0 0; +#X floatatom 125 157 5 0 0; +#X floatatom 81 184 5 0 0; +#X floatatom 125 184 5 0 0; +#X floatatom 81 212 5 0 0; +#X floatatom 125 212 5 0 0; +#X floatatom 81 239 5 0 0; +#X floatatom 125 239 5 0 0; +#X obj 28 65 bdft 1; +#X obj 27 93 bdft 2; +#X obj 28 120 bdft 3; +#X obj 28 175 bdft 7; +#X obj 28 202 bdft 11; +#X obj 28 230 bdft 17; +#X obj 28 257 bdft 30; +#X obj 28 319 outlet; +#X text 20 23 frequency detune and damping; +#X text 49 283 bdft argument = harmonic; +#X obj 28 147 bdft 5; +#X connect 0 0 16 0; +#X connect 1 0 16 1; +#X connect 2 0 17 0; +#X connect 3 0 17 1; +#X connect 4 0 18 0; +#X connect 5 0 18 1; +#X connect 6 0 26 0; +#X connect 7 0 26 1; +#X connect 8 0 19 0; +#X connect 9 0 19 1; +#X connect 10 0 20 0; +#X connect 11 0 20 1; +#X connect 12 0 21 0; +#X connect 13 0 21 1; +#X connect 14 0 22 0; +#X connect 15 0 22 1; +#X connect 16 0 23 0; +#X connect 17 0 23 0; +#X connect 18 0 23 0; +#X connect 19 0 23 0; +#X connect 20 0 23 0; +#X connect 21 0 23 0; +#X connect 22 0 23 0; +#X connect 26 0 23 0; +#X restore 89 76 pd systemparams; +#X obj 34 93 bdiag~; +#X obj 34 129 ibfft~; +#X obj 34 232 dynwav~; +#X obj 34 283 vol~; +#X floatatom 57 257 5 0 0; +#X floatatom 78 168 5 0 0; +#X obj 78 196 phasor~; +#X text 258 168 the [eig ] message sets the eigenvalue +for the corresponding block. there are n/2 blocks \, with n the dsp +blocksize.; +#X text 259 223 you can use [timefreq <60dB time> ] +for a more appropriate initialization of the eigenvalues using decay +time in milliseconds and oscillation frequency in Hz.; +#X text 256 18 bdiag~: parallel block diagonal state space model (parallel +2d rotations) see bdiag.c for more info. the state equations for one +block are:; +#X text 300 70 state1 = real * state1 - imag * state2 + input1; +#X text 300 85 state2 = real * state2 + imag * state1 + input2; +#X text 258 121 this module is intended to "filter" spectral data produced +by bfft or other short time spectral transforms like dwt.; +#X text 256 279 [bang] or [random] set the state vector to a random +value. [reset] sets it to 0; +#X text 256 327 this patch uses of bdiag~ \, ibfft~ and dynwav~ to +build a 32 voice harmonic modal synth \, with the state excited with +white noise on bang.; +#X connect 0 0 6 0; +#X connect 1 0 0 0; +#X connect 2 0 0 1; +#X connect 3 0 4 0; +#X connect 3 0 4 1; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 9 0 3 0; +#X connect 10 0 9 1; +#X connect 11 0 12 0; +#X connect 12 0 8 1; diff --git a/doc/bdiag~.pd b/doc/bdiag~.pd deleted file mode 100644 index f5e835f..0000000 --- a/doc/bdiag~.pd +++ /dev/null @@ -1,97 +0,0 @@ -#N canvas 34 203 724 407 10; -#X obj 34 45 metro; -#X msg 34 20 bang; -#X floatatom 76 20 5 0 0; -#X obj 34 327 dist~ 1; -#X obj 24 359 dac~; -#N canvas 731 115 262 403 systemparams 1; -#X floatatom 81 47 5 0 0; -#X floatatom 125 47 5 0 0; -#X floatatom 81 74 5 0 0; -#X floatatom 125 74 5 0 0; -#X floatatom 81 102 5 0 0; -#X floatatom 125 102 5 0 0; -#X floatatom 81 129 5 0 0; -#X floatatom 125 129 5 0 0; -#X floatatom 81 157 5 0 0; -#X floatatom 125 157 5 0 0; -#X floatatom 81 184 5 0 0; -#X floatatom 125 184 5 0 0; -#X floatatom 81 212 5 0 0; -#X floatatom 125 212 5 0 0; -#X floatatom 81 239 5 0 0; -#X floatatom 125 239 5 0 0; -#X obj 28 65 bdft 1; -#X obj 27 93 bdft 2; -#X obj 28 120 bdft 3; -#X obj 28 175 bdft 7; -#X obj 28 202 bdft 11; -#X obj 28 230 bdft 17; -#X obj 28 257 bdft 30; -#X obj 28 319 outlet; -#X text 20 23 frequency detune and damping; -#X text 49 283 bdft argument = harmonic; -#X obj 28 147 bdft 5; -#X connect 0 0 16 0; -#X connect 1 0 16 1; -#X connect 2 0 17 0; -#X connect 3 0 17 1; -#X connect 4 0 18 0; -#X connect 5 0 18 1; -#X connect 6 0 26 0; -#X connect 7 0 26 1; -#X connect 8 0 19 0; -#X connect 9 0 19 1; -#X connect 10 0 20 0; -#X connect 11 0 20 1; -#X connect 12 0 21 0; -#X connect 13 0 21 1; -#X connect 14 0 22 0; -#X connect 15 0 22 1; -#X connect 16 0 23 0; -#X connect 17 0 23 0; -#X connect 18 0 23 0; -#X connect 19 0 23 0; -#X connect 20 0 23 0; -#X connect 21 0 23 0; -#X connect 22 0 23 0; -#X connect 26 0 23 0; -#X restore 89 76 pd systemparams; -#X obj 34 93 bdiag~; -#X obj 34 129 ibfft~; -#X obj 34 232 dynwav~; -#X obj 34 283 vol~; -#X floatatom 57 257 5 0 0; -#X floatatom 78 168 5 0 0; -#X obj 78 196 phasor~; -#X text 258 168 the [eig ] message sets the eigenvalue -for the corresponding block. there are n/2 blocks \, with n the dsp -blocksize.; -#X text 259 223 you can use [timefreq <60dB time> ] -for a more appropriate initialization of the eigenvalues using decay -time in milliseconds and oscillation frequency in Hz.; -#X text 256 18 bdiag~: parallel block diagonal state space model (parallel -2d rotations) see bdiag.c for more info. the state equations for one -block are:; -#X text 300 70 state1 = real * state1 - imag * state2 + input1; -#X text 300 85 state2 = real * state2 + imag * state1 + input2; -#X text 258 121 this module is intended to "filter" spectral data produced -by bfft or other short time spectral transforms like dwt.; -#X text 256 279 [bang] or [random] set the state vector to a random -value. [reset] sets it to 0; -#X text 256 327 this patch uses of bdiag~ \, ibfft~ and dynwav~ to -build a 32 voice harmonic modal synth \, with the state excited with -white noise on bang.; -#X connect 0 0 6 0; -#X connect 1 0 0 0; -#X connect 2 0 0 1; -#X connect 3 0 4 0; -#X connect 3 0 4 1; -#X connect 5 0 6 0; -#X connect 6 0 7 0; -#X connect 7 0 8 0; -#X connect 8 0 9 0; -#X connect 9 0 3 0; -#X connect 10 0 9 1; -#X connect 11 0 12 0; -#X connect 12 0 8 1; diff --git a/doc/bfft~-help.pd b/doc/bfft~-help.pd new file mode 100644 index 0000000..62507f9 --- /dev/null +++ b/doc/bfft~-help.pd @@ -0,0 +1,18 @@ +#N canvas 488 64 480 309 10; +#X obj 17 62 osc~ 500; +#X floatatom 17 -11 5 0 0; +#X obj 17 23 * 187.5; +#X obj 17 180 tabsend~ scope; +#N canvas 0 0 450 300 graph2 0; +#X array scope 64 float 0; +#X coords 0 1 63 -1 200 140 1; +#X restore 233 16 graph; +#X obj 18 113 bfft~; +#X obj 71 112 ibfft~; +#X text 12 -60 spectrum: (DC \, NY) \, (R1 \, I1) \, ...(RN-1 \, IN-1) +; +#X text 13 -74 like fft~ but normalized and; +#X connect 0 0 5 0; +#X connect 1 0 2 0; +#X connect 2 0 0 0; +#X connect 5 0 3 0; diff --git a/doc/bfft~.pd b/doc/bfft~.pd deleted file mode 100644 index 62507f9..0000000 --- a/doc/bfft~.pd +++ /dev/null @@ -1,18 +0,0 @@ -#N canvas 488 64 480 309 10; -#X obj 17 62 osc~ 500; -#X floatatom 17 -11 5 0 0; -#X obj 17 23 * 187.5; -#X obj 17 180 tabsend~ scope; -#N canvas 0 0 450 300 graph2 0; -#X array scope 64 float 0; -#X coords 0 1 63 -1 200 140 1; -#X restore 233 16 graph; -#X obj 18 113 bfft~; -#X obj 71 112 ibfft~; -#X text 12 -60 spectrum: (DC \, NY) \, (R1 \, I1) \, ...(RN-1 \, IN-1) -; -#X text 13 -74 like fft~ but normalized and; -#X connect 0 0 5 0; -#X connect 1 0 2 0; -#X connect 2 0 0 0; -#X connect 5 0 3 0; diff --git a/doc/biquadseries~-help.pd b/doc/biquadseries~-help.pd new file mode 100644 index 0000000..89d7ce0 --- /dev/null +++ b/doc/biquadseries~-help.pd @@ -0,0 +1,22 @@ +#N canvas 389 207 533 299 10; +#X obj 37 246 dac~; +#X msg 81 132 butterLP \$1; +#X msg 173 131 butterHP \$1; +#X floatatom 81 105 5 0 0; +#X floatatom 173 104 5 0 0; +#X obj 48 78 *~; +#X floatatom 82 55 5 0 0; +#X obj 48 35 noise~; +#X text 269 132 butterworth lowpass and highpass; +#X text 181 178 creation argument: number of 2nd order sections; +#X obj 48 178 biquadseries~ 4; +#X text 173 22 biquadseries~ second order iir series section; +#X connect 1 0 10 0; +#X connect 2 0 10 0; +#X connect 3 0 1 0; +#X connect 4 0 2 0; +#X connect 5 0 10 0; +#X connect 6 0 5 1; +#X connect 7 0 5 0; +#X connect 10 0 0 0; +#X connect 10 0 0 1; diff --git a/doc/biquadseries~.pd b/doc/biquadseries~.pd deleted file mode 100644 index 89d7ce0..0000000 --- a/doc/biquadseries~.pd +++ /dev/null @@ -1,22 +0,0 @@ -#N canvas 389 207 533 299 10; -#X obj 37 246 dac~; -#X msg 81 132 butterLP \$1; -#X msg 173 131 butterHP \$1; -#X floatatom 81 105 5 0 0; -#X floatatom 173 104 5 0 0; -#X obj 48 78 *~; -#X floatatom 82 55 5 0 0; -#X obj 48 35 noise~; -#X text 269 132 butterworth lowpass and highpass; -#X text 181 178 creation argument: number of 2nd order sections; -#X obj 48 178 biquadseries~ 4; -#X text 173 22 biquadseries~ second order iir series section; -#X connect 1 0 10 0; -#X connect 2 0 10 0; -#X connect 3 0 1 0; -#X connect 4 0 2 0; -#X connect 5 0 10 0; -#X connect 6 0 5 1; -#X connect 7 0 5 0; -#X connect 10 0 0 0; -#X connect 10 0 0 1; diff --git a/doc/bitsplit~-help.pd b/doc/bitsplit~-help.pd new file mode 100644 index 0000000..fffce2e --- /dev/null +++ b/doc/bitsplit~-help.pd @@ -0,0 +1,45 @@ +#N canvas 180 482 616 243 10; +#X obj 111 51 osc~; +#X floatatom 111 29 5 0 0 0 - - -; +#X obj 112 93 bitsplit~ 4; +#X obj 81 177 dac~; +#X obj 81 153 vol~; +#X floatatom 110 136 5 0 0 0 - - -; +#X obj 183 178 dac~; +#X obj 183 154 vol~; +#X floatatom 212 137 5 0 0 0 - - -; +#X floatatom 178 50 5 0 0 0 - - -; +#X obj 112 72 *~ 1; +#X text 267 25 split a signal into a parallel binary word.; +#X text 267 43 MSB = left \, LSB = right.; +#X obj 339 127 *~; +#X obj 367 127 / 2; +#X obj 402 127 *~; +#X obj 430 127 / 2; +#N canvas 0 0 450 300 s 0; +#X obj 152 123 *~; +#X obj 152 89 inlet~; +#X obj 206 90 inlet; +#X obj 206 121 / 2; +#X obj 152 150 outlet~; +#X obj 206 151 outlet; +#X connect 0 0 4 0; +#X connect 1 0 0 0; +#X connect 2 0 0 1; +#X connect 2 0 3 0; +#X connect 3 0 5 0; +#X restore 383 178 pd s; +#X connect 0 0 10 0; +#X connect 1 0 0 0; +#X connect 2 0 4 0; +#X connect 2 3 7 0; +#X connect 4 0 3 0; +#X connect 4 0 3 1; +#X connect 5 0 4 1; +#X connect 7 0 6 0; +#X connect 7 0 6 1; +#X connect 8 0 7 1; +#X connect 9 0 10 1; +#X connect 10 0 2 0; +#X connect 14 0 15 1; +#X connect 14 0 16 0; diff --git a/doc/bitsplit~.pd b/doc/bitsplit~.pd deleted file mode 100644 index fffce2e..0000000 --- a/doc/bitsplit~.pd +++ /dev/null @@ -1,45 +0,0 @@ -#N canvas 180 482 616 243 10; -#X obj 111 51 osc~; -#X floatatom 111 29 5 0 0 0 - - -; -#X obj 112 93 bitsplit~ 4; -#X obj 81 177 dac~; -#X obj 81 153 vol~; -#X floatatom 110 136 5 0 0 0 - - -; -#X obj 183 178 dac~; -#X obj 183 154 vol~; -#X floatatom 212 137 5 0 0 0 - - -; -#X floatatom 178 50 5 0 0 0 - - -; -#X obj 112 72 *~ 1; -#X text 267 25 split a signal into a parallel binary word.; -#X text 267 43 MSB = left \, LSB = right.; -#X obj 339 127 *~; -#X obj 367 127 / 2; -#X obj 402 127 *~; -#X obj 430 127 / 2; -#N canvas 0 0 450 300 s 0; -#X obj 152 123 *~; -#X obj 152 89 inlet~; -#X obj 206 90 inlet; -#X obj 206 121 / 2; -#X obj 152 150 outlet~; -#X obj 206 151 outlet; -#X connect 0 0 4 0; -#X connect 1 0 0 0; -#X connect 2 0 0 1; -#X connect 2 0 3 0; -#X connect 3 0 5 0; -#X restore 383 178 pd s; -#X connect 0 0 10 0; -#X connect 1 0 0 0; -#X connect 2 0 4 0; -#X connect 2 3 7 0; -#X connect 4 0 3 0; -#X connect 4 0 3 1; -#X connect 5 0 4 1; -#X connect 7 0 6 0; -#X connect 7 0 6 1; -#X connect 8 0 7 1; -#X connect 9 0 10 1; -#X connect 10 0 2 0; -#X connect 14 0 15 1; -#X connect 14 0 16 0; diff --git a/doc/blocknorm~-help.pd b/doc/blocknorm~-help.pd new file mode 100644 index 0000000..3f25fc3 --- /dev/null +++ b/doc/blocknorm~-help.pd @@ -0,0 +1,77 @@ +#N canvas 623 54 632 460 10; +#X text 62 14 blocknorm~: normalize a dsp block to RMS = 1; +#X text 144 33 creation argument = nb channels; +#X obj 96 349 lop~; +#X obj 95 410 tabsend~ state; +#X obj 95 384 blocknorm~ 1; +#X obj 95 320 hip~; +#X obj 134 298 hsl 128 15 100 10000 1 1 empty empty empty -2 -6 0 8 +-262144 -1 -1 3800 1; +#X obj 93 131 tabreceive~ state; +#X obj 138 222 fblock 64; +#X obj 352 388 pdynwav~; +#X obj 351 429 vol~; +#X obj 350 458 dac~; +#X floatatom 389 408 5 0 0 0 - - -; +#X floatatom 406 365 5 0 0 0 - - -; +#X obj 13 144 ead~ 0 20; +#X obj 30 168 noise~; +#X obj 14 191 *~; +#X obj 13 121 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 237 134 1; +#X floatatom 237 157 5 0 0 0 - - -; +#X floatatom 138 202 5 0 0 0 - - -; +#X text 11 64 example: a waveform folding oscillator: power is shifted +up or down in frequency by contraction/dilatation \, and filtered \, +but normalized to preserve total state energy.; +#X obj 466 281 table state 64; +#X obj 94 270 dynwav~; +#X obj 138 245 phasor~; +#X obj 310 181 bang~; +#X msg 268 133 2; +#X obj 310 205 f; +#X floatatom 358 200 5 0 0 0 - - -; +#X msg 357 179 0; +#X msg 387 179 0.03; +#X msg 425 179 0.17; +#X obj 310 241 spigot; +#X obj 348 223 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X text 403 201 phase offset; +#X text 182 201 mod freq; +#X text 366 222 phase sync; +#X obj 134 326 hsl 128 15 100 10000 1 1 empty empty empty -2 -6 0 8 +-262144 -1 -1 8100 1; +#X text 282 157 relative formant shift; +#X connect 2 0 4 0; +#X connect 2 0 9 0; +#X connect 4 0 3 0; +#X connect 5 0 2 0; +#X connect 6 0 5 1; +#X connect 7 0 23 0; +#X connect 8 0 24 0; +#X connect 9 0 10 0; +#X connect 10 0 11 0; +#X connect 10 0 11 1; +#X connect 12 0 10 1; +#X connect 13 0 9 1; +#X connect 14 0 16 0; +#X connect 15 0 16 1; +#X connect 16 0 5 0; +#X connect 17 0 14 0; +#X connect 18 0 19 0; +#X connect 19 0 8 1; +#X connect 20 0 8 0; +#X connect 23 0 5 0; +#X connect 24 0 23 1; +#X connect 25 0 27 0; +#X connect 26 0 19 0; +#X connect 27 0 32 0; +#X connect 28 0 27 1; +#X connect 29 0 28 0; +#X connect 30 0 28 0; +#X connect 31 0 28 0; +#X connect 32 0 24 1; +#X connect 33 0 32 1; +#X connect 37 0 2 1; diff --git a/doc/blocknorm~.pd b/doc/blocknorm~.pd deleted file mode 100644 index 3f25fc3..0000000 --- a/doc/blocknorm~.pd +++ /dev/null @@ -1,77 +0,0 @@ -#N canvas 623 54 632 460 10; -#X text 62 14 blocknorm~: normalize a dsp block to RMS = 1; -#X text 144 33 creation argument = nb channels; -#X obj 96 349 lop~; -#X obj 95 410 tabsend~ state; -#X obj 95 384 blocknorm~ 1; -#X obj 95 320 hip~; -#X obj 134 298 hsl 128 15 100 10000 1 1 empty empty empty -2 -6 0 8 --262144 -1 -1 3800 1; -#X obj 93 131 tabreceive~ state; -#X obj 138 222 fblock 64; -#X obj 352 388 pdynwav~; -#X obj 351 429 vol~; -#X obj 350 458 dac~; -#X floatatom 389 408 5 0 0 0 - - -; -#X floatatom 406 365 5 0 0 0 - - -; -#X obj 13 144 ead~ 0 20; -#X obj 30 168 noise~; -#X obj 14 191 *~; -#X obj 13 121 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 237 134 1; -#X floatatom 237 157 5 0 0 0 - - -; -#X floatatom 138 202 5 0 0 0 - - -; -#X text 11 64 example: a waveform folding oscillator: power is shifted -up or down in frequency by contraction/dilatation \, and filtered \, -but normalized to preserve total state energy.; -#X obj 466 281 table state 64; -#X obj 94 270 dynwav~; -#X obj 138 245 phasor~; -#X obj 310 181 bang~; -#X msg 268 133 2; -#X obj 310 205 f; -#X floatatom 358 200 5 0 0 0 - - -; -#X msg 357 179 0; -#X msg 387 179 0.03; -#X msg 425 179 0.17; -#X obj 310 241 spigot; -#X obj 348 223 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X text 403 201 phase offset; -#X text 182 201 mod freq; -#X text 366 222 phase sync; -#X obj 134 326 hsl 128 15 100 10000 1 1 empty empty empty -2 -6 0 8 --262144 -1 -1 8100 1; -#X text 282 157 relative formant shift; -#X connect 2 0 4 0; -#X connect 2 0 9 0; -#X connect 4 0 3 0; -#X connect 5 0 2 0; -#X connect 6 0 5 1; -#X connect 7 0 23 0; -#X connect 8 0 24 0; -#X connect 9 0 10 0; -#X connect 10 0 11 0; -#X connect 10 0 11 1; -#X connect 12 0 10 1; -#X connect 13 0 9 1; -#X connect 14 0 16 0; -#X connect 15 0 16 1; -#X connect 16 0 5 0; -#X connect 17 0 14 0; -#X connect 18 0 19 0; -#X connect 19 0 8 1; -#X connect 20 0 8 0; -#X connect 23 0 5 0; -#X connect 24 0 23 1; -#X connect 25 0 27 0; -#X connect 26 0 19 0; -#X connect 27 0 32 0; -#X connect 28 0 27 1; -#X connect 29 0 28 0; -#X connect 30 0 28 0; -#X connect 31 0 28 0; -#X connect 32 0 24 1; -#X connect 33 0 32 1; -#X connect 37 0 2 1; diff --git a/doc/blosc~-help.pd b/doc/blosc~-help.pd new file mode 100644 index 0000000..ce70940 --- /dev/null +++ b/doc/blosc~-help.pd @@ -0,0 +1,110 @@ +#N canvas 456 143 763 746 10; +#X obj 80 243 dac~; +#X obj 80 219 vol~; +#X floatatom 103 195 5 0 0; +#X obj 80 158 blosc~ pulse; +#X floatatom 80 128 5 0 0; +#X text 59 106 one-sided impulse; +#X obj 255 243 dac~; +#X obj 255 219 vol~; +#X floatatom 278 195 5 0 0; +#X floatatom 255 128 5 0 0; +#X text 234 106 two-sided impulse; +#X obj 255 158 blosc~ pulse2; +#X obj 433 241 dac~; +#X obj 433 217 vol~; +#X floatatom 456 193 5 0 0; +#X floatatom 433 126 5 0 0; +#X text 442 105 sawtooth; +#X obj 596 245 dac~; +#X obj 596 221 vol~; +#X floatatom 619 197 5 0 0; +#X floatatom 596 130 5 0 0; +#X text 571 106 hard synced sawtooth; +#X text 53 18 blosc~ - some bandlimited oscillators based on minimal +phase impulse and step functions. (inspired by Eli Brandt's paper "Hard +Sync Without Aliasing".); +#X obj 433 156 blosc~ saw; +#X obj 596 160 blosc~ syncsaw; +#X floatatom 642 130 5 0 0; +#X obj 416 645 dac~; +#X obj 416 610 vol~; +#X floatatom 439 586 5 0 0; +#X text 255 304 bandlimited comparator; +#X obj 416 549 blosc~ comparator; +#X obj 416 435 phasor~; +#X obj 416 519 -~; +#X floatatom 416 380 5 0 0; +#X floatatom 416 355 5 0 0; +#X obj 80 391 phasor~; +#X floatatom 80 367 5 0 0; +#X obj 80 448 blosc~ comparator; +#X obj 80 538 dac~; +#X obj 80 503 vol~; +#X floatatom 103 479 5 0 0; +#X obj 80 420 -~ 0.5; +#X text 75 341 (square - pulse wave); +#X floatatom 150 402 5 0 0; +#X obj 153 384 hsl 50 15 0.01 0.99 0 0 empty empty empty -2 -6 0 8 +-262144 -1 -1 2050 1; +#X msg 150 363 0.5; +#X text 411 332 (pwm); +#X obj 511 416 osc~; +#X floatatom 511 383 5 0 0; +#X obj 511 446 *~; +#X floatatom 561 428 5 0 0; +#X obj 564 406 hsl 50 15 0 0.99 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 2300 1; +#X text 626 406 depth; +#X obj 514 362 hsl 50 15 0.1 10 1 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 4300 1; +#X text 578 362 mod freq; +#X obj 416 460 *~ 2; +#X obj 416 485 -~ 1; +#X connect 1 0 0 0; +#X connect 1 0 0 1; +#X connect 2 0 1 1; +#X connect 3 0 1 0; +#X connect 4 0 3 0; +#X connect 7 0 6 0; +#X connect 7 0 6 1; +#X connect 8 0 7 1; +#X connect 9 0 11 0; +#X connect 11 0 7 0; +#X connect 13 0 12 0; +#X connect 13 0 12 1; +#X connect 14 0 13 1; +#X connect 15 0 23 0; +#X connect 18 0 17 0; +#X connect 18 0 17 1; +#X connect 19 0 18 1; +#X connect 20 0 24 0; +#X connect 23 0 13 0; +#X connect 24 0 18 0; +#X connect 25 0 24 1; +#X connect 27 0 26 0; +#X connect 27 0 26 1; +#X connect 28 0 27 1; +#X connect 30 0 27 0; +#X connect 31 0 55 0; +#X connect 32 0 30 0; +#X connect 33 0 31 0; +#X connect 34 0 33 0; +#X connect 35 0 41 0; +#X connect 36 0 35 0; +#X connect 37 0 39 0; +#X connect 39 0 38 0; +#X connect 39 0 38 1; +#X connect 40 0 39 1; +#X connect 41 0 37 0; +#X connect 43 0 41 1; +#X connect 44 0 43 0; +#X connect 45 0 44 0; +#X connect 47 0 49 0; +#X connect 48 0 47 0; +#X connect 49 0 32 1; +#X connect 50 0 49 1; +#X connect 51 0 50 0; +#X connect 53 0 48 0; +#X connect 55 0 56 0; +#X connect 56 0 32 0; diff --git a/doc/blosc~.pd b/doc/blosc~.pd deleted file mode 100644 index ce70940..0000000 --- a/doc/blosc~.pd +++ /dev/null @@ -1,110 +0,0 @@ -#N canvas 456 143 763 746 10; -#X obj 80 243 dac~; -#X obj 80 219 vol~; -#X floatatom 103 195 5 0 0; -#X obj 80 158 blosc~ pulse; -#X floatatom 80 128 5 0 0; -#X text 59 106 one-sided impulse; -#X obj 255 243 dac~; -#X obj 255 219 vol~; -#X floatatom 278 195 5 0 0; -#X floatatom 255 128 5 0 0; -#X text 234 106 two-sided impulse; -#X obj 255 158 blosc~ pulse2; -#X obj 433 241 dac~; -#X obj 433 217 vol~; -#X floatatom 456 193 5 0 0; -#X floatatom 433 126 5 0 0; -#X text 442 105 sawtooth; -#X obj 596 245 dac~; -#X obj 596 221 vol~; -#X floatatom 619 197 5 0 0; -#X floatatom 596 130 5 0 0; -#X text 571 106 hard synced sawtooth; -#X text 53 18 blosc~ - some bandlimited oscillators based on minimal -phase impulse and step functions. (inspired by Eli Brandt's paper "Hard -Sync Without Aliasing".); -#X obj 433 156 blosc~ saw; -#X obj 596 160 blosc~ syncsaw; -#X floatatom 642 130 5 0 0; -#X obj 416 645 dac~; -#X obj 416 610 vol~; -#X floatatom 439 586 5 0 0; -#X text 255 304 bandlimited comparator; -#X obj 416 549 blosc~ comparator; -#X obj 416 435 phasor~; -#X obj 416 519 -~; -#X floatatom 416 380 5 0 0; -#X floatatom 416 355 5 0 0; -#X obj 80 391 phasor~; -#X floatatom 80 367 5 0 0; -#X obj 80 448 blosc~ comparator; -#X obj 80 538 dac~; -#X obj 80 503 vol~; -#X floatatom 103 479 5 0 0; -#X obj 80 420 -~ 0.5; -#X text 75 341 (square - pulse wave); -#X floatatom 150 402 5 0 0; -#X obj 153 384 hsl 50 15 0.01 0.99 0 0 empty empty empty -2 -6 0 8 --262144 -1 -1 2050 1; -#X msg 150 363 0.5; -#X text 411 332 (pwm); -#X obj 511 416 osc~; -#X floatatom 511 383 5 0 0; -#X obj 511 446 *~; -#X floatatom 561 428 5 0 0; -#X obj 564 406 hsl 50 15 0 0.99 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 2300 1; -#X text 626 406 depth; -#X obj 514 362 hsl 50 15 0.1 10 1 0 empty empty empty -2 -6 0 8 -262144 --1 -1 4300 1; -#X text 578 362 mod freq; -#X obj 416 460 *~ 2; -#X obj 416 485 -~ 1; -#X connect 1 0 0 0; -#X connect 1 0 0 1; -#X connect 2 0 1 1; -#X connect 3 0 1 0; -#X connect 4 0 3 0; -#X connect 7 0 6 0; -#X connect 7 0 6 1; -#X connect 8 0 7 1; -#X connect 9 0 11 0; -#X connect 11 0 7 0; -#X connect 13 0 12 0; -#X connect 13 0 12 1; -#X connect 14 0 13 1; -#X connect 15 0 23 0; -#X connect 18 0 17 0; -#X connect 18 0 17 1; -#X connect 19 0 18 1; -#X connect 20 0 24 0; -#X connect 23 0 13 0; -#X connect 24 0 18 0; -#X connect 25 0 24 1; -#X connect 27 0 26 0; -#X connect 27 0 26 1; -#X connect 28 0 27 1; -#X connect 30 0 27 0; -#X connect 31 0 55 0; -#X connect 32 0 30 0; -#X connect 33 0 31 0; -#X connect 34 0 33 0; -#X connect 35 0 41 0; -#X connect 36 0 35 0; -#X connect 37 0 39 0; -#X connect 39 0 38 0; -#X connect 39 0 38 1; -#X connect 40 0 39 1; -#X connect 41 0 37 0; -#X connect 43 0 41 1; -#X connect 44 0 43 0; -#X connect 45 0 44 0; -#X connect 47 0 49 0; -#X connect 48 0 47 0; -#X connect 49 0 32 1; -#X connect 50 0 49 1; -#X connect 51 0 50 0; -#X connect 53 0 48 0; -#X connect 55 0 56 0; -#X connect 56 0 32 0; diff --git a/doc/bmatrix~-help.pd b/doc/bmatrix~-help.pd new file mode 100644 index 0000000..5cb34a5 --- /dev/null +++ b/doc/bmatrix~-help.pd @@ -0,0 +1,10 @@ +#N canvas 523 376 560 300 10; +#X msg 69 127 load matrix.bin; +#X text 27 39 added for completeness. mainly intended for spectral +transfos; +#X text 26 73 the file format is binary floating point \, column encoded. +; +#X obj 46 174 bmatrix~; +#X text 29 23 bmatrix multiplies a signal block with an arbitrary matrix +; +#X connect 0 0 3 0; diff --git a/doc/bmatrix~.pd b/doc/bmatrix~.pd deleted file mode 100644 index 5cb34a5..0000000 --- a/doc/bmatrix~.pd +++ /dev/null @@ -1,10 +0,0 @@ -#N canvas 523 376 560 300 10; -#X msg 69 127 load matrix.bin; -#X text 27 39 added for completeness. mainly intended for spectral -transfos; -#X text 26 73 the file format is binary floating point \, column encoded. -; -#X obj 46 174 bmatrix~; -#X text 29 23 bmatrix multiplies a signal block with an arbitrary matrix -; -#X connect 0 0 3 0; diff --git a/doc/bwin~-help.pd b/doc/bwin~-help.pd new file mode 100644 index 0000000..42b4fd6 --- /dev/null +++ b/doc/bwin~-help.pd @@ -0,0 +1,53 @@ +#N canvas 95 391 450 300 10; +#N canvas 274 117 692 500 windowing 1; +#X obj 62 441 outlet~; +#X obj 62 65 inlet~; +#X obj 62 142 bfft~; +#X obj 62 365 ibfft~; +#X floatatom 85 173 5 0 0; +#X obj 62 199 vol~; +#X text 60 6 bwin~ multiplies a signal block with a window; +#X text 211 310 after maximizing the spectrum is multiplied by a pink +noise envelope; +#X obj 62 250 dist~ 1; +#X text 211 105 apply analysis window; +#X text 211 172 set drive; +#X text 212 251 soft clip spectral data; +#X text 212 133 transform block to freq domain; +#X text 210 360 transform block back to time domain; +#X text 212 401 undo analysis window + apply synthesis window; +#X text 212 39 this example is a poor man's spectral maximizer using +bwin~ bfft~ bifft~ and dist~; +#X obj 62 225 bwin~ bfft_blue; +#X obj 62 327 bwin~ bfft_pink; +#X obj 62 401 bwin~ hann/hamming; +#X obj 62 106 bwin~ hamming; +#X msg 344 207 type bfft_db/octave \$1; +#X floatatom 517 172 5 0 0; +#X msg 345 277 type bfft_db/octave \$1; +#X floatatom 519 244 5 0 0; +#X obj 545 427 block~ 1024 2; +#X connect 1 0 19 0; +#X connect 2 0 5 0; +#X connect 3 0 18 0; +#X connect 4 0 5 1; +#X connect 5 0 16 0; +#X connect 8 0 17 0; +#X connect 16 0 8 0; +#X connect 17 0 3 0; +#X connect 18 0 0 0; +#X connect 19 0 2 0; +#X connect 20 0 16 0; +#X connect 21 0 20 0; +#X connect 22 0 17 0; +#X connect 23 0 22 0; +#X restore 53 88 pd windowing; +#X obj 41 219 dac~; +#X obj 53 150 vol~; +#X floatatom 76 124 5 0 0; +#X obj 53 41 adc~ 1; +#X connect 0 0 2 0; +#X connect 2 0 1 0; +#X connect 2 0 1 1; +#X connect 3 0 2 1; +#X connect 4 0 0 0; diff --git a/doc/bwin~.pd b/doc/bwin~.pd deleted file mode 100644 index 42b4fd6..0000000 --- a/doc/bwin~.pd +++ /dev/null @@ -1,53 +0,0 @@ -#N canvas 95 391 450 300 10; -#N canvas 274 117 692 500 windowing 1; -#X obj 62 441 outlet~; -#X obj 62 65 inlet~; -#X obj 62 142 bfft~; -#X obj 62 365 ibfft~; -#X floatatom 85 173 5 0 0; -#X obj 62 199 vol~; -#X text 60 6 bwin~ multiplies a signal block with a window; -#X text 211 310 after maximizing the spectrum is multiplied by a pink -noise envelope; -#X obj 62 250 dist~ 1; -#X text 211 105 apply analysis window; -#X text 211 172 set drive; -#X text 212 251 soft clip spectral data; -#X text 212 133 transform block to freq domain; -#X text 210 360 transform block back to time domain; -#X text 212 401 undo analysis window + apply synthesis window; -#X text 212 39 this example is a poor man's spectral maximizer using -bwin~ bfft~ bifft~ and dist~; -#X obj 62 225 bwin~ bfft_blue; -#X obj 62 327 bwin~ bfft_pink; -#X obj 62 401 bwin~ hann/hamming; -#X obj 62 106 bwin~ hamming; -#X msg 344 207 type bfft_db/octave \$1; -#X floatatom 517 172 5 0 0; -#X msg 345 277 type bfft_db/octave \$1; -#X floatatom 519 244 5 0 0; -#X obj 545 427 block~ 1024 2; -#X connect 1 0 19 0; -#X connect 2 0 5 0; -#X connect 3 0 18 0; -#X connect 4 0 5 1; -#X connect 5 0 16 0; -#X connect 8 0 17 0; -#X connect 16 0 8 0; -#X connect 17 0 3 0; -#X connect 18 0 0 0; -#X connect 19 0 2 0; -#X connect 20 0 16 0; -#X connect 21 0 20 0; -#X connect 22 0 17 0; -#X connect 23 0 22 0; -#X restore 53 88 pd windowing; -#X obj 41 219 dac~; -#X obj 53 150 vol~; -#X floatatom 76 124 5 0 0; -#X obj 53 41 adc~ 1; -#X connect 0 0 2 0; -#X connect 2 0 1 0; -#X connect 2 0 1 1; -#X connect 3 0 2 1; -#X connect 4 0 0 0; diff --git a/doc/cheby~-help.pd b/doc/cheby~-help.pd new file mode 100644 index 0000000..1cf1f94 --- /dev/null +++ b/doc/cheby~-help.pd @@ -0,0 +1,43 @@ +#N canvas 262 87 566 348 10; +#X obj 130 230 cheby~ 4; +#X msg 147 149 coef 1 \$1; +#X floatatom 147 93 5 0 0; +#X obj 147 117 dbtorms; +#X obj 124 313 dac~; +#X obj 130 281 vol~; +#X floatatom 156 261 5 0 0; +#X obj 40 113 osc~; +#X floatatom 40 88 5 0 0; +#X floatatom 226 94 5 0 0; +#X obj 226 118 dbtorms; +#X floatatom 305 94 5 0 0; +#X obj 305 118 dbtorms; +#X floatatom 384 93 5 0 0; +#X obj 384 117 dbtorms; +#X msg 226 150 coef 2 \$1; +#X msg 305 150 coef 3 \$1; +#X msg 384 150 coef 4 \$1; +#X text 96 3 chebyshev waveshaper; +#X text 207 229 creation argument: order of polynomial; +#X text 135 47 coef n x sets coefficient of nth order cheby poly to +x; +#X text 135 60 if the input is a sine wave \, these are the amplitudes +for the harmonics.; +#X connect 0 0 5 0; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 3 0 1 0; +#X connect 5 0 4 1; +#X connect 5 0 4 0; +#X connect 6 0 5 1; +#X connect 7 0 0 0; +#X connect 8 0 7 0; +#X connect 9 0 10 0; +#X connect 10 0 15 0; +#X connect 11 0 12 0; +#X connect 12 0 16 0; +#X connect 13 0 14 0; +#X connect 14 0 17 0; +#X connect 15 0 0 0; +#X connect 16 0 0 0; +#X connect 17 0 0 0; diff --git a/doc/cheby~.pd b/doc/cheby~.pd deleted file mode 100644 index 1cf1f94..0000000 --- a/doc/cheby~.pd +++ /dev/null @@ -1,43 +0,0 @@ -#N canvas 262 87 566 348 10; -#X obj 130 230 cheby~ 4; -#X msg 147 149 coef 1 \$1; -#X floatatom 147 93 5 0 0; -#X obj 147 117 dbtorms; -#X obj 124 313 dac~; -#X obj 130 281 vol~; -#X floatatom 156 261 5 0 0; -#X obj 40 113 osc~; -#X floatatom 40 88 5 0 0; -#X floatatom 226 94 5 0 0; -#X obj 226 118 dbtorms; -#X floatatom 305 94 5 0 0; -#X obj 305 118 dbtorms; -#X floatatom 384 93 5 0 0; -#X obj 384 117 dbtorms; -#X msg 226 150 coef 2 \$1; -#X msg 305 150 coef 3 \$1; -#X msg 384 150 coef 4 \$1; -#X text 96 3 chebyshev waveshaper; -#X text 207 229 creation argument: order of polynomial; -#X text 135 47 coef n x sets coefficient of nth order cheby poly to -x; -#X text 135 60 if the input is a sine wave \, these are the amplitudes -for the harmonics.; -#X connect 0 0 5 0; -#X connect 1 0 0 0; -#X connect 2 0 3 0; -#X connect 3 0 1 0; -#X connect 5 0 4 1; -#X connect 5 0 4 0; -#X connect 6 0 5 1; -#X connect 7 0 0 0; -#X connect 8 0 7 0; -#X connect 9 0 10 0; -#X connect 10 0 15 0; -#X connect 11 0 12 0; -#X connect 12 0 16 0; -#X connect 13 0 14 0; -#X connect 14 0 17 0; -#X connect 15 0 0 0; -#X connect 16 0 0 0; -#X connect 17 0 0 0; diff --git a/doc/clog~-help.pd b/doc/clog~-help.pd new file mode 100644 index 0000000..490c406 --- /dev/null +++ b/doc/clog~-help.pd @@ -0,0 +1,8 @@ +#N canvas 642 410 542 207 10; +#X obj 85 82 clog~; +#X obj 145 82 cexp~; +#X text 235 81 complex log and exp.; +#X text 237 105 see also; +#X obj 309 104 cep~; +#X text 351 103 and; +#X obj 384 105 icep~; diff --git a/doc/clog~.pd b/doc/clog~.pd deleted file mode 100644 index 490c406..0000000 --- a/doc/clog~.pd +++ /dev/null @@ -1,8 +0,0 @@ -#N canvas 642 410 542 207 10; -#X obj 85 82 clog~; -#X obj 145 82 cexp~; -#X text 235 81 complex log and exp.; -#X text 237 105 see also; -#X obj 309 104 cep~; -#X text 351 103 and; -#X obj 384 105 icep~; diff --git a/doc/dist~-help.pd b/doc/dist~-help.pd new file mode 100644 index 0000000..3533471 --- /dev/null +++ b/doc/dist~-help.pd @@ -0,0 +1,17 @@ +#N canvas 497 336 450 300 10; +#X text 156 35 dist~ waveshaper; +#X text 154 53 creation argument: type (see dist.c); +#X floatatom 136 120 5 0 0; +#X obj 64 121 osc~; +#X obj 66 206 dac~; +#X floatatom 63 84 5 0 0; +#X text 189 119 right inlet: pre gain; +#X obj 148 95 hsl 128 15 0.5 20 0 0 empty empty empty -2 -6 32 8 -262144 +-1 -1 7000 1; +#X obj 64 157 dist~ 1; +#X connect 2 0 8 1; +#X connect 3 0 8 0; +#X connect 5 0 3 0; +#X connect 7 0 2 0; +#X connect 8 0 4 0; +#X connect 8 0 4 1; diff --git a/doc/dist~.pd b/doc/dist~.pd deleted file mode 100644 index 3533471..0000000 --- a/doc/dist~.pd +++ /dev/null @@ -1,17 +0,0 @@ -#N canvas 497 336 450 300 10; -#X text 156 35 dist~ waveshaper; -#X text 154 53 creation argument: type (see dist.c); -#X floatatom 136 120 5 0 0; -#X obj 64 121 osc~; -#X obj 66 206 dac~; -#X floatatom 63 84 5 0 0; -#X text 189 119 right inlet: pre gain; -#X obj 148 95 hsl 128 15 0.5 20 0 0 empty empty empty -2 -6 32 8 -262144 --1 -1 7000 1; -#X obj 64 157 dist~ 1; -#X connect 2 0 8 1; -#X connect 3 0 8 0; -#X connect 5 0 3 0; -#X connect 7 0 2 0; -#X connect 8 0 4 0; -#X connect 8 0 4 1; diff --git a/doc/dwt~-help.pd b/doc/dwt~-help.pd new file mode 100644 index 0000000..52986e1 --- /dev/null +++ b/doc/dwt~-help.pd @@ -0,0 +1,72 @@ +#N canvas 47 99 994 611 10; +#X obj 17 62 osc~ 500; +#X msg 83 -115 predict 0.5 0.5 \, update 0.25 0.25; +#X msg 83 -76 predict -0.0625 0.5625 0.5625 -0.0625 \, update -0.03125 +0.28125 0.28125 -0.03125; +#X floatatom 24 10 5 0 0; +#X msg 201 144 mask -1 9 9 -1; +#X obj 67 279 r coef; +#X obj 82 -30 s coef; +#X obj 195 337 s coef; +#X msg 201 167 mask 3 -25 150 150 -25 3; +#X msg 216 189 mask -5 49 -245 1225 1225 -245 49 -5; +#X obj 196 39 pack; +#X floatatom 222 8 5 0 0; +#X floatatom 166 -4 5 0 0; +#X msg 171 64 coef \$1 \$2; +#X msg 191 120 mask 1 1; +#X msg 228 212 mask 35 -405 2268 -8820 39690 39690 -8820 2268 -405 +35; +#X msg 244 246 mask -63 847 -5445 22869 -76230 320166 320166 -76230 +22869 -5445 847 -63; +#X msg 245 306 predict 1 0 \, update 0 0.5; +#X obj 36 31 * 187.5; +#X obj 26 341 dwt~ 1; +#X obj 80 343 idwt~ 1; +#X msg 469 376 mask 0 0 0 35 140 -70 28 -5; +#X msg 469 352 mask 7 -45 126 -210 315 63 0 0 0 0; +#X msg 469 328 mask -21 154 -495 924 -1155 1386 231 0 0 0 0 0; +#X obj 26 443 tabsend~ scope; +#N canvas 0 0 450 300 graph2 0; +#X array scope 256 float 0; +#X coords 0 1 255 -1 200 140 1; +#X restore 718 -98 graph; +#X text 61 165 print out coefs; +#X msg 100 184 print; +#X text 315 -24 dwt~ performs a discrete wavelet transform; +#X text 315 -10 idwt~ performs the inverse transform; +#X text 309 105 mask sets the predict mask \, and uses the corresponding +update mask; +#X text 266 63 coef sets half of a symmetric predict mask; +#X text 243 286 predict and update masks can be specified explicitly +; +#X text 433 307 haar wavelet; +#X msg 672 189 even \$1; +#X floatatom 672 167 5 0 0; +#X text 570 134 even is the order symmetric interpolating biorthogonal +wavelet with n vanishing moments.; +#X connect 0 0 19 0; +#X connect 1 0 6 0; +#X connect 2 0 6 0; +#X connect 3 0 18 0; +#X connect 4 0 7 0; +#X connect 5 0 20 0; +#X connect 5 0 19 0; +#X connect 8 0 7 0; +#X connect 9 0 7 0; +#X connect 10 0 13 0; +#X connect 11 0 10 1; +#X connect 12 0 10 0; +#X connect 13 0 7 0; +#X connect 14 0 7 0; +#X connect 15 0 7 0; +#X connect 16 0 7 0; +#X connect 17 0 7 0; +#X connect 18 0 0 0; +#X connect 19 0 24 0; +#X connect 21 0 7 0; +#X connect 22 0 7 0; +#X connect 23 0 7 0; +#X connect 27 0 7 0; +#X connect 34 0 7 0; +#X connect 35 0 34 0; diff --git a/doc/dwt~.pd b/doc/dwt~.pd deleted file mode 100644 index 52986e1..0000000 --- a/doc/dwt~.pd +++ /dev/null @@ -1,72 +0,0 @@ -#N canvas 47 99 994 611 10; -#X obj 17 62 osc~ 500; -#X msg 83 -115 predict 0.5 0.5 \, update 0.25 0.25; -#X msg 83 -76 predict -0.0625 0.5625 0.5625 -0.0625 \, update -0.03125 -0.28125 0.28125 -0.03125; -#X floatatom 24 10 5 0 0; -#X msg 201 144 mask -1 9 9 -1; -#X obj 67 279 r coef; -#X obj 82 -30 s coef; -#X obj 195 337 s coef; -#X msg 201 167 mask 3 -25 150 150 -25 3; -#X msg 216 189 mask -5 49 -245 1225 1225 -245 49 -5; -#X obj 196 39 pack; -#X floatatom 222 8 5 0 0; -#X floatatom 166 -4 5 0 0; -#X msg 171 64 coef \$1 \$2; -#X msg 191 120 mask 1 1; -#X msg 228 212 mask 35 -405 2268 -8820 39690 39690 -8820 2268 -405 -35; -#X msg 244 246 mask -63 847 -5445 22869 -76230 320166 320166 -76230 -22869 -5445 847 -63; -#X msg 245 306 predict 1 0 \, update 0 0.5; -#X obj 36 31 * 187.5; -#X obj 26 341 dwt~ 1; -#X obj 80 343 idwt~ 1; -#X msg 469 376 mask 0 0 0 35 140 -70 28 -5; -#X msg 469 352 mask 7 -45 126 -210 315 63 0 0 0 0; -#X msg 469 328 mask -21 154 -495 924 -1155 1386 231 0 0 0 0 0; -#X obj 26 443 tabsend~ scope; -#N canvas 0 0 450 300 graph2 0; -#X array scope 256 float 0; -#X coords 0 1 255 -1 200 140 1; -#X restore 718 -98 graph; -#X text 61 165 print out coefs; -#X msg 100 184 print; -#X text 315 -24 dwt~ performs a discrete wavelet transform; -#X text 315 -10 idwt~ performs the inverse transform; -#X text 309 105 mask sets the predict mask \, and uses the corresponding -update mask; -#X text 266 63 coef sets half of a symmetric predict mask; -#X text 243 286 predict and update masks can be specified explicitly -; -#X text 433 307 haar wavelet; -#X msg 672 189 even \$1; -#X floatatom 672 167 5 0 0; -#X text 570 134 even is the order symmetric interpolating biorthogonal -wavelet with n vanishing moments.; -#X connect 0 0 19 0; -#X connect 1 0 6 0; -#X connect 2 0 6 0; -#X connect 3 0 18 0; -#X connect 4 0 7 0; -#X connect 5 0 20 0; -#X connect 5 0 19 0; -#X connect 8 0 7 0; -#X connect 9 0 7 0; -#X connect 10 0 13 0; -#X connect 11 0 10 1; -#X connect 12 0 10 0; -#X connect 13 0 7 0; -#X connect 14 0 7 0; -#X connect 15 0 7 0; -#X connect 16 0 7 0; -#X connect 17 0 7 0; -#X connect 18 0 0 0; -#X connect 19 0 24 0; -#X connect 21 0 7 0; -#X connect 22 0 7 0; -#X connect 23 0 7 0; -#X connect 27 0 7 0; -#X connect 34 0 7 0; -#X connect 35 0 34 0; diff --git a/doc/dynwav~-help.pd b/doc/dynwav~-help.pd new file mode 100644 index 0000000..59f86bd --- /dev/null +++ b/doc/dynwav~-help.pd @@ -0,0 +1,25 @@ +#N canvas 193 151 450 300 10; +#X text 96 6 dynwav~: dynamic wavetable oscillator; +#X obj 61 98 osc~; +#X floatatom 60 56 5 0 0; +#X obj 60 151 dynwav~; +#X obj 60 214 vol~; +#X floatatom 85 190 5 0 0; +#X obj 50 256 dac~; +#X obj 172 105 phasor~; +#X floatatom 172 80 5 0 0; +#X obj 107 54 bang~; +#X text 171 22 (scanned synthesis); +#X text 165 143 left inlet's dsp block = wavetable; +#X msg 107 78 0.25; +#X text 242 157 right inlet = phase (0-1); +#X connect 1 0 3 0; +#X connect 2 0 1 0; +#X connect 3 0 4 0; +#X connect 4 0 6 1; +#X connect 4 0 6 0; +#X connect 5 0 4 1; +#X connect 7 0 3 1; +#X connect 8 0 7 0; +#X connect 9 0 12 0; +#X connect 12 0 1 1; diff --git a/doc/dynwav~.pd b/doc/dynwav~.pd deleted file mode 100644 index 59f86bd..0000000 --- a/doc/dynwav~.pd +++ /dev/null @@ -1,25 +0,0 @@ -#N canvas 193 151 450 300 10; -#X text 96 6 dynwav~: dynamic wavetable oscillator; -#X obj 61 98 osc~; -#X floatatom 60 56 5 0 0; -#X obj 60 151 dynwav~; -#X obj 60 214 vol~; -#X floatatom 85 190 5 0 0; -#X obj 50 256 dac~; -#X obj 172 105 phasor~; -#X floatatom 172 80 5 0 0; -#X obj 107 54 bang~; -#X text 171 22 (scanned synthesis); -#X text 165 143 left inlet's dsp block = wavetable; -#X msg 107 78 0.25; -#X text 242 157 right inlet = phase (0-1); -#X connect 1 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 4 0 6 1; -#X connect 4 0 6 0; -#X connect 5 0 4 1; -#X connect 7 0 3 1; -#X connect 8 0 7 0; -#X connect 9 0 12 0; -#X connect 12 0 1 1; diff --git a/doc/eadsr~-help.pd b/doc/eadsr~-help.pd new file mode 100644 index 0000000..f72bdaf --- /dev/null +++ b/doc/eadsr~-help.pd @@ -0,0 +1,57 @@ +#N canvas 478 386 580 306 10; +#X obj 89 227 *~; +#X obj 105 40 metro; +#X obj 26 203 osc~; +#X floatatom 26 171 5 0 0 0 - - -; +#X floatatom 135 12 5 0 0 0 - - -; +#X floatatom 209 117 5 0 0 0 - - -; +#X floatatom 208 139 5 0 0 0 - - -; +#X obj 81 277 dac~; +#X msg 58 12 stop; +#X msg 26 124 start; +#X msg 71 123 stop; +#X obj 105 77 del; +#X floatatom 159 50 5 0 0 0 - - -; +#X obj 105 197 eadsr~ 0 0; +#X text 191 81 exponential attack/decay/sustain/release envelope; +#X text 265 125 60db attack and decay time; +#X floatatom 209 160 5 0 0 0 - - -; +#X floatatom 209 180 5 0 0 0 - - -; +#X text 264 159 sustain level; +#X obj 88 253 vol~; +#X floatatom 132 238 5 0 0 0 - - -; +#X obj 343 228 table t 10000; +#X obj 343 267 tabwrite~ t; +#X obj 343 247 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 103 13 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X obj 262 276 del; +#X floatatom 276 225 5 0 0 0 - - -; +#X text 265 182 60db release time; +#X connect 0 0 19 0; +#X connect 1 0 9 0; +#X connect 1 0 11 0; +#X connect 2 0 0 0; +#X connect 3 0 2 0; +#X connect 4 0 1 1; +#X connect 5 0 13 1; +#X connect 6 0 13 2; +#X connect 8 0 1 0; +#X connect 9 0 13 0; +#X connect 10 0 13 0; +#X connect 11 0 10 0; +#X connect 12 0 11 1; +#X connect 13 0 0 1; +#X connect 13 0 22 0; +#X connect 16 0 13 3; +#X connect 17 0 13 4; +#X connect 19 0 7 1; +#X connect 19 0 7 0; +#X connect 20 0 19 1; +#X connect 23 0 22 0; +#X connect 23 0 25 0; +#X connect 23 0 9 0; +#X connect 24 0 1 0; +#X connect 25 0 10 0; +#X connect 26 0 25 1; diff --git a/doc/eadsr~.pd b/doc/eadsr~.pd deleted file mode 100644 index f72bdaf..0000000 --- a/doc/eadsr~.pd +++ /dev/null @@ -1,57 +0,0 @@ -#N canvas 478 386 580 306 10; -#X obj 89 227 *~; -#X obj 105 40 metro; -#X obj 26 203 osc~; -#X floatatom 26 171 5 0 0 0 - - -; -#X floatatom 135 12 5 0 0 0 - - -; -#X floatatom 209 117 5 0 0 0 - - -; -#X floatatom 208 139 5 0 0 0 - - -; -#X obj 81 277 dac~; -#X msg 58 12 stop; -#X msg 26 124 start; -#X msg 71 123 stop; -#X obj 105 77 del; -#X floatatom 159 50 5 0 0 0 - - -; -#X obj 105 197 eadsr~ 0 0; -#X text 191 81 exponential attack/decay/sustain/release envelope; -#X text 265 125 60db attack and decay time; -#X floatatom 209 160 5 0 0 0 - - -; -#X floatatom 209 180 5 0 0 0 - - -; -#X text 264 159 sustain level; -#X obj 88 253 vol~; -#X floatatom 132 238 5 0 0 0 - - -; -#X obj 343 228 table t 10000; -#X obj 343 267 tabwrite~ t; -#X obj 343 247 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 103 13 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 -; -#X obj 262 276 del; -#X floatatom 276 225 5 0 0 0 - - -; -#X text 265 182 60db release time; -#X connect 0 0 19 0; -#X connect 1 0 9 0; -#X connect 1 0 11 0; -#X connect 2 0 0 0; -#X connect 3 0 2 0; -#X connect 4 0 1 1; -#X connect 5 0 13 1; -#X connect 6 0 13 2; -#X connect 8 0 1 0; -#X connect 9 0 13 0; -#X connect 10 0 13 0; -#X connect 11 0 10 0; -#X connect 12 0 11 1; -#X connect 13 0 0 1; -#X connect 13 0 22 0; -#X connect 16 0 13 3; -#X connect 17 0 13 4; -#X connect 19 0 7 1; -#X connect 19 0 7 0; -#X connect 20 0 19 1; -#X connect 23 0 22 0; -#X connect 23 0 25 0; -#X connect 23 0 9 0; -#X connect 24 0 1 0; -#X connect 25 0 10 0; -#X connect 26 0 25 1; diff --git a/doc/ead~-help.pd b/doc/ead~-help.pd new file mode 100644 index 0000000..835ba3d --- /dev/null +++ b/doc/ead~-help.pd @@ -0,0 +1,40 @@ +#N canvas 478 386 459 306 10; +#X obj 105 111 ead~ 0 0; +#X obj 89 179 *~; +#X obj 105 40 metro; +#X obj 41 144 osc~; +#X floatatom 41 112 5 0 0 0 - - -; +#X floatatom 135 12 5 0 0 0 - - -; +#X floatatom 130 64 5 0 0 0 - - -; +#X floatatom 156 86 5 0 0 0 - - -; +#X obj 78 242 dac~; +#X text 202 71 60db attack and decay time; +#X obj 70 76 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 58 12 stop; +#X text 201 51 exponential attack/decay envelope; +#X obj 89 212 vol~; +#X floatatom 117 193 5 0 0 0 - - -; +#X obj 265 119 table t 5000; +#X obj 265 176 tabwrite~ t; +#X obj 265 152 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 105 13 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +; +#X connect 0 0 1 1; +#X connect 0 0 16 0; +#X connect 1 0 13 0; +#X connect 2 0 0 0; +#X connect 3 0 1 0; +#X connect 4 0 3 0; +#X connect 5 0 2 1; +#X connect 6 0 0 1; +#X connect 7 0 0 2; +#X connect 10 0 0 0; +#X connect 11 0 2 0; +#X connect 13 0 8 0; +#X connect 13 0 8 1; +#X connect 14 0 13 1; +#X connect 17 0 16 0; +#X connect 17 0 0 0; +#X connect 18 0 2 0; diff --git a/doc/ead~.pd b/doc/ead~.pd deleted file mode 100644 index 835ba3d..0000000 --- a/doc/ead~.pd +++ /dev/null @@ -1,40 +0,0 @@ -#N canvas 478 386 459 306 10; -#X obj 105 111 ead~ 0 0; -#X obj 89 179 *~; -#X obj 105 40 metro; -#X obj 41 144 osc~; -#X floatatom 41 112 5 0 0 0 - - -; -#X floatatom 135 12 5 0 0 0 - - -; -#X floatatom 130 64 5 0 0 0 - - -; -#X floatatom 156 86 5 0 0 0 - - -; -#X obj 78 242 dac~; -#X text 202 71 60db attack and decay time; -#X obj 70 76 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 58 12 stop; -#X text 201 51 exponential attack/decay envelope; -#X obj 89 212 vol~; -#X floatatom 117 193 5 0 0 0 - - -; -#X obj 265 119 table t 5000; -#X obj 265 176 tabwrite~ t; -#X obj 265 152 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 105 13 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X connect 0 0 1 1; -#X connect 0 0 16 0; -#X connect 1 0 13 0; -#X connect 2 0 0 0; -#X connect 3 0 1 0; -#X connect 4 0 3 0; -#X connect 5 0 2 1; -#X connect 6 0 0 1; -#X connect 7 0 0 2; -#X connect 10 0 0 0; -#X connect 11 0 2 0; -#X connect 13 0 8 0; -#X connect 13 0 8 1; -#X connect 14 0 13 1; -#X connect 17 0 16 0; -#X connect 17 0 0 0; -#X connect 18 0 2 0; diff --git a/doc/ear~-help.pd b/doc/ear~-help.pd new file mode 100644 index 0000000..8527a12 --- /dev/null +++ b/doc/ear~-help.pd @@ -0,0 +1,35 @@ +#N canvas 478 386 459 306 10; +#X obj 89 227 *~; +#X obj 105 40 metro; +#X obj 105 12 bng 15 250 50 0 empty empty empty 0 -6 32 8 -262144 -1 +-1; +#X obj 41 192 osc~; +#X floatatom 41 160 5 0 0; +#X floatatom 135 12 5 0 0; +#X floatatom 130 112 5 0 0; +#X floatatom 157 134 5 0 0; +#X obj 77 265 dac~; +#X msg 58 12 stop; +#X msg 26 124 start; +#X msg 71 123 stop; +#X obj 105 159 ear~ 0 0; +#X obj 105 77 del; +#X floatatom 159 50 5 0 0; +#X text 201 99 exponential attack/release envelope; +#X text 202 119 60db attack and release time; +#X connect 0 0 8 0; +#X connect 0 0 8 1; +#X connect 1 0 10 0; +#X connect 1 0 13 0; +#X connect 2 0 1 0; +#X connect 3 0 0 0; +#X connect 4 0 3 0; +#X connect 5 0 1 1; +#X connect 6 0 12 1; +#X connect 7 0 12 2; +#X connect 9 0 1 0; +#X connect 10 0 12 0; +#X connect 11 0 12 0; +#X connect 12 0 0 1; +#X connect 13 0 11 0; +#X connect 14 0 13 1; diff --git a/doc/ear~.pd b/doc/ear~.pd deleted file mode 100644 index 8527a12..0000000 --- a/doc/ear~.pd +++ /dev/null @@ -1,35 +0,0 @@ -#N canvas 478 386 459 306 10; -#X obj 89 227 *~; -#X obj 105 40 metro; -#X obj 105 12 bng 15 250 50 0 empty empty empty 0 -6 32 8 -262144 -1 --1; -#X obj 41 192 osc~; -#X floatatom 41 160 5 0 0; -#X floatatom 135 12 5 0 0; -#X floatatom 130 112 5 0 0; -#X floatatom 157 134 5 0 0; -#X obj 77 265 dac~; -#X msg 58 12 stop; -#X msg 26 124 start; -#X msg 71 123 stop; -#X obj 105 159 ear~ 0 0; -#X obj 105 77 del; -#X floatatom 159 50 5 0 0; -#X text 201 99 exponential attack/release envelope; -#X text 202 119 60db attack and release time; -#X connect 0 0 8 0; -#X connect 0 0 8 1; -#X connect 1 0 10 0; -#X connect 1 0 13 0; -#X connect 2 0 1 0; -#X connect 3 0 0 0; -#X connect 4 0 3 0; -#X connect 5 0 1 1; -#X connect 6 0 12 1; -#X connect 7 0 12 2; -#X connect 9 0 1 0; -#X connect 10 0 12 0; -#X connect 11 0 12 0; -#X connect 12 0 0 1; -#X connect 13 0 11 0; -#X connect 14 0 13 1; diff --git a/doc/fdn~-help.pd b/doc/fdn~-help.pd new file mode 100644 index 0000000..3903d63 --- /dev/null +++ b/doc/fdn~-help.pd @@ -0,0 +1,61 @@ +#N canvas 310 312 826 610 10; +#X obj 146 529 vols~; +#X floatatom 203 509 5 0 0; +#X obj 143 562 dac~; +#X obj 128 131 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 10 415 print; +#X floatatom 216 431 5 0 0; +#X floatatom 267 432 5 0 0; +#X obj 54 144 noise~; +#X obj 94 190 *~; +#X floatatom 203 111 5 0 0; +#X obj 146 157 ead~; +#X msg 360 119 lines 501 752 5003 7504 105 206 307 408; +#X floatatom 152 110 5 0 0; +#X msg 361 248 linear 32 100 105; +#X msg 360 271 linear 32 1000 1005; +#X msg 12 465 reset; +#X obj 142 463 fdn~ 64 40000; +#X msg 358 327 exponential 32 10 5000; +#X msg 360 292 linear 32 100 2015; +#X msg 361 224 linear 8 75 100; +#X msg 361 201 linear 32 50 2175; +#X msg 360 374 exponential 8 50 175; +#X text 186 20 fdn~ a feedback delay network; +#X text 316 468 creation arguments: ; +#X text 3 396 print delay lengths; +#X text 2 448 reset state; +#X text 316 512 nb delay lines is always a multiple of 4; +#X text 358 96 specify delay line lengths manually; +#X text 359 152 specify a linear/exponential delay length range; +#X text 361 170 ; +#X text 359 430 inlets: low/high frequency reverb time (60dB time) +; +#X msg 358 351 exponential 64 1000 10; +#X connect 0 0 2 0; +#X connect 0 1 2 1; +#X connect 1 0 0 2; +#X connect 3 0 10 0; +#X connect 4 0 16 0; +#X connect 5 0 16 1; +#X connect 6 0 16 2; +#X connect 7 0 8 0; +#X connect 8 0 16 0; +#X connect 9 0 10 2; +#X connect 10 0 8 1; +#X connect 10 0 16 0; +#X connect 11 0 16 0; +#X connect 12 0 10 1; +#X connect 13 0 16 0; +#X connect 14 0 16 0; +#X connect 15 0 16 0; +#X connect 16 0 0 0; +#X connect 16 1 0 1; +#X connect 17 0 16 0; +#X connect 18 0 16 0; +#X connect 19 0 16 0; +#X connect 20 0 16 0; +#X connect 21 0 16 0; +#X connect 31 0 16 0; diff --git a/doc/fdn~.pd b/doc/fdn~.pd deleted file mode 100644 index 3903d63..0000000 --- a/doc/fdn~.pd +++ /dev/null @@ -1,61 +0,0 @@ -#N canvas 310 312 826 610 10; -#X obj 146 529 vols~; -#X floatatom 203 509 5 0 0; -#X obj 143 562 dac~; -#X obj 128 131 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 10 415 print; -#X floatatom 216 431 5 0 0; -#X floatatom 267 432 5 0 0; -#X obj 54 144 noise~; -#X obj 94 190 *~; -#X floatatom 203 111 5 0 0; -#X obj 146 157 ead~; -#X msg 360 119 lines 501 752 5003 7504 105 206 307 408; -#X floatatom 152 110 5 0 0; -#X msg 361 248 linear 32 100 105; -#X msg 360 271 linear 32 1000 1005; -#X msg 12 465 reset; -#X obj 142 463 fdn~ 64 40000; -#X msg 358 327 exponential 32 10 5000; -#X msg 360 292 linear 32 100 2015; -#X msg 361 224 linear 8 75 100; -#X msg 361 201 linear 32 50 2175; -#X msg 360 374 exponential 8 50 175; -#X text 186 20 fdn~ a feedback delay network; -#X text 316 468 creation arguments: ; -#X text 3 396 print delay lengths; -#X text 2 448 reset state; -#X text 316 512 nb delay lines is always a multiple of 4; -#X text 358 96 specify delay line lengths manually; -#X text 359 152 specify a linear/exponential delay length range; -#X text 361 170 ; -#X text 359 430 inlets: low/high frequency reverb time (60dB time) -; -#X msg 358 351 exponential 64 1000 10; -#X connect 0 0 2 0; -#X connect 0 1 2 1; -#X connect 1 0 0 2; -#X connect 3 0 10 0; -#X connect 4 0 16 0; -#X connect 5 0 16 1; -#X connect 6 0 16 2; -#X connect 7 0 8 0; -#X connect 8 0 16 0; -#X connect 9 0 10 2; -#X connect 10 0 8 1; -#X connect 10 0 16 0; -#X connect 11 0 16 0; -#X connect 12 0 10 1; -#X connect 13 0 16 0; -#X connect 14 0 16 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X connect 16 1 0 1; -#X connect 17 0 16 0; -#X connect 18 0 16 0; -#X connect 19 0 16 0; -#X connect 20 0 16 0; -#X connect 21 0 16 0; -#X connect 31 0 16 0; diff --git a/doc/ffpoly-help.pd b/doc/ffpoly-help.pd new file mode 100644 index 0000000..7ec8886 --- /dev/null +++ b/doc/ffpoly-help.pd @@ -0,0 +1,35 @@ +#N canvas 372 77 515 425 10; +#X text 85 14 ffpoly - compute a finite field polynomial; +#X msg 103 89 coef 0 \$1; +#X floatatom 103 65 5 0 0; +#X floatatom 181 65 5 0 0; +#X floatatom 257 65 5 0 0; +#X floatatom 334 64 5 0 0; +#X msg 181 89 coef 1 \$1; +#X msg 257 89 coef 2 \$1; +#X msg 334 89 coef 3 \$1; +#X floatatom 38 106 5 0 0; +#X obj 38 350 ffpoly 3 5; +#X text 125 350 creation args: ; +#X floatatom 38 384 5 0 0; +#X msg 334 150 order \$1; +#X floatatom 334 125 5 0 0; +#X text 332 174 finite field order; +#X floatatom 335 217 5 0 0; +#X msg 335 242 coefficients \$1; +#X text 271 279 set coefs in packed form; +#X text 203 292 digit representation in base = field order; +#X connect 1 0 10 0; +#X connect 2 0 1 0; +#X connect 3 0 6 0; +#X connect 4 0 7 0; +#X connect 5 0 8 0; +#X connect 6 0 10 0; +#X connect 7 0 10 0; +#X connect 8 0 10 0; +#X connect 9 0 10 0; +#X connect 10 0 12 0; +#X connect 13 0 10 0; +#X connect 14 0 13 0; +#X connect 16 0 17 0; +#X connect 17 0 10 0; diff --git a/doc/ffpoly.pd b/doc/ffpoly.pd deleted file mode 100644 index 7ec8886..0000000 --- a/doc/ffpoly.pd +++ /dev/null @@ -1,35 +0,0 @@ -#N canvas 372 77 515 425 10; -#X text 85 14 ffpoly - compute a finite field polynomial; -#X msg 103 89 coef 0 \$1; -#X floatatom 103 65 5 0 0; -#X floatatom 181 65 5 0 0; -#X floatatom 257 65 5 0 0; -#X floatatom 334 64 5 0 0; -#X msg 181 89 coef 1 \$1; -#X msg 257 89 coef 2 \$1; -#X msg 334 89 coef 3 \$1; -#X floatatom 38 106 5 0 0; -#X obj 38 350 ffpoly 3 5; -#X text 125 350 creation args: ; -#X floatatom 38 384 5 0 0; -#X msg 334 150 order \$1; -#X floatatom 334 125 5 0 0; -#X text 332 174 finite field order; -#X floatatom 335 217 5 0 0; -#X msg 335 242 coefficients \$1; -#X text 271 279 set coefs in packed form; -#X text 203 292 digit representation in base = field order; -#X connect 1 0 10 0; -#X connect 2 0 1 0; -#X connect 3 0 6 0; -#X connect 4 0 7 0; -#X connect 5 0 8 0; -#X connect 6 0 10 0; -#X connect 7 0 10 0; -#X connect 8 0 10 0; -#X connect 9 0 10 0; -#X connect 10 0 12 0; -#X connect 13 0 10 0; -#X connect 14 0 13 0; -#X connect 16 0 17 0; -#X connect 17 0 10 0; diff --git a/doc/filterortho~-help.pd b/doc/filterortho~-help.pd new file mode 100644 index 0000000..e120101 --- /dev/null +++ b/doc/filterortho~-help.pd @@ -0,0 +1,58 @@ +#N canvas 634 361 578 534 10; +#X obj 146 452 dac~; +#X floatatom 255 83 7 0 0; +#X floatatom 194 83 7 0 0; +#X obj 158 405 filterortho~; +#X obj 194 123 t b f; +#X floatatom 29 31 5 0 0; +#X obj 13 9 noise~; +#X floatatom 133 83 7 0 0; +#X obj 150 123 t b f; +#X obj 13 52 *~; +#X text 333 9 orthogonal biquad object; +#X obj 157 330 pack s 0 0 0; +#X obj 237 122 t b f; +#X text 137 61 freq; +#X text 213 61 Q; +#X msg 335 126 setEQ; +#X msg 335 150 setLP; +#X msg 158 363 \$1 \$2 \$3 \$4; +#X msg 336 175 setHP; +#X msg 336 201 setBP; +#X msg 336 225 setBR; +#X msg 336 251 setHS; +#X msg 337 275 setLS; +#X msg 338 299 setAP; +#X text 391 127 parametric equalizer; +#X text 390 150 lowpass; +#X text 391 175 highpass; +#X text 391 201 bandpass; +#X text 391 224 bandreject; +#X text 390 252 highshelf; +#X text 390 277 lowshelf; +#X text 391 300 allpass; +#X text 265 62 gain (only for EQ \, LS \, HS); +#X connect 1 0 12 0; +#X connect 2 0 4 0; +#X connect 3 0 0 0; +#X connect 3 0 0 1; +#X connect 4 0 11 0; +#X connect 4 1 11 2; +#X connect 5 0 9 1; +#X connect 6 0 9 0; +#X connect 7 0 8 0; +#X connect 8 0 11 0; +#X connect 8 1 11 1; +#X connect 9 0 3 0; +#X connect 11 0 17 0; +#X connect 12 0 11 0; +#X connect 12 1 11 3; +#X connect 15 0 11 0; +#X connect 16 0 11 0; +#X connect 17 0 3 0; +#X connect 18 0 11 0; +#X connect 19 0 11 0; +#X connect 20 0 11 0; +#X connect 21 0 11 0; +#X connect 22 0 11 0; +#X connect 23 0 11 0; diff --git a/doc/filterortho~.pd b/doc/filterortho~.pd deleted file mode 100644 index e120101..0000000 --- a/doc/filterortho~.pd +++ /dev/null @@ -1,58 +0,0 @@ -#N canvas 634 361 578 534 10; -#X obj 146 452 dac~; -#X floatatom 255 83 7 0 0; -#X floatatom 194 83 7 0 0; -#X obj 158 405 filterortho~; -#X obj 194 123 t b f; -#X floatatom 29 31 5 0 0; -#X obj 13 9 noise~; -#X floatatom 133 83 7 0 0; -#X obj 150 123 t b f; -#X obj 13 52 *~; -#X text 333 9 orthogonal biquad object; -#X obj 157 330 pack s 0 0 0; -#X obj 237 122 t b f; -#X text 137 61 freq; -#X text 213 61 Q; -#X msg 335 126 setEQ; -#X msg 335 150 setLP; -#X msg 158 363 \$1 \$2 \$3 \$4; -#X msg 336 175 setHP; -#X msg 336 201 setBP; -#X msg 336 225 setBR; -#X msg 336 251 setHS; -#X msg 337 275 setLS; -#X msg 338 299 setAP; -#X text 391 127 parametric equalizer; -#X text 390 150 lowpass; -#X text 391 175 highpass; -#X text 391 201 bandpass; -#X text 391 224 bandreject; -#X text 390 252 highshelf; -#X text 390 277 lowshelf; -#X text 391 300 allpass; -#X text 265 62 gain (only for EQ \, LS \, HS); -#X connect 1 0 12 0; -#X connect 2 0 4 0; -#X connect 3 0 0 0; -#X connect 3 0 0 1; -#X connect 4 0 11 0; -#X connect 4 1 11 2; -#X connect 5 0 9 1; -#X connect 6 0 9 0; -#X connect 7 0 8 0; -#X connect 8 0 11 0; -#X connect 8 1 11 1; -#X connect 9 0 3 0; -#X connect 11 0 17 0; -#X connect 12 0 11 0; -#X connect 12 1 11 3; -#X connect 15 0 11 0; -#X connect 16 0 11 0; -#X connect 17 0 3 0; -#X connect 18 0 11 0; -#X connect 19 0 11 0; -#X connect 20 0 11 0; -#X connect 21 0 11 0; -#X connect 22 0 11 0; -#X connect 23 0 11 0; diff --git a/doc/fwarp-help.pd b/doc/fwarp-help.pd new file mode 100644 index 0000000..d43a5a3 --- /dev/null +++ b/doc/fwarp-help.pd @@ -0,0 +1,37 @@ +#N canvas 403 309 522 388 10; +#X obj 18 85 fwarp; +#X floatatom 18 53 5 0 0; +#X floatatom 18 121 7 0 0; +#X text 112 49 fwarp - warps a frequency using the formula; +#X obj 173 261 xfm~ 0 0 0 0; +#X obj 173 218 fwarp; +#X floatatom 173 186 5 0 0; +#X obj 117 260 osc~; +#X obj 152 324 vol~; +#X obj 152 350 dac~; +#X floatatom 212 298 5 0 0; +#X obj 351 263 xfm~ 0 0 0 0; +#X floatatom 351 188 5 0 0; +#X obj 295 262 osc~; +#X obj 330 326 vol~; +#X obj 330 352 dac~; +#X floatatom 390 300 5 0 0; +#X text 132 126 example: xfm~ uses warped frequencies; +#X text 112 67 out = tan(2pi*in/sr) * (sr/2pi); +#X connect 0 0 2 0; +#X connect 1 0 0 0; +#X connect 4 0 8 0; +#X connect 5 0 4 0; +#X connect 6 0 5 0; +#X connect 6 0 7 0; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 8 0 9 1; +#X connect 10 0 8 1; +#X connect 11 0 14 0; +#X connect 12 0 13 0; +#X connect 12 0 11 0; +#X connect 13 0 14 0; +#X connect 14 0 15 0; +#X connect 14 0 15 1; +#X connect 16 0 14 1; diff --git a/doc/fwarp.pd b/doc/fwarp.pd deleted file mode 100644 index d43a5a3..0000000 --- a/doc/fwarp.pd +++ /dev/null @@ -1,37 +0,0 @@ -#N canvas 403 309 522 388 10; -#X obj 18 85 fwarp; -#X floatatom 18 53 5 0 0; -#X floatatom 18 121 7 0 0; -#X text 112 49 fwarp - warps a frequency using the formula; -#X obj 173 261 xfm~ 0 0 0 0; -#X obj 173 218 fwarp; -#X floatatom 173 186 5 0 0; -#X obj 117 260 osc~; -#X obj 152 324 vol~; -#X obj 152 350 dac~; -#X floatatom 212 298 5 0 0; -#X obj 351 263 xfm~ 0 0 0 0; -#X floatatom 351 188 5 0 0; -#X obj 295 262 osc~; -#X obj 330 326 vol~; -#X obj 330 352 dac~; -#X floatatom 390 300 5 0 0; -#X text 132 126 example: xfm~ uses warped frequencies; -#X text 112 67 out = tan(2pi*in/sr) * (sr/2pi); -#X connect 0 0 2 0; -#X connect 1 0 0 0; -#X connect 4 0 8 0; -#X connect 5 0 4 0; -#X connect 6 0 5 0; -#X connect 6 0 7 0; -#X connect 7 0 8 0; -#X connect 8 0 9 0; -#X connect 8 0 9 1; -#X connect 10 0 8 1; -#X connect 11 0 14 0; -#X connect 12 0 13 0; -#X connect 12 0 11 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 14 0 15 1; -#X connect 16 0 14 1; diff --git a/doc/junction~-help.pd b/doc/junction~-help.pd new file mode 100644 index 0000000..591e4bc --- /dev/null +++ b/doc/junction~-help.pd @@ -0,0 +1,56 @@ +#N canvas 420 323 450 300 10; +#X obj 181 138 junction~ 4; +#X obj 253 167 delwrite~ del1 1000; +#X obj 123 51 vd~ del1; +#X obj 183 51 vd~ del2; +#X obj 244 51 vd~ del3; +#X obj 304 51 vd~ del4; +#X obj 123 30 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 32 10 +-262144 -1 -1 115 256; +#X obj 183 30 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 32 10 +-262144 -1 -1 87 256; +#X obj 245 31 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 32 10 +-262144 -1 -1 270 256; +#X obj 305 31 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 32 10 +-262144 -1 -1 144 256; +#X obj 63 262 dac~; +#X obj 13 121 ead~; +#X obj 30 97 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 32 10 +-262144 -1 -1 37 256; +#X obj 90 97 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 32 10 +-262144 -1 -1 77 256; +#X obj 4 97 bng 15 250 50 0 empty empty empty 0 -6 32 8 -262144 -1 +-1; +#X obj 229 189 delwrite~ del2 1000; +#X obj 205 210 delwrite~ del3 1000; +#X obj 181 232 delwrite~ del4 1000; +#X msg 313 111 random \$1; +#X obj 314 85 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 32 10 +-262144 -1 -1 74 256; +#X text 61 5 junction~: a circular lossless signal junction; +#X obj 58 238 vols~; +#X obj 105 221 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 32 +10 -262144 -1 -1 77 256; +#X connect 0 0 17 0; +#X connect 0 0 21 0; +#X connect 0 1 16 0; +#X connect 0 1 21 1; +#X connect 0 2 15 0; +#X connect 0 3 1 0; +#X connect 2 0 0 0; +#X connect 3 0 0 1; +#X connect 4 0 0 2; +#X connect 5 0 0 3; +#X connect 6 0 2 0; +#X connect 7 0 3 0; +#X connect 8 0 4 0; +#X connect 9 0 5 0; +#X connect 11 0 0 0; +#X connect 12 0 11 1; +#X connect 13 0 11 2; +#X connect 14 0 11 0; +#X connect 18 0 0 0; +#X connect 19 0 18 0; +#X connect 21 0 10 0; +#X connect 21 1 10 1; +#X connect 22 0 21 2; diff --git a/doc/junction~.pd b/doc/junction~.pd deleted file mode 100644 index 591e4bc..0000000 --- a/doc/junction~.pd +++ /dev/null @@ -1,56 +0,0 @@ -#N canvas 420 323 450 300 10; -#X obj 181 138 junction~ 4; -#X obj 253 167 delwrite~ del1 1000; -#X obj 123 51 vd~ del1; -#X obj 183 51 vd~ del2; -#X obj 244 51 vd~ del3; -#X obj 304 51 vd~ del4; -#X obj 123 30 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 32 10 --262144 -1 -1 115 256; -#X obj 183 30 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 32 10 --262144 -1 -1 87 256; -#X obj 245 31 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 32 10 --262144 -1 -1 270 256; -#X obj 305 31 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 32 10 --262144 -1 -1 144 256; -#X obj 63 262 dac~; -#X obj 13 121 ead~; -#X obj 30 97 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 32 10 --262144 -1 -1 37 256; -#X obj 90 97 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 32 10 --262144 -1 -1 77 256; -#X obj 4 97 bng 15 250 50 0 empty empty empty 0 -6 32 8 -262144 -1 --1; -#X obj 229 189 delwrite~ del2 1000; -#X obj 205 210 delwrite~ del3 1000; -#X obj 181 232 delwrite~ del4 1000; -#X msg 313 111 random \$1; -#X obj 314 85 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 32 10 --262144 -1 -1 74 256; -#X text 61 5 junction~: a circular lossless signal junction; -#X obj 58 238 vols~; -#X obj 105 221 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 32 -10 -262144 -1 -1 77 256; -#X connect 0 0 17 0; -#X connect 0 0 21 0; -#X connect 0 1 16 0; -#X connect 0 1 21 1; -#X connect 0 2 15 0; -#X connect 0 3 1 0; -#X connect 2 0 0 0; -#X connect 3 0 0 1; -#X connect 4 0 0 2; -#X connect 5 0 0 3; -#X connect 6 0 2 0; -#X connect 7 0 3 0; -#X connect 8 0 4 0; -#X connect 9 0 5 0; -#X connect 11 0 0 0; -#X connect 12 0 11 1; -#X connect 13 0 11 2; -#X connect 14 0 11 0; -#X connect 18 0 0 0; -#X connect 19 0 18 0; -#X connect 21 0 10 0; -#X connect 21 1 10 1; -#X connect 22 0 21 2; diff --git a/doc/lattice~-help.pd b/doc/lattice~-help.pd new file mode 100644 index 0000000..6f62e3e --- /dev/null +++ b/doc/lattice~-help.pd @@ -0,0 +1,65 @@ +#N canvas 338 162 527 557 10; +#X obj 57 -77 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 +-1 -1 12500 1; +#X msg 57 223 rc 0 \$1; +#X obj 88 -78 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 +-1 -1 6432 1; +#X obj 119 -77 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 +-1 -1 3732 1; +#X obj 149 -77 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 +-1 -1 4332 1; +#X obj 179 -77 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 +-1 -1 21232 1; +#X obj 210 -78 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 +-1 -1 24900 1; +#X obj 241 -78 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 +-1 -1 18232 1; +#X obj 271 -77 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 +-1 -1 16932 1; +#X msg 86 199 rc 1 \$1; +#X msg 118 224 rc 2 \$1; +#X msg 147 200 rc 3 \$1; +#X msg 179 223 rc 4 \$1; +#X msg 208 199 rc 5 \$1; +#X msg 240 224 rc 6 \$1; +#X msg 269 200 rc 7 \$1; +#X floatatom 154 -125 5 -1 1 0 - - -; +#X obj 64 302 lattice~ 8; +#X obj 6 254 noise~; +#X obj 63 363 vol~; +#X obj 63 397 dac~; +#X floatatom 85 333 5 0 0 0 - - -; +#X text 159 298 lattice~ a lattice filter; +#X text 139 333 [rc ] sets reflection coefficient; +#X text 159 311 creation argument sets order; +#X obj 27 330 dist~ 1; +#X connect 0 0 1 0; +#X connect 1 0 17 0; +#X connect 2 0 9 0; +#X connect 3 0 10 0; +#X connect 4 0 11 0; +#X connect 5 0 12 0; +#X connect 6 0 13 0; +#X connect 7 0 14 0; +#X connect 8 0 15 0; +#X connect 9 0 17 0; +#X connect 10 0 17 0; +#X connect 11 0 17 0; +#X connect 12 0 17 0; +#X connect 13 0 17 0; +#X connect 14 0 17 0; +#X connect 15 0 17 0; +#X connect 16 0 0 0; +#X connect 16 0 2 0; +#X connect 16 0 3 0; +#X connect 16 0 4 0; +#X connect 16 0 5 0; +#X connect 16 0 6 0; +#X connect 16 0 7 0; +#X connect 16 0 8 0; +#X connect 17 0 25 0; +#X connect 18 0 17 0; +#X connect 19 0 20 1; +#X connect 19 0 20 0; +#X connect 21 0 19 1; +#X connect 25 0 19 0; diff --git a/doc/lattice~.pd b/doc/lattice~.pd deleted file mode 100644 index 6f62e3e..0000000 --- a/doc/lattice~.pd +++ /dev/null @@ -1,65 +0,0 @@ -#N canvas 338 162 527 557 10; -#X obj 57 -77 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 --1 -1 12500 1; -#X msg 57 223 rc 0 \$1; -#X obj 88 -78 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 --1 -1 6432 1; -#X obj 119 -77 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 --1 -1 3732 1; -#X obj 149 -77 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 --1 -1 4332 1; -#X obj 179 -77 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 --1 -1 21232 1; -#X obj 210 -78 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 --1 -1 24900 1; -#X obj 241 -78 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 --1 -1 18232 1; -#X obj 271 -77 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 --1 -1 16932 1; -#X msg 86 199 rc 1 \$1; -#X msg 118 224 rc 2 \$1; -#X msg 147 200 rc 3 \$1; -#X msg 179 223 rc 4 \$1; -#X msg 208 199 rc 5 \$1; -#X msg 240 224 rc 6 \$1; -#X msg 269 200 rc 7 \$1; -#X floatatom 154 -125 5 -1 1 0 - - -; -#X obj 64 302 lattice~ 8; -#X obj 6 254 noise~; -#X obj 63 363 vol~; -#X obj 63 397 dac~; -#X floatatom 85 333 5 0 0 0 - - -; -#X text 159 298 lattice~ a lattice filter; -#X text 139 333 [rc ] sets reflection coefficient; -#X text 159 311 creation argument sets order; -#X obj 27 330 dist~ 1; -#X connect 0 0 1 0; -#X connect 1 0 17 0; -#X connect 2 0 9 0; -#X connect 3 0 10 0; -#X connect 4 0 11 0; -#X connect 5 0 12 0; -#X connect 6 0 13 0; -#X connect 7 0 14 0; -#X connect 8 0 15 0; -#X connect 9 0 17 0; -#X connect 10 0 17 0; -#X connect 11 0 17 0; -#X connect 12 0 17 0; -#X connect 13 0 17 0; -#X connect 14 0 17 0; -#X connect 15 0 17 0; -#X connect 16 0 0 0; -#X connect 16 0 2 0; -#X connect 16 0 3 0; -#X connect 16 0 4 0; -#X connect 16 0 5 0; -#X connect 16 0 6 0; -#X connect 16 0 7 0; -#X connect 16 0 8 0; -#X connect 17 0 25 0; -#X connect 18 0 17 0; -#X connect 19 0 20 1; -#X connect 19 0 20 0; -#X connect 21 0 19 1; -#X connect 25 0 19 0; diff --git a/doc/matrix~-help.pd b/doc/matrix~-help.pd new file mode 100644 index 0000000..5a6e9d5 --- /dev/null +++ b/doc/matrix~-help.pd @@ -0,0 +1,10 @@ +#N canvas 523 376 560 300 10; +#X obj 30 165 matrix~; +#X text 29 23 matrix multiplies a signal block with an arbitrary matrix +; +#X msg 69 127 load matrix.bin; +#X text 27 39 added for completeness. mainly intended for spectral +transfos; +#X text 26 73 the file format is binary floating point \, column encoded. +; +#X connect 2 0 0 0; diff --git a/doc/matrix~.pd b/doc/matrix~.pd deleted file mode 100644 index 5a6e9d5..0000000 --- a/doc/matrix~.pd +++ /dev/null @@ -1,10 +0,0 @@ -#N canvas 523 376 560 300 10; -#X obj 30 165 matrix~; -#X text 29 23 matrix multiplies a signal block with an arbitrary matrix -; -#X msg 69 127 load matrix.bin; -#X text 27 39 added for completeness. mainly intended for spectral -transfos; -#X text 26 73 the file format is binary floating point \, column encoded. -; -#X connect 2 0 0 0; diff --git a/doc/permut~-help.pd b/doc/permut~-help.pd new file mode 100644 index 0000000..c8aa822 --- /dev/null +++ b/doc/permut~-help.pd @@ -0,0 +1,19 @@ +#N canvas 523 376 560 300 10; +#X text 29 10 permut~ performs a random permutation on a signal block +; +#X text 30 27 mainly intended for shuffling spectral data (dynwav) +; +#X obj 73 127 bng 15 250 50 0 empty empty empty 0 -6 32 8 -262144 -1 +-1; +#X msg 96 126 random; +#X text 154 124 bang or random create a new random permutation; +#X obj 30 91 osc~; +#X obj 30 166 permut~; +#X obj 29 210 dac~; +#X floatatom 30 61 5 0 0; +#X connect 2 0 6 0; +#X connect 3 0 6 0; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 6 0 7 1; +#X connect 8 0 5 0; diff --git a/doc/permut~.pd b/doc/permut~.pd deleted file mode 100644 index c8aa822..0000000 --- a/doc/permut~.pd +++ /dev/null @@ -1,19 +0,0 @@ -#N canvas 523 376 560 300 10; -#X text 29 10 permut~ performs a random permutation on a signal block -; -#X text 30 27 mainly intended for shuffling spectral data (dynwav) -; -#X obj 73 127 bng 15 250 50 0 empty empty empty 0 -6 32 8 -262144 -1 --1; -#X msg 96 126 random; -#X text 154 124 bang or random create a new random permutation; -#X obj 30 91 osc~; -#X obj 30 166 permut~; -#X obj 29 210 dac~; -#X floatatom 30 61 5 0 0; -#X connect 2 0 6 0; -#X connect 3 0 6 0; -#X connect 5 0 6 0; -#X connect 6 0 7 0; -#X connect 6 0 7 1; -#X connect 8 0 5 0; diff --git a/doc/qmult~-help.pd b/doc/qmult~-help.pd new file mode 100644 index 0000000..674df3e --- /dev/null +++ b/doc/qmult~-help.pd @@ -0,0 +1,63 @@ +#N canvas 195 283 786 398 10; +#X obj 111 145 qnorm~; +#X obj 38 71 osc~ 30; +#X obj 101 71 osc~ 40; +#X obj 163 70 osc~ 50; +#X obj 229 71 osc~ 60; +#X obj 143 319 dac~; +#X obj 123 244 vol~; +#X obj 163 244 vol~; +#X floatatom 230 230 5 0 0; +#X floatatom 58 36 5 0 0; +#X floatatom 107 36 5 0 0; +#X floatatom 159 36 5 0 0; +#X floatatom 208 36 5 0 0; +#X obj 167 282 hip~ 10; +#X obj 103 281 hip~ 10; +#X text 402 190 qmult multiplies 2 quaternion signals; +#X floatatom 347 35 5 0 0; +#X floatatom 396 35 5 0 0; +#X floatatom 448 35 5 0 0; +#X floatatom 497 35 5 0 0; +#X obj 327 70 osc~ 70; +#X obj 390 70 osc~ 80; +#X obj 452 69 osc~ 90; +#X obj 518 70 osc~ 100; +#X obj 410 136 qnorm~; +#X obj 106 195 qmult~ 0 0 0 0 0; +#X text 410 208 "quaternion ring modulation"; +#X text 403 245 the inlets are in 1 x real 3 x imag form; +#X connect 0 0 25 0; +#X connect 0 1 25 1; +#X connect 0 2 25 2; +#X connect 0 3 25 3; +#X connect 1 0 0 0; +#X connect 2 0 0 1; +#X connect 3 0 0 2; +#X connect 4 0 0 3; +#X connect 6 0 14 0; +#X connect 7 0 13 0; +#X connect 8 0 7 1; +#X connect 8 0 6 1; +#X connect 9 0 1 0; +#X connect 10 0 2 0; +#X connect 11 0 3 0; +#X connect 12 0 4 0; +#X connect 13 0 5 1; +#X connect 14 0 5 0; +#X connect 16 0 20 0; +#X connect 17 0 21 0; +#X connect 18 0 22 0; +#X connect 19 0 23 0; +#X connect 20 0 24 0; +#X connect 21 0 24 1; +#X connect 22 0 24 2; +#X connect 23 0 24 3; +#X connect 24 0 25 4; +#X connect 24 1 25 5; +#X connect 24 2 25 6; +#X connect 24 3 25 7; +#X connect 25 0 6 0; +#X connect 25 1 6 0; +#X connect 25 2 7 0; +#X connect 25 3 7 0; diff --git a/doc/qmult~.pd b/doc/qmult~.pd deleted file mode 100644 index 674df3e..0000000 --- a/doc/qmult~.pd +++ /dev/null @@ -1,63 +0,0 @@ -#N canvas 195 283 786 398 10; -#X obj 111 145 qnorm~; -#X obj 38 71 osc~ 30; -#X obj 101 71 osc~ 40; -#X obj 163 70 osc~ 50; -#X obj 229 71 osc~ 60; -#X obj 143 319 dac~; -#X obj 123 244 vol~; -#X obj 163 244 vol~; -#X floatatom 230 230 5 0 0; -#X floatatom 58 36 5 0 0; -#X floatatom 107 36 5 0 0; -#X floatatom 159 36 5 0 0; -#X floatatom 208 36 5 0 0; -#X obj 167 282 hip~ 10; -#X obj 103 281 hip~ 10; -#X text 402 190 qmult multiplies 2 quaternion signals; -#X floatatom 347 35 5 0 0; -#X floatatom 396 35 5 0 0; -#X floatatom 448 35 5 0 0; -#X floatatom 497 35 5 0 0; -#X obj 327 70 osc~ 70; -#X obj 390 70 osc~ 80; -#X obj 452 69 osc~ 90; -#X obj 518 70 osc~ 100; -#X obj 410 136 qnorm~; -#X obj 106 195 qmult~ 0 0 0 0 0; -#X text 410 208 "quaternion ring modulation"; -#X text 403 245 the inlets are in 1 x real 3 x imag form; -#X connect 0 0 25 0; -#X connect 0 1 25 1; -#X connect 0 2 25 2; -#X connect 0 3 25 3; -#X connect 1 0 0 0; -#X connect 2 0 0 1; -#X connect 3 0 0 2; -#X connect 4 0 0 3; -#X connect 6 0 14 0; -#X connect 7 0 13 0; -#X connect 8 0 7 1; -#X connect 8 0 6 1; -#X connect 9 0 1 0; -#X connect 10 0 2 0; -#X connect 11 0 3 0; -#X connect 12 0 4 0; -#X connect 13 0 5 1; -#X connect 14 0 5 0; -#X connect 16 0 20 0; -#X connect 17 0 21 0; -#X connect 18 0 22 0; -#X connect 19 0 23 0; -#X connect 20 0 24 0; -#X connect 21 0 24 1; -#X connect 22 0 24 2; -#X connect 23 0 24 3; -#X connect 24 0 25 4; -#X connect 24 1 25 5; -#X connect 24 2 25 6; -#X connect 24 3 25 7; -#X connect 25 0 6 0; -#X connect 25 1 6 0; -#X connect 25 2 7 0; -#X connect 25 3 7 0; diff --git a/doc/qnorm~-help.pd b/doc/qnorm~-help.pd new file mode 100644 index 0000000..3f6a8d0 --- /dev/null +++ b/doc/qnorm~-help.pd @@ -0,0 +1,35 @@ +#N canvas 334 368 513 350 10; +#X obj 119 137 qnorm~; +#X obj 96 68 osc~ 30; +#X obj 159 68 osc~ 40; +#X obj 221 67 osc~ 50; +#X obj 287 68 osc~ 60; +#X obj 131 265 dac~; +#X obj 111 190 vol~; +#X obj 151 190 vol~; +#X floatatom 185 154 5 0 0; +#X floatatom 116 33 5 0 0; +#X floatatom 165 33 5 0 0; +#X floatatom 217 33 5 0 0; +#X floatatom 266 33 5 0 0; +#X obj 155 228 hip~ 10; +#X obj 91 227 hip~ 10; +#X text 45 -2 qnorm normalizes a quaternion signal to unit norm; +#X connect 0 0 6 0; +#X connect 0 1 6 0; +#X connect 0 2 7 0; +#X connect 0 3 7 0; +#X connect 1 0 0 0; +#X connect 2 0 0 1; +#X connect 3 0 0 2; +#X connect 4 0 0 3; +#X connect 6 0 14 0; +#X connect 7 0 13 0; +#X connect 8 0 7 1; +#X connect 8 0 6 1; +#X connect 9 0 1 0; +#X connect 10 0 2 0; +#X connect 11 0 3 0; +#X connect 12 0 4 0; +#X connect 13 0 5 1; +#X connect 14 0 5 0; diff --git a/doc/qnorm~.pd b/doc/qnorm~.pd deleted file mode 100644 index 3f6a8d0..0000000 --- a/doc/qnorm~.pd +++ /dev/null @@ -1,35 +0,0 @@ -#N canvas 334 368 513 350 10; -#X obj 119 137 qnorm~; -#X obj 96 68 osc~ 30; -#X obj 159 68 osc~ 40; -#X obj 221 67 osc~ 50; -#X obj 287 68 osc~ 60; -#X obj 131 265 dac~; -#X obj 111 190 vol~; -#X obj 151 190 vol~; -#X floatatom 185 154 5 0 0; -#X floatatom 116 33 5 0 0; -#X floatatom 165 33 5 0 0; -#X floatatom 217 33 5 0 0; -#X floatatom 266 33 5 0 0; -#X obj 155 228 hip~ 10; -#X obj 91 227 hip~ 10; -#X text 45 -2 qnorm normalizes a quaternion signal to unit norm; -#X connect 0 0 6 0; -#X connect 0 1 6 0; -#X connect 0 2 7 0; -#X connect 0 3 7 0; -#X connect 1 0 0 0; -#X connect 2 0 0 1; -#X connect 3 0 0 2; -#X connect 4 0 0 3; -#X connect 6 0 14 0; -#X connect 7 0 13 0; -#X connect 8 0 7 1; -#X connect 8 0 6 1; -#X connect 9 0 1 0; -#X connect 10 0 2 0; -#X connect 11 0 3 0; -#X connect 12 0 4 0; -#X connect 13 0 5 1; -#X connect 14 0 5 0; diff --git a/doc/ratio-help.pd b/doc/ratio-help.pd new file mode 100644 index 0000000..9750058 --- /dev/null +++ b/doc/ratio-help.pd @@ -0,0 +1,18 @@ +#N canvas 328 388 450 300 10; +#X obj 75 99 ratio; +#X obj 103 192 osc~; +#X floatatom 131 122 5 0 0; +#X obj 103 150 *; +#X obj 103 223 dac~; +#X floatatom 75 51 5 0 0; +#X floatatom 35 135 5 0 0; +#X text 189 32 ratio is an octave shifter.; +#X text 188 46 output is between 1 and 2; +#X text 189 62 it computes 2^(log2(x)-int(log2(x))); +#X connect 0 0 3 0; +#X connect 0 0 6 0; +#X connect 1 0 4 0; +#X connect 1 0 4 1; +#X connect 2 0 3 1; +#X connect 3 0 1 0; +#X connect 5 0 0 0; diff --git a/doc/ratio.pd b/doc/ratio.pd deleted file mode 100644 index 9750058..0000000 --- a/doc/ratio.pd +++ /dev/null @@ -1,18 +0,0 @@ -#N canvas 328 388 450 300 10; -#X obj 75 99 ratio; -#X obj 103 192 osc~; -#X floatatom 131 122 5 0 0; -#X obj 103 150 *; -#X obj 103 223 dac~; -#X floatatom 75 51 5 0 0; -#X floatatom 35 135 5 0 0; -#X text 189 32 ratio is an octave shifter.; -#X text 188 46 output is between 1 and 2; -#X text 189 62 it computes 2^(log2(x)-int(log2(x))); -#X connect 0 0 3 0; -#X connect 0 0 6 0; -#X connect 1 0 4 0; -#X connect 1 0 4 1; -#X connect 2 0 3 1; -#X connect 3 0 1 0; -#X connect 5 0 0 0; diff --git a/doc/resofilt~-help.pd b/doc/resofilt~-help.pd new file mode 100644 index 0000000..5adad08 --- /dev/null +++ b/doc/resofilt~-help.pd @@ -0,0 +1,79 @@ +#N canvas 413 70 819 645 10; +#X floatatom 50 203 5 0 0 0 - - -; +#X obj 118 433 vol~; +#X floatatom 157 409 5 0 0 0 - - -; +#X obj 110 468 dac~; +#X floatatom 291 252 5 0 0 0 - - -; +#X floatatom 290 301 5 0 0 0 - - -; +#X obj 119 341 vol~; +#X floatatom 142 318 5 0 0 0 - - -; +#X obj 295 232 hsl 128 15 20 20000 1 1 empty empty empty -2 -6 0 8 +-262144 -1 -1 7900 1; +#X obj 294 282 hsl 128 15 0 1 0 1 empty empty empty -2 -6 0 8 -262144 +-1 -1 5600 1; +#X obj 242 225 ead~; +#X obj 243 268 *~; +#X obj 235 203 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X floatatom 259 203 5 0 0 0 - - -; +#X floatatom 305 202 5 0 0 0 - - -; +#X obj 19 170 ead~; +#X obj 20 273 *~; +#X obj 19 102 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X floatatom 35 147 5 0 0 0 - - -; +#X floatatom 76 147 5 0 0 0 - - -; +#X obj 86 71 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 87 44 metro 125; +#X obj 88 20 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +; +#X floatatom 147 16 5 0 0 0 - - -; +#X msg 34 126 10; +#X msg 76 126 400; +#X msg 268 180 20; +#X obj 36 225 blosc~ saw; +#X obj 37 248 -~; +#X msg 141 297 70; +#X text 281 96 all inputs are signal inlets. frequency and reso are +interpolated from their average (rms) value.; +#X msg 305 181 500; +#X text 279 28 resofilt~: high-quality implementations of the moog +4-pole and tb303 3-pole reso ladder filter. state-limited which means +it distorts on high reso input \, and can go into self oscillation +when reso > 1; +#X msg 53 182 70; +#X obj 119 377 resofilt~ 4; +#X text 222 378 creation argument 4 = 4pole \, 3 = 3pole; +#X connect 0 0 27 0; +#X connect 1 0 3 0; +#X connect 1 0 3 1; +#X connect 2 0 1 1; +#X connect 4 0 11 1; +#X connect 6 0 34 0; +#X connect 7 0 6 1; +#X connect 8 0 4 0; +#X connect 9 0 5 0; +#X connect 10 0 11 0; +#X connect 12 0 10 0; +#X connect 13 0 10 1; +#X connect 14 0 10 2; +#X connect 15 0 16 0; +#X connect 16 0 6 0; +#X connect 17 0 15 0; +#X connect 18 0 15 1; +#X connect 19 0 15 2; +#X connect 20 0 12 0; +#X connect 20 0 17 0; +#X connect 21 0 20 0; +#X connect 22 0 21 0; +#X connect 23 0 21 1; +#X connect 24 0 18 0; +#X connect 25 0 19 0; +#X connect 26 0 13 0; +#X connect 27 0 28 0; +#X connect 28 0 16 1; +#X connect 29 0 7 0; +#X connect 31 0 14 0; +#X connect 33 0 0 0; +#X connect 34 0 1 0; diff --git a/doc/resofilt~.pd b/doc/resofilt~.pd deleted file mode 100644 index 5adad08..0000000 --- a/doc/resofilt~.pd +++ /dev/null @@ -1,79 +0,0 @@ -#N canvas 413 70 819 645 10; -#X floatatom 50 203 5 0 0 0 - - -; -#X obj 118 433 vol~; -#X floatatom 157 409 5 0 0 0 - - -; -#X obj 110 468 dac~; -#X floatatom 291 252 5 0 0 0 - - -; -#X floatatom 290 301 5 0 0 0 - - -; -#X obj 119 341 vol~; -#X floatatom 142 318 5 0 0 0 - - -; -#X obj 295 232 hsl 128 15 20 20000 1 1 empty empty empty -2 -6 0 8 --262144 -1 -1 7900 1; -#X obj 294 282 hsl 128 15 0 1 0 1 empty empty empty -2 -6 0 8 -262144 --1 -1 5600 1; -#X obj 242 225 ead~; -#X obj 243 268 *~; -#X obj 235 203 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X floatatom 259 203 5 0 0 0 - - -; -#X floatatom 305 202 5 0 0 0 - - -; -#X obj 19 170 ead~; -#X obj 20 273 *~; -#X obj 19 102 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X floatatom 35 147 5 0 0 0 - - -; -#X floatatom 76 147 5 0 0 0 - - -; -#X obj 86 71 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 87 44 metro 125; -#X obj 88 20 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X floatatom 147 16 5 0 0 0 - - -; -#X msg 34 126 10; -#X msg 76 126 400; -#X msg 268 180 20; -#X obj 36 225 blosc~ saw; -#X obj 37 248 -~; -#X msg 141 297 70; -#X text 281 96 all inputs are signal inlets. frequency and reso are -interpolated from their average (rms) value.; -#X msg 305 181 500; -#X text 279 28 resofilt~: high-quality implementations of the moog -4-pole and tb303 3-pole reso ladder filter. state-limited which means -it distorts on high reso input \, and can go into self oscillation -when reso > 1; -#X msg 53 182 70; -#X obj 119 377 resofilt~ 4; -#X text 222 378 creation argument 4 = 4pole \, 3 = 3pole; -#X connect 0 0 27 0; -#X connect 1 0 3 0; -#X connect 1 0 3 1; -#X connect 2 0 1 1; -#X connect 4 0 11 1; -#X connect 6 0 34 0; -#X connect 7 0 6 1; -#X connect 8 0 4 0; -#X connect 9 0 5 0; -#X connect 10 0 11 0; -#X connect 12 0 10 0; -#X connect 13 0 10 1; -#X connect 14 0 10 2; -#X connect 15 0 16 0; -#X connect 16 0 6 0; -#X connect 17 0 15 0; -#X connect 18 0 15 1; -#X connect 19 0 15 2; -#X connect 20 0 12 0; -#X connect 20 0 17 0; -#X connect 21 0 20 0; -#X connect 22 0 21 0; -#X connect 23 0 21 1; -#X connect 24 0 18 0; -#X connect 25 0 19 0; -#X connect 26 0 13 0; -#X connect 27 0 28 0; -#X connect 28 0 16 1; -#X connect 29 0 7 0; -#X connect 31 0 14 0; -#X connect 33 0 0 0; -#X connect 34 0 1 0; diff --git a/doc/sbosc~-help.pd b/doc/sbosc~-help.pd new file mode 100644 index 0000000..804b30d --- /dev/null +++ b/doc/sbosc~-help.pd @@ -0,0 +1,36 @@ +#N canvas 624 424 408 499 10; +#X obj 70 158 sbosc~; +#X floatatom 101 285 5 0 0 0 - - -; +#X obj 70 308 vol~; +#X obj 58 340 dac~; +#X floatatom 70 68 5 0 0 0 - - -; +#X floatatom 136 106 5 0 0 0 - - -; +#X msg 129 139 0; +#X text 171 139 phase; +#X text 56 44 pitch; +#X text 119 84 center freq; +#X text 38 14 sbosc~: smallband periodic complex oscillator.; +#X obj 134 53 hsl 128 15 20 20000 1 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 4163 1; +#X obj 213 91 hsl 128 15 20 20000 1 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 7400 1; +#X obj 85 228 idsfosc~; +#X obj 70 256 *~; +#X floatatom 136 206 5 0 0 0 - - -; +#X obj 194 191 hsl 128 15 -0.99 0.99 0 0 empty empty empty -2 -6 0 +8 -262144 -1 -1 9100 1; +#X text 136 188 bw; +#X connect 0 0 14 0; +#X connect 1 0 2 1; +#X connect 2 0 3 0; +#X connect 2 0 3 1; +#X connect 4 0 0 0; +#X connect 4 0 13 0; +#X connect 5 0 0 1; +#X connect 6 0 0 2; +#X connect 11 0 4 0; +#X connect 12 0 5 0; +#X connect 13 0 14 1; +#X connect 14 0 2 0; +#X connect 15 0 13 1; +#X connect 16 0 15 0; diff --git a/doc/sbosc~.pd b/doc/sbosc~.pd deleted file mode 100644 index 804b30d..0000000 --- a/doc/sbosc~.pd +++ /dev/null @@ -1,36 +0,0 @@ -#N canvas 624 424 408 499 10; -#X obj 70 158 sbosc~; -#X floatatom 101 285 5 0 0 0 - - -; -#X obj 70 308 vol~; -#X obj 58 340 dac~; -#X floatatom 70 68 5 0 0 0 - - -; -#X floatatom 136 106 5 0 0 0 - - -; -#X msg 129 139 0; -#X text 171 139 phase; -#X text 56 44 pitch; -#X text 119 84 center freq; -#X text 38 14 sbosc~: smallband periodic complex oscillator.; -#X obj 134 53 hsl 128 15 20 20000 1 0 empty empty empty -2 -6 0 8 -262144 --1 -1 4163 1; -#X obj 213 91 hsl 128 15 20 20000 1 0 empty empty empty -2 -6 0 8 -262144 --1 -1 7400 1; -#X obj 85 228 idsfosc~; -#X obj 70 256 *~; -#X floatatom 136 206 5 0 0 0 - - -; -#X obj 194 191 hsl 128 15 -0.99 0.99 0 0 empty empty empty -2 -6 0 -8 -262144 -1 -1 9100 1; -#X text 136 188 bw; -#X connect 0 0 14 0; -#X connect 1 0 2 1; -#X connect 2 0 3 0; -#X connect 2 0 3 1; -#X connect 4 0 0 0; -#X connect 4 0 13 0; -#X connect 5 0 0 1; -#X connect 6 0 0 2; -#X connect 11 0 4 0; -#X connect 12 0 5 0; -#X connect 13 0 14 1; -#X connect 14 0 2 0; -#X connect 15 0 13 1; -#X connect 16 0 15 0; diff --git a/doc/scrollgrid1D~-help.pd b/doc/scrollgrid1D~-help.pd new file mode 100644 index 0000000..16ec412 --- /dev/null +++ b/doc/scrollgrid1D~-help.pd @@ -0,0 +1,111 @@ +#N canvas 309 57 748 724 10; +#X obj 116 116 scrollgrid1D~; +#X msg 36 92 reset; +#X floatatom 111 87 5 0 0 0 - - -; +#X floatatom 187 87 5 0 0 0 - - -; +#X floatatom 237 86 5 0 0 0 - - -; +#X floatatom 290 85 5 0 0 0 - - -; +#X obj 401 200 tabwrite~ t; +#X obj 401 147 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 504 206 table t 10000; +#X obj 123 222 vol~; +#X floatatom 146 196 5 0 0 0 - - -; +#X text 103 47 frequency; +#X text 197 45 T1; +#X text 249 45 T2; +#X text 301 46 N; +#X msg 111 66 350; +#X msg 235 66 1; +#X msg 291 65 3; +#X msg 188 65 12; +#X obj 379 222 tabwrite~ t; +#X obj 379 147 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 353 243 tabwrite~ t; +#X obj 353 148 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 233 292 parameters:; +#X text 266 359 N = number of scrolls or unstable rotation centers +in attractor; +#X text 233 404 outputs:; +#X text 230 468 some remarks; +#X text 266 422 the first output is alongside the scoll centers \, +the other two are orthogonal to this line.; +#X text 368 130 X Y Z; +#X obj 178 222 vol~; +#X floatatom 201 196 5 0 0 0 - - -; +#X obj 64 223 vol~; +#X floatatom 87 197 5 0 0 0 - - -; +#X obj 63 282 hip~ 10; +#X floatatom 133 286 5 0 0 0 - - -; +#X obj 63 305 blop~ 4; +#X msg 132 263 500; +#X msg 163 263 5000; +#X text 265 325 T1 = unstable time constant in ms ("attack" time); +#X text 265 342 T2 = stable time constant in ms ("release" time); +#X text 265 660 the entire circuit is clipped \, which means that for +some parameter values that would normally cause a blowup \, its behaviour +is limited to that of an oscillator.; +#X obj 4 283 hip~ 10; +#X obj 4 306 blop~ 4; +#X floatatom 180 170 5 0 0 0 - - -; +#X obj 4 402 tabwrite~ t; +#X obj 21 380 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 142 66 5000; +#X text 264 309 freq = spiral frequency in Hz; +#X text 45 11 stabilized scroll grid chaotic oscillator with scroll +centers located on a line.; +#X msg 204 262 17000; +#X text 265 493 this chaotic system is a switched unstable linear system. +it consists of N scrolls (outward spirals). when the amplitude of the +spiral has reached a certain threshold \, it is switched to be attracted +by a neighbouring scroll. the freq parameter determines the frequency +of the outward spiralling motion on a scroll. T1 is the outward spiralling +time constant. T1 large means slow buildup or mild chaotic motion \, +T1 small means fast buildup or turbulent chaotic motion. T2 is the +time constant with which a trajectory is attracted to the plane of +a scroll. T2 small means fast attraction \, T2 large means slow attraction. +; +#X obj 94 378 dac~ 4; +#X connect 0 0 21 0; +#X connect 0 0 31 0; +#X connect 0 1 9 0; +#X connect 0 1 19 0; +#X connect 0 2 6 0; +#X connect 0 2 29 0; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 3 0 0 1; +#X connect 4 0 0 2; +#X connect 5 0 0 3; +#X connect 7 0 6 0; +#X connect 9 0 41 0; +#X connect 10 0 9 1; +#X connect 15 0 2 0; +#X connect 16 0 4 0; +#X connect 17 0 5 0; +#X connect 18 0 3 0; +#X connect 20 0 19 0; +#X connect 22 0 21 0; +#X connect 29 0 33 0; +#X connect 30 0 29 1; +#X connect 31 0 33 0; +#X connect 31 0 41 0; +#X connect 32 0 31 1; +#X connect 33 0 35 0; +#X connect 34 0 35 1; +#X connect 34 0 42 1; +#X connect 35 0 44 0; +#X connect 35 0 51 0; +#X connect 36 0 34 0; +#X connect 37 0 34 0; +#X connect 41 0 42 0; +#X connect 42 0 44 0; +#X connect 42 0 51 0; +#X connect 43 0 10 0; +#X connect 43 0 30 0; +#X connect 45 0 44 0; +#X connect 46 0 2 0; +#X connect 49 0 34 0; diff --git a/doc/scrollgrid1D~.pd b/doc/scrollgrid1D~.pd deleted file mode 100644 index 16ec412..0000000 --- a/doc/scrollgrid1D~.pd +++ /dev/null @@ -1,111 +0,0 @@ -#N canvas 309 57 748 724 10; -#X obj 116 116 scrollgrid1D~; -#X msg 36 92 reset; -#X floatatom 111 87 5 0 0 0 - - -; -#X floatatom 187 87 5 0 0 0 - - -; -#X floatatom 237 86 5 0 0 0 - - -; -#X floatatom 290 85 5 0 0 0 - - -; -#X obj 401 200 tabwrite~ t; -#X obj 401 147 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 504 206 table t 10000; -#X obj 123 222 vol~; -#X floatatom 146 196 5 0 0 0 - - -; -#X text 103 47 frequency; -#X text 197 45 T1; -#X text 249 45 T2; -#X text 301 46 N; -#X msg 111 66 350; -#X msg 235 66 1; -#X msg 291 65 3; -#X msg 188 65 12; -#X obj 379 222 tabwrite~ t; -#X obj 379 147 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 353 243 tabwrite~ t; -#X obj 353 148 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X text 233 292 parameters:; -#X text 266 359 N = number of scrolls or unstable rotation centers -in attractor; -#X text 233 404 outputs:; -#X text 230 468 some remarks; -#X text 266 422 the first output is alongside the scoll centers \, -the other two are orthogonal to this line.; -#X text 368 130 X Y Z; -#X obj 178 222 vol~; -#X floatatom 201 196 5 0 0 0 - - -; -#X obj 64 223 vol~; -#X floatatom 87 197 5 0 0 0 - - -; -#X obj 63 282 hip~ 10; -#X floatatom 133 286 5 0 0 0 - - -; -#X obj 63 305 blop~ 4; -#X msg 132 263 500; -#X msg 163 263 5000; -#X text 265 325 T1 = unstable time constant in ms ("attack" time); -#X text 265 342 T2 = stable time constant in ms ("release" time); -#X text 265 660 the entire circuit is clipped \, which means that for -some parameter values that would normally cause a blowup \, its behaviour -is limited to that of an oscillator.; -#X obj 4 283 hip~ 10; -#X obj 4 306 blop~ 4; -#X floatatom 180 170 5 0 0 0 - - -; -#X obj 4 402 tabwrite~ t; -#X obj 21 380 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 142 66 5000; -#X text 264 309 freq = spiral frequency in Hz; -#X text 45 11 stabilized scroll grid chaotic oscillator with scroll -centers located on a line.; -#X msg 204 262 17000; -#X text 265 493 this chaotic system is a switched unstable linear system. -it consists of N scrolls (outward spirals). when the amplitude of the -spiral has reached a certain threshold \, it is switched to be attracted -by a neighbouring scroll. the freq parameter determines the frequency -of the outward spiralling motion on a scroll. T1 is the outward spiralling -time constant. T1 large means slow buildup or mild chaotic motion \, -T1 small means fast buildup or turbulent chaotic motion. T2 is the -time constant with which a trajectory is attracted to the plane of -a scroll. T2 small means fast attraction \, T2 large means slow attraction. -; -#X obj 94 378 dac~ 4; -#X connect 0 0 21 0; -#X connect 0 0 31 0; -#X connect 0 1 9 0; -#X connect 0 1 19 0; -#X connect 0 2 6 0; -#X connect 0 2 29 0; -#X connect 1 0 0 0; -#X connect 2 0 0 0; -#X connect 3 0 0 1; -#X connect 4 0 0 2; -#X connect 5 0 0 3; -#X connect 7 0 6 0; -#X connect 9 0 41 0; -#X connect 10 0 9 1; -#X connect 15 0 2 0; -#X connect 16 0 4 0; -#X connect 17 0 5 0; -#X connect 18 0 3 0; -#X connect 20 0 19 0; -#X connect 22 0 21 0; -#X connect 29 0 33 0; -#X connect 30 0 29 1; -#X connect 31 0 33 0; -#X connect 31 0 41 0; -#X connect 32 0 31 1; -#X connect 33 0 35 0; -#X connect 34 0 35 1; -#X connect 34 0 42 1; -#X connect 35 0 44 0; -#X connect 35 0 51 0; -#X connect 36 0 34 0; -#X connect 37 0 34 0; -#X connect 41 0 42 0; -#X connect 42 0 44 0; -#X connect 42 0 51 0; -#X connect 43 0 10 0; -#X connect 43 0 30 0; -#X connect 45 0 44 0; -#X connect 46 0 2 0; -#X connect 49 0 34 0; diff --git a/doc/tabreadmix~-help.pd b/doc/tabreadmix~-help.pd new file mode 100644 index 0000000..aad25ab --- /dev/null +++ b/doc/tabreadmix~-help.pd @@ -0,0 +1,45 @@ +#N canvas 466 143 551 422 10; +#X floatatom 199 254 5 0 0; +#X obj 48 315 dac~; +#X floatatom 38 40 5 0 0; +#X text 135 7 tabreadmix~ an overlap add tabread clone; +#X obj 288 362 soundfiler; +#X text 203 236 right inlet: window hop size; +#X text 249 247 (window size = 2x hop size); +#X obj 38 77 phasor~; +#X obj 38 124 *~; +#X text 136 40 usage analogous to tabread~; +#X text 136 58 only sample adressing is modulo length; +#X obj 288 311 openpanel; +#X obj 288 291 bng 15 250 50 0 empty empty empty 0 -6 32 8 -262144 +-1 -1; +#X msg 171 97 bang; +#X text 219 97 reset windowing; +#X msg 171 150 pitch \$1; +#X floatatom 171 132 5 0 0; +#X text 245 151 set window hop size corresponding to pitch; +#X floatatom 172 178 5 0 0; +#X msg 172 196 chunks \$1; +#X text 246 196 set hop size to 1/xth of length; +#X obj 374 304 table sample123; +#X msg 288 338 read -resize \$1 sample123; +#X obj 288 386 s length; +#X obj 54 100 r length; +#X obj 57 275 tabreadmix~ sample123; +#X text 136 24 simple (sample rate synchronous) playback; +#X connect 0 0 25 1; +#X connect 2 0 7 0; +#X connect 4 0 23 0; +#X connect 7 0 8 0; +#X connect 8 0 25 0; +#X connect 11 0 22 0; +#X connect 12 0 11 0; +#X connect 13 0 25 0; +#X connect 15 0 25 0; +#X connect 16 0 15 0; +#X connect 18 0 19 0; +#X connect 19 0 25 0; +#X connect 22 0 4 0; +#X connect 24 0 8 1; +#X connect 25 0 1 0; +#X connect 25 0 1 1; diff --git a/doc/tabreadmix~.pd b/doc/tabreadmix~.pd deleted file mode 100644 index aad25ab..0000000 --- a/doc/tabreadmix~.pd +++ /dev/null @@ -1,45 +0,0 @@ -#N canvas 466 143 551 422 10; -#X floatatom 199 254 5 0 0; -#X obj 48 315 dac~; -#X floatatom 38 40 5 0 0; -#X text 135 7 tabreadmix~ an overlap add tabread clone; -#X obj 288 362 soundfiler; -#X text 203 236 right inlet: window hop size; -#X text 249 247 (window size = 2x hop size); -#X obj 38 77 phasor~; -#X obj 38 124 *~; -#X text 136 40 usage analogous to tabread~; -#X text 136 58 only sample adressing is modulo length; -#X obj 288 311 openpanel; -#X obj 288 291 bng 15 250 50 0 empty empty empty 0 -6 32 8 -262144 --1 -1; -#X msg 171 97 bang; -#X text 219 97 reset windowing; -#X msg 171 150 pitch \$1; -#X floatatom 171 132 5 0 0; -#X text 245 151 set window hop size corresponding to pitch; -#X floatatom 172 178 5 0 0; -#X msg 172 196 chunks \$1; -#X text 246 196 set hop size to 1/xth of length; -#X obj 374 304 table sample123; -#X msg 288 338 read -resize \$1 sample123; -#X obj 288 386 s length; -#X obj 54 100 r length; -#X obj 57 275 tabreadmix~ sample123; -#X text 136 24 simple (sample rate synchronous) playback; -#X connect 0 0 25 1; -#X connect 2 0 7 0; -#X connect 4 0 23 0; -#X connect 7 0 8 0; -#X connect 8 0 25 0; -#X connect 11 0 22 0; -#X connect 12 0 11 0; -#X connect 13 0 25 0; -#X connect 15 0 25 0; -#X connect 16 0 15 0; -#X connect 18 0 19 0; -#X connect 19 0 25 0; -#X connect 22 0 4 0; -#X connect 24 0 8 1; -#X connect 25 0 1 0; -#X connect 25 0 1 1; diff --git a/doc/xfm~-help.pd b/doc/xfm~-help.pd new file mode 100644 index 0000000..6b59329 --- /dev/null +++ b/doc/xfm~-help.pd @@ -0,0 +1,106 @@ +#N canvas 182 174 656 604 10; +#X text 298 24 xfm~ cross frequency modulation; +#X msg 180 308 reset; +#X floatatom 231 255 5 0 0; +#X floatatom 282 255 5 0 0; +#X floatatom 332 255 5 0 0; +#X floatatom 382 255 5 0 0; +#X obj 287 514 dac~; +#X obj 231 282 lop~ 1; +#X obj 282 282 lop~ 1; +#X obj 332 282 lop~ 1; +#X obj 382 282 lop~ 1; +#X floatatom 444 268 5 0 0; +#X text 228 232 freq1; +#X text 279 232 freq2; +#X text 337 233 fb1; +#X text 381 234 fb2; +#X text 297 43 freq_osc1 = freq1 + wave_out2*fb1; +#X text 297 58 freq_osc2 = freq2 + wave_out1*fb2; +#X obj 275 99 hsl 300 15 1 20000 1 1 empty empty empty -2 -6 0 8 -262144 +-1 -1 15200 1; +#X obj 275 121 hsl 300 15 1 20000 1 1 empty empty empty -2 -6 0 8 -262144 +-1 -1 14400 1; +#X obj 276 146 hsl 300 15 1 20000 1 1 empty empty empty -2 -6 0 8 -262144 +-1 -1 18938 1; +#X obj 276 171 hsl 300 15 1 20000 1 1 empty empty empty -2 -6 0 8 -262144 +-1 -1 21000 1; +#X floatatom 487 377 5 0 0; +#X floatatom 534 375 5 0 0; +#X obj 462 348 metro; +#X floatatom 534 335 5 0 0; +#X obj 463 324 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 534 306 500; +#X msg 565 305 125; +#X msg 444 241 0.1; +#X msg 495 306 1000; +#X msg 150 223 type 0; +#X msg 151 263 type 1; +#X text 42 213 square phasor; +#X text 45 158 algo type; +#X text 37 257 circular phasor; +#X text 7 371 remark: all frequencies are warped; +#X text 8 388 (f_real = arctan(2pi*f_in)/2pi); +#X obj 288 485 vols~; +#X floatatom 352 453 5 0 0; +#X text 7 416 for frequencies under 1000Hz; +#X text 8 430 this effect is minimal; +#X text 9 465 use the fwarp to convert from; +#X text 9 478 real to warped; +#X text 9 505 the square phasor type is warped too; +#X text 9 520 but not in such a nice way as the; +#X text 9 534 circular phasor; +#X text 36 229 (chaotic 4DOF); +#X text 5 272 (quasiperiodic 2DOF); +#X obj 277 325 xfm~; +#X obj 462 411 ead~ 0 0; +#X obj 442 517 dac~; +#X obj 435 451 *~; +#X obj 472 451 *~; +#X obj 443 488 vols~; +#X floatatom 507 456 5 0 0; +#X text 2 173 (can be set by creation argument); +#X connect 1 0 49 0; +#X connect 2 0 7 0; +#X connect 3 0 8 0; +#X connect 4 0 9 0; +#X connect 5 0 10 0; +#X connect 7 0 49 0; +#X connect 8 0 49 1; +#X connect 9 0 49 2; +#X connect 10 0 49 3; +#X connect 11 0 10 1; +#X connect 11 0 9 1; +#X connect 11 0 7 1; +#X connect 11 0 8 1; +#X connect 18 0 2 0; +#X connect 19 0 3 0; +#X connect 20 0 4 0; +#X connect 21 0 5 0; +#X connect 22 0 50 1; +#X connect 23 0 50 2; +#X connect 24 0 50 0; +#X connect 25 0 24 1; +#X connect 25 0 23 0; +#X connect 26 0 24 0; +#X connect 27 0 25 0; +#X connect 28 0 25 0; +#X connect 29 0 11 0; +#X connect 30 0 25 0; +#X connect 31 0 49 0; +#X connect 32 0 49 0; +#X connect 38 0 6 0; +#X connect 38 1 6 1; +#X connect 39 0 38 2; +#X connect 49 0 52 0; +#X connect 49 0 38 0; +#X connect 49 1 53 0; +#X connect 49 1 38 1; +#X connect 50 0 52 1; +#X connect 50 0 53 1; +#X connect 52 0 54 0; +#X connect 53 0 54 1; +#X connect 54 0 51 0; +#X connect 54 1 51 1; +#X connect 55 0 54 2; diff --git a/doc/xfm~.pd b/doc/xfm~.pd deleted file mode 100644 index 6b59329..0000000 --- a/doc/xfm~.pd +++ /dev/null @@ -1,106 +0,0 @@ -#N canvas 182 174 656 604 10; -#X text 298 24 xfm~ cross frequency modulation; -#X msg 180 308 reset; -#X floatatom 231 255 5 0 0; -#X floatatom 282 255 5 0 0; -#X floatatom 332 255 5 0 0; -#X floatatom 382 255 5 0 0; -#X obj 287 514 dac~; -#X obj 231 282 lop~ 1; -#X obj 282 282 lop~ 1; -#X obj 332 282 lop~ 1; -#X obj 382 282 lop~ 1; -#X floatatom 444 268 5 0 0; -#X text 228 232 freq1; -#X text 279 232 freq2; -#X text 337 233 fb1; -#X text 381 234 fb2; -#X text 297 43 freq_osc1 = freq1 + wave_out2*fb1; -#X text 297 58 freq_osc2 = freq2 + wave_out1*fb2; -#X obj 275 99 hsl 300 15 1 20000 1 1 empty empty empty -2 -6 0 8 -262144 --1 -1 15200 1; -#X obj 275 121 hsl 300 15 1 20000 1 1 empty empty empty -2 -6 0 8 -262144 --1 -1 14400 1; -#X obj 276 146 hsl 300 15 1 20000 1 1 empty empty empty -2 -6 0 8 -262144 --1 -1 18938 1; -#X obj 276 171 hsl 300 15 1 20000 1 1 empty empty empty -2 -6 0 8 -262144 --1 -1 21000 1; -#X floatatom 487 377 5 0 0; -#X floatatom 534 375 5 0 0; -#X obj 462 348 metro; -#X floatatom 534 335 5 0 0; -#X obj 463 324 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 534 306 500; -#X msg 565 305 125; -#X msg 444 241 0.1; -#X msg 495 306 1000; -#X msg 150 223 type 0; -#X msg 151 263 type 1; -#X text 42 213 square phasor; -#X text 45 158 algo type; -#X text 37 257 circular phasor; -#X text 7 371 remark: all frequencies are warped; -#X text 8 388 (f_real = arctan(2pi*f_in)/2pi); -#X obj 288 485 vols~; -#X floatatom 352 453 5 0 0; -#X text 7 416 for frequencies under 1000Hz; -#X text 8 430 this effect is minimal; -#X text 9 465 use the fwarp to convert from; -#X text 9 478 real to warped; -#X text 9 505 the square phasor type is warped too; -#X text 9 520 but not in such a nice way as the; -#X text 9 534 circular phasor; -#X text 36 229 (chaotic 4DOF); -#X text 5 272 (quasiperiodic 2DOF); -#X obj 277 325 xfm~; -#X obj 462 411 ead~ 0 0; -#X obj 442 517 dac~; -#X obj 435 451 *~; -#X obj 472 451 *~; -#X obj 443 488 vols~; -#X floatatom 507 456 5 0 0; -#X text 2 173 (can be set by creation argument); -#X connect 1 0 49 0; -#X connect 2 0 7 0; -#X connect 3 0 8 0; -#X connect 4 0 9 0; -#X connect 5 0 10 0; -#X connect 7 0 49 0; -#X connect 8 0 49 1; -#X connect 9 0 49 2; -#X connect 10 0 49 3; -#X connect 11 0 10 1; -#X connect 11 0 9 1; -#X connect 11 0 7 1; -#X connect 11 0 8 1; -#X connect 18 0 2 0; -#X connect 19 0 3 0; -#X connect 20 0 4 0; -#X connect 21 0 5 0; -#X connect 22 0 50 1; -#X connect 23 0 50 2; -#X connect 24 0 50 0; -#X connect 25 0 24 1; -#X connect 25 0 23 0; -#X connect 26 0 24 0; -#X connect 27 0 25 0; -#X connect 28 0 25 0; -#X connect 29 0 11 0; -#X connect 30 0 25 0; -#X connect 31 0 49 0; -#X connect 32 0 49 0; -#X connect 38 0 6 0; -#X connect 38 1 6 1; -#X connect 39 0 38 2; -#X connect 49 0 52 0; -#X connect 49 0 38 0; -#X connect 49 1 53 0; -#X connect 49 1 38 1; -#X connect 50 0 52 1; -#X connect 50 0 53 1; -#X connect 52 0 54 0; -#X connect 53 0 54 1; -#X connect 54 0 51 0; -#X connect 54 1 51 1; -#X connect 55 0 54 2; diff --git a/modules++/biquadseries.cc b/modules++/biquadseries.cc deleted file mode 100644 index 40b3aef..0000000 --- a/modules++/biquadseries.cc +++ /dev/null @@ -1,128 +0,0 @@ -/* - * biquadseries.cc - second order section filter pd interface - * Copyright (c) 2000-2003 by Tom Schouten - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include "m_pd.h" -#include - -#include "DSPIcomplex.h" -#include "DSPIfilters.h" - - - -typedef struct biquadseries_struct -{ - t_object x_obj; - t_float x_f; - DSPIfilterSeries* biquadseries; -} t_biquadseries; - -void biquadseries_bang(t_biquadseries *x) -{ - -} - -void biquadseries_butterLP(t_biquadseries *x, t_floatarg f) -{ - x->biquadseries->setButterLP(f / sys_getsr()); -} - -void biquadseries_butterHP(t_biquadseries *x, t_floatarg f) -{ - x->biquadseries->setButterHP(f / sys_getsr()); -} - - - -static t_int *biquadseries_perform(t_int *w) -{ - - - t_float *in = (float *)(w[3]); - t_float *out = (float *)(w[4]); - DSPIfilterSeries* biquadseries = (DSPIfilterSeries *)(w[1]); - t_int n = (t_int)(w[2]); - t_int i; - t_float x; - - // dit kan beter - float smooth = .01; - //1.0f - pow(.9f,1.0f/(float)(n)); - - for (i = 0; i < n; i++) - { - x = *in++; - biquadseries->BangSmooth(x, x, smooth); - *out++ = x; - } - - return (w+5); -} - -static void biquadseries_dsp(t_biquadseries *x, t_signal **sp) -{ - dsp_add(biquadseries_perform, 4, x->biquadseries, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); - -} -void biquadseries_free(void) -{ - -} - -t_class *biquadseries_class; - -void *biquadseries_new(t_floatarg fsections) -{ - t_biquadseries *x = (t_biquadseries *)pd_new(biquadseries_class); - - int sections = (int)fsections; - if (sections < 1) sections = 1; - // post("biquadseries~: %d sections", sections); - x->biquadseries = new DSPIfilterSeries(sections); - - // inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("freq")); - outlet_new(&x->x_obj, gensym("signal")); - - biquadseries_butterLP(x, 10000); - - return (void *)x; -} - - -extern "C" { - -void biquadseries_tilde_setup(void) -{ - //post("biquadseries~ v0.1"); - - biquadseries_class = class_new(gensym("biquadseries~"), (t_newmethod)biquadseries_new, - (t_method)biquadseries_free, sizeof(t_biquadseries), 0, A_DEFFLOAT, 0); - - CLASS_MAINSIGNALIN(biquadseries_class, t_biquadseries, x_f); - - class_addmethod(biquadseries_class, (t_method)biquadseries_bang, gensym("bang"), (t_atomtype)0); - - class_addmethod(biquadseries_class, (t_method)biquadseries_dsp, gensym("dsp"), (t_atomtype)0); - - class_addmethod(biquadseries_class, (t_method)biquadseries_butterLP, gensym("butterLP"), A_FLOAT, A_NULL); - class_addmethod(biquadseries_class, (t_method)biquadseries_butterHP, gensym("butterHP"), A_FLOAT, A_NULL); - -} - -} diff --git a/modules++/biquadseries~.cc b/modules++/biquadseries~.cc new file mode 100644 index 0000000..40b3aef --- /dev/null +++ b/modules++/biquadseries~.cc @@ -0,0 +1,128 @@ +/* + * biquadseries.cc - second order section filter pd interface + * Copyright (c) 2000-2003 by Tom Schouten + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + +#include "m_pd.h" +#include + +#include "DSPIcomplex.h" +#include "DSPIfilters.h" + + + +typedef struct biquadseries_struct +{ + t_object x_obj; + t_float x_f; + DSPIfilterSeries* biquadseries; +} t_biquadseries; + +void biquadseries_bang(t_biquadseries *x) +{ + +} + +void biquadseries_butterLP(t_biquadseries *x, t_floatarg f) +{ + x->biquadseries->setButterLP(f / sys_getsr()); +} + +void biquadseries_butterHP(t_biquadseries *x, t_floatarg f) +{ + x->biquadseries->setButterHP(f / sys_getsr()); +} + + + +static t_int *biquadseries_perform(t_int *w) +{ + + + t_float *in = (float *)(w[3]); + t_float *out = (float *)(w[4]); + DSPIfilterSeries* biquadseries = (DSPIfilterSeries *)(w[1]); + t_int n = (t_int)(w[2]); + t_int i; + t_float x; + + // dit kan beter + float smooth = .01; + //1.0f - pow(.9f,1.0f/(float)(n)); + + for (i = 0; i < n; i++) + { + x = *in++; + biquadseries->BangSmooth(x, x, smooth); + *out++ = x; + } + + return (w+5); +} + +static void biquadseries_dsp(t_biquadseries *x, t_signal **sp) +{ + dsp_add(biquadseries_perform, 4, x->biquadseries, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); + +} +void biquadseries_free(void) +{ + +} + +t_class *biquadseries_class; + +void *biquadseries_new(t_floatarg fsections) +{ + t_biquadseries *x = (t_biquadseries *)pd_new(biquadseries_class); + + int sections = (int)fsections; + if (sections < 1) sections = 1; + // post("biquadseries~: %d sections", sections); + x->biquadseries = new DSPIfilterSeries(sections); + + // inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("freq")); + outlet_new(&x->x_obj, gensym("signal")); + + biquadseries_butterLP(x, 10000); + + return (void *)x; +} + + +extern "C" { + +void biquadseries_tilde_setup(void) +{ + //post("biquadseries~ v0.1"); + + biquadseries_class = class_new(gensym("biquadseries~"), (t_newmethod)biquadseries_new, + (t_method)biquadseries_free, sizeof(t_biquadseries), 0, A_DEFFLOAT, 0); + + CLASS_MAINSIGNALIN(biquadseries_class, t_biquadseries, x_f); + + class_addmethod(biquadseries_class, (t_method)biquadseries_bang, gensym("bang"), (t_atomtype)0); + + class_addmethod(biquadseries_class, (t_method)biquadseries_dsp, gensym("dsp"), (t_atomtype)0); + + class_addmethod(biquadseries_class, (t_method)biquadseries_butterLP, gensym("butterLP"), A_FLOAT, A_NULL); + class_addmethod(biquadseries_class, (t_method)biquadseries_butterHP, gensym("butterHP"), A_FLOAT, A_NULL); + +} + +} diff --git a/modules++/blosc.cc b/modules++/blosc.cc deleted file mode 100644 index f2b13d8..0000000 --- a/modules++/blosc.cc +++ /dev/null @@ -1,782 +0,0 @@ -/* - * blosc.c - bandlimited oscillators - * using minimum phase impulse, step & ramp - * Copyright (c) 2000-2003 by Tom Schouten - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#include "m_pd.h" -#include -#include -#include -#include - - -#include "DSPIcomplex.h" -#include "DSPIfilters.h" - -/* work around old bug in Apple compilers */ -//#if MAC_OS_X_VERSION < MAC_OS_X_VERSION_10_4 // arg, this didn't work -#ifndef isnan -extern "C" int isnan(double); -#endif -#ifndef isinf -extern "C" int isinf(double); -#endif - -typedef unsigned long long u64; -typedef unsigned long u32; - - - -#define LPHASOR (8*sizeof(u32)) // the phasor logsize -#define VOICES 8 // the number of waveform voices -#define LLENGTH 6 // the loglength of a fractional delayed basic waveform -#define LOVERSAMPLE 6 // the log of the oversampling factor (nb of fract delayed waveforms) -#define LPAD 1 // the log of the time padding factor (to reduce time aliasing) -#define LTABLE (LLENGTH+LOVERSAMPLE) -#define N (1< 1 = rect) -#define CUTOFF 0.8f // fraction of nyquist for impulse cutoff -#define NBPERIODS ((float)(L) * CUTOFF / 2.0f) - -/* sample buffers */ -static float bli[N]; // band limited impulse -static float bls[N]; // band limited step -static float blr[N]; // band limited ramp - - -typedef struct bloscctl -{ - t_int c_index[VOICES]; // array of indices in sample table - t_float c_frac[VOICES]; // array of fractional indices - t_float c_vscale[VOICES]; // array of scale factors - t_int c_next_voice; // next voice to steal (round robin) - u32 c_phase; // phase of main oscillator - u32 c_phase2; // phase of secondairy oscillator - t_float c_state; // state of the square wave - t_float c_prev_amp; // previous input of comparator - t_float c_phase_inc_scale; - t_float c_scale; - t_float c_scale_update; - DSPIfilterSeries* c_butter; // the series filter - t_symbol *c_waveform; - -} t_bloscctl; - -typedef struct blosc -{ - t_object x_obj; - t_float x_f; - t_bloscctl x_ctl; -} t_blosc; - - -/* phase converters */ -static inline float _phase_to_float(u32 p){return ((float)p) * (1.0f / 4294967296.0f);} -static inline u32 _float_to_phase(float f){return ((u32)(f * 4294967296.0f)) & ~(S-1);} - - -/* flat table: better for linear interpolation */ -static inline float _play_voice_lint(float *table, t_int *index, float frac, float scale) -{ - t_int i = *index; - - /* perform linear interpolation */ - float f = (((1.0f - frac) * table[i]) + (table[i+1] * frac)) * scale; - - /* increment phase index if next 2 elements will still be inside table - if not there's no increment and the voice will keep playing the same sample */ - - i += (((i+S+1) >> LTABLE) ^ 1) << LOVERSAMPLE; - - *index = i; - return f; -} - -/* get one sample from the bandlimited discontinuity wavetable playback syth */ -static inline t_float _get_bandlimited_discontinuity(t_bloscctl *ctl, float *table) -{ - float sum = 0.0f; - int i; - /* sum all voices */ - for (i=0; ic_index+i, ctl->c_frac[i], ctl->c_vscale[i]); - } - - return sum; -} - - -/* update waveplayers on zero cross */ -static void _bang_comparator(t_bloscctl *ctl, float prev, float curr) -{ - - /* check for sign change */ - if ((prev * curr) < 0.0f){ - - int voice; - - /* determine the location of the discontinuity (in oversampled coordiates - using linear interpolation */ - - float f = (float)S * curr / (curr - prev); - - /* get the offset in the oversample table */ - - u32 table_index = (u32)f; - - /* determine the fractional part (in oversampled coordinates) - for linear interpolation */ - - float table_frac_index = f - (float)table_index; - - /* set state (+ or -) */ - - ctl->c_state = (curr > 0.0f) ? 0.5f : -0.5f; - - /* steal the oldest voice */ - - voice = ctl->c_next_voice++; - ctl->c_next_voice &= VOICES-1; - - /* initialize the new voice index and interpolation fraction */ - - ctl->c_index[voice] = table_index; - ctl->c_frac[voice] = table_frac_index; - ctl->c_vscale[voice] = -ctl->c_scale * 2.0f * ctl->c_state; - - } - -} - - -/* advance phasor and update waveplayers on phase wrap */ -static void _bang_phasor(t_bloscctl *ctl, float freq) -{ - u32 phase = ctl->c_phase; - u32 phase_inc; - u32 oldphase; - int voice; - float scale = ctl->c_scale; - - /* get increment */ - float inc = freq * ctl->c_phase_inc_scale; - - /* calculate new phase - the increment (and the phase) should be a multiple of S */ - if (inc < 0.0f) inc = -inc; - phase_inc = ((u32)inc) & ~(S-1); - oldphase = phase; - phase += phase_inc; - - - /* check for phase wrap */ - if (phase < oldphase){ - u32 phase_inc_decimated = phase_inc >> LOVERSAMPLE; - u32 table_index; - u32 table_phase; - - /* steal the oldest voice if we have a phase wrap */ - - voice = ctl->c_next_voice++; - ctl->c_next_voice &= VOICES-1; - - /* determine the location of the discontinuity (in oversampled coordinates) - which is S * (new phase) / (increment) */ - - table_index = phase / phase_inc_decimated; - - /* determine the fractional part (in oversampled coordinates) - for linear interpolation */ - - table_phase = phase - (table_index * phase_inc_decimated); - - /* use it to initialize the new voice index and interpolation fraction */ - - ctl->c_index[voice] = table_index; - ctl->c_frac[voice] = (float)table_phase / (float)phase_inc_decimated; - ctl->c_vscale[voice] = scale; - scale = scale * ctl->c_scale_update; - - } - - /* save state */ - ctl->c_phase = phase; - ctl->c_scale = scale; -} - - -/* the 2 oscillator version: - the second osc can reset the first osc's phase (hence it determines the pitch) - the first osc determines the waveform */ - -static void _bang_hardsync_phasor(t_bloscctl *ctl, float freq, float freq2) -{ - u32 phase = ctl->c_phase; - u32 phase2 = ctl->c_phase2; - u32 phase_inc; - u32 phase_inc2; - u32 oldphase; - u32 oldphase2; - int voice; - float scale = ctl->c_scale; - - - /* get increment */ - float inc = freq * ctl->c_phase_inc_scale; - float inc2 = freq2 * ctl->c_phase_inc_scale; - - /* calculate new phases - the increment (and the phase) should be a multiple of S */ - - /* save previous phases */ - oldphase = phase; - oldphase2 = phase2; - - /* update second osc */ - if (inc2 < 0.0f) inc2 = -inc2; - phase_inc2 = ((u32)inc2) & ~(S-1); - phase2 += phase_inc2; - - /* update first osc (freq should be >= freq of sync osc */ - if (inc < 0.0f) inc = -inc; - phase_inc = ((u32)inc) & ~(S-1); - if (phase_inc < phase_inc2) phase_inc = phase_inc2; - phase += phase_inc; - - - /* check for sync discontinuity (osc 2) */ - if (phase2 < oldphase2) { - - /* adjust phase depending on the location of the discontinuity in phase2: - phase/phase_inc == phase2/phase_inc2 */ - - u64 pi = phase_inc >> LOVERSAMPLE; - u64 pi2 = phase_inc2 >> LOVERSAMPLE; - u64 lphase = ((u64)phase2 * pi) / pi2; - phase = lphase & ~(S-1); - } - - - /* check for phase discontinuity (osc 1) */ - if (phase < oldphase){ - u32 phase_inc_decimated = phase_inc >> LOVERSAMPLE; - u32 table_index; - u32 table_phase; - float stepsize; - - /* steal the oldest voice if we have a phase wrap */ - - voice = ctl->c_next_voice++; - ctl->c_next_voice &= VOICES-1; - - /* determine the location of the discontinuity (in oversampled coordinates) - which is S * (new phase) / (increment) */ - - table_index = phase / phase_inc_decimated; - - /* determine the fractional part (in oversampled coordinates) - for linear interpolation */ - - table_phase = phase - (table_index * phase_inc_decimated); - - /* determine the step size - as opposed to saw/impulse waveforms, the step is not always equal to one. it is: - oldphase - phase + phase_inc - but for the unit step this will overflow to zero, so we - reduce the bit depth to prevent overflow */ - - stepsize = _phase_to_float(((oldphase-phase) >> LOVERSAMPLE) - + phase_inc_decimated) * (float)S; - - /* use it to initialize the new voice index and interpolation fraction */ - - ctl->c_index[voice] = table_index; - ctl->c_frac[voice] = (float)table_phase / (float)phase_inc_decimated; - ctl->c_vscale[voice] = scale * stepsize; - scale = scale * ctl->c_scale_update; - - } - - /* save state */ - ctl->c_phase = phase; - ctl->c_phase2 = phase2; - ctl->c_scale = scale; -} - - -static t_int *blosc_perform_hardsync_saw(t_int *w) -{ - t_float *freq = (float *)(w[3]); - t_float *freq2 = (float *)(w[4]); - t_float *out = (float *)(w[5]); - t_bloscctl *ctl = (t_bloscctl *)(w[1]); - t_int n = (t_int)(w[2]); - t_int i; - - /* set postfilter cutoff */ - ctl->c_butter->setButterHP(0.85f * (*freq / sys_getsr())); - - while (n--) { - float frequency = *freq++; - float frequency2 = *freq2++; - - /* get the bandlimited discontinuity */ - float sample = _get_bandlimited_discontinuity(ctl, bls); - - /* add aliased sawtooth wave */ - sample += _phase_to_float(ctl->c_phase) - 0.5f; - - /* highpass filter output to remove DC offset and low frequency aliasing */ - ctl->c_butter->BangSmooth(sample, sample, 0.05f); - - /* send to output */ - *out++ = sample; - - /* advance phasor */ - _bang_hardsync_phasor(ctl, frequency2, frequency); - - } - - return (w+6); -} - -static t_int *blosc_perform_saw(t_int *w) -{ - t_float *freq = (float *)(w[3]); - t_float *out = (float *)(w[4]); - t_bloscctl *ctl = (t_bloscctl *)(w[1]); - t_int n = (t_int)(w[2]); - t_int i; - - while (n--) { - float frequency = *freq++; - - /* get the bandlimited discontinuity */ - float sample = _get_bandlimited_discontinuity(ctl, bls); - - /* add aliased sawtooth wave */ - sample += _phase_to_float(ctl->c_phase) - 0.5f; - - /* send to output */ - *out++ = sample; - - /* advance phasor */ - _bang_phasor(ctl, frequency); - - } - - return (w+5); -} - - - -static t_int *blosc_perform_pulse(t_int *w) -{ - t_float *freq = (float *)(w[3]); - t_float *out = (float *)(w[4]); - t_bloscctl *ctl = (t_bloscctl *)(w[1]); - t_int n = (t_int)(w[2]); - t_int i; - - - /* set postfilter cutoff */ - ctl->c_butter->setButterHP(0.85f * (*freq / sys_getsr())); - - while (n--) { - float frequency = *freq++; - - /* get the bandlimited discontinuity */ - float sample = _get_bandlimited_discontinuity(ctl, bli); - - /* highpass filter output to remove DC offset and low frequency aliasing */ - ctl->c_butter->BangSmooth(sample, sample, 0.05f); - - /* send to output */ - *out++ = sample; - - /* advance phasor */ - _bang_phasor(ctl, frequency); - - } - - return (w+5); -} - -static t_int *blosc_perform_comparator(t_int *w) -{ - t_float *amp = (float *)(w[3]); - t_float *out = (float *)(w[4]); - t_bloscctl *ctl = (t_bloscctl *)(w[1]); - t_int n = (t_int)(w[2]); - t_int i; - t_float prev_amp = ctl->c_prev_amp; - - while (n--) { - float curr_amp = *amp++; - - /* exact zero won't work for zero detection (sic) */ - if (curr_amp == 0.0f) curr_amp = 0.0000001f; - - /* get the bandlimited discontinuity */ - float sample = _get_bandlimited_discontinuity(ctl, bls); - - /* add the block wave state */ - sample += ctl->c_state; - - /* send to output */ - *out++ = sample; - - /* advance phasor */ - _bang_comparator(ctl, prev_amp, curr_amp); - - prev_amp = curr_amp; - - } - - ctl->c_prev_amp = prev_amp; - - return (w+5); -} - -static void blosc_phase(t_blosc *x, t_float f) -{ - x->x_ctl.c_phase = _float_to_phase(f); - x->x_ctl.c_phase2 = _float_to_phase(f); -} - -static void blosc_phase1(t_blosc *x, t_float f) -{ - x->x_ctl.c_phase = _float_to_phase(f); -} - -static void blosc_phase2(t_blosc *x, t_float f) -{ - x->x_ctl.c_phase2 = _float_to_phase(f); -} - -static void blosc_dsp(t_blosc *x, t_signal **sp) -{ - int n = sp[0]->s_n; - - /* set sampling rate scaling for phasors */ - x->x_ctl.c_phase_inc_scale = 4.0f * (float)(1<<(LPHASOR-2)) / sys_getsr(); - - - /* setup & register the correct process routine depending on the waveform */ - - /* 2 osc */ - if (x->x_ctl.c_waveform == gensym("syncsaw")){ - x->x_ctl.c_scale = 1.0f; - x->x_ctl.c_scale_update = 1.0f; - dsp_add(blosc_perform_hardsync_saw, 5, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec); - } - - /* 1 osc */ - else if (x->x_ctl.c_waveform == gensym("pulse")){ - x->x_ctl.c_scale = 1.0f; - x->x_ctl.c_scale_update = 1.0f; - dsp_add(blosc_perform_pulse, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); - } - else if (x->x_ctl.c_waveform == gensym("pulse2")){ - x->x_ctl.c_phase_inc_scale *= 2; - x->x_ctl.c_scale = 1.0f; - x->x_ctl.c_scale_update = -1.0f; - dsp_add(blosc_perform_pulse, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); - } - else if (x->x_ctl.c_waveform == gensym("comparator")){ - x->x_ctl.c_scale = 1.0f; - x->x_ctl.c_scale_update = 1.0f; - dsp_add(blosc_perform_comparator, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); - } - else{ - x->x_ctl.c_scale = 1.0f; - x->x_ctl.c_scale_update = 1.0f; - dsp_add(blosc_perform_saw, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); - } - - - -} -static void blosc_free(t_blosc *x) -{ - delete x->x_ctl.c_butter; -} - -t_class *blosc_class; - -static void *blosc_new(t_symbol *s) -{ - t_blosc *x = (t_blosc *)pd_new(blosc_class); - int i; - - /* out 1 */ - outlet_new(&x->x_obj, gensym("signal")); - - /* optional signal inlets */ - if (s == gensym("syncsaw")){ - inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); - } - - /* optional phase inlet */ - if (s != gensym("comparator")){ - inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("phase")); - } - - /* create the postfilter */ - x->x_ctl.c_butter = new DSPIfilterSeries(3); - - /* init oscillators */ - for (i=0; ix_ctl.c_index[i] = N-2; - x->x_ctl.c_frac[i] = 0.0f; - } - - /* init rest of state data */ - blosc_phase(x, 0); - blosc_phase2(x, 0); - x->x_ctl.c_state = 0.0; - x->x_ctl.c_prev_amp = 0.0; - x->x_ctl.c_next_voice = 0; - x->x_ctl.c_scale = 1.0f; - x->x_ctl.c_scale_update = 1.0f; - x->x_ctl.c_waveform = s; - - return (void *)x; -} - - - - - - - -/* CLASS DATA INIT (tables) */ - - -/* some vector ops */ - -/* clear a buffer */ -static inline void _clear(float *array, int size) -{ - memset(array, 0, sizeof(float)*size); -} - -/* compute complex log */ -static inline void _clog(float *real, float *imag, int size) -{ - int k; - for (k=0; k pi, -pi -> 0] */ -static inline float _i2theta(int i, int size){ - float p = 2.0f * M_PI * (float)i / (float)size; - if (p >= M_PI) p -= 2.0f * M_PI; - return p; -} - - -/* print matlab array */ -static void _printm(float *array, char *name, int size) -{ - int i; - fprintf(stderr, "%s = [", name); - for (i=0; i=N (time padding to reduce time aliasing) */ - - /* we work in the complex domain to eliminate the need to avoid - negative spectral components */ - - float real[M]; - float imag[M]; - float sum,scale; - int i,j; - - - /* create windowed sinc */ - _clear(imag, M); - real[0] = 1.0f; - for (i=1; iM-1] - and work with the first N samples */ - - /* normalize impulse (integral = 1) */ - sum = 0.0f; - for (i=0; i0 */ - sum = 0.0f; - for (i=0; i +#include +#include +#include + + +#include "DSPIcomplex.h" +#include "DSPIfilters.h" + +typedef unsigned long long u64; +typedef unsigned long u32; + + + +#define LPHASOR (8*sizeof(u32)) // the phasor logsize +#define VOICES 8 // the number of waveform voices +#define LLENGTH 6 // the loglength of a fractional delayed basic waveform +#define LOVERSAMPLE 6 // the log of the oversampling factor (nb of fract delayed waveforms) +#define LPAD 1 // the log of the time padding factor (to reduce time aliasing) +#define LTABLE (LLENGTH+LOVERSAMPLE) +#define N (1< 1 = rect) +#define CUTOFF 0.8f // fraction of nyquist for impulse cutoff +#define NBPERIODS ((float)(L) * CUTOFF / 2.0f) + +/* sample buffers */ +static float bli[N]; // band limited impulse +static float bls[N]; // band limited step +static float blr[N]; // band limited ramp + + +typedef struct bloscctl +{ + t_int c_index[VOICES]; // array of indices in sample table + t_float c_frac[VOICES]; // array of fractional indices + t_float c_vscale[VOICES]; // array of scale factors + t_int c_next_voice; // next voice to steal (round robin) + u32 c_phase; // phase of main oscillator + u32 c_phase2; // phase of secondairy oscillator + t_float c_state; // state of the square wave + t_float c_prev_amp; // previous input of comparator + t_float c_phase_inc_scale; + t_float c_scale; + t_float c_scale_update; + DSPIfilterSeries* c_butter; // the series filter + t_symbol *c_waveform; + +} t_bloscctl; + +typedef struct blosc +{ + t_object x_obj; + t_float x_f; + t_bloscctl x_ctl; +} t_blosc; + + +/* phase converters */ +static inline float _phase_to_float(u32 p){return ((float)p) * (1.0f / 4294967296.0f);} +static inline u32 _float_to_phase(float f){return ((u32)(f * 4294967296.0f)) & ~(S-1);} + + +/* flat table: better for linear interpolation */ +static inline float _play_voice_lint(float *table, t_int *index, float frac, float scale) +{ + int i = *index; + + /* perform linear interpolation */ + float f = (((1.0f - frac) * table[i]) + (table[i+1] * frac)) * scale; + + /* increment phase index if next 2 elements will still be inside table + if not there's no increment and the voice will keep playing the same sample */ + + i += (((i+S+1) >> LTABLE) ^ 1) << LOVERSAMPLE; + + *index = i; + return f; +} + +/* get one sample from the bandlimited discontinuity wavetable playback syth */ +static inline t_float _get_bandlimited_discontinuity(t_bloscctl *ctl, float *table) +{ + float sum = 0.0f; + int i; + /* sum all voices */ + for (i=0; ic_index+i, ctl->c_frac[i], ctl->c_vscale[i]); + } + + return sum; +} + + +/* update waveplayers on zero cross */ +static void _bang_comparator(t_bloscctl *ctl, float prev, float curr) +{ + + /* check for sign change */ + if ((prev * curr) < 0.0f){ + + int voice; + + /* determine the location of the discontinuity (in oversampled coordiates + using linear interpolation */ + + float f = (float)S * curr / (curr - prev); + + /* get the offset in the oversample table */ + + u32 table_index = (u32)f; + + /* determine the fractional part (in oversampled coordinates) + for linear interpolation */ + + float table_frac_index = f - (float)table_index; + + /* set state (+ or -) */ + + ctl->c_state = (curr > 0.0f) ? 0.5f : -0.5f; + + /* steal the oldest voice */ + + voice = ctl->c_next_voice++; + ctl->c_next_voice &= VOICES-1; + + /* initialize the new voice index and interpolation fraction */ + + ctl->c_index[voice] = table_index; + ctl->c_frac[voice] = table_frac_index; + ctl->c_vscale[voice] = -ctl->c_scale * 2.0f * ctl->c_state; + + } + +} + + +/* advance phasor and update waveplayers on phase wrap */ +static void _bang_phasor(t_bloscctl *ctl, float freq) +{ + u32 phase = ctl->c_phase; + u32 phase_inc; + u32 oldphase; + int voice; + float scale = ctl->c_scale; + + /* get increment */ + float inc = freq * ctl->c_phase_inc_scale; + + /* calculate new phase + the increment (and the phase) should be a multiple of S */ + if (inc < 0.0f) inc = -inc; + phase_inc = ((u32)inc) & ~(S-1); + oldphase = phase; + phase += phase_inc; + + + /* check for phase wrap */ + if (phase < oldphase){ + u32 phase_inc_decimated = phase_inc >> LOVERSAMPLE; + u32 table_index; + u32 table_phase; + + /* steal the oldest voice if we have a phase wrap */ + + voice = ctl->c_next_voice++; + ctl->c_next_voice &= VOICES-1; + + /* determine the location of the discontinuity (in oversampled coordinates) + which is S * (new phase) / (increment) */ + + table_index = phase / phase_inc_decimated; + + /* determine the fractional part (in oversampled coordinates) + for linear interpolation */ + + table_phase = phase - (table_index * phase_inc_decimated); + + /* use it to initialize the new voice index and interpolation fraction */ + + ctl->c_index[voice] = table_index; + ctl->c_frac[voice] = (float)table_phase / (float)phase_inc_decimated; + ctl->c_vscale[voice] = scale; + scale = scale * ctl->c_scale_update; + + } + + /* save state */ + ctl->c_phase = phase; + ctl->c_scale = scale; +} + + +/* the 2 oscillator version: + the second osc can reset the first osc's phase (hence it determines the pitch) + the first osc determines the waveform */ + +static void _bang_hardsync_phasor(t_bloscctl *ctl, float freq, float freq2) +{ + u32 phase = ctl->c_phase; + u32 phase2 = ctl->c_phase2; + u32 phase_inc; + u32 phase_inc2; + u32 oldphase; + u32 oldphase2; + int voice; + float scale = ctl->c_scale; + + + /* get increment */ + float inc = freq * ctl->c_phase_inc_scale; + float inc2 = freq2 * ctl->c_phase_inc_scale; + + /* calculate new phases + the increment (and the phase) should be a multiple of S */ + + /* save previous phases */ + oldphase = phase; + oldphase2 = phase2; + + /* update second osc */ + if (inc2 < 0.0f) inc2 = -inc2; + phase_inc2 = ((u32)inc2) & ~(S-1); + phase2 += phase_inc2; + + /* update first osc (freq should be >= freq of sync osc */ + if (inc < 0.0f) inc = -inc; + phase_inc = ((u32)inc) & ~(S-1); + if (phase_inc < phase_inc2) phase_inc = phase_inc2; + phase += phase_inc; + + + /* check for sync discontinuity (osc 2) */ + if (phase2 < oldphase2) { + + /* adjust phase depending on the location of the discontinuity in phase2: + phase/phase_inc == phase2/phase_inc2 */ + + u64 pi = phase_inc >> LOVERSAMPLE; + u64 pi2 = phase_inc2 >> LOVERSAMPLE; + u64 lphase = ((u64)phase2 * pi) / pi2; + phase = lphase & ~(S-1); + } + + + /* check for phase discontinuity (osc 1) */ + if (phase < oldphase){ + u32 phase_inc_decimated = phase_inc >> LOVERSAMPLE; + u32 table_index; + u32 table_phase; + float stepsize; + + /* steal the oldest voice if we have a phase wrap */ + + voice = ctl->c_next_voice++; + ctl->c_next_voice &= VOICES-1; + + /* determine the location of the discontinuity (in oversampled coordinates) + which is S * (new phase) / (increment) */ + + table_index = phase / phase_inc_decimated; + + /* determine the fractional part (in oversampled coordinates) + for linear interpolation */ + + table_phase = phase - (table_index * phase_inc_decimated); + + /* determine the step size + as opposed to saw/impulse waveforms, the step is not always equal to one. it is: + oldphase - phase + phase_inc + but for the unit step this will overflow to zero, so we + reduce the bit depth to prevent overflow */ + + stepsize = _phase_to_float(((oldphase-phase) >> LOVERSAMPLE) + + phase_inc_decimated) * (float)S; + + /* use it to initialize the new voice index and interpolation fraction */ + + ctl->c_index[voice] = table_index; + ctl->c_frac[voice] = (float)table_phase / (float)phase_inc_decimated; + ctl->c_vscale[voice] = scale * stepsize; + scale = scale * ctl->c_scale_update; + + } + + /* save state */ + ctl->c_phase = phase; + ctl->c_phase2 = phase2; + ctl->c_scale = scale; +} + + +static t_int *blosc_perform_hardsync_saw(t_int *w) +{ + t_float *freq = (float *)(w[3]); + t_float *freq2 = (float *)(w[4]); + t_float *out = (float *)(w[5]); + t_bloscctl *ctl = (t_bloscctl *)(w[1]); + t_int n = (t_int)(w[2]); + t_int i; + + /* set postfilter cutoff */ + ctl->c_butter->setButterHP(0.85f * (*freq / sys_getsr())); + + while (n--) { + float frequency = *freq++; + float frequency2 = *freq2++; + + /* get the bandlimited discontinuity */ + float sample = _get_bandlimited_discontinuity(ctl, bls); + + /* add aliased sawtooth wave */ + sample += _phase_to_float(ctl->c_phase) - 0.5f; + + /* highpass filter output to remove DC offset and low frequency aliasing */ + ctl->c_butter->BangSmooth(sample, sample, 0.05f); + + /* send to output */ + *out++ = sample; + + /* advance phasor */ + _bang_hardsync_phasor(ctl, frequency2, frequency); + + } + + return (w+6); +} + +static t_int *blosc_perform_saw(t_int *w) +{ + t_float *freq = (float *)(w[3]); + t_float *out = (float *)(w[4]); + t_bloscctl *ctl = (t_bloscctl *)(w[1]); + t_int n = (t_int)(w[2]); + t_int i; + + while (n--) { + float frequency = *freq++; + + /* get the bandlimited discontinuity */ + float sample = _get_bandlimited_discontinuity(ctl, bls); + + /* add aliased sawtooth wave */ + sample += _phase_to_float(ctl->c_phase) - 0.5f; + + /* send to output */ + *out++ = sample; + + /* advance phasor */ + _bang_phasor(ctl, frequency); + + } + + return (w+5); +} + + + +static t_int *blosc_perform_pulse(t_int *w) +{ + t_float *freq = (float *)(w[3]); + t_float *out = (float *)(w[4]); + t_bloscctl *ctl = (t_bloscctl *)(w[1]); + t_int n = (t_int)(w[2]); + t_int i; + + + /* set postfilter cutoff */ + ctl->c_butter->setButterHP(0.85f * (*freq / sys_getsr())); + + while (n--) { + float frequency = *freq++; + + /* get the bandlimited discontinuity */ + float sample = _get_bandlimited_discontinuity(ctl, bli); + + /* highpass filter output to remove DC offset and low frequency aliasing */ + ctl->c_butter->BangSmooth(sample, sample, 0.05f); + + /* send to output */ + *out++ = sample; + + /* advance phasor */ + _bang_phasor(ctl, frequency); + + } + + return (w+5); +} + +static t_int *blosc_perform_comparator(t_int *w) +{ + t_float *amp = (float *)(w[3]); + t_float *out = (float *)(w[4]); + t_bloscctl *ctl = (t_bloscctl *)(w[1]); + t_int n = (t_int)(w[2]); + t_int i; + t_float prev_amp = ctl->c_prev_amp; + + while (n--) { + float curr_amp = *amp++; + + /* exact zero won't work for zero detection (sic) */ + if (curr_amp == 0.0f) curr_amp = 0.0000001f; + + /* get the bandlimited discontinuity */ + float sample = _get_bandlimited_discontinuity(ctl, bls); + + /* add the block wave state */ + sample += ctl->c_state; + + /* send to output */ + *out++ = sample; + + /* advance phasor */ + _bang_comparator(ctl, prev_amp, curr_amp); + + prev_amp = curr_amp; + + } + + ctl->c_prev_amp = prev_amp; + + return (w+5); +} + +static void blosc_phase(t_blosc *x, t_float f) +{ + x->x_ctl.c_phase = _float_to_phase(f); + x->x_ctl.c_phase2 = _float_to_phase(f); +} + +static void blosc_phase1(t_blosc *x, t_float f) +{ + x->x_ctl.c_phase = _float_to_phase(f); +} + +static void blosc_phase2(t_blosc *x, t_float f) +{ + x->x_ctl.c_phase2 = _float_to_phase(f); +} + +static void blosc_dsp(t_blosc *x, t_signal **sp) +{ + int n = sp[0]->s_n; + + /* set sampling rate scaling for phasors */ + x->x_ctl.c_phase_inc_scale = 4.0f * (float)(1<<(LPHASOR-2)) / sys_getsr(); + + + /* setup & register the correct process routine depending on the waveform */ + + /* 2 osc */ + if (x->x_ctl.c_waveform == gensym("syncsaw")){ + x->x_ctl.c_scale = 1.0f; + x->x_ctl.c_scale_update = 1.0f; + dsp_add(blosc_perform_hardsync_saw, 5, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec); + } + + /* 1 osc */ + else if (x->x_ctl.c_waveform == gensym("pulse")){ + x->x_ctl.c_scale = 1.0f; + x->x_ctl.c_scale_update = 1.0f; + dsp_add(blosc_perform_pulse, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); + } + else if (x->x_ctl.c_waveform == gensym("pulse2")){ + x->x_ctl.c_phase_inc_scale *= 2; + x->x_ctl.c_scale = 1.0f; + x->x_ctl.c_scale_update = -1.0f; + dsp_add(blosc_perform_pulse, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); + } + else if (x->x_ctl.c_waveform == gensym("comparator")){ + x->x_ctl.c_scale = 1.0f; + x->x_ctl.c_scale_update = 1.0f; + dsp_add(blosc_perform_comparator, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); + } + else{ + x->x_ctl.c_scale = 1.0f; + x->x_ctl.c_scale_update = 1.0f; + dsp_add(blosc_perform_saw, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); + } + + + +} +static void blosc_free(t_blosc *x) +{ + delete x->x_ctl.c_butter; +} + +t_class *blosc_class; + +static void *blosc_new(t_symbol *s) +{ + t_blosc *x = (t_blosc *)pd_new(blosc_class); + int i; + + /* out 1 */ + outlet_new(&x->x_obj, gensym("signal")); + + /* optional signal inlets */ + if (s == gensym("syncsaw")){ + inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("signal"), gensym("signal")); + } + + /* optional phase inlet */ + if (s != gensym("comparator")){ + inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("phase")); + } + + /* create the postfilter */ + x->x_ctl.c_butter = new DSPIfilterSeries(3); + + /* init oscillators */ + for (i=0; ix_ctl.c_index[i] = N-2; + x->x_ctl.c_frac[i] = 0.0f; + } + + /* init rest of state data */ + blosc_phase(x, 0); + blosc_phase2(x, 0); + x->x_ctl.c_state = 0.0; + x->x_ctl.c_prev_amp = 0.0; + x->x_ctl.c_next_voice = 0; + x->x_ctl.c_scale = 1.0f; + x->x_ctl.c_scale_update = 1.0f; + x->x_ctl.c_waveform = s; + + return (void *)x; +} + + + + + + + +/* CLASS DATA INIT (tables) */ + + +/* some vector ops */ + +/* clear a buffer */ +static inline void _clear(float *array, int size) +{ + memset(array, 0, sizeof(float)*size); +} + +/* compute complex log */ +static inline void _clog(float *real, float *imag, int size) +{ + int k; + for (k=0; k pi, -pi -> 0] */ +static inline float _i2theta(int i, int size){ + float p = 2.0f * M_PI * (float)i / (float)size; + if (p >= M_PI) p -= 2.0f * M_PI; + return p; +} + + +/* print matlab array */ +static void _printm(float *array, char *name, int size) +{ + int i; + fprintf(stderr, "%s = [", name); + for (i=0; i=N (time padding to reduce time aliasing) */ + + /* we work in the complex domain to eliminate the need to avoid + negative spectral components */ + + float real[M]; + float imag[M]; + float sum,scale; + int i,j; + + + /* create windowed sinc */ + _clear(imag, M); + real[0] = 1.0f; + for (i=1; iM-1] + and work with the first N samples */ + + /* normalize impulse (integral = 1) */ + sum = 0.0f; + for (i=0; i0 */ + sum = 0.0f; + for (i=0; i - -#include "DSPIcomplex.h" -#include "DSPIfilters.h" - - - -typedef struct filterortho_struct -{ - t_object x_obj; - t_float x_f; - DSPIfilterOrtho *filterortho; -} t_filterortho; - -void filterortho_bang(t_filterortho *x) -{ - -} - - -static t_int *filterortho_perform(t_int *w) -{ - - - t_float *in = (float *)(w[3]); - t_float *out = (float *)(w[4]); - DSPIfilterOrtho* filterortho = (DSPIfilterOrtho *)(w[1]); - t_int n = (t_int)(w[2]); - t_int i; - t_float x; - - - // dit kan beter - float smooth = 1.0f - pow(.05f,1.0f/(float)(n)); - - for (i = 0; i < n; i++) - { - x = *in++; - filterortho->BangSmooth(x, x, smooth); - *out++ = x; - } - - filterortho->killDenormals(); - - return (w+5); -} - -static void filterortho_dsp(t_filterortho *x, t_signal **sp) -{ - dsp_add(filterortho_perform, 4, x->filterortho, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); - -} -void filterortho_free(t_filterortho *x) -{ - delete x->filterortho; - -} - -t_class *filterortho_class; - - - -void setLP(t_filterortho *x, t_floatarg f, t_floatarg Q) {x->filterortho->setLP(f / sys_getsr(), Q);} -void setHP(t_filterortho *x, t_floatarg f, t_floatarg Q) {x->filterortho->setHP(f / sys_getsr(), Q);} -void setBP(t_filterortho *x, t_floatarg f, t_floatarg Q) {x->filterortho->setBP(f / sys_getsr(), Q);} -void setBR(t_filterortho *x, t_floatarg f, t_floatarg Q) {x->filterortho->setBR(f / sys_getsr(), Q);} -void setAP(t_filterortho *x, t_floatarg f, t_floatarg Q) {x->filterortho->setAP(f / sys_getsr(), Q);} - -void setLS(t_filterortho *x, t_floatarg f, t_floatarg A) {x->filterortho->setLS(f / sys_getsr(), A);} -void setHS(t_filterortho *x, t_floatarg f, t_floatarg A) {x->filterortho->setHS(f / sys_getsr(), A);} - -void setEQ(t_filterortho *x, t_floatarg f, t_floatarg Q, t_floatarg A) {x->filterortho->setEQ(f / sys_getsr(), Q, A);} - - -void *filterortho_new() -{ - t_filterortho *x = (t_filterortho *)pd_new(filterortho_class); - x->filterortho = new DSPIfilterOrtho(); - outlet_new(&x->x_obj, gensym("signal")); - setLP(x, 10000, 2); - return (void *)x; -} - - - -extern "C" { - -void filterortho_tilde_setup(void) -{ - //post("filterortho~ v0.1"); - filterortho_class = class_new(gensym("filterortho~"), (t_newmethod)filterortho_new, - (t_method)filterortho_free, sizeof(t_filterortho), 0, A_NULL); - - CLASS_MAINSIGNALIN(filterortho_class, t_filterortho, x_f); - - - class_addmethod(filterortho_class, (t_method)filterortho_bang, gensym("bang"), A_NULL); - - class_addmethod(filterortho_class, (t_method)filterortho_dsp, gensym("dsp"), A_NULL); - - class_addmethod(filterortho_class, (t_method)setLP, gensym("setLP"), A_FLOAT, A_FLOAT, A_NULL); - class_addmethod(filterortho_class, (t_method)setHP, gensym("setHP"), A_FLOAT, A_FLOAT, A_NULL); - class_addmethod(filterortho_class, (t_method)setBP, gensym("setBP"), A_FLOAT, A_FLOAT, A_NULL); - class_addmethod(filterortho_class, (t_method)setBR, gensym("setBR"), A_FLOAT, A_FLOAT, A_NULL); - class_addmethod(filterortho_class, (t_method)setAP, gensym("setAP"), A_FLOAT, A_FLOAT, A_NULL); - class_addmethod(filterortho_class, (t_method)setLS, gensym("setLS"), A_FLOAT, A_FLOAT, A_NULL); - class_addmethod(filterortho_class, (t_method)setHS, gensym("setHS"), A_FLOAT, A_FLOAT, A_NULL); - class_addmethod(filterortho_class, (t_method)setEQ, gensym("setEQ"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL); - -} - -} diff --git a/modules++/filterortho~.cc b/modules++/filterortho~.cc new file mode 100644 index 0000000..c80552b --- /dev/null +++ b/modules++/filterortho~.cc @@ -0,0 +1,133 @@ +/* + * filterortho.cc - orthogonal biquad filter pd interface + * Copyright (c) 2000-2003 by Tom Schouten + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + +#include "m_pd.h" +#include + +#include "DSPIcomplex.h" +#include "DSPIfilters.h" + + + +typedef struct filterortho_struct +{ + t_object x_obj; + t_float x_f; + DSPIfilterOrtho *filterortho; +} t_filterortho; + +void filterortho_bang(t_filterortho *x) +{ + +} + + +static t_int *filterortho_perform(t_int *w) +{ + + + t_float *in = (float *)(w[3]); + t_float *out = (float *)(w[4]); + DSPIfilterOrtho* filterortho = (DSPIfilterOrtho *)(w[1]); + t_int n = (t_int)(w[2]); + t_int i; + t_float x; + + + // dit kan beter + float smooth = 1.0f - pow(.05f,1.0f/(float)(n)); + + for (i = 0; i < n; i++) + { + x = *in++; + filterortho->BangSmooth(x, x, smooth); + *out++ = x; + } + + filterortho->killDenormals(); + + return (w+5); +} + +static void filterortho_dsp(t_filterortho *x, t_signal **sp) +{ + dsp_add(filterortho_perform, 4, x->filterortho, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); + +} +void filterortho_free(t_filterortho *x) +{ + delete x->filterortho; + +} + +t_class *filterortho_class; + + + +void setLP(t_filterortho *x, t_floatarg f, t_floatarg Q) {x->filterortho->setLP(f / sys_getsr(), Q);} +void setHP(t_filterortho *x, t_floatarg f, t_floatarg Q) {x->filterortho->setHP(f / sys_getsr(), Q);} +void setBP(t_filterortho *x, t_floatarg f, t_floatarg Q) {x->filterortho->setBP(f / sys_getsr(), Q);} +void setBR(t_filterortho *x, t_floatarg f, t_floatarg Q) {x->filterortho->setBR(f / sys_getsr(), Q);} +void setAP(t_filterortho *x, t_floatarg f, t_floatarg Q) {x->filterortho->setAP(f / sys_getsr(), Q);} + +void setLS(t_filterortho *x, t_floatarg f, t_floatarg A) {x->filterortho->setLS(f / sys_getsr(), A);} +void setHS(t_filterortho *x, t_floatarg f, t_floatarg A) {x->filterortho->setHS(f / sys_getsr(), A);} + +void setEQ(t_filterortho *x, t_floatarg f, t_floatarg Q, t_floatarg A) {x->filterortho->setEQ(f / sys_getsr(), Q, A);} + + +void *filterortho_new() +{ + t_filterortho *x = (t_filterortho *)pd_new(filterortho_class); + x->filterortho = new DSPIfilterOrtho(); + outlet_new(&x->x_obj, gensym("signal")); + setLP(x, 10000, 2); + return (void *)x; +} + + + +extern "C" { + +void filterortho_tilde_setup(void) +{ + //post("filterortho~ v0.1"); + filterortho_class = class_new(gensym("filterortho~"), (t_newmethod)filterortho_new, + (t_method)filterortho_free, sizeof(t_filterortho), 0, A_NULL); + + CLASS_MAINSIGNALIN(filterortho_class, t_filterortho, x_f); + + + class_addmethod(filterortho_class, (t_method)filterortho_bang, gensym("bang"), A_NULL); + + class_addmethod(filterortho_class, (t_method)filterortho_dsp, gensym("dsp"), A_NULL); + + class_addmethod(filterortho_class, (t_method)setLP, gensym("setLP"), A_FLOAT, A_FLOAT, A_NULL); + class_addmethod(filterortho_class, (t_method)setHP, gensym("setHP"), A_FLOAT, A_FLOAT, A_NULL); + class_addmethod(filterortho_class, (t_method)setBP, gensym("setBP"), A_FLOAT, A_FLOAT, A_NULL); + class_addmethod(filterortho_class, (t_method)setBR, gensym("setBR"), A_FLOAT, A_FLOAT, A_NULL); + class_addmethod(filterortho_class, (t_method)setAP, gensym("setAP"), A_FLOAT, A_FLOAT, A_NULL); + class_addmethod(filterortho_class, (t_method)setLS, gensym("setLS"), A_FLOAT, A_FLOAT, A_NULL); + class_addmethod(filterortho_class, (t_method)setHS, gensym("setHS"), A_FLOAT, A_FLOAT, A_NULL); + class_addmethod(filterortho_class, (t_method)setEQ, gensym("setEQ"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL); + +} + +} diff --git a/modules/bmatrix~.c b/modules/bmatrix~.c new file mode 100644 index 0000000..b59d4d6 --- /dev/null +++ b/modules/bmatrix~.c @@ -0,0 +1,154 @@ +/* + * matrix.c - applies a matrix transform to a signal block + * intended for spectral processing, dynwav + * + * Copyright (c) 2000-2003 by Tom Schouten + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "m_pd.h" +#include +#include +#include +#include + +#define MAXORDER 1024 + +typedef struct matrixctl +{ + t_float *c_A; /* matrix */ + t_float *c_x; /* vector */ + t_int c_order; + +} t_matrixctl; + +typedef struct matrix +{ + t_object x_obj; + t_float x_f; + t_matrixctl x_ctl; +} t_matrix; + +static void matrix_load(t_matrix *x, t_symbol *s) +{ + FILE *matrix; + + if(s && s->s_name) + { + post("matrix: loading %s",s->s_name); + if(matrix = fopen(s->s_name, "r")) + { + int n = x->x_ctl.c_order; + fread(x->x_ctl.c_A, sizeof(float), n*n, matrix); + } + else post("matrix: error, cant open file."); + } +} + + +static t_int *matrix_perform(t_int *w) +{ + + + t_float *in = (float *)(w[3]); + t_float *out = (float *)(w[4]); + t_matrixctl *ctl = (t_matrixctl *)(w[1]); + t_int n = (t_int)(w[2]); + + t_int i,j; + t_float *A = ctl->c_A; + t_float *x = ctl->c_x; + + if (in == out) /* store input if ness. */ + { + memcpy(x, in, sizeof(t_float)*n); + in = x; + } + bzero(out, sizeof(t_float)*n); /* init output */ + + for (j=0; js_n; + int k,i; + + if (x->x_ctl.c_order != n) + { + if (x->x_ctl.c_A) free (x->x_ctl.c_A); + + x->x_ctl.c_A = (t_float *)calloc(n*n,sizeof(t_float)); + x->x_ctl.c_x = (t_float *)calloc(n,sizeof(t_float)); + x->x_ctl.c_order = n; + } + + for (i=0;ix_ctl.c_A[i] = 1; + + dsp_add(matrix_perform, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); + + +} +static void matrix_free(t_matrix *x) +{ + + if (x->x_ctl.c_A) free (x->x_ctl.c_A); + if (x->x_ctl.c_x) free (x->x_ctl.c_x); + +} + +t_class *matrix_class; + +static void *matrix_new(t_floatarg order) +{ + t_matrix *x = (t_matrix *)pd_new(matrix_class); + int iorder = (int)order; + int i, n=64, k; + + + /* out 1 */ + outlet_new(&x->x_obj, gensym("signal")); + + + + /* init data */ + + x->x_ctl.c_A = (t_float *)calloc(n*n,sizeof(t_float)); + x->x_ctl.c_x = (t_float *)calloc(n,sizeof(t_float)); + + + for (i=0;ix_ctl.c_A[i] = 1; + x->x_ctl.c_order = n; + + return (void *)x; +} + +void bmatrix_tilde_setup(void) +{ + //post("matrix~ v0.1"); + matrix_class = class_new(gensym("bmatrix~"), (t_newmethod)matrix_new, + (t_method)matrix_free, sizeof(t_matrix), 0, A_DEFFLOAT, 0); + CLASS_MAINSIGNALIN(matrix_class, t_matrix, x_f); + class_addmethod(matrix_class, (t_method)matrix_dsp, gensym("dsp"), 0); + class_addmethod(matrix_class, (t_method)matrix_load, gensym("load"), A_SYMBOL,0); + + +} + diff --git a/modules/bwin~.c b/modules/bwin~.c new file mode 100644 index 0000000..90a9e2a --- /dev/null +++ b/modules/bwin~.c @@ -0,0 +1,171 @@ +/* + * window.c - window generation abstraction + * Copyright (c) 2000-2003 by Tom Schouten + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "m_pd.h" +#include +#include + + +static t_class *window_class; + +typedef struct _window +{ + t_object x_obj; + t_float x_f; + t_float *x_window; + t_int x_size; + t_symbol *x_type; + t_float x_typearg; + +} t_window; + +static t_int *window_perform(t_int *w) +{ + t_window *x = (t_window *)(w[1]); + t_float *in = (t_float *)(w[2]); + t_float *out = (t_float *)(w[3]); + t_float *window = x->x_window; + int n = (int)(w[4]); + while (n--) + { + *out++ = (*in++) * (*window++); + } + return (w+5); +} + +static void window_size(t_window *x, t_int n) +{ + if (x->x_size != n){ + if (x->x_window) free(x->x_window); + x->x_window = malloc(sizeof(float)*n); + x->x_size = n; + } +} + + +static void window_type(t_window *x, t_symbol *s, t_float f) +{ + int i; + float a = 0; + float a_inc = 2 * M_PI / (float)(x->x_size); + if (!s) s = gensym("hamming"); + if (s == gensym("hamming")){ + for (i=0; ix_size; i++){ + float c = cos(a); + x->x_window[i] = (0.54 - 0.46 * c); + a += a_inc; + } + } + else if (s == gensym("hann")){ + for (i=0; ix_size; i++){ + float c = cos(a); + x->x_window[i] = (0.5 - 0.5 * c); + a += a_inc; + } + } + else if (s == gensym("hann/hamming")){ + for (i=0; ix_size; i++) { + float c = cos(a); + x->x_window[i] = (0.5 - 0.5 * c) / (0.54 - 0.46 * c); + a += a_inc; + } + } + else if (s == gensym("bfft_pink")){ + x->x_window[0] = 1.0f; //DC + x->x_window[1] = 1.0f / sqrt((double)(x->x_size>>1)); //NY + for (i=2; ix_size; i+=2) { + double freq = (double)(i>>1); + float amp = sqrt(1.0 / freq); + x->x_window[i] = amp; + x->x_window[i+1] = amp; + } + } + else if (s == gensym("bfft_blue")){ + x->x_window[0] = 1.0f; //DC + x->x_window[1] = sqrt((double)(x->x_size>>1)); //NY + for (i=2; ix_size; i+=2) { + double freq = (double)(i>>1); + float amp = sqrt(freq); + x->x_window[i] = amp; + x->x_window[i+1] = amp; + } + } + else if (s == gensym("bfft_db/octave")){ + float power = f/6.0; + x->x_window[0] = 1.0f; //DC + x->x_window[1] = pow((double)(x->x_size>>1), power); //NY + for (i=2; ix_size; i+=2) { + double freq = (double)(i>>1); + float amp = pow(freq, power); + x->x_window[i] = amp; + x->x_window[i+1] = amp; + } + } + + + /* default is no window */ + else{ + post("bwin~: unknown window type, using rectangular"); + for (i=0; ix_size; i++) x->x_window[i] = 1.0f; + } + + x->x_type = s; + x->x_typearg = f; + +} + +static void window_dsp(t_window *x, t_signal **sp) +{ + int n = sp[0]->s_n; + if (x->x_size != n){ + window_size(x, n); + window_type(x, x->x_type, x->x_typearg); + } + + dsp_add(window_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, n); +} + +static void window_free(t_window *x) +{ + free(x->x_window); +} + + +static void *window_new(t_symbol *s) +{ + t_window *x = (t_window *)pd_new(window_class); + outlet_new(&x->x_obj, &s_signal); + x->x_window = 0; + window_size(x, 64); + window_type(x, s, 0); + return (x); +} + +void bwin_tilde_setup(void) +{ + window_class = class_new(gensym("bwin~"), + (t_newmethod)window_new, (t_method)window_free, + sizeof(t_window), 0, A_DEFSYMBOL, A_NULL); + CLASS_MAINSIGNALIN(window_class, t_window, x_f); + class_addmethod(window_class, (t_method)window_dsp, + gensym("dsp"), A_NULL); + class_addmethod(window_class, (t_method)window_type, + gensym("type"), A_SYMBOL, A_DEFFLOAT, A_NULL); +} + diff --git a/modules/cmath~.c b/modules/cmath~.c index 3bd63a9..5526b9f 100644 --- a/modules/cmath~.c +++ b/modules/cmath~.c @@ -35,8 +35,8 @@ static t_int *cmath_perform_clog(t_int *w) { t_float *inx = (float *)(w[2]); t_float *iny = (float *)(w[3]); - t_float *outx = (float *)(w[4]); - t_float *outy = (float *)(w[5]); + t_float *outx = (float *)(w[5]); // clockwize addressing + t_float *outy = (float *)(w[4]); t_int i; t_int n = (t_int)(w[1]); t_float x; @@ -61,8 +61,8 @@ static t_int *cmath_perform_cexp(t_int *w) { t_float *inx = (float *)(w[2]); t_float *iny = (float *)(w[3]); - t_float *outx = (float *)(w[4]); - t_float *outy = (float *)(w[5]); + t_float *outx = (float *)(w[5]); // clockwize addressing + t_float *outy = (float *)(w[4]); t_int i; t_int n = (t_int)(w[1]); t_float x; @@ -82,8 +82,8 @@ static t_int *cmath_perform_nfft(t_int *w) { t_float *inx = (float *)(w[2]); t_float *iny = (float *)(w[3]); - t_float *outx = (float *)(w[4]); - t_float *outy = (float *)(w[5]); + t_float *outx = (float *)(w[5]); // clockwize addressing + t_float *outy = (float *)(w[4]); t_int i; t_int n = (t_int)(w[1]); t_float x; @@ -105,8 +105,8 @@ static t_int *cmath_perform_nifft(t_int *w) { t_float *inx = (float *)(w[2]); t_float *iny = (float *)(w[3]); - t_float *outx = (float *)(w[4]); - t_float *outy = (float *)(w[5]); + t_float *outx = (float *)(w[5]); // clockwize addressing + t_float *outy = (float *)(w[4]); t_int i; t_int n = (t_int)(w[1]); t_float x; diff --git a/modules/dwt~.c b/modules/dwt~.c index 327732c..9ab3bcc 100644 --- a/modules/dwt~.c +++ b/modules/dwt~.c @@ -190,9 +190,9 @@ static void dwt_permutation(t_dwt *x, t_int n){ /* debug */ for(k=0; kc_clutter[k]); + printf("clutter[%d] = %d\n", (int)k, (int)ctl->c_clutter[k]); for(k=0; kc_unclutter[k]); + printf("unclutter[%d] = %d\n", (int)k, (int)ctl->c_unclutter[k]); exit(1); } diff --git a/modules/ffpoly.c b/modules/ffpoly.c index c325969..097891c 100644 --- a/modules/ffpoly.c +++ b/modules/ffpoly.c @@ -1,6 +1,6 @@ /* * ffpoly.c - compute a finite field polynomial - * Copyright (c) by Tom Schouten + * Copyright (c) by Tom Schouten * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/modules/matrix~.c b/modules/matrix~.c deleted file mode 100644 index b59d4d6..0000000 --- a/modules/matrix~.c +++ /dev/null @@ -1,154 +0,0 @@ -/* - * matrix.c - applies a matrix transform to a signal block - * intended for spectral processing, dynwav - * - * Copyright (c) 2000-2003 by Tom Schouten - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "m_pd.h" -#include -#include -#include -#include - -#define MAXORDER 1024 - -typedef struct matrixctl -{ - t_float *c_A; /* matrix */ - t_float *c_x; /* vector */ - t_int c_order; - -} t_matrixctl; - -typedef struct matrix -{ - t_object x_obj; - t_float x_f; - t_matrixctl x_ctl; -} t_matrix; - -static void matrix_load(t_matrix *x, t_symbol *s) -{ - FILE *matrix; - - if(s && s->s_name) - { - post("matrix: loading %s",s->s_name); - if(matrix = fopen(s->s_name, "r")) - { - int n = x->x_ctl.c_order; - fread(x->x_ctl.c_A, sizeof(float), n*n, matrix); - } - else post("matrix: error, cant open file."); - } -} - - -static t_int *matrix_perform(t_int *w) -{ - - - t_float *in = (float *)(w[3]); - t_float *out = (float *)(w[4]); - t_matrixctl *ctl = (t_matrixctl *)(w[1]); - t_int n = (t_int)(w[2]); - - t_int i,j; - t_float *A = ctl->c_A; - t_float *x = ctl->c_x; - - if (in == out) /* store input if ness. */ - { - memcpy(x, in, sizeof(t_float)*n); - in = x; - } - bzero(out, sizeof(t_float)*n); /* init output */ - - for (j=0; js_n; - int k,i; - - if (x->x_ctl.c_order != n) - { - if (x->x_ctl.c_A) free (x->x_ctl.c_A); - - x->x_ctl.c_A = (t_float *)calloc(n*n,sizeof(t_float)); - x->x_ctl.c_x = (t_float *)calloc(n,sizeof(t_float)); - x->x_ctl.c_order = n; - } - - for (i=0;ix_ctl.c_A[i] = 1; - - dsp_add(matrix_perform, 4, &x->x_ctl, sp[0]->s_n, sp[0]->s_vec, sp[1]->s_vec); - - -} -static void matrix_free(t_matrix *x) -{ - - if (x->x_ctl.c_A) free (x->x_ctl.c_A); - if (x->x_ctl.c_x) free (x->x_ctl.c_x); - -} - -t_class *matrix_class; - -static void *matrix_new(t_floatarg order) -{ - t_matrix *x = (t_matrix *)pd_new(matrix_class); - int iorder = (int)order; - int i, n=64, k; - - - /* out 1 */ - outlet_new(&x->x_obj, gensym("signal")); - - - - /* init data */ - - x->x_ctl.c_A = (t_float *)calloc(n*n,sizeof(t_float)); - x->x_ctl.c_x = (t_float *)calloc(n,sizeof(t_float)); - - - for (i=0;ix_ctl.c_A[i] = 1; - x->x_ctl.c_order = n; - - return (void *)x; -} - -void bmatrix_tilde_setup(void) -{ - //post("matrix~ v0.1"); - matrix_class = class_new(gensym("bmatrix~"), (t_newmethod)matrix_new, - (t_method)matrix_free, sizeof(t_matrix), 0, A_DEFFLOAT, 0); - CLASS_MAINSIGNALIN(matrix_class, t_matrix, x_f); - class_addmethod(matrix_class, (t_method)matrix_dsp, gensym("dsp"), 0); - class_addmethod(matrix_class, (t_method)matrix_load, gensym("load"), A_SYMBOL,0); - - -} - diff --git a/modules/window~.c b/modules/window~.c deleted file mode 100644 index 777c8c5..0000000 --- a/modules/window~.c +++ /dev/null @@ -1,168 +0,0 @@ -/* - * window.c - window generation abstraction - * Copyright (c) 2000-2003 by Tom Schouten - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "m_pd.h" -#include -#include - - -static t_class *window_class; - -typedef struct _window -{ - t_object x_obj; - t_float x_f; - t_float *x_window; - t_int x_size; - t_symbol *x_type; - t_float x_typearg; - -} t_window; - -static t_int *window_perform(t_int *w) -{ - t_window *x = (t_window *)(w[1]); - t_float *in = (t_float *)(w[2]); - t_float *out = (t_float *)(w[3]); - t_float *window = x->x_window; - int n = (int)(w[4]); - while (n--) - { - *out++ = (*in++) * (*window++); - } - return (w+5); -} - -static void window_size(t_window *x, t_int n) -{ - if (x->x_size != n){ - if (x->x_window) free(x->x_window); - x->x_window = malloc(sizeof(float)*n); - x->x_size = n; - } -} - - -static void window_type(t_window *x, t_symbol *s, t_float f) -{ - int i; - float a = 0; - float a_inc = 2 * M_PI / (float)(x->x_size); - if (!s) s = gensym("hamming"); - if (s == gensym("hamming")){ - for (i=0; ix_size; i++){ - float c = cos(a); - x->x_window[i] = (0.54 - 0.46 * c); - a += a_inc; - } - } - else if (s == gensym("hann")){ - for (i=0; ix_size; i++){ - float c = cos(a); - x->x_window[i] = (0.5 - 0.5 * c); - a += a_inc; - } - } - else if (s == gensym("hann/hamming")){ - for (i=0; ix_size; i++) { - float c = cos(a); - x->x_window[i] = (0.5 - 0.5 * c) / (0.54 - 0.46 * c); - a += a_inc; - } - } - else if (s == gensym("bfft_pink")){ - x->x_window[0] = 1.0f; //DC - x->x_window[1] = 1.0f / sqrt((double)(x->x_size>>1)); //NY - for (i=2; ix_size; i+=2) { - double freq = (double)(i>>1); - float amp = sqrt(1.0 / freq); - x->x_window[i] = amp; - x->x_window[i+1] = amp; - } - } - else if (s == gensym("bfft_blue")){ - x->x_window[0] = 1.0f; //DC - x->x_window[1] = sqrt((double)(x->x_size>>1)); //NY - for (i=2; ix_size; i+=2) { - double freq = (double)(i>>1); - float amp = sqrt(freq); - x->x_window[i] = amp; - x->x_window[i+1] = amp; - } - } - else if (s == gensym("bfft_db/octave")){ - float power = f/6.0; - x->x_window[0] = 1.0f; //DC - x->x_window[1] = pow((double)(x->x_size>>1), power); //NY - for (i=2; ix_size; i+=2) { - double freq = (double)(i>>1); - float amp = pow(freq, power); - x->x_window[i] = amp; - x->x_window[i+1] = amp; - } - } - - - /* default is no window */ - else{ - post("bwin~: unknown window type, using rectangular"); - for (i=0; ix_size; i++) x->x_window[i] = 1.0f; - } - - x->x_type = s; - x->x_typearg = f; - -} - -static void window_dsp(t_window *x, t_signal **sp) -{ - int n = sp[0]->s_n; - if (x->x_size != n){ - window_size(x, n); - window_type(x, x->x_type, x->x_typearg); - } - - dsp_add(window_perform, 4, x, sp[0]->s_vec, sp[1]->s_vec, n); -} - -static void window_free(t_window *x) -{ - free(x->x_window); -} - - -static void *window_new(t_symbol *s) -{ - t_window *x = (t_window *)pd_new(window_class); - outlet_new(&x->x_obj, &s_signal); - x->x_window = 0; - window_size(x, 64); - window_type(x, s, 0); - return (x); -} - -void window_tilde_setup(void) -{ - window_class = class_new(gensym("bwin~"), (t_newmethod)window_new, (t_method)window_free, - sizeof(t_window), 0, A_DEFSYMBOL, A_NULL); - CLASS_MAINSIGNALIN(window_class, t_window, x_f); - class_addmethod(window_class, (t_method)window_dsp, gensym("dsp"), A_NULL); - class_addmethod(window_class, (t_method)window_type, gensym("type"), A_SYMBOL, A_DEFFLOAT, A_NULL); -} - -- cgit v1.2.1