# Phase 96b — Ableton Link (Deferred) This phase is **deferred**. Phase 96a (MIDI Clock follow) is implemented and merged. --- ## Goal Peer-to-peer beat and tempo synchronisation over a local network (LAN/WiFi) using the Ableton Link open-source SDK. Multiple apps on the same network share a common timeline and tempo without a designated leader — any participant can change tempo and all others follow. --- ## Shape The integration would follow the same pattern as `MIDIClockFollower` (Phase 96a): ```swift public final class AbletonLinkFollower: @unchecked Sendable { public init(engine: SynthesisEngine, clock: LyrebirdClock, quantum: Double = 4.0) public func start() throws public func stop() public var sessionTempo: Double { get } public var isConnected: Bool { get } } ``` `AbletonLinkFollower.start()` connects to the Link session and begins pushing session tempo changes to `clock.bpm`. The `quantum` (default 4 beats) defines the phase-sync window. On `.start()`, the follower aligns the local `LyrebirdClock` beat phase to the Link session timeline. --- ## Prerequisites - **Ableton Link C++ SDK** (`ableton/link`, Apache 2.0) as a SwiftPM binary or source dependency. The SDK's `ABLLink.h` C bridging header or Swift overlay must be added to `Package.swift`. - A thin C or C++ wrapper to call Link from Swift (the SDK is header-only C++; a minimal shim is needed to expose an Objective-C or C-compatible interface). - Network capability entitlements on macOS/iOS (Bonjour + peer-to-peer networking). --- ## Effort estimate High. The main complexity is the C++/Swift FFI for the Link SDK and testing peer-to-peer behaviour without dedicated hardware (requires at least two simulators or devices on the same LAN). --- ## References - [Ableton Link SDK](https://github.com/Ableton/link) — Apache 2.0 open source - [Link API overview](https://ableton.github.io/link/) - Phase 96a implementation: `Sources/Lyrebird/MIDI/Sync/MIDIClockFollower.swift` - Related: `docs/tooling/midi-clock-sync.md`