RAM2118 commited on
Commit
003a511
Β·
verified Β·
1 Parent(s): ddb115b

Upload SYNC.md

Browse files
Files changed (1) hide show
  1. SYNC.md +35 -31
SYNC.md CHANGED
@@ -8,9 +8,11 @@
8
  **Your ENTIRE job is these commands:**
9
  ```bash
10
  cd ~/pluginbridge && git pull
11
- cd build && cmake --build . --config Release 2>&1 | tail -30
12
  ```
13
 
 
 
14
  **If build succeeds:** Reply "βœ… build ok" β€” nothing else.
15
 
16
  **If build fails:** Reply with ONLY the first 3 errors:
@@ -24,35 +26,37 @@ cd build && cmake --build . --config Release 2>&1 | tail -30
24
  - Write code
25
  - Add commentary
26
 
27
- ## Architecture (Current)
28
- **Out-of-process hosting.** Two binaries:
29
- 1. `PluginBridge.vst3` β€” thin shell (audio bridge + MCP server), loaded in Ableton
30
- 2. `PluginBridgeHelper` β€” standalone exe bundled inside .vst3, hosts the actual plugin
31
-
32
- If a plugin crashes β†’ only Helper dies β†’ Ableton survives β†’ UI shows "Reload" button.
33
-
34
- ## What Was Ditched
35
- - ❌ In-process plugin hosting (crashed Ableton with some plugins)
36
- - ❌ Plugin scanning via `PluginDirectoryScanner` (triggered NSAlert crashes)
37
- - ❌ `addDefaultFormats()` (deleted in JUCE 8)
38
- - ❌ `juce::Thread::setCurrentThreadPriority()` (removed in JUCE 8)
39
- - ❌ `MSG_NOSIGNAL` (doesn't exist on macOS)
40
- - ❌ `NSApplicationActivationPolicyAccessory` β€” broke fullscreen, reverted
41
- - ❌ `showAsFloatingPanel()` with objc_msgSend level hacks β€” broke fullscreen, reverted
42
- - ❌ `NSWindowCollectionBehavior` changes β€” didn't help, reverted
43
- - ❌ Window level 25 (NSStatusWindowLevel) β€” unnecessary, reverted
44
-
45
- ## What's Working
46
- - βœ… Out-of-process via shared memory + semaphores + Unix socket
47
- - βœ… Crash-safe β€” plugins that abort() only kill the helper
48
- - βœ… Plugin GUI via `setAlwaysOnTop(true)` β€” stays in same Space as Ableton (including fullscreen)
49
- - βœ… X button hides GUI (doesn't quit Helper)
50
- - βœ… Toggle GUI via button in PluginBridge panel (Open GUI / Close GUI)
51
- - βœ… Plugin list from filesystem (no binary loading until user selects)
52
- - βœ… Native pthread priority for audio thread
 
 
53
 
54
  ## Status
55
- **Last push:** 2026-05-16 β€” Fixed fullscreen issue. Root cause: commit 0632681 replaced `setAlwaysOnTop(true)` with objc_msgSend hacks that broke Space behavior. Fix: restored `setAlwaysOnTop(true)` + kept X button fix.
56
- **Build:** Needs test
57
- **Test:** Pull, build, Ableton fullscreen β†’ Open GUI β†’ should open in same Space. X button should hide (not quit).
58
- **Next:** Sprint 3 β€” MCP param control from Claude Code (curl tests)
 
8
  **Your ENTIRE job is these commands:**
9
  ```bash
10
  cd ~/pluginbridge && git pull
11
+ cd build && cmake .. -DCMAKE_C_COMPILER=/usr/bin/cc -DCMAKE_CXX_COMPILER=/usr/bin/c++ && cmake --build . --config Release 2>&1 | tail -30
12
  ```
13
 
14
+ NOTE: Need full cmake reconfigure (not just build) because CMakeLists.txt changed.
15
+
16
  **If build succeeds:** Reply "βœ… build ok" β€” nothing else.
17
 
18
  **If build fails:** Reply with ONLY the first 3 errors:
 
26
  - Write code
27
  - Add commentary
28
 
29
+ ## Architecture (v0.3 β€” COMPLETE REWRITE)
30
+
31
+ **In-process hosting (like SnappySnap).** Plugin loads INSIDE Ableton.
32
+
33
+ ```
34
+ PluginBridge.vst3 (loaded in Ableton)
35
+ β”œβ”€β”€ Hosts the plugin IN-PROCESS (processBlock direct)
36
+ β”œβ”€β”€ Plugin GUI embedded inside PluginBridge's own editor
37
+ β”œβ”€β”€ MCP server on port 16620
38
+ β”œβ”€β”€ Blocklist (persistent, prevents known-crashy plugins from loading)
39
+ └── PluginBridgeHelper (bundled in .vst3/Contents/Resources/)
40
+ └── ONLY used for test-loading β€” spawned briefly, quits immediately
41
+ ```
42
+
43
+ **User flow:**
44
+ 1. Load PluginBridge in Ableton
45
+ 2. Select plugin from dropdown (blocked ones greyed out)
46
+ 3. Plugin loads β†’ GUI appears inside PluginBridge's window
47
+ 4. If load fails β†’ added to blocklist β†’ shows "not compatible" next time
48
+
49
+ **What was removed (v0.2 β†’ v0.3):**
50
+ - ❌ Shared memory audio routing
51
+ - ❌ Semaphores
52
+ - ❌ Unix socket IPC for audio
53
+ - ❌ HelperConnection.h/.cpp
54
+ - ❌ HelperIPC.h/.cpp
55
+ - ❌ Floating GUI window from Helper process
56
+ - ❌ All NSWindow/objc hacks
57
 
58
  ## Status
59
+ **Last push:** 2026-05-16 β€” Complete architecture rewrite to in-process hosting
60
+ **Build:** Needs cmake reconfigure + build
61
+ **Test:** Load in Ableton β†’ select Pro-Q 4 β†’ GUI should appear INSIDE PluginBridge's editor panel (same window as Ableton's plugin view)
62
+ **Known:** HelperIPC.cpp and HelperIPC.h still exist in repo but are no longer compiled. Can be deleted later.