ofxOsc: getNextMessage() Deprecated and causing program to not respond

Hey Everyone,

I’m trying to send OSC messages from Max/MSP to Openframeworks but everytime I run the program and move the slider on max to send osc, the openframworks app window disappears and appears as not responding under force quit. I also get a message on xCode saying getNextMessage is deprecated.

I’ve looked all over the internet and through different books for a solution, but no luck in finding one. I am a beginner in openframeworks, so this doesn’t help either when trying to debug my code. I’m on the brink of giving up. Appreciate all the help!!

Please see code below for reference

float level = 0;

void ofApp::setup(){



void ofApp::update(){

while (oscR.hasWaitingMessages())
    ofxOscMessage m;
    if (m.getAddress() == "/pinchY")
        pinchY = m.getArgAsFloat(0);


Classes from my header file
ofxOscReceiver oscR;
float pinchY = 1.0;

1 Like