Add linear fade-out to IRs with --fade-ms option (default 5ms); update README and CLI

This commit is contained in:
Bastian Bührig
2025-07-11 10:01:16 +02:00
parent 3ed43bda8b
commit 8cacf243d8
5 changed files with 55 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ A CLI tool for processing WAV files to generate impulse responses (IR) from swee
- **Fast FFT-based deconvolution** for accurate IR extraction
- **Automatic input conversion:** Accepts any WAV sample rate, bit depth, or channel count
- **Optional output IR length:** Specify output IR length in milliseconds with --length-ms
- **Automatic fade-out:** Linear fade-out at the end of the IR to avoid clicks (default 5 ms, configurable with --fade-ms)
- **96kHz 24-bit WAV file support** for high-quality audio processing
- **Multiple output formats** with configurable sample rates and bit depths
- **Minimum Phase Transform (MPT)** option for reduced latency IRs
@@ -57,6 +58,16 @@ Trim or zero-pad the output IR to a specific length (in milliseconds):
This will ensure the output IR is exactly 100 ms long (trimming or zero-padding as needed).
### Fade-Out to Avoid Clicks
By default, a 5 ms linear fade-out is applied to the end of the IR to avoid clicks. You can change the fade duration:
```sh
./valhallir-deconvolver --sweep sweep.wav --recorded recorded.wav --output ir.wav --fade-ms 10
```
This applies a 10 ms fade-out at the end of the IR.
### Different Output Formats
Generate IRs in different sample rates and bit depths:
@@ -116,6 +127,7 @@ Generate IRs in different sample rates and bit depths:
| `--normalize` | Normalize output to peak value (0.0-1.0) | 0.95 | No |
| `--trim-threshold` | Silence threshold for trimming (0.0-1.0) | 0.001 | No |
| `--length-ms` | Output IR length in milliseconds (trim or zero-pad) | - | No |
| `--fade-ms` | Fade-out duration in milliseconds at end of IR (default 5) | 5 | No |
## File Requirements
@@ -143,6 +155,10 @@ Generate IRs in different sample rates and bit depths:
- If `--length-ms` is set, the output IR (and MPT IR) will be trimmed or zero-padded to the specified length in milliseconds
- If not set, the full IR is used
### Fade-Out
- By default, a 5 ms linear fade-out is applied to the end of the IR (and MPT IR) to avoid clicks
- You can change the fade duration with `--fade-ms`
### Deconvolution Process
1. **FFT-based deconvolution** of recorded signal by sweep signal
2. **Regularization** to prevent division by zero