Book Image

OpenFrameworks Essentials

Book Image

OpenFrameworks Essentials

Overview of this book

Table of Contents (19 chapters)
openFrameworks Essentials
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating an OSC sender with openFrameworks


Let's create a new project OscOF, one that contains a GUI panel with one slider, and send the slider's value via OSC to the VideoSynth project.

Note

Here, we assume that the OSC sender and receiver run on the same computer. See the details on running the sender on a separate computer in the upcoming Sending OSC messages between two separate computers section.

Now perform the following steps:

  1. Create a new project using Project Generator. Namely, start Project Generator, set the project's name to OscOF (that means OSC with openFrameworks), and include the ofxGui and ofxOsc addons to the newly created project (see the details on using Project Generator in Chapter 2, Creating Your First openFrameworks Project). The ofxGui addon is needed to create the GUI slider, and the ofxOsc addon is needed to send OSC messages.

  2. Open this project in your IDE.

  3. Include both addons' headers to the ofApp.h file by inserting the following lines (after the #include "ofMain.h...