Skip to content

Measurements

Jaakko Pasanen edited this page Sep 6, 2019 · 31 revisions

Welcome to the measurement guide. Here you'll find instructions and comments about what gear is needed and how to do the measurement using Audacity. Guide goes through the measurement principles using a stereo recording for simplicity. Surround recordings with one, two or multiple speakers is detailed after the stereo recording. If you have access to a surround setup, it's recommended to limit things which could go wrong and do the stereo recording first and do the surround setup recording only after that.

Measurement Gear

Binaural microphones, audio interface, headphones and speakers are required to measure HRIR. Optionally you can have a calibrated measurement microphone for doing room correction.

Microphones

Microphones used for HRIR measurements need to be small enough to fit inside your ears and have some kind of plug or hook for keeping the microphone capsule in place during the measurements. The Sound Professionals binaural microphones have been proven to work well for the task. They have a small electret capsule and a plastic hook which helps securing the microphones. Pictured below is the basic model with cable taped to a loop in order to get the cable exit ears from front and help further hold the microphones in place.

Microphones are placed as close to ear canal opening as possible. Having the mics too far away from the ear canal could affect how the outer ear affects the sound and having the mics crammed too tightly into the ear canal could have huge dampening effect on the high frequencies.

Binaural microphones

Some commercially available binaural microphones are:

Model Noise Sensitivity Price
The Sound Professionals SP-TFB-2 36 dB -30 dB $89
The Sound Professionals SP-TFB-2 with XLR 36 dB -30 dB $199.95
The Sound Professionals MS-TFB-2 19 dB -32 dB $149.95
The Sound Professionals MS-TFB-2 with XLR 19 dB -32 dB $259.95
Roland CS-10EM <34 dB -40 dB ~$80
Microphone Madness MM-BS-8 32 dB -35 db $99
Soundman binaural microphone line-up ? ? €65-145
Core Sound binaural microphones 30 dB -66 dB $230
Core Sound high-end binaural microphones with 4060 capsule 28 dB -34 dB $990
Core Sound high-end binaural microphones with 4061 capsule 23 dB -44 dB $990

Low noise is very desirable for the binaural microphones because lower noise means better signal to noise ratio for the HRIR. All of these mics are electret microphones and as such require bias voltage (plug-in power) between 2 to 12 volts. These are typically designed to be used with digital recorders. The Sound Professionals mics with XLR connectors can be used with normal USB audio interfaces which offer significantly lower equivalent input noise performance than digital recorders. USB audio interfaces don't normally have plug-in power and therefore cannot be used with electret mics. XLR versions of The Sound Professionals mics have adapters which convert 48 volts of phantom power to 9 or 12 volts of plug-in power for the capsules. Core sound mics come with a battery box so they can be used with audio interfaces without turning on phantom power. Core sound also has a separate product for turning phantom power and XLR connectors to a plug-in power and TRS jack.

Audio Interface

Audio interface

Audio interface is the microphone input for the PC. Excellent noise performance can be had very cheaply with Behringer UMC202HD but other popular options such as Focusrite 2i2 2.Gen should work just as well. Just make sure the audio interface has two microphone inputs!

As mentioned above, most USB audio interfaces don't have plug-in power for electret mics and cannot be used with them without adapters. It is possible to buy or build an adapter which converts phantom power from XLR to plug-in power on 3.5 mm stereo jack, use mics which have this built in or use a battery box which provides the plug-in power.

Alternative to a normal USB audio interface is a digital recorders which can function as a USB audio interface. Most digital recorders cannot so the options here are limited. One suitable option is Zoom H1n although optimal results cannot be guaranteed since H1n has a whopping 20 dB higher input noise than Behringer UMC202HD.

Finally it is possible to measuring HRIRs with digital stereo recorders which cannot act as USB audio interface but in this case you have to play the sine sweep on PC, use the recorder without being connected to PC and then manually transfer the recorded files from the recorder's SD card to PC.

Speakers and Headphones

In theory any decent speakers and around ear headphones work but the end result will depend on the performance of the speakers and headphones.

Low harmonic distortion is wanted for the speakers because measurements should be done with relatively high volume for better signal to noise ratio. Exponential sine sweep measurement method used by Impulcifer cancels out most of the harmonic distortion of the speakers but some residual distortion may remain. Frequency response and transient response is not so important because Impulcifer can do room correction better than what is physically possible with real speakers and sine sweeps don't have transients at all so that aspect of the speakers isn't modeled by HRIR. All in all speakers don't have to be expensive high-end devices but any decent affordable HiFi speaker should do the job sufficiently.

Headphones will have major impact on the speaker virtualization quality. Frequency response, which is normally by far the most important aspect of headphones' sound quality, isn't very critical in this application because it will be equalized as a part of the HRIR measurement process. Headphones' other qualities will have direct impact on the end result and therefore fast and well resolving headphones are recommended although any decent pair of around ear headphones can create illusion of listening to speakers in a real room. Some headphones are better suited for for speaker virtualization but it's quite not known at this time which elements affect the localization, externalization and plausibility of binaural reproduction. Electrostatic headphones and Sennheiser HD 800 at least have proven themselves as reliable tools for binaural use.

