Browse Source

added osc2midi

m---w 12 years ago
parent
commit
3278e404aa
4 changed files with 393 additions and 35 deletions
  1. 32 31
      midi-help.pd
  2. 4 4
      midi_bi_gui.pd
  3. 96 0
      osc2midi-help.pd
  4. 261 0
      osc2midi.pd

+ 32 - 31
midi-help.pd

@@ -1,36 +1,37 @@
-#N canvas 105 22 1160 745 10;
+#N canvas 42 22 1160 745 10;
 #X obj 69 67 midi_in main;
 #X obj 481 90 midi_out main;
-#X obj 601 69 midi_out_gui main;
-#X obj 211 113 midi_in_gui main;
+#X obj 344 121 midi_out_gui main;
+#X obj 65 92 midi_in_gui main;
 #X obj 50 299 midi_r main /i/receive/midi ctl 11 0 1 0 50;
 #X obj 50 259 midi_s main /i/send/midi ctl 11 0 127 0;
-#X obj 600 183 midi_gen_gui main;
-#X obj 483 259 midi_gen main;
-#X obj 50 359 midi_bi main /i/send/and/receive/midi ctl 11 0 1 0 50
+#X obj 606 59 midi_gen_gui main;
+#X obj 481 198 midi_gen main;
+#X obj 45 336 midi_bi main /i/send/and/receive/midi ctl 11 0 1 0 50
 ;
-#X obj 315 414 midi_bi_gui main /i/send/and/receive/midi;
-#X text 630 444 [midi_manager];
-#X text 630 464 [midi_gui];
-#X text 630 484 [midi_learn];
-#X text 659 420 ???;
-#X text 788 439 eine gui abstraction für alle.;
-#X text 517 363 scaling für pitchbend \, etc???;
-#X text 650 582 midi learn:;
-#X text 730 582 - register erstellen;
-#X text 730 602 - learn button drücken;
-#X text 730 622 - osc und midi variable bewegen;
-#X text 730 642 - learn button abwählen;
-#X text 730 662 - offset + scaling einstellen;
-#X text 730 692 - speichern;
-#X text 188 601 nur noch eine [midi_reg] abstraction!!!;
-#X text 188 621 mit [midi_reg_gui];
-#X text 165 575 midi_bi:;
-#X text 232 661 midi_reg_gui main;
-#X text 278 685 - parameter list (wie bei storage);
-#X text 278 705 zum auswählen des parameters.;
-#X text 278 725 - alternativ numberbox.;
-#X text 985 541 parameter list ohne dynamic patching!!!;
-#X text 985 561 so wie playlist. nur in textfile gespeichert.;
-#X text 661 730 osc2midi abstraction:;
-#X text 671 750 bidirektional (einzeln schaltbar).;
+#X obj 37 366 midi_bi_gui main /i/send/and/receive/midi;
+#X text 387 470 [midi_manager];
+#X text 387 490 [midi_gui];
+#X text 387 510 [midi_learn];
+#X text 416 446 ???;
+#X text 338 425 eine gui abstraction für alle.;
+#X text 579 414 midi learn:;
+#X text 659 414 - register erstellen;
+#X text 659 434 - learn button drücken;
+#X text 659 454 - osc und midi variable bewegen;
+#X text 659 474 - learn button abwählen;
+#X text 659 494 - offset + scaling einstellen;
+#X text 659 524 - speichern;
+#X text 72 534 nur noch eine [midi_reg] abstraction!!!;
+#X text 72 554 mit [midi_reg_gui];
+#X text 49 508 midi_bi:;
+#X text 116 594 midi_reg_gui main;
+#X text 162 618 - parameter list (wie bei storage);
+#X text 162 638 zum auswählen des parameters.;
+#X text 162 658 - alternativ numberbox.;
+#X text 536 609 parameter list ohne dynamic patching!!!;
+#X text 536 629 so wie playlist. nur in textfile gespeichert.;
+#X text 56 687 trigger funktion: kein note-off;
+#X obj 196 51 osc2midi main /i/map/osc/to/midi ctl 11 0 1 0 50;
+#X obj 431 304 cnv 15 175 25 empty empty NOT_WORKING_YET!!! 20 12 0
+14 -258113 -66577 0;

+ 4 - 4
midi_bi_gui.pd

@@ -4,19 +4,19 @@
 #X obj 245 118 tgl 15 0 /\$1\$2/midi/in/print /\$1\$2/midi/in/print
 print 17 7 0 10 -262144 -1 -1 0 1;
 #X obj 216 118 tgl 15 0 /\$1\$2/midi/in/state /\$1\$2/midi/in/state
