CamillaFIR
CamillaFIR: Automatic FIR filter maker & room correction generator. Converts REW measurements to convolution filters for CamillaDSP, Roon, Equalizer APO etc.
Install / Use
/learn @VilhoValittu/CamillaFIRREADME
CamillaFIR by Vilho Valittu
v3.6.5
Stable release - feedback welcome: camillafir.py@gmail.com
CamillaFIR generates high-resolution FIR room-correction filters from REW exports (magnitude + phase) and WAV/IR measurements.
CamillaFIR is a recommended filter creation tool for CamillaDSP and is listed in the official CamillaDSP README under Measurement and filter generation tools.
v3.6.4 Highlights - AUTO mode subwoofers goal
- New AUTO goal:
subwoofers: optimized for subwoofer-focused runs while staying in the normal automatic-mode search flow. - Forced Smart Scan range: the
subwoofersgoal always uses a20-200 Hzleveling/search window. - Consistent preview/reporting: the forced bass-only Smart Scan window is now reflected more clearly in the UI/docs flow.
v3.6.0 Highlights - AUTO mode HPF control and reporting
- Optional HPF in AUTO mode: HPF enable, frequency, and slope can now be set in automatic mode instead of being forced on.
- Safer HPF auto-fit: response-fit HPF is only auto-applied when HPF is enabled; otherwise CamillaFIR reports the estimate as a suggestion.
- More stable stereo-linked leveling: shared target-shift handling is now aligned between left and right channels.
v3.5.5 Highlights - smarter automatic-mode reuse
- Exact cache-hit reuse: same measurements + same relevant settings can now skip repeated target-selection and preset-search trial loops.
- Seeded Optuna flow: automatic mode keeps known-good seed presets in play through target trials, phase 1, local refine, and micro-refine.
- Clearer reporting: automatic mode now reports target-selection method text more clearly and exports richer summary metadata for cached winners.
- Startup defaults updated: fresh configs now start with
Asymmetricas the default filter type.
v3.5.0 Highlights - Automatic mode consistency & reproducibility
- Deterministic auto-mode trials: same measurements + same key settings now produce the same trial sequence and typically the same winner.
- Smarter auto-mode cache: filter-type aware cache buckets + version mismatch handling for safer reuse across updates.
- Better results on hard rooms: phase-2 hard gate (severity/ripple) before Pareto + adaptive search-space shrinking + a final micro-refine pass.
- Improved mode handling: optional dual-mode (two LF resonances) detection and mode-ripple-aware scoring.
Automatic mode notes
Deterministic optimisation
From v3.5.0, automatic mode uses deterministic seeding derived from the input measurements and key optimisation settings.
This means:
- Running the optimisation again with the same data and settings will typically produce the same result.
- Changing key parameters (goal, filter type, boost limit, etc.) produces a different optimisation sequence.
This makes results easier to reproduce and compare.
Automatic mode goals explained
Automatic mode can optimise the filter using different goals depending on the listening preference and room characteristics.
| Goal | Description | Typical use |
|-----|-----|-----|
| flat | Prioritises the flattest possible frequency response. | Measurements, neutral monitoring, analysis. |
| room-safe | Conservative variant that prioritises stability and avoids aggressive boosts in difficult room regions. | Difficult rooms where safety/stability is the priority. |
| low-ripple | Minimises ripple around dominant room modes and keeps the LF region smoother. | Rooms with strong bass resonances. |
| balanced | Compromise between flat response, ripple control and boost limits. | Recommended default for most rooms. |
| subwoofers | Subwoofer-focused AUTO goal that forces Smart Scan to 20-200 Hz while otherwise using the normal automatic-mode optimisation flow. | Sub-only measurements, bass integration work, low-frequency optimisation. |
Automatic mode internally evaluates multiple candidate filters and selects the one that best matches the chosen goal while respecting stability and boost constraints.
In difficult rooms the optimiser may slightly sacrifice perfect flatness in order to achieve a more stable and natural sounding result, especially in the low-frequency region.
Which filter type should I use?
CamillaFIR automatic mode was tested with identical measurements and target curve using four filter types.
Selection is based on Best rank score, which evaluates:
- target match
- DSP artifacts (ripple, GD gradient, phase limits)
- headroom / boost safety
- acoustic events
- stereo consistency (L/R delta)
Current automatic-mode snapshot (v3.6.1)
The current README benchmark is based on four v3.6.1 summary exports generated from the same measurement set and the same target curve (Harman8).
Common conditions in these comparison runs:
- AUTO mode
- 44.1 kHz / 65536 taps
- HPF OFF
All four runs also reported the same dominant room issue:
- Left: resonance at 113 Hz
- Right: resonance at 108 Hz
This is not meant to claim that one phase type always wins in every room. It shows what the current optimiser does on one real-world dataset with identical conditions.
Current v3.6.1 results
| Rank | Filter type | Best rank score | Avg acoustic score | Run ranking score | Target match (L / R) | Notes | |---|---|---:|---:|---:|---|---| | 1 | Asymmetric | 91.264 | 84.582 | 69.505 | 94.4% / 95.1% | Best overall balance in this test; top score with zero net boost penalty and very low ripple. | | 2 | Minimum | 91.226 | 84.581 | 68.980 | 94.4% / 95.1% | Much stronger than older README numbers suggested; nearly tied with Asymmetric on this dataset. | | 3 | Linear | 91.114 | 84.432 | 69.350 | 94.1% / 94.8% | Still very competitive, but slightly lower target match and slightly higher ripple in this comparison. | | 4 | Mixed | 91.065 | 84.515 | 69.327 | 94.3% / 94.9% | Excellent GD-gradient control and explicit pre-ringing reporting, but slightly higher DSP penalty overall here. |
- Based on one real-life v3.6.1 measurement set with identical room data and target curve.
- The score spread is small, which means all four phase modes can produce good results in the current automatic mode.
Recommendation
Most users should still choose: Asymmetric
It remains the best default because it delivered the highest overall score in this comparison while keeping the usual CamillaFIR strengths:
- near-linear correction behaviour
- excellent target matching
- low ripple
- practical latency
Alternative choices
Minimum phase
A very strong option in the current version. On this dataset it was nearly tied with Asymmetric, so it should no longer be described as a distant last-place fallback.
Linear phase
Use if maximum linear-phase behaviour is required and latency is not an issue. It remains close to the top on the current benchmark.
Mixed phase
Use when you specifically want mixed-phase behaviour with very smooth GD-gradient handling and visible pre-ringing metrics. It scored slightly lower overall here, but the difference is small.
Why Asymmetric Filters Exist
Traditional FIR room-correction filters typically fall into two categories:
| Type | Strength | Limitation | |---|---|---| | Linear phase | Perfect phase symmetry and very accurate correction | Very high latency | | Minimum / Mixed phase | Low latency and practical for real-time use | Limited phase correction |
In real listening systems this creates an unavoidable trade-off:
- Linear phase filters can achieve extremely accurate correction, but often introduce hundreds of milliseconds of latency.
- Minimum or mixed-phase filters are practical for playback but cannot fully correct phase behaviour.
The idea behind asymmetric filters
CamillaFIR introduces asymmetric FIR filters to bridge this gap.
Instead of forcing the impulse response to be perfectly symmetric (linear phase) or fully causal (minimum phase), the filter is designed so that most of the energy occurs after the main impulse while allowing controlled asymmetry.
This enables:
- near-linear correction accuracy
- practical latency
- reduced pre-ringing artifacts
- stable stereo alignment
Impulse response comparison
Linear phase (symmetric)
<------ pre ------|------ post ------>
^
main impulse
Mixed / minimum phase
^
main impulse
|------------>
Asymmetric (CamillaFIR)
^
main impulse
|---------------------->
Linear phase filters distribute energy symmetrically around the impulse, which increases latency.
Mixed/minimum phase filters place all energy after the impulse, reducing latency but limiting correction accuracy.
Asymmetric filters intentionally place most energy after the impulse while keeping controlled asymmetry, allowing strong correction with significantly lower latency than fully linear filters.
When to use asymmetric filters
For most systems, asymmetric filters are the recommended default because they provide the best balance between:
- correction accuracy
- DSP stability
- latency
Other filter types still have their place:
| Filter type | Recommended when | |---|---| | Asymmetric | Best overall balance (recommended default) | | Linear phase | Maximum phase accuracy and latency is irrelevant | | Mixed phase | Low-latency playback with very smooth GD-gradient behaviour | | Minimum phase | Low-latency causal correction; now also a competitive auto-mode option |
In short
Asymmetric filters exist because room correction should not require choosing between accuracy and usability.
They allow CamillaFIR to deliver **high-qu
