#N canvas 292 32 863 615 12;
#X obj 84 132 osc~ 440;
#X obj 84 405 dac~;
#X obj 84 313 *~;
#X obj 132 326 line~;
#X msg 109 166 0.1 2000;
#X msg 144 251 0 2000;
#X msg 121 188 0.1 50;
#X msg 151 273 0 50;
#X msg 132 210 0.1;
#X msg 156 295 0;
#X text 273 187 ON;
#X text 282 280 OFF;
#X text 33 23 CONTROLLING AMPLITUDE USING LINE~;
#X text 152 131 <= sine wave;
#X text 176 165 <= slow;
#X text 173 189 <= fast;
#X text 162 210 <= instantly;
#X text 197 251 <= slow;
#X text 189 273 <= fast;
#X text 186 295 <= instantly;
#X text 179 326 <= ramp generator;
#X text 123 405 <= out;
#X text 104 231 -------------------------------;
#X text 32 62 In this patch \, the multiplier is configured to multiply two signals. The amplitude is now a signal computed by the [line~] object., f 62;
#X text 25 443 The left inlet of [line~] is a target value. It reaches that target in the time specified (in milliseconds) to its right inlet., f 67;
#X text 25 479 (In this example \, message boxes with two numbers each are connected to [line~]'s left inlet. Except in some special cases \, Pd objects with more than one inlet will automatically distribute lists of numbers across their inlets. In this case \, "0 50" becomes \, "50 at right and 0 at left."), f 67;
#X text 25 556 The [line~] object (and its control brother \, [line]) treat their right inlet specially. The inlets don't retain values the way other inlets do but revert to zero whenever a target is received., f 67;
#X obj 362 127 ../5.reference/set-dsp-tgl;
#X text 393 130 DSP on/off;
#X msg 362 164 \; pd dsp \$1;
#X text 612 562 updated for Pd version 0.54;
#X obj 649 244 hsl 162 19 0 1 0 0 empty empty empty -2 -10 0 12 #dfdfdf #000000 #000000 0 1;
#X obj 646 303 pow 4;
#X obj 560 381 osc~ 440;
#X msg 646 365 \$1 10;
#X obj 646 397 line~;
#X obj 560 436 *~;
#X obj 560 490 dac~;
#X floatatom 646 272 10 0 0 0 - - - 0;
#X floatatom 646 335 11 0 0 0 - - - 0;
#X text 151 351 <= multiply the sine wave by the ramp. There's no longer a "0" argument \, which tells Pd to expect a signal here., f 39;
#X text 528 31 Below use a slider that generates values from 0 to 1 \, which passes through a quartic function (by going through [pow 4]). This non linear function is better suited for the way we perceive amplitudes. The value is then combined in a message by assuming the value of the '\$1' variable into a list followed by 10 \, which means that changes to the slider are smoothened by a 10 ms audio ramp! This principal is used in an [output~] abstraction presented later., f 43;
#X text 724 273 <= linear;
#X text 730 335 <= quartic;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X connect 2 0 1 1;
#X connect 3 0 2 1;
#X connect 4 0 3 0;
#X connect 5 0 3 0;
#X connect 6 0 3 0;
#X connect 7 0 3 0;
#X connect 8 0 3 0;
#X connect 9 0 3 0;
#X connect 27 0 29 0;
#X connect 31 0 38 0;
#X connect 32 0 39 0;
#X connect 33 0 36 0;
#X connect 34 0 35 0;
#X connect 35 0 36 1;
#X connect 36 0 37 0;
#X connect 36 0 37 1;
#X connect 38 0 32 0;
#X connect 39 0 34 0;
