diff options
author | Thomas O Fredericks <mrtof@users.sourceforge.net> | 2010-05-28 13:46:58 +0000 |
---|---|---|
committer | Thomas O Fredericks <mrtof@users.sourceforge.net> | 2010-05-28 13:46:58 +0000 |
commit | 341d5303b4612e506897b3c7f494b0d85434ad33 (patch) | |
tree | 77a74502c334ec9c540f7e75940a35dc3d968da9 /tof | |
parent | 87d9722dd71a9f67b77509f05f807d57a7bc493b (diff) |
Added a few sample abstractions
svn path=/trunk/externals/tof/; revision=13574
Diffstat (limited to 'tof')
-rw-r--r-- | tof/pix_film+-help.pd | 38 | ||||
-rw-r--r-- | tof/pix_film+.pd | 97 | ||||
-rw-r--r-- | tof/sample-help.pd | 26 | ||||
-rw-r--r-- | tof/sample.pd | 167 | ||||
-rw-r--r-- | tof/sample_packel-help.pd | 16 | ||||
-rw-r--r-- | tof/sample_packel.pd | 8 | ||||
-rw-r--r-- | tof/sample_play~-help.pd | 31 | ||||
-rw-r--r-- | tof/sample_play~.pd | 160 | ||||
-rw-r--r-- | tof/sample_record~-help.pd | 32 | ||||
-rw-r--r-- | tof/sample_record~.pd | 49 | ||||
-rw-r--r-- | tof/sample_unpack-help.pd | 35 | ||||
-rw-r--r-- | tof/sample_unpack.pd | 33 |
12 files changed, 632 insertions, 60 deletions
diff --git a/tof/pix_film+-help.pd b/tof/pix_film+-help.pd index d12c313..42fd866 100644 --- a/tof/pix_film+-help.pd +++ b/tof/pix_film+-help.pd @@ -5,34 +5,36 @@ #X obj 333 47 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 54 342 pix_texture; -#X obj 135 176 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 +#X obj 135 176 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; -#X floatatom 132 304 5 0 0 0 - - -; +#X floatatom 118 317 5 0 0 0 - - -; #X msg 113 144 open \$1; -#X floatatom 162 210 5 0 0 0 - - -; +#X floatatom 180 204 5 0 0 0 - - -; #X obj 333 82 tof/gemwin+; -#X obj 54 236 tof/pix_film+; -#X text 200 212 inlet 3 \, float: speed; +#X text 218 206 inlet 3 \, float: speed; #X text 159 174 inlet 2 \, 0/1: stop/play; #X text 167 143 inlet 2 \, open (file): opens the movie file; #X obj 54 54 gemhead; -#X obj 54 382 rectangle 5.333 4; -#X floatatom 184 264 5 0 0 0 - - -; -#X text 220 265 outlet 3 \, float: total number of frames; -#X text 172 300 outlet 2 \, float: current frame; +#X obj 54 365 rectangle 5.333 4; +#X floatatom 184 294 5 0 0 0 - - -; +#X text 220 295 outlet 3 \, float: total number of frames; +#X text 158 313 outlet 2 \, float: current frame; #X text 37 -18 Description: A more user friendly movie file player for Gem.; #X text 37 1 Tags: Gem File; -#X text 171 380 outlet 1 \, gemlist; +#X text 171 363 outlet 1 \, gemlist; #X text 107 52 inlet 1 \, gemlist; +#X obj 54 236 tof/pix_film+ mov0.mov; +#X text 198 235 argument 1 \, (file): opens the movie file (optional) +; #X connect 0 0 6 0; #X connect 1 0 0 0; #X connect 2 0 8 0; -#X connect 3 0 14 0; -#X connect 4 0 9 1; -#X connect 6 0 9 1; -#X connect 7 0 9 2; -#X connect 9 0 3 0; -#X connect 9 1 5 0; -#X connect 9 2 15 0; -#X connect 13 0 9 0; +#X connect 3 0 13 0; +#X connect 4 0 21 1; +#X connect 6 0 21 1; +#X connect 7 0 21 2; +#X connect 12 0 21 0; +#X connect 21 0 3 0; +#X connect 21 1 5 0; +#X connect 21 2 14 0; diff --git a/tof/pix_film+.pd b/tof/pix_film+.pd index 0cf416e..1792e7f 100644 --- a/tof/pix_film+.pd +++ b/tof/pix_film+.pd @@ -7,8 +7,7 @@ #X msg 175 121 open \$1; #X obj 454 578 outlet length; #X obj 417 25 inlet speed; -#X obj 616 91 loadbang; -#X obj 617 130 tof/argument 1; +#X obj 661 -27 loadbang; #X msg 217 141 set -1; #X obj 141 253 change -1; #X obj 166 69 t a b; @@ -57,45 +56,59 @@ #X obj 454 530 int; #X obj 451 508 t f f; #X obj 457 552 t f f; +#X obj 661 23 tof/arguments; +#X obj 667 83 cyclone/tosymbol; +#X obj 661 -2 t b b; +#X obj 788 85 ggee/getdir 1; +#X obj 667 116 pack s s; +#X msg 667 142 open \$2/\$1; +#X obj 610 57 route bang; #X connect 0 0 2 0; -#X connect 2 0 29 0; -#X connect 2 1 28 0; -#X connect 3 0 19 0; -#X connect 5 0 29 0; -#X connect 7 0 16 0; -#X connect 8 0 9 0; -#X connect 9 0 5 0; -#X connect 10 0 11 0; -#X connect 11 0 29 1; -#X connect 12 0 5 0; -#X connect 12 1 10 0; +#X connect 2 0 28 0; +#X connect 2 1 27 0; +#X connect 3 0 18 0; +#X connect 5 0 28 0; +#X connect 7 0 15 0; +#X connect 8 0 34 0; +#X connect 9 0 10 0; +#X connect 10 0 28 1; +#X connect 11 0 5 0; +#X connect 11 1 9 0; +#X connect 12 0 13 0; +#X connect 12 1 14 1; #X connect 13 0 14 0; -#X connect 13 1 15 1; -#X connect 14 0 15 0; -#X connect 15 0 18 1; -#X connect 16 0 17 0; -#X connect 17 0 14 0; -#X connect 18 0 24 0; -#X connect 19 0 12 0; -#X connect 19 1 26 0; -#X connect 20 0 6 0; -#X connect 20 1 25 2; -#X connect 21 0 20 0; -#X connect 21 1 13 0; -#X connect 22 0 18 0; -#X connect 23 0 22 0; -#X connect 23 1 22 1; -#X connect 24 0 25 0; -#X connect 25 0 31 0; -#X connect 26 0 28 1; -#X connect 26 1 22 0; -#X connect 26 2 27 0; -#X connect 27 0 24 1; -#X connect 28 0 23 0; -#X connect 29 0 1 0; -#X connect 29 1 21 0; -#X connect 30 0 32 0; -#X connect 31 0 30 0; -#X connect 31 1 24 1; -#X connect 32 0 4 0; -#X connect 32 1 11 0; +#X connect 14 0 17 1; +#X connect 15 0 16 0; +#X connect 16 0 13 0; +#X connect 17 0 23 0; +#X connect 18 0 11 0; +#X connect 18 1 25 0; +#X connect 19 0 6 0; +#X connect 19 1 24 2; +#X connect 20 0 19 0; +#X connect 20 1 12 0; +#X connect 21 0 17 0; +#X connect 22 0 21 0; +#X connect 22 1 21 1; +#X connect 23 0 24 0; +#X connect 24 0 30 0; +#X connect 25 0 27 1; +#X connect 25 1 21 0; +#X connect 25 2 26 0; +#X connect 26 0 23 1; +#X connect 27 0 22 0; +#X connect 28 0 1 0; +#X connect 28 1 20 0; +#X connect 29 0 31 0; +#X connect 30 0 29 0; +#X connect 30 1 23 1; +#X connect 31 0 4 0; +#X connect 31 1 10 0; +#X connect 32 0 38 0; +#X connect 33 0 36 0; +#X connect 34 0 32 0; +#X connect 34 1 35 0; +#X connect 35 0 36 1; +#X connect 36 0 37 0; +#X connect 37 0 28 0; +#X connect 38 1 33 0; diff --git a/tof/sample-help.pd b/tof/sample-help.pd new file mode 100644 index 0000000..a95eab8 --- /dev/null +++ b/tof/sample-help.pd @@ -0,0 +1,26 @@ +#N canvas 1173 49 686 393 10; +#X msg 47 142 read \$1; +#X obj 47 116 openpanel; +#X obj 47 93 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X text 126 115 Inlet 1 \, read symbol: sound file to read into memory +; +#X text 44 17 Description: Loads a sound file (wav) as a sample; +#X text 51 249 See also:; +#X text 45 34 Tags: File Sound Table Sample; +#X text 222 175 Argument 1 \, symbol: Sample name; +#X text 223 192 (Argument 2 \, symbol): Sound file to read into memory +when created; +#X text 224 222 (Argument 2 \, float): Set a default length to the +table; +#X text 281 316 The following example creates a mono (1 channel) sample +with a 10 second table (at a sampling rate of 44100).; +#X text 225 241 (Argument 3 \, float): Set a default number of channels +\, either 1 or 2; +#X obj 47 177 tof/sample test mono0.wav; +#X obj 73 272 tof/sample_play~; +#X obj 72 295 tof/sample_unpack; +#X obj 283 350 tof/sample recording 441000 1; +#X connect 0 0 12 0; +#X connect 1 0 0 0; +#X connect 2 0 1 0; diff --git a/tof/sample.pd b/tof/sample.pd new file mode 100644 index 0000000..4c1786a --- /dev/null +++ b/tof/sample.pd @@ -0,0 +1,167 @@ +#N canvas 19 223 475 254 10; +#N canvas 1257 168 871 665 guts 0; +#X obj 182 257 soundfiler; +#X msg 139 232 read -resize \$1 0-\$2 1-\$2; +#X obj 138 180 list append \$1; +#X obj 104 117 iemlib/soundfile_info; +#X obj 25 -13 inlet; +#X obj 105 -11 r \$1; +#X obj 104 143 unpack f s f f f; +#X obj 17 510 list; +#X obj 104 77 cyclone/prepend read; +#X obj 25 154 t b s; +#X obj 35 572 send; +#X obj 25 124 symbol; +#X obj 305 -44 loadbang; +#X obj 266 168 == 1; +#X obj 138 205 zexy/demultiplex 0 1; +#X msg 307 233 read -resize \$1 0-\$2; +#X obj 287 193 t f f; +#X obj 73 241 t b f b; +#X obj 130 310 symbol \$1; +#X obj 107 581 outlet; +#X obj 160 579 outlet; +#X obj 214 580 outlet; +#X obj 263 578 outlet; +#X obj 302 38 tof/argument 2; +#X obj 304 71 route symbol; +#X obj 379 114 pack f s; +#X obj 428 42 symbol \$1; +#X msg 694 184 \; 0-\$2 resize \$1 \; 1-\$2 resize \$1; +#X obj 342 165 samplerate~; +#X obj 378 90 t f f; +#X obj 378 137 t b a; +#X obj 304 -1 t b b b; +#X obj 580 36 tof/argument 3; +#X obj 505 254 pack f f s 2; +#X obj 587 151 zexy/demultiplex; +#X obj 636 91 > 1; +#X msg 561 182 \; 0-\$2 resize \$1; +#X obj 345 578 outlet; +#X obj 457 578 outlet; +#X obj 111 519 unpack f s f s f f f; +#X msg 505 298 list \$1 none \$2 \$3 \$4 0 0; +#N canvas 1077 165 450 300 packels 0; +#X obj 57 16 inlet; +#X obj 21 247 outlet; +#X obj 70 247 outlet; +#X obj 119 247 outlet; +#X obj 176 244 outlet; +#X obj 224 253 outlet; +#X obj 277 250 outlet; +#X obj 66 184 t b a; +#X obj 118 185 t b a; +#X obj 173 184 t b a; +#X obj 225 185 t b a; +#X obj 280 189 t b a; +#X obj 344 246 outlet; +#X obj 347 185 t b a; +#X obj 68 69 route rate file size basename channels end start; +#X connect 0 0 14 0; +#X connect 7 0 1 0; +#X connect 7 1 2 0; +#X connect 8 0 1 0; +#X connect 8 1 3 0; +#X connect 9 0 1 0; +#X connect 9 1 4 0; +#X connect 10 0 1 0; +#X connect 10 1 5 0; +#X connect 11 0 1 0; +#X connect 11 1 6 0; +#X connect 13 0 1 0; +#X connect 13 1 12 0; +#X connect 14 0 1 0; +#X connect 14 1 7 0; +#X connect 14 2 8 0; +#X connect 14 3 9 0; +#X connect 14 4 10 0; +#X connect 14 5 11 0; +#X connect 14 6 13 0; +#X restore 227 316 pd packels; +#X obj 25 25 route return read bang; +#X text 196 446 rate file size table_basename channels end start; +#X obj 76 447 pack f s f s f f 0; +#X connect 0 0 44 2; +#X connect 0 0 44 5; +#X connect 1 0 0 0; +#X connect 2 0 14 0; +#X connect 3 0 6 0; +#X connect 4 0 42 0; +#X connect 5 0 42 0; +#X connect 6 0 17 0; +#X connect 6 1 2 0; +#X connect 6 1 44 1; +#X connect 6 4 13 0; +#X connect 6 4 44 4; +#X connect 7 0 10 0; +#X connect 8 0 3 0; +#X connect 9 0 7 0; +#X connect 9 1 10 1; +#X connect 11 0 9 0; +#X connect 12 0 31 0; +#X connect 13 0 16 0; +#X connect 14 0 1 0; +#X connect 14 1 15 0; +#X connect 15 0 0 0; +#X connect 16 0 14 1; +#X connect 17 1 44 0; +#X connect 17 2 18 0; +#X connect 18 0 44 3; +#X connect 23 0 24 0; +#X connect 24 0 8 0; +#X connect 24 1 29 0; +#X connect 25 0 30 0; +#X connect 26 0 25 1; +#X connect 26 0 33 2; +#X connect 28 0 33 0; +#X connect 29 0 25 0; +#X connect 29 1 33 1; +#X connect 30 0 28 0; +#X connect 30 1 34 0; +#X connect 31 0 23 0; +#X connect 31 1 26 0; +#X connect 31 2 32 0; +#X connect 32 0 33 3; +#X connect 32 0 35 0; +#X connect 33 0 40 0; +#X connect 34 0 36 0; +#X connect 34 1 27 0; +#X connect 35 0 34 1; +#X connect 39 0 19 0; +#X connect 39 1 20 0; +#X connect 39 2 21 0; +#X connect 39 4 22 0; +#X connect 39 5 37 0; +#X connect 39 6 38 0; +#X connect 40 0 44 0; +#X connect 41 0 44 0; +#X connect 41 1 44 1; +#X connect 41 2 44 2; +#X connect 41 3 44 3; +#X connect 41 4 44 4; +#X connect 41 5 44 5; +#X connect 41 6 44 6; +#X connect 42 0 11 0; +#X connect 42 1 8 0; +#X connect 42 3 41 0; +#X connect 44 0 7 1; +#X connect 44 0 39 0; +#X restore 164 35 pd guts; +#X obj 164 12 inlet; +#X text 11 9 Tables (click to view); +#X floatatom 164 224 6 0 0 1 rate - -; +#X symbolatom 171 200 40 0 0 1 file - -; +#X floatatom 179 176 8 0 0 1 size - -; +#X floatatom 187 153 5 0 0 1 channels - -; +#X obj 14 30 table 0-\$1; +#X obj 14 50 table 1-\$1; +#X text 258 76 Information; +#X floatatom 203 108 8 0 0 1 start - -; +#X floatatom 195 130 8 0 0 1 end - -; +#X connect 0 0 3 0; +#X connect 0 1 4 0; +#X connect 0 2 5 0; +#X connect 0 3 6 0; +#X connect 0 4 11 0; +#X connect 0 5 10 0; +#X connect 1 0 0 0; diff --git a/tof/sample_packel-help.pd b/tof/sample_packel-help.pd new file mode 100644 index 0000000..f0f3f7c --- /dev/null +++ b/tof/sample_packel-help.pd @@ -0,0 +1,16 @@ +#N canvas 452 313 551 304 10; +#X text 26 12 Description: Modifies a sample's information; +#X text 26 30 Tags: Sample Sound; +#X text 30 60 Warning: [tof/sample_packel] is only for advanced users! +; +#X msg 141 181 sample test; +#X text 220 177 Inlet 2 \, sample symbol: the sample to be modified +; +#X msg 57 100 end 1000; +#X msg 92 125 start 10; +#X text 120 99 Change the end of the sample; +#X text 150 122 Change the start of the sample; +#X obj 57 210 tof/sample_packel; +#X connect 3 0 9 1; +#X connect 5 0 9 0; +#X connect 6 0 9 0; diff --git a/tof/sample_packel.pd b/tof/sample_packel.pd new file mode 100644 index 0000000..bcfd9f0 --- /dev/null +++ b/tof/sample_packel.pd @@ -0,0 +1,8 @@ +#N canvas 452 332 450 300 10; +#X obj 58 42 inlet; +#X obj 58 186 iemlib/iem_send; +#X obj 145 42 inlet sample; +#X msg 145 96 set \$1; +#X connect 0 0 1 0; +#X connect 2 0 3 0; +#X connect 3 0 1 1; diff --git a/tof/sample_play~-help.pd b/tof/sample_play~-help.pd new file mode 100644 index 0000000..e364813 --- /dev/null +++ b/tof/sample_play~-help.pd @@ -0,0 +1,31 @@ +#N canvas 1637 415 502 410 10; +#X obj 58 283 dac~; +#X obj 59 96 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 78 123 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X floatatom 171 194 5 0 0 0 - - -; +#X text 13 -28 Description: Plays a sample; +#X text 14 -8 Tags: Sound Table Sample; +#X text 85 94 Inlet 1 \, bang: play sample once; +#X text 95 120 Inlet 1 \, float: stop/play sample in a loop; +#X text 178 146 Inlet 1 \, sample symbol: set sample; +#X msg 96 146 sample smppl; +#X text 209 194 Inlet 2 \, float: set playback speed; +#X text 121 271 Outlet 1 \, signal: left channel audio output; +#X text 120 285 Outlet 2 \, signal: right channel audio output; +#X obj 279 10 openpanel; +#X msg 279 31 read \$1; +#X obj 279 -12 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 59 229 tof/sample_play~ smppl; +#X obj 279 54 tof/sample smppl mono0.wav; +#X connect 1 0 16 0; +#X connect 2 0 16 0; +#X connect 3 0 16 1; +#X connect 9 0 16 0; +#X connect 13 0 14 0; +#X connect 14 0 17 0; +#X connect 15 0 13 0; +#X connect 16 0 0 0; +#X connect 16 1 0 1; diff --git a/tof/sample_play~.pd b/tof/sample_play~.pd new file mode 100644 index 0000000..1010ef4 --- /dev/null +++ b/tof/sample_play~.pd @@ -0,0 +1,160 @@ +#N canvas 1162 3 729 673 10; +#X obj 19 -42 inlet; +#X obj 51 439 *~ 0; +#X obj 55 578 outlet~; +#X msg 314 243 0; +#X obj 44 355 tof/phasorshot~; +#X obj 51 502 tabread4~; +#X obj 212 582 outlet~; +#X obj 219 512 tabread4~; +#X obj 36 292 *~ 0; +#X obj 29 235 sig~ 1; +#X obj 280 24 inlet speed; +#X msg 343 247 1; +#X msg 184 208 0; +#X msg 422 429 1; +#X msg 353 427 0; +#X obj 260 127 sel 0; +#X obj 513 -6 loadbang; +#X obj 513 26 tof/argument 1; +#X msg 517 57 sample \$1; +#N canvas 0 0 450 300 find_freq 0; +#X obj 83 241 outlet; +#N canvas 0 0 450 300 smpToFreq 0; +#X obj 41 35 inlet; +#X obj 236 181 samplerate~; +#X obj 65 346 outlet; +#X obj 126 104 t f b; +#X obj 131 281 expr $f2/$f1; +#X obj 41 67 sel 0; +#X msg 46 154 0; +#X connect 0 0 5 0; +#X connect 1 0 4 1; +#X connect 3 0 4 0; +#X connect 3 1 1 0; +#X connect 4 0 2 0; +#X connect 5 0 6 0; +#X connect 5 1 3 0; +#X connect 6 0 2 0; +#X restore 249 100 pd smpToFreq; +#X obj 120 96 samplerate~; +#X obj 87 67 t f b; +#X obj 80 169 *; +#X obj 78 119 /; +#X obj 269 12 inlet length; +#X obj 72 18 inlet samples; +#X connect 1 0 4 1; +#X connect 2 0 5 1; +#X connect 3 0 5 0; +#X connect 3 1 2 0; +#X connect 4 0 0 0; +#X connect 5 0 4 0; +#X connect 6 0 1 0; +#X connect 7 0 3 0; +#X restore 477 252 pd find_freq; +#N canvas 0 0 450 300 set_tables 0; +#X obj 42 22 inlet basename; +#X obj 246 21 inlet channels; +#X obj 71 253 outlet left; +#X obj 269 249 outlet right; +#X obj 242 59 > 1; +#X obj 135 133 zexy/demultiplex; +#X msg 123 186 set 0-\$1; +#X msg 188 186 set 0-\$1; +#X msg 273 187 set 1-\$1; +#X connect 0 0 5 0; +#X connect 1 0 4 0; +#X connect 4 0 5 1; +#X connect 5 0 6 0; +#X connect 5 0 7 0; +#X connect 5 1 8 0; +#X connect 5 1 6 0; +#X connect 6 0 2 0; +#X connect 7 0 3 0; +#X connect 8 0 3 0; +#X restore 569 250 pd set_tables; +#N canvas 0 0 450 300 start_phase 0; +#X obj 76 249 outlet; +#X obj 76 115 f; +#X obj 244 26 inlet speed; +#X obj 68 28 inlet bang; +#X obj 74 145 < 0; +#X connect 1 0 4 0; +#X connect 2 0 1 1; +#X connect 3 0 1 0; +#X connect 4 0 0 0; +#X restore 77 225 pd start_phase; +#X msg 225 209 1; +#X obj 96 397 spigot; +#X msg 392 191 0; +#X obj 258 409 t b b; +#X msg 260 431 0; +#X obj 368 510 line~; +#X obj 64 547 *~; +#X obj 218 551 *~; +#X msg 368 484 \$1 5; +#X obj 513 147 sample_unpack; +#X obj 575 211 -; +#X obj 51 466 +~ 0; +#X obj 41 46 route bang float; +#X obj 19 150 t b b b b b; +#X obj 320 162 t b b b b b; +#X connect 0 0 34 0; +#X connect 1 0 33 0; +#X connect 3 0 4 1; +#X connect 4 0 1 0; +#X connect 4 1 23 0; +#X connect 4 2 23 0; +#X connect 5 0 28 0; +#X connect 7 0 29 0; +#X connect 8 0 4 0; +#X connect 9 0 8 0; +#X connect 10 0 9 0; +#X connect 10 0 21 1; +#X connect 11 0 4 2; +#X connect 12 0 4 2; +#X connect 13 0 30 0; +#X connect 14 0 30 0; +#X connect 15 0 14 0; +#X connect 15 1 36 0; +#X connect 16 0 17 0; +#X connect 17 0 18 0; +#X connect 18 0 31 0; +#X connect 19 0 8 1; +#X connect 20 0 5 0; +#X connect 20 1 7 0; +#X connect 21 0 4 1; +#X connect 22 0 23 1; +#X connect 23 0 25 0; +#X connect 24 0 23 1; +#X connect 25 0 26 0; +#X connect 25 1 14 0; +#X connect 26 0 23 1; +#X connect 27 0 29 1; +#X connect 27 0 28 1; +#X connect 28 0 2 0; +#X connect 29 0 6 0; +#X connect 30 0 27 0; +#X connect 31 0 19 0; +#X connect 31 3 20 0; +#X connect 31 4 20 1; +#X connect 31 5 32 0; +#X connect 31 6 32 1; +#X connect 31 6 33 1; +#X connect 32 0 19 1; +#X connect 32 0 1 1; +#X connect 33 0 5 0; +#X connect 33 0 7 0; +#X connect 34 0 35 0; +#X connect 34 1 15 0; +#X connect 34 2 31 0; +#X connect 35 0 13 0; +#X connect 35 1 21 0; +#X connect 35 2 12 0; +#X connect 35 3 22 0; +#X connect 35 4 31 0; +#X connect 36 0 3 0; +#X connect 36 1 11 0; +#X connect 36 2 13 0; +#X connect 36 3 24 0; +#X connect 36 4 31 0; diff --git a/tof/sample_record~-help.pd b/tof/sample_record~-help.pd new file mode 100644 index 0000000..1793e97 --- /dev/null +++ b/tof/sample_record~-help.pd @@ -0,0 +1,32 @@ +#N canvas 1392 171 658 474 10; +#X text 227 253 Argument 1 \, symbol: the name of the sample to record +to; +#X text 44 4 Description: Records into samples; +#X text 41 21 Tags: Sound Sample Record; +#X obj 65 198 adc~; +#X obj 206 176 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X text 239 44 A 10 second mono sample (at a samplerate of 44100); +#X obj 239 65 tof/sample recording 441000 1; +#X obj 65 253 sample_record~ recording; +#X obj 74 374 tof/sample_play~ recording; +#X obj 75 331 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 74 416 dac~; +#X obj 104 332 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X msg 225 215 sample recording; +#X text 57 126 Inlet 1 \, signal: left or mono channel audio data; +#X text 56 141 Inlet 2 \, signal: right channel audio data; +#X text 332 213 Inlet 3 \, sample symbol: set the sample; +#X text 231 171 Inlet 3 \, float: turn recording on/off. The maximum +recording length is limited by the size of the sample; +#X text 70 310 You can play the recorded sample with [tof/sample_play~] +; +#X connect 3 0 7 0; +#X connect 4 0 7 2; +#X connect 8 0 10 0; +#X connect 8 1 10 1; +#X connect 9 0 8 0; +#X connect 11 0 8 0; +#X connect 12 0 7 2; diff --git a/tof/sample_record~.pd b/tof/sample_record~.pd new file mode 100644 index 0000000..0f89007 --- /dev/null +++ b/tof/sample_record~.pd @@ -0,0 +1,49 @@ +#N canvas 1154 129 1026 720 10; +#X obj 47 58 inlet~; +#X obj 142 53 inlet~; +#X obj 295 30 inlet off/on; +#X obj 431 53 loadbang; +#X obj 436 100 symbol \$1; +#X msg 433 130 sample \$1; +#X obj 122 398 cyclone/record~; +#X obj 321 235 spigot; +#X obj 579 209 > 1; +#X msg 417 289 set 0-\$1; +#X msg 553 286 set 1-\$1; +#X obj 122 436 snapshot~; +#X obj 438 511 f; +#X obj 241 256 sel 0; +#X obj 259 165 t f f; +#X obj 123 464 sel -1; +#X obj 249 398 cyclone/record~; +#X obj 480 158 tof/sample_unpack; +#X obj 295 644 tof/sample_packel; +#X msg 300 596 start 0 \, end \$1; +#X obj 305 65 route sample; +#X connect 0 0 6 0; +#X connect 1 0 16 0; +#X connect 2 0 20 0; +#X connect 3 0 4 0; +#X connect 4 0 5 0; +#X connect 5 0 17 0; +#X connect 5 0 18 1; +#X connect 6 0 11 0; +#X connect 7 0 16 0; +#X connect 8 0 7 1; +#X connect 9 0 6 0; +#X connect 10 0 16 0; +#X connect 11 0 15 0; +#X connect 12 0 19 0; +#X connect 13 0 11 0; +#X connect 14 0 13 0; +#X connect 14 1 6 0; +#X connect 15 0 12 0; +#X connect 15 1 19 0; +#X connect 17 2 12 1; +#X connect 17 3 9 0; +#X connect 17 3 10 0; +#X connect 17 4 8 0; +#X connect 19 0 18 0; +#X connect 20 0 4 0; +#X connect 20 1 14 0; +#X connect 20 1 7 0; diff --git a/tof/sample_unpack-help.pd b/tof/sample_unpack-help.pd new file mode 100644 index 0000000..2b09c06 --- /dev/null +++ b/tof/sample_unpack-help.pd @@ -0,0 +1,35 @@ +#N canvas 1416 305 763 458 10; +#X obj 60 387 print rate; +#X obj 137 388 print file; +#X obj 216 387 print length; +#X obj 445 385 print channels; +#X obj 309 385 print table_basename; +#X msg 172 225 bang; +#X obj 554 385 print end; +#X obj 621 384 print start; +#X msg 62 196 sample smpunpck; +#X text 67 48 Tags: Sample Sound; +#X text 65 29 Description: Outputs a sample's information; +#X text 169 195 Inlet 1 \, sample symbol: output the sample's information +; +#X text 208 223 Inlet1 \, bang: re-outputs the sample's information +; +#X obj 367 151 tof/sample smpunpck; +#X msg 367 124 read \$1; +#X obj 367 100 openpanel; +#X obj 367 80 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X text 391 77 Load a sound file (wav); +#X obj 62 267 tof/sample_unpack; +#X connect 5 0 18 0; +#X connect 8 0 18 0; +#X connect 14 0 13 0; +#X connect 15 0 14 0; +#X connect 16 0 15 0; +#X connect 18 0 0 0; +#X connect 18 1 1 0; +#X connect 18 2 2 0; +#X connect 18 3 4 0; +#X connect 18 4 3 0; +#X connect 18 5 6 0; +#X connect 18 6 7 0; diff --git a/tof/sample_unpack.pd b/tof/sample_unpack.pd new file mode 100644 index 0000000..656b500 --- /dev/null +++ b/tof/sample_unpack.pd @@ -0,0 +1,33 @@ +#N canvas 1128 207 956 475 10; +#X obj 44 38 inlet; +#X obj 31 213 iemlib/iem_send; +#X obj 41 103 t b a; +#X obj 59 242 r \$0r; +#X obj 22 146 symbol \$0r; +#X msg 20 173 return \$1; +#X obj 118 178 cyclone/prepend set; +#X obj 59 433 outlet rate; +#X obj 464 435 outlet channels; +#X obj 310 435 outlet table_basename; +#X obj 136 434 outlet file; +#X obj 220 434 outlet size; +#X obj 59 285 unpack f s f s f f f; +#X obj 591 434 outlet end; +#X obj 697 434 outlet start; +#X obj 44 64 route sample bang; +#X connect 0 0 15 0; +#X connect 2 0 4 0; +#X connect 2 1 6 0; +#X connect 3 0 12 0; +#X connect 4 0 5 0; +#X connect 5 0 1 0; +#X connect 6 0 1 1; +#X connect 12 0 7 0; +#X connect 12 1 10 0; +#X connect 12 2 11 0; +#X connect 12 3 9 0; +#X connect 12 4 8 0; +#X connect 12 5 13 0; +#X connect 12 6 14 0; +#X connect 15 0 2 0; +#X connect 15 1 4 0; |