banging my head between two programming languages

master
Nova deViator 2015-09-10 23:23:22 +02:00
parent 434fbf9af3
commit 5357893485
1 changed files with 38 additions and 8 deletions

View File

@ -64,7 +64,10 @@ PFont fpsFont;
// testPattern
boolean testPatternToggle = false;
// siLines
String[] siLinesData;
///////////////////////////////////////////////////////////////////////////////
void setup() { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
float sizefactor = 1; // define the size of the screen, 1 = 1080p
@ -76,14 +79,15 @@ void setup() { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
frameRate(60);
smooth(32); // 32??
noCursor();
background(10);
background(0);
println("\n\n~~~ Hello. Starting Interface Fractures III - SILICON." +
" - - - - - - - - - - - - - - - - - - - - - -\n");
// start oscP5, listening for incoming messages at port 12000
// open sound control
oscP5 = new OscP5(this,12000); // listening at port 12000
println("~~~ starting oscP5 ...");
oscP5 = new OscP5(this,12000);
oscP5.plug(this,"ctlin","/ctlin"); // osc from Renoise/Midi (via SC) -> function 'ctlin'
oscP5.plug(this,"scosc","/sc"); // osc from SuperCollider -> function 'scosc'
@ -91,6 +95,27 @@ void setup() { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
println("\n\n~~~ loading textures into image pool ...\n");
imgPool = getImages("/images/");
siLinesData = loadStrings(dataPath(sketchPath + "/silicon_lines.txt"));
printArray(siLinesData);
for (String lineData : siLinesData ) {
String[] datatemp = split(lineData, " ");
String data_x[];
for (String item : datatemp) {
for (int i = 0; i < datatemp.length && item != ""; i++) {
//if (item != "") {
data_x[i] = item; }
//}
//data-x.add
}
//datatemp = sort(datatemp);
//datatemp = reverse(datatemp);
printArray(datatemp);
printArray(data_x);
}
// create an array of random value between -50 and 50
for (int i=0; i < 500; i++) { rands[i] = i-250; }
shuffle(rands);
@ -129,15 +154,19 @@ void setup() { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// fps
fpsFont = createFont("Ubuntu Mono", 16);
// siLines
}
//////////////////////////////////////////////////////////////////////////////
void draw() { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// clean screen ````````````````````````````````````````````````````|
blendMode(BLEND);
screenClean(color(50));
screenClean(color(0));
@ -147,7 +176,6 @@ void draw() { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// SCENENGINES / / / / / / / / / / / / / / / / / / / / / / / / / / |
// draw spheress```````````````````````````````````````````````````|
drawSpheres(boolean(0)
);
@ -198,8 +226,10 @@ void draw() { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// frames per second
displayFps(true);
// document
autoSnap(false);
} // --------------------------------------------------------------------------