#N canvas 157 -17 861 714 12; #X graph graph1 0 -1.1 18 1.1 617 349 817 209; #X array array1 19 float 0; #X pop; #X floatatom 21 246 0 0 0; #X obj 21 199 r freq; #X obj 465 579 loadbang; #X obj 21 276 phasor~; #X obj 19 330 +~ 1; #X obj 13 360 tabread4~ array1; #X graph graph2 0 -1.1 999 1.1 611 518 811 378; #X array array2 1000 float 0; #X pop; #X obj 21 638 tabwrite~ array2; #X obj 37 524 dac~; #X obj 37 496 *~ 0.3; #X msg 43 564 bang; #X text 52 18 TO RUN THIS PATCH:; #X text 73 38 1 start DSP (warning:; #X text 94 58 sound will come out!); #X text 72 84 2 bang the "tabwrite" to; #X text 95 104 graph the output; #X text 70 129 3 change the phasor's frequency; #X text 93 151 and see the graph change; #X text 101 195 "receive" used by message; #X text 108 213 box at bottom right; #X text 63 247 <-- number box to set freqency; #X text 97 276 sawtooth generator; #X text 81 329 and then from 1 to 5; #X text 193 359 Look up the "sinusoid." The; #X text 192 379 input signal gives indices; #X text 190 402 into the 7-point array. The; #X text 190 425 output is the "y" values looked; #X text 191 446 up from the array \, interpolated.; #X text 114 499 this adjusts the amplitude; #X text 116 518 and outputs the "sinusoid."; #X text 93 580 tabwrite~ below which graphs the; #X text 91 598 output in "array2."; #X text 454 522 This is to initialize the patch when; #X text 454 545 you load it:; #X text 92 560 <-- "bang" message triggers the; #X obj 19 303 *~ 16; #X text 86 305 reset range from 0 to 16; #X msg 315 619 \; array1 0 1 1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 -1 1 1 1 \; graph1 xlabel -1.2 0 2 4 6 8 10 12 14 16 18 \; array2 resize 1000 \; freq 100; #X msg 450 30 \; pd dsp 1; #X msg 552 35 \; pd dsp 0; #X connect 1 0 4 0; #X connect 2 0 1 0; #X connect 3 0 38 0; #X connect 4 0 36 0; #X connect 5 0 6 0; #X connect 6 0 10 0; #X connect 10 0 9 0; #X connect 10 0 9 1; #X connect 11 0 8 0; #X connect 36 0 5 0;