Browse Source

moving forward with drawSpectrum. i have no life

master
Nova deViator 6 years ago
parent
commit
ffff4ad562
3 changed files with 14 additions and 5 deletions
  1. +9
    -1
      pde/IF3Si/IF3Si.pde
  2. +3
    -2
      pde/IF3Si/osc.pde
  3. +2
    -2
      scd/midiosc.scd

+ 9
- 1
pde/IF3Si/IF3Si.pde View File

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


+ 3
- 2
pde/IF3Si/osc.pde View File

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


+ 2
- 2
scd/midiosc.scd View File

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

Loading…
Cancel
Save