OSC

v1.0.1·Updated 2025-09-08

OSC plugin for MelonLoader providing complete Open Sound Control protocol support. Enables mods to send/receive OSC messages for external app communication.

About this mod Author’s original text

OSC

A MelonLoader plugin that provides Open Sound Control (OSC) networking capabilities for other mods. This plugin allows mods to send and receive OSC messages over UDP for real-time communication with external applications like TouchOSC, VRChat OSC, audio software, and other OSC-compatible tools.

What it does

The OSC plugin provides a complete OSC implementation including:

  • OSC Message Sending: Send OSC messages to external applications
  • OSC Message Receiving: Listen for incoming OSC messages and handle them
  • Message Routing: Register handlers for specific OSC address patterns
  • Thread-Safe Operations: All operations are safely handled across threads
  • Auto-Configuration: Automatic setup with sensible defaults

Usage for Other Mods

To use this OSC plugin as a dependency in your mod, follow these steps:

  • Add Reference

Add a reference to the OSC plugin in your mod project and ensure it loads before your mod.

  • Basic Usage

using OSC;

// Check if OSC is available

if (OSCAPI.IsAvailable)

{

// Send a simple OSC message

OSCAPI.Send("/avatar/parameter/MyParameter", 1.0f);

// Send a message with multiple arguments

OSCAPI.Send("/game/player/position", 10.5f, 25.0f, 5.2f);

}

  • Receiving Messages

// Register a handler for specific address patterns

OSCAPI.RegisterHandler("/input/button/*", (message) => {

MelonLogger.Msg($"Button input: {message.Address} with {message.Arguments.Count} arguments");

});

// Register a global handler for all messages

OSCAPI.RegisterGlobalHandler((message) => {

MelonLogger.Msg($"Received: {message}");

});

  • Configuration

// Configure where to send OSC messages

OSCAPI.ConfigureSender("192.168.1.100", 9000);

// Configure which port to listen on

OSCAPI.ConfigureReceiver(9001);

// Start/stop receiving messages

OSCAPI.StartReceiving();

OSCAPI.StopReceiving();

  • Advanced Usage

// Create custom OSC messages

var message = new OSCMessage("/custom/address");

message.AddArgument("Hello");

message.AddArgument(42);

message.AddArgument(3.14f);

OSCAPI.Send(message);

// Get OSC system statistics

var stats = OSCAPI.GetStats();

MelonLogger.Msg($"Sender connected: {stats.IsSenderConnected}");

MelonLogger.Msg($"Receiver listening: {stats.IsReceiverListening}");

// Clean up handlers when your mod unloads

OSCAPI.UnregisterHandler("/input/button/*", myHandler);

OSCAPI.UnregisterGlobalHandler(myGlobalHandler);

Default Configuration

  • Send Target: 127.0.0.1:9000 (localhost)
  • Receive Port: 9001
  • Auto-start Receiver: true

Error Handling

All OSCAPI methods include built-in error handling and will log errors to the MelonLoader console. Your mod won't crash if the OSC plugin is unavailable or if network errors occur.

Common Use Cases

  • VRChat Integration: Send avatar parameters and receive input from VRChat's OSC system
  • External Control: Control your mod from mobile apps like TouchOSC
  • Audio Software: Sync with DAWs and audio applications
  • Live Performance: Real-time parameter control for live streaming or performance
  • Hardware Integration: Connect with OSC-compatible hardware controllers

Dependencies

  • MelonLoader

-.NET Framework 4.7.2+

License

This plugin is is under the MIT License. See the LICENSE file for details.

Install & use Install: follow the bundled instructions

  1. Unzip the archive from playbuff and read the bundled readme / instructions first.
  2. Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
  3. For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
  4. Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.

Install locations vary a lot between mods — the bundled readme is the most reliable guide.

Dependencies

Install these first, or the mod will not work:

LavaGang-MelonLoader

File & checksum

Filename
OSC-1.0.1.zip
File size
282.6 KiB