Oh, that naughty sketch! Please let us know what the issue is below.
Apply Template
Applying this template will reset your sketch and remove all your changes. Are you sure you would like to continue?
Report Sketch
Report Comment
Please confirm that you would like to report the comment below.
We will review your submission and take any actions necessary per our Community Guidelines. In addition to reporting this comment, you can also block the user to prevent any future interactions.
Please report comments only when necessary. Unnecessary or abusive use of this tool may result in your own account being suspended.
Are you sure you want to delete your sketch?
Any files uploaded will be deleted as well.
Delete Comment?
This will also delete all the replies to this comment.
Delete this tab? Any code in it will be deleted as well.
Select a collection to submit your sketch
We Need Your Support
Since 2008, OpenProcessing has provided tools for creative coders to learn, create, and share over a million open source projects in a friendly environment.
Niche websites like ours need your continued support for future development and maintenance, while keeping it an ad-free platform that respects your data and privacy!
Please consider subscribing below to show your support with a "Plus" badge on your profile and get access to many other features!
CC Attribution ShareAlike
Oscilaciones marginales, visualidad calma
Serrano Acevedo
xxxxxxxxxx
import oscP5.*;
import netP5.*;
int duracionTotalSegundos = 12;
float g=0;
int ultimoSegundo = 0;
int s = 0;
int reloj = 0;
float a = 0;
int menosUno = -1;
float sumaUno = 0.1;
int indice = 0;
boolean peaje = false;
boolean sensor = false;
float xoff = 0;
float xoff2 = 0, xoff3 = 0;
float yoff = 0;
float yoff2 = 0, yoff3 = 0;
float x = 0;
float x2 = 0, x3 = 0;
float cxoff = 0;
float cyoff = 0;
float cx = 0;
float global;
OscP5 oscP5;
NetAddress myRemoteLocation;
void setup() {
size(465, 333);
frameRate(100);
oscP5 = new OscP5(this, 12001);
myRemoteLocation = new NetAddress("127.0.0.1", 12000);
}
void draw() {
background(15);
noStroke();
constructor(reloj);
sensor=false;
indice = 0;
fill(148, 223, 255, 120);
// We are going to draw a polygon out of the wave points
beginShape();
float xoff = 0.0;
// Iterate over horizontal pixels
for (float x = 0; x <= width; x += cx) {
float y = map(noise(xoff, yoff), 0, 1, 170, 270);
// Set the vertex
vertex(x, y);
// Increment x dimension for noise
xoff += cxoff;
}
// increment y dimension for noise
yoff += cyoff;
vertex(width, height);
vertex(0, height);
endShape(CLOSE);
//segunda onda
fill(59, 150, 255, 90);
// We are going to draw a polygon out of the wave points
beginShape();
float xoff2 = 0.03;
// Iterate over horizontal pixels
for (float x = 0; x <= width; x += cx) {
float y = map(noise(xoff2, yoff2), 0, 1, 170, 270);
// Set the vertex
vertex(x, y);
// Increment x dimension for noise
xoff2 += cxoff-0.003;
}
// increment y dimension for noise
yoff2 += cyoff-0.003;
vertex(width, height);
vertex(0, height);
endShape(CLOSE);
//tercera onda
fill(30, 170, 255, 50);
// We are going to draw a polygon out of the wave points
beginShape();
float xoff3 = 0.03;
// Iterate over horizontal pixels
for (float x = 0; x <= width; x += cx) {
float y = map(noise(xoff3, yoff3), 0, 1, 165, 265);
// Set the vertex
vertex(x, y);
// Increment x dimension for noise
xoff3 += cxoff-0.001;
}
// increment y dimension for noise
yoff3 += cyoff-0.001;
vertex(width, height);
vertex(0, height);
endShape(CLOSE);
// filter(BLUR, g);
//fill(0,a);
//rect(0, 0, width, height);
println("fade "+a+" segundo "+reloj+" xoff "+cxoff+" yoff "+cyoff+" x "+cx+" global "+global);
}
void constructor(int indice) {
switch(indice) {
case 0:
cxoff = 0.0300;
cyoff =0.00500;
cx = 10.000;
break;
case 20:
cxoff = cxoff+0.0001;
cyoff = cyoff+0.0001;
cx = cx-0.001;
break;
case 31:
cxoff = cxoff+0.0001;
cyoff = cyoff+0.0001;
cx = cx-0.0001;
break;
case 41:
cxoff = cxoff+0.0001;
cyoff = cyoff+0.0001;
cx = cx-0.0008;
break;
case 45:
//cxoff = cxoff+0.0001;
cyoff = cyoff+0.0003;
//cx = cx-0.0008;
break;
case 47:
cxoff = cxoff+0.0001;
//cyoff = cyoff+0.0003;
//cx = cx-0.0008;
break;
case 51:
cxoff = cxoff+0.0005;
cyoff = cyoff+0.0005;
cx = cx-0.00005;
break;
case 57:
cxoff = cxoff+0.001;
cyoff = cyoff+0.001;
//cx = cx-0.0003;
break;
case 59:
cxoff = cxoff+0.001;
cyoff = cyoff+0.001;
//cx = cx-0.0003;
break;
case 61:
cxoff = cxoff+0.001;
cyoff = cyoff+0.001;
cx = cx-0.0001;
break;
case 68:
cxoff = cxoff+0.003;
cyoff = cyoff+0.003;
//cx = cx-0.0005;
break;
}
}
void oscEvent(OscMessage theOscMessage) {
/* check if theOscMessage has the address pattern we are looking for. */
if (theOscMessage.checkAddrPattern("/gaussiano")==true) {
/* check if the typetag is the right one. */
/* parse theOscMessage and extract the values from the osc message arguments. */
int firstValue = theOscMessage.get(0).intValue();
g = firstValue;
}
if (theOscMessage.checkAddrPattern("/partitura")==true) {
/* check if the typetag is the right one. */
/* parse theOscMessage and extract the values from the osc message arguments. */
int secondValue = theOscMessage.get(0).intValue();
reloj = secondValue;
}
if (theOscMessage.checkAddrPattern("/fade")==true) {
/* check if the typetag is the right one. */
/* parse theOscMessage and extract the values from the osc message arguments. */
int thirdValue = theOscMessage.get(0).intValue();
a = thirdValue*0.1;
}
}
See More Shortcuts