diff options
author | Franz Zotter <fzotter@users.sourceforge.net> | 2006-08-28 16:04:46 +0000 |
---|---|---|
committer | Franz Zotter <fzotter@users.sourceforge.net> | 2006-08-28 16:04:46 +0000 |
commit | e593b8e98687f93cced437c72c75e89608b8ce7a (patch) | |
tree | 43bee1b8e174fea459176f00ea3cf052b9dafb01 | |
parent | c3addc6fc099e7b8c6afef9fc6faf4548cbb6a64 (diff) |
added multichannel soundfiler abstractions for reading and writing
matrix rows into sound files. and some documentation for mtx_lin/logspace
svn path=/trunk/externals/iem/iemmatrix/; revision=5763
-rw-r--r-- | abs/mtx_linspace-help.pd | 14 | ||||
-rw-r--r-- | abs/mtx_logspace-help.pd | 14 | ||||
-rw-r--r-- | abs/mtx_sfread-help.pd | 17 | ||||
-rw-r--r-- | abs/mtx_sfread.pd | 162 | ||||
-rw-r--r-- | abs/mtx_sfwrite-help.pd | 17 | ||||
-rw-r--r-- | abs/mtx_sfwrite.pd | 123 |
6 files changed, 347 insertions, 0 deletions
diff --git a/abs/mtx_linspace-help.pd b/abs/mtx_linspace-help.pd new file mode 100644 index 0000000..22ad7e7 --- /dev/null +++ b/abs/mtx_linspace-help.pd @@ -0,0 +1,14 @@ +#N canvas 439 163 841 379 10; +#X text 482 28 part of iemmatrix; +#X text 43 34 [mtx_linspace]; +#X text 166 69 creates a linearly spaced vector from a startvalue to +a stopvalue with n entries; +#X text 268 138 inlet: [startval stopval n(; +#X text 268 157 outlet: matrix/vector; +#X text 465 324 see also:; +#X obj 535 325 mtx_logspace; +#X obj 33 165 mtx_linspace; +#X obj 33 187 mtx_print; +#X msg 33 143 1 4 10; +#X connect 7 0 8 0; +#X connect 9 0 7 0; diff --git a/abs/mtx_logspace-help.pd b/abs/mtx_logspace-help.pd new file mode 100644 index 0000000..18410f6 --- /dev/null +++ b/abs/mtx_logspace-help.pd @@ -0,0 +1,14 @@ +#N canvas 439 163 841 379 10; +#X text 482 28 part of iemmatrix; +#X text 268 138 inlet: [startval stopval n(; +#X text 268 157 outlet: matrix/vector; +#X text 465 324 see also:; +#X obj 33 187 mtx_print; +#X text 43 34 [mtx_logspace]; +#X text 166 69 creates a logarithmically spaced vector from a startvalue +to a stopvalue with n entries; +#X obj 33 165 mtx_logspace; +#X msg 33 142 1 10000 9; +#X obj 535 325 mtx_linspace; +#X connect 7 0 4 0; +#X connect 8 0 7 0; diff --git a/abs/mtx_sfread-help.pd b/abs/mtx_sfread-help.pd new file mode 100644 index 0000000..376ae93 --- /dev/null +++ b/abs/mtx_sfread-help.pd @@ -0,0 +1,17 @@ +#N canvas 439 256 841 379 10; +#X text 482 28 part of iemmatrix; +#X obj 33 116 mtx_rand; +#X msg 32 207 bang; +#X obj 32 249 mtx_print file; +#X obj 32 228 mtx_sfread 10 ./test_mtx_sfwrite.wav; +#X obj 33 146 mtx_sfwrite ./test_mtx_sfwrite.wav; +#X msg 33 94 10 3; +#X obj 94 116 mtx_print original; +#X text 43 34 [mtx_sfread][mtx_sfwrite]; +#X text 165 69 reads the rows of a matrix from a multichannel sound +file; +#X connect 1 0 5 0; +#X connect 1 0 7 0; +#X connect 2 0 4 0; +#X connect 4 0 3 0; +#X connect 6 0 1 0; diff --git a/abs/mtx_sfread.pd b/abs/mtx_sfread.pd new file mode 100644 index 0000000..f8b76d3 --- /dev/null +++ b/abs/mtx_sfread.pd @@ -0,0 +1,162 @@ +#N canvas 308 65 872 786 10; +#X msg 128 128 clear; +#X obj 73 149 until 3; +#X obj 98 168 + 1; +#X obj 113 187 * 20; +#X obj 145 187 + 80; +#X obj 73 87 \$1; +#X obj 73 107 clip 0 64; +#X obj 73 207 makefilename \$0-track%d; +#X obj 73 228 t a a; +#X obj 73 249 pack s 1; +#X obj 51 362 soundfiler; +#X obj 51 24 inlet; +#X obj 298 118 loadbang; +#X msg 305 249 read -resize \$1; +#X obj 266 249 t a b; +#X obj 305 270 t l; +#X obj 51 323 list; +#X obj 51 342 list trim; +#X obj 217 270 list prepend; +#X obj 51 46 symbol \$2; +#X msg 73 269 obj 100 \$2 table \$1; +#X obj 73 128 t f b b; +#X obj 267 470 until 3; +#X obj 292 489 + 1; +#X obj 267 413 \$1; +#X obj 267 432 clip 0 64; +#X obj 289 527 makefilename \$0-track%d; +#X msg 152 427 clear; +#X obj 122 405 t b b; +#X obj 267 451 t f b; +#X obj 267 758 mtx; +#X obj 289 546 t b a; +#X text 571 87 pd >=0.39-2; +#X msg 267 633 row \$1; +#X obj 267 652 list append; +#X obj 349 671 length; +#X obj 349 652 spigot; +#X obj 388 632 == 1; +#X obj 267 508 t f f f; +#X obj 319 624 t l l; +#X obj 349 730 mtx_zeros; +#X obj 349 691 t b f; +#X obj 349 711 pack \$1 0; +#X obj 267 780 outlet; +#X obj 319 565 list prepend set; +#X obj 319 584 list trim; +#X obj 319 604 tabdump dummy; +#X obj 267 671 list trim; +#X obj 51 382 != 0; +#X obj 83 382 sel 1; +#X obj 73 290 iem_send; +#N canvas 569 312 599 627 \$0-subpatch 0; +#X obj 100 100 table 1036-track1; +#X obj 100 120 table 1036-track2; +#X obj 100 140 table 1036-track3; +#X obj 100 160 table 1036-track4; +#X obj 100 180 table 1036-track5; +#X obj 100 200 table 1036-track6; +#X obj 100 220 table 1036-track7; +#X obj 100 240 table 1036-track8; +#X obj 100 260 table 1036-track9; +#X obj 100 280 table 1036-track10; +#X restore 157 315 pd \$0-subpatch; +#X obj 152 447 s \$0-tosubpatch; +#X obj 298 137 \$0; +#X obj 297 196 list trim; +#X obj 298 157 makefilename pd-%d-subpatch; +#X obj 297 176 list prepend set; +#X text 601 115 \$1 ... nchan \$2 ... filename; +#X text 474 73 requires iemlib \, iemmatrix; +#X obj 73 187 t f f; +#X obj 51 67 t b b a; +#X obj 122 382 t b b; +#X msg 127 149 1; +#X obj 73 168 i; +#X text 162 166 dynamic patching; +#X text 376 229 gathering command for soundfiler; +#X text 127 362 loading tracks into subpatch-tables; +#X msg 321 470 1; +#X obj 267 489 i; +#X text 421 632 initialize matrix with zeros; +#X text 329 506 stepping through the subpatch-tables; +#X text 92 20 name/bang; +#X text 286 30 reading multichannel audiofiles into matrix rows; +#X connect 0 0 50 0; +#X connect 1 0 63 0; +#X connect 2 0 63 1; +#X connect 3 0 4 0; +#X connect 4 0 9 1; +#X connect 5 0 6 0; +#X connect 6 0 21 0; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 8 1 18 0; +#X connect 9 0 20 0; +#X connect 10 0 48 0; +#X connect 11 0 19 0; +#X connect 12 0 53 0; +#X connect 13 0 18 1; +#X connect 14 0 13 0; +#X connect 14 1 18 1; +#X connect 15 0 18 1; +#X connect 16 0 17 0; +#X connect 17 0 10 0; +#X connect 18 0 15 0; +#X connect 18 0 16 1; +#X connect 19 0 60 0; +#X connect 20 0 50 0; +#X connect 21 0 1 0; +#X connect 21 1 62 0; +#X connect 21 2 0 0; +#X connect 22 0 68 0; +#X connect 23 0 68 1; +#X connect 24 0 25 0; +#X connect 25 0 29 0; +#X connect 26 0 31 0; +#X connect 27 0 52 0; +#X connect 28 0 30 0; +#X connect 28 1 27 0; +#X connect 29 0 22 0; +#X connect 29 1 67 0; +#X connect 30 0 43 0; +#X connect 31 0 46 0; +#X connect 31 1 44 0; +#X connect 33 0 34 0; +#X connect 34 0 47 0; +#X connect 35 0 41 0; +#X connect 36 0 35 0; +#X connect 37 0 36 1; +#X connect 38 0 33 0; +#X connect 38 1 26 0; +#X connect 38 2 37 0; +#X connect 39 0 34 1; +#X connect 39 1 36 0; +#X connect 40 0 30 1; +#X connect 41 0 42 0; +#X connect 41 1 42 1; +#X connect 42 0 40 0; +#X connect 44 0 45 0; +#X connect 45 0 46 0; +#X connect 46 0 39 0; +#X connect 47 0 30 0; +#X connect 48 0 49 0; +#X connect 49 0 61 0; +#X connect 53 0 55 0; +#X connect 54 0 50 1; +#X connect 55 0 56 0; +#X connect 56 0 54 0; +#X connect 59 0 7 0; +#X connect 59 1 3 0; +#X connect 60 0 16 0; +#X connect 60 1 5 0; +#X connect 60 2 14 0; +#X connect 61 0 28 0; +#X connect 61 1 24 0; +#X connect 62 0 63 1; +#X connect 63 0 2 0; +#X connect 63 0 59 0; +#X connect 67 0 68 1; +#X connect 68 0 23 0; +#X connect 68 0 38 0; diff --git a/abs/mtx_sfwrite-help.pd b/abs/mtx_sfwrite-help.pd new file mode 100644 index 0000000..0eebb86 --- /dev/null +++ b/abs/mtx_sfwrite-help.pd @@ -0,0 +1,17 @@ +#N canvas 439 256 841 379 10; +#X text 482 28 part of iemmatrix; +#X text 166 69 writes the rows of a matrix into a multichannel sound +file; +#X obj 33 116 mtx_rand; +#X msg 32 207 bang; +#X obj 32 249 mtx_print file; +#X obj 32 228 mtx_sfread 10 ./test_mtx_sfwrite.wav; +#X obj 33 146 mtx_sfwrite ./test_mtx_sfwrite.wav; +#X text 43 34 [mtx_sfwrite][mtx_sfread]; +#X msg 33 97 10 4; +#X obj 95 116 mtx_print original; +#X connect 2 0 6 0; +#X connect 2 0 9 0; +#X connect 3 0 5 0; +#X connect 5 0 4 0; +#X connect 8 0 2 0; diff --git a/abs/mtx_sfwrite.pd b/abs/mtx_sfwrite.pd new file mode 100644 index 0000000..eaf3108 --- /dev/null +++ b/abs/mtx_sfwrite.pd @@ -0,0 +1,123 @@ +#N canvas 429 353 838 383 10; +#X obj 53 121 until 3; +#X obj 78 140 + 1; +#X text 425 51 reading multichannel soundfiles via soundfiler and dynamically +created table arrays into multichannel matrix; +#X obj 239 345 soundfiler; +#X obj 297 50 inlet; +#X obj 595 120 loadbang; +#X obj 401 285 t l; +#X obj 239 325 list trim; +#X obj 311 285 list prepend; +#X text 399 30 pd >=0.39-2; +#X obj 430 264 iem_send; +#N canvas 569 312 599 627 \$0-subpatch 0; +#X obj 100 100 table 1037-track1 3; +#X obj 100 120 table 1037-track2 3; +#X obj 100 140 table 1037-track3 3; +#X obj 100 160 table 1037-track4 3; +#X obj 100 180 table 1037-track5 3; +#X obj 100 200 table 1037-track6 3; +#X obj 100 220 table 1037-track7 3; +#X obj 100 240 table 1037-track8 3; +#X obj 100 260 table 1037-track9 3; +#X obj 100 280 table 1037-track10 3; +#X restore 430 285 pd \$0-subpatch; +#X obj 595 140 \$0; +#X obj 595 200 list trim; +#X obj 595 159 makefilename pd-%d-subpatch; +#X obj 595 180 list prepend set; +#X obj 34 23 inlet; +#X text 35 4 matrix; +#X obj 53 62 mtx_size; +#X text 235 50 filename; +#X obj 53 82 clip 1 64; +#X obj 53 224 mtx; +#X msg 53 204 row \$1; +#X obj 122 265 list prepend set; +#X obj 122 286 list trim; +#X obj 71 308 iem_send; +#X obj 53 244 list prepend 0; +#X obj 53 264 list trim; +#X msg 533 181 clear; +#X obj 430 142 until 3; +#X obj 469 181 * 20; +#X obj 501 181 + 80; +#X obj 430 201 makefilename \$0-track%d; +#X obj 430 122 t f b b; +#X obj 53 160 t f f; +#X obj 53 101 t f b f; +#X text 633 140 qualified subpatch; +#X text 427 78 dynamic table subpatch on dimension change; +#X obj 430 221 pack s 1 1; +#X msg 430 241 obj 100 \$2 table \$1 \$3; +#X msg 239 265 write -wave -bytes 4 \$1; +#X obj 239 305 list append; +#X obj 34 42 t b a a b; +#X text 396 15 requires iemlib \, iemmatrix; +#X msg 106 121 1; +#X obj 53 140 i; +#X msg 483 142 1; +#X obj 455 162 + 1; +#X obj 430 162 i; +#X obj 430 181 t f f; +#X text 102 5 writing matrix rows into multichannel; +#X text 102 22 audio files; +#X obj 239 245 symbol \$1; +#X text 535 28 \$1 ... filename; +#X obj 83 182 makefilename \$0-track%d; +#X connect 0 0 45 0; +#X connect 1 0 45 1; +#X connect 4 0 52 1; +#X connect 5 0 12 0; +#X connect 6 0 8 1; +#X connect 7 0 3 0; +#X connect 8 0 6 0; +#X connect 8 0 41 1; +#X connect 12 0 14 0; +#X connect 13 0 10 1; +#X connect 14 0 15 0; +#X connect 15 0 13 0; +#X connect 16 0 42 0; +#X connect 18 0 20 0; +#X connect 18 1 38 2; +#X connect 20 0 35 0; +#X connect 21 0 26 0; +#X connect 22 0 21 0; +#X connect 23 0 24 0; +#X connect 24 0 25 1; +#X connect 26 0 27 0; +#X connect 27 0 25 0; +#X connect 28 0 10 0; +#X connect 29 0 48 0; +#X connect 30 0 31 0; +#X connect 31 0 38 1; +#X connect 32 0 38 0; +#X connect 33 0 29 0; +#X connect 33 1 46 0; +#X connect 33 2 28 0; +#X connect 34 0 22 0; +#X connect 34 1 54 0; +#X connect 35 0 0 0; +#X connect 35 1 44 0; +#X connect 35 2 33 0; +#X connect 38 0 39 0; +#X connect 39 0 10 0; +#X connect 40 0 41 0; +#X connect 41 0 7 0; +#X connect 42 0 52 0; +#X connect 42 1 18 0; +#X connect 42 2 21 1; +#X connect 42 3 8 1; +#X connect 44 0 45 1; +#X connect 45 0 1 0; +#X connect 45 0 34 0; +#X connect 46 0 48 1; +#X connect 47 0 48 1; +#X connect 48 0 47 0; +#X connect 48 0 49 0; +#X connect 49 0 32 0; +#X connect 49 1 30 0; +#X connect 52 0 40 0; +#X connect 54 0 23 0; +#X connect 54 0 8 0; |