@mthines/reaper-mcp 0.19.0 → 0.70.2

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.
Files changed (116) hide show
  1. package/README.md +19 -570
  2. package/bridge-ui/mcp_bridge.html +129 -0
  3. package/bridge-ui/mcp_bridge.webmanifest +16 -0
  4. package/bridge-ui/mcp_bridge_icon_192.png +0 -0
  5. package/bridge-ui/mcp_bridge_icon_512.png +0 -0
  6. package/bridge-ui/mcp_bridge_sw.js +35 -0
  7. package/claude/agents/plugin-researcher.md +188 -0
  8. package/claude/knowledge/reference/aesthetics-scoring.md +48 -0
  9. package/{knowledge → claude/knowledge}/reference/common-mistakes.md +1 -1
  10. package/claude/knowledge/reference/lorekit-setup.md +36 -0
  11. package/claude/knowledge/reference/memory-protocol.md +377 -0
  12. package/{knowledge → claude/knowledge}/reference/metering.md +5 -5
  13. package/claude/knowledge/reference/perceived-loudness.md +182 -0
  14. package/{knowledge → claude/knowledge}/workflows/editing.md +4 -0
  15. package/{knowledge → claude/knowledge}/workflows/gain-staging.md +21 -23
  16. package/{knowledge → claude/knowledge}/workflows/learn-plugin.md +15 -48
  17. package/{knowledge → claude/knowledge}/workflows/master-bus.md +13 -1
  18. package/claude/knowledge/workflows/section-levels.md +138 -0
  19. package/{knowledge → claude/knowledge}/workflows/session-prep.md +4 -0
  20. package/claude/knowledge/workflows/transient-lighting.md +52 -0
  21. package/claude/skills/critique/SKILL.md +131 -0
  22. package/claude/skills/editing/SKILL.md +281 -0
  23. package/claude/skills/learn-plugin/SKILL.md +210 -0
  24. package/claude/skills/mastering/SKILL.md +151 -0
  25. package/claude/skills/mix-memory/SKILL.md +140 -0
  26. package/claude/skills/mixer/SKILL.md +253 -0
  27. package/claude/skills/new-extension/SKILL.md +324 -0
  28. package/main.js +7843 -1940
  29. package/package.json +17 -15
  30. package/reaper/CLAUDE.md +22 -4
  31. package/reaper/mcp_actions_lib.lua +375 -0
  32. package/reaper/mcp_analyzer.jsfx +27 -12
  33. package/reaper/mcp_arrange_lib.lua +949 -0
  34. package/reaper/mcp_bridge.lua +2321 -758
  35. package/reaper/mcp_edit_views_lib.lua +1378 -0
  36. package/reaper/mcp_envelopes_lib.lua +748 -0
  37. package/reaper/mcp_extensions_lib.lua +55 -0
  38. package/reaper/mcp_fxstate_lib.lua +144 -0
  39. package/reaper/mcp_gain_trace.jsfx +126 -0
  40. package/reaper/mcp_items_lib.lua +877 -0
  41. package/reaper/mcp_lufs_meter.jsfx +16 -13
  42. package/reaper/mcp_midi_lib.lua +555 -0
  43. package/reaper/mcp_mixing_lib.lua +1021 -0
  44. package/reaper/mcp_plan_lib.lua +801 -0
  45. package/reaper/mcp_prefs_lib.lua +127 -0
  46. package/reaper/mcp_project_lib.lua +1088 -0
  47. package/reaper/mcp_recording_lib.lua +595 -0
  48. package/reaper/mcp_render_lib.lua +492 -0
  49. package/reaper/mcp_snapshot_lib.lua +547 -120
  50. package/reaper/mcp_snapshot_next.lua +10 -4
  51. package/reaper/mcp_snapshot_prev.lua +11 -4
  52. package/reaper/mcp_snapshot_quick_save.lua +7 -32
  53. package/reaper/mcp_snapshots_ui_lib.lua +258 -0
  54. package/reaper/mcp_tracks_lib.lua +409 -0
  55. package/sidecar/analysis.py +661 -0
  56. package/sidecar/chords.py +96 -0
  57. package/sidecar/mixcheck.py +295 -0
  58. package/sidecar/requirements-chords.txt +6 -0
  59. package/sidecar/requirements-separation.txt +3 -0
  60. package/sidecar/requirements.txt +17 -0
  61. package/sidecar/separation.py +142 -0
  62. package/sidecar/server.py +622 -0
  63. package/sidecar/tests/test_analysis.py +249 -0
  64. package/sidecar/tests/test_chords.py +117 -0
  65. package/sidecar/tests/test_mixcheck.py +163 -0
  66. package/sidecar/tests/test_separation.py +73 -0
  67. package/sidecar/tests/test_server.py +464 -0
  68. package/sidecar/tests/test_verify.py +243 -0
  69. package/sidecar/tests/test_voice_render.py +268 -0
  70. package/sidecar/tests/test_voice_sketch.py +140 -0
  71. package/sidecar/verify.py +224 -0
  72. package/sidecar/voice_render.py +295 -0
  73. package/sidecar/voice_sketch.py +280 -0
  74. package/claude-agents/critique.md +0 -147
  75. package/claude-agents/editor.md +0 -184
  76. package/claude-agents/levels.md +0 -107
  77. package/claude-agents/mastering.md +0 -129
  78. package/claude-agents/mixer.md +0 -248
  79. package/claude-agents/preflight.md +0 -149
  80. package/claude-agents/producer.md +0 -159
  81. package/claude-agents/setup.md +0 -150
  82. package/claude-agents/stems.md +0 -135
  83. package/claude-rules/architecture.md +0 -39
  84. package/claude-rules/development.md +0 -54
  85. package/claude-rules/lua-bridge.md +0 -50
  86. package/claude-rules/testing.md +0 -42
  87. package/claude-skills/learn-plugin.md +0 -123
  88. package/knowledge/CLAUDE.md +0 -71
  89. package/knowledge/plugins/_template.md +0 -82
  90. package/knowledge/plugins/fabfilter/pro-c-2.md +0 -117
  91. package/knowledge/plugins/fabfilter/pro-l-2.md +0 -95
  92. package/knowledge/plugins/fabfilter/pro-q-3.md +0 -112
  93. package/knowledge/plugins/neural-dsp/helix-native.md +0 -104
  94. package/knowledge/plugins/stock-reaper/js-1175-compressor.md +0 -94
  95. package/knowledge/plugins/stock-reaper/rea-comp.md +0 -100
  96. package/knowledge/plugins/stock-reaper/rea-delay.md +0 -95
  97. package/knowledge/plugins/stock-reaper/rea-eq.md +0 -103
  98. package/knowledge/plugins/stock-reaper/rea-gate.md +0 -99
  99. package/knowledge/plugins/stock-reaper/rea-limit.md +0 -75
  100. package/knowledge/plugins/stock-reaper/rea-verb.md +0 -76
  101. package/knowledge/reference/perceived-loudness.md +0 -122
  102. package/reaper/mcp_snapshot_manager.lua +0 -1001
  103. /package/{knowledge → claude/knowledge}/genres/_template.md +0 -0
  104. /package/{knowledge → claude/knowledge}/genres/electronic.md +0 -0
  105. /package/{knowledge → claude/knowledge}/genres/hip-hop.md +0 -0
  106. /package/{knowledge → claude/knowledge}/genres/metal.md +0 -0
  107. /package/{knowledge → claude/knowledge}/genres/orchestral.md +0 -0
  108. /package/{knowledge → claude/knowledge}/genres/pop.md +0 -0
  109. /package/{knowledge → claude/knowledge}/genres/rock.md +0 -0
  110. /package/{knowledge → claude/knowledge}/reference/compression.md +0 -0
  111. /package/{knowledge → claude/knowledge}/reference/frequencies.md +0 -0
  112. /package/{knowledge → claude/knowledge}/workflows/delivery.md +0 -0
  113. /package/{knowledge → claude/knowledge}/workflows/drum-bus.md +0 -0
  114. /package/{knowledge → claude/knowledge}/workflows/low-end.md +0 -0
  115. /package/{knowledge → claude/knowledge}/workflows/stem-prep.md +0 -0
  116. /package/{knowledge → claude/knowledge}/workflows/vocal-chain.md +0 -0
