Sunday, April 23, 2017

Headphone Amplifier ABX Testing Switch Box

In order to figure out whether it's actually possible to distinguish between reasonably transparent headphone amplifiers I've decided to build a switch box. It's as simple as wiring together three TRS sockets and a 3-pole 2 positions switch. But knowing what amplifier one is listening to can affect the outcome of evaluation. The key to making unbiased judgements is blind testing and randomization.

So I decided to add to the box a "shuffling" switch. The idea is that the person evaluating two amplifiers doesn't know which one is currently active, that is, which amplifier is bound to which position of the switch. This binding is chosen randomly by an assistant, unbeknown to the evaluating person. Schematically the setup looks like this:

Digital signal from the source is converted into analog signal and duplicated to both headphone amplifiers under evaluation. Then outputs from the amplifiers are shuffled (so the actual signal from the Amp A may end up be labelled either "A" or "B", while the signal from the Amp B will be labelled the opposite) and passed to the A/B switch which is controlled by the evaluating person.

The "shuffler" and A/B Switch are encapsulated into one physical box. It looks like this:

As you can see, the state of the shuffling switch (labelled I / O: "Inverse" and "Original") on the back (left photo) can not be seen when looking at the front panel which hosts the A/B switch (right photo).

The shuffling is implemented trivially, here is the diagram for a pair of wires from "A" and "B" inputs:

Thus, when the shuffling switch is in the "O" ("Original") position, "A" and "B" wires from the input correspond to "A" and "B" positions of the A/B switch. When the shuffling switch is in the "I" ("Inverse") position, they are swapped.

Since stereo signal needs 3 wires, this schematics need to be triplicated. Thus for shuffling a 6-pole 2 position switch has to be used, while the A/B switch is a more common 3-pole 2 position.

As one can see from the diagram, there are 2 points where 3 wires need to be connected together (6 points in total for full stereo signal). I've found it handy to use Sparkfun's Square 1" Single Sided proto board, which features connected groups by 3 of through-hole contacts. The inside of the switch box looks like this (the board is on the right):

One last important thing to keep in mind is that before doing any comparisons, the volume levels of the amplifiers must be matched exactly. The human ears are super sensitive to difference in loudness, and a louder sound is always perceived as a "better sounding" one.

In order to align the volume levels, I use the T-Cable I crafted previously and a reasonably precise Agilent U1252B multimeter. Be sure to measure the voltage on both left and right channels. Not every single headphone amplifier I've tested featured precise match of inter-channel voltage levels. On some amps the left channel is louder, one some the right one. Make sure that the voltage levels of the loudest channels match (it doesn't matter if on the Amp A the loudest is the left one, while on the Amp B it's the right one).

Thursday, April 6, 2017

T-Cable for Output Level Measurements and Surprise from Benchmark

When performing headphone amplifier comparisons (actually, any audio-related comparisons), matching output levels is of a paramount importance. Louder sounding equipment always perceived as sounding "better" (unless it is clipping because it has exceeded its capabilities). And human ears are amazingly sensitive to volume levels, even a bit of difference in them may affect our judgements.

That means, before starting any comparisons of headphone amps "by ear" make sure that they have been set up correctly. Two tools that are helpful for this job are: good "true RMS" multimeter, and a special cable that has open contacts for attaching probes (unless one is OK with partially disassembling the amplifier or headphones to reach their contact plates).

That's why I decided to make a simple pass-through 1/4" TRS T-Cable with an outlet where multimeter cables can be connected to. This is how is supposed to be used:

This is how an assembled cable looks like:

After finishing the cable, I decided to test it with my headphone amps. First I tried with SPL Phonitor Mini and AKG K550 headphones. I've connected the T-cable in between, and started playing a 1 kHz sine tone—a simple wave, so the multimeter doesn't have any problem measuring the output level. As I expected, the output level was increasing or decreasing with my volume adjustments, and levels of the left and right channels matched pretty closely (within 1%).

The next was Benchmark DAC1 HDR, and here I've got a big surprise—the levels of the left and right channels were pretty much off from each other—as much as 16%. Something that I wasn't expecting from this piece of equipment. I listened to this sine wave myself, and indeed I noticed that it was shifted to the right, and the amount of shifting was changing as I was adjusting the volume.

I've searched on the web, and found this old thread on ProSoundWeb forum describing exactly the same problem I have, and the conclusion there was that the left / right balance for headphones on DAC1 only holds at a certain output level. This seems pretty strange to me, especially combined with the fact that Benchmark has a remote control. So they put a motorized volume pot in this amp, but couldn't make it to preserve balance across the volume control range?

Having figured out this sad fact, I decided to adjust the balance on the Benchmark. Thankfully, it has a trimpot for that. Here is how my setup was looking like:

The trimpot on this model is easy to find. What it seems to do is adjusting the level of the left channel. After I balanced the channel levels for a level of about 100 mV RMS, I've found that it actually only holds in this region. As soon as you move the volume slider by a couple of marks, the sound is getting slightly out of balance again. Not great, but at least I'm now aware of this issue.

