Skip to content

Add consolidated Browser API — supersedes #183/#191/#192/#194/#200#204

Open
esaruoho wants to merge 3 commits into
ideoforms:masterfrom
esaruoho:esa/browser-api-consolidated
Open

Add consolidated Browser API — supersedes #183/#191/#192/#194/#200#204
esaruoho wants to merge 3 commits into
ideoforms:masterfrom
esaruoho:esa/browser-api-consolidated

Conversation

@esaruoho
Copy link
Copy Markdown
Contributor

Description

Consolidates five competing open Browser API PRs into a single handler. The five PRs (#183, #191, #192, #194, #200) all add overlapping /live/browser/* endpoints but none of them has been merged — they've sat open for weeks/months while the maintainer reviews other work. This PR is an attempt to unblock that by reducing five reviews to one.

The intent is: if this is mergeable, the other five can be closed as consolidated-here. If anything in here is the wrong call, please push back on this PR and I'll either fix it or close this and defer to the originals.

Source PRs being consolidated

PR Author LOC Status this PR Notes
#194 @bimsonz (Zach Bimson) +546 Spine — used verbatim Already explicitly consolidates #183/#191/#192. Best-structured, follows AbletonOSC handler conventions, 25 endpoints.
#183 @christopherwxyz +924 Partial absorb load_default_instrument, load_default_audio_effect, load_default_midi_effect adapted into #194's style. Other endpoints either already in #194 or skipped to keep diff lean.
#191 @keepyourpolicy-lab +799 Absorbed via #194 Browser portion absorbed into #194 already. Chain/sidechain bits in #191 are out of scope here.
#192 @Dandiggas +352 Absorbed via #194 Already absorbed by #194 (load_to_slot, load_to_arrangement, preview).
#200 @keshav55 (Keshav Rao) +249 Partial absorb load_by_query and load_from_category adapted into #194's style. Genuinely new functionality — search-based loading that doesn't require an exact name. Valuable for AI/MCP integrations.

All five contributors credited as Co-authored-by on the commit.

Endpoint inventory (30 endpoints)

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, load_to_arrangement

Load by query / category (2, from #200): load_by_query, load_from_category

Defaults (3, from #183): load_default_instrument, load_default_audio_effect, load_default_midi_effect

Discovery (8): get/categories, get/children, search, list_audio_effects, list_midi_effects, list_sounds, list_plugins, list_user_presets

Preview, hotswap, utility (5): preview, stop_preview, refresh, hotswap_start, hotswap_load

Files changed

  • abletonosc/browser.py — new, 693 lines (PR Add comprehensive browser API with 25 endpoints #194's body + two helper methods + five new endpoint functions + five add_handler registrations)
  • abletonosc/__init__.pyfrom .browser import BrowserHandler
  • manager.pyBrowserHandler(self) registration + importlib.reload(abletonosc.browser)
  • README.md — new Browser API section, six sub-tables grouping the endpoints

What I did NOT include and why

On the meta — five competing PRs

This is the kind of pile-up that ages a repo. Daniel: if this consolidation works as a pattern, I'd be happy to do the same triage for other stalled clusters (e.g. the chain/master-return PRs around #170, #189, #170, #186, #197). Just say the word.

Checklist

  • Title descriptive
  • Code style consistent with Add comprehensive browser API with 25 endpoints #194 (which followed AbletonOSC conventions)
  • README updated with a full Browser API section
  • Unit tests — deferred. Browser tests are non-deterministic because they depend on what's installed in the user's Ableton library. A smoke test for get/categories is feasible; full coverage isn't. Happy to add a smoke test if you want one.
  • All unit tests pass — I do not have Live running on this machine. The file syntax-checks and the diffs match PR Add comprehensive browser API with 25 endpoints #194's tested code. Please run locally before merging.

Consolidates five competing open Browser API PRs (ideoforms#183, ideoforms#191, ideoforms#192,
ideoforms#194, ideoforms#200) into a single handler exposing 30 endpoints across six
categories: load-by-name, load-by-target, load-by-query, defaults,
discovery, and preview/hotswap/utility.

Based on PR ideoforms#194 (@bimsonz) which already absorbed ideoforms#183 / ideoforms#191 / ideoforms#192,
with two additions:
  - load_by_query / load_from_category from PR ideoforms#200 (@keshav55) —
    search-based loading that doesn't require an exact name match
  - load_default_instrument / load_default_audio_effect /
    load_default_midi_effect from PR ideoforms#183 (@christopherwxyz) —
    convenience one-shots for "give me a working device on this track"

All five contributors credited as Co-authored-by.

Co-authored-by: Zach Bimson <bimsonz@users.noreply.github.com>
Co-authored-by: Keshav Rao <keshav55@users.noreply.github.com>
Co-authored-by: christopherwxyz <christopherwxyz@users.noreply.github.com>
Co-authored-by: Dandiggas <Dandiggas@users.noreply.github.com>
Co-authored-by: keepyourpolicy-lab <keepyourpolicy-lab@users.noreply.github.com>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 21, 2026

CLA assistant check
All committers have signed the CLA.

@ideoforms
Copy link
Copy Markdown
Owner

Oooh thanks @esaruoho, this is great and much appreciated as it has been daunting to approach all of these PRs. I am still unfortunately totally backlogged on another project which I'm working on around the clock, but this consolidation massively helps simplify the workload!

Main question: My #1 priority within this whole API is to make it as consistent as possible with the Live Object Model and Live's internal APIs in general. Can you confirm that the function calls (load_instrument, etc) are all the same as within the LOM?

Secondly, a few unit tests would be essential to get this merged. Could there be unit tests that just operate on core Live instruments/audio effects (things that are included within Live standard - e.g. Simpler, Drift), to add an instrument to a track, check that it appears OK when querying the track's devices property, change a parameter of the device, and then remove it? And then same for adding/querying/changing/deleting an effect?

I will then be happy to give this a check over and merge so that we can get this all all into the core!

Thanks again, I appreciate it.

Three tests in tests/test_browser.py covering Daniel's review request:

  - test_browser_load_instrument_lifecycle: loads Simpler onto a MIDI
    track (track 0), confirms it appears in /live/track/get/devices/name,
    toggles parameter 0 ("Device On") via /live/device/set/parameter/value
    and reads it back, restores the original value, then deletes the
    device and asserts the track is empty again.

  - test_browser_load_audio_effect_lifecycle: same shape but loads
    Reverb onto an audio track (track 2).

  - test_browser_get_categories: smoke test that
    /live/browser/get/categories returns a non-empty tuple containing
    at least instruments, audio_effects, midi_effects.

Simpler and Reverb were chosen because they ship with every standard
Live install (Intro included), so the tests don't depend on Live 12 or
on Suite-only content. An autouse fixture clears devices from tracks 0
and 2 before and after each test so a failed run can't pollute the
fixture state used by other test modules.
@esaruoho
Copy link
Copy Markdown
Contributor Author

Thanks Daniel! Tests just pushed to this branch — tests/test_browser.py:

  • test_browser_load_instrument_lifecycle loads Simpler onto a MIDI track via /live/browser/load_instrument, confirms the device appears via /live/track/get/devices/name, toggles parameter 0 ("Device On") via /live/device/set/parameter/value and reads it back, restores the original value, deletes the device, and re-asserts an empty track.
  • test_browser_load_audio_effect_lifecycle same shape with Reverb on an audio track.
  • test_browser_get_categories smoke test.

I picked Simpler + Reverb (rather than Drift, which Live 11 doesn't have) so the tests run on every supported Live version. An autouse fixture wipes devices from tracks 0 and 2 before and after each test, so a failure can't pollute the shared fixture state used by other test modules.


On LOM consistency — honest answer: the underlying calls are LOM-faithful, but the endpoint names are convenience wrappers, not direct LOM mirrors. Specifically:

Endpoint LOM call(s) used internally
/live/browser/load_instrument, load_audio_effect, load_midi_effect, load_effect, load_drum_kit, load_sound, load_sample, load_plugin, load_max_device, load_user_preset browser.<category> (LOM property) + tree walk + browser.load_item(item) (LOM method)
/live/browser/load_to_slot, load_to_arrangement same plus song.view.highlighted_clip_slot / song.current_song_time
/live/browser/load_by_query, load_from_category, load_default_* wrappers around browser.load_item
/live/browser/get/categories, get/children, list_*, search wrappers walking browser.<category>.children
/live/browser/preview browser.preview_item(item) (LOM method)
/live/browser/stop_preview browser.stop_preview() (LOM method) ✓ direct
/live/browser/refresh browser.filter_type toggle hack (no direct LOM call for cache invalidation)
/live/browser/hotswap_start, hotswap_load browser.hotswap_target (LOM property) + browser.load_item

So load_item, preview_item, stop_preview, hotswap_target, browser.instruments / audio_effects / etc. are all real LOM names. The 10 load_<category> endpoints are sugar.

If you'd prefer LOM-strict naming, two options:

  1. Collapse the 10 load_<category> endpoints into one /live/browser/load_item (category, name, track_index) — fewer endpoints, names match LOM concepts directly. The category strings would mirror LOM property names (instruments, audio_effects, midi_effects, etc.).
  2. Keep the convenience layer but rename get/categoriesget/category_names etc. so the wrapper nature is explicit.

Happy to do either. My weak preference is to keep the convenience layer (it makes the API more discoverable from a client perspective and matches how Live's UI presents the browser), but I'm not married to it — the consistency argument is real, and you're the one who'll be reviewing every future PR against this surface.

Let me know which direction you'd like and I'll refactor.

@esaruoho
Copy link
Copy Markdown
Contributor Author

Open-PR punch list (as of 2026-05-21)

Posting this here as a triage map. 26 open PRs total. Grouped by what's needed next — feel free to use this as a checklist when bandwidth returns.

🟢 Ready to merge once reviewed (no author work needed)

These are the four consolidation PRs I opened in this batch. Each one supersedes a cluster and credits all original authors as Co-authored-by. If you merge one of these, the corresponding source PRs in the next section can be closed.

PR What it does LOC Supersedes
#203 /live/clip/get/groove custom handler +22/-3 n/a (new)
#204 Consolidated Browser API, 30 endpoints +887 #183, #191, #192, #194, #200
#205 Master + Return track support, identifier resolver +224/-12 #84, #189, #197
#206 /live/track/create_audio_clip + create_midi_clip +62/-3 #168, #196

🔴 Closeable as consolidated (if you merge the corresponding 🟢 PR above)

PR Author Superseded by
#84 @markmarijnissen #205
#168 @jmiceo #206
#183 @christopherwxyz #204
#189 @jwhector #205
#191 @keepyourpolicy-lab #204 (browser only — chain/sidechain piece is out of scope here)
#192 @Dandiggas #204
#194 @bimsonz #204 (this PR is the spine of #204)
#196 @bimsonz #206
#197 @bimsonz #205 (arrangement.py + chain helpers from #197 still pending — see "fresh feature PRs" below)
#200 @keshav55 #204

🟡 Needs author response (you've already reviewed)

These are stuck because the original author hasn't come back to address your feedback. May be worth nudging or assuming abandoned.

PR Author Your ask Age
#167 @elzinko Remove devel/ folder + new markdown files + Live 12+ requirement language 6 months
#153 @ltackett Move endpoint from /live/application/view/scroll_view to /live/view/scroll_view 15 months

If @ltackett doesn't come back, the #153 change is 11 lines — I'm happy to open a tiny follow-up that does the namespace move and closes #153.

🟦 Fresh focused feature PRs (no overlap, ready for first review)

These are all by @bimsonz from his April push. Each adds a distinct surface that doesn't conflict with anything else open or with the consolidations above.

PR Adds
#195 ArrangementHandler — arrangement view clip operations (separate surface, doesn't touch existing handlers)
#198 Warp markers + extended notes + time conversion in clip handler
#199 Chain handler — 25 endpoints for rack device chains

These are the next-after-consolidations candidates. They share style with #204/#205/#206 and are sized for a single review pass.

🟧 Chain/Rack cluster — second consolidation opportunity

Similar to the browser pattern: two PRs covering overlapping territory.

PR Author LOC Approach
#170 @suavesav +697/-14 Chain + Chain Device implementation
#199 @bimsonz +213/-1 Chain handler, 25 endpoints

If you'd like me to consolidate these the same way as the browser cluster, I can. Lower confidence than the browser one because chain semantics are recursive (chains-of-chains) and the surface area is bigger.

🟪 Likely abandoned (consider closing with a polite note)

PR Author Age Why
#89 @StrongBearCeo 3 years "Message too long" fix — you wrote a test in 2023 that proves the fix doesn't fix the bug; no response since
#113 @steeltrack 1+ year Send-support improvements, no activity since open
#120 @CoryWBoris 1+ year Single 20-line song.py change, no description, no activity

⚫ Big architectural refactors — needs your direction before anyone touches them

These three are interdependent (#185 + #186 depend on #182's registry pattern) and are massive enough that they probably warrant a project-direction conversation rather than a normal PR review.

PR Author LOC Notes
#182 @PhotonicVelocity +296/-74 Dictionary-registry refactor (clip_slot) — dependency root
#185 @PhotonicVelocity +1734/-363 Same refactor applied to clip module
#186 @PhotonicVelocity +1135/-321 Same refactor applied to tracks module

I would NOT touch these without your explicit direction. If you want to keep the current property-list-based pattern, all three can be closed. If you want to move to the dictionary-registry pattern, they need to be merged together (or rebuilt from scratch given how stale the diffs are now).


Net effect if 🟢 PRs merge and 🔴 PRs close: 26 open → 13 open. Half the backlog cleared with four merges + ten closures.

Happy to continue this work in whatever order suits — say the word on the chain cluster, the scroll_view nudge, or PhotonicVelocity direction and I'll start. No urgency on your side.

Pre-flight cleanup spotted while auditing the PR.
@elzinko
Copy link
Copy Markdown

elzinko commented May 26, 2026

Hi @esaruoho — thanks for the great triage work on this PR and the open-PR punch list!

Small correction on the entry for #167 in the 🟡 "Needs author response" section: the three items listed (remove devel/, remove markdown files, drop Live 12+ language) were actually addressed back in Nov 19–23, 2025, right after @ideoforms's initial review. Commits bfa2f28, 2d44b83, 58512386 handle the deletions, and b9c5c80 moved devel/introspect.pytools/introspect.py.

So #167 is in the same shape as your 🟢 group from the author's side — it's been waiting on a final review pass, not on author work. Posted a detailed status update over on #167 with the current state.

Happy to defer to whatever order makes sense for the maintainer — just wanted to flag the misclassification so it doesn't sit in the wrong bucket. Thanks again for the consolidation work!

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.

4 participants