@@ -71,37 +71,28 @@ params:
71
71
 
72
72
  Record: peak level (dBFS), RMS level (dBFS) for each track.
73
73
 
74
- Target levels (perceived-loudness-aware):
75
- - **Sub/bass instruments**: -16 to -14 dBFS RMS (sounds quieter than metered)
76
- - **Full-range instruments**: -18 dBFS RMS (±3 dB acceptable)
77
- - **Presence-range instruments**: -19 to -20 dBFS RMS (sounds louder than metered)
78
- - **High-frequency instruments**: -20 to -22 dBFS RMS
74
+ Target levels (headroom, not balance):
75
+ - **Average**: -18 dBFS RMS (±3 dB acceptable) on every track
79
76
  - **Peak**: -12 dBFS (not exceeding -6 dBFS)
80
77
 
78
+ These raw targets only give plugins a sensible input level and keep the bus out of clipping. They say nothing about how loud a track sounds in the mix. Balance is a separate step, done afterwards on perceived loudness (`reference/perceived-loudness.md`).
79
+
81
80
  If a track reads:
82
81
  - Average of -30 dBFS → needs gain increase
83
82
  - Average of -8 dBFS → needs gain reduction
84
83
  - Peak of -3 dBFS → dangerously hot, reduce gain
85
84
 
86
- ### Step 5: Calculate gain adjustments (perceived-loudness-aware)
87
-
88
- Use instrument-appropriate targets rather than a flat -18 dBFS for all tracks. The human ear is 10-15 dB more sensitive at 2-5 kHz than at 100 Hz, so bass instruments need higher meter readings to sound perceptually balanced (see `knowledge/reference/perceived-loudness.md`):
85
+ ### Step 5: Calculate gain adjustments
89
86
 
