Skip to content

Custom OSC Input

Dylan Marcus edited this page Aug 20, 2025 · 2 revisions

Custom OSC Input Device Setup

The M1 Orientation Manager supports receiving orientation data via OSC (Open Sound Control) messages, allowing integration with custom tracking systems or other software that can output orientation data.

Overview

Custom OSC Input allows you to send orientation data from any external source that supports OSC messaging. This is useful for:

  • Integration with existing tracking systems
  • Custom hardware implementations
  • Software-based tracking solutions
  • Testing and development purposes

Connection Type

  • Protocol: OSC (Open Sound Control)
  • Transport: UDP Network
  • Default Port: Configurable (typically 8000-9000 range)

Setup Instructions

Network Configuration

Ensure your OSC sender and M1 Orientation Manager are on the same network or have network connectivity.

Default Settings:

  • IP Address: 127.0.0.1 (localhost) or your machine's IP
  • Port: 8000 (configurable)
  • Protocol: UDP

OSC Message Format

The M1 Orientation Manager expects OSC messages in the following formats:

Euler Angles (Recommended)

/orientation/yaw <float>    # Yaw in degrees (-180 to 180)
/orientation/pitch <float>  # Pitch in degrees (-90 to 90)  
/orientation/roll <float>   # Roll in degrees (-180 to 180)

Configuration in M1 Orientation Manager

  1. Launch M1 Orientation Manager
  2. Select OSC Input Device from the device list
  3. Configure Network Settings:
    • Set the listening port (default: 8000)
    • Set the address message to listen for (default: "/orientation"
    • Verify IP address binding
  4. Start Tracking to begin receiving OSC messages

Testing Your Setup

You can test OSC input using various tools:

Using TouchOSC or similar OSC apps:

  • Set destination IP to your computer's IP
  • Set port to match M1 Orientation Manager
  • Send test messages to /orientation/yaw, /orientation/pitch, /orientation/roll

Using command line tools (macOS/Linux):

# Install oscsend (part of liblo-tools)
brew install liblo  # macOS
sudo apt-get install liblo-tools  # Ubuntu

# Send test orientation data
oscsend localhost 8000 /orientation/yaw f 45.0
oscsend localhost 8000 /orientation/pitch f 10.0
oscsend localhost 8000 /orientation/roll f -5.0

Using Python with python-osc:

from pythonosc import udp_client

client = udp_client.SimpleUDPClient("127.0.0.1", 8000)

# Send orientation data
client.send_message("/orientation/yaw", 45.0)
client.send_message("/orientation/pitch", 10.0)
client.send_message("/orientation/roll", -5.0)

Data Rate and Filtering

  • Recommended Rate: 30-60 Hz for smooth tracking
  • Maximum Rate: 120 Hz
  • Filtering: Built-in smoothing available for noisy data

Coordinate System

The M1 Orientation Manager uses the following coordinate system:

  • Yaw: Rotation around Y-axis (left/right)
  • Pitch: Rotation around X-axis (up/down)
  • Roll: Rotation around Z-axis (tilt)
  • Units: Degrees for Euler angles, normalized for quaternions

Related Documentation