# HG changeset patch # User Giulio Moro # Date 1454736370 0 # Node ID e90df8c5669f5d3742a4886ff6219fa36773a8fa # Parent f6a3b9265e6f8c14655f94c19a76397795810efd Missing files for hello-midi diff -r f6a3b9265e6f -r e90df8c5669f projects/heavy/pd/hello-midi/countTo.pd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/projects/heavy/pd/hello-midi/countTo.pd Sat Feb 06 05:26:10 2016 +0000 @@ -0,0 +1,34 @@ +#N canvas 586 250 450 300 10; +#X obj 65 196 outlet; +#X obj 98 8 inlet; +#X text 189 49 counts from 0 to the given number -1; +#X text 214 95 inlet:N; +#X text 212 112 outlet: 0 \, 1 \, 2 \, ... \, N-1; +#X obj 143 61 f; +#X obj 100 138 spigot; +#X obj 129 89 <; +#X obj 129 113 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 +1; +#X obj 95 28 t b f b; +#X obj 92 74 + 1; +#X obj 43 73 f, f 4; +#X obj 63 104 t b f f f; +#X obj 143 155 spigot; +#X msg 92 53 0; +#X obj 16 144 delay 0; +#X connect 1 0 9 0; +#X connect 5 0 7 1; +#X connect 6 0 11 0; +#X connect 7 0 8 0; +#X connect 8 0 6 1; +#X connect 9 0 11 0; +#X connect 9 1 5 0; +#X connect 9 1 14 0; +#X connect 10 0 11 1; +#X connect 11 0 12 0; +#X connect 12 0 15 0; +#X connect 12 1 0 0; +#X connect 12 2 7 0; +#X connect 12 3 10 0; +#X connect 14 0 11 1; +#X connect 15 0 6 0; diff -r f6a3b9265e6f -r e90df8c5669f projects/heavy/pd/hello-midi/maxArray.pd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/projects/heavy/pd/hello-midi/maxArray.pd Sat Feb 06 05:26:10 2016 +0000 @@ -0,0 +1,67 @@ +#N canvas 464 23 1002 583 10; +#X obj 224 202 max; +#X obj 265 200 f; +#X obj 223 229 change; +#X obj 223 251 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 223 271 f; +#X obj 259 323 f; +#X obj 187 315 f; +#X obj 268 282 t b b; +#X obj 183 364 outlet; +#X obj 269 379 outlet; +#X obj 179 17 inlet; +#X obj 225 177 tabread \$1; +#X obj 230 88 t f f b; +#X text 376 37 Finds a maximum value in an array; +#X text 531 112 \$2 arrayLength; +#X obj 292 10 inlet; +#X text 425 146 inlets:; +#X text 473 144 1 bang to find the maximum; +#X text 475 157 2 arrayLength; +#X text 407 90 creation arguments: \$1 arrayName; +#X obj 246 38 \$2; +#X obj 202 40 bang; +#X obj 230 65 f; +#X obj 224 6 loadbang; +#X text 444 216 outlets: 1 maximum value; +#X text 498 231 2 index of the maximum value; +#X msg 276 141 -1e+15; +#X obj 222 142 t f f f; +#X floatatom 158 266 5 0 0 0 - - -, f 5; +#X obj 332 302 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 288 253 select 127; +#X floatatom 301 324 5 0 0 0 - - -, f 5; +#X text 362 256 heavy does not support the second inlet of select so +I have to hard code 127 in here; +#X obj 223 110 countTo; +#X connect 0 0 1 0; +#X connect 0 0 2 0; +#X connect 0 0 6 1; +#X connect 0 0 28 0; +#X connect 1 0 0 1; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 4 0 5 1; +#X connect 4 0 31 0; +#X connect 5 0 9 0; +#X connect 6 0 8 0; +#X connect 7 0 6 0; +#X connect 7 1 5 0; +#X connect 10 0 21 0; +#X connect 11 0 0 0; +#X connect 12 0 33 0; +#X connect 12 2 26 0; +#X connect 15 0 22 1; +#X connect 20 0 22 1; +#X connect 21 0 22 0; +#X connect 22 0 12 0; +#X connect 23 0 20 0; +#X connect 26 0 0 1; +#X connect 27 0 30 0; +#X connect 27 1 11 0; +#X connect 27 2 4 1; +#X connect 30 0 7 0; +#X connect 30 0 29 0; +#X connect 33 0 27 0; diff -r f6a3b9265e6f -r e90df8c5669f projects/heavy/pd/hello-midi/mono.pd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/projects/heavy/pd/hello-midi/mono.pd Sat Feb 06 05:26:10 2016 +0000 @@ -0,0 +1,106 @@ +#N canvas 69 182 1020 452 10; +#N canvas 0 23 450 278 (subpatch) 0; +#X array \$0-activeNotes 127 float 2; +#X coords 0 100 127 -1 200 140 1 0 0; +#X restore 537 25 graph; +#N canvas 89 91 450 300 resetArray 1; +#X obj 121 145 tabwrite \$0-activeNotes; +#X msg 123 115 -0.5; +#X obj 154 90 t b f; +#X msg 129 45 128; +#X obj 103 14 inlet; +#X text 212 71 countto; +#X obj 153 69 countTo; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X connect 2 1 0 1; +#X connect 3 0 6 0; +#X connect 4 0 3 0; +#X connect 6 0 2 0; +#X restore 83 49 pd resetArray; +#X obj 83 3 loadbang; +#X obj 88 25 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 39 188 maxArray \$0-activeNotes 128; +#X obj 183 219 f; +#X obj 39 237 >= 0; +#X floatatom 148 313 5 0 0 0 - - -, f 5; +#X obj 70 262 select 1; +#X obj 366 87 f; +#X obj 426 60 f; +#X text 334 39 note; +#X text 424 16 velocity; +#X obj 423 87 > 0; +#X obj 344 281 tabwrite \$0-activeNotes; +#X obj 330 207 f; +#X floatatom 303 178 5 0 0 0 - - -, f 5; +#X obj 265 163 f; +#X obj 304 150 + 1; +#X msg 277 130 -1; +#X msg 371 207 -0.5; +#X obj 400 116 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 367 137 spigot; +#X obj 447 134 spigot; +#X obj 460 86 == 0; +#X obj 470 109 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 434 163 t b f; +#X obj 337 60 inlet; +#X obj 426 32 inlet; +#X obj 148 350 outlet; +#X obj 275 89 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 41 163 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 363 172 t b f; +#X obj 334 240 t b f; +#X text 578 211 pass in velocity/note pairs (velocity first) and obtain +as an output the most recent note still active; +#X text 581 268 outlet 2 gate; +#X obj 330 366 outlet; +#X text 583 251 outlet 1 most recent note active (-1 otherwise); +#X text 155 329 most recent note active; +#X msg 338 338 0; +#X msg 378 339 1; +#X connect 2 0 3 0; +#X connect 3 0 1 0; +#X connect 3 0 19 0; +#X connect 4 0 6 0; +#X connect 4 1 5 1; +#X connect 5 0 7 0; +#X connect 5 0 40 0; +#X connect 6 0 8 0; +#X connect 7 0 29 0; +#X connect 8 0 5 0; +#X connect 8 1 39 0; +#X connect 9 0 22 0; +#X connect 9 0 23 0; +#X connect 10 0 13 0; +#X connect 10 0 24 0; +#X connect 13 0 21 0; +#X connect 15 0 33 0; +#X connect 16 0 15 1; +#X connect 17 0 18 0; +#X connect 18 0 16 0; +#X connect 18 0 17 1; +#X connect 19 0 17 1; +#X connect 20 0 33 0; +#X connect 21 0 22 1; +#X connect 22 0 32 0; +#X connect 23 0 26 0; +#X connect 24 0 25 0; +#X connect 25 0 23 1; +#X connect 26 0 20 0; +#X connect 26 1 14 1; +#X connect 27 0 9 0; +#X connect 28 0 10 0; +#X connect 28 0 30 0; +#X connect 30 0 17 0; +#X connect 31 0 4 0; +#X connect 32 0 15 0; +#X connect 32 1 14 1; +#X connect 33 0 31 0; +#X connect 33 1 14 0; +#X connect 39 0 36 0; +#X connect 40 0 36 0;