1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
#N canvas 458 66 780 791 12;
#X declare -stdpath ./;
#N canvas 0 0 450 300 (subpatch) 0;
#X array tabread4-out 22050 float 2;
#X coords 0 1.02 22050 -1.02 253 129 1 0 0;
#X restore 425 616 graph;
#N canvas 0 0 450 300 (subpatch) 0;
#X array table17 44103 float 2;
#X coords 0 1.02 44103 -1.02 253 130 1;
#X restore 425 429 graph;
#X obj 411 315 loadbang;
#X floatatom 105 180 5 0 0 0 - \$0-freq - 0;
#X text 233 391 read from the table;
#X floatatom 130 243 8 0 1000 0 - \$0-size - 0;
#X obj 105 299 *~ 0;
#X obj 105 343 +~ 1;
#X obj 425 162 adc~ 1;
#X text 493 319 v-- re-read the original sample;
#X text 82 622 In this patch you will frequently hear discontinuities at the looping point. If you're working in a studio \, you can sometimes find "good" loop points for samples. Another approach \, better for live situations \, is shown in the next patch., f 40;
#X obj 411 372 soundfiler;
#X text 467 567 ---- 44103 samples ----;
#X obj 105 524 output~;
#X obj 105 392 tabread4~ table17;
#X obj 425 272 tabwrite~ table17;
#X msg 411 344 read ../sound/voice.wav table17;
#X text 40 63 This is a looping sampler in which you specify the number of loops per second (the frequency) and the size of the chunk to loop. If the frequency is less than about 20 \, you will hear repetition and the chunk size will sound like transposition. For frequencies above 50 or so \, you hear a tone whose timbre is controlled by the chunk size (best kept below 10 or so.) Remember you can use the "shift" key on number boxes to make fine adjustments., f 93;
#X obj 444 230 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X text 470 230 <-- click here to record your own sample, f 24;
#X text 154 180 <-- frequency (Hz.);
#X text 151 298 <-- readjust phase for range 0 - (chunk size), f 23;
#X text 150 343 <-- add one to avoid beginning of table, f 20;
#X obj 105 206 phasor~;
#X obj 66 22 cnv 5 5 25 empty empty Looping\ Sampler 15 13 0 16 #dfdfdf #202020 0;
#X obj 156 426 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X text 179 425 <-- graph once;
#X obj 183 453 tgl 19 0 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000 0 1;
#X text 207 452 <-- graph repeatedly, f 10;
#N canvas 146 130 450 300 graph 0;
#X obj 256 73 inlet;
#X obj 192 73 inlet;
#X obj 122 73 inlet~;
#X obj 192 203 tabwrite~ tabread4-out;
#X obj 256 137 metro 550;
#X connect 0 0 4 0;
#X connect 1 0 3 0;
#X connect 2 0 3 0;
#X connect 4 0 3 0;
#X restore 130 484 pd graph;
#X text 463 751 ------ 0.5 second ------;
#X obj 130 269 * 44.1;
#X text 195 244 <-- chunk size (in milliseconds now), f 18;
#N canvas 972 249 334 329 init 0;
#X obj 94 100 loadbang;
#X obj 94 188 s \$0-freq;
#X obj 176 186 s \$0-size;
#X msg 176 150 250;
#X msg 94 144 5;
#X text 71 29 This subpatch initializes the patch and loads values in number boxes., f 29;
#X obj 112 253 declare -stdpath ./;
#X connect 0 0 4 0;
#X connect 0 0 3 0;
#X connect 3 0 2 0;
#X connect 4 0 1 0;
#X restore 261 529 pd init;
#X text 174 200 (negative frequencies play backwards), f 21;
#X obj 425 192 hip~ 3;
#X text 483 154 Sound card input (You can also be careful and include a [hip~] object to filter DC if you think you need it), f 32;
#X connect 2 0 16 0;
#X connect 3 0 23 0;
#X connect 5 0 31 0;
#X connect 6 0 7 0;
#X connect 7 0 14 0;
#X connect 8 0 35 0;
#X connect 14 0 29 0;
#X connect 14 0 13 0;
#X connect 16 0 11 0;
#X connect 18 0 15 0;
#X connect 23 0 6 0;
#X connect 25 0 29 1;
#X connect 27 0 29 2;
#X connect 31 0 6 1;
#X connect 35 0 15 0;
|