supercollider to processing via osc
in
Contributed Library Questions
•
11 months ago
greetings
i notice usually people using processing for timing and send messages from processing to sc?
for example http://www.erase.net/projects/processing-sc/
or OpenObject Quark http://vimeo.com/7182132#at=0
like using OpenObject Quark in supercollider i can easily
A. "publish" sound object for OSC control in SC
Ndef(\saw).publish(\test);
B. send message to this object from PROCESSING
osc.send("/oo", new Object[] {"test","play"}, sc);
OpenObject Quark is very handy BUT i find it very hard to compose visuals to audio way
i would prefer to make it other way around, both
make a/v sequences, control structures with routines and patterns in sc
so how to sync both exactly and make sc timing master?
//more specific question:
testing sc to processing via osc now i am confused about message and its receiver
for example using code below processing prints that message is received
// sending messige from sc to processing
~processingOut = NetAddr("127.0.0.1", 49110);
~processingOut.sendMsg("/from_SC", 500);
BUT how to specify id, what exactly receives incoming messages from sc in processing?
like specific variables, parameters that waits only messages "/from_SC", "/from_SC02" etc. ?
i guess you also have to specify is it integers of floats since processing needs to know that?
any examples, tutorials, experiences, suggestions about this approach will be highly appreciated, thanks
karl
// processing code
import oscP5.*;
import netP5.*;
OscP5 oscP5;
NetAddress myRemoteLocation;
void setup() {
size(400,400);
frameRate(25);
/* start oscP5, listening for incoming messages at port 49110 */
oscP5 = new OscP5(this,49110);
myRemoteLocation = new NetAddress("127.0.0.1",57120);
}
void draw() {
background(0);
}
/* incoming osc message are forwarded to the oscEvent method. */
void oscEvent(OscMessage theOscMessage) {
print("### received an osc message.");
print(" addrpattern: "+theOscMessage.addrPattern());
println(" typetag: "+theOscMessage.typetag());
}
i notice usually people using processing for timing and send messages from processing to sc?
for example http://www.erase.net/projects/processing-sc/
or OpenObject Quark http://vimeo.com/7182132#at=0
like using OpenObject Quark in supercollider i can easily
A. "publish" sound object for OSC control in SC
Ndef(\saw).publish(\test);
B. send message to this object from PROCESSING
osc.send("/oo", new Object[] {"test","play"}, sc);
OpenObject Quark is very handy BUT i find it very hard to compose visuals to audio way
i would prefer to make it other way around, both
make a/v sequences, control structures with routines and patterns in sc
so how to sync both exactly and make sc timing master?
//more specific question:
testing sc to processing via osc now i am confused about message and its receiver
for example using code below processing prints that message is received
// sending messige from sc to processing
~processingOut = NetAddr("127.0.0.1", 49110);
~processingOut.sendMsg("/from_SC", 500);
BUT how to specify id, what exactly receives incoming messages from sc in processing?
like specific variables, parameters that waits only messages "/from_SC", "/from_SC02" etc. ?
i guess you also have to specify is it integers of floats since processing needs to know that?
any examples, tutorials, experiences, suggestions about this approach will be highly appreciated, thanks
karl
// processing code
import oscP5.*;
import netP5.*;
OscP5 oscP5;
NetAddress myRemoteLocation;
void setup() {
size(400,400);
frameRate(25);
/* start oscP5, listening for incoming messages at port 49110 */
oscP5 = new OscP5(this,49110);
myRemoteLocation = new NetAddress("127.0.0.1",57120);
}
void draw() {
background(0);
}
/* incoming osc message are forwarded to the oscEvent method. */
void oscEvent(OscMessage theOscMessage) {
print("### received an osc message.");
print(" addrpattern: "+theOscMessage.addrPattern());
println(" typetag: "+theOscMessage.typetag());
}
1