Use peqdb/autoeq-c for AutoEQ#7
Open
audiopwn wants to merge 1 commit intoHarutoHiroki:squiglink-(main)from
Open
Use peqdb/autoeq-c for AutoEQ#7audiopwn wants to merge 1 commit intoHarutoHiroki:squiglink-(main)from
audiopwn wants to merge 1 commit intoHarutoHiroki:squiglink-(main)from
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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