YCAMInterlab / Duration

Duration is an application for designing change over time
334 stars 54 forks source link

Feature: OSC communication class #43

Open Daandelange opened 9 years ago

Daandelange commented 9 years ago

Hello,

I'm thinking about implementing a class to include simplifying OSC communication with Duration from a standalone application. Anybody using Duration would need this.
Both a receiver and sender would be great. Usage would be like:

durationRC durationOut;
durationOut.connect("localhost", 12346);
durationOut.stop();
durationOut.play();
etc.
durationReceiver durationIn;
durationIn.listen(12345);
durationIn.autoBindToTracks();
durationIn.getCurrentTime();
ofAddListener(durationReceiver::durationFloatEvent, this, &ThisClass::floatListener);
void ThisClass::floatListener(durationFloatEventArgs &_args){
    if( _args.track.compare("/myTrack/")==0 ){
        float value = _args.value;
    }
}

What do you think about this?
Should the receiver be a singleton ?