Commit 2d583214 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

add right outlet for soundfiler, improve error messages for it and writesf~

parent 95e000ca
#N canvas 429 34 555 619 10;
#N canvas 75 64 555 619 10;
#X obj 0 595 cnv 15 552 21 empty \$0-pddp.cnv.footer empty 20 12 0
14 -228856 -66577 0;
14 #dcdcdc #404040 0;
#X obj 0 0 cnv 15 552 40 empty \$0-pddp.cnv.header soundfiler 3 12
0 18 -204280 -1 0;
#X obj 0 387 cnv 3 550 3 empty \$0-pddp.cnv.inlets inlets 8 12 0 13
-228856 -1 0;
0 18 #c4dcdc #000000 0;
#X obj 0 352 cnv 3 550 3 empty \$0-pddp.cnv.inlets inlets 8 12 0 13
#dcdcdc #000000 0;
#N canvas 490 283 494 344 META 0;
#X text 12 105 LIBRARY internal;
#X text 12 145 WEBSITE http://crca.ucsd.edu/~msp/;
......@@ -19,16 +19,16 @@ Wilkes revised the patch to conform to the PDDP template for Pd version
#X text 12 5 KEYWORDS control array filesystem;
#X text 12 165 RELEASE_DATE 1997;
#X restore 500 597 pd META;
#X obj 0 487 cnv 3 550 3 empty \$0-pddp.cnv.outlets outlets 8 12 0
13 -228856 -1 0;
#X obj 0 452 cnv 3 550 3 empty \$0-pddp.cnv.outlets outlets 8 12 0
13 #dcdcdc #000000 0;
#X obj 0 529 cnv 3 550 3 empty \$0-pddp.cnv.argument arguments 8 12
0 13 -228856 -1 0;
0 13 #dcdcdc #000000 0;
#X obj 0 554 cnv 3 550 3 empty \$0-pddp.cnv.more_info more_info 8 12
0 13 -228856 -1 0;
0 13 #dcdcdc #000000 0;
#X text 98 533 (none);
#N canvas 217 519 428 106 Related_objects 0;
#X obj 0 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -204280 -1 0;
14 #c4dcdc #000000 0;
#X text 7 2 [soundfiler] Related Objects;
#X obj 22 43 tabwrite~;
#X obj 22 69 tabread4~;
......@@ -36,16 +36,16 @@ Wilkes revised the patch to conform to the PDDP template for Pd version
#X obj 143 69 writesf~;
#X obj 87 69 readsf~;
#X restore 102 597 pd Related_objects;
#X obj 78 396 cnv 17 3 80 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856
-162280 0;
#X text 98 495 float;
#X obj 78 496 cnv 17 3 17 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856
-162280 0;
#X obj 78 361 cnv 17 3 80 empty \$0-pddp.cnv.let.0 0 5 9 0 16 #dcdcdc
#9c9c9c 0;
#X text 98 460 float;
#X obj 78 461 cnv 17 3 17 empty \$0-pddp.cnv.let.0 0 5 9 0 16 #dcdcdc
#9c9c9c 0;
#X obj 477 10 soundfiler;
#X text 11 23 read and write soundfiles to arrays;
#X text 98 395 read;
#X text 98 412 write;
#X text 168 495 - the output specifies the total number of samples
#X text 98 360 read;
#X text 98 377 write;
#X text 168 460 - the output specifies the total number of samples
that have been read or written.;
#X obj 20 293 soundfiler;
#X floatatom 20 317 0 0 0 0 - - -;
......@@ -54,16 +54,16 @@ that have been read or written.;
#X text 322 224 write a file;
#X text 358 268 write stereo;
#N canvas 0 0 450 300 (subpatch) 0;
#X array sf-array1 77971 float 0;
#X coords 0 1 77971 -1 130 70 1;
#X restore 135 306 graph;
#X array sf-array1 77971 float 0 black black;
#X coords 0 1 77970 -1 130 50 1;
#X restore 185 296 graph;
#N canvas 0 0 450 300 (subpatch) 0;
#X array sf-array2 77971 float 0;
#X coords 0 1 77971 -1 130 70 1;
#X restore 288 306 graph;
#X array sf-array2 77971 float 0 black black;
#X coords 0 1 77970 -1 130 50 1;
#X restore 338 296 graph;
#N canvas 110 93 428 434 flags 0;
#X obj 0 0 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -204280 -1 0;
14 #c4dcdc #000000 0;
#X text 19 37 When reading you can leave soundfiler to figure out which
of the three known soundfile formats the file belongs to or override
all header information using the "-raw" flag.;
......@@ -88,9 +88,9 @@ prefers.;
#X text 17 400 The number of channels is limited to 64;
#X text 37 371 -rate <sample rate>;
#X text 7 1 [soundfiler] Flags;
#X restore 172 459 pd flags;
#X text 168 412 - write a soundfile.;
#X text 169 428 The "read" and "write" messages accept flags. See the
#X restore 172 424 pd flags;
#X text 168 377 - write a soundfile.;
#X text 169 393 The "read" and "write" messages accept flags. See the
subpatch below for details:;
#X msg 20 138 read ../sound/bell.aiff sf-array2;
#X msg 20 161 read -resize ../sound/bell.aiff sf-array2;
......@@ -102,7 +102,7 @@ subpatch below for details:;
;
#X text 399 197 overriding everything;
#X text 398 183 ...or even;
#X text 168 395 - read a soundfile.;
#X text 168 360 - read a soundfile.;
#X text 17 41 The [soundfiler] object reads and writes floating point
arrays to binary soundfiles which may contain 2 or 3 byte fixed point
or 4 byte floating point samples in wave \, aiff \, or next formats
......@@ -113,7 +113,14 @@ and unsupplied channels are zeroed out).;
#X obj 4 597 pddp/pddplink all_about_help_patches.pd -text Usage Guide
;
#X obj 98 575 pddp/pddplink all_about_arrays.pd;
#X obj 78 497 cnv 17 3 17 empty \$0-pddp.cnv.let.0 0 5 9 0 16 #dcdcdc
#9c9c9c 0;
#X text 98 496 list;
#X obj 77 318 print sf_stats;
#X text 168 496 - stats for the file being read or written: <samplerate>
<headersize> <nchannels> <bytespersample> <endianness>;
#X connect 17 0 18 0;
#X connect 17 1 43 0;
#X connect 28 0 17 0;
#X connect 29 0 17 0;
#X connect 30 0 17 0;
......
This diff is collapsed.
#N canvas -9 -9 771 392 12;
#N canvas 128 123 771 392 12;
#X obj 465 281 r \$0-result;
#X obj 212 239 bng 15 250 50 0 empty empty Run_all 17 7 0 10 #fcfcfc
#000000 #000000;
......@@ -25,7 +25,7 @@ is handy for some binbuf tests.;
#X obj 198 659 rtest makefilename_double_percent;
#X obj 198 710 rtest makefilename_code_coverage;
#N canvas 461 242 450 323 (subpatch) 0;
#X restore 201 2605 pd;
#X restore 201 2765 pd;
#X obj 198 761 rtest makefilename_default;
#X obj 198 812 rtest makefilename_default_bang;
#X obj 198 863 rtest makefilename_float;
......@@ -66,6 +66,8 @@ is handy for some binbuf tests.;
#X obj 198 2416 rtest inlet~_fwd_large_message;
#X obj 198 2471 rtest pow~_negative_numbers;
#X obj 198 2526 rtest encapsulate;
#X obj 198 2581 rtest soundfiler_read_coverage;
#X obj 198 2636 rtest writesf~_open_coverage;
#X connect 0 0 27 0;
#X connect 1 0 4 0;
#X connect 2 0 42 0;
......@@ -117,3 +119,5 @@ is handy for some binbuf tests.;
#X connect 57 0 58 0;
#X connect 58 0 59 0;
#X connect 59 0 60 0;
#X connect 60 0 61 0;
#X connect 61 0 62 0;
#N canvas 106 64 1067 916 12;
#X obj 53 609 ../utils/method-error soundfiler;
#X obj 168 684 route bang;
#X obj 168 713 f 0;
#X obj 235 713 b;
#X obj 235 742 f 1;
#X obj 53 773 list prepend;
#X obj 53 638 list prepend this message should trigger an error:;
#X obj 53 10 inlet;
#X msg 53 89 bang;
#X obj 53 581 receive \$0-;
#N canvas 771 533 450 425 \$0-too-many-channels 0;
#X obj 80 31 inlet;
#X obj 80 60 f \$0;
#X msg 80 110 \; \$1- read z z z z z z z z z z z z z z z z z z z z
z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z
z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z
z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z
z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z
z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z
z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z
z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X restore 169 128 pd \$0-too-many-channels;
#X msg 169 97 bang;
#X obj 53 39 trigger bang bang;
#X text 182 24 This just covers the flags. We probably need to add
file-loading tests at some point.;
#X obj 53 802 outlet;
#X msg 53 158 \; \$1- \$2 -skip \; \$1- \$2 -skip rope \; \$1- \$2
-skip -1 \; \$1- \$2 -raw \; \$1- \$2 -raw dope \; \$1- \$2 -raw \;
\$1- \$2 -raw 0 \; \$1- \$2 -raw 0 0 \; \$1- \$2 -raw 0 0 0 \; \$1-
\$2 -raw dope 0 0 0 \; \$1- \$2 -raw 0 dope 0 0 \; \$1- \$2 -raw 0
1 dope 0 \; \$1- \$2 -raw 0 1 2 dope \; \$1- \$2 -raw -1 0 0 0 \; \$1-
\$2 -raw 0 0 2 l \; \$1- \$2 -raw 0 1024 2 n \; \$1- \$2 -raw 0 1 1
n \; \$1- \$2 -raw 0 1 5 n \; \$1- \$2 -raw 0 1 2 z \; \$1- \$2 -resize
12 \; \$1- \$2 -maxsize \; \$1- \$2 -maxsize 1e+19 \; \$1- \$2 -reginald
\; \$1- \$2;
#X obj 53 118 list \$0 read;
#X connect 0 0 6 0;
#X connect 0 1 1 0;
#X connect 1 0 2 0;
#X connect 1 1 3 0;
#X connect 2 0 5 1;
#X connect 3 0 4 0;
#X connect 4 0 5 1;
#X connect 5 0 14 0;
#X connect 6 0 5 0;
#X connect 7 0 12 0;
#X connect 8 0 16 0;
#X connect 9 0 0 0;
#X connect 11 0 10 0;
#X connect 12 0 8 0;
#X connect 12 1 11 0;
#X connect 16 0 15 0;
#N canvas 641 120 1067 916 12;
#X obj 53 669 ../utils/method-error soundfiler;
#X obj 168 744 route bang;
#X obj 168 773 f 0;
#X obj 235 773 b;
#X obj 235 802 f 1;
#X obj 53 833 list prepend;
#X obj 53 698 list prepend this message should trigger an error:;
#X obj 53 10 inlet;
#X msg 53 89 bang;
#X obj 53 641 receive \$0-;
#N canvas 771 542 450 425 \$0-too-many-channels 1;
#X obj 80 31 inlet;
#X obj 80 60 f \$0;
#X msg 80 110 \; \$1- write z z z z z z z z z z z z z z z z z z z z
z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z
z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z
z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z
z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z
z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z
z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z
z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z z;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X restore 169 128 pd \$0-too-many-channels;
#X msg 169 97 bang;
#X obj 53 39 trigger bang bang;
#X text 182 24 This just covers the flags. We probably need to add
file-loading tests at some point.;
#X obj 53 862 outlet;
#X obj 53 118 list \$0 write;
#X msg 53 158 \; \$1- \$2 -skip \; \$1- \$2 -skip rope \; \$1- \$2
-skip -1 \; \$1- \$2 -nframes \; \$1- \$2 -nframes dope \; \$1- \$2
-nframes -1 \; \$1- \$2 -normalize 12 \; \$1- \$2 -bytes \; \$1- \$2
-bytes 1 \; \$1- \$2 -bytes 5 \; \$1- \$2 -resize 12 \; \$1- \$2 -wave
1 \; \$1- \$2 -nextstep 1 \; \$1- \$2 -aiff 1 \; \$1- \$2 -big 1 \;
\$1- \$2 -little 1 \; \$1- \$2 -r \; \$1- \$2 -rate \; \$1- \$2 -r
0 \; \$1- \$2 -rate 0 \; \$1- \$2 -reginald \; \$1- \$2 \; \$1- \$2
12 \; \$1- \$2 foo 12 \; \$1- \$2 -bytes 4 -aiff foo \; \$1- \$2 foo
no_table \;;
#X connect 0 0 6 0;
#X connect 0 1 1 0;
#X connect 1 0 2 0;
#X connect 1 1 3 0;
#X connect 2 0 5 1;
#X connect 3 0 4 0;
#X connect 4 0 5 1;
#X connect 5 0 14 0;
#X connect 6 0 5 0;
#X connect 7 0 12 0;
#X connect 8 0 15 0;
#X connect 9 0 0 0;
#X connect 11 0 10 0;
#X connect 12 0 8 0;
#X connect 12 1 11 0;
#X connect 15 0 16 0;
#N canvas 72 64 1067 916 12;
#X obj 138 754 route bang;
#X obj 138 783 f 0;
#X obj 205 783 b;
#X obj 205 812 f 1;
#X obj 23 843 list prepend;
#X obj 23 708 list prepend this message should trigger an error:;
#X obj 23 20 inlet;
#X msg 23 99 bang;
#X obj 23 651 receive \$0-;
#X text 42 54 This just covers the flags. We probably need to add file-loading
tests at some point.;
#X obj 23 872 outlet;
#X msg 23 168 \; \$1- \$2 -skip \; \$1- \$2 -skip rope \; \$1- \$2
-skip -1 \; \$1- \$2 -nframes \; \$1- \$2 -nframes dope \; \$1- \$2
-nframes -1 \; \$1- \$2 -normalize 12 \; \$1- \$2 -bytes \; \$1- \$2
-bytes 1 \; \$1- \$2 -bytes 5 \; \$1- \$2 -resize 12 \; \$1- \$2 -wave
1 \; \$1- \$2 -nextstep 1 \; \$1- \$2 -aiff 1 \; \$1- \$2 -big 1 \;
\$1- \$2 -little 1 \; \$1- \$2 -r \; \$1- \$2 -rate \; \$1- \$2 -r
0 \; \$1- \$2 -rate 0 \; \$1- \$2 -reginald \; \$1- \$2 \; \$1- \$2
12 \; \$1- \$2 foo 12 \; \$1- \$2 -bytes 4 -aiff foo \; \$1- \$2 foo
extra_arg \;;
#X obj 23 128 list \$0 open;
#X obj 23 679 ../utils/method-error writesf~;
#X connect 0 0 1 0;
#X connect 0 1 2 0;
#X connect 1 0 4 1;
#X connect 2 0 3 0;
#X connect 3 0 4 1;
#X connect 4 0 10 0;
#X connect 5 0 4 0;
#X connect 6 0 7 0;
#X connect 7 0 12 0;
#X connect 8 0 13 0;
#X connect 12 0 11 0;
#X connect 13 0 5 0;
#X connect 13 1 0 0;
#N canvas 861 254 781 553 12;
#X obj 96 28 inlet;
#X obj 201 125 unpost;
#X obj 176 178 list;
#X obj 176 267 outlet;
#X obj 240 178 \$1;
#X obj 96 267 outlet;
#X obj 96 86 trigger anything bang anything bang;
#X text 143 29 test a method that triggers;
#X text 143 49 an error;
#X text 55 220 the message;
#X text 159 221 the error (formatted as a single symbol);
#X connect 0 0 6 0;
#X connect 1 0 2 1;
#X connect 1 1 4 0;
#X connect 2 0 3 0;
#X connect 6 0 5 0;
#X connect 6 1 2 0;
#X connect 6 2 1 0;
#X connect 6 3 2 1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment