How to automatically EQ your headphones to online measurements: a step by step guide

Discussion in 'Sound Science' started by EQGuy, Jul 10, 2017.
  1. EQGuy
    First off, thanks to prescient for bringing attention to WebPlotDigitizer: https://www.head-fi.org/f/threads/e...ty-data-to-create-convolution-filters.829624/

    This guide assumes you have a PC running Windows.

    1. How to load a frequency response into Room EQ Wizard

    Download and install WebPlotDigitizer: http://arohatgi.info/WebPlotDigitizer/

    Find a measurement of your headphones online. We'll be using a measurement of the venerable old Sony MDR-V6 for this example:

    [​IMG]

    Open WebPlotDigitizer. Go to File => Load Image and load your measurement. Select 2D (X-Y) Plot and click Align Axes. A diagram will pop up instructing you what to do next. Follow its directions, and note the frequency and amplitude values you click on. Click proceed and follow the directions just given. Click complete after adding the four points. Enter the values I told you to note. Frequency will probably be in a log scale, so click log scale for X-axis. Amplitude will probably not be in a log scale, so leave log scale unchecked for Y-axis. Click OK.

    Click Automatic Mode. Click the color box next to foreground color. Click color picker. Click on the measurement line. Click Done. Click Pen. Adjust the stroke width to the thinnest you're comfortable using. The thinner the stroke you use, the more precise your generated data can be. Trace over the measurement line with the pen, making sure you cover all of it. Click Run. You want the result to be a single line of dots covering the measurement line. If the result is multiple dots thick, raise the X and Y values under algorithm and click Run again. Use the lowest X and Y values you can which can successfully generate a one dot thick line covering the whole measurement. Go to file menu => Export JSON. Click download and select your location for it.

    Use a JSON to CSV converter to convert the JSON file to CSV. I've been using https://json-csv.com/ and I just open the JSON with Wordpad, copy all the text, paste it into the box, click the big green download button and save the .csv file.

    Open the file in LibreOffice Calc (Excel should work too but I will not explain how to use it as I don't have it). Check comma and only comma under Separator options. Click OK. Delete all columns except "dataSeries__data__value__001" and "dataSeries__data__value__002." Delete row 1. Go to file menu => Save As and save as a .csv.

    Open Room EQ Wizard, which can be found at https://www.roomeqwizard.com/

    Click file menu => Import Frequency Response. Import the .csv you just created in LibreOffice Calc/Excel. If, at this point, you get an error, you probably need to manually edit the text of the .csv file to remove any rows which are out of order, as REW expects the frequency values to increase for every new downward row. You have successfully loaded the Headroom measurement into Room EQ Wizard:

    [​IMG]

    2. How to automatically EQ the frequency response you just loaded

    Click the EQ button at the top of REW. Click Equalizer at the upper right and set it to generic. Click target settings and set speaker type to full range. Make sure LF Cutoff, LF Rise Slope and HF Fall Slope are set to 0. Set target level to whatever the amplitude value is of the lowest point on the graph you wish to boost. For this measurement the bass at 20 Hz is -6.7 dB, so I'll set it to that. Under filter tasks, select the frequency range you wish to equalize. Equalizing that massive >10 kHz valley on the V6 would be unwise as it'd likely create audible distortion (and, worse, if a measurement is unrepresentative of your headphones on your head, boosting 10,000 Hz+ content too strongly could be harmful to your ears), so we'll select 20 Hz to 10,000 Hz. After doing some troubleshooting with a fellow Head-Fi member just now in private messages, I've discovered that if the data you feed Room EQ Wizard cuts off a bit above 20 Hz and you set match range from 20 Hz to whatever, the auto-EQ doesn't know how to handle this and generates faulty filters. If, after completing step one, your data cuts off above 20 Hz (you can tell by looking at the graph of the data you fed REW), do not set the low match range value below where it cuts off. I imagine this also applies to the high value, so if the high end of the data you fed REW cuts off below 20,000 Hz, do not set the high match range value above where it cuts off. In general, set the high value of match range to just below the value where the headphone's high frequency response drops off a cliff, if applicable. We don't want to be EQing in large boosts to 10,000 Hz response for the reasons above. Set Individual and Overall Max Boost as high as they'll go and Flatness Target to 1. Click Match Response to Target and let REW work its magic. Since Headroom uses diffuse field compensation, your hypothetical MDR-V6 is now equalized to the diffuse field curve:

    [​IMG]

    To use these EQ filters, download and install the excellent Equalizer APO: https://sourceforge.net/projects/equalizerapo/

    In REW's main window (not the EQ window) go to file menu => export => filter settings as text. This will generate a file that Equalizer APO can read. Export this file to Program Files\EqualizerAPO\config or the next step may not work correctly. In EAPO's configuration editor, click the little green plus and select control => include. Use the thingie that just popped up to guide EAPO to the filter text you just exported with REW. Go to view menu => analysis panel. Note peak gain on the left. Adjust the preamplification (you may need to click the little green plus and select basic filters => preamp first) until peak gain reads -0.1 dB. This is to prevent clipping and thus distortion.

    At this stage you have equalized your response to the diffuse field curve save for some adjustments you'll need to make to the high frequency response. However, headphones equalized to the diffuse field curve will sound bright, like an Etymotic ER-4B. You probably won't like this. At this point I have several suggestions; you may wish to try them all and see which you like best:

    - Equalize them to a psuedo ER-4S. In REW's EQ window, set HF fall start to 2,000 Hz and HF fall slope to 1.8. Click match response to target. You'll end up with filter settings that simulate an ER-4S's gentle treble reduction compared to the diffuse field curve. This sound signature is my personal definition of "balanced" sound;

    - Equalize them so they sound like Brüel & Kjær's optimum hifi curve:

    [​IMG]

    Paste the following into notepad and save it:

    50 0.0
    315 -1.0
    900 -2.0
    2000 -3.0
    4000 -4.0
    8100 -5.0
    20000 -6.0

    In REW's main window, select preferences menu => preferences, click House Curve tab, click browse, select the text file you just created and then put a checkbox in use logarithmic interpolation. You'll notice your target line in the EQ window now looks like the above target curve. Click match response to target. The filters this generates will produce a result which sounds like the above target curve.

    To be clear, the "psuedo ER-4S," and "Brüel & Kjær's optimum hifi curve" parts of the tutorial are only intended to add a treble reduction to EQ settings derived from diffuse field compensated measurements, or when EQing raw measurements to the diffuse field curve. You can ignore those parts of this tutorial if you're not using a diffuse field compensated graph and you are not equalizing a raw measurement to a diffuse field curve.

    - Equalize them to a psuedo Harman target. Follow the steps required to create the psuedo ER-4S. After creating the filters, add a 100 Hz, 6 dB, 12 dB slope low shelf to the filters and you now have a psuedo Harman target. This step only applies when you are working with a diffuse field compensated graph or you are equalizing a raw measurement to a diffuse field curve, although it can also produce Harman target like results when equalizing to an old compensated Goldenears measurement (the ones with the red and blue lines, not the green and blue lines) since GE's target curve has a Harman target-like treble reduction in relation to the diffuse field curve. This step may be useful when you are working with any compensation/target curve which has a flat bass response and when you desire a boosted bass response instead.

    At this stage you would use the program Sinegen ( http://sinegen.en.lo4d.com/ ) to adjust the high frequency response, since your post-EQ results will almost certainly not match what your ears actually hear. To do this, use an image of whatever target curve you wish to use for reference. Let's say hypothetically we're EQing to diffuse field curve:

    [​IMG]

    After loading your EQ settings in EAPO, sweep through 1000 - 20,000 Hz with Sinegen while listening, listening for obvious peaks and valleys and keeping in mind your reference curve. So, if you're using diffuse field curve, it should steadily increase in volume up to ~3 kHz then steadily decrease in volume after that. If you notice any obvious peaks or valleys which shouldn't be there, note their center frequency. Open up the filter file you exported with REW. Manually add new filters to remove these peaks and valleys using the existing filters as a formatting guide. Higher Q values mean thinner peak filters; lower Q values mean thicker peak filters. Every time you add or adjust a filter, save the file and, in EAPO's configuration editor, press the power button in the row where you loaded the filters file twice to reload the filter file. You should, with a little effort, be able to customize the high frequency response to your own ears.

    Note: You may notice a peak around 8 kHz or so when listening to Sinegen. If you are EQ'ing on-ear or over-ear headphones, this is a three quarter-wavelength resonance of your ear canal + concha system, is a natural part of your hearing and should not be EQ'd out. In-ear headphones will instead produce a half-wavelength resonance dependent on insertion depth and this should be EQ'd out. I imagine one should actually note their three quarter-wavelength resonance frequency with on/over-ear headphones and then, after removing the half-wavelength resonance from in-ear headphones with EQ, EQ IN a peak to their IEMs at their three quarter-wavelength resonance frequency in order to simulate how they perceive real-life sounds. I'm not quite sure what Q value or magnitude to give this peak; experiment with on/over-ear headphones and Sinegen to try to determine these values as your ears hear them.

    3. How to load an online graph as your house curve

    Follow all the steps in section 1 but stop right before importing frequency response. Open up the .csv in Wordpad or Notepad. Replace every comma with a space and save. Now you have a file which you can load as a house curve. This can be used to equalize raw measurements to the target curve of your choice. This can also be used to simulate one headphone through another provided you have a measurement of both headphones from the same source.

    Limitations: the primary limitation is going to be faulty measurements. If you EQ using a faulty measurement, the result will be inaccurate. If multiple measurements of your headphone are available, check them all to make sure the one you end up using isn't a major outlier. The seal when your online reference FR measurement was taken might be superior or inferior to the seal on your head, and this could lead to inaccurate results. Also, obviously, not every online measurement will be diffuse field compensated. I'll leave decision making up to you as to how to deal with the various compensation curves used on the internet.

    That's about it. Feel free to ask any questions you may have, or to suggest any procedural improvements. I hope this helps people.
     
    Last edited: Apr 5, 2018
  2. aleksanderp
    Just want to say thanks to your guide, I was able to make a bunch of EQ quickly based on different compensation curve. Cheers :)
     
  3. toby23
    Thank you. A touch complicated, but the result sounds clearer, closer and more precise, compared to my current method of inverting the Frequency Response chart and replicating that in Equaliser APO with Peace GUI.

    I really appreciate you taking the time to write this guide, it's definitely helped me learn more about how EQ's work.
     
    Last edited: Mar 21, 2018
  4. JewFerrigno
    Thank you for the guide and all the extra help.
    You are awesome!!
     
  5. ev13wt
    Very awesome! How did I miss this?

    Thanks OP!
     
  6. ev13wt
    Not sure I'm parsing this correctly?

    datasetColl__data__x | datasetColl__data__y | datasetColl__data__value__001 | datasetColl__data__value__002
    70.5 | 14.516.666.666.666.600 | 52.095.565.953.288.300 | null
    73.5 | 144.5 | 1.767.782.007.912.370 | null
    76.5 | 144 | 3.014.494.470.070.780 | null


    Edit: Made it work, had a problem in reading the text file to Excel.
     
    Last edited: May 2, 2018
  7. Patatorz38
    Hello, perhaps a stupid question but where to find «Find a measurement of your headphones online » ?
    I have a Sennheiser HD800S and I would like to give a try.

    Best regards
     
  8. Steve999
    I’m a little concerned. Who’s hftr (is that right @castleofargh ?) was that measured with? Who says those measurements are valid (with genuine respect otherwise, those cats did their fare share of snake oil pedaling.) How much bass are you going to add to make up for the lack of visceral real world bass? That’s a very subjective judgment. What about Fletcher-Munson? I don’t know about you but I don’t listen to headphones at 85 dB. I like my hearing. For me Beyer DT880s, Grado SR80s, Beyer DT990s, or Bose QC35 IIs (sorry!) do the trick, depending on what I am trying to do physically and emotionally. Everything else is kind of dreck, for me personally. I have no quarrel with anyone who’d rather throw on some Senns or AKGs or whatever. I’ve taken headphone FR curves, including from headroom, and visually flattened them using my Behringer DEQ2496 but there’s always more effort left because I am not the head dummy the headphones were measured on. (I am a different dummy.) Even with the raw measurement there is not even agreement on how to transpose it to flat! In other words, I’ve just decided to relax over the years and decided a few headphones got me in the ballpark and that getting it closer to “right” is not only mind-numblingly complex but also impossible and in the current technology a matter of opinion. And if there’s an “optimal” the variability from person to person is huge for headphones in particular.

    But it’s a fun hobby. Enjoy. I’ve been down the same road, not at the same level of expertise or with use of the same advanced eq technology as the original poster, but there’s a lot of interestig stuff down the road. I guess I’m a little concerned of people thinking this is the fix, end of story. If that were the case the headphone manufacturers would throw in a little eq and we’d all just call it a day and move on.
     
    Last edited: Nov 4, 2018
  9. Steve999
    It’s a much smarter question than you might guess. The ones he showed were from headphone.com, in the build a graph section after you drill down here and there. I’m not sure they maintain the site as well since Tyll Hersons (?) left. But see my post above for some provisos.

     
    Last edited: Nov 4, 2018
  10. castleofargh Contributor
    Head Related Transfer Function. they put a mic in your ears and emit a signal at different elevations and azimuths to "map" how your own head impacts the sound coming from various directions. we could for example consider, like with speakers, that we should mimic a signature for a placement at 30° on each side. but with headphones that would be forgetting how little of one channel reaches the other ear. when with speakers, one channel also arrives pretty loud at the other ear with a small delay. that's not insignificant in term of total energy at various frequencies. there is also how effectively the headphone is sending sound from about a 90°angle and while the all head isn't involved, the ear still is and your ear has no guaranty to have the shape and acoustic impact of the standard model on the dummy head that measured the headphone.
    so we have a somewhat different(I'd even call it defective) playback system, and it's hard to settle the issue of frequency response in a purely objective way. that's why I have a tendency to prefer a subjective approach for that and at the very least, fine tuning by ear to my personal taste or what feels right to me at the end. but solution like the one offered by OP can be a pretty cool starting point to even out some significant "anomalies" in a headphone's frequency response.
    one important aspect of using a FR graph is that the compensation used could be anything. so it's pretty important to always pay attention to that and not just assume that a flat line on a graph is a neutral signature(it usually isn't TBH). the most used compensation curve is Diffuse Field, and most people find that to be too bright and a bad reference. we just stick to it because of habit I believe.

    https://www.innerfidelity.com/headphone-measurements
    https://reference-audio-analyzer.pro/catalog-reports.php?sp_1=1&sp_2=2&sp_12=12&trp1=hp
    or https://www.rtings.com/ where they make a lot of efforts to try and correlate measurements with subjective impressions that you might be tempted to use to EQ your headphone. https://www.rtings.com/headphones/reviews/sennheiser/hd-800-s
    and I think Jude measured it too, but all I could find were THD graphs with my low search skill.

    just be careful to look at the compensation used. if it's a raw graph(no compensation at all), making that flat won't sound remotely close to neutral.
    there are other people who attempted to give a tutorial for how they believe EQing should be done. IMO the best ones should involve a good deal of work done by ear. but of course that instantly make it all longer and more tedious.
    as for simple stuff, I think I remember someone who made an API for equalizer APO a few years back, where you could load a picture of a graph, invert it, and just try to follow the shape by making your EQ over the graph. no idea if it ever worked, was practical, or if it's still compatible, but that seemed like a cool app for lazy people(the best sort of people ^_^). I'll post a link if I somehow remember who it was(I have his nickname on the tip of my tongue... argh).
     
  11. aleksanderp
  12. Steve999
    @castelofargh ,thanks for the insights about HRTF. I knew it was "something like that" but that's about it. I knew it was person-specific and made headphones tough to calibrate.

    I am embarrassed to say that my latest toy is the Sony WH-1000MX3 headphones. They are active noise cancelling blue tooth wireless or wired headphones. Now the cool thing is that I can go to the rtings.com site you mentioned down there and assuming the measurements are valid I see visibly with their measurements the Sonys have too much bass and a dip at about 5 khz (probably to avoid sibilance, which they do avoid very well).

    Out of curiosity I just threw in a comparison in the graph with the QC35 IIs just for good measure. It kind of confirms my subjective impression that the Bose QC35 IIs are really something super-special and first class for sound quality, in addition to being exceptional but second-in-class (sorry Bose) for noise cancelling. It's best to keep in mind that the Bose FR is a moving target though as they apply a loudness curve that becomes less emphasized at higher volumes.

    But the super-cool thing is that with an android or apple device you can alter the software in the Sony headphones in many ways, so, for example, I have used the equalizer in the software to take the bass down a little and let just a little of that 6.3 khz goodness back but still avoiding sibilance and bring up a 1 khz dip a little and and throw in some 16 khz EQ to get some airiness. They were bass-heavy and a little muffled out of the box, no match for the QC35 IIs out of the box, but now that I have adjusted the in-headphone EQ I think they sound about as good as any headphones I have heard, and they don't need to be strapped to a computer, etc., to get the sound as I altered it. The software in the headphones is altered so it applies across the board (as long as you have them turned on in some way shape or form) even after you leave the app and connect to another device. So you basically get a chance to fix them so they'll sound good for your own taste hooked up in any way to anything. It's a really nice feature. Of course I have to apply a little knowledge manually and not just run one software to compensate for indicated problems from third-party measurements, but the trade-off is they are good to go however I use them. So thanks for the link to the rtings.com site. Fortunately I have some practice at this from way back when. It appears that both headphones hit 20 hz and below easily which I find to be bizarre.

    The sound cancellation of the Sony WH-1000MX3s is mind-blowing but anyone can find information about that all over the web, no one needs me to tell them about that. They beat Bose at their own game.

    But to me the killer feature is the ability of the Sonys to suit the SQ to taste in several different ways. I'm listening to them now as I type, though I can't hear myself typing! It even cancels out the sound of my own breathing. Astonishing. But they would have gone back to the store without the built-in equalizer feature. For a more relaxed feeling I can just turn the noise cancellation off or adjust the NC in 10 different gradations or even let ambient sounds in so that they sound like open headphones. I can let select certain classes of ambient sounds to let in in (voices) or keep others out (wind). They can hook up by LDAC, SBC, or AAC, but you loose a lot of the functionality unless you are hooked up wired or by SBC.

    Here's the juxtaposed EQ curves of the two headphones from rtings.com:

    https://www.rtings.com/headphones/1-2/graph#678/2031/565

    So this is kind of a new approach to applying EQ to your headphones--doing it "in headphone," so to speak--with the Sony WH-1000MX3 (and their older brothers, the 1000MX2s, and the Sony CH700s (bluetooth but light on features and with only light noise cancelling I believe).

     
    Last edited: Nov 4, 2018

Share This Page