Skip to content

Add arrangement duplication, browser search, device control, and batch commands - #97

Open
vanjaoljaca wants to merge 12 commits into
ahujasid:mainfrom
vanjaoljaca:codex/duplicate-scene-to-arrangement
Open

Add arrangement duplication, browser search, device control, and batch commands#97
vanjaoljaca wants to merge 12 commits into
ahujasid:mainfrom
vanjaoljaca:codex/duplicate-scene-to-arrangement

Conversation

@vanjaoljaca

@vanjaoljaca vanjaoljaca commented May 20, 2026

Copy link
Copy Markdown

Summary

  • Add Remote Script and MCP commands for duplicating Session clips/scenes into Arrangement.
  • Add back_to_arrangement and stop_all_clips helpers with readback verification.
  • Add browser search and URI-based browser item loading with device readback, so agents can discover and load instruments/effects reliably.
  • Add device parameter introspection and setting by index or name.
  • Add a simple explicit-params execute_batch API for bundling multiple known-index commands into one socket call.
  • Add export_audio command surface, but hard-fail it as unimplemented rather than returning a soft unsupported success-shaped payload.

Details

  • duplicate_clip_to_arrangement(track_index, scene_index, start_time) copies one Session clip to Arrangement using track.duplicate_clip_to_arrangement.
  • duplicate_scene_to_arrangement(scene_index, start_time, track_indices?) copies clips from a Session scene into Arrangement, skipping empty slots.
  • Duplication responses include arrangement clip counts before/after so callers can verify that content was actually created.
  • stop_all_clips and back_to_arrangement verify Live state on a later Remote Script tick, because Live does not update the relevant state synchronously inside the same callback.
  • search_browser_items(query, category?, max_results?) searches Ableton browser names/paths and returns {name, path, uri, is_loadable, is_device} results.
  • Browser search now includes plugins, max_for_live, packs, and user_library roots in addition to the built-in instrument/effect categories.
  • load_browser_item_by_uri(track_index, uri) exposes URI loading through MCP, while the underlying Remote Script load_browser_item now returns devices_before, devices_after, new_devices, and device counts.
  • get_device_info(track_index, device_index) and get_device_parameters(track_index, device_index) expose device metadata and automatable parameters.
  • set_device_parameter(...) and set_device_parameter_by_name(...) set parameters and return before/after readback.
  • execute_batch(commands, stop_on_error?) executes simple explicit-index command lists. It intentionally does not support result references yet.
  • Existing load_instrument_or_effect(track_index, uri) benefits from the same verified device readback.

Validation

