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

While the miniDSP EARS was designed for headphone measurement, a number of customers have asked us if it can be used for binaural recording. We decided to investigate a little and do some experiments. Our results are below if you'd like to try this for yourself!

About binaural recording [Top]

Binaural recording uses two microphones positioned on a "dummy head" to simulate the effect of your head and ear (the external part, known as the pinna). The frequency response and the time delay between the two microphones varies with the location of the sound source. This recording is then played back on headphones to provide a realistic soundfield. These Wikipedia articles provide more information:

While the EARS doesn't have a full "head" like the dummy heads in the articles linked above, it does have the simulated pinnae. We therefore wouldn't expect to see the exact same variation in response as a real head as the sound source moves around. We wondered, however, if it would be similar enough to give a convincing sound field – hence our experiments.

Another issue with using the EARS for recording is the resonance in the artificial "canal." During headphone measurements this is removed by the calibration files that we provide. However, if using the EARS as a microphone, this resonance will alter the recording enough to be audible. Therefore, some post-processing on the recording will be needed to remove its effects.

Making the recordings [Top]

Recording from the EARS is simply a matter of using any audio recording software that you have. We used the command-line tool sox because it's easy to do the necessary post-processing on the recording.

To use sox to record audio from EARS, ensure that your system's default input device is set to the EARS and that it is set to a sample rate of 48 kHz. Then use the command:

  rec testfile.wav

You can change "testfile.wav" to whatever filename you like. To stop recording, press Ctrl-C. Or, to record for a set period of time, use the trim option – for example, to record for 30 seconds:

  rec testfile.wav trim 0 30

Or to record for 10 minutes:

  rec testfile.wav trim 0 10:00

To play back the file, ensure that your system's default output device is set to the device that you want to play audio from. Then:

  play testfile.wav

During our various recording tests, we found that the default 18 dB analog gain of the EARS is a good general compromise. In a couple of cases, like say slamming a car door with the EARS inside, the recording had some clipping. If you find this happening frequently, change the DIP switches on the EARS to reduce the gain. (See the EARS User Manual for instructions on how to do this.) If you find the level to always be too low (for example, ambient sound recording), you can increase the analog gain.

Another thing we noticed during our experiments is that any wind on the EARS will create unpleasant sounds in the recording. So this is something to watch out for.

Post-processing[Top]

To eq out the canal resonance, we first equalized a passive speaker for flat on-axis response. With the speaker positioned 50cm in front of the right ear, we ran a measurement sweep on the right channel of EARS. Figure 1 shows the measurement in darker red, and the brighter red trace shows the predicted response after EQ.

Raw response recording by miniDSP EARS, and with EQ for binaural recording

Figure 1. Raw response recording by miniDSP EARS, and with EQ for binaural recording

(The dip at 1300Hz is most likely an interaction between the speaker's woofer and tweeter due to the close measurement distance. It's not relevant for our purposes here.)

While it's arguable that we shouldn't be equalizing the front response completely flat like this (we are removing the effect of the pinna as well as the canal resonance), this should be a good start! This correction requires a single parametric EQ filter with these parameters:

  f    =  4400 Hz
  gain = -22 dB
  Q    =  2.2

With sox, we can implement this filter by specifying the biquad parameters. For example, this command will equalize out the canal resonance and normalize the gain so the peak level is -3 dB. Before running this turn down the volume!

  play testfile.wav \
            biquad 0.700132084087931  -1.130959727213600 0.648382780317322 \
            1 -1.130959727213600 0.348514864405253 \
            gain -n -3

(The backslashes are a line continuation. These must be the last character on each line – that is, no extra spaces after them. We've put them in so the command fits on this web page, but in practice you could just remove them along with the newlines.)

If necessary, the level of one channel can be reduced to bring them into balance. For example, to reduce the level of the left channel by 3 dB and then normalize both channels together:

  play testfile.wav \
            biquad 0.700132084087931  -1.130959727213600 0.648382780317322 \
            1 -1.130959727213600 0.348514864405253 \
            remix 1p-3 2 \
            gain -n -3

To reduce the right channel by 3 dB instead, change remix 1p-3 2 to remix 1 2p-3.

Finally, to convert the recording to a compressed file for uploading on the web, use the sox command instead of play and add the name of the output file:

  sox testfile.wav testfile_out.mp3 \
            biquad 0.700132084087931  -1.130959727213600 0.648382780317322 \
            1 -1.130959727213600 0.348514864405253 \
            gain -n -3

Sample recordings [Top]

Here are a few short samples to demonstrate the results of our experiments.

Sample 1 is a test of spatial reconstruction, with a synthesized voice announcing the location as we moved a small speaker around the EARS. This was recorded indoors at a distance of 40–50 cm.

 🔉 Spatial test

Sample 2 has the EARS strapped to the passenger seat of a car. The drivers opens the door and gets in, opens the windows, and drives off. (Right at the end you can hear the EARS being buffeted by the wind through the open car window.)

 🔉 Car driving

Sample 3 is an ambient recording of surf on a rocky shore.

 🔉 Surf on rocks

Wrapping up [Top]

That's it for this app note! Have fun, and please let us know in our forum if you give this a try.


Related Products - Headphone EQ