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.

42 lines
706 B

2 years ago
4 months ago
4 months ago
4 months ago
4 months ago
  1. /*
  2. -----------------------------------------
  3. reception des XY
  4. */
  5. 7777 => int InPort;
  6. SqrOsc sl => dac.left;
  7. SawOsc sr => dac.right;
  8. 0.0 => sl.gain => sr.gain;
  9. OscIn oscin;
  10. OscMsg msg;
  11. InPort => oscin.port;
  12. oscin.addAddress( "/joystick/xy, ii" );
  13. int x, y;
  14. 55 => int base;
  15. 0.5 => sl.gain => sr.gain;
  16. <<< "listening on port", InPort >>>;
  17. while( true ) {
  18. oscin => now;
  19. while ( oscin.recv(msg) ) {
  20. msg.getInt(0) => x;
  21. msg.getInt(1) => y;
  22. <<< "got (via ", InPort,") ", x, y >>>;
  23. x => sl.freq;
  24. y => sr.freq;
  25. }
  26. }
  27. /* made in doubledragon2 by tTh */
  28. /* --------------------------------------------------------
  29. conversion coordonnées vers frequence */