Bridges OSC tracker messages to PosiStageNet by emitting PSN_DATA packets over UDP, with an in-memory tracker map.
README
ofxOscToPsn
An openFrameworks addon that bridges OSC to PosiStageNet (PSN v2.x) by emitting PSN_DATA packets over UDP (multicast or unicast).
Test target: openFrameworks 0.12.1 (latest official release at time of writing).
What it does
- Listens for OSC messages and maintains an in-memory tracker map
- On each OSC update, sends a PSN_DATA packet containing either:
- all known trackers, or
- only the tracker that was updated
Supported OSC patterns (default)
/psn/<trackerId> x y z [ori_x ori_y ori_z]/tracker/<trackerId> x y z [ori_x ori_y ori_z]
Orientation
If you pass 6 numeric values, the last 3 are sent as PSN
ORI (0x0002) as raw floats. Interpretation (Euler order, degrees/radians, coordinate conventions) is receiver-dependent.PSN defaults
- Destination multicast:
236.10.10.10 - Port:
56565
Install
1. Copy this folder to:
openFrameworks/addons/ofxOscToPsn 2. Run the Project Generator (or regenerate the example project) 3. Make sure your project includes ofxOsc and ofxNetwork (the addon declares them in addon_config.mk)Example
See:
examples/oscToPsnExample- OSC listen port:
9000 - PSN dest:
236.10.10.10:56565 - Hit
spaceto toggle: - send all trackers vs. last-only
Usage (in your app)
#include "ofxOscToPsn.h"
ofxOscToPsn bridge;
void ofApp::setup(){
ofxOscToPsn::Settings s;
s.oscListenPort = 9000;
s.psnHost = "236.10.10.10";
s.psnPort = 56565;
s.sendAllKnownTrackers = true;
bridge.setup(s);
}
void ofApp::update(){
bridge.update();
}
void ofApp::draw(){
bridge.drawDebug(10, 10);
}Limitations / Production notes
- This addon emits PSN_DATA only. Some systems also use PSN_INFO for tracker names.
- Packet splitting (1500-byte max UDP payload in PSN spec) is not implemented.
frame_packet_count mechanism.License
MIT
ofxAddons