aboutsummaryrefslogtreecommitdiff
path: root/ambiSfRead7~.pd
diff options
context:
space:
mode:
Diffstat (limited to 'ambiSfRead7~.pd')
-rw-r--r--ambiSfRead7~.pd150
1 files changed, 150 insertions, 0 deletions
diff --git a/ambiSfRead7~.pd b/ambiSfRead7~.pd
new file mode 100644
index 0000000..7cc76f2
--- /dev/null
+++ b/ambiSfRead7~.pd
@@ -0,0 +1,150 @@
+#N canvas 352 57 1087 783 10;
+#X msg 149 302 1;
+#X msg 181 300 0;
+#X msg 49 273 print;
+#X obj 388 216 openpanel;
+#X text 607 546 Send it "1" to play once a file is opened.;
+#X obj 31 681 *~ 1.414;
+#X obj 24 711 outlet~;
+#X obj 79 713 outlet~;
+#X obj 134 713 outlet~;
+#X obj 189 715 outlet~;
+#X obj 188 230 t b;
+#X obj 389 191 t b;
+#X obj 337 6 loadbang;
+#X obj 339 34 t b b;
+#X obj 260 332 spigot;
+#X obj 348 289 symbol;
+#X obj 523 415 spigot;
+#X text 602 559 todo: append more args?;
+#X obj 822 92 inlet readsf;
+#X obj 47 29 inlet attr;
+#N canvas 224 201 628 639 wav_info 0;
+#X msg 31 92 read \$1;
+#X text 40 146 "read"-message needs a symbol (soundfile in wave format)
+;
+#X text 50 184 "list"-message output with 7 items;
+#X text 91 224 4.item: <float> header-size in bytes;
+#X text 91 194 1.item: <float> samplerate in Hz;
+#X text 91 204 2.item: <symbol> file-name;
+#X text 91 234 5.item: <float> number of channels;
+#X text 91 254 7.item: <symbol> endianness ("l" for little);
+#X text 260 264 ("b" for big);
+#X text 262 276 (eg. little endian "wav" is natural format on Intel-machines)
+;
+#X text 91 214 3.item: <float> sound-data-length in samples;
+#X text 91 244 6.item: <float> sample-resolution in bytes;
+#X obj 33 49 inlet;
+#X obj 31 302 unpack f s f f f f s;
+#X obj 26 489 outlet duration_ms;
+#X text 132 49 NOTE: we could also use the wavinfo object.;
+#X msg 32 459 duration \$1;
+#X msg 161 434 bytes \$1;
+#X msg 21 393 samplerate \$1;
+#X obj 37 434 ./smpToMs;
+#X obj 31 166 iemlib/soundfile_info;
+#X connect 0 0 20 0;
+#X connect 12 0 0 0;
+#X connect 13 0 18 0;
+#X connect 13 2 19 0;
+#X connect 13 5 17 0;
+#X connect 16 0 14 0;
+#X connect 17 0 14 0;
+#X connect 18 0 14 0;
+#X connect 19 0 16 0;
+#X connect 20 0 13 0;
+#X restore 326 588 pd wav_info;
+#X msg 261 651 done bang;
+#X obj 418 643 timer;
+#X obj 452 616 metro 50;
+#X obj 147 347 f;
+#X obj 456 559 sel 1;
+#X msg 456 589 1;
+#X obj 501 571 t b;
+#X msg 500 592 0;
+#X msg 416 666 elapsed \$1;
+#X obj 824 148 s \$0-readsf;
+#X obj 91 607 r \$0-readsf;
+#X text 174 350 Playing;
+#X text 154 212 Play stop;
+#X obj 148 249 t b b;
+#X msg 147 381 playing \$1;
+#X obj 562 391 f;
+#X msg 384 58 autostart 1 \, loop 0;
+#X text 395 39 Default values;
+#X obj 347 266 t s s;
+#X obj 349 311 t b s;
+#X text 259 351 autostart;
+#X text 591 390 loop;
+#X obj 523 440 delay 100;
+#X text 590 441 avoids infinite loop;
+#X obj 344 138 route file play stop openpanel open autostart loop loop_interval
+;
+#X obj 486 107 tof/arguments comma;
+#X obj 347 243 zexy/list2symbol;
+#X obj 376 336 cyclone/prepend open;
+#X obj 70 478 readsf~ 7;
+#X obj 251 720 outlet~;
+#X obj 306 720 outlet~;
+#X obj 361 722 outlet~;
+#X obj 578 698 outlet info;
+#X connect 0 0 24 0;
+#X connect 1 0 24 0;
+#X connect 2 0 49 0;
+#X connect 3 0 47 0;
+#X connect 5 0 6 0;
+#X connect 10 0 1 0;
+#X connect 11 0 3 0;
+#X connect 12 0 13 0;
+#X connect 13 0 46 0;
+#X connect 13 1 37 0;
+#X connect 14 0 0 0;
+#X connect 15 0 40 0;
+#X connect 16 0 43 0;
+#X connect 18 0 30 0;
+#X connect 19 0 45 0;
+#X connect 20 0 53 0;
+#X connect 21 0 53 0;
+#X connect 22 0 29 0;
+#X connect 23 0 22 1;
+#X connect 24 0 25 0;
+#X connect 24 0 35 0;
+#X connect 24 0 49 0;
+#X connect 25 0 22 0;
+#X connect 25 0 26 0;
+#X connect 25 1 27 0;
+#X connect 26 0 23 0;
+#X connect 27 0 28 0;
+#X connect 28 0 23 0;
+#X connect 29 0 53 0;
+#X connect 31 0 49 0;
+#X connect 34 0 0 0;
+#X connect 34 1 15 0;
+#X connect 35 0 53 0;
+#X connect 36 0 16 1;
+#X connect 37 0 45 0;
+#X connect 39 0 15 0;
+#X connect 39 1 20 0;
+#X connect 40 0 14 0;
+#X connect 40 1 48 0;
+#X connect 43 0 15 0;
+#X connect 45 0 47 0;
+#X connect 45 1 34 0;
+#X connect 45 2 10 0;
+#X connect 45 3 11 0;
+#X connect 45 4 15 0;
+#X connect 45 5 14 1;
+#X connect 45 6 36 0;
+#X connect 45 8 43 1;
+#X connect 46 0 45 0;
+#X connect 47 0 39 0;
+#X connect 48 0 49 0;
+#X connect 49 0 5 0;
+#X connect 49 1 7 0;
+#X connect 49 2 8 0;
+#X connect 49 3 9 0;
+#X connect 49 4 50 0;
+#X connect 49 5 51 0;
+#X connect 49 6 52 0;
+#X connect 49 7 16 0;
+#X connect 49 7 21 0;