-r 17 7 0 10 -4034 -1 -1 1 1;
-#N canvas 830 22 371 260 init 0;
+r 17 7 0 10 -4034 -1 -1 0 1;
+#N canvas 638 22 487 255 init 1;
 #X obj 123 75 loadbang;
 #X obj 123 97 list prepend \$1\$2;
 #X msg 123 119 \; /\$1/midi/in/print 0 \; /\$1/midi/out/print 0 \;
-/\$1/midi/in/state 1: /\$1/midi/out/state 1 \;;
+/\$1/midi/in/state 1 \; /\$1/midi/out/state 1 \;;
 #X connect 0 0 1 0;
 #X connect 1 0 2 0;
 #X restore 400 84 pd init;
 #X text 196 283 (c)2012 Marian Weger;
 #X text 46 31 midi_bi_gui <domain> <name>;
 #X obj 216 138 tgl 15 0 /\$1\$2/midi/out/state /\$1\$2/midi/out/state
-s 17 7 0 10 -4034 -1 -1 1 1;
+s 17 7 0 10 -4034 -1 -1 0 1;
 #X obj 245 138 tgl 15 0 /\$1\$2/midi/out/print /\$1\$2/midi/out/print
 print 17 7 0 10 -262144 -1 -1 0 1;
 #X obj 265 174 nbx 5 14 -1e+37 1e+37 0 0 /\$1\$2/midi/channel /\$1\$2/midi/channel

+ 96 - 0
osc2midi-help.pd

@@ -0,0 +1,96 @@
+#N canvas 259 22 931 684 10;
+#X text 23 14 osc2midi <domain> <osc-name> <midi-type> <cc#/note#/prg#/...>
+<ch#> <scaling> <offset> <interpol.time>;
+#X obj 20 102 cnv 15 225 230 empty empty MIDI_Input 20 12 0 14 -204786
+-66577 0;
+#X obj 250 102 cnv 15 225 230 empty empty MIDI_Output 20 12 0 14 -204786
+-66577 0;
+#X text 113 137 (logic);
+#X text 72 180 (Graphical User Interface);
+#X text 348 157 (logic);
+#X text 307 200 (Graphical User Interface);
+#X obj 480 102 cnv 15 415 230 empty empty MIDI_Message_Generator 20
+12 0 14 -204786 -66577 0;
+#X text 573 133 (logic);
+#X text 726 157 (Graphical User Interface);
+#X text 403 32 (c)2012 Marian Weger;
+#X text 540 583 All parameters are registered for state-saving with
+the corresponding storage-domain. See [ds-help] for more information
+on this topic.;
+#X text 540 533 For more information on how to register variables to
+OSC \, see [osc-help].;
+#X text 540 443 [osc2midi] connects a variable \, that is already registered
+for OSC control to a given MIDI-message. The message is connected uni-
+or bidirectional \, according to the OSC settings.;
+#X obj 20 342 cnv 15 435 60 empty empty 1st:_register_variable_for_OSC
+20 12 0 14 -262130 -66577 0;
+#X obj 42 374 osc_bi \$0 /i/map/osc/to/midi;
+#X obj 30 199 midi_in_gui \$0;
+#X obj 30 137 midi_in \$0;
+#X obj 260 157 midi_out \$0;
+#X obj 260 219 midi_out_gui \$0;
+#X obj 488 134 midi_gen \$0;
+#X obj 488 176 midi_gen_gui \$0;
+#X obj 20 410 cnv 15 500 250 empty empty 2nd:_connect_OSC_to_MIDI 20
+12 0 14 -261234 -66577 0;
+#X text 99 525 |;
+#X text 99 545 |;
+#X text 99 555 |;
+#X text 129 545 |;
+#X text 129 555 |;
+#X text 99 535 |;
+#X text 129 535 osc-name;
+#X text 230 455 |;
+#X text 230 475 |;
+#X text 230 485 |;
+#X text 253 475 |;
+#X text 253 485 |;
+#X text 230 465 |;
+#X text 230 495 |;
+#X text 230 505 |;
+#X text 253 495 |;
+#X text 253 505 |;
+#X text 230 515 |;
+#X text 230 525 |;
+#X text 253 515 |;
+#X text 253 525 |;
+#X text 230 445 midi-control-type (ctl \, note \, bend \, etc.);
+#X text 253 465 midi cc#/prg#/note#/etc.;
+#X text 268 495 |;
+#X text 268 505 |;
+#X text 268 515 |;
+#X text 268 525 |;
+#X text 268 485 midi channel;
+#X text 282 515 |;
+#X text 282 525 |;
+#X text 230 535 |;
+#X text 230 545 |;
+#X text 253 535 |;
+#X text 253 545 |;
+#X text 268 535 |;
+#X text 268 545 |;
+#X text 282 535 |;
+#X text 282 545 |;
+#X text 293 535 |;
+#X text 293 545 |;
+#X text 282 505 value scaling;
+#X text 293 525 value offset;
+#X text 230 555 |;
+#X text 253 555 |;
+#X text 268 555 |;
+#X text 282 555 |;
+#X text 293 555 |;
+#X text 308 555 |;
+#X text 308 545 interpolation time;
+#X text 38 612 inlet 1: midi-out on(1)/off(0);
+#X text 38 632 inlet 2: midi-in on(1)/off(0);
+#X obj 40 575 osc2midi \$0 /i/map/osc/to/midi ctl 11 0 1 0 50;
+#X obj 460 342 cnv 15 435 60 empty empty Variable 20 12 0 14 -228856
+-66577 0;
+#X obj 605 373 hsl 128 15 0 127 0 0 /i/map/osc/to/midi /i/map/osc/to/midi
+/i/map/osc/to/midi -2 -8 0 10 -262144 -1 -1 0 1;
+#X obj 742 374 nbx 5 14 -1e+37 1e+37 0 0 /i/map/osc/to/midi /i/map/osc/to/midi
+/i/map/osc/to/midi 0 -8 0 10 -262144 -1 -1 0 256;
+#X obj 20 72 cnv 15 875 25 empty empty General_MIDI_Modules 20 12 0
+14 -204786 -66577 0;
+#X text 99 515 domain;

