O'Reilly logo

openFrameworks Essentials by Denis Perevalov, Igor Tatarnikov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing the OSC messages receiver

To implement the receiving of OSC messages in the VideoSynth project, perform the following steps:

  1. Include the ofxOsc addon's header to the ofApp.h file by inserting the following line after the #include "ofxGui.h" line:
    #include "ofxOsc.h"
  2. Add a declaration of the OSC receiver object to the ofApp class:
    ofxOscReceiver oscReceiver;
  3. Set up the OSC receiver in setup():
    oscReceiver.setup( 12345 );

    The argument of the setup() method is the networking port number. After executing this command, oscReceiver begins listening on this port for incoming OSC messages. Each received message is added to a special message queue for further processing.

    Note

    A networking port is a number from 0 to 65535. Ports from 10000 to 65535 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required