Compare commits

..

No commits in common. "7c91072873890bfc0f03d72308c52327117c4bd7" and "3301315367c95dc4d496cdde657f55d6a09435c1" have entirely different histories.

6 changed files with 8 additions and 82 deletions

View File

@ -1,9 +1,5 @@
# trucs en ChucK # trucs en ChucK
Attention, il faut parfois utiliser l'option `--silent`
pour lancer Chuck sans connexion audio.
## dessiner.ck ## dessiner.ck
## pouet.ck ## pouet.ck

View File

@ -1,42 +1,4 @@
/* #
* dessiner par OSC # dessiner par OSC avec le laser de Gaby
* (avec le laser de Gaby ?) #
*
* nouveau Rural Art System 2021 - TerreBlanque
*
*/
7777 => int OSCPort;
31000.0 => float Amplitude;
OscOut xmit;
float dx, dy;
xmit.dest("localhost", OSCPort);
clear_the_screen();
for (0 => int foo; foo<25800; foo++) {
<<< foo >>>;
Amplitude * Math.sin(foo * 0.30001) => dx;
Amplitude * Math.cos(foo * 0.50001) => dy;
xmit.start("/joystick/xy");
Std.ftoi(dx) => xmit.add;
Std.ftoi(dy) => xmit.add;
xmit.send();
0.02::second => now;
}
fun void clear_the_screen()
{
xmit.start("/joystick/b");
50 => xmit.add; 1 => xmit.add;
xmit.send();
xmit.start("/joystick/b");
50 => xmit.add; 0 => xmit.add;
xmit.send();
}

View File

@ -5,29 +5,6 @@
* nouveau Rural Art System 2021 - TerreBlanque * nouveau Rural Art System 2021 - TerreBlanque
*/ */
MidiIn input;
MidiMsg msg;
1 => int port; // please explain
if (!input.open(port)) {
<<< "erreur open" >>>;
me.exit();
}
// print out device that was opened
<<< "MIDI device:", input.num(), " -> ", input.name() >>>;
// infinite loop
while (1) {
input => now;
while ( input.recv(msg) ) {
<<< msg.data1, msg.data2, msg.data3 >>>;
}
}

View File

@ -33,7 +33,7 @@ while( true ) {
else { else {
1 => envl.keyOff => envr.keyOff; 1 => envl.keyOff => envr.keyOff;
} }
0.2::second => now; // 0.2::second => now;
} }
} }

View File

@ -11,14 +11,13 @@ SawOsc sr => dac.right;
OscIn oscin; OscIn oscin;
OscMsg msg; OscMsg msg;
InPort => oscin.port; InPort => oscin.port;
oscin.addAddress( "/joystick/xy, ii" ); oscin.addAddress( "/joystick/xy, ii" );
int x, y; int x, y;
55 => int base; 55 => int base;
0.5 => sl.gain => sr.gain;
<<< "listening on port", InPort >>>; <<< "listening on port", InPort >>>;
while( true ) { while( true ) {
@ -27,16 +26,8 @@ while( true ) {
msg.getInt(0) => x; msg.getInt(0) => x;
msg.getInt(1) => y; msg.getInt(1) => y;
<<< "got (via ", InPort,") ", x, y >>>; <<< "got (via ", InPort,") ", x, y >>>;
x => sl.freq;
y => sr.freq;
} }
} }
/* made in doubledragon2 by tTh */ /* made in doubledragon2 by tTh */
/* --------------------------------------------------------
conversion coordonnées vers frequence */