#N canvas 10 49 579 665 12;
#X obj 130 481 cos~;
#X obj 130 451 *~;
#X obj 172 481 cos~;
#X obj 214 397 wrap~;
#X obj 177 402 -~;
#X obj 172 451 +~;
#X obj 172 516 -~;
#X obj 192 548 *~;
#X obj 170 573 +~;
#X obj 204 159 loadbang;
#X obj 204 185 metro 400;
#X obj 216 209 del 200;
#X obj 252 326 samphold~;
#N canvas 0 0 405 406 switch 0;
#X obj 15 383 outlet~;
#X obj 8 193 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X obj 329 195 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X obj 18 99 loadbang;
#X obj 18 131 1;
#X obj 53 261 sel 1;
#X obj 53 287 0;
#X obj 339 259 sel 1;
#X obj 339 288 0;
#X obj 47 316 inlet~;
#X obj 15 344 *~;
#X obj 340 312 inlet~;
#X obj 308 340 *~;
#X connect 1 0 5 0;
#X connect 1 0 10 1;
#X connect 2 0 7 0;
#X connect 2 0 12 1;
#X connect 3 0 4 0;
#X connect 4 0 1 0;
#X connect 5 0 6 0;
#X connect 6 0 2 0;
#X connect 7 0 8 0;
#X connect 8 0 1 0;
#X connect 9 0 10 0;
#X connect 10 0 0 0;
#X connect 11 0 12 0;
#X connect 12 0 0 0;
#X coords 0 0 1 1 80 35 1;
#X restore 177 351 pd switch;
#X text 31 2 CHANGING THE CENTER FREQUENCY QUICKLY;
#X text 34 27 Since in the previous patch the amplitudes of the two
cosines depend on "center frequency" we can't change that discontinuously
without clicking \, as you hear in this patch. The fix is to use a
samphold~ object to keep the center frequency frozen except at phase
crossings. At the phase crossings the two weighted cosines add to one
\, so we can discontinuously change the frequencies and weights there.
;
#X text 266 365 <--toggles to select which one;
#X text 369 384 is actually used;
#X obj 171 602 output~;
#X floatatom 225 264 3 0 50 0 - - -;
#X obj 178 263 pack;
#X text 258 263 <--gliss time;
#X text 324 647 updated for Pd version 0.37;
#X obj 178 287 line~;
#X msg 216 239 13.5;
#X msg 178 239 4;
#X obj 70 287 phasor~ 80;
#X connect 0 0 6 1;
#X connect 0 0 8 0;
#X connect 1 0 0 0;
#X connect 1 0 5 0;
#X connect 2 0 6 0;
#X connect 3 0 4 1;
#X connect 3 0 7 1;
#X connect 4 0 1 1;
#X connect 5 0 2 0;
#X connect 6 0 7 0;
#X connect 7 0 8 1;
#X connect 8 0 18 0;
#X connect 8 0 18 1;
#X connect 9 0 10 0;
#X connect 10 0 25 0;
#X connect 10 0 11 0;
#X connect 11 0 24 0;
#X connect 12 0 13 1;
#X connect 13 0 4 0;
#X connect 13 0 3 0;
#X connect 19 0 20 1;
#X connect 20 0 23 0;
#X connect 23 0 13 0;
#X connect 23 0 12 0;
#X connect 24 0 20 0;
#X connect 25 0 20 0;
#X connect 26 0 1 0;
#X connect 26 0 5 1;
#X connect 26 0 12 1;
