-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathosccontrols.pde
55 lines (40 loc) · 1.71 KB
/
osccontrols.pde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
void oscEvent(OscMessage theOscMessage) {
/* print the address pattern and the typetag of the received OscMessage */
/* print("### received an osc message.");}
print(" addrpattern: "+theOscMessage.addrPattern());
println(" typetag: "+theOscMessage.typetag());*/
int res = parseInt(theOscMessage.addrPattern().substring(7,theOscMessage.addrPattern().length())) ;
print(" addrpattern: "+theOscMessage.addrPattern());
if (displaymode == 4){
println("res :",res);
//println("String lenght : ",theOscMessage.addrPattern().length());
// println("I : ",I);
// println("D : ",D);
int L=0;
for (int i = 0 ; i<=7; i++){
for (int k = 0 ; k<=7; k++) {
if (L == res){
println("CAMBIO : ",L);
showdisplay4[k][i] = !showdisplay4[k][i];
}
L++;
println("showdisplay4[",i,"][",k,"] : ",showdisplay4[k][i]);
println("L : ",L);
}
println("");
}
println(theOscMessage.addrPattern());
// println(theOscMessage.addrPattern().charAt(7));
}
if (displaymode == 5){
//int res = parseInt(theOscMessage.addrPattern().substring(7,theOscMessage.addrPattern().length())) ;
println(" addrpattern: "+theOscMessage.addrPattern());
println("Variable X:",theOscMessage.get(1).floatValue());
println("Variable Y:",theOscMessage.get(0).floatValue());
float xpos = theOscMessage.get(1).floatValue();
float ypos = theOscMessage.get(0).floatValue();
xpos = map(xpos,0,1,0,width);
ypos = map(ypos,1,0,0,height);
display5[res].setPos(xpos,ypos);
}
}