# ScreamGate Quick Guide

ScreamGate routes audio through a realtime look-ahead gate so sharp high-frequency spikes can be muted before they reach your speakers.

## Simple Setup

1. Install VB-CABLE.
2. In Windows Volume Mixer, set your browser or video app output to `CABLE Input`.
3. Open ScreamGate.
4. Use:
   - Input: `9: CABLE Output`
   - Output: `12: Realtek HD Audio 2nd output`
5. Use `Test VB-CABLE Output` if you want to confirm sound reaches your speakers.
6. Play a normal part of the video.
7. Click `Start Calibration`.
8. Let the countdown finish, or click `Arm Now` once normal audio has played long enough.
9. A visible countdown shows how long calibration has left.
10. When armed, new spikes above the learned dB ceiling are capped, and `1000-2000 Hz` over the `Hard cap dB` slider is destroyed.
11. Watch the lock readout for the frequency and dB the gate attacks.
12. Leave `Show Advanced Tuning` closed unless you need manual control.

## Fast Workflows

- `Start Calibration`: best first move for a new YouTube video or movie.
- `Arm Now`: stops calibration early and arms with the baseline already heard.
- `Restart Calibration`: clears the learned scene and recalibrates from scratch.

## Target A Scream

1. Play the movie or video.
2. Watch the spectrum at the bottom.
3. Scream-like spikes usually appear toward the right side.
4. Click the spike area you want blocked.
5. The click adds a manual target using both frequency and dB level.

## What The Graph Means

- Green: live incoming audio.
- Blue: learned baseline for normal sound.
- Orange: loudest each frequency has reached this session.
- Gray: quietest each frequency has reached this session.
- Red vertical line: target frequency from the click X axis.
- Yellow horizontal line: target dB floor from the click Y axis.
- Yellow dot: the exact dual-axis target point you clicked.
- Cyan dashed line: relative baseline trigger level when relative mode is on.
- Red `SPIKE` marker: a frequency outside your current target range is bursting above its learned baseline.
- Red `GATED` marker: the calibrated gate caught an out-of-range spike.
- Red `DENSE` marker: the waveform-density detector caught a tight wall of sound, like the transition into a scream.

## Spike Advisor

If the graph shows `SPIKE`, click that marker or widen `Target width Hz`.

Use `Start Calibration` while normal audio is playing. It ignores silence and uses the loudest normal dB peak it has heard as the ceiling, so quieter repeats should pass while anything above the ceiling can be capped.

Clicking `Restart Calibration` refreshes runtime memory. Spectrum memory, gate history, and the audio engine baseline start fresh.

Use `Intensity` after calibration. Lower values are more forgiving for dialogue and music; higher values catch smaller spikes and clamp harder.

Use `Hard cap dB` after calibration. The default is `-45.5 dB`; audio below that line is protected from suppression.

If you pause right after a bad sound, the spectrum holds the last active frame instead of dropping instantly, so you can click the painful area.

If the top meter says `LEAK` while the gate is active, the target band is still escaping after processing. Try:

- lower `Attenuation dB` toward `-80` or `-100`;
- increase `Hold ms`;
- lower `Target absolute dB`;
- lower `Target over baseline dB`.

## Advanced Tuning

Most users can leave this panel closed. It is there for difficult videos, manual targeting, or testing.

- `Target width Hz`: wider catches more nearby frequencies; narrower is more surgical.
- `Target over baseline dB`: lower catches smaller spikes; higher avoids false triggers.
- `Target frequency Hz`: X axis from your spectrum click.
- `Target absolute dB`: Y axis from your spectrum click; the floor level required before targeting can trigger.
- `Intensity`: the live everyday control. It changes sensitivity and clamp strength without restarting calibration.
- `Look-ahead ms`: more look-ahead catches spikes earlier but adds latency.
- `Hold ms`: how long the gate stays down after a spike.
- `Release ms`: how smoothly sound returns.
- `Attenuation dB`: how much volume is reduced when gated.

The target detector compares a selected frequency band against its own learned baseline, so loud bass can pass while a smaller high-frequency scream band can still trigger the gate.

The density detector watches for audio that suddenly becomes tightly packed, which is common at the transition from normal dialogue into a sustained scream. The hard kill band is separate: `1000-2000 Hz` over the hard cap line is treated as unacceptable once the gate is armed.

The scream fingerprint detector watches for abrupt attack, presence-band energy, spectral flux, and roughness in `1000-4000 Hz`. This is for screams that move differently from ordinary dialogue instead of only being louder.
