Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
groundzero1
groundzero1's Profile
1
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Help pleeesz
[0 Replies]
17-Jan-2011 05:14 AM
Forum:
Contributed Library Questions
Hi folks
a complete newbie and in dire need of your help
i am trying to get this sketch working and getting stone walled
trying to resolve the value from osc ( /2/spdob) a fader in touch osc
import oscP5.*;
import netP5.*;
OscP5 oscP5;
float [] fader = new float [3];
String str = "a";
int num=0;
int z;
void setup() {
size(400,400);
frameRate(25);
/* start oscP5, listening for incoming messages at port 8000 */
oscP5 = new OscP5(this,8000);
}
void draw() {
background(0);
}
void oscEvent(OscMessage theOscMessage) {
str = theOscMessage.addrPattern();
if(str.equals("/2/spdob") == true) {
println("forward"); //
} else {
println("static");
}
String addr = theOscMessage.typetag();
if(addr.indexOf(str) !=-1){
String list[] = split(addr,'/');
int xfader = int(list[2].charAt(5) - 0x30);
if(theOscMessage.get(0).floatValue() !=0){
fader[xfader] = theOscMessage.get(0).floatValue();
}
}
z = (round(fader[2]));
println(z);
//println(fader[1]));
//println(" typetag: "+theOscMessage.typetag());
}
i seem to have made a complete hash of it
any help would be most welcome
The road is hard to navigate when your blind and lost your stick !
regards
richard
«Prev
Next »
Moderate user : groundzero1
Forum