aboutsummaryrefslogtreecommitdiff
path: root/unit-test-frame.pd
diff options
context:
space:
mode:
Diffstat (limited to 'unit-test-frame.pd')
-rw-r--r--unit-test-frame.pd378
1 files changed, 203 insertions, 175 deletions
diff --git a/unit-test-frame.pd b/unit-test-frame.pd
index 9cd29ba..eb872b1 100644
--- a/unit-test-frame.pd
+++ b/unit-test-frame.pd
@@ -1,4 +1,4 @@
-#N canvas 435 37 710 662 10;
+#N canvas 66 59 710 662 10;
#X obj 620 302 bng 50 250 50 0 empty empty list 5 25 0 14 -203904 -262144
-1;
#X obj 315 301 bng 50 250 50 0 empty empty list 5 25 0 14 -203904 -262144
@@ -83,61 +83,7 @@ STDDEV-ZERO 4 35 0 10 -203904 -203904 -1 0 1;
#X connect 27 0 22 0;
#X connect 28 0 26 0;
#X restore 327 123 pd std.deviation;
-#N canvas 905 83 262 193 refname+ID 0;
-#X obj 26 47 inlet;
-#X obj 71 96 f \$0;
-#X obj 26 120 pack s f;
-#X obj 26 74 t a b;
-#X obj 26 152 s \$0-refname+ID;
-#X connect 0 0 3 0;
-#X connect 1 0 2 1;
-#X connect 2 0 4 0;
-#X connect 3 0 2 0;
-#X connect 3 1 1 0;
-#X restore 56 129 pd refname+ID;
-#X obj 39 177 s \$0-refname;
-#X obj 39 153 symbol;
#X obj 39 23 inlet;
-#N canvas 67 138 412 506 load-reference 0;
-#X obj 36 27 inlet;
-#X obj 36 203 soundfiler;
-#X obj 81 112 f \$0;
-#X obj 36 136 pack s f;
-#X obj 36 94 t a b;
-#X obj 36 461 s \$0-do-test;
-#X msg 36 173 read ./\$1.wav \$2-reference;
-#X obj 75 375 pack s s s s s s;
-#X obj 168 297 r \$0-refname;
-#X obj 75 432 stdout;
-#X obj 36 235 sel 512;
-#X obj 36 60 spigot 1;
-#X msg 81 27 0;
-#X text 119 29 at load \, try to read reference file and do test;
-#X msg 75 271 REFERENCE-FILE-ERROR reference file not found:;
-#X msg 168 324 \$1.wav;
-#X obj 168 349 symbol;
-#X obj 75 402 list trim;
-#X obj 127 432 print unit-test;
-#X connect 0 0 11 0;
-#X connect 1 0 10 0;
-#X connect 2 0 3 1;
-#X connect 3 0 6 0;
-#X connect 4 0 3 0;
-#X connect 4 1 2 0;
-#X connect 6 0 1 0;
-#X connect 7 0 17 0;
-#X connect 8 0 15 0;
-#X connect 10 0 5 0;
-#X connect 10 1 14 0;
-#X connect 11 0 4 0;
-#X connect 11 0 12 0;
-#X connect 12 0 11 1;
-#X connect 14 0 7 0;
-#X connect 15 0 16 0;
-#X connect 16 0 7 5;
-#X connect 17 0 9 0;
-#X connect 17 0 18 0;
-#X restore 74 105 pd load-reference;
#X obj 328 27 inlet;
#X obj 630 22 inlet;
#X obj 238 628 outlet;
@@ -214,93 +160,6 @@ STDDEV-ZERO 4 35 0 10 -203904 -203904 -1 0 1;
#X connect 3 0 4 0;
#X connect 4 0 2 0;
#X restore 100 507 pd view-reference;
-#N canvas 704 28 384 625 write-reference 0;
-#X obj 51 344 soundfiler;
-#X obj 51 287 list;
-#X obj 50 16 inlet;
-#X floatatom 82 378 5 0 0 0 - - -;
-#X obj 72 257 r \$0-refname+ID;
-#X text 90 16 bang;
-#X obj 51 124 r \$0-do-write-reference;
-#X obj 143 152 r \$0-abort-write-reference;
-#X obj 51 379 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
--1;
-#X obj 51 583 s \$0-do-test;
-#X obj 72 153 delay 500;
-#X obj 257 20 r \$0-refname;
-#X msg 257 46 \$1.wav;
-#X obj 257 72 symbol;
-#X obj 257 99 s \$0-ref-wav-name;
-#N canvas 682 430 395 255 write-reference-popup\$0 0;
-#X obj 88 174 bng 60 400 50 0 \$0-do-write-reference empty continue
-2 28 0 12 -260097 -262144 -1;
-#X obj 234 174 bng 60 300 50 0 \$0-abort-write-reference empty abort
-8 28 0 12 -204786 -262144 -1;
-#X obj 91 67 hsl 200 80 0 127 0 0 \$0-dummysend \$0-dummyreceive empty
--2 -8 0 10 -262144 -262144 -1 0 1;
-#X symbolatom 95 85 30 0 0 0 - #0-refname #0-dummysend;
-#X symbolatom 95 125 30 0 0 0 - #0-ref-wav-name #0-dummysend;
-#X text 93 67 reference name:;
-#X text 93 108 file name:;
-#X text 24 11 This action will overwrite your reference .wav file with
-the content of \$0-signal-under-test. The action can not be undone!
-;
-#X restore 51 95 pd write-reference-popup\$0;
-#X obj 50 68 s pd-write-reference-popup\$0;
-#X msg 50 43 vis 1;
-#X obj 72 230 s pd-write-reference-popup\$0;
-#X msg 72 205 vis 0;
-#X obj 143 180 delay 200;
-#X msg 51 315 write -wave -bytes 4 \$1 \$2-system-under-test;
-#N canvas 528 482 203 281 index0-511 0;
-#X obj 41 49 inlet;
-#X obj 41 224 outlet;
-#X obj 41 139 until;
-#X msg 41 107 512;
-#X obj 41 169 f;
-#X obj 72 169 + 1;
-#X obj 41 79 t b b;
-#X msg 80 139 0;
-#X connect 0 0 6 0;
-#X connect 2 0 4 0;
-#X connect 3 0 2 0;
-#X connect 4 0 5 0;
-#X connect 4 0 1 0;
-#X connect 5 0 4 1;
-#X connect 6 0 3 0;
-#X connect 6 1 7 0;
-#X connect 7 0 4 1;
-#X restore 51 411 pd index0-511;
-#X obj 70 476 tabread \$0-system-under-test;
-#X obj 70 511 tabwrite \$0-reference;
-#X obj 51 535 == 511;
-#X obj 51 443 t f f f;
-#X obj 51 559 sel 1;
-#X connect 0 0 3 0;
-#X connect 0 0 8 0;
-#X connect 1 0 21 0;
-#X connect 2 0 17 0;
-#X connect 4 0 1 1;
-#X connect 6 0 1 0;
-#X connect 6 0 10 0;
-#X connect 7 0 20 0;
-#X connect 8 0 22 0;
-#X connect 10 0 19 0;
-#X connect 11 0 12 0;
-#X connect 12 0 13 0;
-#X connect 13 0 14 0;
-#X connect 17 0 16 0;
-#X connect 19 0 18 0;
-#X connect 20 0 19 0;
-#X connect 21 0 0 0;
-#X connect 22 0 26 0;
-#X connect 23 0 24 0;
-#X connect 25 0 27 0;
-#X connect 26 0 25 0;
-#X connect 26 1 23 0;
-#X connect 26 2 24 1;
-#X connect 27 0 9 0;
-#X restore 40 208 pd write-reference;
#N canvas 739 28 261 427 test-result-messages 0;
#X obj 32 23 inlet;
#X obj 59 310 stdout;
@@ -495,7 +354,7 @@ is computed. A test result message is sent to the Pd window and stdout:
#X obj 29 39 loadbang;
#X obj 32 407 bng 50 250 50 0 empty empty test 5 25 0 14 -260097 -262144
-1;
-#X obj 38 555 bng 50 250 50 0 empty empty write 4 25 0 14 -260097 -262144
+#X obj 33 555 bng 50 250 50 0 empty empty write 4 25 0 14 -260097 -262144
-1;
#X text 124 714 ------------------------------------------------------------
;
@@ -517,9 +376,6 @@ an external object \, consider instantiating it with namespace \, like
latest release). Use button 'write'. The file will have 512 samples
in 32 bit .wav format. Even though the test output is not a signal
\, this is a good format to write.;
-#X text 124 733 [unit-test-frame.pd] uses only vanilla Pd classes.
-For testing external classes \, consider using namespaces like in [zexy/wrap].
-;
#X text 130 203 Use a bang from one of [unit-test-frame.pd] outlets
to trigger the object(s) when the test starts. Or use the index 0 -
511 outlet to generate a series of output values.;
@@ -529,6 +385,9 @@ stddev. Also note that large numbers are unprecise. Example: the difference
between 1e+12 in single precision and 1e+12 in double precision is
27968! Try this on:;
#X text 149 345 http://www.h-schmidt.net/FloatApplet/IEEE754.html;
+#X text 124 733 Apart from [ggee/getdir] \, [unit-test-frame.pd] uses
+only vanilla Pd classes. For testing external classes \, consider using
+namespaces like in [zexy/wrap].;
#X connect 17 0 24 0;
#X connect 21 0 25 0;
#X restore 555 165 pd info-unit-test\$0;
@@ -536,33 +395,202 @@ between 1e+12 in single precision and 1e+12 in double precision is
#X obj 384 629 outlet;
#X obj 238 577 t b b b b;
#X text 209 481 test-bang out;
-#X connect 0 0 30 0;
-#X connect 1 0 29 0;
-#X connect 2 0 31 0;
-#X connect 3 0 55 0;
-#X connect 6 0 28 0;
-#X connect 7 0 32 0;
-#X connect 11 0 33 0;
-#X connect 11 0 47 0;
-#X connect 14 0 13 0;
-#X connect 15 0 25 0;
-#X connect 17 0 36 0;
-#X connect 22 0 60 0;
-#X connect 23 0 24 0;
-#X connect 23 0 58 0;
-#X connect 25 0 14 0;
-#X connect 25 0 12 0;
-#X connect 25 0 16 0;
-#X connect 25 1 26 0;
-#X connect 28 0 22 0;
-#X connect 28 1 37 0;
-#X connect 28 2 23 0;
-#X connect 36 0 27 0;
-#X connect 38 0 6 0;
-#X connect 39 0 21 0;
-#X connect 55 0 56 0;
-#X connect 60 0 19 0;
-#X connect 60 1 20 0;
-#X connect 60 2 39 0;
-#X connect 60 3 59 0;
+#X obj 39 183 s \$0-refname;
+#X obj 39 74 symbol;
+#N canvas 673 76 412 506 load-reference 0;
+#X obj 36 27 inlet;
+#X obj 36 203 soundfiler;
+#X obj 81 112 f \$0;
+#X obj 36 136 pack s f;
+#X obj 36 94 t a b;
+#X obj 36 461 s \$0-do-test;
+#X obj 75 375 pack s s s s s s;
+#X obj 168 297 r \$0-refname;
+#X obj 75 432 stdout;
+#X obj 36 235 sel 512;
+#X obj 36 60 spigot 1;
+#X msg 81 27 0;
+#X text 119 29 at load \, try to read reference file and do test;
+#X msg 75 271 REFERENCE-FILE-ERROR reference file not found:;
+#X msg 168 324 \$1.wav;
+#X obj 168 349 symbol;
+#X obj 75 402 list trim;
+#X obj 127 432 print unit-test;
+#X msg 125 135 read ./\$1.wav \$2-reference;
+#X msg 36 173 read \$1.wav \$2-reference;
+#X connect 0 0 10 0;
+#X connect 1 0 9 0;
+#X connect 2 0 3 1;
+#X connect 3 0 19 0;
+#X connect 4 0 3 0;
+#X connect 4 1 2 0;
+#X connect 6 0 16 0;
+#X connect 7 0 14 0;
+#X connect 9 0 5 0;
+#X connect 9 1 13 0;
+#X connect 10 0 4 0;
+#X connect 10 0 11 0;
+#X connect 11 0 10 1;
+#X connect 13 0 6 0;
+#X connect 14 0 15 0;
+#X connect 15 0 6 5;
+#X connect 16 0 8 0;
+#X connect 16 0 17 0;
+#X connect 19 0 1 0;
+#X restore 58 155 pd load-reference;
+#N canvas 405 322 429 358 prepend-path 0;
+#X obj 21 13 inlet;
+#X obj 48 131 ggee/getdir 2;
+#X obj 48 104 t b a;
+#X obj 21 283 spigot 1;
+#X msg 66 235 0;
+#X obj 21 45 t a a;
+#X obj 21 169 pack s s;
+#X msg 21 200 \$1/\$2;
+#X msg 102 235 1;
+#X obj 102 266 pipe 100;
+#X obj 21 314 outlet;
+#X text 76 11 Try to prepend absolute path of the abstraction's parent.
+If [ggee/getdir] is not present \, the path is relative to the abstraction.
+;
+#X msg 21 75 .;
+#X connect 0 0 5 0;
+#X connect 1 0 6 0;
+#X connect 2 0 1 0;
+#X connect 2 1 6 1;
+#X connect 3 0 4 0;
+#X connect 3 0 8 0;
+#X connect 3 0 10 0;
+#X connect 4 0 3 1;
+#X connect 5 0 12 0;
+#X connect 5 1 2 0;
+#X connect 6 0 7 0;
+#X connect 7 0 3 0;
+#X connect 8 0 9 0;
+#X connect 9 0 3 1;
+#X connect 12 0 6 0;
+#X restore 58 101 pd prepend-path;
+#X obj 71 130 s \$0-refpath;
+#N canvas 240 70 389 572 write-reference 1;
+#X obj 51 436 soundfiler;
+#X obj 51 379 list;
+#X obj 50 16 inlet;
+#X floatatom 82 470 5 0 0 0 - - -;
+#X text 90 16 bang;
+#X obj 51 124 r \$0-do-write-reference;
+#X obj 143 152 r \$0-abort-write-reference;
+#X obj 51 471 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 51 532 s \$0-do-test;
+#X obj 72 153 delay 500;
+#X msg 257 46 \$1.wav;
+#X obj 257 71 symbol;
+#X obj 257 99 s \$0-ref-wav-name;
+#N canvas 574 380 410 288 write-reference-popup\$0 0;
+#X obj 97 197 bng 60 400 50 0 \$0-do-write-reference empty continue
+2 28 0 12 -260097 -262144 -1;
+#X obj 231 197 bng 60 300 50 0 \$0-abort-write-reference empty abort
+8 28 0 12 -204786 -262144 -1;
+#X obj 29 67 hsl 350 100 0 127 0 0 \$0-dummysend \$0-dummyreceive empty
+-2 -8 0 10 -262144 -262144 -1 0 1;
+#X symbolatom 33 85 30 0 0 0 - #0-refname #0-dummysend;
+#X symbolatom 33 127 30 0 0 0 - #0-ref-wav-name #0-dummysend;
+#X text 31 67 reference name:;
+#X text 31 108 file name:;
+#X text 24 11 This action will overwrite your reference .wav file with
+the content of \$0-signal-under-test. The action can not be undone!
+;
+#X restore 51 95 pd write-reference-popup\$0;
+#X obj 50 68 s pd-write-reference-popup\$0;
+#X msg 50 43 vis 1;
+#X obj 72 230 s pd-write-reference-popup\$0;
+#X msg 72 205 vis 0;
+#X obj 143 177 delay 200;
+#X obj 72 264 r \$0-refpath;
+#X obj 72 292 t a b;
+#X obj 99 321 f \$0;
+#X obj 72 350 pack s f;
+#X msg 51 407 write -wave -bytes 4 \$1 \$2-system-under-test;
+#X obj 257 20 r \$0-refname;
+#N canvas 0 22 282 435 copy-to-reference 0;
+#X obj 36 50 inlet;
+#X msg 36 105 512;
+#X obj 36 136 until;
+#X obj 36 198 f;
+#X obj 68 198 + 1;
+#X obj 36 80 t b b;
+#X msg 51 169 0;
+#X obj 55 270 tabread \$0-system-under-test;
+#X obj 55 307 tabwrite \$0-reference;
+#X obj 36 332 == 511;
+#X obj 36 236 t f f f;
+#X obj 36 363 outlet;
+#X connect 0 0 5 0;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 10 0;
+#X connect 4 0 3 1;
+#X connect 5 0 1 0;
+#X connect 5 1 6 0;
+#X connect 6 0 3 1;
+#X connect 7 0 8 0;
+#X connect 9 0 11 0;
+#X connect 10 0 9 0;
+#X connect 10 1 7 0;
+#X connect 10 2 8 1;
+#X restore 51 499 pd copy-to-reference;
+#X connect 0 0 3 0;
+#X connect 0 0 7 0;
+#X connect 1 0 23 0;
+#X connect 2 0 15 0;
+#X connect 5 0 1 0;
+#X connect 5 0 9 0;
+#X connect 6 0 18 0;
+#X connect 7 0 25 0;
+#X connect 9 0 17 0;
+#X connect 10 0 11 0;
+#X connect 11 0 12 0;
+#X connect 15 0 14 0;
+#X connect 17 0 16 0;
+#X connect 18 0 17 0;
+#X connect 19 0 20 0;
+#X connect 20 0 22 0;
+#X connect 20 1 21 0;
+#X connect 21 0 22 1;
+#X connect 22 0 1 1;
+#X connect 23 0 0 0;
+#X connect 24 0 10 0;
+#X connect 25 0 8 0;
+#X restore 39 208 pd write-reference;
+#X connect 0 0 26 0;
+#X connect 1 0 25 0;
+#X connect 2 0 27 0;
+#X connect 3 0 50 0;
+#X connect 6 0 24 0;
+#X connect 7 0 62 0;
+#X connect 11 0 28 0;
+#X connect 11 0 42 0;
+#X connect 12 0 21 0;
+#X connect 13 0 31 0;
+#X connect 18 0 55 0;
+#X connect 19 0 20 0;
+#X connect 19 0 53 0;
+#X connect 21 0 58 0;
+#X connect 21 1 22 0;
+#X connect 24 0 18 0;
+#X connect 24 1 32 0;
+#X connect 24 2 19 0;
+#X connect 31 0 23 0;
+#X connect 33 0 6 0;
+#X connect 34 0 17 0;
+#X connect 50 0 51 0;
+#X connect 55 0 15 0;
+#X connect 55 1 16 0;
+#X connect 55 2 34 0;
+#X connect 55 3 54 0;
+#X connect 58 0 57 0;
+#X connect 58 0 60 0;
+#X connect 60 0 59 0;
+#X connect 60 0 61 0;
#X coords 0 -1 1 1 650 270 2 30 230;