Tested against Ableton Live through the localhost Remote Script socket, checking actual Live state rather than only response success flags:

  • duplicate_clip_to_arrangement: test clip duplicated into Arrangement, arrangement clip count increased 0 -> 1.
  • duplicate_scene_to_arrangement: test scene/track duplicated into Arrangement, arrangement clip count increased 1 -> 2.
  • stop_all_clips: response showed a real playing Session clip in playing_before and playing_after: [] after the command.
  • back_to_arrangement: response showed back_to_arranger_before: true, back_to_arranger_after: false, and no Session clips still playing.
  • search_browser_items: searched Drift in instruments and found loadable URI query:Synths#Drift.
  • load_browser_item: loaded query:Synths#Drift onto a fresh MIDI track; device count increased 0 -> 1, new_devices: ["Drift"], and get_track_info showed the added Drift device.
  • MCP wrapper search_browser_items plus load_browser_item_by_uri: returned the same loadable Drift URI and verified device count 0 -> 1 on a fresh track.
  • Existing MCP wrapper load_instrument_or_effect: loaded query:Synths#Drift and reported New devices: Drift.
  • get_device_info and get_device_parameters: returned Drift metadata and exposed parameters including LP Freq.
  • set_device_parameter: changed Drift LP Freq from 1.0 to about 0.33 with readback.
  • set_device_parameter_by_name: restored Drift LP Freq by parameter name with readback.
  • execute_batch: explicit-index batch renamed a track, loaded Drift, read parameters, and set LP Freq; batch returned per-command success and verified load/parameter results.
  • MCP wrapper tests passed for get_device_parameters, set_device_parameter, set_device_parameter_by_name, execute_batch, and create_audio_track.
  • Plugin root smoke test on the Codex user account: search_browser_items(..., category="plugins") is accepted, but that local Ableton install had no third-party plugins exposed.
  • Plugin validation on the vanjaoljaca account using the same patched script on a separate test socket port (9878, local test setup only):
    • search_browser_items("Kontakt", category="plugins"): 6 loadable results, including AUv2/VST3 Kontakt, Kontakt 7, and Kontakt 8 URIs.
    • search_browser_items("Native", category="plugins"): 20 results, 18 loadable.
    • search_browser_items("Massive", category="plugins"): 4 loadable results.
    • search_browser_items("Guitar", category="plugins"): 4 loadable results.
    • search_browser_items("Reaktor", category="plugins"): 4 loadable results.
    • Loaded query:Plugins#AUv2:Native%20Instruments:Kontakt onto a fresh MIDI track; device count increased 0 -> 1, new_devices: ["Kontakt"], and get_track_info reported class_name: AuPluginDevice.
    • get_device_parameters on Kontakt succeeded; Live exposed only Device On for that plugin instance, so no safe non-quantized Kontakt parameter was available to set.
    • Built-in Drift on the same account exposed 66 parameters, and set_device_parameter_by_name("LP Freq", 0.25) read back value_after: 0.25 with success: true.
  • export_audio: returns socket status: error with export_audio is not implemented by AbletonMCP.
  • python3 -m py_compile AbletonMCP_Remote_Script/__init__.py MCP_Server/server.py

Summary by CodeRabbit

  • New Features
    • Browser item search and URI-based loading with richer before/after feedback
    • Device inspection and parameter control (by index and by name)
    • Batch command execution for multi-step operations
    • Clip/scene duplication into the Arrangement; create audio tracks/scenes
    • Stop-all-clips and return-to-arrangement controls with verification
    • Audio export rendering options
    • Tool to list supported commands

@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 67bc89f8-ac41-4124-b71d-22201a170642

📥 Commits

Reviewing files that changed from the base of the PR and between 738de22 and 87357e6.

📒 Files selected for processing (1)
  • AbletonMCP_Remote_Script/__init__.py

📝 Walkthrough

Walkthrough

Adds many new remote commands and MCP tools: browser search/load, device parameter inspection/control (by index/name), execute_batch, session track/scene/clip creation, duplication into arrangement, stop/back-to-arrangement flows with verification, and an export_audio placeholder; routes many mutating commands through main-thread scheduling and verification helpers.

Changes

Ableton Remote Control Expansion

Layer / File(s) Summary
Command registry and routing infrastructure
AbletonMCP_Remote_Script/__init__.py, MCP_Server/server.py
New SUPPORTED_COMMANDS entries, expanded modifying-command list in send_command, client-handler exception adjustments, and routing of new commands into the main-thread execution path.
Main thread handlers and support utilities
AbletonMCP_Remote_Script/__init__.py
main_thread_task handles device parameter setters, execute_batch, duplication-to-arrangement, deferred verification for loads/transport, and export_audio placeholder; many helpers added for safe attribute access, device/clip-slot snapshotting, inserted-device detection, parameter serialization/verification, batch dispatch, and browser traversal/search.
Session structure: tracks, scenes, clips
AbletonMCP_Remote_Script/__init__.py, MCP_Server/server.py
Adds _create_audio_track, scene creation/append with naming and scene-count context, _create_clip auto-append behavior when index equals slot count, and delegates device enumeration via _get_track_devices; MCP tools expose create/list/append operations.
Device parameter inspection & control, browser search/load
AbletonMCP_Remote_Script/__init__.py, MCP_Server/server.py
Adds search_browser_items API, broadened browser root traversal, _load_browser_item with pre/post snapshots and _verify_load_browser_item, device info/parameter endpoints, parameter setters (index/name) with readback verification, and execute_batch tooling.
Arrangement operations and transport control
AbletonMCP_Remote_Script/__init__.py, MCP_Server/server.py
Implements duplication of clips/scenes into the Arrangement, captures playing Session clips, back-to-arrangement toggling with verification, stop-all-clips with verification, and an export_audio placeholder; MCP tools added for these actions.
Server entrypoint
MCP_Server/server.py
Minor adjustment to __main__ invocation to ensure correct entry behavior.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant MCP_Server
  participant AbletonMCP
  participant Live
  Client->>MCP_Server: MCP tool request (e.g., set_device_parameter, search_browser_items)
  MCP_Server->>AbletonMCP: send_command / forward remote command
  AbletonMCP->>AbletonMCP: enqueue main-thread task (response_queue)
  AbletonMCP->>Live: main_thread_task executes command (device/set/duplicate/load)
  Live-->>AbletonMCP: state changes / device/clip snapshots
  AbletonMCP->>AbletonMCP: verify (deferred) and build response
  AbletonMCP-->>MCP_Server: JSON result or error
  MCP_Server-->>Client: formatted response
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

