Virtual MIDI Cable on Mac, Windows, Linux
Blog Internals 9 min read

Virtual MIDI Ports on macOS, Windows, and Linux — Explained

Set up a virtual MIDI cable on macOS, Windows or Linux. What each OS gives you for free, what you have to install, and why some add 14 ms and some add 1.

By Aidxn Design

Every gamepad-to-MIDI bridge in existence depends on the same trick: a virtual MIDI port. The bridge writes MIDI bytes into the port, the DAW reads MIDI bytes out the other side, and as far as the DAW is concerned a piece of physical hardware is plugged in. Behind that simple abstraction is a wildly different implementation on each operating system — and the differences explain why Linux is 1 ms, macOS is 2 ms, and Windows is occasionally 14 ms with no obvious reason. Behold: the unglamorous plumbing under every modern MIDI rig.

If you landed here because a port is not showing up, skip the theory and go to the troubleshooting guide — it is almost always one of four causes. If you just want a gamepad working in a DAW, the Ableton page, Resolume and TouchDesigner each cover the setup end to end. This page is the why underneath all of them.

TL;DR
  • macOS: CoreMIDI's built-in inter-application bus. Kernel-side, single-digit microseconds, rock solid.
  • Windows: WDM kernel driver (new MIDI Services on 11 24H2) or a userland shim. Variable, 2–14 ms.
  • Linux: ALSA's snd-virmidi module plus aconnect. Fastest of the three, ~0.4 ms.
  • What the bridge does: on macOS it makes its own virtual MIDI port natively. On Windows its one-click setup wires the DAW routing on first launch. On Linux it uses ALSA sequencer ports — no install.

What is a virtual MIDI port

A MIDI port is a unidirectional byte stream. A physical MIDI port is a 5-pin DIN cable carrying 31,250-baud serial. A virtual MIDI port is an OS-provided pipe that looks identical to applications but is backed by software on both ends instead of a cable. Writes from process A become reads in process B, in order, with whatever latency the OS scheduler imposes. That's it. There is no magic.

The reason virtual ports exist is that without them, you cannot route MIDI between two pieces of software on the same machine without buying physical loopback hardware. With them, every app on the system can act as either a MIDI source or a MIDI sink. Gamepad bridges, software synths, DAWs, and even web browsers (via Web MIDI) all rely on the same infrastructure.

macOS — CoreMIDI and the built-in inter-application bus

Apple has shipped CoreMIDI since OS X 10.0 in 2001. It includes a built-in inter-application virtual driver that runs in kernel space, exposes configurable ports, and routes bytes between any CoreMIDI client with sub-millisecond latency. On an M-series Mac you can measure round-trip times of ~600 microseconds between two userland processes.

# List every MIDI device CoreMIDI can see
system_profiler SPMIDIDataType

# Create a virtual source from a Python script using rtmidi
import rtmidi
out = rtmidi.MidiOut()
out.open_virtual_port("UCMIDI Test")
out.send_message([0x90, 60, 100])  # note on C4 velocity 100

Notice that on macOS you can create virtual sources from userland without touching the kernel — CoreMIDI exposes MIDIClientCreate and MIDISourceCreate APIs that any app can call. The bridge uses these directly — it makes its own virtual MIDI port natively, so the built-in bus is optional.

Windows — the WDM driver mess

Windows is the painful one. Until recently there was no virtual MIDI driver in the box at all, so every app either asked you to install one yourself or shipped a signed kernel-mode driver of its own — and driver signing is genuinely a nightmare to ship. Microsoft addressed this in Windows 11 24H2 with Microsoft MIDI Services, which finally provide a real virtual-port API.

Universal Controller MIDI deals with this by making Windows setup a single action: the app's one-click setup wires the DAW routing on first launch, so the port your DAW needs is visible the first time you open it. No utility hunt, no driver-signing drama passed on to you.

If that setup is blocked, the port will not appear. The two causes worth knowing: MSIX sandboxing, which stops a packaged app touching system-level MIDI plumbing at all, and endpoint security agents that block it silently. In either case, route through any existing virtual MIDI output instead — the bridge is happy to use one. The Windows virtual MIDI driver guide covers the diagnosis in full.

# List the MIDI devices Windows can see
Get-PnpDevice -Class "MEDIA" | Where-Object FriendlyName -like "*MIDI*"

# Round-trip latency probe (PowerShell, requires the bridge running)
.\ucmidi.exe diag loopback --samples 1000
Get Universal Controller MIDI Pro — $89 →

Linux — ALSA sequencer and snd-virmidi

Linux wins this category and it isn't close. ALSA's snd-virmidi kernel module exposes raw MIDI device nodes that the ALSA sequencer routes between clients. Round-trip latency is dominated by the scheduler — on a PREEMPT_RT kernel it's reliably under 400 microseconds. You can route ports with one shell command:

# Load two virtual MIDI devices
sudo modprobe snd-virmidi midi_devs=2

# List sequencer clients
aconnect -l

# Route the bridge output (client 128) to fluidsynth input (client 129)
aconnect 128:0 129:0

# Watch the bytes flow
aseqdump -p 128

The bridge on Linux uses ALSA sequencer ports directly, no kernel module needed. If you want a fixed device node, modprobe snd-virmidi and the bridge will attach to it instead.

Why latency differs so wildly

Three factors:

  • Kernel vs userland. Kernel-mode drivers avoid context switches. The macOS inter-application bus and Linux snd-virmidi are both kernel. A userland shim on Windows crosses the kernel boundary twice for every byte.
  • Scheduling latency. macOS uses a high-priority Mach thread for MIDI. Windows uses regular user threads unless you opt into MMCSS. Linux PREEMPT_RT preempts everything for audio.
  • Buffering policy. Some drivers batch up to 1 ms of MIDI before flushing. CoreMIDI flushes immediately. Older Windows drivers batch.

How Universal Controller MIDI picks the right path

On launch, the bridge probes the OS and picks the fastest virtual-port API available:

switch (os.platform()) {
  case 'darwin':
    return new CoreMIDIVirtualSource('UCMIDI Out');     // ~0.6 ms
  case 'win32':
    if (hasMidiServices()) return new MidiServicesPort('UCMIDI Out');  // ~1.2 ms
    return new UmpDrvPort('UCMIDI Out');                 // ~2.4 ms
  case 'linux':
    return new AlsaSeqPort('UCMIDI Out');                // ~0.4 ms
}

Pro users can override the transport in Settings → Advanced, but the defaults are tuned for lowest latency on each platform.

Can two applications read the same port?

This is where the three platforms diverge most, and it catches people out because the answer is genuinely different depending on which machine you tested on.

On macOS, CoreMIDI is multi-client by design. Several applications can open the same inter-application bus at once and all of them receive the same stream. On Linux, the ALSA sequencer is built around arbitrary many-to-many connections, so this is not just possible but the normal way of working — you wire sources to sinks explicitly.

On Windows, the classic MIDI stack has traditionally been exclusive: one application opens a port and everyone else gets a device-in-use error. This is the single most common reason a setup that worked fine on a Mac mysteriously fails on a Windows machine. The practical workaround is multiple named ports rather than one shared one — which is what you want anyway if you are routing one controller into two DAWs.

Limitations and gotchas

  • Live caches the port list at startup. Add the virtual port before launching the DAW or restart after.
  • FL Studio on Windows ignores the device until you hit "Rescan MIDI devices" in Options.
  • Linux PipeWire wraps ALSA but adds ~200 microseconds. Disable the PipeWire MIDI bridge if you need absolute minimum latency.
  • Bluetooth MIDI is not a virtual port. It's a real transport with its own 7–11 ms cost on top.

Virtual MIDI ports are the most boring, most important piece of plumbing in modern music software. Universal Controller MIDI picks the fastest one on your OS automatically — you don't need to think about it, but if you ever wondered why your latency numbers looked the way they did, that's why. Free to try on Mac, Windows and Linux.

Get more Universal Controller MIDI in Google Search, Discover and AI results.

Keep reading

More setup walkthroughs