Sound Device Setup

Input and output devices in Windows (or whatever OS you are on) need to be configured for the measurement process. One measurement is done with speakers and one with headphones so if you have different output devices (soundcard) for them then you need to configure both. For the sake of simplicity we will here go through the setup for using the audio interface for speaker output, headphone output and microphone input.

Go to Windows sound settings: Control panel -> Hardware and Sound -> Sound. Select your output device (audio interface), click Set Default and then click properties. Go to Advanced tab and select a format with highest possible bit number and 48000 Hz. Other sampling frequencies are possible but 48000 Hz is default on HeSuVi and covers all use cases. Click OK to close the output device properties. Output device

Next go to Recording tab on Windows sound settings, select your input device (audio interface), set it as default and select same format from the Properties as you selected for the output device. Output devices

Recording with Audacity

Audacity is a free audio workstation and while being simpler than it's commercial counterparts it has all the features needed for recording sine sweep measurements. Download and install Audacity from Audacity's website.

Audacity can do overdub recordings meaning that Audacity will play back the existing tracks at the same time as it is recording new tracks. Overdub recordings need to be enabled in the options for this. Go to Edit -> Preferences -> Recording and select "Play other tracks while recording (overdub)" and "Record on a new track". Overdub recordings aren't strictly necessary but make the process easier when playing the sine sweeps on one or two speakers.

When saving the recording as WAV file Audacity needs to create multi-track file. This too needs to be enabled from the options. Go to Edit -> Preferences -> Import / Export and select "Use custom mix". Audacity settings

Once you have the settings configured you can start recording. Open up exponential sine sweep sequence file from data\sweep-seg-FL,FR-stereo-6.15s-48000Hz-32bit-2.93Hz-24000Hz.wav in audacity. We'll record on two speakers in this guide but it is possible to record even full 7 channel surround sound setup with just one speaker. Sweep sequence in Audacity

Input and output devices should be correctly selected if you set them as default devices in Windows Sound Settings but check once more in the tool bar that input and output device is correct (Zoom H1n in this case) and "2 (Stereo) Recording" is selected as the recording format for the input device.

Now you're ready to start recording. Headphones should be measured first because putting the headphones on and taking them off might move the microphones if they are not secured well and while this isn't necessarily catastrophic we'll want the microphones to be in the same position for both the headphone measurement and the speaker measurement.

Put on your headphones and set the output volume to a comfortable high level. High volume is better because it ensures higher signal to noise ratio but the volume shouldn't be so high that listening to the sine sweep is uncomfortable. Also too high volume might cause significant distortion on certain headphones and speakers. If you have any existing audio processing going on, you should disable them now.

Click the big red record button to start recording. Single ascending frequency should start playing after two seconds of silence. End the recording with stop button after the entire sweep sequence has played. Recording has to be longer than the sweep sequence. Headphones Recording

The waveform should reach close to maximum but should never touch it. If there are samples that are at the maximum then most likely they went over it and clipped. Clipping causes massive distortion and will ruin the measurement. If the highest point of the waveform is close to maximum (or lowest is close to minimum) you can check if they are in fact within the limits by selecting the recorded track, opening Amplify tool from Effect -> Amplify, setting "New Peak Amplitude" to 0.0 dB and looking at the "Amplification (dB)" value. If the value is above zero dB you are safe. Audacity Amplify Tool

Often the level is not going to be within optimal limits the first try and if this is the case you need to adjust mic input gain. Typically the audio interface has a physical knob for the microphone gain. If the recorded track is very low on volume, increase the mic gain and reduce the gain if the waveform clipped. Run the recording again after adjusting the mic gain and remove the old track from the small x button on the top left corner of the track.

When you have successfully recorded the frequency sweep with headphones you need to save the stereo track to a WAV file. Select the track if not selected already and go to File -> Export -> Export Selected Audio. Create a new folder inside Impulcifer-master\data called my_hrir and open the folder. Name the file as headphones.wav select file type as "WAV (Microsoft) 32-bit float PCM" and click Save. Audacity will ask you about the mix, if you selected custom mix from the settings earlier, and you should select the two channel output where first track is mapped to the first output channel and the second track to second output channel. Audacity WAV Export

Speaker recording for a stereo setup goes exactly like the headphone recording. Unplug your headphones and set the volume on speakers to a comfortable high level. Only the original sweep sequence must be playing and to prevent Audacity from playing the headphone recording as well you need to mute it. Click the "Mute" button on the headphone recording track control panel below the delete button. Track turns grey.

Start recording with the same red record button, wait silently and without moving until the sweep sequence has played entirely and stop the recording with the stop button. Speakers Recording

Check the speaker recording levels and export to a file called recording.wav inside the same folder. Congratulations, you have your first HRIR measurement finished. Now you need to process the sine sweep recordings into head related impulse responses with Impulcifer.

Clone this wiki locally