"I hopped through folders, tiny paws on keys,
I fetched new commands and rustled plugin trees,
I stitched scenes to arrangement, verified with care,
Searched the browser's depths and set a parameter there,
A happy rabbit spins the session, ears in air." 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: arrangement duplication, browser search, device control, and batch commands are all prominently featured in the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 93.33% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vanjaoljaca
vanjaoljaca force-pushed the codex/duplicate-scene-to-arrangement branch from f7c3874 to 8b264f6 Compare May 20, 2026 07:27
@vanjaoljaca
vanjaoljaca marked this pull request as ready for review May 31, 2026 14:24
@qodo-code-review

Copy link
Copy Markdown

Review Summary by Qodo

Add arrangement duplication, browser search, device parameters, and batch commands

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add Session-to-Arrangement duplication with clip/scene copying and verification
• Add browser search, device introspection, and parameter setting by index/name
• Add simple batch command execution API for bundling multiple commands
• Add audio export command surface (hard-fail as unimplemented)
• Add scene creation, audio track creation, and improved clip creation with auto-scene
• Implement deferred response verification for state-dependent operations
Diagram
flowchart LR
  Session["Session Clips/Scenes"]
  Arrangement["Arrangement Timeline"]
  Browser["Browser Search"]
  Device["Device Parameters"]
  Batch["Batch Executor"]
  
  Session -->|duplicate_clip_to_arrangement| Arrangement
  Session -->|duplicate_scene_to_arrangement| Arrangement
  Browser -->|search_browser_items| Results["Search Results"]
  Results -->|load_browser_item_by_uri| Device
  Device -->|set_device_parameter| Verify["Readback Verification"]
  Batch -->|execute_batch| MultiCmd["Multiple Commands"]

Loading

Grey Divider

File Changes

1. AbletonMCP_Remote_Script/__init__.py ✨ Enhancement +903/-22

Add duplication, device control, batch API, and browser search

• Add SUPPORTED_COMMANDS list exposing all available command names
• Implement _duplicate_clip_to_arrangement() and _duplicate_scene_to_arrangement() with
 arrangement clip count verification
• Add _back_to_arrangement() and _stop_all_clips() with deferred verification callbacks
 scheduled 2 ticks later
• Implement _get_device_info(), _get_device_parameters(), _set_device_parameter(), and
 _set_device_parameter_by_name() for device introspection and control
• Add _execute_batch() for bundling explicit-index commands with optional error stopping
• Implement _export_audio() that raises NotImplementedError rather than soft-failing
• Add _create_audio_track() and _create_scene() with optional naming
• Enhance _create_clip() to auto-create scenes when clip_index equals clip_slots length
• Refactor _load_browser_item() to include device/clip readback and add
 _verify_load_browser_item() with deferred verification
• Add search_browser_items() with recursive depth-limited search across all browser roots
 including plugins, max_for_live, packs, user_library
