help needed for open sound control messages
in
Programming Questions
•
2 months ago
hello,
This is a question about open sound control however it is not a matter of the library so I guess I am on the right area of the forum.
I am facing a problem with osc messages. I am trying to connect max/msp and processing.
The concept of the sketch is the following.
I am getting words and compare them . So I have two strings and when those two strings are equal I want to change a the colour of the word on processing (that works) but also want to send an osc message on max. However the messages are not being send all the time on max (only about half of the times)
This is inside my void_draw loop
I am using an int called f as a variable and I am sending the osc message.At the end of my sketch I am writing this
Any thoughts on that?Advices would be really appreciated
thanks in advance,
t
This is a question about open sound control however it is not a matter of the library so I guess I am on the right area of the forum.
I am facing a problem with osc messages. I am trying to connect max/msp and processing.
The concept of the sketch is the following.
I am getting words and compare them . So I have two strings and when those two strings are equal I want to change a the colour of the word on processing (that works) but also want to send an osc message on max. However the messages are not being send all the time on max (only about half of the times)
This is inside my void_draw loop
- int i = (frameCount % words.size());
String word1 = words.get(i);
String word2="hate";
if (word1.equals(word2)==true){
f=22;
fill(255,0,0);
textSize(32);
text(word1,width/2,random(height/2));} - else {
f=0; - fill(0);
- textSize(7);
text(word1, random(width), random(height/2));}}
I am using an int called f as a variable and I am sending the osc message.At the end of my sketch I am writing this
- void oscEvent(OscMessage theOscMessage) {
- if (f==22){
OscMessage myMessage = new OscMessage("/hate");
oscP5.send(myMessage, myRemoteLocation); }
else {OscMessage myMessage = new OscMessage("/none");
oscP5.send(myMessage, myRemoteLocation); }
Any thoughts on that?Advices would be really appreciated
thanks in advance,
t
1