Mercurial > hg > beaglert
comparison examples/pd/digital/bela_digital-help.pd @ 358:5c2f94105c58 prerelease
Added example/help patches for digital in pd
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Wed, 08 Jun 2016 22:04:21 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
357:f3dd39be15e4 | 358:5c2f94105c58 |
---|---|
1 #N canvas 121 46 877 628 10; | |
2 #X obj 64 94 r bela_digitalIn11; | |
3 #X obj 219 94 r bela_digitalIn12; | |
4 #X obj 386 107 adc~ 13 14; | |
5 #X text 49 64 Digital in \, message rate; | |
6 #X text 214 69 Digital in \, message rate; | |
7 #X text 394 85 Digital ins \, signal rate; | |
8 #X obj 32 283 s bela_digitalOut15; | |
9 #X text 13 309 Digital out \, message rate; | |
10 #X obj 396 593 s bela_setDigital; | |
11 #X obj 396 533 loadbang; | |
12 #X msg 431 401 in 11; | |
13 #X text 524 390 First argument is the pin direction Second argument | |
14 is the pin number Third argument is the rate \, can be "~" or "sig" | |
15 for signal-rate or "message" for message-rate. Defaults to message-rate. | |
16 ; | |
17 #X msg 431 458 in 13 ~; | |
18 #X msg 432 429 in 12 message; | |
19 #X msg 517 506 disable 17; | |
20 #X obj 386 139 snapshot~; | |
21 #X obj 500 134 snapshot~; | |
22 #X obj 529 56 loadbang; | |
23 #X obj 384 181 print digitalIn13; | |
24 #X obj 500 183 print digitalIn14; | |
25 #X obj 497 105 metro 200; | |
26 #X text 525 474 To stop using a pin (e.g.: to save CPU) \, send a disable | |
27 message containing the pin number; | |
28 #X obj 224 280 dac~ 16; | |
29 #X obj 22 232 metro 500; | |
30 #X obj 32 257 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 | |
31 1; | |
32 #X obj 224 253 phasor~ 300; | |
33 #X text 160 234 Nice \, anti-aliased square wave; | |
34 #X obj 22 207 loadbang; | |
35 #X text 15 181 Blink that LED!; | |
36 #X obj 411 306 dac~ 17; | |
37 #X obj 405 248 osc~ 300; | |
38 #X obj 470 248 phasor~ 169; | |
39 #X obj 457 278 -~ 0.5; | |
40 #X text 403 210 Sum signals together for unpredictable effects; | |
41 #X obj 612 303 dac~ 18; | |
42 #X text 198 305 Digital out \, signal rate; | |
43 #X text 378 325 Digital out \, signal rate; | |
44 #X text 588 325 Digital out \, signal rate; | |
45 #X obj 608 222 adc~; | |
46 #X obj 612 249 *~ 0.5; | |
47 #X obj 612 276 +~ 0.5; | |
48 #X text 585 203 The ultimate bit-crusher; | |
49 #X msg 426 555 in 11 \, in 12 \, in 13 ~ \, in 14 ~ \, out 15 \, out | |
50 16 ~ \, out 17 ~ \, out 18 ~; | |
51 #X text 23 377 Each digital channel can be configured as either an | |
52 input or an output. Send messages to bela_setDigital to configure the | |
53 digitalPins (needed before using them). Pins settings can be modified | |
54 at will during execution. Message-rate input pins receive messages | |
55 only when the input changes. Message-rate output pins will write to | |
56 the output the most recent value you send them. Signal-rate inputs | |
57 and outputs are handled as regular audio channels. Outputs are thresholded | |
58 to 0.5 before being written to the actual output. Note that each pin | |
59 that is managed adds to the CPU usage \, so only activate the pins | |
60 you actually need.; | |
61 #X text 34 19 Digital channels are numbered 11 to 26 \, which corresponds | |
62 to Bela's 0 to 15 digital channels. They can be set to respond at message | |
63 rate or at signal rate; | |
64 #X obj 415 271 osc~ 1; | |
65 #X obj 385 157 change; | |
66 #X obj 500 158 change; | |
67 #X obj 64 116 print digitalIn11; | |
68 #X obj 219 117 print digitalIn12; | |
69 #X connect 0 0 48 0; | |
70 #X connect 1 0 49 0; | |
71 #X connect 2 0 15 0; | |
72 #X connect 2 1 16 0; | |
73 #X connect 9 0 42 0; | |
74 #X connect 10 0 8 0; | |
75 #X connect 12 0 8 0; | |
76 #X connect 13 0 8 0; | |
77 #X connect 14 0 8 0; | |
78 #X connect 15 0 46 0; | |
79 #X connect 16 0 47 0; | |
80 #X connect 17 0 20 0; | |
81 #X connect 20 0 16 0; | |
82 #X connect 20 0 15 0; | |
83 #X connect 23 0 24 0; | |
84 #X connect 24 0 6 0; | |
85 #X connect 25 0 22 0; | |
86 #X connect 27 0 23 0; | |
87 #X connect 30 0 29 0; | |
88 #X connect 31 0 32 0; | |
89 #X connect 32 0 29 0; | |
90 #X connect 38 0 39 0; | |
91 #X connect 38 1 39 0; | |
92 #X connect 39 0 40 0; | |
93 #X connect 40 0 34 0; | |
94 #X connect 42 0 8 0; | |
95 #X connect 45 0 29 0; | |
96 #X connect 46 0 18 0; | |
97 #X connect 47 0 19 0; |