#N canvas 504 51 726 656 12;
#X declare -stdpath ./;
#X obj 114 329 cos~;
#X floatatom 161 118 4 0 100 0 - - - 0;
#X obj 161 142 / 10;
#X text 477 507 --- 0.02 seconds ---;
#X obj 114 299 *~;
#X obj 161 214 line~;
#X obj 161 166 max 0;
#N canvas 0 0 450 300 (subpatch) 0;
#X array F08-carrier 882 float 0;
#X coords 0 2 881 -2 200 140 1;
#X restore 455 356 graph;
#X floatatom 64 221 4 0 0 0 - - - 0;
#X text 43 173 fundamental;
#X text 43 192 frequency;
#X obj 156 329 cos~;
#X obj 197 242 wrap~;
#X obj 161 269 -~;
#X obj 156 299 +~;
#X obj 156 374 -~;
#X obj 179 424 *~;
#X obj 161 464 +~;
#X obj 161 190 pack 0 50;
#X text 211 329 synthesize the two partials;
#X text 461 589 updated for Pd version 0.37;
#X obj 161 559 output~;
#X text 282 125 The other \, spiffier way is to make a sum of cosines to interpolate between adjacent harmonics. Suppose for example we want a center frequency of 5.3 (in units of the fundamental.) We just take partial 5 with amplitude 0.7 and partial 6 with amplitude 0.3:, f 52;
#X obj 246 511 tabwrite~ F08-carrier;
#X obj 246 486 bng 19 250 50 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000;
#X obj 64 245 phasor~ 100;
#X text 100 71 center frequency (in;
#X text 99 91 tenths of fundamental);
#X text 38 24 MOVABLE CENTER FREQUENCY BY ADDING TWO COSINES;
#X text 249 241 the fractional part "q";
#X text 210 268 subtract to get the integer part "k";
#X text 206 301 multiply phase by k and k+1;
#X text 204 375 c2 - c1;
#X text 217 422 q * (c2 - c1);
#X text 196 459 q * c2 + (1-q) * c1;
#X obj 524 27 declare -stdpath ./;
#X text 269 485 <-- graph;
#X obj 161 510 hip~ 5;
#X connect 0 0 15 1;
#X connect 0 0 17 0;
#X connect 1 0 2 0;
#X connect 2 0 6 0;
#X connect 4 0 0 0;
#X connect 4 0 14 0;
#X connect 5 0 13 0;
#X connect 5 0 12 0;
#X connect 6 0 18 0;
#X connect 8 0 25 0;
#X connect 11 0 15 0;
#X connect 12 0 13 1;
#X connect 12 0 16 1;
#X connect 13 0 4 1;
#X connect 14 0 11 0;
#X connect 15 0 16 0;
#X connect 16 0 17 1;
#X connect 17 0 23 0;
#X connect 17 0 37 0;
#X connect 18 0 5 0;
#X connect 24 0 23 0;
#X connect 25 0 4 0;
#X connect 25 0 14 1;
#X connect 37 0 21 0;
