File size: 2,471 Bytes
2359fb1
 
7cf0961
 
 
2359fb1
7cf0961
b954f19
2359fb1
 
689e62a
2359fb1
7cf0961
2359fb1
7cf0961
a33f442
2359fb1
 
 
7cf0961
2359fb1
7c61402
 
2359fb1
7c61402
7cf0961
34b8026
 
 
 
 
 
 
 
 
 
 
 
 
4de29df
 
 
 
34b8026
e4e1e6d
34b8026
 
4de29df
 
34b8026
 
 
 
2359fb1
4de29df
c199580
4de29df
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# PluginBridge β€” Sync File
> HF Claude builds. Claude Code: pull β†’ build β†’ paste error (if any). That's it.

---

## Claude Code Rules (TOKEN EFFICIENT MODE)

**Your ENTIRE job is these commands:**
```bash
cd ~/pluginbridge && git pull
cd build && cmake --build . --config Release 2>&1 | tail -30
```

**If build succeeds:** Reply "βœ… build ok" β€” nothing else.

**If build fails:** Reply with ONLY the first 3 errors:
```
❌ [filename]:[line] β€” [one-line error message]
```

## DO NOT:
- Explain errors
- Suggest fixes
- Write code
- Add commentary

## Architecture (Current)
**Out-of-process hosting.** Two binaries:
1. `PluginBridge.vst3` β€” thin shell (audio bridge + MCP server), loaded in Ableton
2. `PluginBridgeHelper` β€” standalone exe bundled inside .vst3, hosts the actual plugin

If a plugin crashes β†’ only Helper dies β†’ Ableton survives β†’ UI shows "Reload" button.

## What Was Ditched
- ❌ In-process plugin hosting (crashed Ableton with some plugins)
- ❌ Plugin scanning via `PluginDirectoryScanner` (triggered NSAlert crashes)
- ❌ `addDefaultFormats()` (deleted in JUCE 8)
- ❌ `juce::Thread::setCurrentThreadPriority()` (removed in JUCE 8)
- ❌ `MSG_NOSIGNAL` (doesn't exist on macOS)
- ❌ `NSApplicationActivationPolicyAccessory` β€” broke fullscreen, reverted
- ❌ `showAsFloatingPanel()` with objc_msgSend level hacks β€” broke fullscreen, reverted
- ❌ `NSWindowCollectionBehavior` changes β€” didn't help, reverted
- ❌ Window level 25 (NSStatusWindowLevel) β€” unnecessary, reverted

## What's Working
- βœ… Out-of-process via shared memory + semaphores + Unix socket
- βœ… Crash-safe β€” plugins that abort() only kill the helper
- βœ… Plugin GUI via `setAlwaysOnTop(true)` β€” stays in same Space as Ableton (including fullscreen)
- βœ… X button hides GUI (doesn't quit Helper)
- βœ… Toggle GUI via button in PluginBridge panel (Open GUI / Close GUI)
- βœ… Plugin list from filesystem (no binary loading until user selects)
- βœ… Native pthread priority for audio thread

## Status
**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.
**Build:** Needs test
**Test:** Pull, build, Ableton fullscreen β†’ Open GUI β†’ should open in same Space. X button should hide (not quit).
**Next:** Sprint 3 β€” MCP param control from Claude Code (curl tests)