RAM2118 commited on
Commit
64c9482
·
verified ·
1 Parent(s): dcfc9c9

update SYNC.md — Sprint 3 COMPLETE, MCP verified working end-to-end

Browse files
Files changed (1) hide show
  1. SYNC.md +44 -148
SYNC.md CHANGED
@@ -2,154 +2,64 @@
2
 
3
  ---
4
 
5
- ## STATUS: v0.5.2 — Plugin Picker UI + Safety System working (2026-05-17)
6
 
7
  Build: ✅ Clean
8
- GUI: ✅ Verified — Pro-Q 4, God Particle, Little MicroShift all load with full GUI
9
- Crashes: ✅ None since fix (last was May 16, pre-fix)
10
- MCP: ✅ Running on port 16620
11
 
12
  ---
13
 
14
- ## WHAT WAS FIXED (2026-05-17 session)
15
 
16
- ### 1. Plugin Picker UI — Ableton-style manufacturer tree
 
 
17
 
18
- **Problem:** Old flat PopupMenu list was cluttered, no search, no grouping.
 
 
 
 
19
 
20
- **Solution:** Replaced with inline `juce::TreeView` browser:
21
- - Manufacturer folders with ▶/▼ triangle arrows (custom `LookAndFeel::drawTreeviewPlusMinusBox`)
22
- - Search box that hides tree and shows flat filtered list
23
- - Safety badges: ✓ safe, `audio only`, `⚠ blocked`
24
- - Embedded inline in the editor (no CallOutBox) — editor resizes to fit
25
- - Ableton-matching dark theme (`0xff1e1e1e` bg, `0xff2d6299` selection)
26
-
27
- **Files:** `Source/Plugin/PluginPickerComponent.h/.mm` (new), `Source/Plugin/PluginBridgeEditor.h/.mm` (modified)
28
-
29
- ---
30
-
31
- ### 2. UI Freeze Bug — `addAndMakeVisible` vs `addChildComponent`
32
-
33
- **Root cause:**
34
- ```cpp
35
- // WRONG — addAndMakeVisible internally calls setVisible(true),
36
- // overriding the prior setVisible(false). The empty searchList
37
- // sits invisibly on top of the entire TreeView, intercepting all
38
- // mouse events. Only TextEditor (native macOS input) still worked.
39
- searchList.setVisible(false);
40
- addAndMakeVisible(searchList);
41
-
42
- // CORRECT:
43
- addChildComponent(searchList); // stays hidden until needed
44
- ```
45
-
46
- **Symptom:** After picker opened — could scroll/click nothing. Only the search box accepted input. Selecting Pro-Q 4 showed "audio only / unsafe" because the picker was broken, not the safety system.
47
-
48
- **Fix:** `addChildComponent(searchList)` in `PluginPickerComponent` constructor.
49
-
50
- **File:** `Source/Plugin/PluginPickerComponent.mm`
51
 
52
  ---
53
 
54
- ### 3. Safety DB Corruption — Background Scan vs Live Helper Shared Memory Conflict
55
-
56
- **Root cause:**
57
- Background scanner spawns `PluginBridgeHelper --scan <path>` for each plugin.
58
- If the main Helper is already running (serving an active plugin), both processes fight over the same shared memory name (`shm_open`) → scan subprocess crashes immediately → every plugin gets marked UNSAFE.
59
-
60
- **Fix 1 — Wait loop before each scan:**
61
- ```cpp
62
- // In startBackgroundScan() loop, before runPluginScan():
63
- while (helper.isHelperRunning() && scanRunning.load())
64
- std::this_thread::sleep_for(std::chrono::milliseconds(500));
65
- if (!scanRunning.load()) break;
66
- ```
67
-
68
- **Fix 2 — DB recovery:**
69
- Python script wiped all corrupted UNSAFE entries. Only genuine entries kept
70
- (PluginBridge itself, which correctly fails its own scan).
71
 
