-
Notifications
You must be signed in to change notification settings - Fork 6
/
speedlimit.pd
59 lines (59 loc) · 1.54 KB
/
speedlimit.pd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#N canvas 381 56 782 432 10;
#X obj 245 86 inlet;
#X obj 115 249 metro 100;
#X obj 115 69 inlet;
#N canvas 0 56 720 312 activity-monitor 0;
#X obj 108 74 inlet;
#X obj 108 103 b;
#X obj 108 160 delay 100;
#X obj 168 73 inlet;
#X obj 108 198 outlet;
#X text 198 132 if no activity for X msec \, then bang outlet;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 4 0;
#X connect 3 0 2 1;
#X restore 161 192 pd activity-monitor;
#X msg 161 218 0;
#X msg 115 218 1;
#X obj 115 288 list append;
#X text 291 87 speed limit (ms);
#X obj 115 315 outlet;
#X obj 115 126 spigot 1;
#X obj 183 126 == 0;
#X obj 115 93 t a b a;
#X text 359 220 1) store data;
#X text 339 190 If data comes in:;
#X text 360 240 2) start activity monitor;
#X obj 420 55 loadbang;
#X obj 420 80 f \$1;
#X obj 420 108 select 0;
#X msg 420 130 100;
#X obj 245 160 f;
#X text 359 282 4) block system;
#X text 341 315 While blocked \, incoming data is sampled at metro
rate as long as there's activity.;
#X text 340 361 If there's no activity for a metro period \, stop the
metro and unblock the system to accept new data.;
#X text 359 261 3) start metro and output data;
#X connect 0 0 19 0;
#X connect 1 0 6 0;
#X connect 2 0 11 0;
#X connect 3 0 4 0;
#X connect 4 0 1 0;
#X connect 4 0 10 0;
#X connect 5 0 1 0;
#X connect 5 0 10 0;
#X connect 6 0 8 0;
#X connect 9 0 5 0;
#X connect 10 0 9 1;
#X connect 11 0 9 0;
#X connect 11 1 3 0;
#X connect 11 2 6 1;
#X connect 15 0 16 0;
#X connect 16 0 17 0;
#X connect 17 0 18 0;
#X connect 17 1 19 0;
#X connect 18 0 19 0;
#X connect 19 0 3 1;
#X connect 19 0 1 1;