moving forward with drawSpectrum. i have no life

master
Nova deViator 2015-09-11 20:22:39 +02:00
parent 0893176c02
commit ffff4ad562
3 changed files with 14 additions and 5 deletions

View File

@ -57,6 +57,7 @@ float[] multXZ;
PGraphics sphere; PGraphics sphere;
// tiles
int tilesOverlap; int tilesOverlap;
// testPicture // testPicture
@ -74,6 +75,9 @@ PFont fpsFont;
// siLines // siLines
ArrayList<FloatList> siLinesData; ArrayList<FloatList> siLinesData;
// drawSpectrum
float drawSpectrumAFactor;
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
void setup() { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void setup() { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -183,7 +187,11 @@ void draw() { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// drawSpectrum // drawSpectrum
drawSpectrum(boolean(1), drawSpectrum(boolean(1),
siLinesData); siLinesData, // ArrayList<FloatList> 2D data
0, // threshold
drawSpectrumAFactor, // alpha factor (58 = 1)
127 // line height
);
// draw spheress```````````````````````````````````````````````````| // draw spheress```````````````````````````````````````````````````|

View File

@ -15,10 +15,11 @@ void ctlin(int cc, int val) {
// midi control values, from Renoise (via SC) // midi control values, from Renoise (via SC)
// debug // debug
println("### OSC: /ctlin cc:" + cc + " value:" + val); // println("### OSC: /ctlin cc:" + cc + " value:" + val);
// patchbay // patchbay
if (cc == 2) { tilesOverlap = val; } if (cc == 2) { tilesOverlap = val; }
if (cc == 10) { drawSpectrumAFactor = val; }
// example: // example:
// if (cc == 2) { flySpeedXfactor = (val - 64); } // if (cc == 2) { flySpeedXfactor = (val - 64); }
@ -33,7 +34,7 @@ void scosc(String mount, int val) {
// stuff coming directly from SuperCollider // stuff coming directly from SuperCollider
// debug // debug
println("### OSC: /sc mount:" + mount + " value:" + val); // println("### OSC: /sc mount:" + mount + " value:" + val);
// patchbay // patchbay
if (mount.equals("testPatternToggle")) { testPatternToggle = boolean(val); } if (mount.equals("testPatternToggle")) { testPatternToggle = boolean(val); }

View File

@ -14,7 +14,7 @@ MIDIIn.connect("Renoise MIDI Output", "SuperCollider: in0");
midiFunc = MIDIFunc.cc({ midiFunc = MIDIFunc.cc({
arg val1, val2; arg val1, val2;
postln(">>> sending: /ctlin " + val2 + " " + val1); //postln(">>> sending: /ctlin " + val2 + " " + val1);
// we need to send /ctlin CCnum CCvalue // we need to send /ctlin CCnum CCvalue
~zarquOsc.sendMsg("/ctlin", val2, val1); ~zarquOsc.sendMsg("/ctlin", val2, val1);
@ -23,4 +23,4 @@ midiFunc = MIDIFunc.cc({
}, (0..127)); // match all cc (from 1..127) }, (0..127)); // match all cc (from 1..127)
// testing testing // testing testing
~zarquOsc.sendMsg("/sc", "testingmount", 10); //~zarquOsc.sendMsg("/sc", "testingmount", 10);