72
- **File:** `Source/Plugin/PluginBridgeProcessor.cpp`
73
-
74
- ---
75
-
76
- ### 4. Duplicate Plugins in Picker — VST3 + AU + System + User dirs
77
-
78
- **Root cause:**
79
- `getInstalledPluginFiles()` scanned all four directories:
80
- - `/Library/Audio/Plug-Ins/VST3` (system)
81
- - `~/Library/Audio/Plug-Ins/VST3` (user)
82
- - `/Library/Audio/Plug-Ins/Components` (system AU)
83
- - `~/Library/Audio/Plug-Ins/Components` (user AU)
84
-
85
- FabFilter Pro-Q 4 appeared 4× (2 VST3 paths × 2 AU paths). Showed as 2 per manufacturer folder.
86
-
87
- **Fix:** Deduplicate by stem name using `std::set<std::string>`, priority order:
88
- ```
89
- system VST3 → user VST3 → system AU → user AU
90
- ```
91
- First match for a given stem name wins. AU entry is skipped if VST3 already seen.
92
- System paths preserved because safety DB uses `/Library/` paths.
93
-
94
- **File:** `Source/Plugin/PluginBridgeProcessor.cpp`
95
-
96
- ---
97
-
98
- ### 5. Wrong Manufacturer Names — Copyright Strings as Folder Names
99
-
100
- **Root cause:**
101
- `getPluginManufacturer()` read `CFBundleGetInfoString` and extracted everything after the comma:
102
- `"FabFilter Pro-Q 4.02, Copyright © 2002-2025 FabFilter"` → `"Copyright © 2002-2025 FabFilter"`
103
- This full copyright string became the folder name, and different copyright years split one vendor into multiple folders.
104
-
105
- Some plugins put their version string as the `"vendor"` field in `moduleinfo.json` (e.g. `"16.7.33.200"`).
106
-
107
- **Fix — New extraction priority:**
108
- 1. `NSHumanReadableCopyright` → `cleanManufacturer()` strips "Copyright © YYYY-YYYY " prefix → `"FabFilter"`
109
- 2. `CFBundleGetInfoString` → extract **before** the comma → first word → `"FabFilter"`
110
- 3. `CFBundleIdentifier` → second segment capitalised → `"com.fabfilter.Pro-Q.4"` → `"Fabfilter"`
111
- 4. `moduleinfo.json "vendor"` → cleaned
112
- 5. Filename first word fallback
113
-
114
- `cleanManufacturer()` also rejects pure version strings (containsOnly digits/dots).
115
-
116
- **File:** `Source/Plugin/PluginBridgeProcessor.cpp`
117
 
118
  ---
119
 
120
  ## ARCHITECTURE (v0.5.2)
121
 
122
  ```
123
- PluginBridge.vst3 (inside Ableton)
124
- ├── PluginBridgeProcessor.cpp — plugin lifecycle, safety check, background scan, MCP
125
- ├── PluginBridgeEditor.mm — top bar + inline PluginPickerComponent + plugin editor
126
- ├── PluginPickerComponent.mm — manufacturer TreeView, search, safety badges
127
- ├── HelperConnection.cpp — Unix socket IPC + shared memory audio routing
128
- ├── McpServer.cpp — HTTP MCP on port 16620
129
- ├── PluginSafetyDB.h — JSON-backed safe/unsafe/unknown per plugin
130
- └── Blocklist.h — persistent blocklist for crash-prone plugins
131
-
132
- PluginBridgeHelper.app (separate crash-safe process, bundled in .vst3/Resources/)
133
- ├── main.cpp — --load <path>, --scan <path>
134
- ├── HelperPluginHost.mm — loads plugin, audio via shared memory
135
- └── HelperIPC.cpp — command/response over Unix socket
 
 
 
 
136
  ```
137
 
138
- **Load flow for SAFE plugin:**
139
- 1. User opens picker → selects plugin
140
- 2. `loadPlugin()` checks PluginSafetyDB:
141
- - **Unknown** → spawns `PluginBridgeHelper --scan` (waits for live Helper to exit first)
142
- - **Safe** → proceed
143
- - **Unsafe** → load in Helper for audio-only mode
144
- 3. Helper also loads plugin for out-of-process audio routing
145
- 4. Plugin loaded in-process → `createEditor()` → embedded in PluginBridge editor window
146
-
147
- **Load flow for UNSAFE plugin (audio-only mode):**
148
- 1. Plugin marked unsafe in DB (crashed during scan)
149
- 2. Loaded only in Helper process — audio routing via shared memory
150
- 3. No in-process load → no GUI → `showAudioOnlyUI()` shown instead
151
- 4. MCP still works (183 params etc.) — all parameter control via MCP tools
152
-
153
  ---
154
 
155
  ## BUILD
@@ -159,25 +69,11 @@ cd "/Volumes/T7 Shield/Users/Aditya/pluginbridge/build"
159
  cmake --build . --target PluginBridge_VST3 -- -j4
