Vapor (http://itunes.apple.com/us/app/vapor./id433370498?mt=8) allows for control via OSC and also sends a number of OSC messages based on touch input. The Vapor class sets up a number of ways for this communication to happen.
Posts your computer iP address and the port that sclang is listening on.
For debugging, when set to 'true' all incoming OSC messages will be dumped to the post window. Call the method again with 'false' to turn off OSC dumping.
creates a new instance of Vapor
ip |
the ip of the device running Vapor (can be left empty - see the 'listen' method below) |
port |
the port to listen on |
the ip address the SuperCollider sends Vapor messages to.
newIP |
an ip string |
listens for the '/vaporPing' message from the Vapor app. If IP is nil, the IP from the OSC message will be saved for you.
action |
a Function to evaluate when the message comes in |
remove |
a boolean that tells the class whether or not to remove this responder when the message comes in. |
adds the necessary responders for responding to touches in the Vapor app
removes all responders listening for OSC from Vapor
sends a /vaporPing message to Vapor after setting up an OSCresponderNode to listen for the '/pong' reply.
sends a command for Vapor to take a screen shot and store it in the device's photo roll.
sends an OSC message to Vapor to create a Vapor touch.
x |
a value between 0.0 and 1.0 (0.0 is left, 1.0 is right) |
y |
a value between 0.0 and 1.0 (0.0 is bottom, 1.0 is top) |
sends an OSC message to Vapor to create a Vapor cloud.
x |
a value between 0.0 and 1.0 (0.0 is left, 1.0 is right) |
y |
a value between 0.0 and 1.0 (0.0 is bottom, 1.0 is top) |
sends an OSC message to Vapor to create a Vapor bomb.
x |
a value between 0.0 and 1.0 (0.0 is left, 1.0 is right) |
y |
a value between 0.0 and 1.0 (0.0 is bottom, 1.0 is top) |
strength |
an optional value (between 1 and 10000) that describes how long it takes for the bomb to fade |
a Function to evaluate when a Vapor cloud (double tap) is created. msg, time, addr, recvPort and a touchID are passed into the Function.
a Function to evaluate when a tracked touch moves. msg, time, addr, recvPort and a touchID are passed into the Function.
a Function to evaluate when a tracked touch ends. msg, time, addr, recvPort and a touchID are passed into the Function.
a Function to evaluate when a pinch gesture is detected. msg, time, addr and recvPort are passed into the Function.
a Function to evaluate when a accelerometer values are calculated. msg, time, addr and recvPort are passed into the Function.
a Function to evaluate when a Vapor cloud (double tap) is created. msg, time, addr and recvPort are passed into the Function.
a Function to evaluate when a Vapor detects a rotation gesture. msg, time, addr and recvPort are passed into the Function.
a Function to evaluate when a Vapor bomb (triple tap) is created. msg, time, addr and recvPort are passed into the Function.
sets the viscosity setting in Vapor
viscosityIn |
a value between 0.01 and 0.99 |
sets the hue setting in Vapor
hueIn |
a value between 0.0 and 360.0 |
sets the speed setting in Vapor
speedIn |
a value between 0.01 and 0.99 |
sets the gravity setting in Vapor
gravityIn |
a value between -1.0 and 1.0. |
sets the fade setting in Vapor
fadeIn |
a value between 0.01 and 0.99 |
sets the diffusion setting in Vapor
diffusionIn |
a value between 0.01 and 0.99 |
sets the mode setting in Vapor.
modeIn |
an integer value between 1 and 10 |
sets the colorChange setting in Vapor.
colorChangeIn |
a value between -1.0 and 1.0 |
sets the reflectX setting in Vapor
reflectXIn |
a boolean value |
sets the reflectY setting in Vapor
reflectYIn |
a boolean value |
sets the reflectCenter setting in Vapor
reflectCenterIn |
a boolean value |