gaSetOSCMessage(string,CONSTANT)

Syntax

gaSetOSCMessage(string,CONSTANT)

Example

intLabel = "/testINT"
floatLabel = "/testFLOAT"
stringLabel = "/testSTRING"

function setup()
 // init OSC sending labels
 gaSetOSCMessage(intLabel,OSC_INT) 
 gaSetOSCMessage(floatLabel,OSC_FLOAT)
 gaSetOSCMessage(stringLabel,OSC_STRING)
end

function update()
 // send OSC messages
 gaSetOSCValue(intLabel,tostring(gaMouseX()))
 gaSetOSCValue(floatLabel,tostring(ofRandomuf()))
 gaSetOSCValue(stringLabel,"any string")
end

function draw()
 gaBackground(0.0,1.0)
 
 ofSetColor(34,217,179)
 text = string.format("Sending OSC data to IP: %s at port: %s",gaSendingOscTo(),OSC_SENDING_PORT)
 ofDrawBitmapString(text,20,200)
 
end

Description

Initialize a new sending OSC message container, with the specified label, of the specified type. The options for the type are the Constants: OSC_INT , OSC_FLOAT and OSC_STRING

Parameters

string,CONSTANT