#N canvas 467 43 654 772 12;
#X declare -stdpath ./;
#X floatatom 364 201 6 20 100 0 - - - 0;
#X obj 364 230 mtof;
#X floatatom 364 257 8 0 0 0 - - - 0;
#X obj 364 286 tabosc4~ table10;
#X msg 189 349 \; table10 const 0;
#X obj 364 324 output~;
#X obj 397 35 declare -stdpath ./;
#X text 67 414 If you want a specific sinusoidal composition \, you can send table10 a message \, as below (see 15.arrays in the control examples):;
#X obj 82 22 cnv 5 5 25 empty empty Wavetable\ Oscillator 15 13 0 16 #dfdfdf #202020 0;
#X text 72 357 Clear table -->;
#X text 53 543 Note that I selected "save contents" in the properties dialog for table10 (right click on the table to see.) If this isn't set \, the waveform won't be remembered as part of the patch but will be reinitialized to zero when the patch is reopened. If this is set and you modified the waveform \, the current waveform gets stored with the file when you save the patch., f 74;
#X text 414 201 <-- pitch;
#X text 488 286 <-- wavetable oscillator, f 13;
#X text 61 73 Here \, in place of the [osc~] cosine wave oscillator \, we introduce the [tabosc4~] oscillator which uses arbitrary waveforms from arrays. You can draw a waveform in the array with the mouse., f 66;
#X msg 154 455 \; table10 cosinesum 256 0.2 -0.2 0.2 -0.2 0.2 -0.2 0.2 \, normalize;
#X obj 364 147 loadbang;
#X msg 364 174 60;
#N canvas 0 0 450 300 (subpatch) 0;
#X array table10 259 float 1;
#A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.612 0.612 0.612 0.612 0.612 0.627692 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.470769 -0.470769 -0.470769 -0.470769 -0.470769 -0.470769 -0.470769 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.627692 0.627692 0.627692 0.643385 0.643385 0.643385 0.659077 0 -0.502154 -0.502154 -0.502154 -0.486462 -0.486462 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.580615 0.596308 0.596308 0.596308 0.596308 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
#X coords 0 1.02 258 -1.02 258 130 1;
#X restore 61 173 graph;
#X text 53 627 For efficiency's sake [tabosc4~] requires that the table has a power of two plus three points (64+3=67 \, 128+3=131 \, 256+3=259 \, etc.) The three extra points are for copies of the first and last two points (more details later). The extra points are needed if you want wraparound to work smoothly and this is done because [tabosc4~] does 4-point interpolation. The sinesum and cosinesum commands already create table with these extra points worked out., f 74;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 5 0;
#X connect 15 0 16 0;
#X connect 16 0 0 0;
