Skip to content

Add browser API, chain management, and sidechain routing#191

Open
keepyourpolicy-lab wants to merge 1 commit intoideoforms:masterfrom
keepyourpolicy-lab:add-browser-chain-sidechain
Open

Add browser API, chain management, and sidechain routing#191
keepyourpolicy-lab wants to merge 1 commit intoideoforms:masterfrom
keepyourpolicy-lab:add-browser-chain-sidechain

Conversation

@keepyourpolicy-lab
Copy link
Copy Markdown

Summary

Three additions that enable programmatic control of Ableton Live — particularly useful for AI/MCP tool integrations, but applicable to any OSC client.

1. Browser Handler (new: abletonosc/browser.py)

  • /live/browser/load_instrument (track_index, name) — Load stock instruments (Operator, Analog, Drift, Meld, etc.) by name
  • /live/browser/load_effect (track_index, name) — Load audio or MIDI effects by name (searches both categories automatically)
  • /live/browser/load_preset (track_index, path) — Load .adg presets from User Library by path or name
  • /live/browser/list_items (category, [path]) — Browse any category (instruments, drums, sounds, audio_effects, midi_effects, packs, samples, etc.)
  • /live/browser/refresh — Force browser cache invalidation via filter_type toggle (needed after generating presets externally)

Design choice: All load endpoints take an explicit track_index parameter rather than relying on the selected track. This is critical for programmatic use where multiple operations may target different tracks without visual confirmation.

2. Instrument Rack Chain Management (extends device.py)

  • /live/device/get/num_chains — Chain count for rack devices
  • /live/device/get/chains/info — Chain names and device counts
  • /live/device/get/chain/devices — Device names and classes within a chain
  • /live/device/get/chain/parameter/value / set — Read/write individual parameters on chain devices
  • /live/device/get/chain/parameters/value / name — Bulk read all parameter values/names
  • /live/device/set/chain/volume / get — Chain mixer volume (for blending layers)
  • /live/device/set/chain/panning — Chain panning
  • /live/device/set/chain/mute — Mute/unmute individual chains

3. Sidechain Routing (extends device.py)

  • /live/device/set/sidechain/routing (track_index, device_index, source, [channel]) — Set a device's sidechain input to any track, with optional channel selection (e.g. target a specific drum pad)
  • /live/device/get/sidechain/available — List available sidechain sources

The channel matching uses scoring: prefers "Post FX" signals for clean ducking, avoids "Post Mixer" (level varies with mix fader), and prioritizes first variations when multiple are available.

Context

These endpoints were built and battle-tested over several weeks of live performance sessions using an MCP server that bridges Claude to Ableton via AbletonOSC. The browser handler, chain management, and sidechain routing fill gaps that made full programmatic control of Ableton impossible without manual intervention.

Re: PR #183 — There is overlap in the browser functionality. Key differences in this implementation:

  • Explicit track_index on all load endpoints (vs. relying on selected track)
  • Unified load_effect that searches both audio and MIDI categories
  • Browser cache invalidation (refresh endpoint)
  • Multi-strategy fallback search (user_library → category roots → deep search with case-insensitive + extension-stripping matching)

The chain management and sidechain routing have no overlap with any existing PR.

Test plan

  • Tested with Ableton Live 12 on Windows 11
  • Browser: load_instrument, load_effect, load_preset, list_items, refresh all verified working
  • Chain management: tested with Instrument Rack devices (multi-chain synth layers)
  • Sidechain routing: tested with Compressor, targeting specific drum pad channels
  • Verified no regressions on existing device parameter endpoints

Browser handler (new file):
- Load instruments, effects, and presets by name with explicit track targeting
- User Library preset loading with path walking and fallback search
- Browser cache invalidation via filter_type toggle
- Generic category listing endpoint

Device handler extensions:
- Instrument Rack chain introspection (get chains, devices, parameters)
- Chain mixer control (volume, panning, mute)
- Sidechain routing with smart channel matching and scoring

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 20, 2026

CLA assistant check
All committers have signed the CLA.

@keepyourpolicy-lab
Copy link
Copy Markdown
Author

Also wanted to thank you profousely for making AbletonOSC. it widly boosted my progress in programmatic AI use of Ableton far beyond my original project which was midi and cc based. abandoning midi and cc mapping was an incredible relief and really boosted my own project to the stratosphere.

bimsonz added a commit to bimsonz/AbletonOSC that referenced this pull request Apr 5, 2026
Adds BrowserHandler with full browser integration for programmatic
control of Ableton's content browser. Combines and improves on ideas
from ideoforms#183, ideoforms#192, and ideoforms#191.

Endpoints (25):
- Load by name (10): load_instrument, load_drum_kit, load_audio_effect,
  load_midi_effect, load_effect, load_sound, load_sample, load_plugin,
  load_max_device, load_user_preset
- Load by target (2): load_to_slot (session view via highlighted_clip_slot),
  load_to_arrangement (arrangement view, best-effort positioning)
- Discovery (8): get/categories, get/children, search,
  list_audio_effects, list_midi_effects, list_sounds, list_plugins,
  list_user_presets
- Preview (2): preview, stop_preview
- Utility (3): refresh (cache invalidation), hotswap_start, hotswap_load

Key design decisions:
- Explicit track_index on all load endpoints for reliable programmatic use
- Tiered name matching: exact > case-insensitive > extension-stripped > substring
- Depth-limited recursive search (max_depth=4) for safety on large libraries
- Session view loading via highlighted_clip_slot for precise slot targeting
- Browser cache invalidation via filter_type toggle for detecting new content
- Common _load_from_categories helper to DRY up load-by-name pattern

Closes ideoforms#183, closes ideoforms#192, closes ideoforms#191
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