From cd623379e1527476011d48698ee5b73d3b48c845 Mon Sep 17 00:00:00 2001 From: Katja Date: Sun, 13 Nov 2011 15:18:49 +0000 Subject: add unittest dir plus content to creb svn path=/trunk/externals/creb/; revision=15736 --- unittests/bdiag~-unittest.pd | 33 ++++ unittests/bdiag~.wav | Bin 0 -> 2092 bytes unittests/bfft~-unittest.pd | 21 +++ unittests/bfft~.wav | Bin 0 -> 2092 bytes unittests/biquadseries~-unittest.pd | 19 +++ unittests/biquadseries~.wav | Bin 0 -> 2092 bytes unittests/biquadseries~10.wav | Bin 0 -> 2092 bytes unittests/bitsplit~-unittest.pd | 13 ++ unittests/bitsplit~.wav | Bin 0 -> 2092 bytes unittests/blocknorm~-unittest.pd | 15 ++ unittests/blocknorm~.wav | Bin 0 -> 2092 bytes unittests/blosc~-unittest.pd | 23 +++ unittests/blosc~.wav | Bin 0 -> 2092 bytes unittests/blosc~440.wav | Bin 0 -> 2092 bytes unittests/bwin~-unittest.pd | 10 ++ unittests/bwin~.wav | Bin 0 -> 2092 bytes unittests/cexp~-unittest.pd | 26 +++ unittests/cexp~.wav | Bin 0 -> 2092 bytes unittests/cheby~-unittest.pd | 18 +++ unittests/cheby~.wav | Bin 0 -> 2092 bytes unittests/clog~-unittest.pd | 24 +++ unittests/clog~.wav | Bin 0 -> 2092 bytes unittests/dist~-unittest.pd | 17 ++ unittests/dist~.wav | Bin 0 -> 2092 bytes unittests/dwt~-unittest.pd | 13 ++ unittests/dwt~.wav | Bin 0 -> 2092 bytes unittests/dynwav~-unittest.pd | 19 +++ unittests/dynwav~.wav | Bin 0 -> 2092 bytes unittests/eadsr~-unittest.pd | 24 +++ unittests/eadsr~.wav | Bin 0 -> 2092 bytes unittests/ead~-unittest.pd | 18 +++ unittests/ead~.wav | Bin 0 -> 2092 bytes unittests/ead~subnormal-unittest.pd | 196 +++++++++++++++++++++++ unittests/ear~-unittest.pd | 18 +++ unittests/ear~.wav | Bin 0 -> 2092 bytes unittests/fdn~-unittest.pd | 16 ++ unittests/fdn~.wav | Bin 0 -> 2092 bytes unittests/ffpoly-unittest.pd | 16 ++ unittests/ffpoly.wav | Bin 0 -> 2092 bytes unittests/filterortho~-unittest.pd | 21 +++ unittests/filterortho~.wav | Bin 0 -> 2092 bytes unittests/filterortho~subnormal-unittest .pd | 228 +++++++++++++++++++++++++++ unittests/fwarp-unittest.pd | 11 ++ unittests/fwarp.wav | Bin 0 -> 2092 bytes unittests/junction.wav | Bin 0 -> 2092 bytes unittests/junction~-unittest.pd | 34 ++++ unittests/lattice~-unittest.pd | 46 ++++++ unittests/lattice~.wav | Bin 0 -> 2092 bytes unittests/permute~.wav | Bin 0 -> 2092 bytes unittests/permut~-unittest.pd | 17 ++ unittests/qmult~-unittest.pd | 52 ++++++ unittests/qmult~.wav | Bin 0 -> 2092 bytes unittests/qnorm.wav | Bin 0 -> 2092 bytes unittests/qnorm~-unittest.pd | 23 +++ unittests/ramp~-unittest.pd | 23 +++ unittests/ramp~.wav | Bin 0 -> 2092 bytes unittests/ratio-unittest.pd | 16 ++ unittests/ratio.wav | Bin 0 -> 2092 bytes unittests/resofilt~-unittest.pd | 25 +++ unittests/resofilt~.wav | Bin 0 -> 2092 bytes unittests/sbosc~-unittest.pd | 14 ++ unittests/sbosc~.wav | Bin 0 -> 2092 bytes unittests/scrollgrid1D~-unittest.pd | 35 ++++ unittests/scrollgrid1D~.wav | Bin 0 -> 2092 bytes unittests/statwav~.wav | Bin 0 -> 2092 bytes unittests/statwav~unittest.pd | 28 ++++ unittests/tabreadmix~.wav | Bin 0 -> 2092 bytes unittests/tabreadmix~unittest.pd | 37 +++++ unittests/xfm~-unittest.pd | 38 +++++ unittests/xfm~.wav | Bin 0 -> 2092 bytes 70 files changed, 1187 insertions(+) create mode 100644 unittests/bdiag~-unittest.pd create mode 100644 unittests/bdiag~.wav create mode 100644 unittests/bfft~-unittest.pd create mode 100644 unittests/bfft~.wav create mode 100644 unittests/biquadseries~-unittest.pd create mode 100644 unittests/biquadseries~.wav create mode 100644 unittests/biquadseries~10.wav create mode 100644 unittests/bitsplit~-unittest.pd create mode 100644 unittests/bitsplit~.wav create mode 100644 unittests/blocknorm~-unittest.pd create mode 100644 unittests/blocknorm~.wav create mode 100644 unittests/blosc~-unittest.pd create mode 100644 unittests/blosc~.wav create mode 100644 unittests/blosc~440.wav create mode 100644 unittests/bwin~-unittest.pd create mode 100644 unittests/bwin~.wav create mode 100644 unittests/cexp~-unittest.pd create mode 100644 unittests/cexp~.wav create mode 100644 unittests/cheby~-unittest.pd create mode 100644 unittests/cheby~.wav create mode 100644 unittests/clog~-unittest.pd create mode 100644 unittests/clog~.wav create mode 100644 unittests/dist~-unittest.pd create mode 100644 unittests/dist~.wav create mode 100644 unittests/dwt~-unittest.pd create mode 100644 unittests/dwt~.wav create mode 100644 unittests/dynwav~-unittest.pd create mode 100644 unittests/dynwav~.wav create mode 100644 unittests/eadsr~-unittest.pd create mode 100644 unittests/eadsr~.wav create mode 100644 unittests/ead~-unittest.pd create mode 100644 unittests/ead~.wav create mode 100644 unittests/ead~subnormal-unittest.pd create mode 100644 unittests/ear~-unittest.pd create mode 100644 unittests/ear~.wav create mode 100644 unittests/fdn~-unittest.pd create mode 100644 unittests/fdn~.wav create mode 100644 unittests/ffpoly-unittest.pd create mode 100644 unittests/ffpoly.wav create mode 100644 unittests/filterortho~-unittest.pd create mode 100644 unittests/filterortho~.wav create mode 100644 unittests/filterortho~subnormal-unittest .pd create mode 100644 unittests/fwarp-unittest.pd create mode 100644 unittests/fwarp.wav create mode 100644 unittests/junction.wav create mode 100644 unittests/junction~-unittest.pd create mode 100644 unittests/lattice~-unittest.pd create mode 100644 unittests/lattice~.wav create mode 100644 unittests/permute~.wav create mode 100644 unittests/permut~-unittest.pd create mode 100644 unittests/qmult~-unittest.pd create mode 100644 unittests/qmult~.wav create mode 100644 unittests/qnorm.wav create mode 100644 unittests/qnorm~-unittest.pd create mode 100644 unittests/ramp~-unittest.pd create mode 100644 unittests/ramp~.wav create mode 100644 unittests/ratio-unittest.pd create mode 100644 unittests/ratio.wav create mode 100644 unittests/resofilt~-unittest.pd create mode 100644 unittests/resofilt~.wav create mode 100644 unittests/sbosc~-unittest.pd create mode 100644 unittests/sbosc~.wav create mode 100644 unittests/scrollgrid1D~-unittest.pd create mode 100644 unittests/scrollgrid1D~.wav create mode 100644 unittests/statwav~.wav create mode 100644 unittests/statwav~unittest.pd create mode 100644 unittests/tabreadmix~.wav create mode 100644 unittests/tabreadmix~unittest.pd create mode 100644 unittests/xfm~-unittest.pd create mode 100644 unittests/xfm~.wav diff --git a/unittests/bdiag~-unittest.pd b/unittests/bdiag~-unittest.pd new file mode 100644 index 0000000..a3162d5 --- /dev/null +++ b/unittests/bdiag~-unittest.pd @@ -0,0 +1,33 @@ +#N canvas 0 22 856 657 10; +#X obj 119 374 unit-test-frame~; +#X msg 440 144 timefreq 1 23 10 \, timefreq 2 15 0 \, timefreq 3 1 +5 \, timefreq 5 1 8 \, timefreq 7 13 4 \, timefreq 11 11 12 \, timefreq +17 2 32 \, timefreq 30 6 2; +#X msg 119 347 bdiag~ 0; +#X obj 440 111 loadbang; +#X obj 440 321 creb/bdiag~; +#X text 43 175 the [eig ] message sets the eigenvalue +for the corresponding block. there are n/2 blocks \, with n the dsp +blocksize.; +#X text 44 230 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 41 25 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 85 77 state1 = real * state1 - imag * state2 + input1; +#X text 85 92 state2 = real * state2 + imag * state1 + input2; +#X text 43 128 this module is intended to "filter" spectral data produced +by bfft or other short time spectral transforms like dwt.; +#X text 41 286 [bang] or [random] set the state vector to a random +value. [reset] sets it to 0; +#X msg 466 272 0.2; +#X text 438 45 For this object \, the test result is different between +the first bang and later bangs.; +#X connect 0 2 12 0; +#X connect 1 0 4 0; +#X connect 2 0 0 0; +#X connect 3 0 1 0; +#X connect 3 0 2 0; +#X connect 4 0 0 1; +#X connect 12 0 4 0; diff --git a/unittests/bdiag~.wav b/unittests/bdiag~.wav new file mode 100644 index 0000000..12330c3 Binary files /dev/null and b/unittests/bdiag~.wav differ diff --git a/unittests/bfft~-unittest.pd b/unittests/bfft~-unittest.pd new file mode 100644 index 0000000..6df1ffc --- /dev/null +++ b/unittests/bfft~-unittest.pd @@ -0,0 +1,21 @@ +#N canvas 130 36 773 544 10; +#X obj 57 269 unit-test-frame~; +#X obj 57 194 loadbang; +#X obj 378 236 /~ 1; +#X obj 399 210 sqrt; +#X obj 399 160 loadbang; +#X msg 57 231 bfft~ 100; +#X obj 378 132 creb/bfft~; +#X obj 378 99 phasor~ 440; +#X msg 441 71 0; +#X msg 399 185 64; +#X connect 0 2 8 0; +#X connect 1 0 5 0; +#X connect 2 0 0 1; +#X connect 3 0 2 1; +#X connect 4 0 9 0; +#X connect 5 0 0 0; +#X connect 6 0 2 0; +#X connect 7 0 6 0; +#X connect 8 0 7 1; +#X connect 9 0 3 0; diff --git a/unittests/bfft~.wav b/unittests/bfft~.wav new file mode 100644 index 0000000..9d57b4f Binary files /dev/null and b/unittests/bfft~.wav differ diff --git a/unittests/biquadseries~-unittest.pd b/unittests/biquadseries~-unittest.pd new file mode 100644 index 0000000..594c6e1 --- /dev/null +++ b/unittests/biquadseries~-unittest.pd @@ -0,0 +1,19 @@ +#N canvas 129 96 739 489 10; +#X obj 50 225 unit-test-frame~; +#X msg 394 134 butterLP 1000; +#X obj 394 106 loadbang; +#X obj 371 48 phasor~ 440; +#X msg 434 24 0; +#X obj 371 77 -~ 0.5; +#X obj 50 160 loadbang; +#X obj 371 167 creb/biquadseries~ 1; +#X msg 50 190 biquadseries~ 50; +#X connect 0 2 4 0; +#X connect 1 0 7 0; +#X connect 2 0 1 0; +#X connect 3 0 5 0; +#X connect 4 0 3 1; +#X connect 5 0 7 0; +#X connect 6 0 8 0; +#X connect 7 0 0 1; +#X connect 8 0 0 0; diff --git a/unittests/biquadseries~.wav b/unittests/biquadseries~.wav new file mode 100644 index 0000000..5d39ba4 Binary files /dev/null and b/unittests/biquadseries~.wav differ diff --git a/unittests/biquadseries~10.wav b/unittests/biquadseries~10.wav new file mode 100644 index 0000000..5d39ba4 Binary files /dev/null and b/unittests/biquadseries~10.wav differ diff --git a/unittests/bitsplit~-unittest.pd b/unittests/bitsplit~-unittest.pd new file mode 100644 index 0000000..acdca1b --- /dev/null +++ b/unittests/bitsplit~-unittest.pd @@ -0,0 +1,13 @@ +#N canvas 0 22 769 474 10; +#X obj 306 162 creb/bitsplit~ 4; +#X obj 306 117 osc~ 440; +#X obj 78 203 unit-test-frame~; +#X msg 351 82 0; +#X obj 78 131 loadbang; +#X msg 78 162 bitsplit~ 10; +#X connect 0 3 2 1; +#X connect 1 0 0 0; +#X connect 2 2 3 0; +#X connect 3 0 1 1; +#X connect 4 0 5 0; +#X connect 5 0 2 0; diff --git a/unittests/bitsplit~.wav b/unittests/bitsplit~.wav new file mode 100644 index 0000000..0deda03 Binary files /dev/null and b/unittests/bitsplit~.wav differ diff --git a/unittests/blocknorm~-unittest.pd b/unittests/blocknorm~-unittest.pd new file mode 100644 index 0000000..a370835 --- /dev/null +++ b/unittests/blocknorm~-unittest.pd @@ -0,0 +1,15 @@ +#N canvas 0 22 746 470 10; +#X obj 378 128 creb/blocknorm~; +#X obj 57 174 unit-test-frame~; +#X obj 378 69 phasor~ 440; +#X obj 378 97 -~ 0.5; +#X msg 441 39 0; +#X obj 57 100 loadbang; +#X msg 57 134 blocknorm~ 0; +#X connect 0 0 1 1; +#X connect 1 2 4 0; +#X connect 2 0 3 0; +#X connect 3 0 0 0; +#X connect 4 0 2 1; +#X connect 5 0 6 0; +#X connect 6 0 1 0; diff --git a/unittests/blocknorm~.wav b/unittests/blocknorm~.wav new file mode 100644 index 0000000..100a6df Binary files /dev/null and b/unittests/blocknorm~.wav differ diff --git a/unittests/blosc~-unittest.pd b/unittests/blosc~-unittest.pd new file mode 100644 index 0000000..18e023e --- /dev/null +++ b/unittests/blosc~-unittest.pd @@ -0,0 +1,23 @@ +#N canvas 167 104 735 504 10; +#X obj 37 215 unit-test-frame~; +#X obj 358 138 creb/blosc~ saw; +#X msg 445 104 0; +#X obj 37 139 loadbang; +#X obj 445 73 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 579 36 creb/blosc~ saw; +#X obj 579 62 creb/blosc~ saw; +#X obj 579 88 creb/blosc~ saw; +#X obj 579 114 creb/blosc~ saw; +#X obj 580 144 creb/blosc~ saw; +#X obj 580 170 creb/blosc~ saw; +#X msg 358 105 100; +#X msg 37 177 blosc~ 100; +#X connect 0 2 4 0; +#X connect 1 0 0 1; +#X connect 2 0 1 1; +#X connect 3 0 12 0; +#X connect 4 0 11 0; +#X connect 4 0 2 0; +#X connect 11 0 1 0; +#X connect 12 0 0 0; diff --git a/unittests/blosc~.wav b/unittests/blosc~.wav new file mode 100644 index 0000000..e58e536 Binary files /dev/null and b/unittests/blosc~.wav differ diff --git a/unittests/blosc~440.wav b/unittests/blosc~440.wav new file mode 100644 index 0000000..19b44e4 Binary files /dev/null and b/unittests/blosc~440.wav differ diff --git a/unittests/bwin~-unittest.pd b/unittests/bwin~-unittest.pd new file mode 100644 index 0000000..dd095b5 --- /dev/null +++ b/unittests/bwin~-unittest.pd @@ -0,0 +1,10 @@ +#N canvas 0 22 744 443 10; +#X obj 373 90 creb/bwin~ hann; +#X obj 52 137 unit-test-frame~; +#X obj 373 49 sig~ 1; +#X obj 52 58 loadbang; +#X msg 52 100 bwin~ 0; +#X connect 0 0 1 1; +#X connect 2 0 0 0; +#X connect 3 0 4 0; +#X connect 4 0 1 0; diff --git a/unittests/bwin~.wav b/unittests/bwin~.wav new file mode 100644 index 0000000..4be5572 Binary files /dev/null and b/unittests/bwin~.wav differ diff --git a/unittests/cexp~-unittest.pd b/unittests/cexp~-unittest.pd new file mode 100644 index 0000000..60415e8 --- /dev/null +++ b/unittests/cexp~-unittest.pd @@ -0,0 +1,26 @@ +#N canvas 354 61 752 559 10; +#X obj 1 261 unit-test-frame~; +#X obj 379 126 -~ 0.25; +#X msg 385 59 0; +#X obj 322 174 cos~; +#X obj 379 150 wrap~; +#X obj 379 174 cos~; +#X obj 322 88 phasor~ 100; +#X obj 322 227 /~ 3.14159; +#X obj 1 200 loadbang; +#X msg 1 233 cexp~ 0; +#X obj 178 180 creb/clog~; +#X obj 322 202 cexp~; +#X text 155 145 complex log and exp.; +#X connect 0 2 2 0; +#X connect 1 0 4 0; +#X connect 2 0 6 1; +#X connect 3 0 11 0; +#X connect 4 0 5 0; +#X connect 5 0 11 1; +#X connect 6 0 3 0; +#X connect 6 0 1 0; +#X connect 7 0 0 1; +#X connect 8 0 9 0; +#X connect 9 0 0 0; +#X connect 11 0 7 0; diff --git a/unittests/cexp~.wav b/unittests/cexp~.wav new file mode 100644 index 0000000..3965952 Binary files /dev/null and b/unittests/cexp~.wav differ diff --git a/unittests/cheby~-unittest.pd b/unittests/cheby~-unittest.pd new file mode 100644 index 0000000..d5b9e1f --- /dev/null +++ b/unittests/cheby~-unittest.pd @@ -0,0 +1,18 @@ +#N canvas 107 296 738 457 10; +#X obj 371 138 creb/cheby~ 4; +#X obj 50 179 unit-test-frame~; +#X obj 371 48 osc~ 440; +#X msg 416 22 0; +#X msg 390 103 coef 1 0.5 \, coef 2 0.25 \, coef 3 0.125 \, coef 4 +0.0625; +#X msg 50 143 cheby~ 200; +#X obj 50 113 loadbang; +#X obj 391 77 loadbang; +#X connect 0 0 1 1; +#X connect 1 2 3 0; +#X connect 2 0 0 0; +#X connect 3 0 2 1; +#X connect 4 0 0 0; +#X connect 5 0 1 0; +#X connect 6 0 5 0; +#X connect 7 0 4 0; diff --git a/unittests/cheby~.wav b/unittests/cheby~.wav new file mode 100644 index 0000000..05b097c Binary files /dev/null and b/unittests/cheby~.wav differ diff --git a/unittests/clog~-unittest.pd b/unittests/clog~-unittest.pd new file mode 100644 index 0000000..6a2b3d7 --- /dev/null +++ b/unittests/clog~-unittest.pd @@ -0,0 +1,24 @@ +#N canvas 0 22 752 559 10; +#X obj 322 201 creb/clog~; +#X obj 1 261 unit-test-frame~; +#X obj 379 126 -~ 0.25; +#X msg 385 59 0; +#X obj 322 174 cos~; +#X obj 379 150 wrap~; +#X obj 379 174 cos~; +#X obj 322 88 phasor~ 100; +#X obj 322 227 /~ 3.14159; +#X msg 1 232 clog~ 0; +#X obj 1 200 loadbang; +#X connect 0 0 8 0; +#X connect 1 2 3 0; +#X connect 2 0 5 0; +#X connect 3 0 7 1; +#X connect 4 0 0 0; +#X connect 5 0 6 0; +#X connect 6 0 0 1; +#X connect 7 0 4 0; +#X connect 7 0 2 0; +#X connect 8 0 1 1; +#X connect 9 0 1 0; +#X connect 10 0 9 0; diff --git a/unittests/clog~.wav b/unittests/clog~.wav new file mode 100644 index 0000000..4d1a8ff Binary files /dev/null and b/unittests/clog~.wav differ diff --git a/unittests/dist~-unittest.pd b/unittests/dist~-unittest.pd new file mode 100644 index 0000000..374c7b5 --- /dev/null +++ b/unittests/dist~-unittest.pd @@ -0,0 +1,17 @@ +#N canvas 128 152 747 511 10; +#X obj 57 234 unit-test-frame~; +#X obj 378 110 osc~ 440; +#X msg 423 83 0; +#X msg 447 161 5; +#X obj 447 138 loadbang; +#X obj 57 177 loadbang; +#X msg 57 206 dist~ 100; +#X obj 378 186 creb/dist~ 3; +#X connect 0 2 2 0; +#X connect 1 0 7 0; +#X connect 2 0 1 1; +#X connect 3 0 7 1; +#X connect 4 0 3 0; +#X connect 5 0 6 0; +#X connect 6 0 0 0; +#X connect 7 0 0 1; diff --git a/unittests/dist~.wav b/unittests/dist~.wav new file mode 100644 index 0000000..5bf6614 Binary files /dev/null and b/unittests/dist~.wav differ diff --git a/unittests/dwt~-unittest.pd b/unittests/dwt~-unittest.pd new file mode 100644 index 0000000..3e1b6e4 --- /dev/null +++ b/unittests/dwt~-unittest.pd @@ -0,0 +1,13 @@ +#N canvas 0 22 787 536 10; +#X obj 394 189 creb/dwt~; +#X obj 394 142 phasor~ 440; +#X msg 457 105 0; +#X obj 73 243 unit-test-frame~; +#X obj 73 165 loadbang; +#X msg 73 204 dwt~ 100; +#X connect 0 0 3 1; +#X connect 1 0 0 0; +#X connect 2 0 1 1; +#X connect 3 2 2 0; +#X connect 4 0 5 0; +#X connect 5 0 3 0; diff --git a/unittests/dwt~.wav b/unittests/dwt~.wav new file mode 100644 index 0000000..89f6919 Binary files /dev/null and b/unittests/dwt~.wav differ diff --git a/unittests/dynwav~-unittest.pd b/unittests/dynwav~-unittest.pd new file mode 100644 index 0000000..f5203f2 --- /dev/null +++ b/unittests/dynwav~-unittest.pd @@ -0,0 +1,19 @@ +#N canvas 149 186 729 497 10; +#X obj 369 171 creb/dynwav~; +#X obj 414 43 bang~; +#X msg 414 70 0.25; +#X msg 501 118 0; +#X obj 48 224 unit-test-frame~; +#X obj 48 150 loadbang; +#X obj 438 145 phasor~ 220; +#X obj 369 102 osc~ 120; +#X msg 48 185 dynwav~ 20; +#X connect 0 0 4 1; +#X connect 1 0 2 0; +#X connect 2 0 7 1; +#X connect 3 0 6 1; +#X connect 4 2 3 0; +#X connect 5 0 8 0; +#X connect 6 0 0 1; +#X connect 7 0 0 0; +#X connect 8 0 4 0; diff --git a/unittests/dynwav~.wav b/unittests/dynwav~.wav new file mode 100644 index 0000000..ab41c4c Binary files /dev/null and b/unittests/dynwav~.wav differ diff --git a/unittests/eadsr~-unittest.pd b/unittests/eadsr~-unittest.pd new file mode 100644 index 0000000..aef34c1 --- /dev/null +++ b/unittests/eadsr~-unittest.pd @@ -0,0 +1,24 @@ +#N canvas 0 22 792 504 10; +#X obj 65 212 unit-test-frame~; +#X msg 386 60 start; +#X obj 65 151 loadbang; +#X msg 407 98 17; +#X msg 439 95 8; +#X msg 503 95 20; +#X msg 471 95 10; +#X msg 65 179 eadsr~ 0; +#X obj 450 57 loadbang; +#X obj 386 141 creb/eadsr~ 0 0; +#X connect 0 2 1 0; +#X connect 1 0 9 0; +#X connect 2 0 7 0; +#X connect 3 0 9 1; +#X connect 4 0 9 2; +#X connect 5 0 9 4; +#X connect 6 0 9 3; +#X connect 7 0 0 0; +#X connect 8 0 3 0; +#X connect 8 0 4 0; +#X connect 8 0 6 0; +#X connect 8 0 5 0; +#X connect 9 0 0 1; diff --git a/unittests/eadsr~.wav b/unittests/eadsr~.wav new file mode 100644 index 0000000..cc700a7 Binary files /dev/null and b/unittests/eadsr~.wav differ diff --git a/unittests/ead~-unittest.pd b/unittests/ead~-unittest.pd new file mode 100644 index 0000000..b4f59cf --- /dev/null +++ b/unittests/ead~-unittest.pd @@ -0,0 +1,18 @@ +#N canvas 0 22 792 504 10; +#X obj 65 212 unit-test-frame~; +#X msg 386 60 start; +#X obj 65 151 loadbang; +#X msg 423 98 17; +#X msg 461 98 8; +#X obj 450 57 loadbang; +#X obj 386 141 creb/ead~ 0 0; +#X msg 65 179 ead~ 0; +#X connect 0 2 1 0; +#X connect 1 0 6 0; +#X connect 2 0 7 0; +#X connect 3 0 6 1; +#X connect 4 0 6 2; +#X connect 5 0 3 0; +#X connect 5 0 4 0; +#X connect 6 0 0 1; +#X connect 7 0 0 0; diff --git a/unittests/ead~.wav b/unittests/ead~.wav new file mode 100644 index 0000000..cc700a7 Binary files /dev/null and b/unittests/ead~.wav differ diff --git a/unittests/ead~subnormal-unittest.pd b/unittests/ead~subnormal-unittest.pd new file mode 100644 index 0000000..ed33cea --- /dev/null +++ b/unittests/ead~subnormal-unittest.pd @@ -0,0 +1,196 @@ +#N canvas 444 35 680 522 10; +#X obj 55 118 bang~; +#X obj 40 150 snapshot~; +#X obj 40 24 bng 50 1000 50 0 empty empty empty 17 7 0 10 -262144 -260097 +-1; +#X obj 40 177 change; +#X obj 40 232 sel 0; +#X obj 40 258 f; +#X floatatom 62 303 17 0 0 0 - - -; +#X msg 134 27 \; pd dsp 1; +#X msg 204 27 \; pd dsp 1; +#X obj 134 -2 loadbang; +#X obj 114 354 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 47 354 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 40 330 moses 1e-46; +#N canvas 181 252 394 427 single 0; +#X obj 27 20 inlet; +#X msg 114 147 NORMAL \$1; +#X msg 25 293 UNIT-TEST-DONE; +#X obj 26 390 print unit-test; +#X obj 54 364 stdout; +#X obj 134 390 outlet; +#X obj 25 247 t b a; +#X obj 53 328 list trim; +#X obj 25 215 pack s f s; +#X obj 81 187 r \$0-classname; +#X msg 26 147 SUBNORMAL \$1; +#X obj 26 113 moses; +#X msg 76 47 2; +#X floatatom 76 115 15 0 0 0 - - -; +#X obj 75 19 loadbang; +#X obj 76 77 pow -126; +#X text 176 116 smallest normal value for float; +#X msg 135 356 set \$1 \$2 \$3; +#X connect 0 0 11 0; +#X connect 1 0 8 0; +#X connect 2 0 3 0; +#X connect 2 0 4 0; +#X connect 6 0 2 0; +#X connect 6 1 17 0; +#X connect 6 1 7 0; +#X connect 7 0 3 0; +#X connect 7 0 4 0; +#X connect 8 0 6 0; +#X connect 9 0 8 2; +#X connect 10 0 8 0; +#X connect 11 0 10 0; +#X connect 11 1 1 0; +#X connect 12 0 15 0; +#X connect 14 0 12 0; +#X connect 15 0 13 0; +#X connect 15 0 11 1; +#X connect 17 0 5 0; +#X restore 104 378 pd single; +#N canvas 101 191 396 411 double 0; +#X obj 26 13 inlet; +#X msg 24 279 UNIT-TEST-DONE; +#X obj 25 366 print unit-test; +#X obj 52 339 stdout; +#X obj 131 366 outlet; +#X obj 25 241 t b a; +#X msg 180 150 NORMAL \$1; +#X obj 53 308 list trim; +#X obj 25 217 pack s f s; +#X obj 82 187 r \$0-classname; +#X msg 26 149 SUBNORMAL \$1; +#X obj 26 116 moses; +#X msg 73 43 2; +#X obj 72 15 loadbang; +#X obj 73 76 pow -1022; +#X floatatom 72 117 15 0 0 0 - - -; +#X text 175 116 smallest bnormal value for double; +#X msg 131 331 set \$1 \$2 \$3; +#X connect 0 0 11 0; +#X connect 1 0 3 0; +#X connect 1 0 2 0; +#X connect 5 0 1 0; +#X connect 5 1 17 0; +#X connect 5 1 7 0; +#X connect 6 0 8 0; +#X connect 7 0 2 0; +#X connect 7 0 3 0; +#X connect 8 0 5 0; +#X connect 9 0 8 2; +#X connect 10 0 8 0; +#X connect 11 0 10 0; +#X connect 11 1 6 0; +#X connect 12 0 14 0; +#X connect 13 0 12 0; +#X connect 14 0 11 1; +#X connect 14 0 15 0; +#X connect 17 0 4 0; +#X restore 40 378 pd double; +#X msg 40 413 SUBNORMAL 2.2114198411132e-308; +#X text 134 92 exponential decay; +#X text 302 6 [creb/ead~] checks for subnormals once per signal block. +Therefore \, subnormals do happen when the curve approaches zero \, +but only for a short period of time (depending on blocksize).; +#X obj 40 92 creb/ead~ 0 15; +#X text 64 281 smallest non-zero number seen by [snapshot~]; +#X text 301 74 In this patch we test if the subnormals-flush routine +works as expected. Open [pd more] to see how small subnormals can go +for a given precision.; +#X msg 345 358 ead~; +#X obj 345 411 s \$0-classname; +#X obj 345 383 symbol; +#X obj 346 333 loadbang; +#X obj 457 211 s \$0-smallnumbers; +#X msg 456 179 arrayviewlistnew; +#X obj 455 250 table \$0-smallnumbers 10000; +#N canvas 626 222 402 246 write 0; +#X obj 27 38 inlet; +#X obj 25 198 tabwrite \$0-smallnumbers; +#X obj 26 91 t f b; +#X obj 54 132 f; +#X obj 85 132 + 1; +#X obj 132 35 inlet; +#X msg 132 89 const 0; +#X msg 70 94 0; +#X obj 133 133 s \$0-smallnumbers; +#X msg 188 89 arrayviewclose; +#X connect 0 0 2 0; +#X connect 2 0 1 0; +#X connect 2 1 3 0; +#X connect 3 0 4 0; +#X connect 3 0 1 1; +#X connect 4 0 3 1; +#X connect 5 0 6 0; +#X connect 5 0 7 0; +#X connect 5 0 9 0; +#X connect 6 0 8 0; +#X connect 7 0 3 1; +#X connect 9 0 8 0; +#X restore 82 258 pd write; +#X obj 40 203 abs; +#N canvas 683 194 435 442 more 0; +#X msg 39 359 2; +#X floatatom 39 413 15 0 0 0 - - -; +#X obj 39 330 t b f; +#X msg 38 46 2; +#X floatatom 55 99 15 0 0 0 - - -; +#X obj 38 385 pow; +#X obj 37 18 loadbang; +#X floatatom 38 306 5 0 0 0 - - -; +#X floatatom 40 155 15 0 0 0 - - -; +#X text 36 254 check how small a non-zero value can be represented +; +#X text 37 184 Some CPU architectures support denormal numbers by default. +Repeated calculation of subnormal numbers can happen in recursive filters +\, feedback delay lines \, reverb simulators etc. This slows down calculation +considerably.; +#X obj 54 71 pow -126; +#X obj 39 126 pow -1022; +#X text 143 154 smallest bnormal value for double; +#X msg 39 277 -127; +#X msg 82 276 -1023; +#X text 156 98 smallest normal value for float; +#X connect 0 0 5 0; +#X connect 2 0 0 0; +#X connect 2 1 5 1; +#X connect 3 0 11 0; +#X connect 3 0 12 0; +#X connect 5 0 1 0; +#X connect 6 0 3 0; +#X connect 7 0 2 0; +#X connect 11 0 4 0; +#X connect 12 0 8 0; +#X connect 14 0 7 0; +#X connect 15 0 7 0; +#X restore 307 142 pd more; +#X connect 0 0 1 0; +#X connect 1 0 3 0; +#X connect 2 0 18 0; +#X connect 2 0 28 1; +#X connect 3 0 29 0; +#X connect 4 0 5 0; +#X connect 4 1 5 1; +#X connect 4 1 28 0; +#X connect 5 0 6 0; +#X connect 5 0 12 0; +#X connect 9 0 7 0; +#X connect 9 0 2 0; +#X connect 12 0 11 0; +#X connect 12 0 14 0; +#X connect 12 1 10 0; +#X connect 12 1 13 0; +#X connect 13 0 15 0; +#X connect 14 0 15 0; +#X connect 18 0 1 0; +#X connect 21 0 23 0; +#X connect 23 0 22 0; +#X connect 24 0 21 0; +#X connect 26 0 25 0; +#X connect 29 0 4 0; diff --git a/unittests/ear~-unittest.pd b/unittests/ear~-unittest.pd new file mode 100644 index 0000000..c60fe3d --- /dev/null +++ b/unittests/ear~-unittest.pd @@ -0,0 +1,18 @@ +#N canvas 0 22 792 504 10; +#X obj 65 212 unit-test-frame~; +#X msg 386 60 start; +#X obj 65 151 loadbang; +#X obj 450 57 loadbang; +#X obj 386 141 creb/ear~ 0 0; +#X msg 65 179 ear~ 0; +#X msg 461 96 1; +#X msg 423 96 16; +#X connect 0 2 1 0; +#X connect 1 0 4 0; +#X connect 2 0 5 0; +#X connect 3 0 7 0; +#X connect 3 0 6 0; +#X connect 4 0 0 1; +#X connect 5 0 0 0; +#X connect 6 0 4 2; +#X connect 7 0 4 1; diff --git a/unittests/ear~.wav b/unittests/ear~.wav new file mode 100644 index 0000000..2ffb0b2 Binary files /dev/null and b/unittests/ear~.wav differ diff --git a/unittests/fdn~-unittest.pd b/unittests/fdn~-unittest.pd new file mode 100644 index 0000000..b74c908 --- /dev/null +++ b/unittests/fdn~-unittest.pd @@ -0,0 +1,16 @@ +#N canvas 98 70 727 466 10; +#X obj 39 177 unit-test-frame~; +#X obj 360 86 phasor~ 1; +#X msg 411 57 0; +#X obj 39 106 loadbang; +#X msg 376 111 reset; +#X obj 360 134 creb/fdn~ 64 200; +#X msg 39 141 fdn~ 1100; +#X connect 0 2 2 0; +#X connect 1 0 5 0; +#X connect 2 0 1 1; +#X connect 2 0 4 0; +#X connect 3 0 6 0; +#X connect 4 0 5 0; +#X connect 5 0 0 1; +#X connect 6 0 0 0; diff --git a/unittests/fdn~.wav b/unittests/fdn~.wav new file mode 100644 index 0000000..169ace2 Binary files /dev/null and b/unittests/fdn~.wav differ diff --git a/unittests/ffpoly-unittest.pd b/unittests/ffpoly-unittest.pd new file mode 100644 index 0000000..314af94 --- /dev/null +++ b/unittests/ffpoly-unittest.pd @@ -0,0 +1,16 @@ +#N canvas 0 22 714 567 10; +#X obj 352 157 creb/ffpoly 3 5; +#X obj 352 97 loadbang; +#X obj 31 260 unit-test-frame; +#X obj 352 187 - 2; +#X msg 352 123 coefficients 83092; +#X msg 31 230 ffpoly; +#X obj 31 198 loadbang; +#X text 352 53 ffpoly - compute a finite field polynomial; +#X connect 0 0 3 0; +#X connect 1 0 4 0; +#X connect 2 2 0 0; +#X connect 3 0 2 1; +#X connect 4 0 0 0; +#X connect 5 0 2 0; +#X connect 6 0 5 0; diff --git a/unittests/ffpoly.wav b/unittests/ffpoly.wav new file mode 100644 index 0000000..6d86b90 Binary files /dev/null and b/unittests/ffpoly.wav differ diff --git a/unittests/filterortho~-unittest.pd b/unittests/filterortho~-unittest.pd new file mode 100644 index 0000000..609feda --- /dev/null +++ b/unittests/filterortho~-unittest.pd @@ -0,0 +1,21 @@ +#N canvas 0 22 743 565 10; +#X obj 376 215 creb/filterortho~; +#X msg 394 181 setBP 220 1; +#X obj 376 71 phasor~ 440; +#X obj 55 270 unit-test-frame~; +#X msg 439 40 0; +#X obj 394 152 loadbang; +#X msg 55 241 filterortho~ 200; +#X obj 55 202 loadbang; +#X obj 376 97 -~ 0.5; +#X obj 376 122 *~ 2; +#X connect 0 0 3 1; +#X connect 1 0 0 0; +#X connect 2 0 8 0; +#X connect 3 2 4 0; +#X connect 4 0 2 1; +#X connect 5 0 1 0; +#X connect 6 0 3 0; +#X connect 7 0 6 0; +#X connect 8 0 9 0; +#X connect 9 0 0 0; diff --git a/unittests/filterortho~.wav b/unittests/filterortho~.wav new file mode 100644 index 0000000..3d8db8f Binary files /dev/null and b/unittests/filterortho~.wav differ diff --git a/unittests/filterortho~subnormal-unittest .pd b/unittests/filterortho~subnormal-unittest .pd new file mode 100644 index 0000000..46618ac --- /dev/null +++ b/unittests/filterortho~subnormal-unittest .pd @@ -0,0 +1,228 @@ +#N canvas 427 28 691 516 10; +#X obj 69 197 bang~; +#X obj 39 222 snapshot~; +#X obj 38 46 bng 50 1000 50 0 empty empty empty 17 7 0 10 -262144 -260097 +-1; +#X obj 39 249 change; +#X obj 39 296 sel 0; +#X obj 39 322 f; +#X floatatom 55 365 17 0 0 0 - - -; +#X msg 141 59 \; pd dsp 1; +#X msg 205 59 \; pd dsp 1; +#X obj 116 3 loadbang; +#X obj 113 418 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 46 418 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 39 394 moses 1e-46; +#N canvas 582 172 303 432 single 0; +#X obj 27 20 inlet; +#X msg 115 163 NORMAL \$1; +#X msg 25 293 UNIT-TEST-DONE; +#X obj 26 390 print unit-test; +#X obj 54 364 stdout; +#X obj 134 390 outlet; +#X obj 25 247 t b a; +#X obj 53 328 list trim; +#X obj 25 215 pack s f s; +#X obj 81 187 r \$0-classname; +#X msg 26 163 SUBNORMAL \$1; +#X msg 80 45 2; +#X floatatom 80 102 15 0 0 0 - - -; +#X obj 79 17 loadbang; +#X obj 80 73 pow -126; +#X obj 27 124 moses; +#X text 91 122 smallest normal value for float; +#X msg 135 356 set \$1 \$2 \$3; +#X connect 0 0 15 0; +#X connect 1 0 8 0; +#X connect 2 0 3 0; +#X connect 2 0 4 0; +#X connect 6 0 2 0; +#X connect 6 1 17 0; +#X connect 6 1 7 0; +#X connect 7 0 3 0; +#X connect 7 0 4 0; +#X connect 8 0 6 0; +#X connect 9 0 8 2; +#X connect 10 0 8 0; +#X connect 11 0 14 0; +#X connect 13 0 11 0; +#X connect 14 0 12 0; +#X connect 14 0 15 1; +#X connect 15 0 10 0; +#X connect 15 1 1 0; +#X connect 17 0 5 0; +#X restore 103 442 pd single; +#N canvas 187 45 257 407 double 0; +#X obj 27 20 inlet; +#X msg 24 279 UNIT-TEST-DONE; +#X obj 25 366 print unit-test; +#X obj 52 339 stdout; +#X obj 131 366 outlet; +#X obj 25 241 t b a; +#X msg 115 143 NORMAL \$1; +#X obj 53 308 list trim; +#X obj 25 217 pack s f s; +#X obj 82 187 r \$0-classname; +#X msg 26 143 SUBNORMAL \$1; +#X msg 72 48 2; +#X obj 71 20 loadbang; +#X obj 72 76 pow -1022; +#X floatatom 73 111 20 0 0 0 - - -; +#X obj 27 108 moses; +#X msg 132 331 set \$1 \$2 \$3; +#X connect 0 0 15 0; +#X connect 1 0 3 0; +#X connect 1 0 2 0; +#X connect 5 0 1 0; +#X connect 5 1 16 0; +#X connect 5 1 7 0; +#X connect 6 0 8 0; +#X connect 7 0 2 0; +#X connect 7 0 3 0; +#X connect 8 0 5 0; +#X connect 9 0 8 2; +#X connect 10 0 8 0; +#X connect 11 0 13 0; +#X connect 12 0 11 0; +#X connect 13 0 14 0; +#X connect 13 0 15 1; +#X connect 15 0 10 0; +#X connect 15 1 6 0; +#X connect 16 0 4 0; +#X restore 39 442 pd double; +#X msg 39 477 SUBNORMAL 1.0581381223108e-310 filterortho~; +#N canvas 683 194 435 442 more 0; +#X msg 39 359 2; +#X floatatom 39 413 15 0 0 0 - - -; +#X obj 39 330 t b f; +#X msg 38 46 2; +#X floatatom 55 99 15 0 0 0 - - -; +#X obj 38 385 pow; +#X obj 37 18 loadbang; +#X floatatom 38 306 5 0 0 0 - - -; +#X floatatom 40 155 15 0 0 0 - - -; +#X text 36 254 check how small a non-zero value can be represented +; +#X text 37 184 Some CPU architectures support denormal numbers by default. +Repeated calculation of subnormal numbers can happen in recursive filters +\, feedback delay lines \, reverb simulators etc. This slows down calculation +considerably.; +#X obj 54 71 pow -126; +#X obj 39 126 pow -1022; +#X text 143 154 smallest bnormal value for double; +#X msg 39 277 -127; +#X msg 82 276 -1023; +#X text 156 98 smallest normal value for float; +#X connect 0 0 5 0; +#X connect 2 0 0 0; +#X connect 2 1 5 1; +#X connect 3 0 11 0; +#X connect 3 0 12 0; +#X connect 5 0 1 0; +#X connect 6 0 3 0; +#X connect 7 0 2 0; +#X connect 11 0 4 0; +#X connect 12 0 8 0; +#X connect 14 0 7 0; +#X connect 15 0 7 0; +#X restore 307 142 pd more; +#X text 57 343 smallest non-zero number seen by [snapshot~]; +#X text 301 74 In this patch we test if the subnormals-flush routine +works as expected. Open [pd more] to see how small subnormals can go +for a given precision.; +#X obj 336 476 s \$0-classname; +#X obj 336 448 symbol; +#X obj 337 398 loadbang; +#X obj 39 166 creb/filterortho~; +#X msg 336 423 filterortho~; +#X text 303 6 [creb/filterortho~] checks for subnormals once per signal +block. Therefore \, subnormals do happen when the curve approaches +zero \, but only for a short period of time (depending on blocksize). +; +#X obj 115 29 t b b; +#N canvas 550 199 205 218 click~ 0; +#X obj 35 25 inlet; +#X obj 37 127 sig~; +#X msg 36 90 50; +#X msg 74 88 0; +#X obj 74 59 delay 2; +#X obj 37 169 outlet~; +#X connect 0 0 2 0; +#X connect 0 0 4 0; +#X connect 1 0 5 0; +#X connect 2 0 1 0; +#X connect 3 0 1 0; +#X connect 4 0 3 0; +#X restore 39 111 pd click~; +#X obj 39 272 abs; +#N canvas 626 222 402 246 write 0; +#X obj 27 38 inlet; +#X obj 25 198 tabwrite \$0-smallnumbers; +#X obj 26 91 t f b; +#X obj 54 132 f; +#X obj 85 132 + 1; +#X obj 132 35 inlet; +#X msg 132 89 const 0; +#X msg 70 94 0; +#X obj 133 133 s \$0-smallnumbers; +#X msg 188 89 arrayviewclose; +#X connect 0 0 2 0; +#X connect 2 0 1 0; +#X connect 2 1 3 0; +#X connect 3 0 4 0; +#X connect 3 0 1 1; +#X connect 4 0 3 1; +#X connect 5 0 6 0; +#X connect 5 0 7 0; +#X connect 5 0 9 0; +#X connect 6 0 8 0; +#X connect 7 0 3 1; +#X connect 9 0 8 0; +#X restore 79 323 pd write; +#X obj 457 211 s \$0-smallnumbers; +#X msg 456 179 arrayviewlistnew; +#X obj 455 250 table \$0-smallnumbers 10000; +#X obj 169 198 snapshot~; +#X obj 169 225 change; +#X obj 169 172 metro 100; +#X obj 168 143 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X floatatom 179 253 20 0 0 0 - - -; +#X obj 168 277 print; +#X msg 53 137 setBP 100 2; +#X connect 0 0 1 0; +#X connect 1 0 3 0; +#X connect 2 0 26 0; +#X connect 2 0 28 1; +#X connect 3 0 27 0; +#X connect 4 0 5 0; +#X connect 4 1 5 1; +#X connect 4 1 28 0; +#X connect 5 0 6 0; +#X connect 5 0 12 0; +#X connect 9 0 25 0; +#X connect 12 0 11 0; +#X connect 12 0 14 0; +#X connect 12 1 10 0; +#X connect 12 1 13 0; +#X connect 13 0 15 0; +#X connect 14 0 15 0; +#X connect 20 0 19 0; +#X connect 21 0 23 0; +#X connect 22 0 1 0; +#X connect 22 0 32 0; +#X connect 23 0 20 0; +#X connect 25 0 2 0; +#X connect 25 1 7 0; +#X connect 25 1 38 0; +#X connect 26 0 22 0; +#X connect 27 0 4 0; +#X connect 30 0 29 0; +#X connect 32 0 33 0; +#X connect 33 0 36 0; +#X connect 33 0 37 0; +#X connect 34 0 32 0; +#X connect 35 0 34 0; +#X connect 38 0 22 0; diff --git a/unittests/fwarp-unittest.pd b/unittests/fwarp-unittest.pd new file mode 100644 index 0000000..bc4ee8d --- /dev/null +++ b/unittests/fwarp-unittest.pd @@ -0,0 +1,11 @@ +#N canvas 10 120 697 488 10; +#X obj 346 152 creb/fwarp; +#X obj 25 203 unit-test-frame; +#X obj 346 119 / 512; +#X msg 25 165 fwarp 0; +#X obj 25 133 loadbang; +#X connect 0 0 1 1; +#X connect 1 2 2 0; +#X connect 2 0 0 0; +#X connect 3 0 1 0; +#X connect 4 0 3 0; diff --git a/unittests/fwarp.wav b/unittests/fwarp.wav new file mode 100644 index 0000000..e387e29 Binary files /dev/null and b/unittests/fwarp.wav differ diff --git a/unittests/junction.wav b/unittests/junction.wav new file mode 100644 index 0000000..2fe31c3 Binary files /dev/null and b/unittests/junction.wav differ diff --git a/unittests/junction~-unittest.pd b/unittests/junction~-unittest.pd new file mode 100644 index 0000000..287c76b --- /dev/null +++ b/unittests/junction~-unittest.pd @@ -0,0 +1,34 @@ +#N canvas 0 22 692 541 10; +#X obj 21 262 unit-test-frame~; +#X msg 21 226 junction 12; +#X obj 342 103 osc~ 440; +#X obj 373 125 osc~ 550; +#X obj 404 147 osc~ 660; +#X obj 435 170 osc~ 7700; +#X msg 486 60 0; +#X obj 342 226 *~ 0.25; +#X obj 21 192 loadbang; +#X obj 342 196 creb/junction~ 4; +#X text 24 45 For the reproducable test \, circular junction is not +applied; +#X msg 264 167 random 3; +#X obj 264 134 loadbang; +#X text 23 20 junction~: a circular lossless signal junction; +#X connect 0 2 6 0; +#X connect 1 0 0 0; +#X connect 2 0 9 0; +#X connect 3 0 9 1; +#X connect 4 0 9 2; +#X connect 5 0 9 3; +#X connect 6 0 2 1; +#X connect 6 0 3 1; +#X connect 6 0 4 1; +#X connect 6 0 5 1; +#X connect 7 0 0 1; +#X connect 8 0 1 0; +#X connect 9 0 7 0; +#X connect 9 1 7 0; +#X connect 9 2 7 0; +#X connect 9 3 7 0; +#X connect 11 0 9 0; +#X connect 12 0 11 0; diff --git a/unittests/lattice~-unittest.pd b/unittests/lattice~-unittest.pd new file mode 100644 index 0000000..55257bf --- /dev/null +++ b/unittests/lattice~-unittest.pd @@ -0,0 +1,46 @@ +#N canvas 0 22 681 692 10; +#X obj 339 -75 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 +-1 -1 14250 1; +#X obj 370 -76 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 +-1 -1 15950 1; +#X obj 401 -75 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 +-1 -1 17350 1; +#X obj 431 -75 vsl 15 250 -1 1 0 1 empty empty empty 20 8 0 8 -262144 +-1 -1 18350 1; +#X msg 370 201 rc 1 \$1; +#X msg 401 226 rc 2 \$1; +#X msg 431 202 rc 3 \$1; +#X floatatom 431 -106 5 -1 1 0 - - -; +#X text 434 278 lattice~ a lattice filter; +#X text 434 291 creation argument sets order; +#X obj 18 315 unit-test-frame~; +#X obj 232 163 phasor~ 440; +#X msg 295 137 0; +#X obj 232 194 -~ 0.5; +#X obj 18 250 loadbang; +#X msg 18 280 lattice~ 200; +#X obj 339 261 creb/lattice~ 4; +#X obj 339 285 *~ 0.5; +#X msg 339 225 rc 0 \$1; +#X floatatom 439 184 5 0 0 0 - - -; +#X connect 0 0 18 0; +#X connect 1 0 4 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 3 0 19 0; +#X connect 4 0 16 0; +#X connect 5 0 16 0; +#X connect 6 0 16 0; +#X connect 7 0 0 0; +#X connect 7 0 1 0; +#X connect 7 0 2 0; +#X connect 7 0 3 0; +#X connect 10 0 12 0; +#X connect 11 0 13 0; +#X connect 12 0 11 1; +#X connect 13 0 16 0; +#X connect 14 0 15 0; +#X connect 15 0 10 0; +#X connect 16 0 17 0; +#X connect 17 0 10 1; +#X connect 18 0 16 0; diff --git a/unittests/lattice~.wav b/unittests/lattice~.wav new file mode 100644 index 0000000..585e92d Binary files /dev/null and b/unittests/lattice~.wav differ diff --git a/unittests/permute~.wav b/unittests/permute~.wav new file mode 100644 index 0000000..4434251 Binary files /dev/null and b/unittests/permute~.wav differ diff --git a/unittests/permut~-unittest.pd b/unittests/permut~-unittest.pd new file mode 100644 index 0000000..907ff08 --- /dev/null +++ b/unittests/permut~-unittest.pd @@ -0,0 +1,17 @@ +#N canvas 0 22 705 451 10; +#X obj 342 105 creb/permut~; +#X obj 21 164 unit-test-frame~; +#X msg 21 125 permute~ 0; +#X obj 21 95 loadbang; +#X obj 342 76 phasor~ 440; +#X msg 405 45 0; +#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 connect 0 0 1 1; +#X connect 1 2 5 0; +#X connect 2 0 1 0; +#X connect 3 0 2 0; +#X connect 4 0 0 0; +#X connect 5 0 4 1; diff --git a/unittests/qmult~-unittest.pd b/unittests/qmult~-unittest.pd new file mode 100644 index 0000000..2811f63 --- /dev/null +++ b/unittests/qmult~-unittest.pd @@ -0,0 +1,52 @@ +#N canvas 25 75 735 544 10; +#X obj 72 106 osc~ 30; +#X obj 153 107 osc~ 40; +#X obj 232 106 osc~ 50; +#X obj 313 108 osc~ 60; +#X text 477 207 qmult multiplies 2 quaternion signals; +#X obj 400 106 osc~ 70; +#X obj 481 106 osc~ 80; +#X obj 560 105 osc~ 90; +#X obj 641 104 osc~ 100; +#X text 485 225 "quaternion ring modulation"; +#X obj 47 264 unit-test-frame~; +#X msg 402 51 0; +#X msg 47 235 qmult~ 100; +#X obj 47 208 loadbang; +#X obj 327 211 creb/qmult~ 0 0 0 0 0; +#X obj 72 135 *~ 0.707107; +#X obj 153 134 *~ 0.707107; +#X obj 232 134 *~ 0.707107; +#X obj 313 133 *~ 0.707107; +#X obj 400 134 *~ 0.707107; +#X obj 481 133 *~ 0.707107; +#X obj 560 133 *~ 0.707107; +#X obj 641 132 *~ 0.707107; +#X connect 0 0 15 0; +#X connect 1 0 16 0; +#X connect 2 0 17 0; +#X connect 3 0 18 0; +#X connect 5 0 19 0; +#X connect 6 0 20 0; +#X connect 7 0 21 0; +#X connect 8 0 22 0; +#X connect 10 1 11 0; +#X connect 11 0 0 1; +#X connect 11 0 1 1; +#X connect 11 0 2 1; +#X connect 11 0 3 1; +#X connect 11 0 5 1; +#X connect 11 0 6 1; +#X connect 11 0 7 1; +#X connect 11 0 8 1; +#X connect 12 0 10 0; +#X connect 13 0 12 0; +#X connect 14 1 10 1; +#X connect 15 0 14 0; +#X connect 16 0 14 1; +#X connect 17 0 14 2; +#X connect 18 0 14 3; +#X connect 19 0 14 4; +#X connect 20 0 14 5; +#X connect 21 0 14 6; +#X connect 22 0 14 7; diff --git a/unittests/qmult~.wav b/unittests/qmult~.wav new file mode 100644 index 0000000..ba3c925 Binary files /dev/null and b/unittests/qmult~.wav differ diff --git a/unittests/qnorm.wav b/unittests/qnorm.wav new file mode 100644 index 0000000..7ee9395 Binary files /dev/null and b/unittests/qnorm.wav differ diff --git a/unittests/qnorm~-unittest.pd b/unittests/qnorm~-unittest.pd new file mode 100644 index 0000000..b0c4ead --- /dev/null +++ b/unittests/qnorm~-unittest.pd @@ -0,0 +1,23 @@ +#N canvas 0 22 733 553 10; +#X obj 347 169 osc~ 30; +#X obj 410 169 osc~ 40; +#X obj 472 168 osc~ 50; +#X obj 527 168 osc~ 60; +#X obj 370 238 creb/qnorm~; +#X msg 386 114 0; +#X obj 70 282 unit-test-frame~; +#X text 324 64 qnorm normalizes a quaternion signal to unit norm; +#X msg 70 248 qnorm 100; +#X obj 70 221 loadbang; +#X connect 0 0 4 0; +#X connect 1 0 4 1; +#X connect 2 0 4 2; +#X connect 3 0 4 3; +#X connect 4 1 6 1; +#X connect 5 0 0 1; +#X connect 5 0 1 1; +#X connect 5 0 2 1; +#X connect 5 0 3 1; +#X connect 6 0 5 0; +#X connect 8 0 6 0; +#X connect 9 0 8 0; diff --git a/unittests/ramp~-unittest.pd b/unittests/ramp~-unittest.pd new file mode 100644 index 0000000..a2e09db --- /dev/null +++ b/unittests/ramp~-unittest.pd @@ -0,0 +1,23 @@ +#N canvas 39 54 741 577 10; +#X obj 39 248 unit-test-frame~; +#X obj 30 67 cnv 15 150 150 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X text 38 106 1 - reference name; +#X text 38 125 2 - test delay in ms; +#X text 37 86 test arguments (list):; +#X obj 39 154 loadbang; +#X obj 323 67 cnv 15 150 150 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X msg 360 142 0; +#X text 337 85 system under test; +#X text 322 29 Use a bang from one of [unit-test-frame~] outlets to +reset phase at test start.; +#X obj 360 169 creb/ramp~; +#X msg 39 183 ramp~ 0; +#X obj 360 223 /~ 512; +#X connect 0 2 7 0; +#X connect 5 0 11 0; +#X connect 7 0 10 0; +#X connect 10 0 12 0; +#X connect 11 0 0 0; +#X connect 12 0 0 1; diff --git a/unittests/ramp~.wav b/unittests/ramp~.wav new file mode 100644 index 0000000..5f15797 Binary files /dev/null and b/unittests/ramp~.wav differ diff --git a/unittests/ratio-unittest.pd b/unittests/ratio-unittest.pd new file mode 100644 index 0000000..b195981 --- /dev/null +++ b/unittests/ratio-unittest.pd @@ -0,0 +1,16 @@ +#N canvas 0 22 746 542 10; +#X obj 352 71 creb/ratio; +#X obj 31 139 unit-test-frame; +#X msg 31 112 ratio 0; +#X obj 31 87 loadbang; +#X text 104 41 ratio is an octave shifter.; +#X text 103 55 output is between 1 and 2; +#X text 104 71 it computes 2^(log2(x)-int(log2(x))); +#X obj 351 44 + 1; +#X obj 352 100 - 1; +#X connect 0 0 8 0; +#X connect 1 2 7 0; +#X connect 2 0 1 0; +#X connect 3 0 2 0; +#X connect 7 0 0 0; +#X connect 8 0 1 1; diff --git a/unittests/ratio.wav b/unittests/ratio.wav new file mode 100644 index 0000000..ec09d1e Binary files /dev/null and b/unittests/ratio.wav differ diff --git a/unittests/resofilt~-unittest.pd b/unittests/resofilt~-unittest.pd new file mode 100644 index 0000000..dd3a7e4 --- /dev/null +++ b/unittests/resofilt~-unittest.pd @@ -0,0 +1,25 @@ +#N canvas 83 173 720 497 10; +#X obj 55 226 unit-test-frame~; +#X obj 376 35 phasor~ 440; +#X obj 422 115 sig~ 1000; +#X obj 469 145 sig~ 0.999; +#X obj 376 62 -~ 0.5; +#X obj 376 88 *~ 2; +#X msg 439 12 0; +#X obj 55 156 loadbang; +#X text 12 30 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 obj 376 177 creb/resofilt~ 4; +#X msg 55 189 resofilt~ 100; +#X connect 0 2 6 0; +#X connect 1 0 4 0; +#X connect 2 0 9 1; +#X connect 3 0 9 2; +#X connect 4 0 5 0; +#X connect 5 0 9 0; +#X connect 6 0 1 1; +#X connect 7 0 10 0; +#X connect 9 0 0 1; +#X connect 10 0 0 0; diff --git a/unittests/resofilt~.wav b/unittests/resofilt~.wav new file mode 100644 index 0000000..10f42e7 Binary files /dev/null and b/unittests/resofilt~.wav differ diff --git a/unittests/sbosc~-unittest.pd b/unittests/sbosc~-unittest.pd new file mode 100644 index 0000000..c1407e0 --- /dev/null +++ b/unittests/sbosc~-unittest.pd @@ -0,0 +1,14 @@ +#N canvas 83 84 706 444 10; +#X obj 32 160 unit-test-frame~; +#X obj 353 120 creb/sbosc~; +#X obj 353 37 sig~ 440; +#X obj 384 63 sig~ 550; +#X obj 32 58 loadbang; +#X msg 32 126 sbosc~ 0; +#X obj 32 96 delay 100; +#X connect 1 0 0 1; +#X connect 2 0 1 0; +#X connect 3 0 1 1; +#X connect 4 0 6 0; +#X connect 5 0 0 0; +#X connect 6 0 5 0; diff --git a/unittests/sbosc~.wav b/unittests/sbosc~.wav new file mode 100644 index 0000000..6bacef2 Binary files /dev/null and b/unittests/sbosc~.wav differ diff --git a/unittests/scrollgrid1D~-unittest.pd b/unittests/scrollgrid1D~-unittest.pd new file mode 100644 index 0000000..8bf9827 --- /dev/null +++ b/unittests/scrollgrid1D~-unittest.pd @@ -0,0 +1,35 @@ +#N canvas 194 118 757 495 10; +#X text 390 62 frequency; +#X text 484 60 T1; +#X text 534 60 T2; +#X text 586 61 N; +#X msg 398 81 350; +#X msg 520 81 1; +#X msg 576 80 3; +#X msg 475 80 12; +#X text 55 21 stabilized scroll grid chaotic oscillator with scroll +centers located on a line.; +#X obj 77 220 unit-test-frame~; +#X obj 398 159 -~ 1; +#X obj 398 26 loadbang; +#X obj 77 152 loadbang; +#X obj 398 131 creb/scrollgrid1D~; +#X obj 398 189 *~ 0.5; +#X obj 205 65 creb/scrollgrid1D~; +#X obj 206 90 creb/scrollgrid1D~; +#X obj 207 118 creb/scrollgrid1D~; +#X obj 207 144 creb/scrollgrid1D~; +#X msg 77 183 scrollgrid1D~ 0; +#X connect 4 0 13 0; +#X connect 5 0 13 2; +#X connect 6 0 13 3; +#X connect 7 0 13 1; +#X connect 10 0 14 0; +#X connect 11 0 4 0; +#X connect 11 0 7 0; +#X connect 11 0 5 0; +#X connect 11 0 6 0; +#X connect 12 0 19 0; +#X connect 13 0 10 0; +#X connect 14 0 9 1; +#X connect 19 0 9 0; diff --git a/unittests/scrollgrid1D~.wav b/unittests/scrollgrid1D~.wav new file mode 100644 index 0000000..f01f4da Binary files /dev/null and b/unittests/scrollgrid1D~.wav differ diff --git a/unittests/statwav~.wav b/unittests/statwav~.wav new file mode 100644 index 0000000..6e0abf3 Binary files /dev/null and b/unittests/statwav~.wav differ diff --git a/unittests/statwav~unittest.pd b/unittests/statwav~unittest.pd new file mode 100644 index 0000000..ab10392 --- /dev/null +++ b/unittests/statwav~unittest.pd @@ -0,0 +1,28 @@ +#N canvas 169 49 764 603 10; +#X obj 63 320 unit-test-frame~; +#X obj 384 222 phasor~ 440; +#X msg 447 191 0; +#X obj 63 243 loadbang; +#X obj 95 40 hsl 250 170 0 127 0 0 empty empty empty -2 -8 0 10 -228856 +-228856 -1 0 1; +#N canvas 0 22 450 300 (subpatch) 0; +#X array \$0-statwavtest 64 float 3; +#A 0 0 0 0.0714278 0.142856 0.242855 0.371425 0.485709 0.571423 0.628565 +0.685707 0.714278 0.714278 0.585708 0.38571 0.25714 0.142856 0 -0.12857 +-0.242855 -0.371425 -0.442852 -0.51428 -0.542851 -0.557137 -0.585708 +-0.614279 -0.614279 -0.542851 -0.414281 -0.171427 0 0.0857134 0.142856 +0.157141 0.157141 0.142856 0.142856 0.0714278 -0.0571423 -0.171427 +-0.271426 -0.357139 -0.442852 -0.51428 -0.542851 -0.542851 -0.542851 +-0.485709 -0.342854 0.171427 0.414281 0.585708 0.685707 0.785706 0.828563 +0.885705 0.914276 0.914276 0.871419 0.785706 0.599994 0.428567 0.185712 +0.17857; +#X coords 0 1 64 -1 200 140 1; +#X restore 117 62 graph; +#X obj 384 274 creb/statwav~ \$0-statwavtest; +#X msg 63 278 statwav~ 0; +#X connect 0 2 2 0; +#X connect 1 0 6 0; +#X connect 2 0 1 1; +#X connect 3 0 7 0; +#X connect 6 0 0 1; +#X connect 7 0 0 0; diff --git a/unittests/tabreadmix~.wav b/unittests/tabreadmix~.wav new file mode 100644 index 0000000..35db491 Binary files /dev/null and b/unittests/tabreadmix~.wav differ diff --git a/unittests/tabreadmix~unittest.pd b/unittests/tabreadmix~unittest.pd new file mode 100644 index 0000000..e1c79f5 --- /dev/null +++ b/unittests/tabreadmix~unittest.pd @@ -0,0 +1,37 @@ +#N canvas 0 22 764 603 10; +#X obj 63 320 unit-test-frame~; +#X obj 384 222 phasor~ 440; +#X msg 447 191 0; +#X obj 585 219 loadbang; +#X obj 63 243 loadbang; +#X obj 384 274 creb/tabreadmix~ \$0-tabreadmixtest; +#X obj 384 249 *~ 64; +#X msg 428 249 bang; +#X msg 585 245 32; +#X msg 63 277 tabreadmix~ 100; +#X obj 95 40 hsl 250 170 0 127 0 0 empty empty empty -2 -8 0 10 -228856 +-228856 -1 0 1; +#N canvas 0 22 450 300 (subpatch) 0; +#X array \$0-tabreadmixtest 64 float 3; +#A 0 0 0 0.0714278 0.142856 0.242855 0.371425 0.485709 0.571423 0.628565 +0.685707 0.714278 0.714278 0.585708 0.38571 0.25714 0.142856 0 -0.12857 +-0.242855 -0.371425 -0.442852 -0.51428 -0.542851 -0.557137 -0.585708 +-0.614279 -0.614279 -0.542851 -0.414281 -0.171427 0 0.0857134 0.142856 +0.157141 0.157141 0.142856 0.142856 0.0714278 -0.0571423 -0.171427 +-0.271426 -0.357139 -0.442852 -0.51428 -0.542851 -0.542851 -0.542851 +-0.485709 -0.342854 0.171427 0.414281 0.585708 0.685707 0.785706 0.828563 +0.885705 0.914276 0.914276 0.871419 0.785706 0.599994 0.428567 0.185712 +0.17857; +#X coords 0 1 64 -1 200 140 1; +#X restore 120 60 graph; +#X connect 0 2 2 0; +#X connect 1 0 6 0; +#X connect 2 0 1 1; +#X connect 2 0 7 0; +#X connect 3 0 8 0; +#X connect 4 0 9 0; +#X connect 5 0 0 1; +#X connect 6 0 5 0; +#X connect 7 0 5 0; +#X connect 8 0 5 1; +#X connect 9 0 0 0; diff --git a/unittests/xfm~-unittest.pd b/unittests/xfm~-unittest.pd new file mode 100644 index 0000000..16b45b0 --- /dev/null +++ b/unittests/xfm~-unittest.pd @@ -0,0 +1,38 @@ +#N canvas 0 22 749 571 10; +#X obj 369 228 creb/xfm~ 1; +#X obj 48 281 unit-test-frame~; +#X floatatom 369 196 5 0 0 0 - - -; +#X floatatom 406 196 5 0 0 0 - - -; +#X floatatom 456 196 5 0 0 0 - - -; +#X floatatom 506 196 5 0 0 0 - - -; +#X text 366 173 freq1; +#X text 403 173 freq2; +#X text 461 174 fb1; +#X text 505 175 fb2; +#X obj 397 40 hsl 300 15 1 20000 1 1 empty empty empty -2 -6 0 8 -262144 +-1 -1 15000 1; +#X obj 397 62 hsl 300 15 1 20000 1 1 empty empty empty -2 -6 0 8 -262144 +-1 -1 12900 1; +#X obj 398 87 hsl 300 15 1 20000 1 1 empty empty empty -2 -6 0 8 -262144 +-1 -1 18138 1; +#X obj 398 112 hsl 300 15 1 20000 1 1 empty empty empty -2 -6 0 8 -262144 +-1 -1 19400 1; +#X msg 321 197 reset; +#X obj 48 220 loadbang; +#X text 52 43 xfm~ cross frequency modulation; +#X text 51 62 freq_osc1 = freq1 + wave_out2*fb1; +#X text 51 77 freq_osc2 = freq2 + wave_out1*fb2; +#X msg 48 247 xfm~ 0; +#X connect 0 0 1 1; +#X connect 1 0 14 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 10 0 2 0; +#X connect 11 0 3 0; +#X connect 12 0 4 0; +#X connect 13 0 5 0; +#X connect 14 0 0 0; +#X connect 15 0 19 0; +#X connect 19 0 1 0; diff --git a/unittests/xfm~.wav b/unittests/xfm~.wav new file mode 100644 index 0000000..7b09c0a Binary files /dev/null and b/unittests/xfm~.wav differ -- cgit v1.2.1