50
50
Guenter Villnow
50
50
Guenter Villnow
50
50
50
50

Overview [Top]

AutoEQ is an open-source database and python application that generates correction filters for earphones and headphones. With over 2500 headphone measurements, this database is impressive! All credits to the active contributors of this project! In this application note, we will show three ways to use AutoEQ with miniDSP.

As our example, we will use an SHD Studio as it has a built-in headphone amp. However you can use many other miniDSP processors such as the 2x4 HD or Flex along with a separate headphone amp.

Or if you prefer to do your own measurements, check out the miniDSP EARS.

Method A. Using default correction filters[Top]

Method A uses the default correction filters from the AutoEQ web page. Jump to the results section of the AutoEQ github repository. Search through the list to find your headphones.

Once you are at your headphone page, scroll down to the Parametric EQs section. Here is an example:

 Type  Fc  Q  Gain 
 Peaking   22 Hz   1.06   2.9 dB 
 Peaking   218 Hz   0.76   -2.9 dB 
 Peaking   856 Hz   1.09   -4.6 dB 
 Peaking   3252 Hz   0.93   6.7 dB 
 Peaking   5330 Hz   3.69   -5.8 dB 
 Peaking   1134 Hz   5.36   -1.2 dB 
 Peaking   2179 Hz   1.35   1.6 dB 
 Peaking   2464 Hz   3.17   -2.3 dB 
 Peaking   10267 Hz   1.05   4.7 dB 
 Peaking   19623 Hz   0.34   -17.0 dB 

In the miniDSP Device Console, open up the PEQ block for one of the output channels and link it to the other output channel. Then enter all the parametric EQ values. You need to do this manually i.e. enter them one by one. Here is the parametric EQ screen with the values above entered:

Example PEQ for miniDSP headphone EQ

You may not be able to enter all values exactly, so just enter the closest possible.

Visually compare your curve against the green curve labeled "Equalization" on the AutoEQ page to confirm that you have entered all the values correctly. Export your configuration to a file for safe keeping.

For our example, the AutoEQ page recommends a preamp gain of –6.3 dB. If you are controlling gain in the headphone amp, set the input gain to the recommended value to ensure that you do not clip the output stage of the miniDSP. Alternatively, set the master volume to that value.

Now go ahead and play some music!

Method B. Generating a correction with REW[Top]

Method B generates EQ filters from the raw measurement data using REW (Room EQ Wizard). Step by step:

  1. Browse the measurements folder of the AutoEQ repository to find the CSV data file for the measurement you want to use as a starting point. Click on the "Raw" button to the right and save the displayed file to your computer.

    (Some browsers may not want to save the raw data. If this happens, try another browser.)

  2. Browse the AutoEQ compensation folder and pick a target response. There are quite a number of targets, but harman_over-ear_2018.csv is a good choice for over-ear headphones. Download the raw CSV file as described above.

  3. Import both downloaded files into REW: for each of them, drop down the File menu and select Import then Import Frequency Response.

  4. Click on the All SPL button. The headphone measurement and the compensation curve will be displayed:

    Headphone compensation and headphone response
  5. Click on Controls (towards the top right), then click on the Trace Arithmetic button. Select the headphone as "A" and the compensation curve as "B". On the dropdown, select "A / B" as shown here:

    Trace arithmetic on headphone compensation and headphone response
  6. Click the Generate button. The trace "A Over B" will appear. This is the "error" curve – that is, the difference between the actual headphone response and the desired response. It is shown in blue here:

    Error curve for headphone compensation
  7. Now for the fun part! With A over B selected in the left sidebar of REW, click on the EQ button. The procedure to generate a correction filter is described in our app note Headphone EQ with EARS and REW, starting at the Applying EQ section. Important: be sure to select the correct Equalizer for your processor. You may need to try different target levels and tweak the EQ manually. For this example a target level of –6 dB worked best for us. Here is our result:

    Headphone filters with REW Auto-EQ

    We used six filters to get this curve.

    Headphone filter values with REW Auto-EQ
  8. Export the filter coefficients to a text file.

  9. In Device Console, import the text file containing the filter coefficients. Here is our PEQ block after importing:

    Headphone filters imported from REW Auto-EQ

Method C. Generating a correction with Python [Top]

Method C requires that you run the AutoEQ Python code from the command line. This way you can custom-generate correction filters with different compensation curves and number of filters. It is more complex than the other two methods.

To proceed, go to the AutoEQ page and scroll down to the Installing section. Follow the instructions there. (This is likely to be easiest on Linux but instructions are there also for Windows and Mac.)

Notes:

  1. You may have python 2 and python 3 installed. If entering the "python" command doesn't work as expected, try using "python3" instead. For example, enter:

      python3 -m venv venv
    

    to set up the Python virtual environment.

  2. You may run into various other issues that need to be resolved on a platform-specific basis. On Linux, for example, we needed to install libsndfile with:

      apt-get install libsndfile1
    
  3. Don't forget to reload the virtual environment for each session i.e. on Linux:

    . venv/bin/activate
    

    Or on Windows:

    venv\Scripts\activate.bat
    

Once you have everything installed, run the Python program to generate your correction filters. There are many command-line options described on the AutoEQ page. We used the following command to generate a set of five filters:

  python autoeq.py \
  --input_dir="measurements/oratory1990/data/over-ear/[Headphone]/" \
  --output_dir="example" --compensation="compensation/harman_over-ear_2018.csv" \
  --equalize --parametric_eq --fs 96000 --max_filters 5

This produces a set of files in the "example" folder, including the graph showing the generated correction. The file "[Headphone] ParametricEQ.txt" contains the filters, for example:

Preamp: -6.2 dB
Filter 1: ON PK Fc 14 Hz Gain 5.1 dB Q 0.31
Filter 2: ON PK Fc 227 Hz Gain -3.1 dB Q 0.83
Filter 3: ON PK Fc 830 Hz Gain -4.5 dB Q 1.16
Filter 4: ON PK Fc 2993 Hz Gain 6.4 dB Q 1.31
Filter 5: ON PK Fc 18981 Hz Gain -17.2 dB Q 2.46

(In the above, replace [Headphone] with the name of your own headphone.) Here are those 5 filters loaded into miniDSP Device Console:

Example PEQ with 5 bands only for miniDSP headphone EQ

Note that AutoEQ may produce filters that you can't enter exactly into miniDSP Device Console. For example, the Q of 0.31 for the first filter will be changed by Device Console to the minimum it will accept i.e. 0.5.

The AutoEQ program has a number of other interesting features, such as the ability to EQ a headphone so that it will measure the same as another headphone. Read through the documentation for more details.

Wrapping up [Top]

And that's it! Don't be afraid to experiment with different settings or adjusting the EQ until it sounds right to you. Have fun, and let us know how you go in our forum.

 

Related Products - Headphone EQ