Logiciels divers autour du protocole « Open Sound Control » aka OSC
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
497 B

4 months ago
4 months ago
  1. /*
  2. * recevoir des notes on/off par le MIDI
  3. * et envoyer des boutons de joy par OSC
  4. *
  5. * nouveau Rural Art System 2021 - TerreBlanque
  6. */
  7. MidiIn input;
  8. MidiMsg msg;
  9. 1 => int port; // please explain
  10. if (!input.open(port)) {
  11. <<< "erreur open" >>>;
  12. me.exit();
  13. }
  14. // print out device that was opened
  15. <<< "MIDI device:", input.num(), " -> ", input.name() >>>;
  16. // infinite loop
  17. while (1) {
  18. input => now;
  19. while ( input.recv(msg) ) {
  20. <<< msg.data1, msg.data2, msg.data3 >>>;
  21. }
  22. }