For me, the conclusion is never trust the brands, and always check everything with tools before jumping into any comparisons.

Sunday, April 2, 2017

MOTU UltraLite AVB: Hybrid Stereo + 5.1 Setup

I use MOTU UltraLite AVB as my primary sound interface. It's a versatile and easy to use device, with lots of audio inputs, outputs, and excellent DSP-based routing and mixing capabilities. Once you have created a certain audio setup, UltraLite AVB offers a way to save it and restore it later. For example, I had a setup for 2.1 speaker configuration, and a setup for 5.1 surround configuration (why they have to be different?—see below), and I was switching between them depending on the material playing.

But switching between setups isn't something that my kids or wife can do easily. So I decided to create a hybrid configuration that can be applied to all my use cases. Here they are:

Use Case 1: This one is active when kids play games. They sit next to the computer, way behind the left and right monitors, so they can't hear them properly. The only speaker that can deliver sound to them is the Cambridge Audio Minx Go located below the computer monitor.

Use Case 2: This one is for playing stereo content. The primary speakers is a pair of JBL LSR305 supported by KRK 10s sub, comprising a 2.1 setup. But since there are also rear KRK RPG2 5 speakers set up for the surround use case, and the center channel, these can be optionally engaged for widening the soundstage and enhancing dialog clarity in movies.

Use Case 3: This is the real 5.1 surround setup where each of the 6 speakers has its own channel to play. However, since the speakers are not full range, bass parts of their channels need also to be routed to the subwoofer, in addition to the LFE content.

The presence of additional speakers in the 2.1 setup doesn't allow it to be used for the 5.1 case. Take for example, the left channel in the 2.1 setup--it needs to be routed into the front left speaker, as well as into the center, and into the rear left speaker, and this routing is incompatible with the 5.1 setup, where the front left channel only goes into the front left speaker.

On the computer side, achieving a hybrid setup is pretty easy. On Mac, in Audio MIDI Setup app it's possible to assign different input channels of a multi-channel audio interface to different configurations, e.g. for stereo use input channels 1 & 2, while for multichannel 5.1 setup, use channels from 3 to 8. Now, the question is, how to configure MOTU to route the channels accordingly.

This actually has turned out to be non-trivial. Mostly because the approach for controlling routing and mixing used in MOTU products is modeled after classical mixing boards used in studios. In practice that means there are restrictions on what can be connected to what, and at which stages effects can be applied.

The main effect I need is the equalizer—to perform some basic room correction. Another important thing is digital attenuation which allows aligning speaker output levels precisely, as knobs on inexpensive powered monitors usually lack required precision—you can do basic alignment with the knobs, but then if you need to make one of the monitors softer, say by 1 dB, the only way to achieve that is by attenuating the corresponding channel on the sound card.

In order to visualize for myself all the allowed connections between mixing stages of MOTU card, I've created the following diagram:

See, it's actually not that simple. Each processing block can be characterized with the following attributes:

  • how many inputs (and outputs) does it allow; typical values are 0, 1, and many. E.g. a sound card input can only output audio data to the DSP, so it have zero mixer inputs, but it can be used as a source to any number of other mixer blocks;
  • whether the block has effects; that's easy to figure out--only blocks that provide effects appear on the Mixing tab of MOTU control UI;
  • what is the way to route the output of the block back to DSP; E.g. the "Mix Aux" block—a plentiful resource, can't output to other mixing blocks, its output can only be chained via another "Mixer Input" block, and this connection is done using the Routing tab;
  • and finally, some stereo blocks can be split into independent mono channels, and some don't.

Note on the Reverb group: it's a special Mix Group because, first, it is the only that contains a reverb effect, and second, other Mix Groups can send to it directly from the Mixing tab, but not to each other. This feature is expressed on the diagram as a special input marked "R".

After figuring out the rules, and having the use cases in mind I've came up with the following diagram of how the blocks should be connected:

Here, "L" / "R" letters on inputs and outputs designate left and right channel. I had to only use one channel on "Sub L" and "Sub R" groups because equalizer settings are different for left and right channels, and unfortunately a Mix Group can't be split into a pair of monos.

This is how the mixing configuration looks on MOTU UI (note that Mix Aux strips didn't fit):

Having a diagram at hand was really helpful to set everything up.

The Reverb group is used for the real channels in order to add a delay. Unfortunately, there is no direct way to set up a delay on MOTU (that's a big deficiency to my view, compared to miniDSP products). The trick was to use a "Pre-delay" setting on Reverb effect, set all other parameters of Reverb to minimum, and compensate with an EQ for a high frequency shelving that Reverb creates. This restores the frequency response, but not the phase, resulting in a non-uniform group delay. But this is hardly noticeable.

As a conclusion, I would say that I greatly appreciate robustness of MOTU configuration abilities, but I would really like to have some "DYI" mode for DSP that would offer the following:

  1. Input bi-quad (or better, multi-pole multi-zero) coefficients directly.
  2. Remove the processing block "specializations".
  3. Input delays directly, not as part of the Reverb effect.