@@ -8,7 +8,7 @@ to improve the in-room FR of a loudspeaker.
88This algorithm creates a config for a detailed graphical equalizer that can be
99imported into software equalizers like EQApo or Wavelet.
1010
11- This is especially useful when you want to do room correction for a bluetooth speaker
11+ This is especially useful when you want to do room correction for a Bluetooth speaker
1212(Wavelet)
1313
1414You can customize the target curve and certain parameters of equalizer you want to create.
@@ -26,7 +26,7 @@ If you want to use diagnostic plots, install the optional plotting dependency:
2626
2727 pip install -e ".[plot]"
2828
29- The simplest way is to either supply a list of paths to req files or a directory with the files.
29+ The simplest way is to either supply a list of paths to REW files or a directory with the files.
3030
3131 from orca.RewToGraphEq import get_graph_eq_str
3232
@@ -45,8 +45,14 @@ in the 20-20000 Hz range.
4545
4646Measurements are level-normalized against the shared 100-10000 Hz range by default. This avoids
4747letting bass roll-off, room modes, or high-frequency directivity dominate the level reference.
48- All supplied measurements must use the same logarithmic frequency grid. ORCA keeps that native
49- measurement resolution throughout the calculation instead of resampling it to a fixed grid.
48+ All supplied measurements must use the same logarithmic frequency grid. ORCA evaluates the
49+ equalizer at every point of that native measurement grid while optimizing only the GraphicEQ
50+ control points that will actually be exported.
51+
52+ With ` verbose=True ` (or the CLI's ` --verbose ` flag), ORCA reports the level-aligned mean absolute
53+ deviation from the target and its 95th percentile for both the original and estimated equalized
54+ response. Level alignment excludes the overall playback-volume change introduced by anchoring the
55+ maximum EQ gain at 0 dB while retaining every frequency-dependent error.
5056
5157More examples on the usage, are in the examples.py
5258
@@ -77,13 +83,13 @@ EQ-Config
7783 eq_res=128: The number of eq points.
7884 If supplied, eq_res log-spaced points will be computed between eq_from and eq_to.
7985
80- eq_points: Can be supplied instead of eq_from, eq_to and eq_res. In this case,
81- the eq points are supplied instead of being computed
86+ eq_points: Can be supplied instead of eq_from, eq_to and eq_res. They must be
87+ finite, positive, unique, and strictly increasing.
8288 set_max_zero=True: Determines, if the max boost value of the created eq
8389 gets anchored at 0 dB, in order not to introduce distortion. The complete
8490 curve is shifted, so the relative differences between EQ points are preserved.
8591 max_boost=10: the maximum dB boost that will be applied when set_max_zero=False.
86- weighting_fun: function that applies weighting based on smooting factor and frequency
92+ weighting_fun: function that applies weighting based on smoothing factor and frequency
8793
8894## Development
8995
@@ -94,25 +100,29 @@ Run the complete test suite from the repository root with:
94100
95101## The Algorithm
96102
97- To compute an equalizer, one boost level is evaluated for every frequency point in the
98- original measurement grid.
103+ To compute an equalizer, ORCA optimizes the configured GraphicEQ control-point gains directly.
104+ The piecewise-linear curve produced by those points is evaluated at every frequency in the
105+ original measurement grid. If that grid is too sparse to constrain every control-point gain,
106+ ORCA supplements it with the configured control frequencies. This ensures that the optimization
107+ sees every degree of freedom in the same finite-resolution filter that will later be exported. If
108+ a direct API caller supplies a grid outside the normal 100-10000 Hz reference band, ORCA uses the
109+ complete available grid for level alignment.
99110
100111For each of the frequencies, the process is as follows:
101112
102113We take a strongly smoothed version of each measurement. Smoothing widths are defined in
103114octaves, so they do not change when the measurement grid has a different point density,
104115and compare the level of our target curve to the current spl.
105116
106- We look for a dB adjustment at this frequency to minimize the
107- error between target-spl and equalized-spl. This is a classical example of a
108- convex optimization problem. You can find more on this in
109- the Algorithm PDF.
117+ We look for a dB adjustment at every measured frequency to minimize the error between target SPL
118+ and equalized SPL. A least-squares projection then finds the GraphicEQ point updates whose
119+ interpolated curve best realizes those adjustments over the complete measurement grid.
110120
111121
112122In multiple iterations, the boost gets adjusted, by
113123repeating the above process with decreasingly smoothed measurements.
114124
115- In each iteration, we take the difference, between the current level + dB adjustment
125+ In each iteration, we take the difference between the current level + dB adjustment
116126and the target level.
117127
118128This difference gets weighted and added to the current dB adjustment.
0 commit comments