#N canvas 418 47 764 618 12;
#X declare -stdpath ./;
#X obj 59 220 hip~ 5;
#N canvas 0 0 450 300 (subpatch) 0;
#X array sample-table 44104 float 2;
#X coords 0 1.02 44104 -1.02 200 130 1;
#X restore 503 28 graph;
#X obj 59 187 tabread4~ sample-table;
#X obj 59 155 line~;
#X obj 59 106 * 441;
#X floatatom 59 48 5 0 100 0 - - - 0;
#X text 90 14 SCRATCH MACHINE;
#X text 106 106 convert to SAMPLES (441 samples in 0.01 sec);
#X obj 204 265 loadbang;
#X text 230 179 read from the table;
#X text 229 194 (the input is the index in samples);
#X text 51 469 For more on reading and writing soundfiles to tables \, setting their lengths \, etc \, see "arrays" in the "control examples" series., f 96;
#X text 51 430 Fanatics take note: if you want really high-fidelity sampling \, use a high-quality resampling program to up-sample your soundfile to 88200 to drastically reduce interpolation error., f 96;
#X text 509 181 (one second plus three extra;
#X text 511 200 for 4-point interpolation);
#X text 477 266 message to read a soundfile into the table (automatically sent when you load this patch by the "loadbang" object.), f 30;
#X text 101 155 convert smoothly to audio signal;
#X text 107 66 (range is 0-100.) YOU ONLY HEAR OUTPUT;
#X text 108 82 WHEN THIS IS 0-100 AND ACTIVELY CHANGING.;
#X text 532 567 updated for Pd version 0.33;
#X text 502 159 --- 44103 samples ---;
#X msg 204 289 read ../sound/voice.wav sample-table;
#X obj 204 314 soundfiler;
#X obj 59 268 output~;
#X obj 597 237 declare -stdpath ./;
#X obj 59 130 pack f 100;
#X text 100 48 <-- read point in 100ths of a second, f 39;
#X text 51 353 This patch introduces the [tabread4~] object \, which reads audio samples out of a floating-point array \, often called a "sample table." The input is the index of the sample to read \, counting from zero. The output is calculated using 4-point cubic interpolation \, which is adequate for most purposes. Because of the interpolation scheme \, [tabread4~]'s input cannot be less than one or greater than the table length minus two., f 96;
#X text 51 505 Note the highpass filter ([hip~ 5]) that is present to filter a DC component (0 hz frequency). A This is not actually needed as the [output~] abstraction already includes [hip~] objects to filter DC \, but it's present in the examples for didactic reasons., f 96;
#X text 111 220 high pass filter to cut DC;
#X connect 0 0 23 0;
#X connect 2 0 0 0;
#X connect 3 0 2 0;
#X connect 4 0 25 0;
#X connect 5 0 4 0;
#X connect 8 0 21 0;
#X connect 21 0 22 0;
#X connect 25 0 3 0;
