diff --git a/pde/IF3Si/IF3Si.pde b/pde/IF3Si/IF3Si.pde index 0ad9225..fa9b4af 100644 --- a/pde/IF3Si/IF3Si.pde +++ b/pde/IF3Si/IF3Si.pde @@ -122,12 +122,12 @@ void setup() { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sphere = createGraphics(width, height, P3D); // for testPicture - String[] fontList = PFont.list(); - printArray(fontList); + //String[] fontList = PFont.list(); + //printArray(fontList); testFont = createFont("Oliver's Barney", 50); // fps - fpsFont = createFont("Ubuntu Mono", 12); + fpsFont = createFont("Ubuntu Mono", 16); } diff --git a/pde/IF3Si/functions.pde b/pde/IF3Si/functions.pde index 36ff523..794427f 100644 --- a/pde/IF3Si/functions.pde +++ b/pde/IF3Si/functions.pde @@ -506,22 +506,24 @@ void screenClean(color c) { // ----------------------------------------- void displayFps(boolean render) { // ----------------------------------- if (render){ // Display Fps - fill(0); noStroke(); rect(width-80, height-30, 80, 30, 4); - fill(200); + //fill(0); noStroke(); rect(width-80, 10, 80, 30, 4); + fill(255); textFont(fpsFont); - textSize(12); - text(int(frameRate)+"fps", width-40, height-10, 5);} + textSize(16); + text(int(frameRate)+"fps", width-60, 20, 5);} } void autoSnap(boolean render) { // ------------------------------------- - // auto-save snapshots - if (frameCount == 1000) { - saveFrame("../snapshots/" - + year() + nf(month(),2) - + nf(day(),2) - + nf(hour(),2) - + nf(minute(),2) - + nf(second(),2) - + "_.png"); + if (render) { + // auto-save snapshots + if (frameCount == 1000) { + saveFrame("../snapshots/" + + year() + nf(month(),2) + + nf(day(),2) + + nf(hour(),2) + + nf(minute(),2) + + nf(second(),2) + + "_.png"); + } } } diff --git a/pde/IF3Si/osc.pde b/pde/IF3Si/osc.pde new file mode 100644 index 0000000..500d0d7 --- /dev/null +++ b/pde/IF3Si/osc.pde @@ -0,0 +1,24 @@ +public void ctlin(int cc, int val) { // - - - - - - - - - - - - - - - - - - - - - - - + + // debug + println("### OSC: /ctlin cc:" + cc + " value:" + val); + + if (cc == 2) { tilesOverlap = val; } + + // if (cc == 2) { flySpeedXfactor = (val - 64); } // FIXit! + +} + + +public void scosc(String mount, int val) { // - - - - - - - - - - - - - - - - - - - - - - - + + // debug + println("### OSC: /sc /mount: " + mount + " value: " + val); + + if (mount.equals("testPatternToggle")) { testPatternToggle = boolean(val); } + if (mount.equals("testPictureToggle")) { testPictureToggle = boolean(val); } + + +} + + diff --git a/scd/midiosc.scd b/scd/midiosc.scd new file mode 100644 index 0000000..ede90b1 --- /dev/null +++ b/scd/midiosc.scd @@ -0,0 +1,26 @@ +//~p5osc = NetAddr.new("zarquon", 12000); +// midi init +//MIDIIn.connectAll; +//MIDIClient.init(1,1); +//MIDIClient.sources; + +// try to connect midi + + +var midiFunc; + +MIDIIn.connect("Renoise MIDI Output", "SuperCollider: in0"); + +midiFunc = MIDIFunc.cc({ + + arg val1, val2; + postln(">>> sending: /ctlin " + val2 + " " + val1); + + // we need to send /ctlin CCnum CCvalue + ~zarquOsc.sendMsg("/ctlin", val2, val1); + + +}, (0..127)); // match all cc (from 1..127) + +// testing testing +~zarquOsc.sendMsg("/sc", "testingmount", 10);