Brandon Withington | XR Software Engineer

Controller to OSC

Overview

CTRL 2 OSC (C2O) is a lightweight, GUI-driven application designed to seamlessly bridge the gap between physical hardware and digital environments. Originally developed as a versatile solution for mapping physical simulation hardware to Massive Loop, C2O has evolved into a robust C# application. It reads real-time data from USB steering wheels, Bluetooth gamepads, joysticks, and keyboards, translating and broadcasting these inputs over a local network using the Open Sound Control (OSC) protocol for low-latency communication.

Beyond input mapping, C2O V3.3 features powerful two-way OSC communication. It allows remote software to send Force Feedback (FFB) commands to adjust steering wheel resistance in real-time, and it now acts as a dedicated Motion Platform Forwarder, receiving 6-DoF telemetry and routing it to physical motion rigs.

Showcase

Video


Key Features


Development Highlights


Technologies Used

My Role

Challenges and Solutions

  1. Ensuring Low-Latency Performance with a GUI:
    • Challenge: Polling USB hardware at high speeds while rendering a dynamic GUI can cause thread blocking and latency.
    • Solution: Utilized multi-threading to isolate the high-speed input polling and OSC broadcasting loop from the main UI thread. Added an option to switch from a scrolling log to a static in-place dashboard to further reduce UI rendering overhead.
  2. Handling Hardware Fragmentation:
    • Challenge: Different controllers and racing wheels output raw data in wildly different formats and scales.
    • Solution: Developed a smart auto-detection system that normalizes raw inputs and maps them to true hardware labels. Added an advanced axis tuning layer so users can manually apply deadzones and smoothing to erratic hardware.
  3. Implementing Real-Time Force Feedback:
    • Challenge: Sending haptic feedback from a digital environment back to a physical wheel requires listening for commands without interrupting the outbound stream.
    • Solution: Set up an asynchronous listener loop for incoming OSC messages to adjust the wheel’s Spring, Damper, and Friction in real-time using SDL2’s haptic drivers.
  4. Ensuring Motion Platform Safety:
    • Challenge: Forwarding raw network telemetry to physical 6-DoF rigs can result in violent, unexpected movements if the data spikes or the game crashes.
    • Solution: Engineered a high-pass Washout Filter to return the rig to center smoothly, alongside an auto-zeroing safety heartbeat timeout and a dedicated UI Motion Kill Switch to instantly halt rig movement.