macOS port: rewrite as pure-Python menu bar app#1
Merged
Merged
Conversation
added 22 commits
April 9, 2026 14:40
- Create linkbridge/ package with version stub - Create tests/ and pytest.ini - Move Linux C + Python sources into legacy/ - Replace requirements.txt with rumps/mido/python-rtmidi/aalink - Add requirements-dev.txt for pytest
- Clock stream runs unconditionally once a port is set - Toggleable MIDI START/STOP on Link transport transitions - Gracefully drops device on send failure instead of crashing - Drift-compensated absolute-time scheduling (port from Linux clock.py) - Synchronous _tick_once() allows full TDD without real threads
…BarApp in entry point
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the Linux/ALSA implementation with a pure-Python macOS menu bar
app that forwards Ableton Link tempo to a hardware MIDI clock output.
The original C/ALSA sources are archived under
legacy/and not deleted.What's new
linkbridge/Python package — single-process menu bar app withthree threads sharing a lock-guarded
ClockState:link_monitor.py—aalinkcallback wrapper, runs an asyncio loopon a daemon thread, pushes tempo and transport into shared state
clock_engine.py— 24 ppqn MIDI clock generator withdrift-compensated absolute-time scheduling, transport sync, graceful
device-disappearance handling
app.py—rumpsmenu bar UI with device picker, Start/Stop toggle,refresh, and quit
settings.py— JSON store at~/Library/Application Support/LinkBridge/with corrupt-file recovery
midi_output.py— thinmido/python-rtmidiwrappers for CoreMIDIpytest) covering Settings, MidiOutput, andClockEngine using injected fake clocks / fake MIDI sinks; no hardware
or Link peer required.
py2apppackaging —setup.py+scripts/build_app.shproducedist/LinkBridge.app, an unsigned menu-bar-only bundle (LSUIElement,arm64 native, ~50 MB).
assets/LinkBridge.icnsplus the source PNG anda regeneration script (
scripts/build_icon.py) using Pillow + iconutil.hardware notes for Novation Circuit Tracks, and a clear explanation of
Rekordbox's one-way Link constraint and the manual workflow it
requires.
Verified end-to-end
fire correctly
~1% drift over 2 s windows (matches the original Linux Python loop)
enters SYN mode and follows the streamed tempo in real time
.applaunches from Finder, registers for local networkpermission, opens last-used MIDI device, persists settings across
launches
Test plan
Notes