Skip to content

Use peqdb/autoeq-c for AutoEQ#7

Open
audiopwn wants to merge 1 commit intoHarutoHiroki:squiglink-(main)from
audiopwn:autoeq-c
Open

Use peqdb/autoeq-c for AutoEQ#7
audiopwn wants to merge 1 commit intoHarutoHiroki:squiglink-(main)from
audiopwn:autoeq-c

Conversation

@audiopwn
Copy link

@audiopwn audiopwn commented Feb 8, 2026

Replaces the JS-based heuristic AutoEQ algorithm with peqdb/autoeq-c, an AutoEQ implementation written in C compiled to WebAssembly. On my M4 MacBook Air the old algorithm typically takes ~850 ms while the new one completes in ~25 ms which is a ~35x speedup.

The previous implementation used a two-stage heuristic approach, searching for candidate filters based on peak/dip detection, then iteratively tweaking their parameters. While conceptually sound, this method was both slow and not very accurate in practice. It also did not feature any sophisticated method to avoid equalizing rig artifacts; if allowed to go above 6 kHz, the 8 kHz peak is often equalized down, and the dip around 10 kHz will be equalized right up to the target which is undesirable.

The new implementation directly minimizes the error between target and current frequency response using a gradient descent based optimizer. We compute exact analytical gradients wrt. every parameter (center frequency, gain, Q factor). This makes the algorithm fast and precise. The new algorithm includes rig-aware adaptive smoothing, with hand-tuned smoothing presets for in-ear and over-ear measurements.

autoeq.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant