#N canvas 25 29 725 583 10; #X obj 361 182 soundfiler; #X text 161 10 Read a (portion of a) soundfile into an array \, and use it as a wavetable (one cycle of a waveform) for an oscillator. ; #X msg 361 161 read gtr515.aif waveform; #N canvas 0 0 450 300 graph4 0; #X array waveform 515 float 0; #X coords 0 1 514 -1 258 201 1; #X restore 439 362 graph; #X text 287 161 Click Here; #X text 534 161 to load in the sound data; #X text 286 201 The purpose of the soundfiler object is to read sound from a soundfile on the hard disk and put it in an array \, or to get the sound from an array and write it to a soundfile on the hard disk. This message gives the command 'read' \, the name of the file (which must be in a findable directory) \, and the name of the array in which to put the sound data.; #X text 286 318 In order to be used by tabosc4~ as a wavetable \, the array must have a number of samples that is a power of 2 \, plus 3 This array has 515 samples (2 to the 9th power plus 3).; #X obj 35 108 osc~ 6; #X obj 19 146 +~; #X obj 19 191 tabosc4~ waveform; #X obj 84 108 expr~ pow(2 \, $v1); #X obj 84 89 tabosc4~ waveform; #X msg 12 9 \; pd dsp 1; #X msg 77 9 \; pd dsp 0; #X obj 8 355 dac~; #X floatatom 35 255 4 0 100 1 volume - -; #X obj 35 271 * 0.01; #X msg 35 290 \$1 50; #X obj 35 309 line~; #X obj 19 328 *~; #X obj 35 217 loadbang; #X msg 35 236 70; #X obj 19 70 sig~ 220; #X obj 84 70 sig~ 0.2; #X text 287 107 We've made a small soundfile in advance that has 512 samples representing one cycle of a recorded electric guitar note \, plus 3 extra samples for use in the four-point interpolation of tabosc4~. ; #X obj 35 127 *~ 5; #X obj 19 172 *~; #X text 142 192 carrier oscillator; #X text 7 373 This instrument has a carrier oscillator reading through the array cyclically to create a complex tone. The frequency of that oscillator is modulated by a sinusoid at 6 Hz to create a vibrato effect. The frequency is also modulated much more radically (but still at a sub-audio rate) by a low-frequency oscillator (0.2 Hz) reading through the array once every 5 seconds).; #X text 8 481 The central pitch is A 220 (A below middle C) \, but the actual pitch varies around that up to one octave in each direction \, following the shape of the waveform array at a very low rate (1 cycle of the waveforem every 5 seconds).; #X connect 2 0 0 0; #X connect 8 0 26 0; #X connect 9 0 27 0; #X connect 10 0 20 0; #X connect 11 0 27 1; #X connect 12 0 11 0; #X connect 16 0 17 0; #X connect 17 0 18 0; #X connect 18 0 19 0; #X connect 19 0 20 1; #X connect 20 0 15 0; #X connect 20 0 15 1; #X connect 21 0 22 0; #X connect 22 0 16 0; #X connect 23 0 9 0; #X connect 24 0 12 0; #X connect 26 0 9 1; #X connect 27 0 10 0;