For a hobbyist headphone enthusiast, it's often useful (e.g. for modding) to be able to generate objective measurements of a headphone's acoustic performance.
Standard commercial solutions for modeling and measuring headphone psychoacoustics tend to be too expensive for hobbyist use, but it's also possible to build a good-enough do-it-yourself solution for very little money.
In this post, I'll give a brief overview of a virtually free DIY headphone frequency response measurement rig I put together some time ago.
The way a headphone sounds to a listener depends on the shape of the person's ear, as sound waves are reflected and absorbed by the ear's anatomy on their way from the headphone's driver to the listener's eardrum. As these effects will considerably alter a headphone's frequency response, attempts to measure how a headphone sounds should in some way account for them. In other words, your measurement rig shouldn't just have a microphone but also an artificial ear.
The acoustic effects of the ear canal can be approximated with a straight, half-open tube. I used a plastic tube a couple centimeters in length, its one end attached to the microphone and the other end open toward the headphone.
To replicate the effects of the external ear (pinna), I molded a replica ear out of Blu Tack (it was on hand and moldable), then attached it to the open end of the ear canal tube. I'm not totally sure how much the pinna affects the sound, but the difference may be large – see Results for a comparison of the Stax SR-5 headphone measured with and without the artificial pinna (it's been nearly a decade since I made those graphs, but I'm pretty sure the only difference between them was that the other had the pinna and the other didn't).
To record the sound, I used a cheap (about one euro) electret capsule microphone hooked up to a PCI Express sound card (about 150 euros).
To measure a headphone's impulse response, I played MLS test signals through the headphone attached to the artificial ear, recording the output into HOLMImpulse and exporting the results into an impulse response WAV file.
Using Kiss FFT, I transformed the WAV file into the frequency domain to get the headphone's frequency response; and by sliding the sampling window along the impulse response, I also got a measure of the headphone's spectral decay (CSD/waterfall plot).
To approximate the way a listener would perceive the frequency response (see head-related transfer function), I applied diffuse-field equalization to the response's decibel values.
Overall, the rig gave serviceable results for hobbyist use.
Below is a selection of sample CSD plot thumbnails generated with it. You can compare these data against e.g. the commercial-grade measurements by InnerFidelity – the latter's are more detailed (and more replicable), but as far as the frequency response goes, the results are fairly similar.