diff options
author | Katja <katjav@users.sourceforge.net> | 2011-11-13 15:09:18 +0000 |
---|---|---|
committer | Katja <katjav@users.sourceforge.net> | 2011-11-13 15:09:18 +0000 |
commit | 04f9a0c239d6f38d7f5ed70671d70ec30beb7bf5 (patch) | |
tree | fa3b377c2c52e421df05619f2a3506455cf12806 | |
parent | 3129cef9f1b75aeb36ff7ab20c027f949030c966 (diff) |
add unittest dir plus content to smlib
svn path=/trunk/externals/smlib/; revision=15735
74 files changed, 982 insertions, 0 deletions
diff --git a/unittests/bp-unittest.pd b/unittests/bp-unittest.pd new file mode 100644 index 0000000..1ba4f93 --- /dev/null +++ b/unittests/bp-unittest.pd @@ -0,0 +1,20 @@ +#N canvas 390 195 728 520 10; +#X obj 49 128 unit-test-frame; +#X msg 49 90 bp 0; +#X obj 49 58 loadbang; +#X obj 370 23 - 0.5; +#X msg 382 58 clear; +#X obj 370 -34 & 127; +#X obj 370 -3 / 128; +#X obj 370 89 smlib/bp 0.05 4; +#X text 48 -23 bp: bandpass filter on float stream; +#X text 46 -5 the non-audio version of bp~; +#X connect 0 2 5 0; +#X connect 0 3 4 0; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X connect 3 0 7 0; +#X connect 4 0 7 0; +#X connect 5 0 6 0; +#X connect 6 0 3 0; +#X connect 7 0 0 1; diff --git a/unittests/bp.wav b/unittests/bp.wav Binary files differnew file mode 100644 index 0000000..27788cc --- /dev/null +++ b/unittests/bp.wav diff --git a/unittests/decimator-unittest.pd b/unittests/decimator-unittest.pd new file mode 100644 index 0000000..fcdf4ab --- /dev/null +++ b/unittests/decimator-unittest.pd @@ -0,0 +1,15 @@ +#N canvas 429 42 759 521 10; +#X obj 49 128 unit-test-frame; +#X obj 49 58 loadbang; +#X obj 370 -14 & 127; +#X msg 49 91 decimator 0; +#X obj 370 45 - 1; +#X obj 370 14 / 64; +#X obj 370 73 smlib/decimator 2; +#X connect 0 2 2 0; +#X connect 1 0 3 0; +#X connect 2 0 5 0; +#X connect 3 0 0 0; +#X connect 4 0 6 0; +#X connect 5 0 4 0; +#X connect 6 0 0 1; diff --git a/unittests/decimator.wav b/unittests/decimator.wav Binary files differnew file mode 100644 index 0000000..760d74f --- /dev/null +++ b/unittests/decimator.wav diff --git a/unittests/deltas-unittest.pd b/unittests/deltas-unittest.pd new file mode 100644 index 0000000..2a5ee49 --- /dev/null +++ b/unittests/deltas-unittest.pd @@ -0,0 +1,33 @@ +#N canvas 429 42 759 521 10; +#X obj 49 128 unit-test-frame; +#X obj 49 58 loadbang; +#X obj 397 67 - 1; +#X msg 49 91 deltas 0; +#X text 39 -60 deltas: generates vector with differences between last +input and past inputs; +#X text 235 31 x(i)-x(i-a); +#X text 235 45 x(i)-x(i-(a+1)); +#X text 235 59 x(i)-x(i-(a+2)); +#X text 235 85 x(i)-x(i-(b)); +#X text 526 28 [deltas a b c]; +#X text 525 74 requires b<=c; +#X text 525 58 c = buffer size; +#X obj 370 -11 cos; +#X obj 370 38 t b f; +#X text 41 -22 ('vector' = list); +#X obj 370 13 * 0.25; +#X obj 370 -38 / 32; +#X msg 427 67 clear; +#X obj 370 96 smlib/deltas 64 64 128; +#X connect 0 2 16 0; +#X connect 0 3 17 0; +#X connect 1 0 3 0; +#X connect 2 0 18 0; +#X connect 3 0 0 0; +#X connect 12 0 15 0; +#X connect 13 0 18 0; +#X connect 13 1 2 0; +#X connect 15 0 13 0; +#X connect 16 0 12 0; +#X connect 17 0 18 0; +#X connect 18 0 0 1; diff --git a/unittests/deltas.wav b/unittests/deltas.wav Binary files differnew file mode 100644 index 0000000..8fccd8d --- /dev/null +++ b/unittests/deltas.wav diff --git a/unittests/hip-unittest.pd b/unittests/hip-unittest.pd new file mode 100644 index 0000000..87c1d3c --- /dev/null +++ b/unittests/hip-unittest.pd @@ -0,0 +1,20 @@ +#N canvas 453 60 728 520 10; +#X obj 49 128 unit-test-frame; +#X obj 49 58 loadbang; +#X msg 382 31 clear; +#X obj 370 -34 & 127; +#X msg 49 90 hip 0; +#X obj 370 62 smlib/hip 0.01 4; +#X obj 370 -3 / 64; +#X obj 370 91 + 0.5; +#X text 49 -33 hip: highpass filter on float stream; +#X text 47 -15 the non-audio version of hip~; +#X connect 0 2 3 0; +#X connect 0 3 2 0; +#X connect 1 0 4 0; +#X connect 2 0 5 0; +#X connect 3 0 6 0; +#X connect 4 0 0 0; +#X connect 5 0 7 0; +#X connect 6 0 5 0; +#X connect 7 0 0 1; diff --git a/unittests/hip.wav b/unittests/hip.wav Binary files differnew file mode 100644 index 0000000..90a4503 --- /dev/null +++ b/unittests/hip.wav diff --git a/unittests/hist-unittest.pd b/unittests/hist-unittest.pd new file mode 100644 index 0000000..c084707 --- /dev/null +++ b/unittests/hist-unittest.pd @@ -0,0 +1,83 @@ +#N canvas 90 37 722 560 10; +#X obj 49 186 unit-test-frame; +#X obj 49 58 loadbang; +#X msg 426 64 clear; +#X msg 49 90 hist 0; +#X obj 370 6 cos; +#X msg 306 64 absolute; +#N canvas 628 152 504 542 list-drip 0; +#X obj 68 94 t a a; +#X obj 68 251 spigot; +#X obj 101 159 bang; +#X obj 101 185 1; +#X obj 207 160 route bang; +#X obj 170 160 bang; +#X obj 170 186 0; +#X obj 101 124 list split 2; +#X obj 134 348 list split; +#X obj 191 297 list length; +#X obj 191 319 >> 1; +#X obj 68 280 t a a a a; +#X obj 68 439 list split; +#X obj 125 391 list length; +#X obj 125 416 >> 1; +#X obj 41 29 inlet; +#X obj 264 186 outlet; +#X text 83 29 Copyright 2009 by Mathieu Bouchard; +#X obj 41 63 t b a; +#X obj 328 80 outlet; +#X text 383 82 signal end of list; +#X text 35 502 made compatible with [list-drip]: fbar 2009; +#X connect 0 0 1 0; +#X connect 0 1 7 0; +#X connect 1 0 11 0; +#X connect 2 0 3 0; +#X connect 3 0 1 1; +#X connect 4 1 16 0; +#X connect 5 0 6 0; +#X connect 6 0 1 1; +#X connect 7 0 2 0; +#X connect 7 2 4 0; +#X connect 7 2 5 0; +#X connect 8 0 0 0; +#X connect 9 0 10 0; +#X connect 10 0 8 1; +#X connect 11 0 12 0; +#X connect 11 1 13 0; +#X connect 11 2 8 0; +#X connect 11 3 9 0; +#X connect 12 1 0 0; +#X connect 13 0 14 0; +#X connect 14 0 12 1; +#X connect 15 0 18 0; +#X connect 18 0 19 0; +#X connect 18 1 0 0; +#X restore 370 125 pd list-drip; +#X obj 370 -46 / 128; +#X obj 370 36 abs; +#X obj 370 -19 * 3.14159; +#X text 116 -52 hist: histograms; +#X text 116 -9 - value of first class; +#X text 116 18 - number of classes; +#X text 116 5 - value of last class; +#X text 114 -24 arguments:; +#X text 116 53 - array of samples in classes; +#X text 114 38 output:; +#X obj 370 64 pow 0.5; +#X obj 370 98 smlib/hist 0 1 512; +#X obj 370 151 / 8; +#X connect 0 1 5 0; +#X connect 0 2 7 0; +#X connect 0 3 2 0; +#X connect 1 0 3 0; +#X connect 2 0 18 0; +#X connect 3 0 0 0; +#X connect 4 0 8 0; +#X connect 5 0 18 0; +#X connect 6 0 19 0; +#X connect 7 0 9 0; +#X connect 8 0 17 0; +#X connect 9 0 4 0; +#X connect 17 0 18 0; +#X connect 18 0 6 0; +#X connect 19 0 0 1; diff --git a/unittests/hist.wav b/unittests/hist.wav Binary files differnew file mode 100644 index 0000000..8347db0 --- /dev/null +++ b/unittests/hist.wav diff --git a/unittests/itov-unittest.pd b/unittests/itov-unittest.pd new file mode 100644 index 0000000..4cebb3c --- /dev/null +++ b/unittests/itov-unittest.pd @@ -0,0 +1,29 @@ +#N canvas 407 51 722 560 10; +#X obj 49 186 unit-test-frame; +#X obj 49 58 loadbang; +#X msg 49 90 itov 0; +#X text 118 41 - value of first class; +#X text 118 68 - number of classes; +#X text 118 55 - value of last class; +#X text 117 26 arguments:; +#X text 117 88 output:; +#X text 121 -33 itov: intex to value; +#X text 118 -4 input:; +#X text 119 12 - class index; +#X text 114 151 out-of-range input is clipped; +#X text 118 117 - center value of class i; +#X text 118 103 - lower value of class i; +#X text 118 131 - upper value of class i; +#X obj 318 66 cos; +#X obj 318 42 / 128; +#X obj 318 89 + 1; +#X obj 318 138 smlib/itov 0 1 512; +#X obj 318 112 * 256; +#X connect 0 2 16 0; +#X connect 1 0 2 0; +#X connect 2 0 0 0; +#X connect 15 0 17 0; +#X connect 16 0 15 0; +#X connect 17 0 19 0; +#X connect 18 1 0 1; +#X connect 19 0 18 0; diff --git a/unittests/itov.wav b/unittests/itov.wav Binary files differnew file mode 100644 index 0000000..b2ba59b --- /dev/null +++ b/unittests/itov.wav diff --git a/unittests/lavg-unittest.pd b/unittests/lavg-unittest.pd new file mode 100644 index 0000000..5415e78 --- /dev/null +++ b/unittests/lavg-unittest.pd @@ -0,0 +1,20 @@ +#N canvas 390 195 737 489 10; +#X obj 49 128 unit-test-frame; +#X obj 49 58 loadbang; +#X msg 382 58 clear; +#X obj 370 -34 & 127; +#X obj 370 88 smlib/lavg 10; +#X obj 370 -3 / 64; +#X obj 370 24 - 1; +#X text 37 -16 lavg: leaky average; +#X text 36 1 argument: half-decay time (in number of activations); +#X msg 49 88 lavg 0; +#X connect 0 2 3 0; +#X connect 0 3 2 0; +#X connect 1 0 9 0; +#X connect 2 0 4 0; +#X connect 3 0 5 0; +#X connect 4 0 0 1; +#X connect 5 0 6 0; +#X connect 6 0 4 0; +#X connect 9 0 0 0; diff --git a/unittests/lavg.wav b/unittests/lavg.wav Binary files differnew file mode 100644 index 0000000..ba96218 --- /dev/null +++ b/unittests/lavg.wav diff --git a/unittests/lhist-unittest.pd b/unittests/lhist-unittest.pd new file mode 100644 index 0000000..5af4d10 --- /dev/null +++ b/unittests/lhist-unittest.pd @@ -0,0 +1,83 @@ +#N canvas 410 122 722 560 10; +#X obj 49 186 unit-test-frame; +#X obj 49 58 loadbang; +#X msg 426 64 clear; +#X obj 370 6 cos; +#N canvas 628 152 504 542 list-drip 0; +#X obj 68 94 t a a; +#X obj 68 251 spigot; +#X obj 101 159 bang; +#X obj 101 185 1; +#X obj 207 160 route bang; +#X obj 170 160 bang; +#X obj 170 186 0; +#X obj 101 124 list split 2; +#X obj 134 348 list split; +#X obj 191 297 list length; +#X obj 191 319 >> 1; +#X obj 68 280 t a a a a; +#X obj 68 439 list split; +#X obj 125 391 list length; +#X obj 125 416 >> 1; +#X obj 41 29 inlet; +#X obj 264 186 outlet; +#X text 83 29 Copyright 2009 by Mathieu Bouchard; +#X obj 41 63 t b a; +#X obj 328 80 outlet; +#X text 383 82 signal end of list; +#X text 35 502 made compatible with [list-drip]: fbar 2009; +#X connect 0 0 1 0; +#X connect 0 1 7 0; +#X connect 1 0 11 0; +#X connect 2 0 3 0; +#X connect 3 0 1 1; +#X connect 4 1 16 0; +#X connect 5 0 6 0; +#X connect 6 0 1 1; +#X connect 7 0 2 0; +#X connect 7 2 4 0; +#X connect 7 2 5 0; +#X connect 8 0 0 0; +#X connect 9 0 10 0; +#X connect 10 0 8 1; +#X connect 11 0 12 0; +#X connect 11 1 13 0; +#X connect 11 2 8 0; +#X connect 11 3 9 0; +#X connect 12 1 0 0; +#X connect 13 0 14 0; +#X connect 14 0 12 1; +#X connect 15 0 18 0; +#X connect 18 0 19 0; +#X connect 18 1 0 0; +#X restore 370 123 pd list-drip; +#X obj 370 -46 / 128; +#X obj 370 36 abs; +#X obj 370 -19 * 3.14159; +#X text 116 -52 hist: histograms; +#X text 116 -9 - value of first class; +#X text 116 18 - number of classes; +#X text 116 5 - value of last class; +#X text 114 -24 arguments:; +#X text 116 53 - array of samples in classes; +#X text 114 38 output:; +#X obj 370 64 pow 0.5; +#X obj 370 151 / 8; +#X msg 306 64 absolute; +#X obj 370 98 smlib/lhist 0 1 512 20; +#X msg 49 90 lhist 0; +#X connect 0 1 17 0; +#X connect 0 2 5 0; +#X connect 0 3 2 0; +#X connect 1 0 19 0; +#X connect 2 0 18 0; +#X connect 3 0 6 0; +#X connect 4 0 16 0; +#X connect 5 0 7 0; +#X connect 6 0 15 0; +#X connect 7 0 3 0; +#X connect 15 0 18 0; +#X connect 16 0 0 1; +#X connect 17 0 18 0; +#X connect 18 0 4 0; +#X connect 19 0 0 0; diff --git a/unittests/lhist.wav b/unittests/lhist.wav Binary files differnew file mode 100644 index 0000000..8347db0 --- /dev/null +++ b/unittests/lhist.wav diff --git a/unittests/linspace-unittest.pd b/unittests/linspace-unittest.pd new file mode 100644 index 0000000..282faa8 --- /dev/null +++ b/unittests/linspace-unittest.pd @@ -0,0 +1,15 @@ +#N canvas 235 59 721 476 10; +#X obj 49 128 unit-test-frame; +#X obj 49 58 loadbang; +#X msg 49 90 linspace 0; +#X obj 370 51 t b b b b; +#X text 47 -9 generates a vector with linear spaced floats; +#X obj 370 89 smlib/linspace 0 1 128; +#X connect 0 3 3 0; +#X connect 1 0 2 0; +#X connect 2 0 0 0; +#X connect 3 0 5 0; +#X connect 3 1 5 0; +#X connect 3 2 5 0; +#X connect 3 3 5 0; +#X connect 5 0 0 1; diff --git a/unittests/linspace.wav b/unittests/linspace.wav Binary files differnew file mode 100644 index 0000000..c792c98 --- /dev/null +++ b/unittests/linspace.wav diff --git a/unittests/lmax-unittest.pd b/unittests/lmax-unittest.pd new file mode 100644 index 0000000..f468042 --- /dev/null +++ b/unittests/lmax-unittest.pd @@ -0,0 +1,20 @@ +#N canvas 390 195 728 520 10; +#X obj 49 128 unit-test-frame; +#X obj 49 58 loadbang; +#X obj 370 23 - 0.5; +#X msg 382 58 clear; +#X obj 370 -34 & 127; +#X obj 370 -3 / 128; +#X obj 370 87 smlib/lmax 10; +#X msg 49 90 lmax 0; +#X text 48 8 argument: half-decay time (in number of activations); +#X text 49 -9 lmax: leaky maximum; +#X connect 0 2 4 0; +#X connect 0 3 3 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 3 0 6 0; +#X connect 4 0 5 0; +#X connect 5 0 2 0; +#X connect 6 0 0 1; +#X connect 7 0 0 0; diff --git a/unittests/lmax.wav b/unittests/lmax.wav Binary files differnew file mode 100644 index 0000000..75c064a --- /dev/null +++ b/unittests/lmax.wav diff --git a/unittests/lmin-unittest.pd b/unittests/lmin-unittest.pd new file mode 100644 index 0000000..a2ac5d6 --- /dev/null +++ b/unittests/lmin-unittest.pd @@ -0,0 +1,21 @@ +#N canvas 390 195 728 520 10; +#X obj 49 128 unit-test-frame; +#X obj 49 58 loadbang; +#X obj 370 23 - 0.5; +#X msg 382 58 clear; +#X obj 370 -34 & 127; +#X obj 370 -3 / 128; +#X msg 49 89 lmin 0; +#X text 38 -2 argument: half-decay time (in number of activations) +; +#X text 39 -19 lmin: leaky minimum; +#X obj 370 87 smlib/lmin 20; +#X connect 0 2 4 0; +#X connect 0 3 3 0; +#X connect 1 0 6 0; +#X connect 2 0 9 0; +#X connect 3 0 9 0; +#X connect 4 0 5 0; +#X connect 5 0 2 0; +#X connect 6 0 0 0; +#X connect 9 0 0 1; diff --git a/unittests/lmin.wav b/unittests/lmin.wav Binary files differnew file mode 100644 index 0000000..a7de0ac --- /dev/null +++ b/unittests/lmin.wav diff --git a/unittests/lrange-unittest.pd b/unittests/lrange-unittest.pd new file mode 100644 index 0000000..8183527 --- /dev/null +++ b/unittests/lrange-unittest.pd @@ -0,0 +1,20 @@ +#N canvas 390 195 728 520 10; +#X obj 49 128 unit-test-frame; +#X obj 49 58 loadbang; +#X obj 370 23 - 0.5; +#X msg 382 58 clear; +#X obj 370 -34 & 127; +#X obj 370 -3 / 128; +#X text 24 1 argument: half-decay time (in number of activations); +#X text 25 -16 lrange: leaky maximum minus leaky minimum; +#X obj 370 87 smlib/lrange 20; +#X msg 49 89 lrange 0; +#X connect 0 2 4 0; +#X connect 0 3 3 0; +#X connect 1 0 9 0; +#X connect 2 0 8 0; +#X connect 3 0 8 0; +#X connect 4 0 5 0; +#X connect 5 0 2 0; +#X connect 8 0 0 1; +#X connect 9 0 0 0; diff --git a/unittests/lrange.wav b/unittests/lrange.wav Binary files differnew file mode 100644 index 0000000..f1e521f --- /dev/null +++ b/unittests/lrange.wav diff --git a/unittests/lsdt.wav b/unittests/lsdt.wav Binary files differnew file mode 100644 index 0000000..7eb87bf --- /dev/null +++ b/unittests/lsdt.wav diff --git a/unittests/lstd-unittest.pd b/unittests/lstd-unittest.pd new file mode 100644 index 0000000..0be41d5 --- /dev/null +++ b/unittests/lstd-unittest.pd @@ -0,0 +1,19 @@ +#N canvas 366 131 728 520 10; +#X obj 49 128 unit-test-frame; +#X obj 49 58 loadbang; +#X obj 370 78 smlib/lstd; +#X obj 370 27 cos; +#X obj 370 0 line 0 1; +#X msg 49 91 lsdt 500; +#X msg 370 -25 0 \, 128 500; +#X obj 370 53 * 2; +#X obj 370 102 clip 0 1; +#X connect 0 3 6 0; +#X connect 1 0 5 0; +#X connect 2 0 8 0; +#X connect 3 0 7 0; +#X connect 4 0 3 0; +#X connect 5 0 0 0; +#X connect 6 0 4 0; +#X connect 7 0 2 0; +#X connect 8 0 0 1; diff --git a/unittests/prevl-unittest.pd b/unittests/prevl-unittest.pd new file mode 100644 index 0000000..b23f5d0 --- /dev/null +++ b/unittests/prevl-unittest.pd @@ -0,0 +1,31 @@ +#N canvas 429 42 759 521 10; +#X obj 49 128 unit-test-frame; +#X obj 49 58 loadbang; +#X text 526 28 [deltas a b c]; +#X text 525 74 requires b<=c; +#X text 525 58 c = buffer size; +#X obj 370 -11 cos; +#X obj 370 38 t b f; +#X obj 370 13 * 0.25; +#X obj 370 -38 / 32; +#X msg 427 67 clear; +#X obj 370 96 smlib/prevl 64 64 128; +#X msg 49 91 prevl 0; +#X text -7 -44 prevl: generates vector with past input values (float) +; +#X text 215 66 ...; +#X text 217 27 x(i-a); +#X text 217 41 x(i-(a+1)); +#X text 217 55 x(i-(a+2)); +#X text 217 81 x(i-(b)); +#X connect 0 2 8 0; +#X connect 0 3 9 0; +#X connect 1 0 11 0; +#X connect 5 0 7 0; +#X connect 6 0 10 0; +#X connect 6 1 10 0; +#X connect 7 0 6 0; +#X connect 8 0 5 0; +#X connect 9 0 10 0; +#X connect 10 0 0 1; +#X connect 11 0 0 0; diff --git a/unittests/prevl.wav b/unittests/prevl.wav Binary files differnew file mode 100644 index 0000000..5f588ba --- /dev/null +++ b/unittests/prevl.wav diff --git a/unittests/threshold-unittest.pd b/unittests/threshold-unittest.pd new file mode 100644 index 0000000..c0980fb --- /dev/null +++ b/unittests/threshold-unittest.pd @@ -0,0 +1,25 @@ +#N canvas 136 22 740 495 10; +#X obj 49 186 unit-test-frame; +#X obj 49 121 loadbang; +#X msg 370 152 1; +#X msg 529 152 0; +#X obj 370 120 smlib/threshold 0.9 0 0.1 0; +#X obj 370 58 line 0 1; +#X obj 370 88 & 1; +#X msg 370 31 0 \, 512 600; +#X msg 49 154 threshold 700; +#X text 3 18 threshold monitors its input float stream and outputs +bangs when the signal exceeds a specified "trigger" value \, and also +when the input value recedes below a "rest" value. You can specify +debounce in number of floats received \, for the threshold~ to wait +after the two event types before triggering again.; +#X connect 0 3 7 0; +#X connect 1 0 8 0; +#X connect 2 0 0 1; +#X connect 3 0 0 1; +#X connect 4 0 2 0; +#X connect 4 1 3 0; +#X connect 5 0 6 0; +#X connect 6 0 4 0; +#X connect 7 0 5 0; +#X connect 8 0 0 0; diff --git a/unittests/threshold.wav b/unittests/threshold.wav Binary files differnew file mode 100644 index 0000000..5ac84ab --- /dev/null +++ b/unittests/threshold.wav diff --git a/unittests/vabs-unittest.pd b/unittests/vabs-unittest.pd new file mode 100644 index 0000000..34a1831 --- /dev/null +++ b/unittests/vabs-unittest.pd @@ -0,0 +1,29 @@ +#N canvas 407 51 731 495 10; +#X obj 49 186 unit-test-frame; +#X obj 49 121 loadbang; +#X obj 391 65 cos; +#X obj 391 38 / 128; +#X obj 370 152 smlib/vabs; +#X msg 49 152 vabs 0; +#X obj 391 93 list prepend; +#X obj 460 45 t l; +#X obj 469 69 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 370 123 list; +#X obj 337 65 sel 511; +#X obj 364 12 t f f; +#X connect 0 2 11 0; +#X connect 0 3 8 0; +#X connect 1 0 5 0; +#X connect 2 0 6 0; +#X connect 3 0 2 0; +#X connect 4 0 0 1; +#X connect 5 0 0 0; +#X connect 6 0 7 0; +#X connect 6 0 9 1; +#X connect 7 0 6 1; +#X connect 8 0 6 1; +#X connect 9 0 4 0; +#X connect 10 0 9 0; +#X connect 11 0 10 0; +#X connect 11 1 3 0; diff --git a/unittests/vabs.wav b/unittests/vabs.wav Binary files differnew file mode 100644 index 0000000..30a9db5 --- /dev/null +++ b/unittests/vabs.wav diff --git a/unittests/vclip-unittest.pd b/unittests/vclip-unittest.pd new file mode 100644 index 0000000..0fd1029 --- /dev/null +++ b/unittests/vclip-unittest.pd @@ -0,0 +1,29 @@ +#N canvas 261 122 728 527 10; +#X obj 49 186 unit-test-frame; +#X obj 49 121 loadbang; +#X msg 49 153 vclip 1000; +#X obj 391 58 cos; +#X obj 391 86 list prepend; +#X obj 460 30 t l; +#X obj 469 58 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 370 116 list; +#X obj 337 58 sel 511; +#X obj 364 5 t f f; +#X obj 391 31 / 32; +#X obj 370 150 smlib/vclip -0.75 0.75; +#X connect 0 2 9 0; +#X connect 0 3 6 0; +#X connect 1 0 2 0; +#X connect 2 0 0 0; +#X connect 3 0 4 0; +#X connect 4 0 5 0; +#X connect 4 0 7 1; +#X connect 5 0 4 1; +#X connect 6 0 4 1; +#X connect 7 0 11 0; +#X connect 8 0 7 0; +#X connect 9 0 8 0; +#X connect 9 1 10 0; +#X connect 10 0 3 0; +#X connect 11 0 0 1; diff --git a/unittests/vclip.wav b/unittests/vclip.wav Binary files differnew file mode 100644 index 0000000..be2a08b --- /dev/null +++ b/unittests/vclip.wav diff --git a/unittests/vcog-unittest.pd b/unittests/vcog-unittest.pd new file mode 100644 index 0000000..071197e --- /dev/null +++ b/unittests/vcog-unittest.pd @@ -0,0 +1,26 @@ +#N canvas 407 51 741 577 10; +#X obj 52 241 unit-test-frame; +#X obj 52 176 loadbang; +#X msg 52 207 vcog 0; +#X obj 373 180 smlib/vcog; +#X obj 373 150 pack f f f f; +#X obj 373 76 t f f f f; +#X obj 396 110 + 1; +#X obj 425 109 + 2; +#X obj 454 109 + 3; +#X text 44 39 'vcog computes the center of gravity of a list of floats' +; +#X obj 373 212 / 3.3; +#X connect 0 2 5 0; +#X connect 1 0 2 0; +#X connect 2 0 0 0; +#X connect 3 0 10 0; +#X connect 4 0 3 0; +#X connect 5 0 4 0; +#X connect 5 1 6 0; +#X connect 5 2 7 0; +#X connect 5 3 8 0; +#X connect 6 0 4 1; +#X connect 7 0 4 2; +#X connect 8 0 4 3; +#X connect 10 0 0 1; diff --git a/unittests/vcog.wav b/unittests/vcog.wav Binary files differnew file mode 100644 index 0000000..cd99f14 --- /dev/null +++ b/unittests/vcog.wav diff --git a/unittests/vdbtorms-unittest.pd b/unittests/vdbtorms-unittest.pd new file mode 100644 index 0000000..7d87c06 --- /dev/null +++ b/unittests/vdbtorms-unittest.pd @@ -0,0 +1,27 @@ +#N canvas 152 59 718 503 10; +#X obj 34 193 unit-test-frame; +#X obj 34 128 loadbang; +#X obj 376 100 list prepend; +#X obj 445 52 t l; +#X obj 454 76 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 355 130 list; +#X obj 322 72 sel 511; +#X obj 349 19 t f f; +#X obj 355 159 smlib/vdbtorms; +#X msg 34 159 vdbtorms 0; +#X obj 376 52 / 5.12; +#X connect 0 2 7 0; +#X connect 0 3 4 0; +#X connect 1 0 9 0; +#X connect 2 0 3 0; +#X connect 2 0 5 1; +#X connect 3 0 2 1; +#X connect 4 0 2 1; +#X connect 5 0 8 0; +#X connect 6 0 5 0; +#X connect 7 0 6 0; +#X connect 7 1 10 0; +#X connect 8 0 0 1; +#X connect 9 0 0 0; +#X connect 10 0 2 0; diff --git a/unittests/vdbtorms.wav b/unittests/vdbtorms.wav Binary files differnew file mode 100644 index 0000000..6e617a5 --- /dev/null +++ b/unittests/vdbtorms.wav diff --git a/unittests/vdelta-unittest.pd b/unittests/vdelta-unittest.pd new file mode 100644 index 0000000..19b1c0c --- /dev/null +++ b/unittests/vdelta-unittest.pd @@ -0,0 +1,32 @@ +#N canvas 407 51 741 577 10; +#X obj 52 241 unit-test-frame; +#X obj 52 176 loadbang; +#X obj 373 117 pack f f f f; +#X obj 373 63 t f f f f; +#X obj 373 148 smlib/vdelta; +#X msg 52 207 vdelta 0; +#X text 17 13 vdelta: difference between consecutive vectors; +#X obj 373 35 cos; +#X obj 396 90 * 0.1; +#X obj 440 90 * -0.9; +#X obj 487 90 * 0.3; +#X obj 406 172 != 0; +#X obj 373 198 spigot; +#X obj 373 11 t f f; +#X connect 0 2 13 0; +#X connect 1 0 5 0; +#X connect 2 0 4 0; +#X connect 3 0 2 0; +#X connect 3 1 8 0; +#X connect 3 2 9 0; +#X connect 3 3 10 0; +#X connect 4 0 12 0; +#X connect 5 0 0 0; +#X connect 7 0 3 0; +#X connect 8 0 2 1; +#X connect 9 0 2 2; +#X connect 10 0 2 3; +#X connect 11 0 12 1; +#X connect 12 0 0 1; +#X connect 13 0 7 0; +#X connect 13 1 11 0; diff --git a/unittests/vdelta.wav b/unittests/vdelta.wav Binary files differnew file mode 100644 index 0000000..79fc0c5 --- /dev/null +++ b/unittests/vdelta.wav diff --git a/unittests/vfmod-unittest.pd b/unittests/vfmod-unittest.pd new file mode 100644 index 0000000..f37eba7 --- /dev/null +++ b/unittests/vfmod-unittest.pd @@ -0,0 +1,31 @@ +#N canvas 407 51 739 534 10; +#X obj 42 212 unit-test-frame; +#X obj 42 147 loadbang; +#X msg 42 178 vfmod 0; +#X obj 363 167 smlib/vfmod 0.75; +#X text 21 34 vfmod computes the modulo of each element in a vector +; +#X obj 384 82 cos; +#X obj 384 55 / 128; +#X obj 384 110 list prepend; +#X obj 453 62 t l; +#X obj 462 86 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 363 140 list; +#X obj 330 82 sel 511; +#X obj 357 29 t f f; +#X connect 0 2 12 0; +#X connect 0 3 9 0; +#X connect 1 0 2 0; +#X connect 2 0 0 0; +#X connect 3 0 0 1; +#X connect 5 0 7 0; +#X connect 6 0 5 0; +#X connect 7 0 8 0; +#X connect 7 0 10 1; +#X connect 8 0 7 1; +#X connect 9 0 7 1; +#X connect 10 0 3 0; +#X connect 11 0 10 0; +#X connect 12 0 11 0; +#X connect 12 1 6 0; diff --git a/unittests/vfmod.wav b/unittests/vfmod.wav Binary files differnew file mode 100644 index 0000000..bdd70de --- /dev/null +++ b/unittests/vfmod.wav diff --git a/unittests/vftom-unittest.pd b/unittests/vftom-unittest.pd new file mode 100644 index 0000000..7e9f4af --- /dev/null +++ b/unittests/vftom-unittest.pd @@ -0,0 +1,14 @@ +#N canvas 457 36 730 465 10; +#X obj 40 153 unit-test-frame; +#X obj 40 88 loadbang; +#X obj 361 73 smlib/vftom; +#X msg 40 119 vftom 0; +#X obj 361 112 / 80; +#X obj 361 40 + 20; +#X text 36 37 frequency to midi on a vector; +#X connect 0 2 5 0; +#X connect 1 0 3 0; +#X connect 2 0 4 0; +#X connect 3 0 0 0; +#X connect 4 0 0 1; +#X connect 5 0 2 0; diff --git a/unittests/vftom.wav b/unittests/vftom.wav Binary files differnew file mode 100644 index 0000000..28666ac --- /dev/null +++ b/unittests/vftom.wav diff --git a/unittests/vlavg-unittest.pd b/unittests/vlavg-unittest.pd new file mode 100644 index 0000000..d6837b9 --- /dev/null +++ b/unittests/vlavg-unittest.pd @@ -0,0 +1,27 @@ +#N canvas 374 132 746 533 10; +#X obj 49 165 unit-test-frame; +#X obj 49 58 loadbang; +#X obj 370 -34 & 127; +#X obj 370 -3 / 64; +#X obj 370 24 - 1; +#X obj 370 131 smlib/vlavg 10; +#X msg 49 87 vlavg 0; +#X obj 370 103 pack; +#X obj 370 55 t f f; +#X obj 397 80 + 0.1; +#X text 11 -32 vlavg: vector leaky average; +#X text 12 -13 the argument is the half-decay expressed in number of +activations; +#X text 12 18 This test only works one time after patch load because +the averager has no reset option.; +#X connect 0 2 2 0; +#X connect 1 0 6 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 4 0 8 0; +#X connect 5 0 0 1; +#X connect 6 0 0 0; +#X connect 7 0 5 0; +#X connect 8 0 7 0; +#X connect 8 1 9 0; +#X connect 9 0 7 1; diff --git a/unittests/vlavg.wav b/unittests/vlavg.wav Binary files differnew file mode 100644 index 0000000..5e29a3a --- /dev/null +++ b/unittests/vlavg.wav diff --git a/unittests/vlmax-unittest.pd b/unittests/vlmax-unittest.pd new file mode 100644 index 0000000..2d2cf13 --- /dev/null +++ b/unittests/vlmax-unittest.pd @@ -0,0 +1,27 @@ +#N canvas 374 132 746 533 10; +#X obj 49 165 unit-test-frame; +#X obj 49 97 loadbang; +#X obj 370 -34 & 127; +#X obj 370 -3 / 64; +#X obj 370 24 - 1; +#X obj 370 103 pack; +#X obj 370 55 t f f; +#X obj 397 80 + 0.1; +#X obj 370 131 smlib/vlmax 10; +#X msg 49 126 vlmax 0; +#X text 13 -13 the argument is the half-decay expressed in number of +activations; +#X text 12 -30 vlmax: vector leaky maximum; +#X text 12 23 This test only works one time after patch load because +the object has no reset option.; +#X connect 0 2 2 0; +#X connect 1 0 9 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 4 0 6 0; +#X connect 5 0 8 0; +#X connect 6 0 5 0; +#X connect 6 1 7 0; +#X connect 7 0 5 1; +#X connect 8 0 0 1; +#X connect 9 0 0 0; diff --git a/unittests/vlmax.wav b/unittests/vlmax.wav Binary files differnew file mode 100644 index 0000000..98032d3 --- /dev/null +++ b/unittests/vlmax.wav diff --git a/unittests/vlmin-unittest.pd b/unittests/vlmin-unittest.pd new file mode 100644 index 0000000..6fa7331 --- /dev/null +++ b/unittests/vlmin-unittest.pd @@ -0,0 +1,27 @@ +#N canvas 374 132 746 533 10; +#X obj 49 165 unit-test-frame; +#X obj 49 97 loadbang; +#X obj 370 -34 & 127; +#X obj 370 -3 / 64; +#X obj 370 24 - 1; +#X obj 370 103 pack; +#X obj 370 55 t f f; +#X obj 397 80 + 0.1; +#X text 13 -13 the argument is the half-decay expressed in number of +activations; +#X text 12 23 This test only works one time after patch load because +the object has no reset option.; +#X obj 370 131 smlib/vlmin 10; +#X msg 49 125 vlmin 0; +#X text 12 -30 vlmin: vector leaky maximum; +#X connect 0 2 2 0; +#X connect 1 0 11 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 4 0 6 0; +#X connect 5 0 10 0; +#X connect 6 0 5 0; +#X connect 6 1 7 0; +#X connect 7 0 5 1; +#X connect 10 0 0 1; +#X connect 11 0 0 0; diff --git a/unittests/vlmin.wav b/unittests/vlmin.wav Binary files differnew file mode 100644 index 0000000..7861ac5 --- /dev/null +++ b/unittests/vlmin.wav diff --git a/unittests/vlrange-unittest.pd b/unittests/vlrange-unittest.pd new file mode 100644 index 0000000..1b58ac8 --- /dev/null +++ b/unittests/vlrange-unittest.pd @@ -0,0 +1,27 @@ +#N canvas 374 132 746 533 10; +#X obj 49 165 unit-test-frame; +#X obj 49 97 loadbang; +#X obj 370 -34 & 127; +#X text 13 -13 the argument is the half-decay expressed in number of +activations; +#X text 12 23 This test only works one time after patch load because +the object has no reset option.; +#X msg 49 125 vlrange 0; +#X obj 370 -4 / 128; +#X obj 370 28 - 0.5; +#X obj 370 131 smlib/vlrange 10; +#X obj 370 56 t f f; +#X obj 397 84 + 0.1; +#X obj 370 106 pack; +#X text 12 -29 vlrange: leaky maximum minus leaky minimum; +#X connect 0 2 2 0; +#X connect 1 0 5 0; +#X connect 2 0 6 0; +#X connect 5 0 0 0; +#X connect 6 0 7 0; +#X connect 7 0 9 0; +#X connect 8 0 0 1; +#X connect 9 0 11 0; +#X connect 9 1 10 0; +#X connect 10 0 11 1; +#X connect 11 0 8 0; diff --git a/unittests/vlrange.wav b/unittests/vlrange.wav Binary files differnew file mode 100644 index 0000000..067202d --- /dev/null +++ b/unittests/vlrange.wav diff --git a/unittests/vmax-unittest.pd b/unittests/vmax-unittest.pd new file mode 100644 index 0000000..69c7cb4 --- /dev/null +++ b/unittests/vmax-unittest.pd @@ -0,0 +1,24 @@ +#N canvas 136 76 741 577 10; +#X obj 52 241 unit-test-frame; +#X obj 52 176 loadbang; +#X obj 373 150 pack f f f f; +#X obj 373 76 t f f f f; +#X obj 396 110 + 1; +#X obj 425 109 + 2; +#X obj 454 109 + 3; +#X obj 373 211 / 512; +#X obj 373 180 smlib/vmax; +#X msg 52 207 vmax 0; +#X connect 0 2 3 0; +#X connect 1 0 9 0; +#X connect 2 0 8 0; +#X connect 3 0 2 0; +#X connect 3 1 4 0; +#X connect 3 2 5 0; +#X connect 3 3 6 0; +#X connect 4 0 2 1; +#X connect 5 0 2 2; +#X connect 6 0 2 3; +#X connect 7 0 0 1; +#X connect 8 0 7 0; +#X connect 9 0 0 0; diff --git a/unittests/vmax.wav b/unittests/vmax.wav Binary files differnew file mode 100644 index 0000000..ffe9737 --- /dev/null +++ b/unittests/vmax.wav diff --git a/unittests/vmin-unittest.pd b/unittests/vmin-unittest.pd new file mode 100644 index 0000000..ab6dcf2 --- /dev/null +++ b/unittests/vmin-unittest.pd @@ -0,0 +1,24 @@ +#N canvas 358 49 741 577 10; +#X obj 52 241 unit-test-frame; +#X obj 52 176 loadbang; +#X obj 373 150 pack f f f f; +#X obj 373 76 t f f f f; +#X obj 396 110 + 1; +#X obj 425 109 + 2; +#X obj 454 109 + 3; +#X obj 373 211 / 512; +#X obj 373 180 smlib/vmin; +#X msg 52 207 vmin 0; +#X connect 0 2 3 0; +#X connect 1 0 9 0; +#X connect 2 0 8 0; +#X connect 3 0 2 0; +#X connect 3 1 4 0; +#X connect 3 2 5 0; +#X connect 3 3 6 0; +#X connect 4 0 2 1; +#X connect 5 0 2 2; +#X connect 6 0 2 3; +#X connect 7 0 0 1; +#X connect 8 0 7 0; +#X connect 9 0 0 0; diff --git a/unittests/vmin.wav b/unittests/vmin.wav Binary files differnew file mode 100644 index 0000000..5f15797 --- /dev/null +++ b/unittests/vmin.wav diff --git a/unittests/vmtof-unittest.pd b/unittests/vmtof-unittest.pd new file mode 100644 index 0000000..09e1e23 --- /dev/null +++ b/unittests/vmtof-unittest.pd @@ -0,0 +1,18 @@ +#N canvas 457 36 730 465 10; +#X obj 40 153 unit-test-frame; +#X obj 40 88 loadbang; +#X obj 361 95 smlib/vmtof; +#X msg 40 118 vmtof 0; +#X obj 361 71 + 1; +#X floatatom 362 26 5 0 0 0 - - -; +#X obj 361 125 / 329; +#X obj 361 49 & 63; +#X text 41 49 midi to frequency on a vector; +#X connect 0 2 7 0; +#X connect 1 0 3 0; +#X connect 2 0 6 0; +#X connect 3 0 0 0; +#X connect 4 0 2 0; +#X connect 5 0 7 0; +#X connect 6 0 0 1; +#X connect 7 0 4 0; diff --git a/unittests/vmtof.wav b/unittests/vmtof.wav Binary files differnew file mode 100644 index 0000000..212c411 --- /dev/null +++ b/unittests/vmtof.wav diff --git a/unittests/vpow-unittest.pd b/unittests/vpow-unittest.pd new file mode 100644 index 0000000..e09c066 --- /dev/null +++ b/unittests/vpow-unittest.pd @@ -0,0 +1,21 @@ +#N canvas 390 195 728 520 10; +#X obj 46 189 unit-test-frame; +#X obj 46 119 loadbang; +#X obj 367 150 smlib/vpow 0.75; +#X obj 367 41 / 512; +#X msg 46 152 vpow 0; +#X obj 367 11 + 1; +#X text 44 82 vpow computes y(i)=x(i)^a; +#X obj 367 119 pack; +#X obj 367 68 t f f; +#X obj 394 92 + 0.5; +#X connect 0 2 5 0; +#X connect 1 0 4 0; +#X connect 2 0 0 1; +#X connect 3 0 8 0; +#X connect 4 0 0 0; +#X connect 5 0 3 0; +#X connect 7 0 2 0; +#X connect 8 0 7 0; +#X connect 8 1 9 0; +#X connect 9 0 7 1; diff --git a/unittests/vpow.wav b/unittests/vpow.wav Binary files differnew file mode 100644 index 0000000..a65d917 --- /dev/null +++ b/unittests/vpow.wav diff --git a/unittests/vrms-unittest.pd b/unittests/vrms-unittest.pd new file mode 100644 index 0000000..4230f61 --- /dev/null +++ b/unittests/vrms-unittest.pd @@ -0,0 +1,22 @@ +#N canvas 397 37 728 520 10; +#X obj 49 179 unit-test-frame; +#X obj 49 109 loadbang; +#X obj 370 138 smlib/vrms 20; +#X msg 49 140 vrms 0; +#X text 26 75 vrms computes the root-mean-square of a vector; +#X obj 370 21 / 512; +#X obj 398 81 - 0.5; +#X obj 370 54 t f f f; +#X obj 436 81 + 0.1; +#X obj 370 109 pack f f f; +#X connect 0 2 5 0; +#X connect 1 0 3 0; +#X connect 2 0 0 1; +#X connect 3 0 0 0; +#X connect 5 0 7 0; +#X connect 6 0 9 1; +#X connect 7 0 9 0; +#X connect 7 1 6 0; +#X connect 7 2 8 0; +#X connect 8 0 9 2; +#X connect 9 0 2 0; diff --git a/unittests/vrms.wav b/unittests/vrms.wav Binary files differnew file mode 100644 index 0000000..dfd2c7d --- /dev/null +++ b/unittests/vrms.wav diff --git a/unittests/vrmstodb-unittest.pd b/unittests/vrmstodb-unittest.pd new file mode 100644 index 0000000..d0977fa --- /dev/null +++ b/unittests/vrmstodb-unittest.pd @@ -0,0 +1,13 @@ +#N canvas 288 72 718 503 10; +#X obj 33 147 unit-test-frame; +#X obj 33 82 loadbang; +#X obj 354 86 smlib/vrmstodb; +#X msg 33 113 vrmstodb 0; +#X obj 354 56 / 512; +#X obj 354 120 / 100; +#X connect 0 2 4 0; +#X connect 1 0 3 0; +#X connect 2 0 5 0; +#X connect 3 0 0 0; +#X connect 4 0 2 0; +#X connect 5 0 0 1; diff --git a/unittests/vrmstodb.wav b/unittests/vrmstodb.wav Binary files differnew file mode 100644 index 0000000..ce38263 --- /dev/null +++ b/unittests/vrmstodb.wav diff --git a/unittests/vstd-unittest.pd b/unittests/vstd-unittest.pd new file mode 100644 index 0000000..b44db31 --- /dev/null +++ b/unittests/vstd-unittest.pd @@ -0,0 +1,27 @@ +#N canvas 490 35 718 503 10; +#X obj 33 147 unit-test-frame; +#X obj 33 82 loadbang; +#X obj 354 104 smlib/vstd; +#X msg 33 113 vstd 0; +#X obj 354 22 t f f f f; +#X obj 354 77 pack f f f f; +#X obj 466 50 * 0.6; +#X text 33 2 vstd computes the standard deviation of a vector; +#X obj 418 50 * -0.9; +#X obj 377 50 - 0.5; +#X obj 354 -24 / 256; +#X obj 354 1 - 1; +#X connect 0 2 10 0; +#X connect 1 0 3 0; +#X connect 2 0 0 1; +#X connect 3 0 0 0; +#X connect 4 0 5 0; +#X connect 4 1 9 0; +#X connect 4 2 8 0; +#X connect 4 3 6 0; +#X connect 5 0 2 0; +#X connect 6 0 5 3; +#X connect 8 0 5 2; +#X connect 9 0 5 1; +#X connect 10 0 11 0; +#X connect 11 0 4 0; diff --git a/unittests/vstd.wav b/unittests/vstd.wav Binary files differnew file mode 100644 index 0000000..79c1c34 --- /dev/null +++ b/unittests/vstd.wav diff --git a/unittests/vsum-unittest.pd b/unittests/vsum-unittest.pd new file mode 100644 index 0000000..44a5ef2 --- /dev/null +++ b/unittests/vsum-unittest.pd @@ -0,0 +1,19 @@ +#N canvas 490 35 718 503 10; +#X obj 33 117 unit-test-frame; +#X obj 33 52 loadbang; +#X obj 354 -8 t f f f f; +#X obj 354 47 pack f f f f; +#X text 33 -28 vstd computes the standard deviation of a vector; +#X obj 354 74 smlib/vsum; +#X obj 354 -47 / 2048; +#X msg 33 82 vsum 0; +#X connect 0 2 6 0; +#X connect 1 0 7 0; +#X connect 2 0 3 0; +#X connect 2 1 3 1; +#X connect 2 2 3 2; +#X connect 2 3 3 3; +#X connect 3 0 5 0; +#X connect 5 0 0 1; +#X connect 6 0 2 0; +#X connect 7 0 0 0; diff --git a/unittests/vsum.wav b/unittests/vsum.wav Binary files differnew file mode 100644 index 0000000..5f15797 --- /dev/null +++ b/unittests/vsum.wav diff --git a/unittests/vvconv-unittest.pd b/unittests/vvconv-unittest.pd new file mode 100644 index 0000000..d529930 --- /dev/null +++ b/unittests/vvconv-unittest.pd @@ -0,0 +1,18 @@ +#N canvas 195 119 718 503 10; +#X obj 33 117 unit-test-frame; +#X obj 423 3 loadbang; +#X obj 354 63 smlib/vvconv; +#X msg 33 82 vvconv 0; +#X obj 33 50 loadbang; +#X msg 423 35 -1 0.9; +#X obj 354 3 & 127; +#X obj 354 35 / 127; +#X text 34 14 vvconv: convolution of 2 vectors; +#X connect 0 2 6 0; +#X connect 1 0 5 0; +#X connect 2 0 0 1; +#X connect 3 0 0 0; +#X connect 4 0 3 0; +#X connect 5 0 2 1; +#X connect 6 0 7 0; +#X connect 7 0 2 0; diff --git a/unittests/vvconv.wav b/unittests/vvconv.wav Binary files differnew file mode 100644 index 0000000..84d9a58 --- /dev/null +++ b/unittests/vvconv.wav diff --git a/unittests/vvminus-unittest.pd b/unittests/vvminus-unittest.pd new file mode 100644 index 0000000..eb6d7b3 --- /dev/null +++ b/unittests/vvminus-unittest.pd @@ -0,0 +1,22 @@ +#N canvas 195 119 718 503 10; +#X obj 32 186 unit-test-frame; +#X obj 428 72 loadbang; +#X obj 32 119 loadbang; +#X obj 353 132 smlib/vvminus; +#X msg 32 151 vvminus 0; +#X obj 353 66 t f f; +#X obj 353 95 pack; +#X obj 353 25 / 256; +#X msg 428 103 1 -0.2; +#X text 37 39 vv- substracts two lists of floats; +#X text 37 55 or a float from a list of floats; +#X connect 0 2 7 0; +#X connect 1 0 8 0; +#X connect 2 0 4 0; +#X connect 3 0 0 1; +#X connect 4 0 0 0; +#X connect 5 0 6 0; +#X connect 5 1 6 1; +#X connect 6 0 3 0; +#X connect 7 0 5 0; +#X connect 8 0 3 1; diff --git a/unittests/vvminus.wav b/unittests/vvminus.wav Binary files differnew file mode 100644 index 0000000..ed72db1 --- /dev/null +++ b/unittests/vvminus.wav diff --git a/unittests/vvplus-unittest.pd b/unittests/vvplus-unittest.pd new file mode 100644 index 0000000..f7efcaf --- /dev/null +++ b/unittests/vvplus-unittest.pd @@ -0,0 +1,24 @@ +#N canvas 195 119 718 503 10; +#X obj 32 186 unit-test-frame; +#X obj 422 93 loadbang; +#X obj 32 119 loadbang; +#X obj 353 87 t f f; +#X obj 353 116 pack; +#X text 37 39 vv- substracts two lists of floats; +#X text 37 55 or a float from a list of floats; +#X obj 353 153 smlib/vvplus; +#X msg 32 153 vvplus 0; +#X msg 422 122 -1.1 0.1; +#X obj 353 35 & 127; +#X obj 353 62 / 128; +#X connect 0 2 10 0; +#X connect 1 0 9 0; +#X connect 2 0 8 0; +#X connect 3 0 4 0; +#X connect 3 1 4 1; +#X connect 4 0 7 0; +#X connect 7 0 0 1; +#X connect 8 0 0 0; +#X connect 9 0 7 1; +#X connect 10 0 11 0; +#X connect 11 0 3 0; diff --git a/unittests/vvplus.wav b/unittests/vvplus.wav Binary files differnew file mode 100644 index 0000000..532399d --- /dev/null +++ b/unittests/vvplus.wav |