We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi,
Sorry but I've asked this before and it got buried, along with the fact that I clicked answer on a normal reaction asking for more info. I'm trying to receive the brightness, loudness, noisiness and beat in processing. Then I'd like to assign values between certain numbers to them. 0-700 for the screen size and 0-255 for noisiness etc. and 0 or 1 for the beat. For this i'm using the oscp5 library in processing for a maxmsp patch. So far I've been able to confirm I'm receiving the data using println.
here's a link to a picture of the patch: (Don't mind the comments, they're in Dutch, if you need a translation, just ask. Of course I'd be glad to translate for anyone willing to help.) http://i.imgur.com/U17DBI7.png
And this is the code I've currently got:
import oscP5.*;
import netP5.*;
float loudness;
float noisiness;
float brightness;
int beat;
OscP5 oscP5;
NetAddress myRemoteLocation;
void setup() {
size(700, 700);
oscP5 = new OscP5(this, 7400);
myRemoteLocation = new NetAddress("127.0.0.1", 7400);
oscP5.plug(this, "brightness", "/brightness");
oscP5.plug(this, "noisiness", "/noisiness");
oscP5.plug(this, "loudness", "/loudness");
oscP5.plug(this, "beat", "/beat");
}
void loudness(float loudnessValue) {
println("loudness:"+loudnessValue);
loudness = loudnessValue;
}
void brightness(float brightnessValue) {
println("brightness: "+brightnessValue);
brightness = brightnessValue;
}
void noisiness(float noisinessValue) {
println("noisiness: "+noisinessValue);
noisiness = noisinessValue;
}
void draw()
{
background(0);
fill(255);
ellipse(noisiness*100, brightness/100, 100, 100);
}
So, again: can anyone help me assign values between certain margins (0 - 700 for the screen size and 0 - 255 for colours) to brightness etc. and a 0 or 1 value for the beat. And then I'd like to use those values to make one or several shapes moving in real time to the music. But first I'd just like to receive usable values.
Thanks for helping in advance!
~Dread