---
name: morpheus-vst
description: JUCE-based polyphonic MP3 sampler plugin (VST3 + AU) for macOS. Drag MP3s onto MIDI notes via a web-based editor and play them back polyphonically. Skill builds the plugin from source and installs it into ~/Library/Audio/Plug-Ins. Use when the user asks to install Morpheus, build the Morpheus VST, or set up the MP3 sampler plugin.
---


# morpheus-vst

Polyphonic MP3 sampler plugin built with JUCE 8. Ships as VST3 + AudioUnit. The editor is an embedded web view that loads `~/vst/morpheus.html` at runtime — drop MP3s onto any of 128 MIDI pads, play them polyphonically (8 voices), save/load state.

## What this skill does

1. Verifies build toolchain (Xcode Command Line Tools + CMake).
2. Fetches JUCE 8.0.4 via CMake `FetchContent` (first build only, ~100 MB cloned).
3. Builds `Morpheus.vst3` and `Morpheus.component` (universal binary: arm64 + x86_64).
4. Installs `morpheus.html` to `~/vst/morpheus.html` (required at runtime — the plugin reads it from this path).
5. CMake auto-copies the built bundles to `~/Library/Audio/Plug-Ins/VST3/` and `~/Library/Audio/Plug-Ins/Components/`.

## Build + install steps

Run these from the skill's root directory (wherever this `SKILL.md` lives):

```bash
# 1. preflight
xcode-select -p >/dev/null 2>&1 || xcode-select --install
command -v cmake >/dev/null 2>&1 || brew install cmake

# 2. place the runtime HTML where the plugin expects it
mkdir -p "$HOME/vst"
cp morpheus.html "$HOME/vst/morpheus.html"

# 3. configure + build (Release, universal)
cmake -B build -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
cmake --build build --config Release -j$(sysctl -n hw.ncpu)

# 4. verify install
ls -la "$HOME/Library/Audio/Plug-Ins/VST3/Morpheus.vst3"
ls -la "$HOME/Library/Audio/Plug-Ins/Components/Morpheus.component"
```

First build takes 5–15 min (JUCE clone + full compile). Incremental rebuilds are ~30s.

## After install

- Rescan plugins in your DAW (Logic, Ableton, FL Studio, Reaper, etc).
- Plugin ID: `MorpheusAudio / Morpheus` (manufacturer code `Mrph`, plugin code `Mrph`).
- On macOS the binaries are unsigned — if your DAW refuses to load them, tell the user to run `xattr -dr com.apple.quarantine ~/Library/Audio/Plug-Ins/VST3/Morpheus.vst3 ~/Library/Audio/Plug-Ins/Components/Morpheus.component`.

## Editing the runtime UI

The editor HTML lives at `~/vst/morpheus.html` after install. Edit that file directly and reload the plugin window in your DAW to see changes — no rebuild needed.

## Uninstall

```bash
rm -rf "$HOME/Library/Audio/Plug-Ins/VST3/Morpheus.vst3"
rm -rf "$HOME/Library/Audio/Plug-Ins/Components/Morpheus.component"
rm -f  "$HOME/vst/morpheus.html"
```

## Troubleshooting

- **`fatal error: JuceHeader.h not found`** — CMake FetchContent failed, usually network. Run `cmake -B build ...` again.
- **Plugin loads but UI is blank / "morpheus.html not found"** — step 2 above was skipped. Copy `morpheus.html` to `~/vst/morpheus.html`.
- **DAW doesn't see the plugin** — force a rescan. In Logic: delete `~/Library/Caches/AudioUnitCache/*` and relaunch.
- **"Build target requires macOS 11.0+"** — bump `CMAKE_OSX_DEPLOYMENT_TARGET` in `CMakeLists.txt` to match your SDK.
