OSC
More actions
Open Sound Control (OSC) (on Wikipedia) is a content format that allows software and hardware to send and receive data. Resonite uses UDP to transfer the packets.
Traditionally, OSC is used for controlling sound-related equipment (such as DJ equipment, synthesizers and sliders/faders), but it can be used to send any structured data over the network. In Resonite, it is used for:
- Haptics
- Face and Eye Tracking
- Macro Pads/Shortcut pads
Prerequisities
It is recommended to have basic knowledge about IP addresses and network ports (specifically UDP ports) before using OSC. Additionally, the following things must be known before you can establish an OSC connection:
For receiving
- An open port on the computer running Resonite.
- The IP address of the computer running Resonite.
For sending
- An OSC Server reachable by Resonite on the internet, or in your local area network.
- Some sort of OSC application/tool. See tools for some examples.
Components
Resonite has the following components to interface with OSC:
- Component:OSC_Receiver - Receive data into Resonite
- Component:OSC_Sender - Send data out of Resonite
- Component:OSC_Value - Expose an OSC value as a regular component field
- Component:OSC_Field - Store an OSC value in another component's value field
Data
OSC Supports many data types, but Resonite supports:
Multi-Argument Values
OSC can encode multiple values under one path. This is similar to Resonite's vector types, such as Float3.
For example, an application might send a rotational value as a multi-argument value. When this occurs you can use the ArgumentIndex member to control which value you are interacting with:
| Path | Argument Index | Value | Description |
|---|---|---|---|
| /osc/rotation | 0 | 90 | The pitch value |
| /osc/rotation | 1 | 180 | The yaw value |
| /osc/rotation | 2 | 0 | The roll value |
Tools
A number of tools that support OSC already exist and are compatible with Resonite's implementation:
- OSC Controller - Exposes control sliders, buttons, etc. from your phone
- Sensors2OSC - Exposes Android sensor data
- Basic-OSC-Example - A very simple OSC app written in C#. Can be used for testing OSC connectivity.
- GigglePuck - A haptic device, that vibrates in response to Resonite based Interactions
- ofxOscMidi - A program to receive MIDI messages from a source such as a hardware MIDI controller or software DAW and convert them to OSC messages which Resonite can understand. Can also receive OSC input from Resonite and send to MIDI output.
Examples
- Using a Phone's sensors
- Rotating an in-game box with your phone's gyroscope by Frooxius.
- Accessing Sensors2OSC Data - Tutorial by ProbablePrime
- Sliders, Buttons and a Multi-Touch System