[wip] support delete track/clip - #23
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
…e_device extends both the remote script and MCP server with the capabilities that kept requiring socket side-channels in practice: - get_clip_notes: read a clip's MIDI before editing it - get/set_device_param: real audio engineering (EQ, reverb, envelopes) with display-value feedback - get_device_chains / set_chain_volume: per-pad drum rack mixing - set_track_volume / set_send_level / set_master_volume: gain staging - delete_device: swap instruments (loading always appends) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…p_envelope (step write) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
46f3be4 to
babc39d
Compare
…routing - introspect(path): dir() any LOM object relative to the song - get_set_overview: tracks/returns/master, mixer, routing, devices recursing into rack chains; every node carries a LOM path - get_params/set_param/set_routing by path: reaches master, returns and rack-nested devices; set_routing changes compressor sidechain source - get_routing(track, device?) - scripts/abl.py: direct socket client for iterating without the MCP server
all commands move to handlers.py as cmd_<name>(params) methods with a MAIN_THREAD_COMMANDS set; __init__.py keeps the socket server and main-thread scheduling and gains a 'reload' command that importlib.reloads handlers.py, so iterating no longer requires restarting Live. drop the two dispatch entries (get_browser_categories, get_browser_items) whose handlers never existed. scripts/install.sh copies + reloads; replaces the sudo app-bundle installer.
handlers v3. reports peak/mean per track + master, loudest first, with optional play/start_time. raw 0-1 meter values (no documented dB mapping). send_command gains a timeout kwarg; abl.py scales its timeout with seconds.
handlers v4. the blocking sample_meters tied measurement duration to the socket timeout and mixed transport control into a read. capture now accumulates on a thread inside Live until stopped; playback is driven separately (start_playback / set_current_song_time tool added).
handlers v5. v3 drove transport from the socket thread, which is the likely cause of a Live crash; v4 still read the LOM from a background thread. the capture now re-arms itself via schedule_message so all LOM access stays on the main thread. the blocking sample_meters variant would stall the UI there, so it is removed — one mechanism: start/get/stop_meter_capture.
v6. drops the MAIN_THREAD_COMMANDS allowlist; the LOM is not thread-safe and reads from the socket thread are not worth the risk.
handlers v9. get_automated_params scans every device (recursing racks) and mixer param for automation_state; capture records their values each main thread tick alongside meters, reported as [beat, value] series bucketed at a chosen resolution. get_arrangement_envelope reads clip envelopes and documents that track-lane arrangement automation is not exposed by the LOM. start/get/stop_meter_capture become start/get/stop_capture.
MCP_Server/als.py indexes every AutomationTarget by enclosing track/device/ parameter and joins the AutomationEnvelopes to it: exact breakpoints (with bezier handles) per lane, no playback needed — the LOM does not expose lane automation. get_automation (json) and get_automation_grid (one char per bar per lane) tools; get_song_file remote command supplies the path. handlers v10: capture meters only accumulate while playing.
handlers v13. the LOM cannot write lane automation (create_automation_envelope refuses arrangement clips: 'Not a session clip'), but Live records a lane when a parameter moves during playback with record_mode on. record_automation seeks, records, applies interpolated points each main-thread tick, restores record mode / playhead / arms, all in one undo step. verified: ramp written, read back via capture, undone cleanly. also: play_from (start then seek — start_playing ignores a prior seek), call/set_attr low-level LOM primitives, get_song_file.
also fixes minor typing issues and adds a script to automate copying the remote script. i don't have experience scripting with ableton but the only way i got it to show in the control surface dropdown was copying it into the app bundle, which felt wrong / like itd be overwritten on update etc
happy to trim out changes if you want to keep them focused
other thoughts
testing it out i noticed several places it might be nice to add tools, but noticed server.py is already quite large/flat - maybe we could modularize things a bit here by using fastmcp 2.0 "hubs"