Build on Sunflare

Using OSC

OSC (Open Sound Control) lets an external tool (a DJ rig, a VJ setup, a custom script) drive your Rich Presence directly, for whatever Windows' own media-session APIs can't see on their own. It's a small UDP listener built into the desktop app.

Turning it on#

Settings → Rich Presence → Accept OSC input. Pick a port (default 9222, must be between 1024–65535) and the app starts listening on it immediately. The same pane shows a live status line ("Listening on port N") so you can confirm it actually bound.

Messages it understands#

AddressArgumentsEffect
/sunflare/nowplayings title, s artist, i positionMs, i durationMs, i isPlaying, s sourceSets the current track. Requires at least the first 5 args and a non-empty title, or it's ignored.
/sunflare/nowplaying/arts urlSets the album art shown alongside the track.
/sunflare/nowplaying/clearnoneClears whatever's currently showing.
/sunflare/statuss textSets a custom status line. An empty string clears it.

Argument type tags: s = string, i = 32-bit big-endian int, f = 32-bit big-endian float. Any other type tag stops parsing at that point in the message rather than misreading the rest of it. Keep messages to exactly the types listed above.

Priority over other Rich Presence sources#

While OSC messages are actively arriving, they take priority over the desktop app's own OS media-session scanner: no conflict, no fighting over what's shown. That priority expires 15 seconds after the last message, so a crashed or closed sender doesn't leave Rich Presence stuck showing stale data forever; it just falls back to whatever the normal scanner finds next.

Example: sending a message#

Using node-osc (or any OSC 1.0 client library; nothing Sunflare-specific is required):

const { Client } = require('node-osc');
const client = new Client('127.0.0.1', 9222);

client.send('/sunflare/nowplaying', [
  'Track Title', 'Artist Name',
  45000,      // position, ms
  210000,     // duration, ms
  1,          // 1 = playing, 0 = paused
  'My App'    // source label
]);

client.send('/sunflare/nowplaying/art', ['https://example.com/cover.jpg']);

To clear it when playback stops:

client.send('/sunflare/nowplaying/clear', []);

Things worth knowing#