connected RNS to SC to PROCESSING. nice.

master
Nova deViator 2015-09-10 17:29:45 +02:00
parent a58c9f83cb
commit 4eeb05392c
4 changed files with 84 additions and 7 deletions

View File

@ -52,7 +52,7 @@ float[] multXZ;
PGraphics sphere; PGraphics sphere;
int tilesOverlap;
void setup() { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void setup() { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -111,6 +111,31 @@ void setup() { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
} }
// process OSC messages
public void ctlin(int cc, int val) { // - - - - - - - - - - - - - - - - - - - - - - -
// debug
println("## OSC: /ctlin cc:" + cc + " value:" + val);
if (cc == 2) { tilesOverlap = val; }
/* // triggers are on controller number 0
if (cc == 0) {
}
if (cc == 2) { flySpeedXfactor = (val - 64); } // speed (&direction) on X axis [-1 - 1] FIXit!
if (cc == 3) { flySpeedYfactor = (val - 64); } // speed (&direction) on Y axis [-1 - 1] FIXit!
*/
}
void draw() { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void draw() { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// clean screen ````````````````````````````````````````````````````| // clean screen ````````````````````````````````````````````````````|
@ -197,7 +222,7 @@ void draw() { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0, // texture number/id 0, // texture number/id
10, // texture speed X 10, // texture speed X
1, // texture speed Y 1, // texture speed Y
64 // overlap. 127 = 300% tilesOverlap // overlap. 127 = 300%
); );

Binary file not shown.

View File

@ -34,6 +34,57 @@ postln("\n\n
Server.default.waitForBoot { Server.default.waitForBoot {
// midi init & stuff:
(
var p5osc;
var midiFunc;
//MIDIIn.connectAll;
p5osc = NetAddr.new("zarquon", 12000);
midiFunc = MIDIFunc.cc({
arg val1, val2;
postln("sending: /ctlin " + val2 + " " + val1);
// we need to send /ctlin CCnum CCvalue
p5osc.sendMsg("/ctlin", val2, val1);
}, (0..127)); // match all cc (from 1..127)
)
midiFunc.free; // cleanup
p5osc.disconnectAll
MIDIIn.findPort;
MIDIClient.init(1,0);
MIDIClient.sources;
MIDIIn.connect("Renoise MIDI Output", "out0");
// where are we? // where are we?
var dir = PathName(thisProcess.nowExecutingPath).pathOnly; var dir = PathName(thisProcess.nowExecutingPath).pathOnly;

View File

@ -259,6 +259,8 @@ post(" ");
~mainTimeline = Routine({ ~mainTimeline = Routine({
arg layer = 0;
var delta, playhead, frequency, amp, step=0, var delta, playhead, frequency, amp, step=0,
nextdelta, nextplayhead, nextfrequency, nextamp, nextdelta, nextplayhead, nextfrequency, nextamp,
frequency_alt, nextfrequency_alt, siLines; frequency_alt, nextfrequency_alt, siLines;
@ -270,12 +272,11 @@ post(" ");
while { while {
step < siLines.size; step < siLines.size;
layer == siLines[step]
} { } {
// exposition // exposition
//frequency = siLines[step][0].asFloat.linexp(3900, 7200, 16000, 40);
frequency = siLines[step][4].asFloat; frequency = siLines[step][4].asFloat;
// frequency_alt = siLines[step][0].asFloat.linexp(3900, 7200, 40, 16000);
frequency_alt = siLines[step][5].asFloat; frequency_alt = siLines[step][5].asFloat;
playhead = siLines[step][0].asFloat; playhead = siLines[step][0].asFloat;
nextfrequency = siLines[step+1][4].asFloat; nextfrequency = siLines[step+1][4].asFloat;
@ -293,7 +294,7 @@ post(" ");
post("| "); post("| ");
post((playhead/60).round(1).asString.padLeft(2)); post((playhead/60).round(1).asString.padLeft(2));
post(":"); post(":");
post((playhead%60).round(1).asString.padLeft(2); post((playhead%60).round(1).asString.padLeft(2));
post(" | "); post(" | ");
// post(siLines[step][2]); // post(siLines[step][2]);
// post( "nm | " ); // post( "nm | " );