changeset 291:46c12546664f

Added example Heavy/Midi patch
author Giulio Moro <giuliomoro@yahoo.it>
date Sat, 21 May 2016 15:28:03 +0100
parents cb9a80040150
children 3d26df8a8a6c
files projects/heavy/pd/hello-midi/backmain.pd projects/heavy/pd/hello-midi/bela_ctlin.pd projects/heavy/pd/hello-midi/bela_notein.pd projects/heavy/pd/hello-midi/bela_pgmin.pd
diffstat 4 files changed, 267 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/projects/heavy/pd/hello-midi/backmain.pd	Sat May 21 15:28:03 2016 +0100
@@ -0,0 +1,79 @@
+#N canvas 85 58 1280 685 10;
+#X obj 19 396 dac~ 1 2;
+#X text 39 1 Hello world!;
+#X text 37 11 ============;
+#X obj 31 353 *~ 0.1;
+#X text 202 448 ---------------------------------;
+#X text 202 438 @krighxz / BELA / heavy / 12/2015;
+#X text 226 457 beaglert.cc / enzienaudio.com;
+#X obj 39 132 mtof;
+#X floatatom 79 59 5 0 0 0 - - -, f 5;
+#X floatatom 122 59 5 0 0 0 - - -, f 5;
+#X floatatom 41 63 5 0 0 0 - - -, f 5;
+#X obj 26 170 phasor~ 440;
+#X text 100 363 (the harsh sound of success);
+#X obj 260 83 * 20;
+#X obj 261 112 + 200;
+#X obj 132 85 loadbang;
+#X msg 131 111 1000;
+#X obj 125 166 sig~;
+#X text 673 121 [pgmin];
+#X obj 218 178 * 10;
+#X obj 30 250 hip~;
+#X obj 26 275 hip~;
+#X obj 20 302 hip~;
+#X obj 19 323 hip~;
+#X obj 87 192 lop~ 4;
+#X obj 152 256 line;
+#X obj 200 200 + 50;
+#X msg 170 227 \$1 200;
+#X msg 93 114 0;
+#X msg 185 112 0;
+#X obj 29 224 vcf~ 4;
+#X obj 70 333 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X obj 42 92 mono;
+#X obj 40 28 bela_notein 0;
+#X obj 260 60 bela_ctlin 5 0;
+#X obj 220 151 bela_ctlin 6 0;
+#X obj 408 121 bela_pgmin 3;
+#X text 537 58 [ctlin];
+#X text 332 27 [notein];
+#X text 140 29 <== the bela equivalent of ==>;
+#X text 349 59 <== the bela equivalent of ==>;
+#X text 483 121 <== the bela equivalent of ==>;
+#X connect 3 0 0 1;
+#X connect 3 0 0 0;
+#X connect 7 0 11 0;
+#X connect 8 0 32 1;
+#X connect 10 0 32 0;
+#X connect 11 0 30 0;
+#X connect 13 0 14 0;
+#X connect 14 0 17 0;
+#X connect 15 0 16 0;
+#X connect 15 0 29 0;
+#X connect 15 0 28 0;
+#X connect 16 0 17 0;
+#X connect 17 0 24 0;
+#X connect 19 0 26 0;
+#X connect 20 0 21 0;
+#X connect 21 0 22 0;
+#X connect 22 0 23 0;
+#X connect 23 0 3 0;
+#X connect 24 0 30 1;
+#X connect 25 0 20 1;
+#X connect 25 0 21 1;
+#X connect 25 0 22 1;
+#X connect 25 0 23 1;
+#X connect 26 0 27 0;
+#X connect 27 0 25 0;
+#X connect 29 0 19 0;
+#X connect 30 0 20 0;
+#X connect 31 0 3 1;
+#X connect 32 0 7 0;
+#X connect 32 1 31 0;
+#X connect 33 0 10 0;
+#X connect 33 1 8 0;
+#X connect 33 2 9 0;
+#X connect 34 0 13 0;
+#X connect 35 0 19 0;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/projects/heavy/pd/hello-midi/bela_ctlin.pd	Sat May 21 15:28:03 2016 +0100
@@ -0,0 +1,76 @@
+#N canvas 554 204 703 475 10;
+#X obj 53 431 outlet;
+#X obj 108 429 outlet;
+#X obj 99 127 r ctlin;
+#X obj 92 151 unpack f f f;
+#X obj 154 429 outlet;
+#X obj 86 322 spigot;
+#X text 51 450 value;
+#X text 105 450 number;
+#X obj 211 138 loadbang;
+#X obj 177 193 \$1;
+#X obj 126 214 == \$1;
+#X obj 119 299 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X obj 84 349 unpack f f f;
+#X obj 143 247 ||;
+#X obj 177 217 == 0;
+#X text 70 11 Emulates ctlin \, except number of outlets is fixed.
+;
+#X obj 228 247 ||;
+#X obj 262 217 == 0;
+#X obj 212 214 == \$2;
+#X obj 262 193 \$2;
+#X obj 177 277 &&;
+#X obj 211 163 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X text 173 299 If (inputController==\$1 || \$1==0) && (inputChannel==\$2
+|| \$2==0);
+#X text 197 52 Known issue: trying to select inputController 0 will
+result i accepting all controllers (because a pd external cannot tell
+the difference between \$1 been explicitely set to 0 and the patch
+not having any argument);
+#X text 162 450 channel;
+#X obj 56 192 pack f f f;
+#X obj 80 408 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X floatatom 81 382 5 0 0 0 - - -, f 5;
+#X obj 121 412 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X floatatom 122 386 5 0 0 0 - - -, f 5;
+#X obj 172 406 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X floatatom 173 380 5 0 0 0 - - -, f 5;
+#X obj 122 92 s ctlin;
+#X obj 64 29 r bela_ctlin;
+#X connect 2 0 3 0;
+#X connect 3 0 25 0;
+#X connect 3 1 10 0;
+#X connect 3 1 25 1;
+#X connect 3 2 18 0;
+#X connect 3 2 25 2;
+#X connect 5 0 12 0;
+#X connect 8 0 21 0;
+#X connect 9 0 14 0;
+#X connect 10 0 13 0;
+#X connect 11 0 5 1;
+#X connect 12 0 0 0;
+#X connect 12 0 27 0;
+#X connect 12 1 1 0;
+#X connect 12 1 29 0;
+#X connect 12 2 4 0;
+#X connect 12 2 31 0;
+#X connect 13 0 20 0;
+#X connect 14 0 13 1;
+#X connect 16 0 20 1;
+#X connect 17 0 16 1;
+#X connect 18 0 16 0;
+#X connect 19 0 17 0;
+#X connect 20 0 11 0;
+#X connect 21 0 9 0;
+#X connect 21 0 19 0;
+#X connect 25 0 5 0;
+#X connect 27 0 26 0;
+#X connect 29 0 28 0;
+#X connect 31 0 30 0;
+#X connect 33 0 32 0;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/projects/heavy/pd/hello-midi/bela_notein.pd	Sat May 21 15:28:03 2016 +0100
@@ -0,0 +1,59 @@
+#N canvas 399 23 629 685 10;
+#X obj 94 481 outlet;
+#X obj 165 475 outlet;
+#X obj 141 184 unpack f f f;
+#X obj 221 472 outlet;
+#X obj 143 365 spigot;
+#X obj 268 181 loadbang;
+#X obj 234 236 \$1;
+#X obj 183 257 == \$1;
+#X obj 176 342 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X obj 143 392 unpack f f f;
+#X obj 200 290 ||;
+#X obj 234 260 == 0;
+#X obj 268 206 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X text 160 65 Emulates notein \, except number of outlets is fixed.
+;
+#X text 92 499 notenumber;
+#X text 161 489 velocity;
+#X text 220 486 channel;
+#X text 229 311 If (inputChannel==\$1 || \$1==0);
+#X obj 115 232 pack f f f;
+#X obj 82 428 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X floatatom 84 410 5 0 0 0 - - -, f 5;
+#X obj 145 448 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X floatatom 147 430 5 0 0 0 - - -, f 5;
+#X obj 198 451 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X floatatom 200 433 5 0 0 0 - - -, f 5;
+#X obj 131 112 s notein;
+#X obj 140 149 r notein;
+#X obj 135 84 r bela_notein;
+#X connect 2 0 18 0;
+#X connect 2 1 18 1;
+#X connect 2 2 7 0;
+#X connect 2 2 18 2;
+#X connect 4 0 9 0;
+#X connect 5 0 12 0;
+#X connect 6 0 11 0;
+#X connect 7 0 10 0;
+#X connect 8 0 4 1;
+#X connect 9 0 0 0;
+#X connect 9 0 20 0;
+#X connect 9 1 1 0;
+#X connect 9 1 22 0;
+#X connect 9 2 3 0;
+#X connect 9 2 24 0;
+#X connect 10 0 8 0;
+#X connect 11 0 10 1;
+#X connect 12 0 6 0;
+#X connect 18 0 4 0;
+#X connect 20 0 19 0;
+#X connect 22 0 21 0;
+#X connect 24 0 23 0;
+#X connect 26 0 2 0;
+#X connect 27 0 25 0;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/projects/heavy/pd/hello-midi/bela_pgmin.pd	Sat May 21 15:28:03 2016 +0100
@@ -0,0 +1,53 @@
+#N canvas 623 197 587 546 10;
+#X obj 73 413 outlet;
+#X obj 174 411 outlet;
+#X obj 106 304 spigot;
+#X obj 197 126 loadbang;
+#X obj 197 175 \$1;
+#X obj 146 196 == \$1;
+#X obj 139 281 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X obj 163 229 ||;
+#X obj 197 199 == 0;
+#X obj 197 151 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 89 111 unpack f f;
+#X obj 106 332 unpack f f;
+#X text 52 436 program number;
+#X text 182 432 channel;
+#X text 193 281 If (channel==\$1 || \$1==0);
+#X text 167 45 emulates pgmin except it always has 2 outlets and requires
+the input parameters to be explicitely set. Set them to 0 to avoid
+filtering;
+#X text 262 132 It'd be nicer with [t l l] but have to compensate for
+the fact that it is not supported by heavy;
+#X obj 77 183 pack f f;
+#X floatatom 72 355 5 0 0 0 - - -, f 5;
+#X obj 63 379 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X floatatom 150 361 5 0 0 0 - - -, f 5;
+#X obj 141 385 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 91 63 s pgmin;
+#X obj 93 87 r pgmin;
+#X obj 89 42 r bela_pgmin;
+#X connect 2 0 11 0;
+#X connect 3 0 9 0;
+#X connect 4 0 8 0;
+#X connect 5 0 7 0;
+#X connect 6 0 2 1;
+#X connect 7 0 6 0;
+#X connect 8 0 7 1;
+#X connect 9 0 4 0;
+#X connect 10 0 17 0;
+#X connect 10 1 5 0;
+#X connect 10 1 17 1;
+#X connect 11 0 0 0;
+#X connect 11 0 18 0;
+#X connect 11 1 1 0;
+#X connect 11 1 20 0;
+#X connect 17 0 2 0;
+#X connect 18 0 19 0;
+#X connect 20 0 21 0;
+#X connect 23 0 10 0;
+#X connect 24 0 22 0;