• Extract _get_track_devices() helper and add device comparison logic via _device_key() and
 _find_inserted_devices()
• Add clip slot tracking helpers _get_clip_slot_summary() and _find_new_clips() for load
 verification
• Add parameter introspection helpers _get_parameter_info(), _safe_getattr(), and
 _get_browser_roots()
• Extend _find_browser_item_by_uri() to search plugins, max_for_live, packs, user_library
 categories

AbletonMCP_Remote_Script/init.py


2. MCP_Server/server.py ✨ Enhancement +383/-4

Add MCP tools for new Remote Script commands

• Add list_supported_commands() tool to expose available command names
• Add create_audio_track() and create_scene()/append_scene() tools for scene management
• Add search_browser_items() tool for browser search with category filtering
• Add load_browser_item_by_uri() tool for URI-based browser item loading with device readback
• Add get_device_info() and get_device_parameters() tools for device introspection
• Add set_device_parameter() and set_device_parameter_by_name() tools for parameter control
• Add execute_batch() tool for bundling multiple commands
• Add duplicate_clip_to_arrangement() and duplicate_scene_to_arrangement() tools for
 Session-to-Arrangement copying
• Add back_to_arrangement() and stop_all_clips() tools for playback control
• Add export_audio() tool with full parameter surface (currently unimplemented)
• Update send_command() modifying-command list to include new state-changing operations
• Fix load_instrument_or_effect() response handling to extract device names from device objects

MCP_Server/server.py


Grey Divider

ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented May 31, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Batch load verified too early ✓ Resolved 🐞 Bug ≡ Correctness
Description
In execute_batch, load_browser_item/load_instrument_or_effect calls _verify_load_browser_item
immediately, while the normal command path defers verification via schedule_message(4, ...) before
responding. This inconsistency can return loaded=false/error for loads that would succeed when
executed outside execute_batch.
Code

AbletonMCP_Remote_Script/init.py[R1545-1548]

Evidence
The normal command path defers load verification by scheduling _verify_load_browser_item on a
later tick, but execute_batch verifies immediately for the same command types, creating
inconsistent and likely incorrect outcomes in batch mode.

AbletonMCP_Remote_Script/init.py[406-427]
AbletonMCP_Remote_Script/init.py[1545-1548]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`execute_batch` performs immediate readback verification for `load_browser_item` / `load_instrument_or_effect`, but the regular command path explicitly defers verification to a later tick. This causes inconsistent semantics and can produce false negatives in batch execution.
## Issue Context
The Remote Script uses deferred responses for load commands by scheduling verification on a later tick (suggesting same-tick readback is unreliable). `execute_batch` currently bypasses that deferral and verifies synchronously.
## Fix Focus Areas
- Decide on consistent semantics for loads in `execute_batch`:
- Option A (safest): disallow `load_browser_item` / `load_instrument_or_effect` inside `execute_batch` (raise a clear error) because they require deferred verification.
- Option B: return an *unverified* load result in batch and require callers to explicitly verify via a follow-up command (e.g., `get_track_info`/new verify command).
- Option C: implement a batch-friendly deferred verification mechanism that does **not** block Live’s main thread (e.g., split into async job IDs + polling).
- file/path[start_line-end_line]
- AbletonMCP_Remote_Script/__init__.py[406-427]
- AbletonMCP_Remote_Script/__init__.py[1545-1548]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Browser search traversal brittle ✓ Resolved 🐞 Bug ☼ Reliability
Description
search_browser_items recursively traverses browser children and does not isolate per-node failures
(e.g., exceptions reading children/name), so one problematic node can fail the entire search. For
rare queries it may also traverse a large portion of the tree before finding matches, blocking the
request handler longer than expected.
Code

AbletonMCP_Remote_Script/init.py[R1604-1622]

Evidence
The new recursion iterates item.children and reads child.name without per-node try/except; any
exception during traversal bubbles up and fails search_browser_items, and the traversal may cover
many nodes before collecting matches when the query is uncommon.

