Audio Limiter
Tame those hot peaks so your AI audio stops blowing out speakers
- audio
- audio
- output_path
- duration_sec
- summary
Generated audio runs hot. Music models and TTS output routinely peak at full scale, and the moment you add any gain or EQ the result distorts on every playback system you own. A limiter is the safety net that catches those peaks before they flatten - it's the reason professional mixes sound "loud but clean" instead of "loud and crunchy." MKRAudioLimiter brings that to ComfyUI as the finishing step of an audio chain: it's the last thing before export, and it's usually the difference between audio that embarrasses you and audio that doesn't.
It belongs to the FX branch of the MKRShift_Nodes audio set, and it's the natural partner for MKRAudioEQ3Band and MKRAudioBitcrush - both of those add gain and distortion, which is exactly what a limiter cleans up afterwards.
How it works
This is a sample-by-sample peak limiter with an envelope follower. It tracks a peak envelope with a release_ms-governed decay (an exponential coefficient derived from the release time - shorter release = snappier recovery, longer = smoother/less pumping). Whenever the envelope exceeds threshold_db, it applies the ratio threshold / envelope to pull the signal back down; below threshold it passes through untouched. After limiting, makeup_db re-boosts the overall level (the classic "limit then make up gain" loudness move), and the result is bounded by ceiling_db - the hard max level.
The soft_clip toggle swaps the final hard clamp for a tanh-style soft clip at the ceiling, which rounds off peaks instead of slicing them - slightly warmer, slightly more distortion. It's the difference between a polite limiter and a "character" limiter.
Inputs that matter
audio-MKR_AUDIOpayload, waveform tensor, or file path (*type).threshold_db- default −1 dB. Where limiting kicks in. Lower = more aggressive.ceiling_db- default −0.5 dB. The absolute ceiling; keep it below 0.release_ms- default 50 ms. How fast the limiter recovers after a peak.makeup_db- default 0. Boost after limiting to restore loudness.soft_clip/normalize_peak- character and safety toggles.- Standard save block:
output_format,filename_prefix,subfolder,overwrite, optionalfilename_label.
Outputs: audio (MKR_AUDIO), output_path, duration_sec, summary.
Install
ComfyUI Manager (search "MKRShift Nodes"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
Restart. The limiting math is pure numpy - ffmpeg only matters for mp3/flac/ogg output. No models, no downloads.
Common issues
The biggest beginner mistake is cranking threshold_db way down (−24 dB) and wondering why everything sounds squashed: that's not a limiter anymore, that's a compressor at max ratio. For speech, keep the threshold near −1 to −3 dB. Second, if you hear pumping on sustained tones, raise release_ms. And no limiter fixes clipping that's already baked into the source at zero level - if threshold_db at 0 dB still shows clipped output, the damage happened upstream; run MKRAudioClippingDetector to confirm where.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | * | — | |
| threshold_db | FLOAT | -1.0-24–0 | — |
| ceiling_db | FLOAT | -0.5-24–0 | — |
| release_ms | FLOAT | 50.01–1000 | — |
| makeup_db | FLOAT | 0.0-24–24 | — |
| soft_clip | BOOLEAN | false | — |
| normalize_peak | BOOLEAN | false | — |
| output_format | COMBO | auto | 5 options: auto, wav, mp3, flac, ogg |
| filename_prefix | STRING | MKR_audio_limiter | — |
| subfolder | STRING | — | |
| overwrite | BOOLEAN | false | — |
| filename_labelopt | STRING | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| audio | MKR_AUDIO | — |
| output_path | STRING | — |
| duration_sec | FLOAT | — |
| summary | STRING | — |