Skip to content

OscMix server concept

Martin Augustyniak edited this page Nov 27, 2026 · 6 revisions

OscMix Server - Concept Overview

Note

All of this builds on Michael Forney's oscmix. His clean, minimal design is what made this modular approach possible in the first place - I have learned so much from it, and I still learn from it every day.

Keep in mind: this is still rough around the edges and under active development!

This document is stale already - several parts need an update - consider it as a basic info...

The basic idea: every component can run on any host, for the widest possible compatibility across systems and environments.

OscMix Server offers two HTTP endpoints: the web mixer at /web (UI for browsers) and the MCP endpoint at /mcp (for AI clients). Both read from the same cache and can be enabled or disabled independently via environment variables (see Configuration).

This is just a basic overview - the rest is up to you to explore.

Please don't open bug reports for now. I know about them, and there are plenty left to fix...

Background

It all started with one question: could AI help visually impaired people control their devices? That was the beginning of my totalmix-mcp repo.

It seemed like a worthwhile use case to me - and a good way to learn how the AI stuff works.

For my own use (I'm not visually impaired), I first thought it was rather pointless - mouse and keyboard are always faster than a spoken command.

But it turned out there are quite a few cases where it's useful: anyone who has to move many faders or controls at once, on the fly, may find the MCP endpoint handy. Just a few examples:

  • In a surround setup, sweep a filter or the bass across the room, channel by channel, on the fly...
  • Nobody is faster at naming all 94 outputs by a given scheme, or at coloring channels by a rule, etc.

Supported devices

Device Tested
RME Fireface 802 x
RME Fireface UCX testers wanted
RME Fireface UCX II x
RME Fireface UFX x
RME Fireface UFX II x
RME Fireface UFX III x
RME Fireface UFX+ x

Example workflows

  1. Most users (~95%) - everything on one host:

    Device <--USB MIDI (SysEx)--> host (Linux/macOS) <--alsaseqio/alsarawio/coremidiio--> oscmix <--OSC--> OscMix Server (web/MCP) <--http(s)--> clients (browser/AI)
    
  2. Advanced users - device and workstation on separate hosts:

    Device <--USB MIDI (SysEx)--> interface host (e.g. Raspberry Pi, 24/7)
           <--network MIDI (UMP, MIDI 2.0)--> DAW workstation (Linux/macOS):
                 alsaseqio / alsarawio / coremidiio -> oscmix -> OSC or ALSA ctl plugin
           <--OscMix Server (web/MCP)--> multiple browser clients
    

Architecture

                    RME Fireface (class compliant, USB MIDI)
                                     |
          +--------------------------+---------------------------+
          |                          |                           |
       local                      browser             network MIDI (other host)
   alsarawio (Linux)              WebMIDI             rtpmidid   (RTP-MIDI 1.0)
   alsaseqio (Linux)                 |                amidi2net  (UMP-MIDI 2.0)
   coremidiio (macOS)                |                AppleMIDI / rtpMIDI
          |                          |                           |
          | fd 6/7                   |                 alsaraw-/seqio / coremidiio
          |                          |                           | fd 6/7
       oscmix                   oscmix.wasm                   oscmix
          |                     + Web UI                         |
          +------------------------------------------------------+
                                     |
                OSC over UDP (unicast / multicast, mDNS discovery)
                                     |
     +-------------+-------------+---------------+------------------+--------------+
     |             |             |               |                  |              |
  Qt UI *      GTK UI *    wsdgram (WS) *   ALSA ctl_oscmix   OscMix Server      any OSC app
                                 |          (amixer -D oscmix)  web mixer + /mcp
                              Web UI         DAWs, ALSA apps       |    |
                                                              browser  AI client

* not yet adapted to v2, as of May 2026 (see Roadmap)

  Fireface A            Fireface B            Fireface C (Win/Mac RME native driver)
      |                     |                        |
   oscmix                oscmix                 TotalMix FX
   (host 1)              (host 2)               (host 3)
      |                     |                        |
      +---------------------+------------------------+
                            |
                            |  OSC over UDP (LAN)
                            |
                     OscMix Server  (one instance per device, any number of clients each)
                     web mixer (+ /mcp)
                            |
         any browser / AI client, anywhere on the LAN

Devices, hosts and clients are independent - every device can be controlled from any browser or host at any time, whether it is connected to a TM host (USB driver mode on Windows/macOS, or CC mode on macOS) or not. oscmix currently supports all OSC capabilities that TM's "Global OSC" offers, and OscMix Server makes them available via web and MCP. You could think of alsaseqio/alsarawio/coremidiio + oscmix + OscMix Server as something like TM on the iPad, split into three modules.

Features

Modular by design

The whole concept is modular by design: every component can be installed and enabled as needed - including the web and MCP endpoints of the server.

DNS-SD/Zeroconf/Bonjour

Each component has built-in DNS-SD support (Linux: libavahi, macOS/iOS: Apple's native dns_sd framework).

Once set up, each component finds its partner automatically - even if IPs or ports have changed in the meantime.

The web mixer tells you when another device is available on the network. And if allowed by setup config, the device name on top expands to dropdown, where you can switch/select another device.

Autoconnect ("hot-plugging")

On Linux, udev rules and systemd lingering can be enabled via the setup script, so hot-plugging works.

Network MIDI

Purpose: the device stays connected to its own host only (e.g. a Raspberry Pi), and its SysEx MIDI messages are transferred 1:1 over the network to another host running oscmix.

From my experience and tests, this is the best option for controlling a device remotely, performance-wise: SysEx causes much less overhead than OSC. Over Ethernet with UMP (MIDI 2.0), I measured about 0.4-0.8 ms latency (see Decentralized setup).

  • UMP / MIDI 2.0 (current kernels): a precompiled amidi2net is included. Always prefer this option, as it adds the least latency.
  • RTP-MIDI / MIDI 1.0 (older kernels): requires a patched rtpmidid. The original splits SysEx messages larger than 256 bytes (e.g. levels) into several separate SysEx messages. In my tests, this caused problems when reassembling them - and it would require unnecessary reassembly on the receiving side anyway. The issue has been reported in the original rtpmidid repo, but hasn't been fixed so far. The patched rtpmidid is included and installed automatically as a standalone version by oscmix-setup, without interfering with any existing rtpmidid installation.

Mixer state

The server caches a unit's state in RAM and writes it to disk every few seconds.

On the oscmix side, I made an exception for playback levels and channel names, since I couldn't find a way to get the device to report them back. This way, oscmix can serve everything a client needs to reflect the whole mixer after a restart. Still, no JSON/XML or other libraries are used, to keep it as lightweight as possible: the result is a dumb text file holding 3 numbers per playback channel - oscmix itself only ever holds the bare minimum.

Presets & snapshots

All presets are 100% compatible with TotalMix FX and can be imported into or exported from the server via the web UI:

Preset File format
EQ .tmeq
Dynamics .tmdn
Echo .tmeo
Reverb .tmrv
Room EQ .tmreq

Snapshots are currently stored as JSON only - support for TM's .tmss format is in progress.

Platforms & setup

Linux - device plugged into Ubuntu (CC mode)

Shown here: the OscMix web mixer and oscmix-setup, the shell script that configures everything on a Linux host.

For most users, running ./oscmix-setup and pressing Enter a few times should install everything.

Everything is set up once and can be reconfigured at any time.

Linux

Device, oscmix and server are running on an Ubuntu VM (but each of them could run elsewhere). An interactive shell script configures it all.

A more user-friendly configuration UI for Linux is planned, but not implemented yet.

macOS

Same on macOS: no matter where the server runs, the web UI can be reached from any client, and each client can be customized individually.

macOS

On macOS, a native SwiftUI app serves as the configuration UI - by now a real all-rounder, with profiles per server instance and much more:

macOS configuration app

Windows

oscmix and the server were never tested on Windows. However, Windows should be possible with not too much effort.

What already works:

  • TotalMix FX on Windows can talk to a server running on macOS/Linux, or control oscmix (see TotalMix FX).
  • Like any other system, Windows can connect to the server as a client via the browser.

iPhone / iPad / Android or whatever - via PWA

oscmix itself can even be compiled to run directly on an iPhone/iPad (tested). The server can't (yet), since it is Node-based for historical reasons - porting it to native C has already started.

The web app is developed with compatibility with common browsers and mobile devices, as well as basic security aspects, in mind.

iPhone mixer iPhone editor

Decentralized setup

Here, I ran four instances on the Mac instead of the VM:

  • The 802 is plugged into a Raspberry Pi 3B, connected to my Mac via RTP-MIDI; oscmix runs locally on the Mac.

  • My UFX III is connected to the Ubuntu VM, which runs its own oscmix and server.

  • Additionally, two TM "offline devices" are running, each talking to its own local server instance.

    Tip: For the lowest network latency, use MIDI - its messages have the smallest overhead (compared to OSC). Over Ethernet with UMP (MIDI 2.0), I measured about 0.4-0.8 ms latency between an old Raspberry Pi 3B and my Mac.

    That said, I know there is still a lot of room for improvement in the HTTP code, e.g. to avoid unnecessary rendering of levels. oscmix and the server themselves only carry the information they need to do their job: translating one protocol/standard into another. No more, no less.

    All the bling-bling happens on the client side - on my 6-year-old phone: no problem. On my 16-year-old notebook: it works, but it's not much fun...

Integrations

TotalMix FX

The same web mixer driving TotalMix FX and vice versa (without oscmix).

OscMix web mixer and TotalMix FX

Blue meters = pre-FX meters. That was a bug on my side, since TM only sends post-FX levels via OSC (already fixed).

Since TM's "Global OSC" scheme was (remarkably ;)) similar to oscmix's, I decided to unify them and adapted oscmix's OSC scheme to TM's, basically 1:1. A nice side effect: TM's "Offline Device" can connect to oscmix and control it from a Mac/Windows PC.

When connected to TM, everything TM supports via "Global OSC" (according to RME's documentation) works. However, TM itself limits what is available via OSC - see Known limitations.

ALSA mixer ctl plugin

ALSA control plugin: full mixer access via amixer -D oscmix, shown here in QasMixer. Generic mixers can't handle submixes - the plugin is intended as an interface for DAWs or your own mixer software talking directly to ALSA. Note: the ALSA plugin and oscmix can't run at the same time (the device is locked while it is being controlled).

The plugin is currently available for the UFX III only. I don't know if it's useful for anyone - if so, let me know, it's not much effort to adapt it for other devices.

ctl_oscmix in QasMixer

MCP endpoint (AI clients)

A skill for connecting an AI client to the MCP endpoint over HTTP is included in the package. Of course, you decide yourself whether the MCP endpoint is enabled or not (OSCMIX_SERVER_MCP_ENABLED).

Tips:

  • Use the project's skill along with the MCP endpoint.
  • Pick the smallest, fastest model (Haiku is fine). Simple commands like "set output faders 1-10 to -5 dB" are all it takes - the AI never needs to know the whole mixer state. This saves a lot of credits (I learned that in the first few days ;-)).

Configuration

OscMix Server is configured via environment variables (or a .env file). For details on each option, see server/.env.example.

Variable Default Description
Endpoints
OSCMIX_SERVER_MCP_ENABLED true MCP endpoint (/mcp)
OSCMIX_SERVER_WEB_ENABLED true Web mixer (/web)
OSC
OSCMIX_SERVER_OSC_TARGET_ADDRESS 127.0.0.1 OSC peer address
OSCMIX_SERVER_OSC_TARGET_PORT 7001 OSC peer port
OSCMIX_SERVER_OSC_LISTEN_ADDRESS 0.0.0.0 OSC listen address
OSCMIX_SERVER_OSC_LISTEN_PORT 9001 OSC listen port
OSCMIX_SERVER_OSC_ACCEPT_FROM (empty) Additional allowed OSC senders
OSCMIX_SERVER_OSC_LISTEN_BUFFER_BYTES 4194304 (Pi: 16 MiB) UDP receive buffer size
HTTP
OSCMIX_SERVER_HTTP_LISTEN_ADDRESS 0.0.0.0 HTTP bind address
OSCMIX_SERVER_HTTP_LISTEN_PORT 8765 HTTP port
Security
OSCMIX_SERVER_HTTP_ACCESS_MODE lan lan / local / list / any
OSCMIX_SERVER_HTTP_ACCESS_LIST (empty) Allowed addresses for list
OSCMIX_SERVER_HTTP_AUTH_TOKEN (empty) Bearer token for HTTP
OSCMIX_SERVER_HTTP_TLS_CERT (empty) TLS certificate file
OSCMIX_SERVER_HTTP_TLS_KEY (empty) TLS key file
mDNS
OSCMIX_SERVER_MDNS_ENABLED true Announce and discover instances
OSCMIX_SERVER_MDNS_NAME <device>@<host>:<port> Announced instance name
Data
OSCMIX_SERVER_DATA_DIR OS-specific Persistent data directory
OSCMIX_SERVER_INSTANCE default Instance name (shared data dir)
Expert
OSCMIX_SERVER_MCP_GET_CHANNEL_WAIT_MS 250 MCP get_channel wait time
OSCMIX_SERVER_MCP_CONFIRM_TIMEOUT_MS 400 MCP echo confirm timeout
OSCMIX_SERVER_WEB_RELAYOUT_WAIT_MS 180 Stereo re-group delay
Developer
OSCMIX_SERVER_DEBUG_ENABLED false Raw cache dump (/debug/cache)

Data directory defaults: ~/Library/Application Support/de.sndtek.oscmix-server/data/ (macOS), $XDG_CONFIG_HOME/de.sndtek.oscmix-server/data/ or ~/.config/de.sndtek.oscmix-server/data/ (Linux).

Security

  • By default, only clients from the local network (lan: loopback, link-local and private ranges) may connect.
  • Can be adjusted quite granular and flexible
  • Set an auth token (random string, at least 32 characters recommended) as soon as anyone besides you can reach the server.
  • If you ever expose the server beyond the LAN, TLS plus an auth token is strongly recommended.
  • The OSC listen port is the one way to change the mixer state without a token. However, ACLs can be set to allow only certain sources to connect. Limit as far as needed.

Known limitations

  • TotalMix FX: everything TM offers via "Global OSC" works, but TM itself is limited there: the Offline Device shows no levels, recorder control is limited, and only post-FX levels are sent.
  • ALSA ctl plugin: can't run at the same time as oscmix (the device is locked while it is being controlled). Currently UFX III only.
  • iOS: while oscmix runs on iPhone/iPad, the server doesn't (yet).
  • Windows: oscmix never compiled/tested on win (but should be doable). Same for server. TM on Windows and browser clients work.
  • Snapshots: currently JSON only, TM's .tmss format is in work.
  • Qt UI, GTK UI: not yet adapted to v2.

To Do

  • Port the server to native C (already started) - this reduces the node-related bloat.
  • Configuration UI for Linux (macOS already has one). Done.
  • iOS is possible, works - but currently not in focus (let me know if you need it).
  • Support for TM's .tmss snapshot format (in progress).
  • Adapt Qt UI, GTK UI to v2.
  • Optimize the web mixer's HTTP code (e.g. avoid unnecessary rendering of levels). Done.
  • User Access level definitions to certain controls/submixes/etc.. with some auth mechanism.
  • Adapt further devices (BBF variants: started investigations)