ExtensionmOSCion (https://itunes.apple.com/us/app/moscion/id918992600?mt=8) turns your iPhone or iPad into a gestural and environmental sensing device. Information about the device’s motion, surroundings and your touches are converted into data that can be sent with the Open Sound Control (OSC) network protocol to another device that is listening for this information.
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 MOSCion
| port |
the port to listen on |
| baseAddr |
the base of the OSC addr that mOSCion will be sending. Multiple instances of MOSCion can be set up to support multiple devices. Changing the base addr on the device will make message handling easier. |
listens for the '/pong' message from the mOSCion app. If port is nil, the port from the OSC message will be saved for you, and this instance of MOSCion will filter for messages on this port.
| 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. |
removes all responders associated with this instance of MOSCion.
adds the necessary responders to react to accerlerometer data.
| key |
a unique key for this set of responders. Reassigning with the same key will overwrite a previous set of responders. |
| allFunc |
a function that has the x, y and z values passed into it. This function will be executed with every message received. |
| xFunc |
a function that has the x value passed into it. This function will be executed with every message received. |
| yFunc |
a function that has the y value passed into it. This function will be executed with every message received. |
| zFunc |
a function that has the z value passed into it. This function will be executed with every message received. |
removes a set of responders with the key id.
| key |
the key to search for. |
see accelerometer details above.
similar to accelerometer, except the functions are for all controls, pitch, yaw and roll.
similar to accelerometer, except the functions are for all controls, speed (in meters/sec) and course.
similar to accelerometer, except the functions are for all controls, true heading and magnetic heading.
similar to accelerometer, except the functions are for all controls, latitude, longitude and altitude
similar to accelerometer, except the functions are for all controls, linear amplitude, frequency and a floating point midi keynum
| key |
a unique key for this set of responders. Reassigning with the same key will overwrite a previous set of responders. |
| touchBeganFunc | |
| touchMovedFunc | |
| touchEndedFunc |
methods to respond to touch began, move and ended. All functions are passed a unique integer touch ID (to track touches with) and current x and y position. |
similar to the method for removing accelerometer responders
sends the touch end for all current tracked touches. Touches on the device are sometimes lost, and this helps clear out stuck touches.