#N canvas 555 30 542 605 12;
#X obj 40 503 snapshot~;
#X floatatom 40 534 6 0 0 0 - - - 0;
#X obj 59 476 metro 100;
#X obj 27 14 samphold~;
#X text 104 13 - sample and hold unit;
#X obj 40 396 samphold~;
#X obj 73 353 sig~;
#X obj 126 408 sig~;
#X floatatom 73 328 5 0 0 0 - - - 0;
#X floatatom 126 386 3 0 0 0 - - - 0;
#X msg 40 234 set 34;
#X msg 62 293 reset;
#X text 92 233 set output to a number;
#X msg 50 263 reset 10;
#X text 321 574 updated for Pd version 0.39;
#X obj 59 451 loadbang;
#X obj 203 439 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000
#000000 0 1;
#X msg 203 466 \; pd dsp \$1;
#X text 228 439 DSP on/off;
#X obj 395 374 phasor~ 1;
#X obj 335 300 noise~;
#X obj 335 402 samphold~;
#X obj 415 472 snapshot~;
#X floatatom 415 503 10 0 0 0 - - - 0;
#X obj 415 433 metro 100;
#X obj 415 408 loadbang;
#X msg 455 327 0;
#X msg 357 342 reset 0;
#X obj 455 297 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf
#000000 #000000;
#X text 304 235 Sampling random values from noise at a frequency of
1Hz., f 28;
#X text 412 277 restart cycle, f 7;
#X msg 126 358 1;
#X msg 162 358 0;
#X text 116 328 <-- sample signal;
#X text 152 386 <-- control signal;
#X text 108 287 reset to default 1e+20 to force the next sample, f
24;
#X text 118 255 reset previous value for control inlet, f 20;
#N canvas 523 143 610 306 reference 0;
#X obj 8 45 cnv 5 590 5 empty empty INLETS: 8 18 0 13 #202020 #000000
0;
#X obj 8 73 cnv 1 590 1 empty empty 1st: 8 12 0 13 #9f9f9f #000000
0;
#X obj 8 197 cnv 2 590 2 empty empty OUTLET: 8 12 0 13 #202020 #000000
0;
#X obj 7 276 cnv 5 590 5 empty empty empty 8 18 0 13 #202020 #000000
0;
#X obj 8 239 cnv 2 590 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000
0;
#X text 100 79 signal -;
#X obj 8 156 cnv 1 590 1 empty empty 2nd: 8 12 0 13 #9f9f9f #000000
0;
#X text 100 165 signal -;
#X text 65 97 set <float> -;
#X obj 35 11 samphold~;
#X text 112 10 - sample and hold unit;
#X text 163 79 input to be sampled., f 49;
#X text 51 116 reset <float> -;
#X text 163 97 set output value., f 49;
#X text 163 116 set last value of right inlet., f 49;
#X text 107 134 reset -;
#X text 160 249 NONE, f 5;
#X text 98 210 signal - sampled and held signal.;
#X text 163 165 control signal (triggers when smaller than previous)
;
#X text 163 134 set last value of right inlet to infinity (forces output).
;
#X restore 348 13 pd reference;
#X text 442 13 <= click;
#X obj 9 44 cnv 1 520 1 empty empty empty 8 12 0 13 #000000 #000000
0;
#X obj 14 564 cnv 1 520 1 empty empty empty 8 12 0 13 #000000 #000000
0;
#X text 27 57 The [samphold~] object samples its left input whenever
its right input decreases in value - as a [phasor~] does each period
\, so it was designed to be triggered by [phasor~]. Both inputs are
audio signals., f 69;
#X text 27 111 The "set" message sets the output value (which gets
updated normally afterwards.) The "reset" message causes [samphold~]
to act as if the given value were the most recent value of the control
(right) input. Use this \, for example \, if you reset the incoming
[phasor~] but don't want the jump reflected in the output as in the
example below to the right. Plain "reset" is equivalent to "reset infinity"
which forces the next input to be sampled., f 69;
#X text 24 577 see also:;
#X obj 99 576 phasor~;
#X obj 164 575 noise~;
#X connect 0 0 1 0;
#X connect 2 0 0 0;
#X connect 5 0 0 0;
#X connect 6 0 5 0;
#X connect 7 0 5 1;
#X connect 8 0 6 0;
#X connect 9 0 7 0;
#X connect 10 0 5 0;
#X connect 11 0 5 0;
#X connect 13 0 5 0;
#X connect 15 0 2 0;
#X connect 16 0 17 0;
#X connect 19 0 21 1;
#X connect 20 0 21 0;
#X connect 21 0 22 0;
#X connect 22 0 23 0;
#X connect 24 0 22 0;
#X connect 25 0 24 0;
#X connect 26 0 19 1;
#X connect 27 0 21 0;
#X connect 28 0 26 0;
#X connect 28 0 27 0;
#X connect 31 0 9 0;
#X connect 32 0 9 0;
