Originally Posted by takato14
I was planning on doing a FR with a sine sweep, two square waves at 30 and 300 Hz, and a CSD plot.
Actually, all of those (FR, square wave response, CSD) can be derived from the impulse response if you ignore non-linear distortion (which, with good headphones, is probably only a potential issue for the 30 Hz square wave at high SPL). Of course, it is easy to generate actual square waves, record them, and view the waveform in an audio editor. Using a sine sweep for frequency response testing has the advantage that it also gives a THD vs. frequency graph.
To measure the impulse response, you need an MLS signal, which you can generate with my 'testgen' utility, for example:
mls 0 25 1000010000000100010 0.3 0.3
This example works best at 48 or 44.1 kHz sample rate. You can actually delete the first few (<10) seconds of the resulting WAV file, because it will not be used in the impulse response output. The following command extracts the impulse response:
convolve.exe mls.wav ir.wav -inv=1 1000010000000100010
The second impulse - which will also have the highest amplitude if you truncate the beginning of the test signal - in the output file is the impulse response, you can use any audio editor to remove the unneeded parts of the file. To get a correct frequency response above 1-2 kHz, the recorded audio also needs to be equalized (this is not easy to get right with a DIY artificial ear). Note that the above command for "decoding" the MLS only works correctly if the original and the recorded file have exactly the same sample rate; that is, the DAC and ADC in the test setup should preferably be on the same physical device and share the same clock, otherwise pitch correction may need to be applied to the file.
The FR can be displayed with a simple FFT analysis of the impulse response. You can also convolve square waves with the IR to get the square wave response, if you did not record any actual square waves. For CSD analysis, you can use my 'csd' utility (I will explain the details of the usage and parameters later), or other programs.
Edited by stv014 - 5/24/13 at 12:23pm