# Dyn + EQ Fix User Guide

Dyn + EQ Fix is a REAPER item tool for two jobs:

1. Writing item volume automation, similar to a volume rider.
2. Detecting short problem moments, such as sibilance, harshness, plosives, or boom, and writing targeted ReaEQ gain envelopes.

![Dyn + EQ Fix overview](images/dyn-eq-fix-overview.svg)

## Basic Setup

1. Select one or more audio items in REAPER.
2. Run `Dyn + EQ Fix` from the REAPER Action List.
3. Use the `Volume` tab for item volume riding.
4. Use the `Detect and Fix` tab for short problem moments.

The help bar at the top of the window shows short explanations when you hover over a control. It also shows recent measurement results, such as RMS and peak values.

## Volume Tab

The Volume tab writes a take volume envelope inside the selected item.

![Volume tab](images/volume-tab.svg)

### Presets

Use the preset row to quickly return to useful volume rider settings.

- `<` and `>`: step through available volume presets.
- `Name`: choose a preset name.
- `Load`: load the selected preset.
- `Save`: save the current volume settings.
- `Check RMS + Peak`: measure the selected item without writing automation.

### Check RMS + Peak

`Check RMS + Peak` measures the selected item and shows both values in the help bar.

Use this before setting `Target RMS` if you want to keep the overall item balance close to the original. For example, if the selected item measures around `-18.5 dBFS RMS`, setting `Target RMS` near that value will usually preserve the general loudness while still smoothing local changes.

### Main Volume Controls

- `Target RMS`: the average level the rider tries to reach.
- `Detect threshold`: audio below this level is ignored.
- `Write threshold`: smaller values write more detail; larger values write fewer points.
- `Max down`: maximum volume reduction.
- `Max up`: maximum volume boost.
- `Max change`: limits how fast the envelope can move between points.
- `Smooth`: smooths the written envelope.
- `Peak ceiling`: peaks above this level can trigger extra reduction.
- `Peak control`: how strongly peaks are pulled down. `0%` keeps the older RMS-only behavior.
- `Lookahead`: writes changes earlier than the measured audio.
- `Analysis window`: shorter values catch faster level changes; longer values are steadier.
- `Point spacing`: distance between possible envelope points.

### Apply and Clean

- `Apply to selected`: writes the volume envelope to selected item(s).
- `Clean selected`: removes take volume envelope points from selected item(s).
- `Clean existing points before apply`: clears existing points before writing new ones.

## Detect and Fix Tab

The Detect and Fix tab scans selected audio items for short problem moments and writes ReaEQ gain automation only where needed.

![Detect and Fix tab](images/detect-tab.svg)

### Problem Types

The modes are ordered from low to high frequency:

- `Plosive`: low thumps and P/B-style bursts.
- `Boom`: low-mid resonant moments.
- `Harsh`: sharp upper-mid harshness.
- `S`: sibilance.
- `User`: custom frequency range.

Each mode keeps its own settings and presets.

### Detection Controls

- `Sensitivity`: higher values find more moments; lower values are stricter.
- `Min duration`: ignores very short events. This helps avoid false positives such as short T sounds when looking for S sounds.
- `User low` / `User high`: only shown in User mode; sets the custom detection range.

### EQ Envelope Controls

- `Max dip`: the maximum EQ reduction allowed.
- `Multiplier`: multiplies the detected dip amount while still respecting `Max dip`.
- `Look`: starts the EQ envelope before the detected moment.
- `Atk`: attack time from no dip to full dip.
- `Rel`: release time back to no dip.
- `Follow freq`: moves the ReaEQ band frequency to the detector range before writing.
- `Band type`: choose Bell, Low, or High.

Example: if the detection calculates a `2.3 dB` dip and `Multiplier` is set to `5x`, the written dip becomes about `11.5 dB`, but never more than `Max dip`.

### Detect Buttons

- `Detect`: scans selected item(s).
- `All`: selects all detected moments.
- `None`: deselects all detected moments.
- `EQ dip`: writes EQ dips for all selected moments.
- `Save`: saves the current mode settings.
- `Delete [mode] env band [number]`: removes the current mode envelope.
- `Bypass fix`: temporarily bypasses the current mode fix on selected item(s).
- `Restore fix`: restores the bypassed fix.

During `Bypass fix`, the relevant EQ band is also forced to `0 dB`, so you hear the item without that fix.

## Result List

Each detected moment appears as a row in the result list.

Per row:

- checkbox: include or exclude this moment from bulk `EQ dip`.
- `Orig`: audition this moment without the Dyn + EQ Fix dip.
- `Fix`: audition this moment with the dip active.
- `Apply`: rewrite only this one moment using the current EQ settings.
- `Jump`: move the edit cursor to the detected moment.

![Audition workflow](images/audition-workflow.svg)

## Audition Workflow

A good detailed workflow is:

1. Click `Detect`.
2. Click `Orig` on a detected moment.
3. Click `Fix` to compare the corrected version.
4. Adjust `Max dip` or `Multiplier` if needed.
5. Click `Apply` on that row.
6. Compare `Orig` and `Fix` again.

The row-level `Apply` only rewrites that one moment. Other dips are left alone.

## Bulk Workflow

For faster work:

1. Click `Detect`.
2. Use `All`, `None`, or individual checkboxes to choose moments.
3. Click `EQ dip`.
4. Use `Bypass fix` to compare the whole selected item with and without that mode's fix.

## Result Memory

Dyn + EQ Fix remembers the last Detect result while the script window stays open.

The remembered result is tied to:

- selected item
- item position
- item length
- take/source offset
- detect mode
- sensitivity
- minimum duration
- User frequency range, when using User mode

If you move, trim, split, or offset the item, the old result is ignored and you should run `Detect` again.

## Transfer to Another REAPER Computer

To move the tool to another REAPER computer, copy:

- `Dyn_EQ_Fix.lua`
- the preset folders from REAPER's resource path:
  - `Scripts/Dyn EQ Fix/Detect Presets`
  - `Scripts/Dyn EQ Fix/Volume Presets`

Then add the script to the REAPER Action List on the other computer.

## Practical Starting Points

For Volume:

- Start with the `Natural` preset.
- Use `Check RMS + Peak`.
- Set `Target RMS` near the measured RMS if you want to preserve overall balance.
- Use `Peak control` around `25%` to `40%` for gentle peak safety.

For S detection:

- Start with `Sensitivity` around `35%`.
- Use `Min duration` around `70-100 ms`.
- Use `Max dip` around `6-12 dB`.
- Increase `Multiplier` if the written dip is too small.

For Harsh:

- Use lower `Min duration` than S.
- Keep `Max dip` moderate at first.
- Use `Orig` and `Fix` often; harshness fixes can become too obvious if pushed too far.

## Notes

Dyn + EQ Fix writes item/take-level envelopes. It does not permanently change the audio file.

Use REAPER undo if a write is not what you wanted. Use the script's delete/bypass tools when you want to remove or compare a specific mode's fix.