90
- | Instrument Category | Target RMS | Rationale |
91
- |-------------------|-----------|-----------|
92
- | Sub/bass (kick sub, bass, 808) | -16 to -14 dBFS | Low frequencies sound quieter than metered |
93
- | Full-range (piano, guitar, strings) | -18 dBFS | Standard target; spans the perceptual range |
94
- | Presence-range (vocals, snare, lead guitar) | -19 to -20 dBFS | 2-5 kHz content sounds louder than metered |
95
- | High-frequency (cymbals, hi-hats, shakers) | -20 to -22 dBFS | Very sensitive frequency range |
87
+ Use the same -18 dBFS RMS target for every track. Don't use different raw targets per instrument to "pre-balance" the mix: raw RMS doesn't track perceived loudness, so the balance has to be set in LU afterwards anyway (Step 8).
96
88
 
97
89
  For each track:
98
90
  ```
99
91
  gain_adjustment_dB = target_dBFS - current_average_dBFS
100
92
  ```
101
93
 
102
- Example: Bass averages -24 dBFS → target -15 → needs +9 dB
103
- Example: Vocal averages -10 dBFS → target -19 → needs -9 dB
104
- Example: Piano averages -24 dBFS → target -18 → needs +6 dB
94
+ Example: Bass averages -24 dBFS → target -18 → needs +6 dB
95
+ Example: Vocal averages -10 dBFS → target -18 → needs -8 dB
105
96
 
106
97
  Round to nearest 0.5 dB for practical purposes.
107
98
 
@@ -131,13 +122,20 @@ params:
131
122
 
132
123
  Target: Mix bus should peak at -6 to -3 dBFS. If it's hitting 0 dBFS, pull all track faders down proportionally (or reduce master fader by the excess dB).
133
124
 
134
- ### Step 8: Check instrument relationships
125
+ ### Step 8: Set the balance on perceived loudness
126
+
127
+ Gain staging sets the floor; the balance is built on top of it, and only on perceived values:
135
128
 
136
- Re-play the chorus section. Listen for:
137
- - Does the kick still hit harder than the snare? (relative levels should still feel musical)
138
- - Do vocals still sit over the instruments? (if not, the relative balance was off before; adjust individual tracks)
129
+ ```
130
+ tool: measure_tracks
131
+ params:
132
+ trackIndices: [mix bus, lead vocal, guitars, drums, bass]
133
+ metrics: ["lufs"]
134
+ startPosition: [chorus start]
135
+ durationSeconds: 10
136
+ ```
139
137
 
140
- If relative balance is wrong, apply additional individual adjustments AFTER the gain staging is complete. Gain staging sets the floor; the mix is built on top of it.
138
+ Add each track's fader to its reading (the meters are pre-fader). Then express each element as LU below the mix bus, and place it against the stem reference points in `reference/perceived-loudness.md`. Move faders by the LU difference, re-measure, and listen. If the user says something sounds too loud or too quiet, their ear is the finding.
141
139
 
142
140
  ### Step 9: Save post-staging snapshot
143
141
 
@@ -176,4 +174,4 @@ After completing gain staging:
176
174
  - **Ignoring bus tracks**: A drum bus that's receiving 8 inputs at -18 dBFS each will be summing to a much higher level. The bus fader controls the drum bus output level — check and adjust it.
177
175
  - **Single-moment readings**: Read meters over a representative 10+ second passage, not a single snapshot that may catch silence or a single loud peak.
178
176
  - **Not checking after gain staging**: Always play the mix after staging to confirm balance feels correct. The numbers are targets, not rules — use ears to verify.
179
- - **Setting all tracks to the same level**: A flat -18 dBFS on every track ignores psychoacoustic loudness perception. Bass instruments need higher readings; presence-range instruments need lower readings. See `knowledge/reference/perceived-loudness.md`.
177
+ - **Treating gain staging as balance**: Equal -18 dBFS RMS on every track is correct for headroom, and it is not a balance. Never judge or set balance on RMS or peak readings; do it in LU (Step 8, `knowledge/reference/perceived-loudness.md`).
@@ -1,14 +1,14 @@
1
1
  ---
2
2
  name: Learn Plugin
3
3
  id: learn-plugin
4
- description: Discover an unknown plugin by reading its parameters, researching online, and creating a knowledge file
4
+ description: Discover an unknown plugin by reading its parameters, researching online, and saving a plugin knowledge record
5
5
  ---
6
6
 
7
7
  # Learn Plugin
8
8
 
9
9
  ## When to Use
10
10
 
11
- When you encounter an installed FX plugin that has no knowledge file and you need to understand what it does, how to use it, and what parameters to set. This workflow turns an unknown plugin into a documented, reusable knowledge file.
11
+ When you encounter an installed FX plugin that has no plugin record and you need to understand what it does, how to use it, and what parameters to set. This workflow turns an unknown plugin into a documented, reusable plugin record in LoreKit.
12
12
 
