-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
Patch names are currently globally unique. Saving a patch named "bass" for tb-03 silently overwrites an existing "bass" patch for minitaur. Users should be able to have the same patch name across different synths.
Proposed Solution
Change the DB uniqueness constraint from UNIQUE(name) to UNIQUE(name, synth) and use {synth}/{name} (e.g., minitaur/bass) as the display and lookup format.
Key changes
- Schema migration:
UNIQUE(name)→UNIQUE(name, synth). Use Alembic (or similar) for the DB migration so existingpatches.dbfiles are upgraded cleanly. patch_library.py: Updateget()anddelete()to accept optionalsynthparam. Addfind(name)for disambiguation. Update upsert logic to key on(name, synth).tools/patches.py: Add_parse_patch_ref()helper to parse"minitaur/bass"→(synth, name). Updateload_patch,recall_patch,delete_patchto support both"bass"(unambiguous) and"minitaur/bass"(explicit) lookups, with clear error messages when ambiguous.- Display:
list_patchesshows"minitaur/bass"format instead of"bass (Minitaur)".
Disambiguation behavior
recall_patch("bass")— works if only one synth has a patch named "bass"recall_patch("minitaur/bass")— always unambiguous- If ambiguous, return error:
"Multiple patches named 'bass': minitaur/bass, tb-03/bass"
Context
Identified during review of PR #6 (Phase 3: Patch Library). Currently tracked as a known limitation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels