2019-08-28 22:42:57 +02:00
|
|
|
/*
|
2019-08-28 22:39:06 +02:00
|
|
|
-----------------------------------------
|
|
|
|
reception des XY
|
|
|
|
*/
|
|
|
|
|
2023-01-13 15:36:31 +01:00
|
|
|
7777 => int InPort;
|
|
|
|
15.55 => float divisor;
|
|
|
|
SqrOsc sl => dac.left;
|
2019-08-28 22:39:06 +02:00
|
|
|
SawOsc sr => dac.right;
|
2023-01-13 15:36:31 +01:00
|
|
|
0.0 => sl.gain => sr.gain;
|
2019-08-28 22:39:06 +02:00
|
|
|
|
|
|
|
OscIn oscin;
|
|
|
|
OscMsg msg;
|
|
|
|
InPort => oscin.port;
|
|
|
|
oscin.addAddress( "/joystick/xy, ii" );
|
|
|
|
|
|
|
|
int x, y;
|
|
|
|
55 => int base;
|
|
|
|
|
2021-07-23 14:13:56 +02:00
|
|
|
0.5 => sl.gain => sr.gain;
|
|
|
|
|
2019-08-28 22:39:06 +02:00
|
|
|
<<< "listening on port", InPort >>>;
|
|
|
|
|
|
|
|
while( true ) {
|
|
|
|
oscin => now;
|
|
|
|
while ( oscin.recv(msg) ) {
|
|
|
|
msg.getInt(0) => x;
|
|
|
|
msg.getInt(1) => y;
|
2021-07-23 14:13:56 +02:00
|
|
|
<<< "got (via ", InPort,") ", x, y >>>;
|
2023-01-13 15:36:31 +01:00
|
|
|
x/12.0 => sl.freq;
|
|
|
|
y/12.0 => sr.freq;
|
2019-08-28 22:39:06 +02:00
|
|
|
}
|
2021-07-23 14:13:56 +02:00
|
|
|
|
2019-08-28 22:39:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/* made in doubledragon2 by tTh */
|
|
|
|
|
2021-07-23 14:13:56 +02:00
|
|
|
/* --------------------------------------------------------
|
|
|
|
conversion coordonnées vers frequence */
|
|
|
|
|
|
|
|
|
|
|
|
|