2.time.pd - WordPress.com

advertisement
#N canvas 35 22 729 694 10;
#X obj 17 -8 adc~;
#X obj 19 617 dac~;
#X obj 17 146 bonk~;
#X text 50 -8 incoming sound;
#X text 57 147 detect attacks;
#X obj 17 178 bng 25 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 17 219 trigger;
#X obj 17 249 timer;
#X text 85 211 output two triggers;
#X text 88 225 (right to left);
#X text 71 250 read the time elapsed;
#X floatatom 17 276 7 0 0 0 - - -;
#X text 77 274 (in milliseconds);
#X obj 17 429 metro;
#X obj 17 387 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1039.09;
#X obj 17 316 trigger float float;
#X msg 115 469 0;
#X obj 17 454 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X text 470 227 record each new attack;
#X obj 476 139 adc~;
#X obj 19 502 phasor~ 0.1;
#X obj 19 526 *~ 441000;
#X text 125 502 SLOW sawtooth wave;
#X obj 19 591 *~ 0.25;
#X text 141 298 the "trigger" object also converts messages from one
type to another \, so here we have to feed it arguments to ask for
"float" (numeric) messages. We need the time value twice \, first to
set that of the "metronome" object below \, and second to turn it on
(for which any nonzero value will do.);
#X text 36 386 the toggle shows the "metro"'s state and/or starts or
stops it by hand;
#X text 159 454 One way to read a sample synchronously: set the phase
of a "phasor" to zero.;
#X text 112 525 scan 10 times length of wavetable (resulting in "normal"
speed because the frequency is 1/10 Hertz).;
#X obj 477 203 tabwrite~ wave2;
#X obj 19 567 tabread4~ wave2;
#X obj 56 53 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1
;
#X obj 17 107 spigot~;
#X text 74 47 the toggle shows the "spigot~"'s state and/or starts
or stops it by hand;
#X text 77 109 a spigot~ allows data to pass through depending on its
state an audio spigot is open;
#X floatatom 75 84 5 0 0 0 - - -;
#N canvas 0 22 358 287 waveTable 1;
#N canvas 0 22 450 300 (subpatch) 0;
#X array wave2 100 float 3;
#A 0 -0.00757796 -0.0071154 -0.00579397 -0.00443814 -0.00404502 0.00490681
-0.00634254 -0.00741008 -0.0073993 -0.00617722 -0.00409832 -0.00178164
0.000380728 0.00217097 0.00254031 0.000869256 -0.00219056 -0.00613164
-0.0101647 -0.0127813 -0.0132487 -0.0120964 -0.0102316 -0.00851876
-0.00789692 -0.00900786 -0.0115361 -0.0145778 -0.0170892 -0.0178853
-0.0165048 -0.0133605 -0.009144 -0.00497972 -0.00226469 -0.00198399
-0.00420018 -0.00796722 -0.011554 -0.0132143 -0.0121843 -0.0087727
-0.0039184 0.000804985 0.00370147 0.00445858 0.00373236 0.00191925
-0.000242951 -0.00209334 -0.00351563 -0.00404223 -0.00320223 -0.00138829
0.000294315 0.000803188 -0.0002166 -0.0023846 -0.00535742 -0.00901439
-0.0125378 -0.0148469 -0.0153473 -0.0136861 -0.0103139 -0.00643112
-0.0026879 0.000848416 0.0039748 0.00616475 0.00700455 0.0067409
0.00574854
0.00425771 0.00277789 0.00202482 0.00244177 0.0035824 0.00474573
0.00557915
0.00564056 0.0046466 0.00267796 0.000450932 -0.000946778 -0.0012913
-0.000760423 0.000618701 0.00222633 0.0035988 0.00474121 0.00527555
0.00500397 0.00411024 0.00291063 0.0020713 0.00216535 0.0031742
0.00470199
0.00657382;
#X coords 0 1 99 -1 200 140 1;
#X restore 51 45 graph;
#X restore 469 87 pd waveTable;
#X text 549 87 a subpatch;
#X text 77 593 ... rest the same as example 1;
#X text 163 -29 example 2 - measuring time and scheduling tasks;
#X obj 556 308 trigger;
#X obj 623 307 t;
#X text 606 306 =;
#X obj 56 12 loadbang;
#X msg 56 32 1;
#X obj 477 174 *~ 3.5;
#X text 328 614 Originally contributed by Miller Puckette and adopted
by Greg Pond;
#X connect 0 0 31 0;
#X connect 2 0 5 0;
#X connect 5 0 6 0;
#X connect 5 0 28 0;
#X connect 6 0 7 0;
#X connect 6 1 7 1;
#X connect 7 0 11 0;
#X connect 11 0 15 0;
#X connect 13 0 17 0;
#X connect 14 0 13 0;
#X connect 15 0 14 0;
#X connect 15 1 13 1;
#X connect 16 0 20 1;
#X connect 17 0 16 0;
#X connect 19 0 44 0;
#X connect 20 0 21 0;
#X connect 21 0 29 0;
#X connect 23 0 1 0;
#X connect 23 0 1 1;
#X connect 29 0 23 0;
#X connect 30 0 31 1;
#X
#X
#X
#X
#X
connect
connect
connect
connect
connect
30
31
42
43
44
0
0
0
0
0
34 0;
2 0;
43 0;
30 0;
28 0;
Download