13
13
  ## Prerequisites
14
14
 
@@ -76,61 +76,28 @@ From what you've learned, decide:
76
76
  | Field | How to determine |
77
77
  |-------|-----------------|
78
78
  | `name` | Full display name as shown in REAPER |
79
- | `fx_match` | The exact name from REAPER's FX list, plus common variations (VST/VST3/AU) |
79
+ | `fx` patterns (`fx::` tags) | The exact name from REAPER's FX list, plus common variations (VST/VST3/AU) |
80
80
  | `category` | Primary category from: eq, compressor, limiter, saturator, reverb, delay, gate, de-esser, amp-sim, channel-strip, stereo-imager, multiband, pitch-correction |
81
81
  | `vendor` | The plugin manufacturer |
82
82
  | `preference` | 30-50 for free/stock, 55-70 for decent third-party, 70-85 for preferred, 85-95 for industry-standard |
83
83
  | `style` | transparent, character, vintage, modern, or surgical |
84
84
  | `replaces` | Stock REAPER plugin IDs this can replace (e.g., "rea-eq", "rea-comp") |
85
85
 
86
- ### Step 5: Write the knowledge file
86
+ ### Step 5: Write the plugin record
87
87
 
88
- Create the file at `knowledge/plugins/{vendor-slug}/{plugin-slug}.md` using the template structure:
88
+ Plugin knowledge lives in LoreKit, not in this repo: write one record to scope
89
+ `project::reaper-mcp` with key `user::plugins::{vendor-slug}/{plugin-slug}` (the
90
+ user's layer — `plugins::…` keys are the read-only built-in layer). The record
91
+ shape, the tag list (`plugin-knowledge`, `category::…`, `preference::…`, one
92
+ `fx::…` per FX name, …) and the exact `memory.write` call are in
93
+ `reference/memory-protocol.md` → "Plugin knowledge". The fields above become the
94
+ record's header line and its tags; put the verified parameter map from Step 2
95
+ under `## Learned notes`. No expiry.
89
96
 
90
- ```markdown
91
- ---
92
- name: {Plugin Name}
93
- fx_match: ["{exact REAPER name}", "{alternate match}"]
94
- category: {category}
95
- style: {style}
96
- vendor: {Vendor Name}
97
- preference: {score}
98
- replaces: [{stock plugins if applicable}]
99
- ---
100
-
101
- # {Plugin Name}
102
-
103
- ## What it does
104
-
105
- {1-2 paragraphs: purpose, character, primary use cases}
106
-
107
- ## Key parameters by name
108
-
109
- | Parameter | Range | Description |
110
- |-----------|-------|-------------|
111
- | {exact name} | {range} | {description} |
112
-
113
- ## Recommended settings
114
-
115
- ### Use case: {instrument or purpose}
116
-
117
- | Parameter | Value | Why |
118
- |-----------|-------|-----|
119
- | {name} | {value} | {reason} |
120
-
121
- ## Presets worth knowing
122
-
123
- - **{Preset Name}** — {what it does}
124
-
125
- ## When to prefer this
126
-
127
- - {situations where this plugin is the best choice}
128
- ```
129
-
130
- ### Step 6: Verify the knowledge file
97
+ ### Step 6: Verify the plugin record
131
98
 
132
- After writing the file, confirm:
133
- - `fx_match` patterns actually match the installed FX name (case-insensitive substring)
99
+ After writing the record, confirm:
100
+ - its `fx::` tags actually match the installed FX name (case-insensitive substring)
134
101
  - All parameter names are EXACT (copy from `get_fx_parameters` output)
135
102
  - Category and preference score are appropriate
136
103
  - Recommended settings include at least one concrete use case
@@ -143,6 +143,12 @@ Watch the GR meter on the limiter:
143
143
  - Average 0.5–2 dB GR: Good — the mix is being lightly limited
144
144
  - Average 4+ dB GR: The mix is too loud before the limiter; reduce compressor stage or fix upstream
145
145
 
146
+ If guitars and bass audibly dip on each drum hit in the full mix (but the drums sound fine soloed), the limiter is pumping:
147
+
148
+ 1. **Find keyed ducking first.** Any dynamic EQ/comp band with an external sidechain ducks on its key. Follow each key with `get_track_routing` (receives). Kick→bass ducking deeper than about −3 dB is audible pumping.
149
+ 2. **Clip before the limiter** instead of turning the drive down. Use a clipper (Free Clip 2, Event Horizon) with its ceiling ~1–1.5 dB under the peak level arriving there. Measured on a metal bus: pumping std 1.35 → 1.06 dB, and +0.25 LU louder. Lowering the drive 1.5 dB only got to 1.51 → 1.35 dB and cost 0.4 LU.
150
+ 3. **Measure during playback** with an `mcp_gain_trace` pre/post pair (Verification below).
151
+
146
152
  ### Step 6: Check mono compatibility
147
153
 
148
154
  ```
@@ -193,12 +199,18 @@ Optionally before the compressor:
193
199
  3. Export a 30-second clip and check on headphones, phone speaker, and car audio
194
200
  4. Verify LUFS integrated reading matches the target platform
195
201
  5. Check that transients are still felt (kick punch, snare snap) despite limiting
202
+ 6. Measure pumping during playback, no render needed:
203
+ - Add `JS: reaper-mcp/mcp_gain_trace` at the start of the bus chain (Mode pre) and again at the end (Mode post, same Slot).
204
+ - Play the loud section, then read the post instance: p5 / p1 are how deep the level dips go, relative to the median gain; std is how much the gain moves.
205
+ - Compare variants with each other on the same section. About 1.0–1.3 dB std is clean on a loud metal bus; 1.5 dB and above is audible pumping.
196
206
 
197
207
  ## Common Pitfalls
198
208
 
199
209
  - **Master bus too loud before the chain**: If peaks are above -3 dBFS before the limiter, the limiter is doing too much work. Fix the mix upstream.
200
210
  - **Heavy glue compression + heavy limiting**: Double processing. If the compressor is doing 4+ dB GR and the limiter is doing 4+ dB GR, the mix is being over-squashed. Choose one.
201
211
  - **Linear phase EQ artifacts**: Linear phase EQ adds pre-ringing at low frequencies with heavy processing. Keep EQ moves subtle on the master bus.
202
- - **Chasing loud**: Increasing the limiter's Input Gain to match a loud reference track can destroy the dynamics and make the mix sound flat. Trust the LUFS target.
212
+ - **Chasing loud**: Increasing the limiter's Input Gain to match a loud reference track can destroy the dynamics and make the mix sound flat. Trust the LUFS target. Streaming turns loud masters down to about −14 LUFS, so the extra limiting only costs punch there. In a live A/B/C of a metal chorus, the user picked the −8.3 LUFS version over −7.8 and −6.9 as "most clear".
213
+ - **Trusting a reference's loudness blindly**: Check the reference with `analyze_audio_file` first. A mono file at −18 LUFS peaking at −7 dBTP is a rip or a pre-master, not a release, so use it for tone only.
214
+ - **Rendering to verify while the user works**: A render's progress window takes focus. Verify by measuring during playback and render only the final deliverable.
203
215
  - **Exporting without checking LUFS**: Integrated LUFS requires measuring the entire song. A 30-second check is not sufficient for integrated measurement. Play the full song with the LUFS meter running.
204
216
  - **Not saving a pre-master snapshot**: Always save a snapshot before adding master bus processing. The user may want to A/B compare.
@@ -0,0 +1,138 @@
1
+ ---
2
+ name: Section Levels
3
+ id: section-levels
4
+ description: Balance a track per song section with pooled automation items on its Volume envelope
5
+ ---
6
+
7
+ # Section Levels
8
+
9
+ ## When to Use
10
+
11
+ When a track sits right in one part of the song and wrong in another:
12
+
13
+ - "The vocal is a bit loud in the first verse"
14
+ - "The guitars disappear in the chorus"
15
+ - "Make the vocal even between verse, chorus and bridge"
16
+
17
+ ## The approach (opinionated)
18
+
19
+ Section level changes go on the track's **Volume envelope** as **automation items**,
20
+ with one **pool per section type**. Every chorus is an instance of the "Chorus" pool,
21
+ so changing one chorus changes all of them.
22
+
23
+ - **Never use item gain or take volume for this.** It changes the signal going into
24
+ the FX chain, so compressors, saturation and amp sims (Helix Native and similar)
25
+ react differently. The envelope acts after the chain, at the fader.
26
+ - **Never ride the fader with loose points** for a repeated section. They drift
27
+ apart the moment one copy is edited.
28
+ - **A section that happens once** (an intro verse over a thin arrangement, a bridge)
29
+ gets its own pool. Don't bend a shared pool to fit one occurrence.
30
+ - **Name the pools after the section**, prefixed with the track role: `Vox Verse`,
31
+ `Vox Chorus`, `Vox C`, `Gtr Chorus`.
32
+ - **Pools are project-wide.** When a track is duplicated (for example a new lead
33
+ with a different amp sim), instance the same pools on the new track instead of
34
+ copying the points, so both stay in step.
35
+
36
+ ## Step-by-Step
37
+
38
+ ### Step 1: Save a snapshot and find the sections
39
+
40
+ ```
41
+ tool: snapshot_save
42
+ params: { name: "before-section-levels", trackIndices: [<track>], fullChunk: true }
43
+
44
+ tool: list_regions
45
+ ```
46
+
47
+ Snapshots store mixer state, not envelopes. `fullChunk: true` keeps the track chunk,
48
+ envelopes included, and each tool call is also one undo point (`undo_project`).
49
+
50
+ ### Step 2: Measure each section against the mix
51
+
52
+ Render the track and the mix bus once each with `analyze_track_offline`, using
53
+ `sectionSeconds` (or one call per region). For each section, take the track's
54
+ loudness minus the mix's loudness. The constant offset doesn't matter, only how
55
+ it moves between sections. A track rendered as a stem excludes its folder's fader,
56
+ so compare sections with each other, never the absolute numbers.
57
+
58
+ Example (lead vocal, vocal minus mix in LU):
59
+
60
+ | Section | vox − mix |
61
+ |---|---|
62
+ | Verse 1, first half | −0.9 |
63
+ | Verse 1, second half | −3.8 |
64
+ | Chorus | −5.0 |
65
+ | Verse 2 | −4.3 |
66
+ | C | −5.6 |
67
+
68
+ Read this as: the first half of verse 1 sits about 3–4 LU more forward than the rest,
69
+ and C is a touch behind the choruses. Breakdowns that are far lower are usually an
70
+ arrangement choice; ask before you level them.
71
+
72
+ ### Step 3: Make sure the Volume envelope exists
73
+
74
+ ```
75
+ tool: get_track_envelopes # look for "Volume"
76
+ tool: create_track_envelope
77
+ params: { trackIndex: <track>, envelopeName: "Volume" }
78
+ ```
79
+
80
+ ### Step 4: Create one pool per section type
81
+
82
+ Insert the first occurrence of each section type with its points. Points are given in
83
+ seconds from the item start, and in `db` on volume envelopes.
84
+
85
+ ```
86
+ tool: insert_automation_item
87
+ params:
88
+ trackIndex: <track>
89
+ envelopeIndex: 0
90
+ position: 120
91
+ length: 32
92
+ name: "Vox Chorus"
93
+ points: '[{"time":0,"db":0.5}]'
94
+ ```
95
+
96
+ Note the returned `poolId`. For a one-off section with a ramp back to 0 dB, end the
97
+ ramp at the item's length and set `loop: false`:
98
+
99
+ ```
100
+ points: '[{"time":0,"db":-2},{"time":32,"db":-2},{"time":33.5,"db":0}]'
101
+ ```
102
+
103
+ ### Step 5: Instance the pool on every repeat
104
+
105
+ ```
106
+ tool: insert_automation_item
107
+ params: { trackIndex: <track>, envelopeIndex: 0, position: 204, length: 32, poolId: <Chorus pool> }
108
+ ```
109
+
110
+ `pooledWith` in the response counts the other instances of that pool in the project.
111
+
112
+ ### Step 6: Verify, then adjust one pool
113
+
114
+ ```
115
+ tool: list_automation_items # every section covered, the right pool on each
116
+ tool: get_envelope_points
117
+ params: { trackIndex: <track>, envelopeIndex: 0, automationItemIndex: <i> }
118
+ ```
119
+
120
+ Re-measure the same sections. To change all choruses, edit one instance's points with
121
+ `edit_envelope_points` and `automationItemIndex`; every instance follows. Keep moves
122
+ small (0.5–2 dB) and let the user listen.
123
+
124
+ ## Gotchas
125
+
126
+ - **Fader-scaled values:** REAPER's Volume envelope stores 716.2 for 0 dB, not 1.0.
127
+ Always pass `db`.
128
+ - **Automation items override the underlying envelope** where they sit; between items
129
+ the envelope's own points apply.
130
+ - **Looping:** a looped item repeats its pool's points over its length. A flat level
131
+ loops fine; a ramp should use `loop: false`.
132
+ - **Points outside an item** are refused, and a point at the item's very end is kept
133
+ 1 ms inside it, because REAPER drops pool points past the pool's length.
134
+
135
+ ## Related
136
+
137
+ - `workflows/vocal-chain.md` — the processing chain the envelope sits after
138
+ - `reference/perceived-loudness.md` — why balance is judged in LU, never dBFS
@@ -64,6 +64,10 @@ Apply clear, consistent names. Standard naming conventions:
64
64
  | Vocals | Lead Vox, BV 1, BV 2, BV Harmony, Dbl Vox |
65
65
  | Effects | FX Riser, FX Impact, FX Ambience |
66
66
 
67
+ Don't prefix a track with its folder or role ("A INST", "STEM DRUMS", "LIVE OUT"):
68
+ the folder hierarchy already says where it belongs, so the same name under
69
+ different folders is fine. Keep names the user chose.
70
+
67
71
  ```
68
72
  tool: set_track_property
69
73
  params:
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: Transient Lighting
3
+ id: transient-lighting
4
+ description: Find the hits in a song (drums, accents) and turn them into lighting (or any) automation that flashes in time
5
+ ---
6
+
7
+ # Transient Lighting
8
+
9
+ ## When to Use
10
+
11
+ When something should follow the hits of a song:
12
+
13
+ - "Make the lights flash on the kick and snare"
14
+ - "Create lighting automation that matches the transients"
15
+ - "Where are the big accents in this song?"
16
+ - Video cuts, markers or MIDI triggers synced to drum hits
17
+
18
+ ## Tools
19
+
20
+ - `detect_transients`: hit times (project seconds), strength 0..1, dominant band
21
+ (low = kick/bass, mid = snare/vocals, high = hats/cymbals), per-band counts, per-section density.
22
+ - `create_transient_automation`: the same detection, written as one pulse per hit
23
+ (attack, hold, decay) onto an existing envelope. `dryRun` shows the points first.
24
+
25
+ ## Steps
26
+
27
+ 1. **Find what the audience hears.** Analyze a **track** (`trackIndex`), not the file, whenever the
28
+ song is an item in the project: a live-set reference is often warped onto the click with stretch
29
+ markers and pitched, and a file is read as-is. Seen live: an mp3 with 159 stretch markers read
30
+ 2.6% fast, and its hits drifted off the grid by seconds. If the track runs a stem separator
31
+ (e.g. Acon Digital Remix), the full mix is its input: bypass it for one render, then re-enable.
32
+ 2. **Pick the source per idea.**
33
+ - Drum flashes: the drum stem or drum bus, `bands: ["low","mid"]` (kick + snare), `minStrength`
34
+ 0.5, `minGapMs` about one 16th (90 ms at 160 BPM), `holdMs` 20, `decayMs` 150.
35
+ - Big accents: the full mix, `minStrength` 0.8, `minGapMs` 250, `holdMs` 40, `decayMs` 400.
36
+ 3. **Read the sections before writing.** Use `sectionSeconds` or the project's regions. Sections
37
+ with few hits (a sustained wall-of-sound chorus) look dull as flashes; give those sustained
38
+ brightness on the main light track instead.
39
+ 4. **Use the project's tempo map as the grid.** The detector's `tempo` is a single autocorrelation
40
+ guess: it is wrong for odd meters (7/4 as 3+4, a 6/8 bridge) and low `confidence` means ignore it.
41
+ 5. **Write onto a new, muted track.** Copy the rig's MIDI/DMX plugin (e.g. ReaControlMIDI) from an
42
+ existing light track with `copy_fx` so the channel and CC mapping match, `create_track_envelope`
43
+ on its intensity parameter, then `create_transient_automation`. Muted, it never drives the rig
44
+ until the user unmutes it. Set the envelope's default point at 0 s to the base value
45
+ (`edit_envelope_points`), or the lights sit at the plugin's current value before the song starts.
46
+
47
+ ## Checks
48
+
49
+ - Strong hits of a full mix and a drum stem of the same song should mostly coincide (within 10 ms);
50
+ if they match no better than random times, one source is warped or offset.
51
+ - Hits of a song played to a click lock onto its tempo: phase coherence at the project tempo far above
52
+ a random spread. A band's feel shows as a steady per-section offset (verses 15 ms behind the click).
@@ -0,0 +1,131 @@
1
+ ---
2
+ name: critique
3
+ description: >
4
+ Analyzes a live REAPER mix and produces a measured, actionable critique —
5
+ gain staging, frequency balance, dynamics, loudness, and stereo image — backing
6
+ every claim with a meter, spectrum, or LUFS reading. Read-only: makes no changes.
7
+ Use when the user asks to roast, review, analyze, or find problems in a mix.
8
+ Triggers on "roast my mix", "what's wrong with my mix", "analyze my mix",
9
+ "review my mix", "/critique".
10
+ argument-hint: '[focus area, optional]'
11
+ license: MIT
12
+ metadata:
13
+ author: mthines
14
+ version: '1.0.0'
15
+ workflow_type: advisory
16
+ tags:
17
+ - mixing
18
+ - analysis
19
+ - critique
20
+ - metering
21
+ - reaper
22
+ - audio
23
+ ---
24
+
25
+ # Critique ("Roast My Mix")
26
+
27
+ Act as a brutally honest, constructive mix critic operating a **live** REAPER
28
+ session through the `reaper` MCP tools. **Observe and report only — make no
29
+ changes.** After the report, ask which problems to fix first and hand off to
30
+ `/mixer` (execution) or `/mastering` (final loudness).
31
+
32
+ Back every claim with a measurement — never "it's muddy", always "200–400 Hz
33
+ sits +4 dB above the average curve".
34
+
35
+ ## Memory — recall first, and learn from your analysis
36
+
37
+ Per `reference/memory-protocol.md` (the self-improvement loop is general to every
38
+ mix skill — `/critique` included).
39
+
40
+ **Recall (before analyzing)** — learned memory is in LoreKit, scope
41
+ `project::reaper-mcp` (if `memory.*` isn't connected, say so and carry on):
42
+ - the `loop::mixing-lessons` bucket (capped at 5 + one keyword search) — past
43
+ process lessons help you weight what to flag.
44
+ - the plugin records for **every** plugin you comment on, looked up before you judge it
45
+ (match FX names via their
46
+ `fx::` tags; a setting the record calls intentional or warns about shapes your flag) — both the built-in record (`get_builtin_knowledge`) and the user's
47
+ `user::plugins::{vendor}/{plugin}` overlay, which wins: the user's tools and taste.
48
+
49
+ **Capture (process lessons about your *analysis*).** Read-only means you don't
50
+ change the *mix* — it does **not** mean you don't learn:
51
+ - **At a correction point — immediately:** the user says a flag was wrong or
52
+ intentional, or points out a real problem you missed. Dedup-search, then
53
+ write/UPDATE a `user::mixing-lessons::<slug>` lesson (`source_agent: "critique"`;
54
+ never a built-in key) and
55
+ say you did (key + takeaway).
56
+ - **End-of-session retrospective (always):** before the report, ask whether your
57
+ read of the mix was off anywhere; capture anything that surfaced.
58
+ - A lesson at `seen_count >= 3` is promotable via `/mix-memory promote`.
59
+
60
+ (You still make no *mix* changes — a captured lesson is the only thing you write.)
61
+
62
+ ## Analysis checklist (run all; back each with a reading)
63
+
64
+ 1. **Session overview** — `get_project_info`, `list_tracks`: track count, tempo,
65
+ sample rate, bus structure.
66
+ 2. **Gain staging** (headroom only) — `play` the loudest section, then
67
+ `read_track_meters` per track. Flag tracks averaging below ~-24 or above ~-10
68
+ dBFS, peaks at/above -3 dBFS, mix bus above -6 dBFS. These raw readings judge
69
+ headroom, never balance.
70
+ 3. **Balance** (perceived loudness) — one `measure_tracks` call with `lufs` over a
71
+ section where every element plays (`list_regions`), the mix bus included. Add
72
+ each track's fader (the meters are pre-fader) and express each element as LU
73
+ below the mix bus. Compare against the stem reference points in
74
+ `reference/perceived-loudness.md`.
75
+ 4. **Frequency balance** — `spectrum` from the same call (read 3+ times; each
76
+ is a ~0.5 s snapshot) and judge on `kDb`, never the raw `db`. Compare a band
77
+ only with the same band on another track or a reference: masking (kick/bass
78
+ 60–125 Hz, bass/guitars 125–250 Hz, guitars/vocal 1–4 kHz), low-mid mud
79
+ (200–400 Hz), harshness (2–5 kHz), missing air (10–16 kHz).
80
+ 5. **Dynamics** — `read_track_crest` on the bus. <6 dB squashed · 8–12 healthy ·
81
+ >15 may need control.
82
+ 6. **Loudness** — `analyze_track_offline` on the master (-1) over the whole
83
+ song with `sectionSeconds: 10`: integrated LUFS, LRA, true peak and the
84
+ loudest/quietest sections vs genre/platform targets (see
85
+ `reference/metering.md`). Add `referencePath` when the user names a reference
86
+ song; report its loudness and tonal-balance deltas. Its resonance and
87
+ sibilance hints back up the frequency findings in step 4.
88
+ 7. **Stereo image** — `read_track_correlation` on the bus. <0 phase cancellation
89
+ (critical) · 0.0–0.3 may collapse in mono · >0.8 very narrow. Verify bass is mono.
90
+ 8. **FX chain audit** — `get_track_properties` per track: audio with 0 FX, 10+ FX
91
+ (over-processed), missing HPF on non-bass.
92
+ 9. **Common mistakes** — load `genres/{genre}.md` (if a genre is named) and
93
+ `reference/common-mistakes.md`.
94
+
95
+ ## Report format
96
+
97
+ ```
98
+ Mix Analysis Report
99
+
100
+ Session: {name} | {n} tracks | {tempo} BPM | {rate} Hz
101
+ Overall: [2–3 honest sentences]
102
+
103
+ Critical Issues (fix first):
104
+ 1. {issue}: {what the meters/spectrum showed} → {fix}
105
+
106
+ Notable Issues:
107
+ 1. {issue}: {evidence} → {fix}
108
+
109
+ Working Well:
110
+ - {at least one genuine positive}
111
+
112
+ Recommended Next Steps:
113
+ 1. {most impactful} 2. {next} 3. {next}
114
+
115
+ Hand off to /mixer to execute, then /mastering for final loudness.
116
+ ```
117
+
118
+ ## Rules
119
+
120
+ - Honest but constructive — explain *why* each thing is a problem.
121
+ - Every claim cites a perceptual measurement (LU, `kDb`, Hz); raw dBFS only for headroom.
122
+ - Always suggest a specific fix, not just the problem.
123
+ - Find at least one genuine positive.
124
+ - **Perceived values only, never raw** — every balance claim cites LU (post-fader,
125
+ against the mix bus, same section) and every tonal claim `kDb` (same band across
126
+ tracks or a reference). Never flag balance from peak/RMS dBFS or raw band `db`.
127
+ - **The user's ear is the finding** — if they hear something the numbers don't
128
+ show, suspect the measurement (section, pre-fader reading, changed plugin) first.
129
+ - **Run the end-of-session retrospective before reporting** (Memory) and capture
130
+ any analysis lesson it surfaces; if the user corrects a flag mid-session, write
131
+ that lesson immediately. Say what you captured (or that nothing surfaced).