@mthines/reaper-mcp 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +209 -46
- package/claude-agents/gain-stage.md +25 -8
- package/claude-agents/master.md +3 -0
- package/claude-agents/mix-analyzer.md +17 -8
- package/claude-agents/mix-engineer.md +56 -16
- package/knowledge/CLAUDE.md +71 -0
- package/knowledge/reference/common-mistakes.md +29 -1
- package/knowledge/reference/frequencies.md +15 -13
- package/knowledge/reference/metering.md +19 -0
- package/knowledge/reference/perceived-loudness.md +122 -0
- package/knowledge/workflows/gain-staging.md +20 -6
- package/knowledge/workflows/learn-plugin.md +143 -0
- package/main.js +877 -132
- package/package.json +6 -1
- package/reaper/CLAUDE.md +60 -0
- package/reaper/install.sh +8 -4
- package/reaper/mcp_bridge.lua +873 -48
package/README.md
CHANGED
|
@@ -17,24 +17,29 @@ npx @mthines/reaper-mcp setup
|
|
|
17
17
|
|
|
18
18
|
# 2. In REAPER: Actions > Load ReaScript > select mcp_bridge.lua > Run
|
|
19
19
|
|
|
20
|
-
# 3. Install AI mix knowledge
|
|
21
|
-
cd your-project
|
|
20
|
+
# 3. Install AI mix knowledge (globally by default, or --project for local)
|
|
22
21
|
npx @mthines/reaper-mcp install-skills
|
|
23
22
|
|
|
24
23
|
# 4. Open Claude Code — you're ready to mix
|
|
25
24
|
```
|
|
26
25
|
|
|
27
|
-
That's it. Claude Code now has
|
|
26
|
+
That's it. Claude Code now has 67 REAPER tools and a professional mix engineer's knowledge base.
|
|
28
27
|
|
|
29
28
|
## What it does
|
|
30
29
|
|
|
31
30
|
```
|
|
32
31
|
Claude Code
|
|
33
|
-
├── MCP Tools (
|
|
34
|
-
│ ├── Track management (list, get/set properties)
|
|
35
|
-
│ ├── FX management (add/remove, get/set parameters, presets)
|
|
32
|
+
├── MCP Tools (67) ──→ controls REAPER in real-time
|
|
33
|
+
│ ├── Track management (list, get/set properties, arm, phase, input)
|
|
34
|
+
│ ├── FX management (add/remove, get/set parameters, enable/offline, presets)
|
|
36
35
|
│ ├── Transport (play, stop, record, cursor position)
|
|
37
36
|
│ ├── Metering (peak/RMS, FFT spectrum, LUFS, correlation, crest factor)
|
|
37
|
+
│ ├── Selection (selected tracks, time selection)
|
|
38
|
+
│ ├── Markers & regions (list, add, delete)
|
|
39
|
+
│ ├── Tempo map (all tempo/time sig changes)
|
|
40
|
+
│ ├── Envelopes (list, read/write automation points)
|
|
41
|
+
│ ├── MIDI editing (14 tools: notes, CC, items, analysis, batch ops)
|
|
42
|
+
│ ├── Media items (11 tools: properties, split, move, trim, stretch)
|
|
38
43
|
│ ├── Plugin discovery (list installed FX, search, presets)
|
|
39
44
|
│ ├── Snapshots (save/restore mixer state for A/B comparison)
|
|
40
45
|
│ └── Routing (sends, receives, bus structure)
|
|
@@ -43,7 +48,7 @@ Claude Code
|
|
|
43
48
|
├── Plugin knowledge (ReaEQ, Pro-Q 3, Helix Native, etc.)
|
|
44
49
|
├── Genre rules (rock, pop, hip-hop, electronic, orchestral, metal)
|
|
45
50
|
├── Workflows (gain staging, vocal chain, drum bus, mastering)
|
|
46
|
-
└── Reference (frequencies, compression, LUFS targets, common mistakes)
|
|
51
|
+
└── Reference (frequencies, compression, LUFS targets, perceived loudness, common mistakes)
|
|
47
52
|
```
|
|
48
53
|
|
|
49
54
|
## Architecture
|
|
@@ -72,6 +77,7 @@ npx @mthines/reaper-mcp setup
|
|
|
72
77
|
```
|
|
73
78
|
|
|
74
79
|
This copies into your REAPER resource folder:
|
|
80
|
+
|
|
75
81
|
- `mcp_bridge.lua` — persistent Lua bridge script
|
|
76
82
|
- `mcp_analyzer.jsfx` — FFT spectrum analyzer
|
|
77
83
|
- `mcp_lufs_meter.jsfx` — ITU-R BS.1770 LUFS meter
|
|
@@ -87,18 +93,27 @@ This copies into your REAPER resource folder:
|
|
|
87
93
|
|
|
88
94
|
You should see in REAPER's console: `MCP Bridge: Started`
|
|
89
95
|
|
|
90
|
-
### Step 3: Install AI mix knowledge
|
|
96
|
+
### Step 3: Install AI mix knowledge
|
|
91
97
|
|
|
92
98
|
```bash
|
|
93
|
-
|
|
99
|
+
# Install globally (default) — available from any directory
|
|
94
100
|
npx @mthines/reaper-mcp install-skills
|
|
101
|
+
|
|
102
|
+
# Or install into a specific project
|
|
103
|
+
cd your-music-project
|
|
104
|
+
npx @mthines/reaper-mcp install-skills --project
|
|
95
105
|
```
|
|
96
106
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
107
|
+
**Global install** (`--global`, default) installs to `~/.claude/`:
|
|
108
|
+
|
|
109
|
+
- `~/.claude/agents/` — mix engineer subagents (`@mix-engineer`, `@gain-stage`, `@mix-analyzer`, `@master`)
|
|
110
|
+
- `~/.claude/rules/` — architecture and development rules
|
|
111
|
+
- `~/.claude/skills/` — skills like `/learn-plugin`
|
|
112
|
+
- `~/.claude/knowledge/` — plugin knowledge, genre rules, workflows, reference data
|
|
113
|
+
|
|
114
|
+
**Project install** (`--project`) installs to your current directory:
|
|
115
|
+
|
|
116
|
+
- `.claude/agents/`, `.claude/rules/`, `.claude/skills/`, `knowledge/` — same as above, scoped to the project
|
|
102
117
|
- `.mcp.json` — MCP server configuration for Claude Code
|
|
103
118
|
|
|
104
119
|
### Step 4: Verify
|
|
@@ -109,29 +124,34 @@ npx @mthines/reaper-mcp doctor
|
|
|
109
124
|
|
|
110
125
|
Checks that the bridge is connected, knowledge is installed, and MCP config exists.
|
|
111
126
|
|
|
112
|
-
## MCP Tools (
|
|
127
|
+
## MCP Tools (67)
|
|
128
|
+
|
|
129
|
+
### Project & Tracks
|
|
113
130
|
|
|
114
|
-
### Track Management
|
|
115
131
|
| Tool | Description |
|
|
116
132
|
|------|-------------|
|
|
117
133
|
| `get_project_info` | Project name, tempo, time sig, sample rate, transport state |
|
|
118
|
-
| `list_tracks` | All tracks with volume, pan, mute/solo, FX count, routing |
|
|
134
|
+
| `list_tracks` | All tracks with volume, pan, mute/solo, arm, phase, FX count, routing |
|
|
119
135
|
| `get_track_properties` | Detailed track info + full FX chain list |
|
|
120
|
-
| `set_track_property` | Set volume (dB), pan, mute, solo |
|
|
136
|
+
| `set_track_property` | Set volume (dB), pan, mute, solo, recordArm, phase, input |
|
|
121
137
|
|
|
122
138
|
### FX Management
|
|
139
|
+
|
|
123
140
|
| Tool | Description |
|
|
124
141
|
|------|-------------|
|
|
125
142
|
| `add_fx` | Add FX by name (partial match: "ReaEQ", "Pro-Q 3") |
|
|
126
143
|
| `remove_fx` | Remove FX from chain by index |
|
|
127
144
|
| `get_fx_parameters` | List all FX params with values and ranges |
|
|
128
145
|
| `set_fx_parameter` | Set FX parameter (normalized 0.0-1.0) |
|
|
146
|
+
| `set_fx_enabled` | Enable or disable (bypass) an FX plugin |
|
|
147
|
+
| `set_fx_offline` | Set FX online/offline (offline = no CPU, preserves settings) |
|
|
129
148
|
| `list_available_fx` | Discover all installed plugins (VST, VST3, JS, CLAP, AU) |
|
|
130
149
|
| `search_fx` | Fuzzy search installed plugins by name |
|
|
131
150
|
| `get_fx_preset_list` | List available presets for an FX |
|
|
132
151
|
| `set_fx_preset` | Load a preset by name |
|
|
133
152
|
|
|
134
153
|
### Transport
|
|
154
|
+
|
|
135
155
|
| Tool | Description |
|
|
136
156
|
|------|-------------|
|
|
137
157
|
| `play` | Start playback |
|
|
@@ -140,7 +160,42 @@ Checks that the bridge is connected, knowledge is installed, and MCP config exis
|
|
|
140
160
|
| `get_transport_state` | Play/record/pause, cursor positions, tempo, time sig |
|
|
141
161
|
| `set_cursor_position` | Move edit cursor to position (seconds) |
|
|
142
162
|
|
|
163
|
+
### Selection & Navigation
|
|
164
|
+
|
|
165
|
+
| Tool | Description |
|
|
166
|
+
|------|-------------|
|
|
167
|
+
| `get_selected_tracks` | Currently selected tracks with indices and names |
|
|
168
|
+
| `get_time_selection` | Time/loop selection start, end, length |
|
|
169
|
+
| `set_time_selection` | Set the time selection range |
|
|
170
|
+
|
|
171
|
+
### Markers & Regions
|
|
172
|
+
|
|
173
|
+
| Tool | Description |
|
|
174
|
+
|------|-------------|
|
|
175
|
+
| `list_markers` | All project markers (index, name, position, color) |
|
|
176
|
+
| `list_regions` | All regions (index, name, start/end, color) |
|
|
177
|
+
| `add_marker` | Add marker at position with optional name/color |
|
|
178
|
+
| `add_region` | Add region with start/end, optional name/color |
|
|
179
|
+
| `delete_marker` | Delete a marker by index |
|
|
180
|
+
| `delete_region` | Delete a region by index |
|
|
181
|
+
|
|
182
|
+
### Tempo Map
|
|
183
|
+
|
|
184
|
+
| Tool | Description |
|
|
185
|
+
|------|-------------|
|
|
186
|
+
| `get_tempo_map` | All tempo/time sig changes (position, BPM, time sig, linear) |
|
|
187
|
+
|
|
188
|
+
### Envelopes / Automation
|
|
189
|
+
|
|
190
|
+
| Tool | Description |
|
|
191
|
+
|------|-------------|
|
|
192
|
+
| `get_track_envelopes` | List envelopes on a track (name, point count, active/visible/armed) |
|
|
193
|
+
| `get_envelope_points` | Get automation points with pagination |
|
|
194
|
+
| `insert_envelope_point` | Insert automation point (time, value, shape, tension) |
|
|
195
|
+
| `delete_envelope_point` | Delete an automation point by index |
|
|
196
|
+
|
|
143
197
|
### Metering & Analysis
|
|
198
|
+
|
|
144
199
|
| Tool | Description |
|
|
145
200
|
|------|-------------|
|
|
146
201
|
| `read_track_meters` | Peak/RMS L/R in dB |
|
|
@@ -149,7 +204,33 @@ Checks that the bridge is connected, knowledge is installed, and MCP config exis
|
|
|
149
204
|
| `read_track_correlation` | Stereo correlation, width, mid/side levels |
|
|
150
205
|
| `read_track_crest` | Crest factor (peak-to-RMS ratio) |
|
|
151
206
|
|
|
207
|
+
### MIDI Editing (14 tools)
|
|
208
|
+
|
|
209
|
+
| Tool | Description |
|
|
210
|
+
|------|-------------|
|
|
211
|
+
| `create_midi_item` | Create empty MIDI item on a track |
|
|
212
|
+
| `list_midi_items` | List MIDI items with position, length, note/CC counts |
|
|
213
|
+
| `get_midi_notes` | Get notes with pagination (offset/limit) |
|
|
214
|
+
| `analyze_midi` | Per-pitch velocity stats, histogram, machine gun detection |
|
|
215
|
+
| `insert_midi_note` / `insert_midi_notes` | Insert single or batch notes |
|
|
216
|
+
| `edit_midi_note` / `edit_midi_notes` | Edit single or batch notes |
|
|
217
|
+
| `delete_midi_note` | Delete a note by index |
|
|
218
|
+
| `get_midi_cc` / `insert_midi_cc` / `delete_midi_cc` | CC event management |
|
|
219
|
+
| `get_midi_item_properties` / `set_midi_item_properties` | MIDI item props |
|
|
220
|
+
|
|
221
|
+
### Media Item Editing (11 tools)
|
|
222
|
+
|
|
223
|
+
| Tool | Description |
|
|
224
|
+
|------|-------------|
|
|
225
|
+
| `list_media_items` | List items on a track (position, length, name, volume, type) |
|
|
226
|
+
| `get_media_item_properties` | Detailed properties (fades, play rate, pitch, source) |
|
|
227
|
+
| `set_media_item_properties` / `set_media_items_properties` | Set single or batch |
|
|
228
|
+
| `split_media_item` | Split at position, returns left/right info |
|
|
229
|
+
| `delete_media_item` / `move_media_item` / `trim_media_item` | Edit operations |
|
|
230
|
+
| `add_stretch_marker` / `get_stretch_markers` / `delete_stretch_marker` | Time-stretching |
|
|
231
|
+
|
|
152
232
|
### Snapshots (A/B Testing)
|
|
233
|
+
|
|
153
234
|
| Tool | Description |
|
|
154
235
|
|------|-------------|
|
|
155
236
|
| `snapshot_save` | Save current mixer state (volumes, pans, FX, mutes) |
|
|
@@ -157,22 +238,23 @@ Checks that the bridge is connected, knowledge is installed, and MCP config exis
|
|
|
157
238
|
| `snapshot_list` | List all saved snapshots |
|
|
158
239
|
|
|
159
240
|
### Routing
|
|
241
|
+
|
|
160
242
|
| Tool | Description |
|
|
161
243
|
|------|-------------|
|
|
162
244
|
| `get_track_routing` | Sends, receives, parent/folder info for a track |
|
|
163
245
|
|
|
164
246
|
## Using the Mix Agents
|
|
165
247
|
|
|
166
|
-
Once you've run `setup` and `install-skills`, open Claude Code
|
|
248
|
+
Once you've run `setup` and `install-skills`, open Claude Code. Four specialized mix agents are available:
|
|
167
249
|
|
|
168
250
|
### Available Agents
|
|
169
251
|
|
|
170
|
-
| Agent
|
|
171
|
-
|
|
252
|
+
| Agent | Invocation | What it does |
|
|
253
|
+
| ---------------- | --------------- | ------------------------------------------------------------------------- |
|
|
172
254
|
| **Mix Engineer** | `@mix-engineer` | General-purpose mix agent — analyzes, suggests, and executes any mix task |
|
|
173
|
-
| **Gain Stage**
|
|
174
|
-
| **Mix Analyzer** | `@mix-analyzer` | "Roast my mix" — analysis only, no changes, produces detailed report
|
|
175
|
-
| **Master**
|
|
255
|
+
| **Gain Stage** | `@gain-stage` | Perceived-loudness-aware gain staging with proper headroom |
|
|
256
|
+
| **Mix Analyzer** | `@mix-analyzer` | "Roast my mix" — analysis only, no changes, produces detailed report |
|
|
257
|
+
| **Master** | `@master` | Mastering chain targeting specific LUFS/platform standards |
|
|
176
258
|
|
|
177
259
|
### How to use them
|
|
178
260
|
|
|
@@ -196,12 +278,14 @@ claude --agent mix-engineer
|
|
|
196
278
|
### What happens under the hood
|
|
197
279
|
|
|
198
280
|
Each agent has:
|
|
281
|
+
|
|
199
282
|
- **Its own system prompt** — thinks like a mix engineer, not a general assistant
|
|
200
283
|
- **Pre-approved REAPER tools** — no permission prompts for every MCP call
|
|
201
284
|
- **Scoped MCP access** — only the `reaper` MCP server is loaded
|
|
202
285
|
- **Embedded reference data** — frequency bands, LUFS targets, compression settings
|
|
203
286
|
|
|
204
287
|
The workflow is always:
|
|
288
|
+
|
|
205
289
|
1. **Save a snapshot** (so you can always A/B or undo)
|
|
206
290
|
2. **Analyze** — read meters, spectrum, LUFS, correlation, crest factor
|
|
207
291
|
3. **Reason** — apply genre rules, frequency knowledge, and plugin expertise
|
|
@@ -212,6 +296,7 @@ The workflow is always:
|
|
|
212
296
|
### A/B Comparison
|
|
213
297
|
|
|
214
298
|
Every change is bracketed by snapshots:
|
|
299
|
+
|
|
215
300
|
1. Agent saves a "Before" snapshot automatically
|
|
216
301
|
2. Makes all changes
|
|
217
302
|
3. Saves an "After" snapshot
|
|
@@ -236,12 +321,12 @@ The knowledge base is what makes this more than just a remote control — it's a
|
|
|
236
321
|
|
|
237
322
|
Ships with knowledge for stock REAPER plugins and popular third-party suites:
|
|
238
323
|
|
|
239
|
-
| Plugin
|
|
240
|
-
|
|
241
|
-
| ReaEQ, ReaComp, ReaDelay, ReaVerb, ReaGate, ReaLimit | Stock
|
|
242
|
-
| FabFilter Pro-Q 3, Pro-C 2, Pro-L 2
|
|
243
|
-
| Line 6 Helix Native
|
|
244
|
-
| JS: 1175 Compressor
|
|
324
|
+
| Plugin | Category | Preference |
|
|
325
|
+
| ---------------------------------------------------- | ----------------------- | ---------- |
|
|
326
|
+
| ReaEQ, ReaComp, ReaDelay, ReaVerb, ReaGate, ReaLimit | Stock | 30-50 |
|
|
327
|
+
| FabFilter Pro-Q 3, Pro-C 2, Pro-L 2 | Premium EQ/Comp/Limiter | 85-92 |
|
|
328
|
+
| Line 6 Helix Native | Amp Sim | 82 |
|
|
329
|
+
| JS: 1175 Compressor | Character Comp | 50 |
|
|
245
330
|
|
|
246
331
|
The agent automatically discovers your installed plugins and uses the best available option for each task. If you have Pro-Q 3, it uses that. If not, it falls back to ReaEQ.
|
|
247
332
|
|
|
@@ -263,14 +348,14 @@ Or manually add a markdown file to `knowledge/plugins/`. See `knowledge/plugins/
|
|
|
263
348
|
|
|
264
349
|
Processing decisions adapt to the genre:
|
|
265
350
|
|
|
266
|
-
| Genre
|
|
267
|
-
|
|
268
|
-
| Rock
|
|
269
|
-
| Pop
|
|
270
|
-
| Hip-Hop
|
|
271
|
-
| Electronic | -10 to -6
|
|
272
|
-
| Orchestral | -23 to -16
|
|
273
|
-
| Metal
|
|
351
|
+
| Genre | LUFS Target | Key Characteristics |
|
|
352
|
+
| ---------- | ----------- | ----------------------------------------------- |
|
|
353
|
+
| Rock | -11 to -9 | Parallel drum compression, hard-panned guitars |
|
|
354
|
+
| Pop | -14 to -10 | Vocal-forward, two-stage compression, bus glue |
|
|
355
|
+
| Hip-Hop | -10 to -7 | 808 saturation, aggressive vocal comp, mono sub |
|
|
356
|
+
| Electronic | -10 to -6 | Sidechain pump, sub mono, stereo width |
|
|
357
|
+
| Orchestral | -23 to -16 | Preserve dynamics, hall reverb staging |
|
|
358
|
+
| Metal | -11 to -8 | V-scoop guitars, tight drums, 4-guitar wall |
|
|
274
359
|
|
|
275
360
|
## Autonomous Mode (Allow All Tools)
|
|
276
361
|
|
|
@@ -307,7 +392,48 @@ Add to your project's `.claude/settings.json` (or `~/.claude/settings.json` for
|
|
|
307
392
|
"mcp__reaper__snapshot_save",
|
|
308
393
|
"mcp__reaper__snapshot_restore",
|
|
309
394
|
"mcp__reaper__snapshot_list",
|
|
310
|
-
"mcp__reaper__get_track_routing"
|
|
395
|
+
"mcp__reaper__get_track_routing",
|
|
396
|
+
"mcp__reaper__set_fx_enabled",
|
|
397
|
+
"mcp__reaper__set_fx_offline",
|
|
398
|
+
"mcp__reaper__get_selected_tracks",
|
|
399
|
+
"mcp__reaper__get_time_selection",
|
|
400
|
+
"mcp__reaper__set_time_selection",
|
|
401
|
+
"mcp__reaper__list_markers",
|
|
402
|
+
"mcp__reaper__list_regions",
|
|
403
|
+
"mcp__reaper__add_marker",
|
|
404
|
+
"mcp__reaper__add_region",
|
|
405
|
+
"mcp__reaper__delete_marker",
|
|
406
|
+
"mcp__reaper__delete_region",
|
|
407
|
+
"mcp__reaper__get_tempo_map",
|
|
408
|
+
"mcp__reaper__get_track_envelopes",
|
|
409
|
+
"mcp__reaper__get_envelope_points",
|
|
410
|
+
"mcp__reaper__insert_envelope_point",
|
|
411
|
+
"mcp__reaper__delete_envelope_point",
|
|
412
|
+
"mcp__reaper__create_midi_item",
|
|
413
|
+
"mcp__reaper__list_midi_items",
|
|
414
|
+
"mcp__reaper__get_midi_notes",
|
|
415
|
+
"mcp__reaper__analyze_midi",
|
|
416
|
+
"mcp__reaper__insert_midi_note",
|
|
417
|
+
"mcp__reaper__insert_midi_notes",
|
|
418
|
+
"mcp__reaper__edit_midi_note",
|
|
419
|
+
"mcp__reaper__edit_midi_notes",
|
|
420
|
+
"mcp__reaper__delete_midi_note",
|
|
421
|
+
"mcp__reaper__get_midi_cc",
|
|
422
|
+
"mcp__reaper__insert_midi_cc",
|
|
423
|
+
"mcp__reaper__delete_midi_cc",
|
|
424
|
+
"mcp__reaper__get_midi_item_properties",
|
|
425
|
+
"mcp__reaper__set_midi_item_properties",
|
|
426
|
+
"mcp__reaper__list_media_items",
|
|
427
|
+
"mcp__reaper__get_media_item_properties",
|
|
428
|
+
"mcp__reaper__set_media_item_properties",
|
|
429
|
+
"mcp__reaper__set_media_items_properties",
|
|
430
|
+
"mcp__reaper__split_media_item",
|
|
431
|
+
"mcp__reaper__delete_media_item",
|
|
432
|
+
"mcp__reaper__move_media_item",
|
|
433
|
+
"mcp__reaper__trim_media_item",
|
|
434
|
+
"mcp__reaper__add_stretch_marker",
|
|
435
|
+
"mcp__reaper__get_stretch_markers",
|
|
436
|
+
"mcp__reaper__delete_stretch_marker"
|
|
311
437
|
]
|
|
312
438
|
}
|
|
313
439
|
}
|
|
@@ -321,7 +447,8 @@ The format is `mcp__reaper__{tool_name}`. Once added, Claude Code will run these
|
|
|
321
447
|
npx @mthines/reaper-mcp # Start MCP server (default)
|
|
322
448
|
npx @mthines/reaper-mcp serve # Start MCP server (stdio mode)
|
|
323
449
|
npx @mthines/reaper-mcp setup # Install Lua bridge + JSFX into REAPER
|
|
324
|
-
npx @mthines/reaper-mcp install-skills # Install AI knowledge + agents
|
|
450
|
+
npx @mthines/reaper-mcp install-skills # Install AI knowledge + agents (globally by default)
|
|
451
|
+
npx @mthines/reaper-mcp install-skills --project # Install into current project directory
|
|
325
452
|
npx @mthines/reaper-mcp doctor # Verify everything is configured
|
|
326
453
|
npx @mthines/reaper-mcp status # Check bridge connection
|
|
327
454
|
```
|
|
@@ -335,7 +462,7 @@ reaper-mcp setup
|
|
|
335
462
|
|
|
336
463
|
## Claude Code Integration
|
|
337
464
|
|
|
338
|
-
After `install-skills`, your project has a `.mcp.json`:
|
|
465
|
+
After `install-skills --project`, your project has a `.mcp.json`:
|
|
339
466
|
|
|
340
467
|
```json
|
|
341
468
|
{
|
|
@@ -350,13 +477,31 @@ After `install-skills`, your project has a `.mcp.json`:
|
|
|
350
477
|
|
|
351
478
|
Claude Code reads this automatically. Open Claude Code in your project and the REAPER tools are available.
|
|
352
479
|
|
|
480
|
+
### Running from source (development)
|
|
481
|
+
|
|
482
|
+
If you're developing reaper-mcp and want changes reflected immediately without rebuilding, point your `.mcp.json` at the TypeScript source using `npx tsx`:
|
|
483
|
+
|
|
484
|
+
```json
|
|
485
|
+
{
|
|
486
|
+
"mcpServers": {
|
|
487
|
+
"reaper": {
|
|
488
|
+
"command": "npx",
|
|
489
|
+
"args": ["tsx", "/path/to/reaper-mcp/apps/reaper-mcp-server/src/main.ts", "serve"]
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
See [DEVELOPMENT.md](DEVELOPMENT.md) for the full dev workflow.
|
|
496
|
+
|
|
353
497
|
## Environment Variables
|
|
354
498
|
|
|
355
|
-
| Variable
|
|
356
|
-
|
|
499
|
+
| Variable | Description | Default |
|
|
500
|
+
| ---------------------- | ---------------------------------- | -------------------- |
|
|
357
501
|
| `REAPER_RESOURCE_PATH` | Override REAPER resource directory | Auto-detected per OS |
|
|
358
502
|
|
|
359
503
|
Platform defaults:
|
|
504
|
+
|
|
360
505
|
- **macOS**: `~/Library/Application Support/REAPER`
|
|
361
506
|
- **Windows**: `%APPDATA%/REAPER`
|
|
362
507
|
- **Linux**: `~/.config/REAPER`
|
|
@@ -366,14 +511,14 @@ Platform defaults:
|
|
|
366
511
|
```
|
|
367
512
|
reaper-mcp/
|
|
368
513
|
├── apps/
|
|
369
|
-
│ ├── reaper-mcp-server/ # MCP server (
|
|
514
|
+
│ ├── reaper-mcp-server/ # MCP server (67 tools, esbuild bundle)
|
|
370
515
|
│ └── reaper-mix-agent/ # AI mix agent (knowledge loader, plugin resolver)
|
|
371
516
|
├── libs/protocol/ # Shared TypeScript types
|
|
372
517
|
├── knowledge/ # AI mix engineer knowledge base
|
|
373
518
|
│ ├── plugins/ # Plugin-specific knowledge (extensible)
|
|
374
519
|
│ ├── genres/ # Genre mixing conventions
|
|
375
520
|
│ ├── workflows/ # Step-by-step mixing workflows
|
|
376
|
-
│ └── reference/ # Frequency, compression, metering cheat sheets
|
|
521
|
+
│ └── reference/ # Frequency, compression, metering, perceived loudness cheat sheets
|
|
377
522
|
├── reaper/ # Files installed into REAPER
|
|
378
523
|
│ ├── mcp_bridge.lua # Persistent Lua bridge
|
|
379
524
|
│ ├── mcp_analyzer.jsfx # FFT spectrum analyzer
|
|
@@ -384,16 +529,34 @@ reaper-mcp/
|
|
|
384
529
|
└── nx.json # Nx workspace config
|
|
385
530
|
```
|
|
386
531
|
|
|
532
|
+
## Updating the Lua Bridge
|
|
533
|
+
|
|
534
|
+
The MCP server (TypeScript) and the Lua bridge (REAPER) are two separate components. After updating to a new version — or after adding new tools during development — you need to reinstall the bridge files and reload the script in REAPER:
|
|
535
|
+
|
|
536
|
+
```bash
|
|
537
|
+
# Reinstall bridge files into REAPER
|
|
538
|
+
npx @mthines/reaper-mcp setup
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
Then in REAPER:
|
|
542
|
+
|
|
543
|
+
1. **Stop** the running bridge: Actions > Running Scripts > stop `mcp_bridge.lua`
|
|
544
|
+
2. **Reload** the updated script: Actions > Load ReaScript > select `mcp_bridge.lua` > Run
|
|
545
|
+
|
|
546
|
+
If existing tools (like `get_project_info`) work but new tools fail or timeout, this is almost always because the Lua bridge needs to be updated and reloaded.
|
|
547
|
+
|
|
387
548
|
## Development
|
|
388
549
|
|
|
389
550
|
```bash
|
|
390
551
|
pnpm install
|
|
391
552
|
pnpm nx run-many --target=build # Build all
|
|
392
553
|
pnpm nx run-many --target=lint # Lint all
|
|
393
|
-
pnpm nx run-many --target=test # Test all (
|
|
554
|
+
pnpm nx run-many --target=test # Test all (200+ tests)
|
|
394
555
|
pnpm nx run-many --target=build,lint,test # Everything
|
|
395
556
|
```
|
|
396
557
|
|
|
558
|
+
See [DEVELOPMENT.md](DEVELOPMENT.md) for the full dev workflow including running from source, MCP Inspector, and bridge update details.
|
|
559
|
+
|
|
397
560
|
## License
|
|
398
561
|
|
|
399
562
|
MIT
|
|
@@ -10,7 +10,9 @@ permissionMode: acceptEdits
|
|
|
10
10
|
|
|
11
11
|
# Gain Staging Agent
|
|
12
12
|
|
|
13
|
-
You are a gain staging specialist for REAPER DAW. Your
|
|
13
|
+
You are a gain staging specialist for REAPER DAW. Your job is to set all track levels to proper averages before any FX processing, ensuring proper headroom for the mix.
|
|
14
|
+
|
|
15
|
+
**Critical**: Don't just set every track to -18 dBFS. Account for **perceived loudness** — the human ear is 10-15 dB more sensitive at 2-5 kHz than at low frequencies. Bass instruments need higher meter readings than vocals/cymbals to sound balanced. Read `knowledge/reference/perceived-loudness.md` for the full reference.
|
|
14
16
|
|
|
15
17
|
---
|
|
16
18
|
|
|
@@ -42,14 +44,25 @@ params: { trackIndex: N }
|
|
|
42
44
|
```
|
|
43
45
|
Wait a few seconds of playback before reading. Record the RMS level for each track.
|
|
44
46
|
|
|
45
|
-
### Step 5: Calculate adjustments
|
|
46
|
-
|
|
47
|
+
### Step 5: Calculate adjustments (perceived-loudness-aware)
|
|
48
|
+
|
|
49
|
+
Use instrument-appropriate targets, NOT a flat -18 dBFS for everything:
|
|
50
|
+
|
|
51
|
+
| Instrument Category | Target RMS | Why |
|
|
52
|
+
|-------------------|-----------|-----|
|
|
53
|
+
| Sub/bass (kick sub, bass, 808) | -16 to -14 dBFS | Low frequencies sound quieter; needs more energy on meters |
|
|
54
|
+
| Full-range (piano, full guitar, strings) | -18 dBFS | Standard target; spans the perceptual range |
|
|
55
|
+
| Presence-range (vocals, snare crack, lead guitar) | -19 to -20 dBFS | 2-5 kHz content sounds louder than meters show |
|
|
56
|
+
| High-frequency (cymbals, hi-hats, shakers) | -20 to -22 dBFS | Very sensitive frequency range; a little goes a long way |
|
|
57
|
+
|
|
58
|
+
Formula: `gain_dB = target_dBFS - current_average_dBFS`
|
|
47
59
|
Round to nearest 0.5 dB.
|
|
48
60
|
|
|
49
61
|
Examples:
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
62
|
+
- Bass at -24 dBFS → target -15 dBFS → needs +9 dB
|
|
63
|
+
- Vocal at -10 dBFS → target -19 dBFS → needs -9 dB
|
|
64
|
+
- Piano at -24 dBFS → target -18 dBFS → needs +6 dB
|
|
65
|
+
- Hi-hat at -14 dBFS → target -21 dBFS → needs -7 dB
|
|
53
66
|
|
|
54
67
|
### Step 6: Apply adjustments via the track fader
|
|
55
68
|
```
|
|
@@ -77,8 +90,11 @@ List each track with:
|
|
|
77
90
|
|
|
78
91
|
---
|
|
79
92
|
|
|
80
|
-
## Targets
|
|
81
|
-
- **
|
|
93
|
+
## Targets (Perceived-Loudness-Aware)
|
|
94
|
+
- **Sub/bass instruments**: -16 to -14 dBFS RMS (sounds quieter than meters show)
|
|
95
|
+
- **Full-range instruments**: -18 dBFS RMS (standard target)
|
|
96
|
+
- **Presence-range instruments**: -19 to -20 dBFS RMS (sounds louder due to ear sensitivity)
|
|
97
|
+
- **High-frequency instruments**: -20 to -22 dBFS RMS (very sensitive range)
|
|
82
98
|
- **Peak per track**: -12 dBFS max
|
|
83
99
|
- **Mix bus peak**: -6 to -3 dBFS in the chorus
|
|
84
100
|
|
|
@@ -88,3 +104,4 @@ List each track with:
|
|
|
88
104
|
- Do NOT read a single moment — play the densest section for 10+ seconds
|
|
89
105
|
- Bus tracks sum multiple sources — check them AFTER adjusting source tracks
|
|
90
106
|
- If a track has wildly inconsistent levels, note it as needing clip gain editing (manual task)
|
|
107
|
+
- Do NOT set all tracks to the same dBFS target — bass instruments need more energy on meters than vocals/cymbals to sound perceptually balanced (see perceived loudness targets above)
|
package/claude-agents/master.md
CHANGED
|
@@ -73,6 +73,8 @@ Apply to the mix bus. Typical mastering moves:
|
|
|
73
73
|
| Presence | 2–4 kHz | +0.5 dB | Vocal clarity (only if needed) |
|
|
74
74
|
| Air shelf | 10–12 kHz | +0.5 to +1 dB | Subtle sparkle |
|
|
75
75
|
|
|
76
|
+
**Perceived loudness note**: The 2-5 kHz range is where the ear is most sensitive (10-15 dB more than bass). Even +0.5 dB here has outsized perceptual impact. Conversely, low-end cuts of -1 dB may barely be noticed. When assessing the spectrum, remember a "flat" analyzer response does NOT equal perceptually flat — the ear naturally amplifies presence frequencies.
|
|
77
|
+
|
|
76
78
|
**Rule**: If you're EQing more than +-2 dB, there's a mix problem — go back and fix it.
|
|
77
79
|
|
|
78
80
|
### Step 5: Mastering compression (optional, for glue only)
|
|
@@ -124,3 +126,4 @@ params: { name: "master-v1", description: "Mastered — targeting {LUFS} for {pl
|
|
|
124
126
|
- Linear phase EQ if available (avoids phase shift on the master)
|
|
125
127
|
- Always A/B with `snapshot_restore` — mastering can be subtle enough to fool yourself
|
|
126
128
|
- If the user asks for a specific LUFS target that's louder than genre convention, warn them but comply
|
|
129
|
+
- **Perceived loudness awareness**: When evaluating the mix bus spectrum, account for equal-loudness contours. A mix that looks flat on the analyzer will sound presence-heavy. A well-balanced master typically shows a gentle downward slope from low to high frequencies on a spectrum analyzer, compensating for the ear's heightened sensitivity at 2-5 kHz
|
|
@@ -27,7 +27,7 @@ tool: list_tracks
|
|
|
27
27
|
```
|
|
28
28
|
Note: track count, tempo, sample rate, bus structure.
|
|
29
29
|
|
|
30
|
-
### 2. Gain staging check
|
|
30
|
+
### 2. Gain staging check (perceived-loudness-aware)
|
|
31
31
|
Start playback of the chorus/loudest section:
|
|
32
32
|
```
|
|
33
33
|
tool: play
|
|
@@ -36,22 +36,30 @@ Then read meters for ALL tracks:
|
|
|
36
36
|
```
|
|
37
37
|
tool: read_track_meters (for each track)
|
|
38
38
|
```
|
|
39
|
-
Flag:
|
|
39
|
+
Flag standard issues:
|
|
40
40
|
- Any track averaging below -24 dBFS or above -10 dBFS
|
|
41
41
|
- Any track peaking at or above -3 dBFS
|
|
42
42
|
- Mix bus peaking above -6 dBFS
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
**Also check perceived loudness balance** (see `knowledge/reference/perceived-loudness.md`):
|
|
45
|
+
- Bass instruments (kick, bass, 808) should read **higher** on meters than vocals/guitars (-16 to -14 dBFS) — if they're at the same level as presence-range instruments, they'll sound too quiet
|
|
46
|
+
- Vocals/snare should read **lower** (-19 to -20 dBFS) — the 2-5 kHz content sounds louder than the meter shows
|
|
47
|
+
- Hi-hats/cymbals at similar meter levels as bass = way too loud perceptually
|
|
48
|
+
- Flag any mix where all tracks are at the same RMS level regardless of spectral content — this is a common amateur mistake
|
|
49
|
+
|
|
50
|
+
### 3. Frequency balance (with perceived loudness context)
|
|
45
51
|
Read spectrum on the mix bus:
|
|
46
52
|
```
|
|
47
53
|
tool: read_track_spectrum (mix bus index)
|
|
48
54
|
```
|
|
49
55
|
Check for:
|
|
50
|
-
- **Sub buildup** (20–60 Hz): excessive rumble
|
|
51
|
-
- **Low-mid mud** (200–400 Hz): cloudy, boxy sound
|
|
52
|
-
- **Harshness** (2–5 kHz): fatiguing, piercing
|
|
53
|
-
- **Missing air** (10–20 kHz): dull, lifeless
|
|
54
|
-
- **Missing presence** (1–4 kHz): vocals buried
|
|
56
|
+
- **Sub buildup** (20–60 Hz): excessive rumble — but remember sub energy sounds quieter than it meters; some buildup is needed for bass-heavy genres
|
|
57
|
+
- **Low-mid mud** (200–400 Hz): cloudy, boxy sound — the ear is less sensitive here, so mud accumulates before it's noticed on meters
|
|
58
|
+
- **Harshness** (2–5 kHz): fatiguing, piercing — the ear's peak sensitivity zone. Even modest energy here sounds loud and causes listening fatigue
|
|
59
|
+
- **Missing air** (10–20 kHz): dull, lifeless — sensitivity drops off, but accumulated boosts across many tracks cause fatigue
|
|
60
|
+
- **Missing presence** (1–4 kHz): vocals buried — often a masking issue (guitars/keys competing in the most sensitive range), not just a level issue
|
|
61
|
+
|
|
62
|
+
**Perceived loudness note**: A "flat" spectrum on an analyzer does NOT mean a perceptually balanced mix. The ear naturally amplifies 2-5 kHz, so a truly flat spectrum will sound harsh/forward in the presence range.
|
|
55
63
|
|
|
56
64
|
### 4. Dynamics check
|
|
57
65
|
```
|
|
@@ -136,3 +144,4 @@ Structure your output as:
|
|
|
136
144
|
- Don't just say "it's muddy" — say "200–400 Hz shows +4 dB above the average curve"
|
|
137
145
|
- Always suggest a specific fix, not just identify the problem
|
|
138
146
|
- Find something positive to mention — even in rough mixes
|
|
147
|
+
- **Account for perceived loudness** — don't flag bass instruments as "too hot" just because they meter higher than vocals. Bass needs more dB to sound balanced. Conversely, flag presence-range instruments that meter the same as bass — they'll sound much louder than intended
|