160
  ```
161
 
162
- Auto-installs to `~/Library/Audio/Plug-Ins/VST3/PluginBridge.vst3`
163
-
164
- ## KEY FILES
165
-
166
- | File | Role |
167
- |---|---|
168
- | `Source/Plugin/PluginPickerComponent.h/.mm` | Inline plugin browser (new in v0.5) |
169
- | `Source/Plugin/PluginBridgeEditor.h/.mm` | Main editor, picker toggle, plugin embed |
170
- | `Source/Plugin/PluginBridgeProcessor.cpp` | `getInstalledPluginFiles()`, `getPluginManufacturer()`, `startBackgroundScan()` |
171
- | `~/Library/PluginBridge/safety_db.json` | Runtime safety cache (safe/unsafe/unknown per path+mtime) |
172
- | `~/Library/PluginBridge/debug.log` | Timestamped per-session log |
173
 
174
- ## VERIFIED WORKING (2026-05-17)
175
 
176
- - ✅ Pro-Q 4 — full GUI (761×405)
177
- - ✅ Cradle The God Particle — full GUI (666×302)
178
- - ✅ Little MicroShift — full GUI (855×359)
179
- - ✅ LIMITER — full GUI (855×572)
180
- - ✅ Picker tree: manufacturer folders collapse/expand
181
- - ✅ Search: filters list, hides tree
182
- - ✅ No duplicates in picker
183
- - ✅ Manufacturer names clean (FabFilter, Valhalla, etc.)
 
2
 
3
  ---
4
 
5
+ ## STATUS: v0.5.2 — SPRINT 3 COMPLETE (2026-05-17)
6
 
7
  Build: ✅ Clean
8
+ GUI: ✅ Working (Pro-Q 4, God Particle, Little MicroShift, LIMITER)
9
+ MCP: ✅ Verified end-to-end — registered in Claude Code config
10
+ Crashes: ✅ None (unsafe plugins handled via audio-only mode)
11
 
12
  ---
13
 
14
+ ## MCP INTEGRATION CONFIRMED
15
 
16
+ **Server:** `http://127.0.0.1:16620/mcp`
17
+ **Registered as:** `pluginbridge` in Claude Code local config
18
+ **Scope:** AI MUSIC PRODUCTION project
19
 
20
+ **Verified working (2026-05-17):**
21
+ - `GET /health` → `{"status":"ok","helper":"connected","port":16620}`
22
+ - `initialize` → handshake complete
23
+ - `tools/list` → 5 tools registered
24
+ - `search_param "band 1"` → 24 params returned from Pro-Q 4 with real values
25
 
26
+ **Pro-Q 4 via MCP:** 737 parameters fully accessible (vs 1 parameter via Ableton LOM)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
  ---
29
 
30
+ ## SPRINTS
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
+ | Sprint | Status | What |
33
+ |---|---|---|
34
+ | Sprint 1 | ✅ | Plugin shell + MCP server |
35
+ | Sprint 2 | ✅ | Out-of-process hosting, crash-safe, GUI |
36
+ | Sprint 3 | ✅ | MCP param control — verified from Claude Code |
37
+ | Sprint 4 | **NEXT** | Real-time audio analysis (LUFS, FFT, spectral) |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
  ---
40
 
41
  ## ARCHITECTURE (v0.5.2)
42
 
43
  ```
44
+ Claude Code / Gemini CLI
45
+ │
46
+ ├── ableton-live-mcp (port 16619) — DAW control, LOM, tracks, routing
47
+ │
48
+ └── pluginbridge (port 16620) — plugin parameter control
49
+ │
50
+ ▼
51
+ PluginBridge.vst3 (inside Ableton)
52
+ ├── In-process GUI (safe plugins)
53
+ ├── Shared memory audio → Helper process (crash-safe)
54
+ ├── MCP server (5 tools)
55
+ └── Safety DB + blocklist
56
+
57
+ PluginBridgeHelper.app (separate process)
58
+ ├── Audio processing via shared memory
59
+ ├── --scan mode for safety testing
60
+ └── --load mode for audio routing
61
  ```
62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  ---
64
 
65
  ## BUILD
 
69
  cmake --build . --target PluginBridge_VST3 -- -j4
70
  ```
71
 
72
+ ---
 
 
 
 
 
 
 
 
 
 
73
 
74
+ ## MODE: NORMAL (build+test only)
75
 
76
+ Claude Code rules:
77
+ - `pull and build` → pull + cmake build + report result
78
+ - `pull and test` → pull + build + run curl tests + report
79
+ - For debugging: ML Intern will update SYNC.md to grant full debug mode when needed