#N canvas 495 23 564 438 12;
#X declare -stdpath ./;
#X floatatom 173 134 5 0 0 0 - - - 0;
#X text 15 401 see also:;
#X obj 212 401 cos~;
#X obj 252 401 tabread4~;
#X obj 27 18 osc~;
#X text 62 18 - cosine wave oscillator;
#X obj 87 401 phasor~;
#X obj 173 299 output~;
#X obj 173 166 osc~ 440;
#X msg 226 134 0;
#X msg 260 134 0.5;
#X text 71 133 set frequency;
#X obj 37 206 sig~ 440;
#X obj 37 245 osc~;
#X obj 394 341 declare -stdpath ./;
#N canvas 731 147 586 252 reference 0;
#X obj 18 52 cnv 5 550 5 empty empty INLETS: 8 18 0 13 #202020 #000000 0;
#X obj 18 153 cnv 2 550 2 empty empty OUTLET: 8 12 0 13 #202020 #000000 0;
#X obj 18 190 cnv 2 550 2 empty empty ARGUMENT: 8 12 0 13 #202020 #000000 0;
#X obj 17 227 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 47 18 osc~;
#X text 82 18 - cosine wave oscillator;
#X text 126 163 signal - cosine waveform (in the range of -1 to 1)., f 54;
#X text 119 91 signal -;
#X obj 17 115 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 17 85 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 126 124 float -;
#X text 183 124 phase cycle reset (from 0 to 1)., f 46;
#X text 183 91 frequency value in Hz., f 46;
#X text 134 199 1) float - initial frequency value in Hz (default 0).;
#X restore 379 17 pd reference;
#X text 477 18 <= click;
#X obj 8 49 cnv 1 550 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X obj 7 383 cnv 1 550 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X obj 146 401 tabosc4~;
#X text 295 133 <-- reset phase;
#X text 19 167 (note it also takes signals), f 14;
#X obj 339 218 cnv 19 198 98 empty empty empty 20 12 0 12 #e0e0e0 #404040 0;
#N canvas 0 50 450 250 (subpatch) 0;
#X array \$0-osc 441 float 0;
#X coords 0 1 440 -1 200 100 1 0 0;
#X restore 338 217 graph;
#N canvas 572 114 468 431 compatibility 0;
#X text 38 22 Up to version 0.54 \, [osc~] relied on a 512-point cosine table \, which was adequate for most "computer music" applications in the 90s with a signal-to-noise ratio of about 110 dB. The default table size is now increased to 2048 points \, improving signal-to-noise by an additional 36 dB. To get the original 512-point tables you can run Pd with compatibility level set to 0.54., f 56;
#X msg 61 177 \; pd compatibility 0.54;
#X msg 257 177 \; pd compatibility 0.55;
#X obj 181 265 osc~ 440;
#X obj 181 301 output~;
#X text 73 153 (old table size);
#X text 273 153 (new table size);
#X connect 3 0 4 0;
#X restore 20 328 pd compatibility;
#X text 26 290 compatibility note (open):, f 13;
#X text 240 166 <-- argument sets initial frequency;
#X text 356 402 updated for Pd version 0.55;
#X obj 196 266 tabwrite~ \$0-osc;
#X obj 206 232 metro 100;
#X obj 206 203 loadbang;
#X text 40 62 The [osc~] object outputs a cosine wave. The frequency input can be either a float or a signal. The right inlet resets the phase with values from 0 to 1 (where '1' is the same as '0' and '0.5' is half the cycle)., f 67;
#X connect 0 0 8 0;
#X connect 8 0 7 0;
#X connect 8 0 28 0;
#X connect 9 0 8 1;
#X connect 10 0 8 1;
#X connect 12 0 13 0;
#X connect 29 0 28 0;
#X connect 30 0 29 0;
