Skip to content

Add safe production controls for Live 12 workflows - #119

Open
mateogon wants to merge 7 commits into
ahujasid:mainfrom
mateogon:feat/production-control-mvp
Open

Add safe production controls for Live 12 workflows#119
mateogon wants to merge 7 commits into
ahujasid:mainfrom
mateogon:feat/production-control-mvp

Conversation

@mateogon

@mateogon mateogon commented Aug 3, 2026

Copy link
Copy Markdown

Summary

This pull request extends the existing AbletonMCP socket bridge and Remote
Script with the production controls needed to inspect a Live set, make guarded
sound and mixer changes, compare Session variants, and update Arrangement
without introducing a parallel service or generic UI automation.

The main goal is to make mutations fail closed. Positional selectors are paired
with expected names or class names, batch operations perform a complete
preflight before applying changes, and supported mutations return resolved
targets plus previous, requested, and applied state.

What changed

  • Added runtime capability probes for the Live version and the LOM operations
    actually available in the running version of Live.
  • Added mixer reads and guarded single/batch updates for volume, panning, sends,
    mute, solo, and arm across regular tracks, return tracks, and Main where the
    API supports them.
  • Added device parameter reads and guarded single/batch updates, including
    nested racks and chains, continuous parameters, quantized parameters, and
    mandatory readback.
  • Replaced blind MIDI note writes with the modern extended note APIs when
    available. Note replacement validates the full request, snapshots the prior
    notes, rereads and compares the result, and restores the snapshot on failure.
  • Added clip note/property reads, loop updates, note clearing, and strictly
    identified Session clip deletion.
  • Added Session clip and scene duplication with all-destination preflight,
    explicit track subsets, scene firing, quantized stop-all, and
    back-to-Arrangement support.
  • Reinforced Session-to-Arrangement duplication and added deletion of exactly
    one strictly identified Arrangement clip.
  • Added track/Main output meter reads.
  • Added structured remote errors and command-specific main-thread mutation
    timeouts.
  • Pinned mcp[cli]==1.4.0 and refreshed the lock file so the package cannot
    silently upgrade to an incompatible MCP SDK version.
  • Restored telemetry configuration ownership with an environment-backed source
    module. New tools use basic telemetry only and do not add parameter, device
    path, clip-name, or MIDI-note payloads.

Why

The existing bridge already owned Live mutations, but several common production
tasks still required manual UI control: adjusting bass and lead timbre, changing
device parameters, replacing MIDI notes, preparing A/B scenes, controlling clip
loops, and inserting or removing a test section in Arrangement.

The underlying safety gap was broader than those individual tasks: many targets
were selected by index alone, note writes did not provide transactional
verification, and occupied or ambiguous destinations could not be handled with
a reliable recovery guarantee. This change strengthens those existing owners
instead of adding a second bridge.

Safety behavior

  • Track, clip, device, chain, parameter, and Arrangement selectors verify both
    position and expected identity before mutation.
  • dry_run is available for mutation preflight and overwrite defaults to
    false.
  • Batch operations validate every target before changing any target.
  • Stale expected values and identity mismatches return structured errors without
    modifying Live.
  • Parameter and MIDI mutations perform mandatory readback.
  • MIDI replacement restores the previous note snapshot if verification fails.
  • Arrangement deletion requires exactly one match; zero or multiple matches are
    errors.

Validation

This was validated end to end against Ableton Live 12.2.1, not only with mocks:

  • Direct socket calls through 127.0.0.1:9877.
  • MCP stdio negotiation, discovery of 42 tools, and an end-to-end
    get_capabilities call into Live.
  • Initial snapshots of eight tracks, mixer state, device state, Session slots,
    and Arrangement.
  • Small mixer and device parameter changes followed by exact restoration.
  • Synthetic [MCP TEST] MIDI clips used for replace/read/compare/clear and clip
    cleanup.
  • Clip and subset-scene duplication into discovered empty destinations, plus
    expected occupied-destination and identity-mismatch failures.
  • Scene launch, quantized/immediate stop-all, and back-to-Arrangement behavior.
  • Synthetic Arrangement insertion after the end of the song, followed by strict
    deletion of only that clip.
  • Final comparisons confirmed tracks, Arrangement, mixer, and device state were
    equal to the initial snapshots, with no cleanup errors.

Local checks:

  • 28 passed
  • py_compile
  • uv lock --check
  • git diff --check

Deliberate limitations

  • Arrangement replace and trim are not exposed because Live 12.2.1 does not
    provide a recoverable transaction that can guarantee those operations.
  • Occupied Session destinations are not overwritten; callers must choose an
    empty destination.
  • Session clip envelope replacement is not included in this MVP.
  • Export dialogs, plugin-specific UIs, licensing, auditory evaluation, and
    generic macOS automation remain out of scope.

Detailed installation, rollback, command, telemetry, and unsupported-operation
notes are included in docs/production-control-mvp.md.

@mateogon
mateogon marked this pull request as ready for review August 3, 2026 13:57
@ahujasid
ahujasid force-pushed the main branch 2 times, most recently from 46f3be4 to babc39d Compare August 16, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant