#N canvas 303 151 831 559 10; #X obj 83 25 ctlin; #X text 128 28 <= you get value \, ctl-num and channel-num here; #X obj 532 306 table \$0-mapping 16; #X obj 98 131 tabread \$0-mapping; #X obj 84 370 loadbang; #X msg 84 395 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; #X obj 84 422 s \$0-mapping; #X obj 83 235 ctlout; #X text 140 236 <= you put value \, ctl-num and channel-num into this ; #X obj 168 176 pack 0 0 0; #X obj 168 201 print DEBUG-OUT; #X obj 385 500 s \$0-mapping; #X msg 385 479 3 4 \, 4 3; #X text 157 370 load a default mapping \, which doesn't change anything. ; #X text 383 413 Example alternate mapping: cc 3 goes to cc 4 \, and cc 4 goes to cc 3; #X obj 167 72 pack 0 0 0; #X text 248 74 debuggin' input; #X text 297 194 debuggin' output; #X obj 167 97 print DEBUG-IN; #X text 236 131 look up our translation table to exchange one ctl-num with another one.; #X text 82 286 The mapping: a [table] is just an array as in C \, indexed with integers starting from 0 \, when you read it with [tabread] \, you write it with [tabwrite] or with a list message consisting of a starting position (0 in example below) and a list of values to insert starting from there.; #X text 383 442 Two messages in one box \, separated by a comma: write a 4 into position 3 and a 3 at position 4; #X connect 0 0 7 0; #X connect 0 0 9 0; #X connect 0 0 15 0; #X connect 0 1 3 0; #X connect 0 1 15 1; #X connect 0 2 7 2; #X connect 0 2 9 2; #X connect 0 2 15 2; #X connect 3 0 7 1; #X connect 3 0 9 1; #X connect 4 0 5 0; #X connect 5 0 6 0; #X connect 9 0 10 0; #X connect 12 0 11 0; #X connect 15 0 18 0;