Skip to content

Instantly share code, notes, and snippets.

@Sciss
Created May 1, 2012 18:18
Show Gist options
  • Save Sciss/2570227 to your computer and use it in GitHub Desktop.
Save Sciss/2570227 to your computer and use it in GitHub Desktop.
CupolaOSC.txt
:::::::: OSC messages ::::::::
[ "/flock_type", "bees" | "birds" | "fish" ]
[ "/flock", (float) pos_x, (float) pos_y (float) velo_angle, (float) velo_mag, (float) density, (float) curvature ]
where pos_x, pos_y, velo_mag, density and curvature are normalised to interval: [0 ... 1]
where velo_angle is in radians
[ "/predator", (int) num, (float) distance ]
where num >= 0
where distance is normalised to interval: [0 ... 1]
[ "/camera", (string) mode ]
where mode is one of: ???
[ "/focus", (float) value ]
where value is normalised to interval: [0 ... 1]
[ "/state", "offline" | "calibrate" | "start" | "run" | "stop", {optional} extraData ]
where extraData for "calibrate" is: (float) quality
where quality is normalised to interval: [0 ... 1]
Messages belonging to the same logical time tick are sent inside an OSC bundle
OSC transport is UDP (easier than to set up a TCP server). This requires a handshake though.
The music system sends message [ "/music", 0 | 1 ] to the visual system, where 1 is register and 0 is unregister. The visual system can use the sender's address as reply address for the internal state output. It should automatically unregister the music system when its UDP socket becomes unavailable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment