A tiny macOS command-line tool that routes one CoreAudio input device to one output device, with a live stereo VU meter. Useful for monitoring a mic in headphones, sending an interface's input straight to speakers, or any quick "patch this into that" without launching a DAW.
While running it sets your system default input/output to the chosen devices, then restores them on exit.
- Jam from a USB synth without a DAW — patch the synth's USB audio into your built-in speakers and just play.
- Feed an app via BlackHole — route any input into BlackHole so OBS, QuickTime, or a recorder can capture it.
- Quick mic / instrument monitor — patch your audio interface input into headphones for a fast soundcheck without launching Logic or Ableton.
Prebuilt universal binary (Apple Silicon + Intel, macOS 12+):
curl -L https://github.com/jidagraphy/patchaudio/releases/latest/download/patchaudio-darwin-universal.tar.gz \
| tar -xz && sudo mv patchaudio /usr/local/bin/
Or build from source — see below.
Requires the Swift toolchain (Xcode or Command Line Tools).
make # debug build → ./patchaudio
make release # universal binary (arm64 + x86_64) → bin/patchaudio
make install # builds release and copies to /usr/local/bin
make clean
Interactive (pick devices from a list):
./patchaudio
Non-interactive (substring match against device names):
./patchaudio -i "scarlett" -o "airpods"
Optional flags:
-i <name>— input device, matched by case-insensitive substring-o <name>— output device, matched by case-insensitive substring--buffer <frames>— request a specific buffer frame size (e.g.64,128,256)
Press Ctrl+C to stop. Your previous default devices are restored.
- First run will prompt for microphone access. Grant it in System Settings → Privacy & Security → Microphone.
- Picking the built-in mic together with the built-in speakers will trigger a double feedback-warning prompt before starting.
This was vibe-coded — built quickly with heavy AI assistance, not exhaustively reviewed or tested across hardware. It pokes at low-level CoreAudio APIs and reroutes your system default input/output devices while running. Use at your own risk: turn your volume down before first run, avoid mic-into-speakers combinations (it'll feed back), and don't rely on it in any setting where audio failure has real cost.
MIT — see LICENSE.