diff --git a/pde/IF3Si/IF3Si.pde b/pde/IF3Si/IF3Si.pde index 270b300..72bb34e 100644 --- a/pde/IF3Si/IF3Si.pde +++ b/pde/IF3Si/IF3Si.pde @@ -52,7 +52,7 @@ float[] multXZ; PGraphics sphere; - +int tilesOverlap; 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() { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // clean screen ````````````````````````````````````````````````````| @@ -197,7 +222,7 @@ void draw() { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0, // texture number/id 10, // texture speed X 1, // texture speed Y - 64 // overlap. 127 = 300% + tilesOverlap // overlap. 127 = 300% ); diff --git a/rnx/IF3Si.xrns b/rnx/IF3Si.xrns index 52d495f..c6a7151 100644 Binary files a/rnx/IF3Si.xrns and b/rnx/IF3Si.xrns differ diff --git a/scd/IF3Si.scd b/scd/IF3Si.scd index 3048c4d..f441e28 100644 --- a/scd/IF3Si.scd +++ b/scd/IF3Si.scd @@ -34,6 +34,57 @@ postln("\n\n 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? var dir = PathName(thisProcess.nowExecutingPath).pathOnly; diff --git a/scd/snd_lines.scd b/scd/snd_lines.scd index 98969eb..f95c2e3 100644 --- a/scd/snd_lines.scd +++ b/scd/snd_lines.scd @@ -259,9 +259,11 @@ post(" "); ~mainTimeline = Routine({ + arg layer = 0; + var delta, playhead, frequency, amp, step=0, - nextdelta, nextplayhead, nextfrequency, nextamp, - frequency_alt, nextfrequency_alt, siLines; + nextdelta, nextplayhead, nextfrequency, nextamp, + frequency_alt, nextfrequency_alt, siLines; siLines = ~siLinesData; postln(siLines); @@ -270,12 +272,11 @@ post(" "); while { step < siLines.size; + layer == siLines[step] } { // exposition - //frequency = siLines[step][0].asFloat.linexp(3900, 7200, 16000, 40); frequency = siLines[step][4].asFloat; - // frequency_alt = siLines[step][0].asFloat.linexp(3900, 7200, 40, 16000); frequency_alt = siLines[step][5].asFloat; playhead = siLines[step][0].asFloat; nextfrequency = siLines[step+1][4].asFloat; @@ -293,7 +294,7 @@ post(" "); post("| "); post((playhead/60).round(1).asString.padLeft(2)); post(":"); - post((playhead%60).round(1).asString.padLeft(2); + post((playhead%60).round(1).asString.padLeft(2)); post(" | "); // post(siLines[step][2]); // post( "nm | " );