AbletonMCP_Remote_Script/init.py[1604-1622]
AbletonMCP_Remote_Script/init.py[1884-1933]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The recursive browser search walks `item.children` depth-first with only depth/result caps and no per-node exception handling. A single Live API exception while reading `children` or `name` can abort the whole search, and rare queries may still require large traversal.
## Issue Context
`search_browser_items` calls `_search_browser_item` across multiple large roots (including packs/user library), and `_search_browser_item` reads `child.name` and iterates `item.children` without try/except around those operations.
## Fix Focus Areas
- Add per-node exception isolation in `_search_browser_item` so one failing node is skipped rather than failing the entire search.
- Consider adding an explicit traversal budget (e.g., max nodes visited and/or time budget) in addition to `max_depth`/`max_results`.
- Prefer safe attribute access (`_safe_getattr`) or guarded reads for `children` and `name`.
- file/path[start_line-end_line]
- AbletonMCP_Remote_Script/__init__.py[1604-1622]
- AbletonMCP_Remote_Script/__init__.py[1884-1933]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Advisory comments

3. Supported commands list mismatched ✓ Resolved 🐞 Bug ⚙ Maintainability
Description
list_supported_commands returns a static SUPPORTED_COMMANDS list that does not include some commands
that the Remote Script still routes (e.g., get_browser_categories/get_browser_items). This makes
command discovery inaccurate for clients relying on list_supported_commands.
Code

AbletonMCP_Remote_Script/init.py[R20-53]

Evidence
The static SUPPORTED_COMMANDS list is returned verbatim, but _process_command still includes
additional command routing branches not represented in that list, so discovery does not reflect
actual behavior.

AbletonMCP_Remote_Script/init.py[20-53]
AbletonMCP_Remote_Script/init.py[455-465]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`SUPPORTED_COMMANDS` is used as the source of truth for `list_supported_commands`, but it does not match the actual set of routed commands in `_process_command`. This can mislead callers doing capability discovery.
## Issue Context
`_process_command` still contains routing branches for legacy browser commands that are not present in `SUPPORTED_COMMANDS`.
## Fix Focus Areas
- Either add the missing routed commands to `SUPPORTED_COMMANDS`, or remove/deprecate those routes so the list is accurate.
- Consider generating the list from a single authoritative registry to prevent drift.
- file/path[start_line-end_line]
- AbletonMCP_Remote_Script/__init__.py[20-53]
- AbletonMCP_Remote_Script/__init__.py[455-465]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@vanjaoljaca

Copy link
Copy Markdown
Author

Ready for review now; I moved this out of draft so the review automation can run.

@coderabbitai review

Validation is already detailed in the PR body. Headline checks: tested against Ableton Live through the localhost Remote Script socket, verified duplicate clip/scene to Arrangement via arrangement clip count changes, verified browser search/load and device parameter readbacks, and python3 -m py_compile AbletonMCP_Remote_Script/__init__.py MCP_Server/server.py passes.

@coderabbitai

coderabbitai Bot commented May 31, 2026

Copy link
Copy Markdown

@vanjaoljaca Sure, I'll kick off a full review of this PR now!

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Comment thread AbletonMCP_Remote_Script/__init__.py Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
AbletonMCP_Remote_Script/__init__.py (1)

1545-1548: 💤 Low value

Note: Batch browser load uses synchronous verification.

In _execute_batch_command, load_browser_item calls _verify_load_browser_item immediately after _load_browser_item, whereas the standalone command path uses schedule_message(4, ...) for deferred verification. If Live's state update is not immediate, batch verification may report loaded: false even when the load succeeds.