+ 261 - 0
osc2midi.pd

@@ -0,0 +1,261 @@
+#N canvas 19 22 699 473 10;
+#X obj 277 207 spigot 1;
+#X obj 277 307 route ctl;
+#X msg 277 329 \$3 \$2 \$1;
+#X obj 277 160 r /\$1/midi/in;
+#X obj 277 376 route 0;
+#X obj 316 353 r /\$1\$2/midi/channel;
+#N canvas 7 291 585 428 init 0;
+#X obj 66 37 loadbang;
+#X obj 213 35 loadbang;
+#X obj 213 129 s /\$1\$2/midi/scaling;
+#X msg 213 101 1;
+#X obj 60 173 loadbang;
+#X obj 218 175 loadbang;
+#X obj 60 217 s /\$1\$2/midi/value2;
+#X obj 218 219 s /\$1\$2/midi/channel;
+#X obj 213 57 f \$6;
+#X obj 60 195 f \$4;
+#X obj 218 197 f \$5;
+#X obj 58 265 loadbang;
+#X obj 58 287 f \$7;
+#X obj 58 309 s /\$1\$2/midi/offset;
+#X obj 218 265 loadbang;
+#X obj 218 287 f \$8;
+#X obj 218 309 s /\$1\$2/midi/line/time;
+#X obj 368 265 loadbang;
+#X obj 368 287 f \$9;
+#X obj 368 355 s /\$1\$2/midi/line/grain;
+#X obj 368 309 sel 0;
+#X msg 368 331 20;
+#X obj 213 79 sel 0;
+#X obj 66 59 symbol \$3;
+#X obj 66 81 sel 0;
+#X obj 66 125 s /\$1\$2/midi/type;
+#X msg 66 103 symbol ctl;
+#X obj 392 77 loadbang;
+#X obj 392 99 list prepend \$1\$2;
+#X msg 392 121 \; /\$1/midi/in/print 0 \; /\$1/midi/out/print 0 \;
+/\$1/midi/in/state 1 \; /\$1/midi/out/state 1 \;;
+#X connect 0 0 23 0;
+#X connect 1 0 8 0;
+#X connect 3 0 2 0;
+#X connect 4 0 9 0;
+#X connect 5 0 10 0;
+#X connect 8 0 22 0;
+#X connect 9 0 6 0;
+#X connect 10 0 7 0;
+#X connect 11 0 12 0;
+#X connect 12 0 13 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 17 0 18 0;
+#X connect 18 0 20 0;
+#X connect 20 0 21 0;
+#X connect 20 1 19 0;
+#X connect 21 0 19 0;
+#X connect 22 0 3 0;
+#X connect 22 1 2 0;
+#X connect 23 0 24 0;
+#X connect 24 0 26 0;
+#X connect 24 1 25 0;
+#X connect 26 0 25 0;
+#X connect 27 0 28 0;
+#X connect 28 0 29 0;
+#X restore 535 28 pd init;
+#X obj 316 715 line 0 20;
+#X obj 367 680 r /\$1\$2/midi/line/grain;
+#X obj 361 599 r /\$1\$2/midi/line/time;
+#X obj 277 630 kdemux2;
+#X obj 277 425 route 0;
+#X obj 316 403 r /\$1\$2/midi/value2;
+#X obj 292 501 r /\$1\$2/midi/scaling;
+#X obj 292 555 r /\$1\$2/midi/offset;
+#X obj 277 578 + 0;
+#X text 391 699 (only Pd version >= 0.43);
+#X obj 316 657 pack f 0;
+#X obj 37 272 spigot 1;
+#X obj 37 878 s \$1/midi/out;
+#X obj 37 685 list prepend ctl;
+#X obj 37 644 + 0.5;
+#X obj 37 664 int;
+#X obj 52 496 r /\$1\$2/midi/scaling;
+#X obj 112 715 r /\$1\$2/midi/value2;
+#X obj 37 737 list append 0;
+#X obj 112 766 r /\$1\$2/midi/channel;
+#X obj 37 789 list append 0;
+#X obj 52 445 r /\$1\$2/midi/offset;
+#X obj 37 468 - 0;
+#X obj 277 526 * 1;
+#X obj 277 477 / 127;
+#X obj 37 520 / 1;
+#X obj 37 572 * 127;
+#X obj 322 183 r /\$1\$2/midi/in/state;
+#X obj 82 244 r /\$1\$2/midi/out/state;
+#X obj 316 806 spigot;
+#X obj 349 784 r /\$1\$2/midi/in/print;
+#X obj 52 387 spigot;
+#X obj 37 88 inlet out-state;
+#X obj 277 88 inlet in-state;
+#X obj 37 110 s /\$1\$2/midi/out/state;
+#X obj 277 110 s /\$1\$2/midi/in/state;
+#X obj 85 365 r /\$1\$2/midi/out/print;
+#X obj 328 255 list prepend symbol;
+#X obj 328 277 list trim;
+#X obj 130 623 list prepend symbol;
+#X obj 130 645 list trim;
+#N canvas 821 254 450 300 register 1;
+#X obj 62 55 ds_reg_settings \$1 \$2/midi/offset;
+#X obj 62 75 ds_reg_settings \$1 \$2/midi/scaling;
+#X obj 62 95 ds_reg_settings \$1 \$2/midi/value2;
+#X obj 62 115 ds_reg_settings \$1 \$2/midi/channel;
+#X obj 62 135 ds_reg_settings \$1 \$2/midi/line/time;
+#X obj 62 155 ds_reg_settings \$1 \$2/midi/line/grain;
+#X obj 62 245 ds_reg \$1 \$2/midi/type;
+#X text 75 264 (ds_reg_settings does currently not allow symbols);
+#X obj 62 175 ds_reg_settings \$1 \$2/midi/in/state;
+#X obj 62 195 ds_reg_settings \$1 \$2/midi/out/state;
+#X restore 535 48 pd register;
+#X obj 130 601 r /\$1\$2/midi/type;
+#X obj 328 233 r /\$1\$2/midi/type;
+#X obj 37 332 route float;
+#X obj 37 160 r \$1/osc/out;
+#X obj 37 294 route \$2;
+#X text 536 825 (c)2012 \, Marian Weger;
+#X obj 277 856 list prepend \$2;
+#X obj 277 878 s /\$1/osc/in;
+#X obj 52 409 print \$2 MIDI OUT;
+#X obj 316 828 print \$2 MIDI IN;
+#X obj 277 752 t a;
+#X text 23 14 osc2midi <domain> <osc-name> <midi-type> <cc#/note#/prg#/...>
+<ch#> <scaling> <offset> <interpol.time>;
+#N canvas 0 22 450 300 type2number 0;
+#X msg 80 117 0;
+#X msg 118 117 1;
+#X msg 157 117 2;
+#X msg 195 117 3;
+#X msg 234 117 4;
+#X msg 272 117 5;
+#X obj 80 71 r /\$1\$2/midi/type;
+#X obj 80 199 list trim;
+#X obj 80 177 list prepend set;
+#X obj 80 95 route ctl note bend pgm touch polytouch;
+#X obj 80 224 s /\$1\$2/midi/type/number/set;
+#X connect 0 0 8 0;
+#X connect 1 0 8 0;
+#X connect 2 0 8 0;
+#X connect 3 0 8 0;
+#X connect 4 0 8 0;
+#X connect 5 0 8 0;
+#X connect 6 0 9 0;
+#X connect 7 0 10 0;
+#X connect 8 0 7 0;
+#X connect 9 0 0 0;
+#X connect 9 1 1 0;
+#X connect 9 2 2 0;
+#X connect 9 3 3 0;
+#X connect 9 4 4 0;
+#X connect 9 5 5 0;
+#X restore 535 68 pd type2number;
+#N canvas 0 22 450 300 number2type 0;
+#X msg 57 147 ctl;
+#X msg 87 147 note;
+#X msg 125 147 bend;
+#X msg 165 147 pgm;
+#X msg 195 147 touch;
+#X obj 57 62 change;
+#X obj 57 40 r /\$1\$2/midi/type/number;
+#X obj 57 85 sel 0 1 2 3 4 5;
+#X obj 57 269 s /\$1\$2/midi/type;
+#X obj 57 241 list trim;
+#X obj 57 219 list prepend symbol;
+#X msg 236 147 polytouch;
+#X connect 0 0 10 0;
+#X connect 1 0 10 0;
+#X connect 2 0 10 0;
+#X connect 3 0 10 0;
+#X connect 4 0 10 0;
+#X connect 5 0 7 0;
+#X connect 6 0 5 0;
+#X connect 7 0 0 0;
+#X connect 7 1 1 0;
+#X connect 7 2 2 0;
+#X connect 7 3 3 0;
+#X connect 7 4 4 0;
+#X connect 7 5 11 0;
+#X connect 9 0 8 0;
+#X connect 10 0 9 0;
+#X connect 11 0 10 0;
+#X restore 535 88 pd number2type;
+#X obj 535 124 r /\$1\$2/midi/type;
+#X obj 535 146 sel bend;
+#X obj 535 168 t b;
+#X msg 535 190 16383;
+#X obj 580 168 t b;
+#X msg 580 190 127;
+#X obj 535 222 s \$0-midi-scaling;
+#X obj 304 453 r \$0-midi-scaling;
+#X obj 64 547 r \$0-midi-scaling;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X connect 2 0 4 0;
+#X connect 3 0 0 0;
+#X connect 4 0 11 0;
+#X connect 5 0 4 1;
+#X connect 7 0 59 0;
+#X connect 8 0 7 2;
+#X connect 9 0 10 1;
+#X connect 9 0 17 1;
+#X connect 10 0 59 0;
+#X connect 10 1 17 0;
+#X connect 11 0 31 0;
+#X connect 12 0 11 1;
+#X connect 13 0 30 1;
+#X connect 14 0 15 1;
+#X connect 15 0 10 0;
+#X connect 17 0 7 0;
+#X connect 18 0 53 0;
+#X connect 20 0 25 0;
+#X connect 21 0 22 0;
+#X connect 22 0 20 0;
+#X connect 23 0 32 1;
+#X connect 24 0 25 1;
+#X connect 25 0 27 0;
+#X connect 26 0 27 1;
+#X connect 27 0 19 0;
+#X connect 28 0 29 1;
+#X connect 29 0 32 0;
+#X connect 30 0 15 0;
+#X connect 31 0 30 0;
+#X connect 32 0 33 0;
+#X connect 33 0 21 0;
+#X connect 34 0 0 1;
+#X connect 35 0 18 1;
+#X connect 36 0 58 0;
+#X connect 37 0 36 1;
+#X connect 38 0 57 0;
+#X connect 39 0 41 0;
+#X connect 40 0 42 0;
+#X connect 43 0 38 1;
+#X connect 44 0 45 0;
+#X connect 45 0 1 1;
+#X connect 46 0 47 0;
+#X connect 47 0 20 1;
+#X connect 49 0 46 0;
+#X connect 50 0 44 0;
+#X connect 51 0 38 0;
+#X connect 51 0 29 0;
+#X connect 52 0 18 0;
+#X connect 53 0 51 0;
+#X connect 55 0 56 0;
+#X connect 59 0 55 0;
+#X connect 59 0 36 0;
+#X connect 63 0 64 0;
+#X connect 64 0 65 0;
+#X connect 64 1 67 0;
+#X connect 65 0 66 0;
+#X connect 66 0 69 0;
+#X connect 67 0 68 0;
+#X connect 68 0 69 0;
+#X connect 70 0 31 1;
+#X connect 71 0 33 1;