This may be acceptable if browser.load_item is synchronous, but the behavior differs from the deferred pattern. Consider documenting this or aligning the verification approach.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AbletonMCP_Remote_Script/__init__.py` around lines 1545 - 1548, The batch
path in _execute_batch_command calls _load_browser_item and then immediately
calls _verify_load_browser_item, which differs from the standalone command that
defers verification via schedule_message(4, ...). Change the batch handling so
verification is deferred the same way: after calling _load_browser_item (and
obtaining the result or item identifiers), schedule a deferred call using
schedule_message(4, ...) to run _verify_load_browser_item with the same
arguments (or document the synchronous behavior if intentional); update
references in _execute_batch_command so that _load_browser_item,
_verify_load_browser_item and schedule_message are used consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AbletonMCP_Remote_Script/__init__.py`:
- Around line 1263-1271: The _safe_getattr function uses a bare except which can
swallow BaseException; update the exception handler to "except Exception:" to
only catch standard exceptions and preserve returning the provided default;
locate the _safe_getattr(obj, attr, default=None) method and replace the bare
"except:" with "except Exception:" (no other behavioral changes needed).
- Around line 1908-1913: The conversion of max_results uses a bare except which
can hide system exceptions; update the try/except around int(max_results) to
catch only the expected exceptions (ValueError and TypeError) when parsing
max_results, and leave the existing fallback behavior (set max_results = 20 and
then enforce max_results <= 0 => 20) intact; locate the conversion near the
variable max_results in __init__.py and replace the generic except with a
specific except for those exception types.

---

Nitpick comments:
In `@AbletonMCP_Remote_Script/__init__.py`:
- Around line 1545-1548: The batch path in _execute_batch_command calls
_load_browser_item and then immediately calls _verify_load_browser_item, which
differs from the standalone command that defers verification via
schedule_message(4, ...). Change the batch handling so verification is deferred
the same way: after calling _load_browser_item (and obtaining the result or item
identifiers), schedule a deferred call using schedule_message(4, ...) to run
_verify_load_browser_item with the same arguments (or document the synchronous
behavior if intentional); update references in _execute_batch_command so that
_load_browser_item, _verify_load_browser_item and schedule_message are used
consistently.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 253f1380-c46b-401b-8708-56ade87c19ef

📥 Commits

Reviewing files that changed from the base of the PR and between e008328 and 738de22.

📒 Files selected for processing (2)
  • AbletonMCP_Remote_Script/__init__.py
  • MCP_Server/server.py

Comment thread AbletonMCP_Remote_Script/__init__.py
Comment thread AbletonMCP_Remote_Script/__init__.py
@vanjaoljaca

Copy link
Copy Markdown
Author

Addressed Qodo review feedback in a6efb7d:

  • execute_batch no longer performs same-callback readback verification for browser loads; batch load entries now return verification_deferred with guidance to verify via follow-up track/device reads.
  • search_browser_items now uses guarded browser item reads, isolates per-node traversal failures, and caps traversal with visited/skipped/truncated metadata.
  • list_supported_commands now includes the legacy browser routes that the Remote Script still handles.

Validation after the fix: python3 -m py_compile MCP_Server/server.py AbletonMCP_Remote_Script/__init__.py and git diff --check both pass.

@vanjaoljaca

Copy link
Copy Markdown
Author

Follow-up for CodeRabbit cleanup in 87357e6: replaced the remaining bare except: handlers in the Remote Script with except Exception: or the expected TypeError/ValueError parse errors. Re-ran python3 -m py_compile MCP_Server/server.py AbletonMCP_Remote_Script/__init__.py, git diff --check, and confirmed no bare except: remains in AbletonMCP_Remote_Script/__init__.py.

@vanjaoljaca vanjaoljaca changed the title [codex] Add arrangement duplication commands Add arrangement duplication, browser search, device control, and batch commands May 31, 2026
@ahujasid

ahujasid commented Jun 4, 2026

Copy link
Copy Markdown
Owner

@vanjaoljaca how did you test the reliability of this?

@vanjaoljaca

Copy link
Copy Markdown
Author

Daily heartbeat: this PR is still open and ready for review.

Current status: mergeable CONFLICTING, review decision NONE, checks CodeRabbit=SUCCESS.
Validation details are in the PR body; the branch remains available for maintainer review and merge.

1 similar comment
@vanjaoljaca

Copy link
Copy Markdown
Author

Daily heartbeat: this PR is still open and ready for review.

Current status: mergeable CONFLICTING, review decision NONE, checks CodeRabbit=SUCCESS.
Validation details are in the PR body; the branch remains available for maintainer review and merge.

@vanjaoljaca

Copy link
Copy Markdown
Author

Hi, I plugged it into my codex overnight and had it try replicate a song. It hacked away at ableton for hours and no crashes, though I did not verify that it tested all the available mcp commands

…-to-arrangement

# Conflicts:
#	AbletonMCP_Remote_Script/__init__.py
#	MCP_Server/server.py
@vanjaoljaca

Copy link
Copy Markdown
Author

Test results

Retested this branch against real Ableton Live 12.3.7 with the branch Remote Script loaded and listening on 127.0.0.1:9877.

Live Ableton smoke

  • list_supported_commands: confirmed export_audio is absent and the remaining PR commands are present.
  • create_midi_track: created PR97 Smoke MIDI.
  • create_audio_track: created PR97 Smoke Audio.
  • append_scene / create_scene: scene count increased.
  • create_clip, add_notes_to_clip, set_clip_name: created and named PR97 Smoke Clip.
  • duplicate_clip_to_arrangement: Arrangement clip count increased 0 -> 1.
  • duplicate_scene_to_arrangement: Arrangement clip count increased 1 -> 2.
  • duplicate_session_clip_to_arrangement: later Arrangement clip count increased 3 -> 4.
  • get_arrangement_clips: read back Arrangement clips on the test track.
  • stop_all_clips: returned success: true with playing_after: [].
  • back_to_arrangement: tested while the Back to Arrangement state was active; returned back_to_arranger_before: true, back_to_arranger_after: false.
  • execute_batch: set tempo 121 -> 120, then read session info; returned success: true.
  • get_browser_tree / get_browser_items_at_path: returned browser categories and 23 instrument items.
  • search_browser_items("Drift"): returned loadable Drift results.
  • load_browser_item: loaded built-in Drift onto the test MIDI track.
  • get_device_info / get_device_parameters: read back Drift with 66 parameters.
  • set_device_parameter_by_name: toggled Drift Device On off and back on with successful readback.

Local checks

  • python3 -m py_compile MCP_Server/server.py AbletonMCP_Remote_Script/__init__.py MCP_Server/telemetry.py MCP_Server/telemetry_decorator.py
  • git diff --check
  • Verified no export_audio references remain in AbletonMCP_Remote_Script/__init__.py, MCP_Server/server.py, or README.md.

Note: the Ableton session used for smoke testing has unsaved test artifacts named PR97 Smoke ...; the Live set was not saved.

@vanjaoljaca

Copy link
Copy Markdown
Author

Daily heartbeat: this PR is still open and ready for review.

Current status: mergeable MERGEABLE, review decision NONE, checks none.
Validation details are in the PR body; the branch remains available for maintainer review and merge.

@vanjaoljaca

Copy link
Copy Markdown
Author

Daily heartbeat: this PR is still open and ready for review.

Current status: mergeable MERGEABLE, review decision NONE, checks none.
Validation details are in the PR body; the branch remains available for maintainer review and merge.

3 similar comments
@vanjaoljaca

Copy link
Copy Markdown
Author

Daily heartbeat: this PR is still open and ready for review.

Current status: mergeable MERGEABLE, review decision NONE, checks none.
Validation details are in the PR body; the branch remains available for maintainer review and merge.

@vanjaoljaca

Copy link
Copy Markdown
Author

Daily heartbeat: this PR is still open and ready for review.

Current status: mergeable MERGEABLE, review decision NONE, checks none.
Validation details are in the PR body; the branch remains available for maintainer review and merge.

@vanjaoljaca

Copy link
Copy Markdown
Author

Daily heartbeat: this PR is still open and ready for review.

Current status: mergeable MERGEABLE, review decision NONE, checks none.
Validation details are in the PR body; the branch remains available for maintainer review and merge.

@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.

2 participants