Music and Audio Electronics

What happens if an engineer who's into noise and analog circuitry is a bit of an audiophile (with emphasis on headphones) and music nut as well? Well, this page, duh. Since it features none of the fancy functionality of the Web 2.0, I've been referring to it as a blogalike. I hope the topics presented here prove useful / enlightening / whatever to some of you out there – I know they can get quite "techy", but that's how I roll. :p

Index of topics

Helpful stuff for audio geeks

Recording Equipment

Playback Equipment – General Tech Topics

Playback Equipment – Circuitry & DIY

Music-related software and misc.

Music – General

Music – Technical

A History of Audio DAC and ADC Chip Performance

This entry has moved. Please update your bookmarks. I apologize for the inconvenience.

JBL 30xP series and Similar: Tackling Hiss

Do you ever end up writing a forum post and thinking, "man, this one should get a dedicated spot of its own"? This is just one of these, originating on ASR (see JBL 308P MkII review thread). So here's a look at a contentious topic – hiss in active monitors. Some are affected more than others, with the likes of Neumann, Genelec or Yamaha generally coming out on top (the Mackie MR series seems to be quite good, too, if somewhat plagued by transformer buzz), while JBL's 30x series are some of the more notorious (though there seem to be noticeably worse offenders still – basically everything Kali Audio, for example, which is a major shame because otherwise those are absolutely superb for the money). Let's have a look at these and other similar inexpensive DSP-based speakers:

As far as I can tell, first of all an analog input stage feeds an ADC (with analog gain selectable for either consumer level [-10 dBV nominal, 2 Vrms = +8 dBu maximum] or pro level [+4 dBu nominal, +20 dBu maximum]). I think the level control actually controls a digital attenuator. Then inside of a single chip, the DSP does its thing with crossover and all, and an integrated PWM DAC / Class D amplifier gets things back into the analog domain for each speaker driver.

There are something like four sources of hiss on these that you might encounter – in roughly descending order:

  1. If your source is mains protective earth referenced and you were foolish enough to use an unbalanced audio connection, the resulting ground loop is likely to invite plenty of power supply related noise, especially when the input is set for consumer level. This is because the power supply is a switch-mode job, and those a have a penchant for creating lots of noise. So don't do that. (This is why the ADAM T5V may be using a 2-pin mains connection, it should essentially eliminate this particular problem. The larger models have a conventional 3-pin IEC though, like the JBLs, though whether they are similarly hardwiring their audio ground to PE is unknown.)
  2. Source noise. If your source has plenty of dynamic range (like 115 dB or more) this is not likely to be as critical, but generally you do want to make sure that input sensitivity is roughly aligned with source output levels, or else dynamic range may be degraded needlessly (either by increased noise or premature input clipping). A Behringer UMC202/204/404HD with ~0 dBu worth of output should see the consumer level setting, a Focusrite Scarlett 2i2 or other similar midrange interface with around +16 dBu should be used with +4 dBu instead.
  3. ADC noise. The ADC in these is a CS5341, rated 105 dB(A) of dynamic range if given the luxury of a +5 V analog supply. I would not count on a real-life implementation actually reaching this figure, it may fall a few dB short. What remains is just kinda-sorta enough to cover a few dB SPL up to max SPL @ 1 m (sensitivity spec is 92 dB SPL @ 1 m @ -10 dBV, i.e. 108 dB SPL @ 1 m @ 2 Vrms). The input gain knob presumably controls a digital gain setting, allowing you to reduce noise level if lower than maximum output is required. Not ideal but a tolerable tradeoff. Around 100 dB of dynamic range still is more than decent after all.
  4. Amplifier and DAC noise from the STMicro STA350 DSP + amplifier chip. This is the only one that you as a user can do absolutely nothing about. It still is just average but should not be "run for the hills" level. The sensitivity of a 1" tweeter in a largeish waveguide can reach 100 dB SPL / 2.83 V / m towards the lower end of its range, and dynamic range of the STA350 D/A + amplifier section is only 100 dB at best.

So in order to be most happy with these monitors, what you want is:

That fortunately includes a lot and excludes only a little gear. The Rode AI-1 with its exceptionally wimpy -6 dBu output would only get 305P MkIIs to 94 dB SPL @ 1 m at the best of times, so maybe not that one. Behringer UMCxxxHD or misc. modern-day mid-level onboard audio + a HD400 (around 0 dBu and 0…+3 dBu, respectively) would be in the yellow at least.

Back to topics

Entry last modified: 2020-11-14 – Entry created: 2020-11-14

RMS Summing and Unsumming Calculator

This calculator has moved. Please update your bookmarks. I apologize for the inconvenience.

Back to topics

Entry last modified: 2020-02-21 – Entry created: 2020-02-15

Portable Mixer Shootout: Mackie 402 VLZ4 vs. Behringer Q1002USB

402 VLZ4 Build

Rugged all-metal chassis. No wobbly RCA connectors, unlike Behringer. Locking power connector and power switch appreciated. Dials a bit mysterious at first, some deviations here and there, pretty much same as Behringer. Prefer Behringer's main mix fader over Mackie's rotary pot, but the latter's bar graph LED level meter is much more useful in return. Don't like the spot for the headphone level control overly much.

402 VLZ4 Mic Preamplifier Performance

Usual unbalanced connection to Xonar D1 input.

Input noise when fed from a short circuit (1.3 ohms) is about 5-5.5 dB lower in the Mackie, for an EIN of an estimated -131.5 dBu. Even with a 600 ohm microphone, the difference still is about 1.5 dB, and that's audible in a direct comparison. Some more power supply hum in the Mackie. Short to open delta is 13 dB (nominal input impedance is 2.55 kOhms).

I was extremely impressed with distortion performance. Even at full gain, distortion remains negligible (as in -95 dB 2nd, -100 dB 3rd) right up to clipping. If anything, the rest of the mixer is holding the preamp back! The overload indicator lights up about 4 dB below clipping, 4.5 dB higher than the Behringer (which still fares worse with 3rd somewhere at -84 dB when backing up on input gain by 10 dB and increasing channel gain to compensate).

Frequency response flatness is good even at full gain, with -0.5 dB at a little over 40 Hz and a slight tilt starting at around 1 kHz, giving the second -0.5 dB point at a hair over 16 kHz. I was unable to improve this via the tone controls, as the center detent meant minimum adjusts were in the order of 0.5 dB. Seems like the bass may be a resonant filter, and the highs control is a shelving one.

I never noticed that the low-cut filter in the Behringer had about 3 dB of overshoot – no such overshoot is present in the Mackie, it just rolls off cleanly. -6 dB is at about 88 Hz vs. 93 Hz in the Behringer.

When splitting one input across both stereo channels by disabling the L-R pan function, level drops by 3 dB. Just something to be aware of. (Conversely, the Behringer gains 3 dB by panning to one side. Effectively it's got 3 dB of gain in the tone amp section. I was generally comparing L-R pan in the Mackie to center pan in the Behringer.)

Misc. performance comparisons

Mix bus noise (Main mix = +10 dB, all channels turned down): Behringer -95,5 dB, Mackie -100 dB (midband noise ~2 dB lower and flat beyond 20 kHz, Behringer has HF rise in noise reaching ~6 dB above base at 20 kHz, presumably power supply noise due to PSRR letting up)

Tone amp noise (Main mix = +10 dB, Ch1 level = 0 dB, Ch1 gain = 0 dB): Behringer -91,5 dB, Mackie -96 dB (Behringer now with only slight tilt towards the highs, Mackie with some more subsonics)

Tone amp + mix bus noise at my usual settings (Main mix = -10 dB, Ch1 level = 0 dB, Ch1 gain = min): Behringer -106 dB, Mackie -109 dB, almost reaching Xonar D1 noise floor (-110/-111 dB)

Output stage noise (Main mix = min) appears to be so far below soundcard noise floor as to make no difference. I found some issues with my cabling though…

Power-on/off pop noise seems appreciably better controlled in the Mackie.

There are some function differences: In the Behringer, the headphone out is slaved to the main mix, while in the Mackie it is fully independent. You can also opt not to route the unbalanced Tape In to main mix, allowing you to do a mix-minus (you can hear the Tape In signal over headphones but it is not going out). In the Behringer, this function is occupied by the internal USB sound device.

Back to topics

Entry last modified: 2018-12-13 – Entry created: 2018-12-01

Microphone Musings: The t.bone SC-400 vs. Samson CL8

The SC-400 from music retailer Thomann's house brand is a real large diaphragm (1") "real" condenser microphone with the XLR connector customary in studio use and a (slightly super)cardioid directivity pattern that's yours for the princely sum of 49€ brand new (or maybe half that used), shock mount and pleather pouch included! And the shocker is: It doesn't even suck, quite the contrary!

Now I already have a large diaphragm condenser, the trusty Samson CL8, a multipattern mic (cardioid / omni / figure-8) with a slightly larger 1.1" diaphragm which I think retailed for about 4 times as much back in the 2000s, shock mount originally not included. (I think the internals are similar to the Behringer B-2 Pro.) That definitely shows: You get externally accessible highpass and pad switches in addition to pattern selection, its massive aluminium (aluminum for my American readers) diecast shell outclasses the smaller SC-400's machined parts, and the optional shock mount SP01 is much bigger with softer suspension, which in sum means shock absorption should be a lot better. The tube around the SC-400's electronics doesn't exactly have the most well-defined electrical connection to other case parts either (if it starts humming when touched there, make sure the end piece is screwed on tight), not to mention that the whole top of the mic is fairly resonant, the headbasket in particular. Speaking of this, the grille is rather thin and can be dented should you accidentally drop the mic – though on the pro side you won't need very much force to get dents back out either. (Don't ask how I know…) At this price point you don't get a shock-mounted capsule either. It's nice that a 5/8" to 3/8" adapter is included at all, but the outer thread on this one isn't machined too well. Finally, the accompanying spec sheet is largely bogus.

That said, even if its construction may be somewhat lacking in finesse, I was surprised by how solid the case parts are. The tube is literally something like 5 mm thick. The pad-printed lettering may eventually wear off, but I don't foresee any dents in the body any time soon. It's also super easy to take apart – unscrew end piece, slide off tube, and there's the electronics in plain sight, mounted in a metal frame and split over two boards on opposing sides. Well, I guess it has to be if the low-cut switch is hidden inside, but still.
I'm still puzzled by how the CL8 might open… there's clearly two parts to it, but no clue how they might come apart. I did find a brass screw that'll release the innards of the XLR connector when screwed in (!), not sure how to proceed from there. I suspect there might be a screw hiding in the hole with the round bump in it (else why would there be such a thing in the first place?), but that looks easier to get in than back out.

The SC-400's electronics appear to be near-identical to those of several other China mics, including Auna CM001, Apex 435 and CAD GXL2200. They are split over two boards, one apparently containing a variation of the classic Schoeps amplifier circuit (JFET input / phase splitter followed by push-pull emitter followers), the other serving as a DC/DC converter for generating capsule bias voltage by means of a sinewave oscillator + rectifier.

The included shock mount – almost identical to the t.bone SSM 2 that sells for 9.90 – is rather small and very stiff, but still seems robust and well-padded. (The weakest point appears to be the fixating screw's thread.) I would have added "well thought-out" to the list had I not spotted a problem – the two clips used to widen the mic holder are actually touching the outer ring, thereby blocking any movement altogether! This makes the shock mount not just stiff, but straight non-functional. Actually I originally thought that the clips were some sort of transport lock… The worst part is, I've checked the promo photos and various videos, and this appears to be just the way they come in many cases. FAIL. The handle part would have to be bent by another 15-20░ or so, but since the material appears to be some sort of spring steel, that's more easily said than done. (A vise with some scratch protection should work.) The stiffness is another issue. I have unhooked the elastics (which aren't, well, terribly elastic) at two points, that allows the mic to wiggle back and forth at least.

I guess I'll have to look for another similar but better shock mount. (The one shipped with Auna mics for the last two years or so seems better, though it may still require some clip bending to resolve clearance issues.) I definitely appreciate it if there isn't this huge thing dangling in front of my monitor. Besides, and this is purely superficial, a black microphone and shock mount also fit my black microphone stand well (which incidentally cost almost as much as the mic…), whereas the Samson gear is kept in a silver tone.

Like the CL8, I'm using the SC-400 on the Xenyx Q1002 USB with phantom power enabled. Both want the full P48 and would in all likelihood not work too well on an input with substantially lower phantom power supply, like the Xenyx 302 with its 15 volts. This trait is common in low budget large diaphragm condensers.

Now the part you've all been waiting for – the sound! In direct comparison, the CL8 (in cardioid mode) has a somewhat sharper and clearer sound while the SC-400 is fuller (it also picks up more low-frequency ambient noise components, hence the low-cut switch) and might appear slightly muffled even though it still retains a bit of a treble peak. I've seen some measurements of the multipattern version SC-600, its frequency response actually appeared to be quite flat (and down to below 30 Hz no less, while the CL8 spec sheet shows a slight tilt and a quicker decay starting at about 50 Hz, indicating that FET bias isn't as high-impedance as it could be), so I presume the SC-400 is the more honest here. It's not a "hyped" sound but should respond well to EQ. Actually I prefer its sound when it's pitted against the bigger, more expensive SC-450, which struck me as more along the lines of the CL8 sonically.
Sensitivity of both struck me as very similar, so somewhere around -37 dBV/Pa. Noise level, by contrast, is substantially lower in the t.bone mic. It's about 5 dB in the spectrum, might be even more subjectively. The CL8 has always seemed slightly hissy, not a great deal better than the dynamic Q2U on a decent input. Its hiss has a somewhat harsh, grainy quality, the SC-400's is much softer and almost drowned out by room noise. (I'm guessing it's similar to the SC-600's, which measured 16-19 dB(A).) Going by spectra, I have kind of been suspecting that the CL8 has an electronic highs boost, which would boost input noise along the way.
Pop noise suppression in the CL8 appears to be very limited, with a relatively coarse grille and what appears to be a very thin mesh inside; the diaphragm is rather plainly visible. By contrast, the SC-400 employs more comprehensive internal screening, and you have to catch the diaphragm from the right angle to catch a glimpse of it. Unsurprisingly, it also is quite a lot less sensitive to plosives. Perhaps someone figured that the buyer of such an inexpensive mic would shy away from the extra cost of a pop screen.
In terms of directivity, I'd say speech remains good up to about +/-60░ off-axis, 90░ gets muffled and quieter, and the minimum is reached at around 120░ before picking up again very slightly (mostly in bass and highs, as usual). So it's a slight supercardioid.

In sum, I have been quite impressed with how well the t.bone SC-400 performs at its price point. You probably won't be tempted to sell a Neumann for one (or a Sennheiser MK4, or even an AT2035), but still, it is a perfectly usable microphone. Address the resonance issues with some elbow grease, and you should have a winner. The shock mount is a real shocker though.

Incidentally, my sample came with the latest (2015) version of the spec sheet, so I am pretty sure that it is not older than a few years and ought to be representative of current production.

Now to put things into perspective, there is in fact plenty of competition at this price point:

Back to topics

Entry last modified: 2018-11-04 – Entry created: 2018-10-30

Picking an Attenuator for Power Amp Measurements

Attempting to measure speaker power amplifier performance can be all kinds of fun. First of all you'll find that results using a consumer sound card will be marred by all kinds of noise, and then there's the problem of getting levels down so you can measure at decent power output without frying your input, not to mention having to come up with a dummy load.

The answer to the noise problems is simple: Go balanced.

Now, how do we get our output levels of 20+ Vrms down to something that is not going to fry our input? Well, looks like we're going to need an attenuator. Now the output of our amp is often going to be unbalanced – so do we use an unbalanced voltage divider to give, say, -26 dB and impedance balance that…

[Unbalanced attenuation]

… or should we be going with a proper balanced attenuator using just as many parts but employing the shield connection?

[Balanced attenuation]

The answer is quickly reached by applying a common mode (in-phase ground-referred) signal to both input nodes on the left-hand side in a circuit simulator, and then determining how much common mode gets through.

  1. The unbalanced attenuator setup lets the (unwanted) common-mode signal through essentially unimpeded. The (wanted) differential mode signal, however, is obviously being attenuated by about 27 dB in this case.
  2. The balanced attenuator setup attenuates the common-mode signal just as much as it would the differential mode signal. (I think it was Bruno Putzeys who was pointing this out when discussing different types of balanced attenuators.) That's on average, with exact results in terms of resulting input CMRR improvement depending on resistor parts tolerances in attenuator and balanced input stage. I got anything between about 20 and 60+ dB.

Winner? The balanced attenuator, no doubt. When you've got a balanced input of moderate CMRR performance (which is typical for line-level inputs found on home studio or PA gear), an extra 27 dB (+/-) is definitely welcome. Note that the shield connection is absolutely required – remove it, and the full common-mode signal gets through again. That said, the shieldless version can be built with just 3 resistors, and it still performs a few dB better than the unbalanced one on less than ideal inputs.

Back to topics

Entry last modified: 2018-10-26 – Entry created: 2018-10-26

Good Card, m.A.A.d Drivers – Fun with Asus Xonar D1 & D2

(Sorry Kendrick, but that one was too good to pass up.)


In my soundcard enthusiast days roughly a decade ago, I would have loved to have one of these Asus Xonar cards, which set new standards for line level noise and distortion performance at their given price points and remain very good even now. (You don't see RMAA loopback SNRs of 112 or 116 dB(A) and THD below 0.001% on an all-unbalanced -10dBV card every day.) Unfortunately my main machine at the time was using an Asus P2B-D dual Slot 1 board, which had some PCI compliance issues that prevented several newer cards from working (I once tried an Audiotrak ProDigy 7.1, which was a no go but worked fine in a somewhat more modern P3B-F, but that's not where I needed it, so back it went), and the Asus manual was asking for a PCI 2.2 compliant slot, so I wasn't willing to risk it.

Now a decade later, PCI isn't really en vogue any more, but my current system still has plenty of slots gathering dust. Now with my new mixer, I was running into the limits of the SB Audigy FX line-in. So I set out to hunt down a Xonar D1 inexpensively and succeeded, and later I snatched up a D2 (BF edition) for a good price as well.

This may have you wondering whether you can run two of these cards. Well, the answer is, yes and no, at least in Windows. The devices are basically picked up fine by the OS, but the control software is not designed for such a scenario and the cards cannot be set up independently. I wouldn't be surprised if you had better luck when using another OS like Linux.

Performance and Power Consumption

Performance wise, I think the sweetspot of these cards is at 48 to 96 kHz. 192 tends to yield increased distortion, especially (playback-side) IMD, and it looks like there are analog lowpass filters kicking in around 50 kHz. 48 still gives a tiny bit better SNR than 96. (The dip to about 108 dB(A) in 44.1 kHz due to what's presumed to be PLL phase noise is well-documented.) Analog noise floor in D2 ADC and DAC appears to be about the same, at roughly -120 "RMAA-dB(A)", while in the D1 the ADC is clearly weaker than the front channel DAC, as also indicated by specs (noise floor at roughly -115 "RMAA-dB(A)"). So the difference in ADC performance actually is greater than you might think, especially since distortion has a tendency to skyrocket in the D1 once levels hit -1 to -1.5 dBFS or so (though that seems to depend on source impedance).

Hardware resampling is of very good quality, which is good since getting sample rates right may involve a bit of a fight.

Don't bother using a dynamic microphone with these cards, just use a little mixer or something instead. While you can get the birdies to cancel out by inverting the (shorted) right channel and adding both, it increases the (unspectacular) noise level even further. An electret mic or a studio condenser supplied with external phantom power may work alright though. The optional mic boost appears to be nothing but a digital 30 dB gain that may be helpful in realtime applications but can easily be replicated in software when recording.

Also note that these particular cards are not exactly optimized for headphone use, and an output impedance of 100 ohms really is nothing to write home about – expect a correspondingly bent frequency response if headphone impedance isn't ruler-flat.

It appears that playback and recording clocks are actually independent … this seems plausible since there is only one external reference clock crystal, so the chip needs a PLL anyway and you might as well add another. One annoying trait of these cards is that they have an internal (DSP) sample rate that is not inherently coupled to playback device sample rate, so including the application you may have three different ones to keep track of. (This is similar to older Creative cards.) The XonarSwitch application makes this a bit easier at least.

Don't bother using the rec level control, it's just digital attenuation.

On not one but two different Xonar D1s, I've had issues with the right front output channel dropping out after a while, being restored by the card being powered off and back on again (e.g. by briefly entering standby). Seems like the little relays used are having some contact issues there. Why always the right channel? Heaven knows.

In my computer, which is basically a FSC Celsius W370 by now, I am seeing a mains-side power delta of about 3 W plus maybe 3.5 W for the D1 or 5 W for the D2. I can only assume that plugging in any PCI card causes a PCIe-PCI bridge to be turned on or its PCIe lanes to be operational all the time. In times where entire PCs may idle around the 10 W mark, that's quite a bit, but then again it seems like the D2 runs its analog stages on +/-8 V generated with linear regulators from PCI-supplied +/-12 V, and the rather hungry converters may be supplied from +5 V regulated down from +12 V as well, a clean but not exactly efficient setup. A SB Audigy FX (which runs on all +3.3 V with only a charge pump generated negative supply on its amp chips) is a real power miser by comparison, at around 1 W. Of course its analog dynamic range is a good bit smaller, too…

Inspecting power supply components on the D1, I can only spot a single +8 V linear regulator. The corresponding negative supply is provided by a DC/DC buck converter used as an inverter and fed from +12 V, so a more efficient but also more noisy setup there. +12 V also supplies the linear +5 V regulator for the converters, as on the D2.


OS wise, I was using Vista 32-bit first, later Win7 64-bit. Using Uni-Xonar drivers in the first place saved me from encountering real showstoppers like bluescreens, thankfully – but man do those drivers ever have any number of annoying quirks that end up limiting the cards' utility.


As you can see, my relationship with these cards is somewhat tense. Line-level audio performance is really good, but making full use of it in practice may not be possible, and the list of little quirks is near endless. I have, incidentally, stuck with the D1, as the D2 proved even more quirky (which would possibly be resolved with the older drivers I'm using now) and its shield also interferes with the slot bracket retainers in this machine (while you can take it off, this slightly worsens performance).

Mind you, at least these cards are somewhat workable. I still have an ESI Juli@ floating around that I once picked up for a good price, the drivers for that one are plain terrible (like no support for hibernation at all, the card just stops working).

Back to topics

Entry last modified: 2018-12-02 – Entry created: 2018-06-22

Care and Feeding of an Inexpensive Mixer


As it happens, I recently acquired a USB microphone which also sports an XLR output for direct use with a microphone preamplifier. The integrated sound device gets the job done reasonably well but I wasn't entirely happy with it. Turns out one of the better ways of picking up a mic preamp actually is a little mixer, as you'll get a lot of functionality that way while still not breaking the bank. After a bit of research, the used market yielded a Behringer Q1002USB, which gives me not one but two low-noise mic inputs complete with 48V phantom power if needed, plus tone controls, additional line-level inputs, a built-in USB sound chip like the name implies, and more.

Now people have a tendency of saying that cheap mixers are noisy or sound bad. That's not something I can necessarily agree on, as long as you know what you're doing (which is a pretty big if, mind you). Of course they will cut corners, and in this one there is an annoying lack of a power switch (the device draws 10-11 W and gets quite warm even with feet added to aid ventilation), and going by a maximum output level spec of +22 dBu it looks like Behringer used the old resistor trick to get balanced output from an unbalanced circuit (+22 dBu or about 9 Vrms is typical for circuits running on +/-15 V supplies), which means there is a substantial common mode component on the output, not something that every input stage is going to appreciate distortion-wise (TL07x and other similar FET input opamps, I'm looking at you). And no, don't expect precision dial readout (certainly not from the mic pre), and don't be too surprised if a tone control's neutral position isn't dead on center detent (I have to turn the mids down a tiny bit for flattest frequency response). Do not expect tone control and mixer stages to have state-of-the-art dynamic range either (but do expect a very workable amount nonetheless). Neither should you demand pro-grade ruggedness from the various connections, or premium grade parts quality for that matter.

The arguably biggest flaw of gear like this, however, is inadequate documentation. Behringer is one of the worse offenders here. While the manual provides a decent set of specs (some of their newer devices don't even have that), it only explains the various jacks and controls but leaves the user in the dark about how the circuitry plays together, as no block diagram whatsoever is provided. If you have seen a typical mixer block diagram before, it should not be too hard to roughly figure things out, but cheap mixers are often sold to complete neophytes, who will in all likelihood be at a complete loss when it comes to managing dynamic range in a way that yields near-optimum results.

Gain Staging for Dummies

What you need to know is that every stage handling analog signals has two limits to signal strength: Noise intruding at the bottom, and distortion and eventually clipping occurring up top. The range in between is its useful dynamic range. The task of dynamic range management (or "gain staging") in a multi-stage system now is ensuring that the input signal's loudest peaks are not being unduly distorted anywhere, while preferably having input noise or preamp noise dominate the contribution of every following stage if at all possible. Often a compromise will have to be found. You are not going to get the entire dynamic range of a good large diaphragm condenser mic (which can be in excess of 130 dB) through a mixer like this all at once, but you should be able to pick about any slice of about 100-110 dB or so – which realistically speaking is on the limits of or beyond what you could hope to reproduce as-is anyway.

As a side note, it be mentioned that dynamic range is always the difference between signal power and noise power. Available noise power, assuming it's dominated by thermal noise, is exactly the same for any resistor – 4kTB (involving only Boltzmann constant k, the resistor's absolute temperature T and our bandwidth of interest B). Now a circuit designer can distribute signal power across voltage and current – i.e. choose impedances including resistance – as is most convenient, depending on available amplifying devices, their noise properties, their current capabilities, their voltage handling capabilities and available power supply voltages. So you could in theory have the same amount of dynamic range:

The 5 V circuit would then have the smallest signal voltages, amplifier noise voltages and resistor values, and lowest required slew rate at a given bandwidth. It is likely to have high amplifier noise currents in return. The vacuum tube circuit would be just the opposite.

But let's go back to gain staging. A device with multiple stages of varying noise level and gain is a classic application of Mr. Friis. In a voltage matching scenario as commonly used in audio (read: load impedance much higher than (>>) source impedance), formulas are slightly different but analogous.

For each stage, there are two noise power contributions that add randomly at its output:

  1. its own inherent output noise and
  2. noise received by the previous stage and amplified by our stage's power gain.

Now noise power density can be expressed in voltage noise density squared, as both are merely separated by a boring constant factor. Likewise, power gain is voltage gain squared. Hence we can write for the Nth stage:

vn,N▓ = vn,N_0▓ + GN▓ × vn,N-1

If you were to square root the whole thing, you would get a classic RMS addition (root mean square). So if you were ever wondering where that comes from, here it is!

Finally, we define inherent output noise as an equivalent input noise amplified by stage gain:

vn,N_0 = GN × en,N

So using this relation, we arrive at:

vn,N▓ = GN▓ × ( en,N▓ + vn,N-1▓ )

Looks awfully recursive, doesn't it? Following the long trail of recursion, we eventually obtain

vn,N▓ = GN▓ × en,N▓ + (GN × GN-1)▓ × en,N-1▓ + … + (GN × GN-1 × GN-2 × … × G1)▓ × en,1

Often we are interested in equivalent input noise density for the whole cascade, which is

en,eq = vn,N / (GN × GN-1 × GN-2 × … × G1)

We can easily calculate the square of that from the above:

en,eq▓ = en,1▓ + en,2▓ / G1▓ + en,3▓ / (G1 × G2)▓ + … + en,N▓ / (G1 × G2 × … × GN-1)▓

Which – surprise! – looks awfully like what we find in Friis' formula (which deals with SNR and as such power ratios and power gain), particularly the one for noise temperature. Likewise, conclusions to be drawn are similar. If you want input noise to dominate in a system where subsequent stages might be rather noisier than the first, make sure that G1 is big! Likewise, same goes for any of the other gain products, which means that you can still get in trouble if you have a lot of attenuation somewhere. You can probably imagine that going back down to microphone levels somewhere makes noise in this vicinity very critical.

To make matters even more complicated, noise levels aren't set in stone and may depend upon gain setting. A typical microphone preamp circuit is a major offender here. While output noise is highest (and total dynamic range lowest) at highest gain setting, it generally drops more slowly than signal output when dialing back. The specs on the Q1002USB mic input make this very clear. Equivalent input noise is as low as -131 dBu(A) at full gain of +60 dB, giving -71 dBu(A) of output voltage noise, or a dynamic range of 93 dB(A) relative to its maximum +22 dBu output. Dial back the gain to +22 dB, i.e. 38 dB less, and you might na´vely assume dynamic range would have risen by the same 38 dB to 131 dB(A) – however, you get a mere 110 dB(A) instead, so output noise actually has only dropped by 17 dB. You could also say equivalent input noise has increased by 21 dB, and we now are a far cry from the noise floor of a dynamic mic.

The reasons for this are most obvious when your preamp actually consists of two stages internally, and the noise of the first just drops below the one of the second as the gain is being reduced. One less obvious source are the gain-setting resistors in the feedback network. Let's consider a typical opamp circuit. At 60 dB, we might be looking at Rf = 10k, Rg = 10R, which means that their noise contribution is equivalent to Rf || Rg ≈ Rg, which is negligible vs. a 150…600 ohm source impedance. At 21 dB, however, things aren't as rosy any more, since Rf || Rg ≈ 909 ohms, and at 10 dB we're looking at 3.2 kOhms. Which is particularly problematic since hot-rod bipolar inputs geared towards low voltage noise (which is what you would often find in microphone amps) tend to have a good amount of current noise in return, making things even more noisy.

The Behringer Q1002USB and its quirks

Introduction and test setup

So in this particular mixer, the signal travels in a roughly U-shaped fashion, from the inputs on the top left over compressor / EQ / pan, main mixer, main mix fader and output amp, before going back out on the top right. There are three volume controls in the signal channel that need to be set up correctly – preamp gain, channel level, main fader. Make that four if we include headphone level. How is anyone supposed to figure all of this out and determine optimum settings?

In order to be able to test the mixer's performance and the influence of the various stages, I came up with the following – arguably adventurous – contraption:

  1. From my SB Audigy FX, I'm going into the input of a FiiO E11 headphone amplifier using a FiiO L3 (3.5 mm line cable), figuring that an amplifier makes the best attenuator. (Unfortunately, it also generates a fair bit of noise. Eh, good enough.)
  2. For getting into the mixer's mic preamp, I borrowed my speaker cabling, consisting of one stereo 3.5 mm to 2x 1/4" TS, one Behringer HD400 "Hum Destroyer" (line isolator, so no ground loops here), and two 1/4" TRS to male XLR balanced cables.
  3. Then I go back into the card's line in (which accepts about 2 Vrms) by using either
    1. a regular stereo RCA to 3.5 mm cable (from my radio recording days) plugged into the mixer's "2-Track Out", or
    2. a 3.5 mm stereo cable of sufficient length on the headphone output with a trusty 1/4" adapter.
  4. For testing the line-level inputs, I dug out my old speaker cabling with some RCA to 1/4" TS leads and 3.5 mm to RCA adapter that I had retired several years ago. (Don't connect to monitors or other earthed studio gear like that, especially from a PC, it's instant ground loop time. The mixer has a brick-style transformer power supply with no mains earth connection at all and little capacitive coupling, so it's basically floating and as such suited for unbalanced connections. Having a big loop going on from the PC to the mixer and back still isn't ideal, but output impedances on part of both my soundcard and the mixer seem to be small enough that I didn't notice any issues.)

Then I fired up Rightmark Audio Analyzer and started testing, using a whole range of level combinations. (Recordings too low in level to be readily accepted by RMAA were saved and boosted in Audacity before analysis. I really wish the application weren't so stingy with its levels, seems it won't sync below about -10 dBFS. My input's distortion levels aren't exactly measurement grade up top, but it does have some pretty decent dynamic range.) Spoiler: I did find some quirks.

Test results and quirks found

Mix bus / output

Most importantly, it seems like the mix amp has trouble driving the output amp stage when the main mix fader is high up. At high main mix settings, a whole zoo of low-level high-order harmonics start appearing (along with corresponding increased high-frequency IMD), indicating a distressed output stage well into class B territory. Even at the same output level, I generally got better results keeping the main mix down and increasing levels beforehand. It doesn't seem severe enough to cause any real audible issues (the harmonics remain at least 90 dB down), but honestly I don't like the output of a line-level stage looking like my Clip+ driving a low-impedance headphone load.
As to what causes this issue, I can only assume that the output amp is an inverting amplifier with the main mix pot serving as its input resistor. As you may remember, this resistor determines input impedance, and as you increase gain, it becomes smaller and smaller. At +10 dB, it's a mere third of the feedback resistor, at 0 dB it's the same, and at -10 dB it's three times as large. I'm still puzzled as to how they're getting their control range down to beyond -80 dB then, however. Is it a noninverting amplifier with seriously low input impedance after a regular pot to ground after all? Behringer have used all kinds of funky circuits in the past.

So really, you want to keep your main mix slider only as high as necessary, like -10 dB or even below. As the output amp seems quite low in noise, I don't see much of a problem in that, but how do you get some decent level out of this thing? That's where the headphone / control room output comes in. It has a decent amount of gain and doesn't seem to create any undue amount of distortion. (It's also easily loud enough on HD580s and not noisy on Soundmagic E10s.) You can easily use that to recover 6 dB or more (I saw a maximum gain of 11.2 dB over the main out, or 12 dB over the RCA 2ch out). Plan B would be using the FX out, I haven't tried that. Makes measurement a bit hard (it's mono, and RMAA can't deal with that) but should circumvent the main mix issue.

I don't even need to do that. In my setup with a 600 ohm dynamic microphone and around 50 dB of preamp gain, a channel level a hair over 0 dB and main mix at -10 dB, I found that preamp noise floor ends up about 7 dB above (SB Audigy FX) line-in noise floor, or 10 dB when combining both channels. That seems good enough.

Further research showed that a -10 dB main mix setting actually isn't a bad choice, as it pretty much translates mixer internal clipping level to about 2 Vrms on the main out, perfect for the kind of soundcards I have.

After a soundcard upgrade to an Asus Xonar D1 which has a substantially less noisy line-in than the Audigy FX, I found that headphone output noise floor actually exceeds main out noise floor by several dB, and accordingly I can get more dynamic range out of the latter now – so if you've got a fancy consumer soundcard like that, I would advise sticking with the main out after all. The main out (with channel level turned down) only increases line-in noise level by 2-3 dB, so main mix dynamic range at the -10 dB level setting pretty much has to exceed 113 dB, as that is what I got for input dynamic range on the D1.

Channel strip, ch 1/2

For another quirk, I found that you can cause clipping without any visual indication if the signal is quite hot (but still below clipping) when coming out of the tone control/pan section and you turn up the channel level. The input clipping indicator seems to light up about 6 dB below maximum, so more gain than that, and things may become critical. (Makes sense if you think about it.) Prior to clipping, distortion increases but remains rather benign, being mainly 2nd and 3rd harmonic. I'd say leave channel level at around 0 dB, maybe a few dB above if needed.

Pan & EQ

The EQ / pan section seems to have about 3 dB of gain to make up for the 3 dB you lose when the panning control is centered, giving overall unity gain then. This section hence is going to clip before the mic preamp does, so it makes sense for the clipping indicator to be located here as well.

The tone controls seem to work as intended, but both channels 1 and 2 need their mids control turned about a nominal 1 dB to the left (1/3 over to the nearest marking) for maximum frequency response flatness. Channel 2 would also appreciate just a hair more bass but I can't dial in that little before the center detent engages. Even as-is, we are within 0.5 dB from about 50 Hz to 18.5 kHz (or 39 Hz to 18.3 kHz on channel 1), and that includes my funny contraption with line transformer and headphone amp. At lower preamp gains like 20 dB this actually extends to below 30 Hz. At 28 dB, response is within 0.2 dB from 50 Hz to 12 kHz (ch1) or 45 Hz to 13 kHz (ch2).


Moving on to the actual preamps, I will note that gain control on these is very nonlinear (or non-logarithmic, but you know what I mean). Starting at around 10 dB at 7:00, gain reaches 20 dB at 9:15 only to proceed very leisurely from this point on, with ca. 28 dB by the 12:00 position and 31 dB by 1:00, but then the pace accelerates again: 40 dB by 3:00, 49 dB by 4:00, and 61 dB when fully turned up at 5:00. So of the 51 dB gain setting range, 21 dB are crammed into the range from 3:00 to 5:00, and 12 dB from 4:00 to 5:00 alone. That gets pretty touchy and makes it virtually impossible to communicate an accurate level setting to someone else, not to mention level drift related to thermal expansion (letting the mixer warm up seems like a good idea). My channel 2 also seems to have a bit of a dead spot up there that lets the gain jump by a few dB abruptly.

In order to get over the noise floor of following stages, I found that I did not require more than about the 4:00 position (~49 dB) when using a dynamic mic specified at -54 dBV/Pa and employing a 600 ohm capsule, even 3:00 (~40 dB) seemed very much in the ballpark. So I guess even an SM7B should be fine without really having to get into the very touchy area. Noise wise the preamp is quite good. It beats the integrated preamp of my Samson Q2U USB / XLR mic by about 6 dB, and that's quite usable to begin with. The circuit appears to be a variation on ESP P66, as Behringer and others have been using them for at least 20 years or so (no doubt with their usual NJM4580 opamp). It's cheap and gets the job done.

I found a difference in noise floor between shorted and open input of 8.5-9 dB at full gain (or about 8 dB at the 50-ish dB settings I tend to use). This does not actually fit the specs at all, as those would result in a delta of more like 14…18 dB. Even a best-case estimate assuming no current noise at all (which is not realistic) gives no less than about en ≈ 2 nV/√(Hz), and in real life we'd be somewhere in the 2.5…3 nV/√(Hz) vicinity. That would equate to a short-circuit ein of more like -126…-127 dBu, or around -125 dBu on 150 ohms. Still not bad for a device like this (a number of inexpensive audio interfaces are no better or even worse) and still plenty for any condenser mic, but a bit disappointing. Ironically, it pretty much wouldn't matter for a 600 ohm dynamic mic, so it's basically irrelevant to me and a lot of other people, but those SM7B aficionados should expect to be able to wring out up to 4-5 dB less noise with something fancier.

Retesting noise with a different methodology, I found the following:
Shorted input noise level at full mic gain (+60 dB nominal, real estimated +61 dB), channel gain of 0 dB and main mix at +10 dB into a Xonar D1 (0 dBFS = 2.0 Vrms) at full input gain (0 dB) and 48 kHz ends up at -65 dB on Audacity's level meter, which is square wave referred. This gives a nominal input noise level of -126.3 dBu (@ 20 kHz bandwidth), give or take accumulated gain error. That's very close to my previous estimate, and accordingly well short of specs again. Possibly they've had to substitute input transistors for parts with a less low Rbb' at some point, and the copypasta specs were never updated to reflect this, or maybe it's power supply or ground noise creeping in somewhere.

While turning phantom power on or off generates some noises, statically it has no effect on noise floor. This indicates a quiet phantom power source and good resistor matching.

At moderate gains, preamp distortion levels appear to be quite impressively low. At 28 dB which appears to be just about the sweet spot, I was able to coax out a 0.0021% THD+N at 1 kHz, with the strongest harmonic being the 2nd at 100 dB down (channel gain 0 dB, main mix -10 dB, nominal soundcard input gain +0.7 dB, giving -13.8 dB during RMAA level check)… and actually I think that's mainly from the Audigy FX's input. Preamp levels at this point would have been about 11-12 dB below clipping indication, which I think lights up at about +16 dBu.
Raising preamp gain to 37 dB (resulting in levels less than 3 dB from the CLIP indicator coming on) while reducing main mix by the same 9 dB, things are still looking good, though the 2nd harmonic has risen by 10 dB and the 3rd now is only 3 dB behind.

At 49 dB of gain, I was able to get the 2nd and 3rd harmonic about 88 dB down, and a harsh 9.5 / 10.5 kHz two-tone intermodulation test showed no components higher than 78 dB down… otherwise often around -80 dB. That probably is not SOTA by any stretch, but seems plenty workable to me.

At full gain, the -80ish dB level shifts to about -70 dB of 3rd order intermod. Just short of the clipping indicator lighting up, 1 kHz harmonics are mostly 3rd harmonic at 75 dB down, plus some 2nd at 83 dB down, and that's pretty much it. The coupling capacitor in the feedback is also making itself felt, with frequency response being 1 dB down at 60-70 Hz and 3 dB down at 30 Hz (though a very minimal bump of the bass control will shift these to about 45 and 25 Hz, respectively). Hardly spectacular distortion performance (if still not readily audible IMHO), but let's be honest, you won't usually be needing the full gain anyway as outlined above, and if you do, either you can live with so-so distortion performance at peak levels, or maybe a little consumer-level mixer isn't really the right tool for the job.

The good news is, backing up on input levels quickly reduces the intermod as you'd expect (in the mostly linear region, every reduction of input level of x dB reduces Nth order intermod by (N-1)x dB). Just 6 dB less and about 1.5 dB less preamp gain, and I pretty much can't find the 3rd order intermod any more among the noise, it must be more than 83 dB down now (makes sense as you'd expect a 12 dB reduction and then some). So if what you're recording only hits near-maximum levels on some short peaks / transients, as it's often the case, chances are that distortion will be completely negligible when it matters and as such entirely irrelevant.

When retesting with the Xonar D1 (which incidentally is way less noisy than the FiiO E11 output), my previous findings were just about confirmed. Varying source output and input gain for a constant output level, 28 dB was confirmed to be the sweet spot with lowest 3rd order distortion. 25 and 31 are still good, too, with slightly higher 3rd. Really, performance remains quite similar between about 20 and 40 dB. Below, common-mode distortion slowly appears to be taking its toll, and above, the reduction in spare loop gain makes itself felt, as distortion climbs by almost 6 dB between 40 and 50 dB.
At 28 dB, I got 0.0052% of THD at 0.8 dB below clipping indication (-88 dB 2nd, -89 dB 3rd). Hitting the input with 6 dB less and dropping channel gain from 0 to -2 dB gives 0.0027% (-93 dB 2nd, -96 dB 3rd). Giving up another 6 dB at the input with software amplification (similar to previous tests) yielded 0.0018% (-96 dB 2nd, -106 dB 3rd). 2nd order seems to be limited by tone / channel gain amp, 3rd by the preamp. It is pretty clear that the preamp alone could hit lower minimum distortion levels and is being limited by following stages in this region.

High level inputs, ch 3/4

Depending on main mix vs. headphone level juggling, the 102.5 dB dynamic range on a loopback test on the soundcard itself reduces to anywhere between 101.5 and 99.5 dB when run over the mixer (at an input level maybe 2 dB short of clipping), equivalent to an internal dynamic range of anywhere between 102.5 and 108 dB. This seems plenty good enough for home use. The -10 dBV input level setting gives measurably better channel separation than +4 dBu for some reason; the former provides pretty much exactly 12 dB more input gain than the latter. Distortion wise, pretty much the same applies as for 1/2.

Unsurprisingly for an input of modest gain and without any EQ/tone controls, frequency response essentially is as flat as a direct loopback; the lower -0.5 dB point shifts up from about 11 to 17 Hz.

Summing up

In conclusion, as long as you can live with moderate output levels (along with the kind of build quality this modest price point will get you, of course), one of these little mixers really isn't too bad. As a glorified mic preamp run into a consumer-level unbalanced line-in, it does a pretty decent job. I do wish they would address whatever causes the low-level high-order distortion indicating a distressed output stage when turning up the main mix. Maybe they already have, this unit has a date code of 201308 and as such was probably bought in early 2014 or so. And of course I cannot guarantee that it isn't just mine, I'm sure something like a bad solder joint on the main mix opamp's power pins would not be helping matters…

Back to topics

Entry last modified: 2020-02-21 – Entry created: 2018-04-09

My findings on the Samson Q2U USB / XLR microphone

Note: This is not a full review, which you'll find elsewhere (like this one). Just some observations that I haven't seen anywhere else. I will mention that I bought this guy because I wanted to make some decent vocal recordings (e.g. voice-over) without having to turn my living room into an acoustically treated studio space, and it does work pretty well for that. So without further ado…

  1. The volume up/down buttons appear to be sending the respective multimedia keyboard scancodes via the integrated USB HID. In Windows, this controls the volume of whatever is set as the default playback device.
  2. Zero latency monitoring of the mic is turned on by default, but you can also turn it off in the mic's playback device's properties under Levels. (Mac users please refer to the manual.)
  3. I did see this mentioned elsewhere, but will state it again: The foam on this mic stinks! The inside of the basket is particularly bad, the supplied windscreen is so-so and slowly fading. I think this may have originated from the capsule's rubber shock mount, which is also smelly (and finding PAHs in rubber parts makes more sense than in what I guess is polyurethane foam). An unfortunate downside to what otherwise seems like a very solidly-built mic. I ended up using a hairdryer to blow through the mic basket for several minutes, as well as same for the windscreen (it's pretty airtight though), which seems to have helped a fair bit. Doing the same for the internal shock mount does not seem advisable, at least without a good dust filter.
  4. The supplied mic clip feels pretty cheesy but for a reason: Its elasticity helps reducing transferred noise from the mic stand. It does rotate a tad more easily than I'd like though.
  5. The microphone's grip seems to be mostly sonically inert except for a somewhat hollow-sounding area where it widens at the top; this is rather well-controlled when the mic is inside the mic clip, however.
  6. Capsule DC resistance measures out at 628 ohms on my sample, indicating a nominal 600 ohms. This permits a decent sensitivity of -54 dBV/Pa even when using a no-frills capsule employing a plain ferrite rather than the fancier (stronger) neodymium magnet. Not a bad idea when your preamp is, in all likelihood, rather less than ideal in terms of noise.
  7. The integrated audio chip gets the job done but isn't that much to write home about. Headphone audio shows no noise in HD580s (and decent volume) but sounds a bit metallic, and I can get about 86 dB of dynamic range out of the ADC including some low-level birdies that are different for the left and right channels. You can wring up to about 2 dB more out of it when recording in stereo and downmixing to mono in software, which is recommended for mic gain settings of about +10 dB (23) or below. I am already recording at the maximum sample rate of 48 kHz, as I remember 44.1 over USB being a bit troublesome in terms of jitter.
  8. Preamp and input stage noise equals ADC noise at about +6 dB of gain, indicating an analog dynamic range of about 92 dB. Gain settings of down to around 0 dB (5) can be used if higher input level handling is required, anything below that makes little sense as it just clips below full-scale. Maximum gain setting provided is +22 dB, though you shouldn't generally need more than +15…18 dB (43…62) as that is plenty for preamp noise to overcome ADC noise. I estimate overall self noise to be on the order of 30 dB SPL, so maximum supported level would be 120-ish dB SPL. (This should generally be adequate, but if not, could be circumvented by using the XLR output and an external preamp.)
  9. While this mic is often considered the Audio Technica ATR2100's European cousin, the closer you look the more differences become apparent. They are not even quite the same size and have different baskets, the AT employs a volume control wheel rather than the buttons and appears to use a different sound chip (its properties dialog in Windows reveals a mic boost preamp control absent in the Samson), and its rear end in general looks quite different (the Samson has a circular end piece with 3 black screws holding it, in the AT part of its circumference is straight and it's held by two silver screws). Sound is somewhat different, too – the AT sounds somewhat sharper and thinner. I'm not saying that they couldn't still be sharing some parts like the capsule or be made at the same factory, but they seem like two decidedly distinct products.
  10. The frequency response I'm seeing in unscientific testing using USB easily extends to below 100 Hz with maybe a slight bump above that mark, seems to have slightly scooped-out low mids around 300 Hz and then gently rises up to about 3 kHz, staying up there beyond 6 kHz. There seems to be decent enough highs response up to about 13 kHz, assuming you are pointing the mic pretty much directly at the sound source – it gets very directional up there. In other words, overall very similar to what other dynamic vocal mics do, including the ATR2100, though I'd say the highs boost is rather less than 8 dB, maybe 6. (The specified curve is clearly bogus.) It's not the most refined sound but still pretty decent, and a recording of the mic with something played over the speakers actually sounds rather passable.
  11. My preferred configurations for the Q2U are:
    1. windscreen over basket (good pop rejection, mellowest tone)
    2. windscreen over naked capsule (still decent pop rejection, somewhat brighter tone)
  12. The microphone's tone gets substantially mellower when using an external mixer, in this case a Behringer Q1002 USB with a 1.9 kOhm nominal input impedance with its unbalanced input run into a SB Audigy FX (I did verify flatness of frequency response to within a dB). Sounded very bassy to me, not exactly ideal for my voice. I ended up turning the mixer's bass and mids controls down a notch and the highs up a notch in return. The noise advantage of this setup appears to be about 6 dB or better.

Back to topics

Entry last modified: 2018-04-08 – Entry created: 2018-04-01

Signal and Noise in Microphones

I have been going down the microphone rabbit hole recently. Mic technology is quite interesting. Now as you may have gathered elsewhere on this very page, there are relatively few topics yours truly enjoys discussing more than signal and noise, so let's combine the two.

As you may know, there are primarily three types of microphone in use today: Condenser including electret, dynamic, and the more exotic ribbon mics.

Dynamic Microphones


Dynamic microphones are the kind of technology that you are most likely to be familiar with, as their transducers basically are little wideband speakers. About 1" (25 mm) is a typical capsule size. Now those into their speakers might ask, how the hell are they getting anything even resembling bass out of these tiny things (even a modest 100 Hz)? As always, the answer lies in the usual tradeoff between sensitivity in the passband and low-frequency response – in other words, they can only ever be very inefficient.

As such, it should be no surprise that despite nominal impedances between 150 and 600 ohms, sensitivity typically ranges anywhere between -59 and -48 dBV / 1 Pa (only at the very budget end does one occasionally see something like -70). At 200 ohms and -54 dBV/Pa, that's a whopping 20 nW (nanowatts) of available power at 94 dB SPL, and it doesn't really get more than about 3 dB better than that! Conversely, dynamic mics can typically handle extremely high levels, it is not unusual to see specs of 145+ dB even on budget mics. As they are all passive to boot, they can usually take quite a beating – quite literally so, as the odd SM58 has even had to make for a makeshift hammer in lieu in anything better and still kept on trucking.

So if they're so insensitive, why don't they just make them bigger? The bigger the capsule, the more directional its response is going to be in the highs. Getting more directivity is easy (just use multiple capsules or mics if in doubt), getting less isn't. So 1" of diameter was found to be a good compromise.

A Look at Noise

So what does all of this mean for inherent noise levels? Any resistor, and the wire of a voice coil is no exception, predictably generates thermal (Johnson) noise whose power is a function only of temperature, with a voltage and current relationship given by resistance. Here's voltage noise density:

en = √(4 kB T R) (≈ √(1.63E-20 R) at room temperature of 295 K)

At a given bandwidth, this gives us an output voltage noise of

Vn = en × √(BW)

In audio, we generally assume BW = 20 kHz, so √(BW) ≈ 141 √(Hz), which in turn means

Vn ≈ √(3.26×10-16 R) at room temperature of 295 K

Seems easy enough, right? For R from 150 to 600 ohms, this means anywhere from 0.22 to 0.44 ÁV. (If in doubt you can also use the handy-dandy opamp noise calculator, putting in Rf = R, Rg = something very big, while leaving everything else at zero.)

This makes it easy to calculate a signal-to-noise ratio for any given sound pressure level, and also give the acoustic equivalent of the noise floor, which is a common spec in microphones. This is because our sensitivity spec allows translating directly from dB SPL (as it is given at 1 Pa = 94 dB SPL) to dBV = dB referred to 1 V. It's like a slide rule labeled dB SPL on one side and dBV on the other (but with the same grid size), and the sensitivity spec is used to line up e.g. -54 dBV with +94 dB SPL.

SNR1Pa [dB] = 94 dB SPL - SPLn,eq [dB SPL] = Sensmic [dBV] - 20log10(Vn/1V) dBV

(Yes, dBV minus dBV is dB. In the non-logarithmic world, you are dividing two voltages, and the result is a pure ratio.)

This is easily solved for SPLn,eq:

SPLn,eq [dB SPL] = 20log10(Vn/1V) dBV - Sensmic [dBV] + 94 dB SPL

Or the same, just defining a short-hand for the first term:

SPLn,eq [dB SPL] = [Vn]dBV - Sensmic [dBV] + 94 dB SPL

Which doesn't exactly look mathematically rigorous until you consider what happens in the non-logarithmic world – you are dividing two voltages and multiplying their ratio by a pressure, so the units are OK.

Let's plug in our example microphone with -54 dBV/Pa and 200 ohms:

SPLn,eq [dB SPL] = [0.26 ÁV]dBV - (-54) dBV + 94 dB SPL ≈ +16.2 dB SPL

In plain German, there is no way in hell this microphone could ever have less than 16 dB SPL of self noise, and that's assuming it being plugged into a perfectly noiseless amplifier! (Last time I checked, perfectly noiseless amplifiers were sort of rare.) Now 16 dB SPL isn't terrible by any means and would be a plenty useful spec for a general purpose mic, but if you consider that some large diaphragm condenser mics with 1" capsules boast anywhere from 3-5 dB(A) SPL with electronics included (and they can't go much lower until being limited by air molecules bumping into the membrane), it's hardly spectacular either. And that's actually a decently efficient mic to begin with. A 600 ohm mic of same sensitivity couldn't get below 21 dB. Add a typical entry-level recording interface (-120 dBu = 0.775 ÁV noise spec), and we're at 27 dB SPL.

How to amplify

So, how hard is it to make a good, low-noise amplifier for one of these? Turns out, kind of but not extremely. We are talking anywhere from 1.5 to 3-ish nV/√(Hz) of self-noise (voltage noise part) from a 150-600 ohm source impedance, and nominal input impedance can be as low as 1 kOhm. Granted, a decent mic is usually going to be wired up balanced, meaning you need a differential input and incur a 3 dB noise penalty, but still, getting into the 1 nV/√(Hz) or ideally even 0.5 nV/√(Hz) vicinity still is quite feasible. Nothing that two parallel pairs of 2N4403s @1 mA-ish replacing the input pair of an NE5534 should be particularly fussed by. Yes, you want to keep feedback resistance decently low (a tradeoff between minimum gain and driving abilities) and use 0.1% / matched resistors and keep common-mode input impedance high for good common-mode rejection, but that's the usual details. You can have a lot more fun trying to accomodate MC phono cartridges (at roughly 20 ohms). That still doesn't keep real-life mic inputs from underperforming for all kinds of reasons, of course (budget constraints, design goofs, …).

While 1 kOhm tends to be a standard input impedance, the non-constant nature of dynamic driver impedance (same story as in headphones) means that the odd type will benefit from differing values. Too little high and low end? Go higher. Too much? Go lower. The magnitude of the effect will depend upon how high and how variable impedance actually is, but it seems well worth investigating. With some types of mic this is well-documented, e.g. the Shure SM7B.

One not particularly well-documented trait of typical instrumentation amplifier based circuits with variable gain is that their noise performance can be rather less than ideal when gain is turned down.
Let's say we want up to 60 dB of gain and a minimum of 20 dB for our 200 ohm mic. Then we might use 2x 5k1 feedback resistors and a pot with a minimum 3 ohms plus a 6.8 ohm series resistor in the "ground" leg connecting the inverting inputs.
For 40 dB, the pot would have to be turned up to 100 ohms – at this point it may already contribute more noise than the input transistors (assuming e.g. 2x 2 pairs of 2N4403 with Rbb' of 40-ish ohms). For 20 dB, we need 1.1 kOhm, making the feedback network contribute about as much noise as a 1 kOhm resistor, decidedly more than the mic. At this point, effective input noise has gotten over 6 dB worse than at full gain – gain has reduced by 40 dB, but noise by 33 dB only (-71 dBV to -104 dBV).
So let's assume the next stage is an ADC that can take maybe 5Vpp (+5 dBV). Clearly the 60 dB setting is way overkill, as remaining dynamic range is only 76 dB – these days I would expect 20 dB more even in a consumer device, and 30 dB more in a prosumer one, so we are way above ADC noise floor. (There may be a benefit to CMRR, however.) Even at 40 dB, which gets calculated noise floor to -89 dBV, the prosumer device would still be well in the clear. A Focusrite Saffire 2i2 maxes out at 50 dB, sounds quite reasonable then.
Now if the preamp were to feed a balanced line input accepting +22 dBu (+20 dBV), it's a different story. Then, 60/40/20 dB gain would give us 91, 109 and 124 dB of dynamic range, respectively – that's getting quite demanding from 40 dB down. Some dedicated mic preamps throw in a maximum of 66 dB for good measure, which doesn't sound too outlandish in this scenario at all.

Condenser Microphones

When it comes to absolute noise levels, there is a clear winner: Condensers. A good condenser will exhibit a noise level about equivalent to a dynamic capsule of twice the diameter, making small-diaphragm (e.g. 0.5") condensers popular general purpose mics. Being an electrostatic kind of device, they could in theory go down to a frequency of zero, but in practice the input of the buffer JFET needs to be biased somehow, and the capsule behaves like a capacitor, so its source impedance steadily rises towards low frequencies, eventually making for a highpass characteristic. The smaller the capsule, the more critical this becomes as capacitance declines. Little electret capsules tend to use biasing diodes with an effective resistance in the gigaohm range. Yes you read that right!

It should be clear from the above that noise would be expected to decline from low to high frequencies – which tends to give a rather unobtrusive characteristic (reflected in A-weighted numbers coming in a fair bit lower than unweighted) but also means that if you are after recording things that are exclusively low in frequency, the ranking of various mic types isn't so clear-cut and best SNR may be obtained using an exotic setup (e.g. using a woofer and matching preamp, perhaps with a step-up transformer Ó la ribbon mic).

On the high end, source impedance continues to decline but ultimately the buffer JFET's wideband noise is going to dominate. You clearly can't use just any old FET there, it has to be a low-noise type, of which there aren't too many left at this point… BF862 (maybe BF861x) for a cheapie, LSK170 for something more expensive. Don't bother with 2SK170s any more, these days you'll generally get genuine fakes of altogether unspectacular performance. The FET is generally used as a buffer because this way its substantial input impedance is bootstrapped, which would otherwise attenuate the signal and worsen linearity. The input buffer stage is generally followed up by an output buffer (often using bipolar transistors) for robust load driving.

Back to topics

Entry last modified: 2018-03-30 – Entry created: 2018-03-26

Grounding: Perils of Shared Returns, a.k.a. De-Hissing a Sansui AU-5900

Once upon a time, there was a Sansui AU-5900 integrated amplifier. Said amplifier had seen better days, it was close to 4 decades old after all, but some efforts had been undertaken to restore it to its former glory and had generally proven successful. Yet, its owner still wasn't a happy bunny – it was quite unusually hissy, the preamp section to be precise. Worse yet, it seemed that this may actually be normal for at least some models from this manufacturer and time. There might never have been a solution had the owner not experimented a bit and borrowed the preamp supply voltage from another, lesser amplifier model – upon which the hiss promptly vanished.

Now this peculiar development piqued the curiosity of a brave knight… err… well, the writer of these lines at least. A glance at the schematics of both units revealed that the supply voltage in the lesser one would be expected to be considerably less noisy. The preamp section in the AU-5900, it seemed, had all the power supply rejection of the princess on a pea. Our assistant in such matters, named LTspice and a simulator by trade, was called upon to investigate the matter, and sure enough, performance of the stock circuit turned out to be rather unexciting in this respect. Thankfully it seemed that providing a modicum of additional local power supply filtering for the input biasing in the pre/tone amp plus quietening down the voltage regulator with some RC filtering of its zener would improve the situation substantially. So far, so textbook.

This is where things took a bit of a strange turn. The modification was only partly successful, with hiss levels being reduced at minimum volume (so far, so good) but increasing even beyond the original levels when cranked up. What the…?! Then the author faintly remembered something he had read years ago, that it was possible to pollute signal ground with power supply noise – maybe our additional filtering was doing just that.
Accordingly the grounding scheme was inspected, which thankfully had been faithfully documented in the schematic – and what do you know, there's a shared signal and power return (ewww) that runs all the way from the pre/tone amp PCB input over volume PCB and mode switch PCB back to central star ground. IOW, the grounding on those three boards (including some rather sensitive, low-level areas in the signal path) is a bus of decidedly nonzero resistance, not a star, and nobody bothered to include a dedicated power ground because the stock circuit did not explicitly require one. Now our additional power filtering provided a relatively low-impedance connection, allowing a non-negligible part of power supply AC components to appear over this lengthy shared return.

Measures taken at this point were:

Lo and behold, noise finally was down significantly at all volumes, and with the case finally forming a proper Faraday cage when closed, a certain amount of hum and general "touchiness" of chassis and boards disappeared as well.

Lessons learned: Layouts with shared signal and power ground returns are a great way of screwing up PSRR. Do not blindly rely on high-PSRR circuitry, low-noise power supplies may still be useful. Star grounding rules (as expected).

This episode got the author wondering whether the same kind of issue might be limiting preamp noise levels on his trusty Onkyo TX-SV636 receiver, rather than the good ol' NJM4558 opamp as previously suspected – the volume/preamp circuitry with some supply bypassing is on a separate board with, you guessed it, a shared ground return. The unit is by no means excessively hissy when compared to some other turkeys, but still it is quite detectable over speakers…

Back to topics

Entry last modified: 2016-11-21 – Entry created: 2016-11-18

The Headcrophone Preamplifier

The what?

No worries, this is actually much less obscure that it would seem. It's something I've been thinking about for a while. I am certain that many people have tried headphones as (dynamic) microphones – and found that while it basically works (better if you've got higher-impedance cans with larger drivers and higher sensitivity, and better open than closed), it sounds pretty crappy, most of all quite muffled.

So why is that?

Well, headphones tend to be optimized to be sounding their best from source impedances ranging from pretty much zero to about 120 ohms tops, depending on model. In microphone use, that would mean they'd like to see an input impedance in that range. Now consumer microphone inputs tend to range around a kOhm or two, maybe even higher. Headphones with a rather non-constant impedance response like the typical big bass resonance would sound rather muffled when driven from a kOhm or two. Now a dynamic mic with an element of 40-50 mm diameter (rather than the more standard 25 mm / 1") would have some interesting properties at the very least (higher sensitivity, more directional) and may well be worth having. So what does one do?

What you need is the counterpart of a voltage output – turns out that's a current input. Should be pretty low in voltage noise, too, as source impedances would be expected to range between about 32 and 600 ohms.

I first looked at the trusty common base amplifier, like the Hiraga MC prepre. That one should work alright, actually. But manual offset adjustment and fancy power supply filtering? Nah, not my cuppa. And it's not like noise would actually benefit over a common emitter circuit.

Then my attention came to the common emitter amplifier with voltage feedback. This is the simplest version of what's called a transimpedance amplifier – current in, voltage out. It turns out that those are commonly used for photodiode receivers, and their quirks are well-documented (see e.g. Pease). Brilliant!

Headphones as a source actually pose similar problems as a photodiode. They're an R-L in parallel with cable capacitance of up to 1 nF. So that will need some sorting out. Thankfully you can also use the same capacitance load isolation techniques commonly applied on amplifier outputs – Zobel network and series inductor (R||L). So we'll get back to this later.

What about noise levels? Well, if you're picky about performance towards the 32 ohm end of things, there's no way around something with a discrete input stage consisting of multiple paralleled medium-ish power transistors, like BC337, or single somewhat bigger ones (old-fashioned audio power transistors with not-too-high breakdown voltage should work well for this, they tend to have highish beta at moderate currents). Otherwise, an opamp of the very lowest voltage noise levels available (~0.9 nV/√(Hz)) by itself would also be OK. More than OK, in fact – most (unbalanced) mic inputs aren't anywhere close. If you're strapped for cash, 3 nV/√(Hz) in the inexpensive NJM2068 would still be quite adequate.

Unbalanced? Yup. Headphone channels share a common ground return, so no way around that. Granted, you could rewire them and use a balanced mic amp (in fact this is well worth a try if you already have a pair like that, should only take some male/female XLR adaptation and may be the one time where this balanced wiring stuff actually makes some sense), but let's not spill the baby with the bathwater now, shall we? On the downside, we may be picking up some interference, and practice will have to show how much of an issue that is. It goes without saying that the same rules for grounding apply as in any other piece of audio equipment. Just treat the input like any bog standard headphone output.

So how much gain – or rather, transimpedance – should we be shooting for?

- work in progress -

Back to topics

Entry last modified: 2015-07-20 – Entry created: 2015-07-20

Opamp Class A biasing 101

What is it?

Opamp Class A biasing intends to eliminate crossover distortion in an opamp's output stage, which may be a dominant contributor to nonlinear distortion depending on output loading and opamp type. This is accomplished by sourcing enough current from the opamp output (or sinking current into it) for one half of the typical push-pull output stage to be essentially shut down, turning the output into a purely single-ended affair. Current would be chosen such that it always exceeds maximum load current.

Typically one would employ either a resistor or a constant-current source of some description going to one of the supply rails. Usually there is no reason to go overboard with current source complexity.

The effect of SE Class A biasing is twofold: First it eliminates crossover distortion, second it reduces current peaks on the supply rails which can degrade high-frequency linearity in particular (the issue requires a fair bit of attention in Class AB speaker power amplifiers). While current draw is not actually constant like it would be in a single-supply SE Class A circuit (as output current is returned to ground and as such diverted from the current going from positive to negative rail), there are no high-frequency switching components.

The probability of things becoming unstable is rather low, as all the "heavy lifting" would already have been done by the opamp manufacturer – who would want their parts to go unstable under load after all? Besides, things primarily tend to go awry at low (rather than high) current levels, since the output stage usually is the slowest part to begin with.

What are potential drawbacks?

  1. Whether best to source or sink current, and how much, tends to depend on opamp type and internal construction. Close study of the parts to be used is required (datasheet, equivalent schematic and/or practical experimentation). With a complementary bipolar output stage, one would typically tend to have the NPN part operating (which is usually faster and more robust).
  2. Maximum current output is reduced since the active side now has to provide bias current in addition to load current. If you insist the output be purely SE Class A, it tends to be even tighter – maximum peak load current should then not exceed bias current.
  3. The extra current passing through the opamp from one rail to the output also generates additional heat that has to be taken into account in order to avoid undue stress. Power dissipation for the typical 14-pin packages in quad types tends to be only marginally better than for their 8-pin dual and single colleagues, so the more amps per package, the more critical this is. I would not want a DIP-8 package to dissipate more than about 500 mW in idle.
  4. The extra current obviously has to be coming from somewhere, too. In a device that uses a whole bunch of opamps (like a mixer, crossover, equalizer or whatnot), the power supply may be decidedly less than happy if you decide to Class A bias all of 'em. Not to forget the effect on temperatures inside.
  5. It is not a particularly efficient method. Cranking up output stage quiescent current by the same amount would buy you twice as much output current if it were possible (assuming additional heating is not the bottleneck, which would also be doubling). I am not aware of any opamp types capable of this.

Picking parts

Suitable opamps tend to be types of generous current output capability but low output stage quiescent current, as evidenced by low total amplifier current draw given its speed. Frontend performance should obviously be good enough to warrant such tweaking measures.

The total antithesis of a good part for Class A biasing would have to be something like the LF356. This '70s-vintage part already runs its output stage at healthy current levels, as evidenced by 5 mA for a single, and while maximum current output is good for its age, it's nothing much worth writing home about these days. Common-mode and transfer linearity do not feel like knocking anyone's socks off either.

TL07x or 4558 types would be moderately well-suited, within the limits of their modest current capabilities anyway. Same goes for LM833.

It gets interesting when maximum current output is high and modest output stage linearity was made up for by GBW. This is often indicated by dominant odd-order distortion under load, at least in modern parts. Let's look at a few examples:

While no-one in the right mind would seriously be using LM358s and their quad relatives LM324 for audio (they are among the noisiest and slowest opamps money can buy after all), it may be interesting to know that their capabilities of driving loads at low(ish) distortion much improve when some current is drawn out of their output. The output stage is an awful Class B affair that you don't want to be transitioning between sourcing and sinking, so SE Class A it is. Stock bias level is only 50 ÁA, a bit low for most audio applications (that's only about 0.35 Vrms into 10 kOhms). A 10 kOhm resistor to the negative rail tends to make a considerable upgrade (that's 1.2 mA of bias on +/-12 V) and is cheap. Sinking current is not an option, as the part's current sinking capabilities are quite modest.

The trusty MC33178 (and its quad version MC33179) is a reasonably powerful part (up to 80 mA source, 100 mA sink) with usable GBW and slew rate specs (5 MHz, 2 V/Ás) that runs at a puny 420 ÁA per amplifier. It is particularly recommended for telephony applications, and indeed, a unity-gain follower driving 20 kHz at 2 Vpp into 600 ohms at 0.024% THD sounds hardly awe-inspiring. The npn-only AB output stage isn't too bad, but its symmetry is inherently limited, and it would have to be running at very small quiescent current. Performance should much improve with a few mA worth of Class A bias. The emitter follower on the sourcing side seems more trustworthy than the common emitter circuit on the sinking side, as it would always keep compensation capacitance well away from the outside world and seems to have slightly lower output impedance as well.

The MC33078 is a more "normal" '80s low-noise opamp type available from either On Semi or STMicro, or TI (whose version appears to be a fair bit different from the other two if typical performance graphs are anything to go by, sporting higher output currents for one thing). Samuel Groner's measurements of the TI version showed a part with promising input characteristics (common-mode distortion is very well-behaved for a cheapie, even if input impedance distortion requires some more attention), but output loading immunity at higher gains was found to be sorely lacking (with output stage effects becoming visible at +20 dBu even with a 10 kOhm load), seemingly due to very low quiescent current in the npn-only AB output stage. While not a super-powerful part, it's OK for what it is (better than a TL07x at least) and should allow for a few mA worth of Class A bias. Reportedly both sourcing and sinking work well, though sourcing should have the edge for linearity assuming current does not exceed ~18 mA (~13 mA for On Semi part) – which it usually doesn't anyway.

Tbc - LM6172, LM4562

Back to topics

Entry last modified: 2015-04-20 – Entry created: 2015-04-12

Jellybean Audio Opamps: Output Loading Immunity and Other Characteristics


I've been looking at Samuel Groner's set of comprehensive audio opamp measurements for years and still find new things to learn from them. I wish opamp manufacturers would publish "measurement pr0n" like that.

I believe that truly glaring problems in audio circuits with opamps (assuming that they are basically stable and operate well within common-mode limits, two reasonably big ifs) are mostly related to either output loading or input impedance nonlinearity, followed by common-mode distortion.

So let's look at a few jellybean favorites and their characteristics, shall we?


Recommended applications

Single / dual / quad. Moderate to high levels, moderate gain, inverting (or noninverting with carefully balanced impedances or common-mode bootstrapping), with capacitor across feedback R to offset input capacitance. Best performance at high levels may require output loading no lower than 20k. Alternatively, parts can literally be stacked on top of each other to parallel them. Fairly frugal on idle current (1.4 mA each). Not picky with rail decoupling.

Input characteristics

Output characteristics

Other related parts

The TLE207x series is a somewhat better-performing replacement at still-moderate cost. Their output stage is capable of higher current and seems to run at marginally higher quiescent current (and generate less crossover distortion by itself) as well. Recommended minimum load impedance at +20 dBu: 8k2. While about 3 times as fast as the original TL07x series in bandwidth and slew rate, these never got even close in popularity. Maybe they were a bit too fast for common layouts?

Another "enhanced replacement", the AD711/712/713 series, should have slightly higher output stage current to work with but still doesn't make a current driving champ according to its datasheet. A bit more noise. Again, beware of phase reversal.


Recommended applications

Single only. Moderate to highish levels (doesn't work quite as well as TL07x at very high levels, possible balance issues?), can drive loads substantially lower impedance than TL07x (2-3 kOhm even at +20 dBu level), including capacitive. As such noninverting operation becomes more attractive, but then input capacitance may need addressing (impedance matching, common-mode bootstrapping).

General discussion

At first glance, a 1970s-vintage JFET input oldie similar to TL071, available in a single package only. Basic linearity is rather worse, but as a look at idle current consumption (5 mA) may already indicate, load driving is much better behaved (which according to the datasheet includes capacitive loads). Into 600 ohms, output stage distortion appears from about +7 dBu up (12 dB higher than in the trusty TI part), and while it still fails to hit +20 dBu, it does get close at about +19 dBu, whereupon it appears to be running into current limiting. Extrapolation yields a recommended output load of 2.7 kOhms at +20 dBu, though it still seems to be quite happy driving 2k2 at this level, thanks to a bit of internal distortion cancellation I guess. I'll speculate that they never bothered to release a dual because they thought it too hot-running – running a 5532 in DIP close to +/-22 V already seems to be pushing things, and that's at 8 mA vs. the 10 mA this would have consumed.



A bipolar input part that appeared in the late 1970s, remained popular in consumer electronics throughout the '90s and no doubt graced a multitude of PC speaker systems in the 2000s, possibly still to this day.

Recommended applications

Dual (quad: NJM2058). Moderate levels, moderate gains, highish impedances, inverting or noninverting. Little more powerful than TL07x. Primarily of historical interest. Its more modern relatives are generally a better choice unless the last bit of idle current draw is an issue, you need very high impedances (NJM4558 typical input bias current is as low as 25 nA) or the layout is really lousy - they're not very picky with rail decoupling.

General discussion

The various 4558s were the first opamps you could call "audio opamps" in the late 1970s. They replaced the 1458 family, essentially dual ÁA741s, the first unity-gain-compensated type and quite slow (and noisy) by modern standards. Not sure which one was first, maybe the Raytheon part which seems to date from 1976. (Note that the RC4558 appears to have been redesigned at some point – the original part drew 3.3 mA, while the modern-day version needs 2.5 mA.) Typically you'd get a GBW of 2.5-3 MHz and a slew rate of 1 V/Ás, still fairly pedestrian by modern standards but suitable even for sloppy layouts. Input bias currents tend to be quite low (with few exceptions like the Philips part), voltage noise is on the order of 8-12 nV/√Hz, and the output stages generally are on the wimpy side and little better than the TL07x in terms of current capability, so they are more at home with higher impedances and should work quite well there. Going by current consumption, the Philips NE4558 and JRC NJM4558 parts should have the least crossover distortion, followed by NEC ÁPC4558 and Rohm BA4558.
The architecture itself is quite straightforward, presumably enabled only by improving semiconductor manufacturing of the day (ÁA741 is more complex). You get a pnp input stage with current mirror, buffered VAS, and complementary push-pull output stage.

4558 extended family

If you need something to work with highish impedances nowadays, you'll probably want to come up with something remotely resembling a half-decent layout and use one of the faster and more powerful enhanced versions (with admittedly slightly higher current consumption) instead. NJM/BA4560 (quad: NJM2060), BA15218, NJM4565, stuff like that. Then there still is the beefy NJM4556A, developed for headphone driving applications. (One of the few applications where the antiquated SIP package with its higher power dissipation still holds some kind of advantage. The NJM4556AL is one of the few good audio opamps left in this package, next to NJM4565L, NJM4580L, NJM5532L and NJM2068L.)

Versions with lower input voltage noise (but also higher bias current and input current noise density) for lower-impedance applications have also been developed – NJM2043 (with lower voltage noise than NE5534A and NJM2068 even), NJM4562 (decompensated for gains of at least 10), ÁPC4570, NJM4580 (note comparatively high output current and low minimum supply voltage), and BA4580 (which is not terribly great when compared to the JRC part, but the folks at Yamaha like to use in on 5-6 V in their keyboards, and there is a quad version available in the BA4584FV). Finally, the LM833 derives from the same architecture, as does the NJM2068 (which employs second-order compensation).


Recommended applications

Dual. Quite universally applicable in circuits with lowish to moderately high (>10 kOhm) impedance, inverting or noninverting. Will drive loads down to 600 ohms even at high levels, will do halfway decently driving headphones of the mid-high impedance persuasion if you insist. Max supply as high as ±22 V but heatsinking much recommended above ±18…20 V. Rail decoupling should be decent at least. While precise impedance matching is not really required, input bias currents of 300-500 nA need to be taken into account.

Original Signetics / Philips part discontinued after factory fire in 2003, only second-sourced now – and they're not all behaving quite the same. Some manufacturers' parts (e.g. TI, which perhaps not so accidentally also are the cheapest ones you can get) can have substantial issues with high-frequency common-mode nonlinearity, limiting their performance in noninverting applications with low to unity gain, but may be somewhat less picky with rail decoupling in return (the original Signetics / Philips part had a reputation for developing some sort of internal oscillation that degraded performance if rail decoupling was inadequate).

General discussion

Arguably the audio opamp, period, and for good reason. Transfer linearity is good, and linearity when used as a follower rather better than in the above two, even in the second-sourced parts which can be a fair bit worse than the original Signetics / Philips ones in terms of common-mode distortion (at least the TI ones are).

Input characteristics

Output characteristics

Output loading immunity is in the LF356 ballpark, with seemingly somewhat less idle current but also somewhat less distortion once the output stage goes into AB operation. (Presumably nested feedback keeps distortion at bay here.) The beefier output stage will also drive +20 dBu into 600 ohms easily, though if you want to keep things in Class A all the way, better don't go below 2k2 at this level.

While compensation across the output stage (one of the secrets of its good performance) is kept away from the output by some resistance, there still remains some potential for quirkiness.

NJM2114 – a relative

JRC's NJM2114 arguably is the souped-up low-noise version of this one (nominal 3.3 nV/v(Hz) and 0.4 pA/v(Hz) at 1 kHz, though how that latter is supposed to work when input bias current is 500 nA typ – that's 0.57 pA/v(Hz) of pure shot noise right there – is beyond me). It never was too popular, maybe because it requires some extra attention and needs almost twice the input bias current (high-impedance circuitry need not apply). It does beat JRC's own 5532 in terms of distortion, not sure about other 5532s though. This part surfaced on some soundcards in the 2000s. It has apparently been discontinued recently.


The older single companion to the ubiquitous NE5532 (it debuted in about 1978 as TDA1034) features even lower noise. In fact, its voltage-current noise product (especially in A grade parts) remains hard to beat to this day, which makes it worth using in spite of higher cost, higher input bias current (500 nA) and the need for external compensation if unity gain stability is required. Use of medium-high source impedances is further aided by well-behaved input impedance distortion. Output loading immunity is generally similar to NE5532 except for some thermal feedback issues. Common-mode distortion is, unfortunately, similar as well but somewhat better still. (It may be possible to tweak input stage balance via the compensation capacitor.)
This part is quite tweakable: External balance pins make it easy to substitute the input pair for your own if need be (disable inputs by connecting to negative rail and tie in at pins 1+8). You can also play with output stage bias levels a bit more than it standard parts due to the compensation pin, feeding current into pin 5 (with some isolation resistance) and pulling it out of 6. Lastly you can also implement something more elaborate than a single compensation capacitor for some 2nd-order compensation.



A.k.a. "The Great Unknown". Strictly speaking, it's not that unknown, though I do wish more comprehensive measurements were available for this ubiquitous part that has graced e.g. Yamaha amplifiers since the early '90s and is one of the few good parts that you can get in the now-antiquated SIP package. Architecture wise, this is a 4558-derived bipolar part employing second-order compensation. Meanwhile let's see what NwAvguy's measurements, Sijosae's output level tests and the datasheet tell us:

Input characteristics

Output characteristics

Maximum current output is close to NE5532 territory, but internal output impedance seems to be a fair bit higher, so practical output into loads of several hundred ohms to 1-2 kOhms turns out to be lower. At only 2.5 mA per amplifier, you wouldn't expect miracles in terms of load immunity either.

NwAvGuy's measurements show both effects – note how maximum output swing is reduced at 7X gain (load ~1k3) vs. 2.5X gain (load ~2k0), and how high-frequency distortion becomes visible at 7X (with both higher gain and heavier loading working against the opamp here). Maximum output swing at 7X gain also sees NE5532 (beefier output stage) and OPA2134 (can swing closer to the rails, slightly beefier) pull ahead. I bet the '2068 still eats LM833 and MC33078 for lunch though.

If you want to make the most of the low voltage noise levels of this part, a buffer of some kind should be employed. Otherwise output loading should be kept north of 2 kOhms.


A part presumably designed for headphone outputs, or at least the oldest devices using them that I know of were CD players from about 1984/85. As a result, it has more "oomph" than any other cheap opamp by a significant margin, while keeping a moderately low current draw (4 mA per amplifier). It also tends to be rather well-behaved in practice, being able to drive capacitive loads directly and not fussing too much about layout. On the flipside, it doesn't have particularly low noise, super fast slew rate, super high gain-bandwidth or anything (8 nV/√(Hz) nominal and probably more like 12 real, 3 V/Ás nominal and ca. 3.6 real, 8 MHz), but that isn't really needed in typical applications either.


A part positioned against the NE5532 at the time, though with less complex circuitry (basically a souped-up 4558 with some distortion cancellation trickery in the VAS). It fares better in terms of voltage noise (4.5 nV/√(Hz)), and common-mode distortion may still beat a TI '5532 (apparently performance has been tweaked for unity or low noninverting gain, a common usage scenario), but as the relatively modest idle current may already indicate, output loading immunity is only average, and current limiting kicks in at about +18 dBu into 600 ohms (it'll get to about +4 V into 200 ohms, the negative side is about twice as powerful). Output loading at +20 dBu is best kept no lower than 3k9 or so. Also mind input impedance nonlinearity (better than typical FET input parts but not nearly a match for a 5532 and several other good bipolars), as well as significant input bias current (500 nA typ).

Note that TI now sells two LM833 variations, one being the original NatSemi part (called "LM833-N", LM833N in DIP), the other their take on the MC33078 as discussed below (LM833P in DIP).

MC33078 (TI)

Slightly less voltage and current noise when compared to the NE5532 (4.5 nV/√(Hz), 0.5 pA/√(Hz)) make this one quite promising, but the modest current draw already indicates that it won't be a load driving champ. And sure enough, output stage quiescent current seems to be good for a negative record, and the output stage also contributes a lot of distortion once in AB (a look at the schematic of the original OnSemi / Motorola part unsurprisingly reveals a quasicomp output stage topology of the kind that works quite well in Class A but is awful in AB). Recommended output load for +20 dBu: No lower than 22k.
Maybe the line of thinking was that low-noise opamps were best kept cool in order to avoid degrading noise by self-heating. Actual current capability appears to be quite good at up to +/-40 mA, so Class A bias may be worth a shot (not sure which side – it can sink more current than it can source, but seemingly at higher series resistance, so drawing current out may prove to work better). You could also add external buffers.

Input impedance nonlinearity is comparable to LM833, while input bias current is more reasonable (250 nA vs. 500 nA, 5532: 200-300 nA). Common-mode linearity is a bit better than the LM833 as well, and thus actually significantly better than TI's NE5532 at high frequencies. So overall, decent input stage, lousy output stage.

STMicro also offer their MC33078/33079 as TS522/524 (plus a single TS521), or vice versa for that matter. Not sure how well these correspond to the TI parts measured, as Douglas Self's results (using either STMicro or OnSemi parts) look a fair bit different. The TI parts do seem to have the lowest open-loop output impedance and highest current capability of the bunch, and their phase and gain margin curves are markedly different from what's given in the OnSemi datasheets. Typical input bias current is a bit higher as well (250 nA vs. 300 nA), while slightly higher voltage and lower current noise is showing up in the graphs. In return, the STMicro part seems to be usable down to voltages as low as 3 V or so (like its TS522 cousin which is spec'd down to ±2.5 V) where the On Semi one apparently drops off a cliff below ±6 V.

These parts generally enjoy a reputation of being well-behaved, and are often used in filter circuits. That reputation may stem from the original Motorola / ON Semi ones though.


Another from the "crimes of the '80s" department. I know cheap low-noise quad opamps don't exactly grow on trees, but performance of this one is seriously WTF (in line with its peculiar architecture that involves an output stage with feedback). It looks like there is a lot of internal cancellation going on, maybe performance of this part was "tweaked" for use as a follower / at low noninverting gains and around 1 kHz.

The output stage seems to contribute distortion unusually early on, though feedback then keeps that in check reasonably well. Unfortunately feedback becomes less effective as frequency rises, and even the 9k load in the test setup makes output stage distortion rise above the noise floor at about +7 dBu at 10 kHz, a fair bit worse than even the wimpy MC33078. If you want clean +20 dBu from this one, you better load it with no less than 39k or so, which is a bit of a joke for a low-noise opamp. Basic current capability appears to be decent, so this one, again, may be a case for Class A bias. Not sure whether best to use a current source or sink though.

Note that the LM837 enjoys a reputation for liking to oscillate (in line with this, specified phase margin also is markedly worse compared to LM833, so it may be better treated as a decompensated part), as well as not being particularly short-circuit-proof. A real diva if you will. I'd rather use an MC33079.


This part's claim to fame is a Butler input stage (composite BJT/JFET). Idle current is a moderate 2 mA per amplifier. Moderately low voltage and moderate current noise, good transfer linearity, OK common-mode linearity that improves at higher supplies, rated up to +/-22 V. Input impedance nonlinearity is about as bad as it gets in FET input parts – whatever the point of this input stage was originally, I wouldn't call it a resounding success.

It can drive +20 dBu into 600 ohms on +/-15 V, but isn't particularly amused doing so, losing about 2 dB of its maximum output level. Crossover distortion becomes visible at about -5 dBu already, though thereafter it is kept in check slightly better than in e.g. the TLE2072. Recommended load impedances thus would be similar.


A bit of an oddball dual opamp (quad: MC33179) with modest GBW that can deliver a lot of output current at very low quiescent current draw. If you guessed that this would mean loads of crossover distortion, you'd be correct, even according to the datasheet. Now if this one isn't a case for some Class A bias I don't know what is.

While voltage noise per se is not particularly low, a voltage-current noise product of 7.5 nV/√(Hz) * 0.15 pA/√(Hz) would be rivalling the NE5534A and you'd think 4 in parallel would give some really usable specs – but alas, the current noise spec appears inconsistent with the typical 100 nA of input bias current, which would give 0.25 pA/√(Hz) of shot noise on its own. Ib would have to be a typical 35 nA for the spec to match up. Perhaps this part has been revised at some point.


Wait, this one's not even hi-fi, you say? True enough, this (along with its quad version LM324) is a classic "generic" opamp from the 1970s. It has some useful properties like being able to accept input down to the negative rail and low operating current, but is less suited for audio. Gain-bandwidth is modest at ~1 MHz, noise levels are high (STMicro admits to a whopping 55 nV/√(Hz) – you may remember that the LM386 uses a similar level-shifted Darlington input, with similar results), and it features one of the most awful output stages I've seen (not coincidentally, one of the few regrets the part's designer had later on):
While it can both source and sink current (usable amounts, too, though sourcing does better), it cannot transition from one to the other seamlessly, instead having to rely on the part's modest slew rate (0.6 V/Ás) to make up for the resulting discontinuity. The resulting glitches are quite easily visible on a scope, and those familiar with audio and scopes will know that by the time that's the case, things usually sound pretty bad.

When idle, it's the sourcing part that operates (a Darlington follower), loaded with a current sink of a whopping 50 ÁA. That's good for about 1 Vpp (0.35 Vrms) into a 10 kOhm load. If your demands for undistorted audio are greater than that and power draw is secondary, you can always run a bias resistor or current source to the negative supply for some (or significantly) more SE Class A bias. Up to 5 mA or so is quite doable if need be.

Quirky low voltage bonanza – TL97x, TS97x, NJM2115, NJM2122

General discussion

There is a decent selection of low-voltage CMOS opamps available if you need opamps for low voltage use (say, 2.7-5 V) with rail-to-rail capable outputs at least. But what if you want to do the same in all bipolar? Well, let me tell you, things get quirky. There is a multitude of rather similar parts available that you'll generally spot by their 12 MHz GBW and (generally) 4 V/Ás slew rate. What you get tends to be something rather like this:

[TL97x Block Diagram]
Block Diagram of TI TL971/2/4

It's fairly standard stuff on the input side – you're generally looking at a common-mode voltage range that extends to roughly a volt from either rail.

On the output side, note the use of an open collector output with a constant current source load. (Much like a 4580 or 4556A that you took away the final emitter follower from.) The former is limited in output voltage by the transistor's saturation voltage (which may be less than 0.2 V), the latter tends to be the collector of a pnp transistor involved in a current mirror, so similar things going on close to the positive rail. In sum, this may get rather close to rail-rail output.

But did you notice something? It's a literal single-ended Class A output. The maximum current to flow out of the output is exactly what the current source will provide – usually around 1.5 mA give or take. At this point, the output transistor will also be roughly as speedy as a sloth dipped in molasses, having given up all of its current. Rarely have I seen a solution so unabashedly crude in IC designs newer than the 1970s. Oh, and the compensation goes right to the output, so you can get in trouble with capacitive loading as well.

Well, what can you do with 1.5 mA? Well, drive 2 kOhms close to the limits of a +5 V supply for one, with a bit of current to spare. Given that a lot of these parts feature an input voltage noise density on the order of 4 nV/√(Hz) (which, as one of my handy-dandy calculators will tell you, is roughly the equivalent of a kOhm), and some rather more than that (NJM2115 and the old 2100), this seems adequate to drive the kind of feedback network you might encounter. Forget about any serious loads though.

The TL97x datasheet actually gives you a gain bandwidth vs. output current graph in fig. 7 – you can see how it really goes south past -1.2 mA or so, just as expected. Phase margin (fig. 9) starts to suffer even earlier. The same is also documented for the TS97x (fig. 9 and 10), and actually even more pronounced there.

The input stage current source in the TL97x seems to have been wired up with a reference current derived from a resistor between the supplies, giving a rising slew rate as supply is increased, reaching over 10 V/Ás at the upper end (fig. 16). GBW (fig. 7) rises in a similarly dramatic fashion. If you thought that this would affect compensation, you would be correct – the phase margin under substantial capacitive loading just dwindles away at higher voltages, past 9 or 10 V in particular. It's essentially a decompensated part then. Interesting design choice. The TS97x shows this effect to a much lesser degree. (That said, if I had a diamond buffer to drive in a portable headphone amplifier at 7-14 V…)
This may also have been why the NJM2100 had a tendency towards instability past 5 V – its essentially linear and rather steep operating current vs. supply voltage graph would certainly suggest so.

Part ranking

I think the best parts with this particular architecture would have to be TL97x (slewing a bit faster at 5 V/Ás) and TS97x (providing a hint more source current), while the presumably older NJM2115 and yet older NJM2100 (which according to the list of improvements in the NJM2115 datasheet seems to have been quite a piece of work) trail behind. The NJR parts would save you a bit of idle current draw though, at 3.5 mA vs. 4 mA for the dual.

NJM2122 – a special case

This part is characterized by unusually low voltage noise and also a bit different in architecture. Let's have a look:

[NJM2122 Equivalent Schematic]
NJM2122 Equivalent Schematic

It's a classic 2-stage "precision" opamp, just with this wacko rail-rail output. Notable is the very low 1.5 nV/√(Hz) voltage noise density, if at the cost of a hefty 3.6 ÁA of input bias current (that's 1.52 pA/√(Hz) worth of current noise density purely from shot noise right there), 7 mA of idle current consumption, and a somewhat lower slew rate of 2.8 V/Ás (which, mind you, still is plenty for those kinds of signal levels). Unsurprisingly, the datasheet suggests a microphone preamplifier application, at which it may actually be pretty good – well, with an unbalanced input anyway.

If you read the small print, you will find that they recommend a voltage gain of 30-50 dB, and below 30 dB "phase compensation by external circuit is required". So that's how they get away with such modest output current – you get plenty close to optimum noise performance with e.g. 2.2 kOhms and 68 ohms in the feedback network. Still I wonder whether this one couldn't be hacked with external compensation and maybe the output run out into a folded cascode and buffer stage… but perhaps adding an external input and output stage to one of the more conventional parts instead would work out better in the end.

Back to topics

Entry last modified: 2020-03-05 – Entry created: 2014-07-13

A Classic Hi-Fi Misconception

Recently I stumbled across a Tumblr called A review of head-fi. (Tumblr is wacky Web 2.0 stuff that has no good reason to exist but does anyway.) It's in part accurate, in part confused. At first I was tempted to write a "review of a review of head-fi" (because, you know, I'm meta like that), but the confused bits got me thinking, and I decided to concentrate on a more general pattern behind them.

So what's that misconception the heading is alluding to?

It is "Things ARE <x>".
<random manufacturer>'s speakers sound like <x>, <random opamp> sounds like <x>, …
Always, anywhere and for all time. (Yeah right.)

This sort of assumptions may confuse the heck out of people if they receive contradictory input concerning the properties of the thing in question. If one guy says speaker A sounds balanced and the other guy says it's boomy, who are you to believe?

In practice it turns out that simplistic assumptions like that just don't fly. Any "thing" will show, well… let's call them "interactions".

Of course it's not guaranteed that any two samples of the same thing will perform the same to begin with. For example, Audio Technica's ATH-M50 headphones exist in both a "neutral" and a "seriously bass-heavy" version, which measure and sound markedly different. Counterfeit samples of nominally good opamps may perform like utter garbage, too.
In addition, perception of two different people may differ quite a bit as well, depending on how their hearing is "calibrated".

Let's disregard these for now and focus on our interactions. What are they?

Let me give a few examples.

Want to know how to recognize an engineer? They're the ones with the long lists of ifs and buts!

Back to topics

Entry last modified: 2014-07-15 – Entry created: 2014-07-04

Audio Op-Amp Exotica and their Uses

As far as audio opamps go, most everyone would have heard of a 5532, or the trusty TL072. But what about these?

MC33178 (dual) / MC33179 (quad)

The MC33178 (not to be confused with the MC33078) entertains a bit of a reputation as a "secret weapon" for use in filter circuits of highish impedance and such. It is a somewhat unusual part combining very modest idle current consumption with substantial output current capability – if that makes you think that the output stage is likely to be current-starved and may benefit from some kind of class A biasing, you're probably right (the specified distortion indicates this as well; I have not run any sims to determine whether pulling up or down would work better).
Its most peculiar feature, however, only becomes obvious once studying the specs in detail. A spot voltage noise spec of 7.5 nV/√(Hz) @ 1 kHz does not seem like much to write home about, but current noise only is 0.15 pA/√(Hz) at this point. That makes for a better voltage-current-noise product than a multitude of (bipolar) low-noise opamps! (Even the NE5534, which gets close.) The only explanation I can come up with is that input transistor beta must be reasonably high in spite of an input stage current that (going by voltage noise) would seem to be only in the order of 10 ÁA per transistor. (The input bias current would indicate a beta of more than 100.) So these transistors would seem to be quite small, possibly smaller than most anything discrete. (Is there anything smaller than a BC548C out there that still has decently high beta?) That in return means small input capacitance and thus good input impedance linearity, hence the "secret weapon" reputation.

Now you may be tempted to use an MC33179 with two amps in parallel each for an MM phonopre – 5.3 nV/√(Hz) and 0.21 pA/√(Hz) doesn't sound too bad for this application (something like an AT-95E already has an impedance of about 3 kΩ at 1 kHz with a steady increase above that, so the source impedance that the opamp sees eventually ends up in the tens of kOhms). Or even all 4, for 3.8 nV/√(Hz) and 0.3 pA/√(Hz). Now for one thing, input bias current definitely requires some attention at this point. Additionally, a 5 MHz GBW, while generally sufficient for an RIAA amp, would leave only 28 dB of spare loop gain (when assuming a gain of 40 dB at 1 kHz), not exactly luxurious given the modest output stage linearity when unaided. All of this becomes much less severe when going two-stage. It would be fun to see whether you can't make a two-stage MC33179 based amp that beats a single-stage NE5532 job! (Well, you better can, the chip still is more expensive.)

Too bad that the DIP versions of the MC33178/33179 appear to have been discontinued, though the surface mount ones remain readily available. I have noticed that TO-92 packages for transistors really seem to be going out of fashion as well.

Another part that may be worth looking into for highish impedances, with similar reasoning, is the venerable NJM4556 headphone amp.

A few 4558 class parts are still in production, but current noise usually is not specified for them.

TS521 (single) / TS522 (dual) / TS524 (quad)

These STMicro opamps seem to be much the same as the MC33078/79 that they also make. Not that bad a part if you can cope with the very poor output linearity somehow (buffer stage? Class A bias (looks like pull-up might work better)?).

Back to topics

Entry last modified: 2014-03-04 – Entry created: 2014-03-04

Getting the Best out of your Onboard Audio

The lowly onboard sound has come a long way. 15 years ago, it generally was pretty crappy, and still anything but grand 10 years ago. Then Intel's old AC97 standard was replaced by the more capable High Definition Audio. Performance of the first HDA codecs of the better kind was looking more promising, but some flaws like non-negligible periodic passband ripple and uninspiring ADC performance had yet to be worked out. Meanwhile newer Windows logo requirements started pushing for measurably better audio quality. The first chip to be able to claim audible transparency easily was Realtek's ALC889 in 2008. And in 2013, a newer cousin of this chip, the ALC898, found its way onto a Creative Labs soundcard (Audigy FX). Sure beats the old Sigmatel STAC9721 on the SB Live!…

Now while onboard audio may be pretty good today even with chips that aren't top of the line, that doesn't necessarily mean that it is. If you're very unlucky, the board manufacturer has implemented the audio codec negligently and you're getting all kinds of funny noises in headphone operation no matter what you do. However, barring that, there are several things that you may be able to do in order to establish proper operation or improve performance. Let's see:

Back to topics

Entry last modified: 2014-12-07 – Entry created: 2014-01-12

Pimp your IC Opamp with a Discrete Input Stage

Using an IC opamp with a discrete input stage is a technique commonly seen in commercial phono preamp stages but rarely encountered in DIY. This may be attractive because it allows you to:

  1. Decrease effective input noise.
  2. Virtually eliminate common-mode and input impedance distortion (if an appropriate topology is chosen).
  3. Increase low-frequency loop gain.

Now with the current offerings in terms of audio opamps, the third item is no longer as attractive as they used to be, unless you happen to be in the position of not being able to obtain fancy opamps for one reason or another. There are plenty of opamps with low voltage noise nowadays as well. What you can't get so easily is both very low voltage and current noise, which is useful for MM phono stages – a 5534A is a good option for these, but beyond that you have to resort to low-noise JFETs. At higher levels, eliminating CM and input impedance distortion is definitely desirable.

There's just one teeny tiny little practical problem – you need compensation to keep things from becoming unstable, since tacking on gain to the front of the opamp will obviously modify its carefully-optimized open-loop gain response. So how does one do that? What you basically need to do is return loop gain (and phase) at high frequencies to the opamp's native response, well before it reaches unity gain. If the opamp was stable to begin with, the whole shebang then ought to be stable again.

This basically means that the differential gain of our discrete input stage must be flat and about unity for at least half a decade both below and above the opamp's unity-gain bandwidth. (Higher than unity gain may be possible if unity-gain stability is not required.) So the differential amp needs to be fast enough (GBW at least 3 to 10 times opamp unity gain), and its response needs to be shelved low enough.

In practice, the shelving is typically obtained by a series RC combo between the emitters (or drains) of the input transistors. That limits high-frequency differential gain to R / 2 ( RE + 1 / gm), with RE being the emitter degeneration resistors. R is assumed much smaller than the regular collector loads here; it's typically in the hundreds of ohms if you're shooting for unity gain. C then has to be chosen for an appropriate shelving frequency (the usual RC time constant stuff) – at least a factor of 3, preferably a decade below opamp unity-gain frequency.

And then you may still find that the whole affair oscillates, depending on external circuit values chosen. Using circuit simulators in the prototyping stage is highly recommended (but then, doesn't everyone use these nowadays?). It probably also is a good idea to use an opamp with a healthy stability margin to begin with.

Back to topics

Entry last modified: 2014-06-11 – Entry created: 2013-11-11

FiiO E11 headphone amplifier review

I recently bought some SoundMAGIC E10 earphones, partly out of curiosity and partly because my Shures had been out of order for some time and I'd been too lazy to send them in for service. Now I was worried that the wee little Clip+ might break a sweat driving them (16 ohms and all, a load impedance range for which distortion measurements didn't look that great), so I decided to order a little amp as well. First I thought about the little FiiO E06, but then decided to go with the beefier E11.

Packaging and product design

Spiffy! Feels well thought-out and professional, exemplifying what Chinese products can be today (the E10s are another positive example). Was shipping the amplifier in a can a nod towards the classic Altoids tin that must house thousands of cMoys? (Not exactly the least resource-intensive packaging choice, I must admit, but it's not like you couldn't reuse it for anything else.)

The amplifier's case itself appears to consist of a plastic middle part (which is somewhat complex in shape, featuring injection molding) with metal top and bottom parts, nicely finished. Only the small slide switches for gain and bass boost at the side are a bit wiggly, and I might have put the input jack somewhere else. The power indicator LED also is blue, which I happen to detest.

Accessories supplied do not include the kitchen sink but it gets close. Short mini-jack interconnect, mini-USB cable, stick-on rubber feet, rubber straps for fastening to the larger kind of DAP, all there. Especially for 60 bucks (or euros), I'm impressed!

The bump-protected combined volume pot / power switch must be one of the more clever design aspects of this amplifier. The combination in itself (a classic that's been used since the 1930s or so) has its pros and cons. You'll never accidentally blast yourself with overly loud playback, but you can't just keep a volume setting for next time you want to use the amp and have to refer to the numbers on the side of the thumbwheel. That one is fairly small, ensuring that bumping the volume accidentally is near-impossible. Channel tracking on my sample strikes me as fairly good, at least it's better than for the cheapo pot in my BTech BT928 of yore.

Sound (I): Frequency response

So let's drag out some cans and a DAP and listen, shall we? First of all, my trusty Sennheiser HD590s. When compared to the Clip+ barefoot, the difference in sound (assuming you adjust volume precisely) is very, very small. Maybe a teeny tiny bit warmer with the amp in. That's expected, both have very low-impedance outputs and neither really breaks a sweat with these cans. (I have done some rough calculations and concluded that even with the modest quiescent currents in the output stage of the Clip+, that one would still remain in class A operation at 0 dBFS with the highest volume setting I use with them. We're talking about approximately half a milliamp, the bottleneck being the virtual ground channel.) Whatever difference there is might be explained by the very small amount of bass boost left in no boost setting, we are talking about 0.1 dB here.

When compared to a Realtek ALC262 onboard sound output (output impedance estimated to be 75 ohms), the E11 tames the bloated bass that goes along with HD590s on a decidedly non-zero-ohm output. That's about the only thing these cans are picky about, otherwise they are fairly undemanding (easy to drive yet not hyper-sensitive, medium impedance of 100 ohms typical, 200 ohms top).

The difference between the two gain settings is noticeable but fairly small absolutely speaking (what do you expect from a nominal 4 dB). The two-step bass boost does what it's supposed to, but it's not a feature I have much use for.

Sound (II): Noise

On to a topic that always is of interest to me. Let's get out the aforementioned SoundMAGIC E10. These are quite sensitive, my preferred volume setting with them on the (rockboxed) Clip+ is about -51 dB, compared to -33 dB for the HD590. That's SE420 territory, so the spec must be rather understated, possibly owing to noticeably recessed mids. So let's plug those into the E11.
Oops. That's much worse than the Clip's slight hiss. And that's supposed to be only 13.5 ÁV (NwAvGuy measurement), or half that A-weighted? Wow. I almost can't believe that. Even more oddly, hiss is lowest in high gain mode, at least when not cranking up the volume too much. (WTF?)

I thought I could use the E11 to combat the flash memory access noises heard with very sensitive 'phones on my Clip+. Nope. Clear FAIL on that account.

Incidentally, aforementioned calculations also showed that the E10s, too, would never push the Clip+ output stage out of class A operation at the highest of levels I run (which is -46 dB with compressor on).

Sound (III): Driving insensitive loads

Now what about some rather insensitive 600 ohm oldies? Let's drag out my trusty HD420SLs then (which I think are somewhere in the low 90s dB/mW) and see what a nominal 12 dB of gain will do on my Clip+. With those I can hear well into the noise floor in the quiet parts of a recording of Ravel's notoriously dynamic Bolero, and I don't have to crank the volume all the way up if listening volumes are to remain bearable (-6 dB on the Clip will do easily, down to -12 dB for the louder parts, so basically I'd still get along without an amp but with limits well in sight). The cans themselves and my hearing get unhappy well before the amp does (which should drive 600 ohms to about 2.75 Vrms, at an input level just short of what the Clip can deliver, so these two are a good match). Gets a PASS from me.

Unfortunately I don't have any real power hogs, like an HE-6 or something.

RF immunity

A bit of testing showed that you have to get fairly close with a GSM phone before it makes itself heard… about 10-15 cm (4-6"), though that would depend on the sort of reception you get. It does a lot better than an old set of 2.1 speakers here. Still, I probably cannot recommend strapping this amp to the back of a smartphone, which is precisely where the antennas are. It would only impede reception and be subjected to an extra dose of RF power in return.

EMI emission

I have used the E11 a fair bit on my AOR AR7030+ in conjunction with the 90x90 cm tuned lower shortwave loop, and it's been very well-behaved in spite of the internal DC/DC converter. I have to bring the amp very close to the loop windings for some noise to be picked up, and when using the pickup winding as a random wire, I don't notice any extra noise at all. This receiver needs an attenuator because most any headphones end up at the very bottom end of its volume range, and it appears that something (presumably in the volume control IC) performs poorly then, with severe bass rolloff and distortion appearing in addition to channel imbalance. Yuck.

With my trusty Sony ICF-SW7600G on its whip antenna, I found no noise pickup on shortwave. Mediumwave potentially picks up quite a lot of noise, but this seems to be via inductive coupling to the ferrite rod, and keeping the amp about a foot (30 cm) away with a sufficiently-long audio cable gets rid of that.

In short, PASS.

Power and charging

Charging times are pretty lengthy given the runtime you get. It's a 1:4 ratio at best. That said, I have not yet tried the low power mode, which should give better runtimes at still easily-acceptable maximum output levels. Also, kudos for using a run-of-the-mill Nokia phone type LiIon battery. You cannot use the amp while it's charging.

Update: I have noticed that the amp has a habit of running its battery flat even when not in use, and sure enough, the multimeter says about 10 kOhms across the battery terminals. Some sort of capacitor leakage at work there? I have resorted to removing the battery when not in use.

Uses / Summing up

I have found the following applications for the E11:

  1. Nightstand headphone amp for an FM tuner, replacing the venerable BT928. The power supply used for the latter had developed a mechanical problem, besides its output impedance of 47 ohms is decidedly audible with the HD590s typically used there. I have a USB charger with matching cable floating around in the place, too (for the Clip).
  2. Line-level amplifier to go between the Clip+ and a compact stereo with a bit of an insensitive AUX input even in high gain mode.
  3. Headphone output level attenuator for the AOR AR7030+. This shortwave receiver needs one because most any headphones end up at the very bottom end of its volume range, and it appears that something (presumably in the volume control IC) performs poorly then, with severe bass rolloff and distortion appearing in addition to channel imbalance.
  4. A better headphone output for the Onkyo TX-NR616 home theater receiver. While this one is a major improvement over the old Kenwood KRF-V8090D that was there before ("hissy like a mad snake" seems about right, that's what you get for using simpleton PGAs), output impedance still is a bit high at an estimated 200-ish ohms, and without the attenuation provided by that the output isn't too clean any more either. (As an aside, DLNA streaming audio apparently sounds worse when delivering MP3 rather than decoding to LPCM first. Go figure.)
  5. Running the HD590s on the computer. I have HD580s for that though, plus a mains-operated amp (or at least one that could be used and charged at the same time) would be more handy there.

Now I'd only like to have something for the application I was hoping to use the E11 in, i.e. glorified attenuator for sensitive in-ears, not too bulky, hopefully not breaking the bank. An O2 would fit the bill in terms of noise but is just too darn big. The E17 apparently is about on Clip+ level or maybe a smidgen higher but I don't need its kitchen sink level functionality.

Overall, the E11 is a reasonably inexpensive piece of kit and still ought to drive a wide range of headphones to good levels with low to inaudible hiss and negligible output impedance. I wouldn't recommend anything more sensitive than about 115-120 dB SPL / 1 Vrms, and anything down in the 90-100 dB vicinity better have at least medium impedance (let's say 90+ dB / mW efficiency). That leaves quite a selection still, though the extremes like UE 10 Pros and Hifiman HE-6s are probably out.

Back to topics

Entry last modified: 2018-04-16 – Entry created: 2013-11-11

You can fly to the moon on three transistors! A preamp design.

A Usenet discussion recently resulted in me feeling challenged to design the equal of a typical PCC88 based tube preamp in terms of bandwidth and level handling with a handful of transistors. Specs were vague to say the least, but I figured that a reasonably high supply voltage would be useful, along with a healthy amount of standing current. My guess WRT semiconductor count was 3-4 transistors, maybe 5. I was looking into 3-transistor opamp circuits at the time and ultimately decided to adapt one of these. It's essentially the 2-transistor circuit from the Leach preamp beefed up with a CFP output, a popular general purpose preamp topology in the 1970s.

Here's what I came up with. I termed it the "Hardcore Preamp", for reasons that will be discussed below.

[Schematic: Hardcore Preamp]
Hardcore Preamp, basic 3-transistor version

And that's what it should do:

So what's the price, you ask? A.k.a. why it got its name:

Other parts choices:

In order to minimize input impedance distortion caused by nonlinear Ccb in the input transistor, I designed another version with a cascode input. Look at this beautifully simple cascode:

[Schematic: Hardcore Preamp w/ cascode input]
Hardcore Preamp, cascode input version

Things to note about this one:

Back to topics

Entry last modified: 2019-01-19 – Entry created: 2013-11-08

Headphone Output Impedance Calculator

This calculator has moved. Please update your bookmarks. I apologize for the inconvenience.

Back to topics

Entry last modified: 2020-02-21 – Entry created: 2013-09-22

The JLH headphone amplifier

John Linsley Hood adapted his 1969 Class A loudspeaker power amp to headphone driving purposes in the late 1970s, the result of which can be seen here. It is quite an interesting circuit with some peculiar properties.

[Schematic: JLH headphone amp]
Adapted JLH headphone amp circuit.

The above version, adapted for modern-day needs, does quite well in simulation. It refuses to oscillate even when driving a critical 32k||47nF load, and while less fond of low-impedance loads (e.g. 32 ohms), it can achieve quite low (and well-behaved, i.e. dominant 2nd-order and quickly dropping) distortion when driving medium to high impedances. There appears to be some sort of cancellation of nonlinearity going on among the splitter and output stage, only thrown off by low-impedance loads which presumably upset gain in the lower output transistor.

Loop gain is a moderate 70-ish dB or so but gain-bandwidth appears to be reasonably high, as there is little change in simulated distortion between the 1 and 10 kHz points.

Nonlinearity cancellation effects are found throughout the amp, which should make it clear that parts choice is not uncritical. In simulation, it likes 2N2222/2N2907 or 2N5551/2N5401 for the small-fry transistors. In the splitter, MPSA18 works well, and BC337-40, BC550B, BC547B, BC546B and BC639 work well to well enough there if at a stability penalty. The input may also be (and I guess should be) one of the usual BC557-560 jobs or similar, otherwise its effect isn't too great. Just don't put a BC337 or BC55x in the current source (Q5 – low Early voltage? Would explain why 2N5401 works well, as high-voltage parts often have high Early voltage as well). Outputs don't need to be anything too special as they are run rather warm, TIP31s work fine and so should other ~3 MHz fT, 3-4 A jobs (like the original 2N4922).

The 4.7k input series resistor should tell you that this amp doesn't set any new records as far as low noise goes, but it should be quite decent nonetheless. Arguably more problematic is the need for an output offset adjustment, as effectively the voltage difference between input and output amounts to the three B-E voltage drops of Q1, Q3 and Q4, which exhibit the usual temperature drift that isn't easy to compensate accurately. The adjustment is probably best carried out with the amp warmed up, as I would be expecting a drift of severals tens or even hundreds of mV. A fancy solution involving thermally coupled transistor diodes of same type in the input adjust voltage source would, however, certainly be feasible if so desired.

Back to topics

Entry last modified: 2013-09-18 – Entry created: 2013-09-17

Output noise calculator for opamp-based amplifiers

This calculator has moved. Please update your bookmarks. I apologize for the inconvenience.

Back to topics

Entry last modified: 2020-02-21 – Entry created: 2013-09-16

Fixing the 1977 Leach Preamp, or 2-Transistor Opamp Circuits for Advanced Dummies®

The late Dr. W. M. Leach may be most well-known for his audio power amplifier design with an EF3 output stage, while the preamp he came up with at the time and published in the February 1977 edition of AUDIO has largely remained obscure and only came to my attention in a forum thread by someone who had attempted to build one and was struggling to make things work (for reasons unrelated to what I'm going to discuss here, but rather the kind of stuff that can happen when you try to build a moderately complex circuit all on perfboard). It is probably not something you would favor over a run of the mill modern-day design using 5532s (or 5534s) and LM317/337 regulators in a low-noise configuration, but quite interesting nonetheless.

As usual at the time, the circuit in its original iteration is all discrete with bipolar small-signal transistors; no tone controls were included at the time. Relatively high +/-24V supplies are employed, with 2nd-order mains filtering and simple zener regulators. A modified phono preamp stage with FET input was presented several years later, and a line amplifier stage based thereon and including tone controls came soon after. The power supply was also converted to IC regulators, with better filtering added at the amplifier parts themselves (as this solution would be even more noisy).

Let's focus on the original design for now. A two-transistor opamp circuit with some extra highpass and lowpass filtering and the modest amount of about 10 dB of gain is used as a line-level stage here. Having been interested in the performance of these for a while, I decided to simulate it. Distortion performance turns out to be quite impressive, mostly thanks to substantial amounts of collector current for the output transistor (over 7 mA) and only moderate amounts of gain. However, I suspected that power supply rejection would be less than stellar – and it turned out to be abysmal, at about 4 dB only! Noise on the negative power rail appears on the output amplified by 6 dB. Only a few microvolts are enough to dominate over the circuit's own thermal noise contribution. (Even a low-noise LM337 configuration still tends to yield about 20 ÁV or so over the audio bandwidth.) I guess I shouldn't have been surprised considering that -24V is the small-signal ground reference for feedback.

So I looked up how others had employed this kind of circuit at the time (Marantz, Grundig etc.). Turns out it was typically used with a single (positive) supply, not split supplies. Then small-signal ground actually is "real" ground, eliminating the biggest PSRR spoiler. (The good professor must have overlooked that part at the time.) They would usually employ better filtering for the input transistor base bias voltage as well.

Incidentally, the all-bipolar phono stage appears to work flawlessly with excellent PSRR and low distortion, even if it wouldn't be the very lowest in noise, mainly due to the choice of feedback network resistor values – possibly a compromise for being able to use high-quality styrofoam caps in the RIAA. (The later revised design should fare better, though retrofitting its RIAA network or rolling your own with even lower impedance would also be worth a shot.)

So let's assume you have built that original design. How about a simple fix that much improves PSRR in the line stage? Here's the simplest one I could come up with:

[Schematic: Leach preamp line-level stage w/ PSRR fix]
Line-level stage with simple PSRR fix.

Instead of directly connecting the circuit to the negative rail, some RC filtering with 470 ohms and 220 ÁF (>=25V) to ground is included. The hardest part is finding a suitable ground connection. It should be output, not input ground, so maybe at R27 (R7 above). In simulation, negative rail noise suppression is always better than in the original circuit, reaching almost 30 dB (output-referred) by 100 Hz and 50 dB by 1 kHz (rather than about minus 6 dB). At this point, it's probably +PSRR that's becoming the bottleneck (which is about 40 dB input-referred worst-case though it would usually be 50+ dB in practice). Still, a huge improvement. Even mains hum levels should decrease by about 20 dB.

Update: Since I received a message asking for details on such a mod on an existing build, I might as well update this entry.

Said electrolytic capacitor can be a regular polar type, - to negative rail. You'll need 3 in total if your build included the center channel, otherwise 2. A quality modern low-ESR type (Panasonic FC or similar) is recommended, a 30-year-old junkbox part most certainly not. (Speaking of which, I am not sure how fresh the original electrolytics may still be at this point. Even if not dried out, they may still appreciate some forming. I would try salvaging the big ones but probably replace the smaller ones.)

So where does one best squeeze in the 470 ohm series resistors…?
*looks at PCBs*

Oops. A design with an integrated ground loop – ground runs around the circumference of the board in all of them. Not uncommon back in '77 (I have to think of a certain UREI compressor that is a common target for cloning) and not a bad idea for RF, but bad practice for audio. While catching EMI inside a metal case seems unlikely and board mounting would still ensure low impedance, there's always some electric and magnetic fields from the transformer going around that may couple into such ground loops and cause hum that surfaces once the circuitry has been improved. Normally a case for a board redesign, but let's see what can be done to salvage this one…

There are two options that I could think of:

  1. Cutting the ground trace once in some suitable spot (you might solder a 10n ceramic cap across it if so desired) and using insulating washers for three out of the four screws, while ensuring first-rate contact at #4. (Ideally the other screws would be capacitor-coupled, but I see no room for that here.)
  2. Another option would be cutting the ground trace into 4 segments, each assigned to one screw. I haven't thought about this much, but it may be even better – and it's a lot more straightforward than the first one.

The overall grounding scheme already looks pretty "starry". Needless to say, a build should follow it precisely.

Now where does our 470 ohm go…

Once that is all done (and hopefully working as intended…), you may also consider using a better power supply design – the RIAA section in particular should appreciate that, once you've tweaked its noise performance anyway. I imagine that the original zener-based design sets no records for ripple rejection, and the suggested "improved" supply is very likely to be on the noisy side of things. You may even be able to obtain finished boards for a LM317/337 based low-noise supply (with a cap on the Adjust pin of each reg), something like that ought to be ample.

Back to topics

Entry last modified: 2015-01-16 – Entry created: 2013-09-13

So what kind of vocal type are you?

When studying people who like popular music, it becomes obvious that there are various groups in terms of preference for vocals. Here's a little table:

Vocals →
Listeners ↓
Male Female Both None
Female FM FF FB FN

Most people prefer either male or female vocals to some degree, though some are pretty much indifferent and a few even don't like any vocals at all.

The interesting question now is, what has an influence on which group you end up in? IMO it is mostly these factors:

It becomes rather nebulous when looking at what people actively dislike. Why would some people not like any vocals at all? Not liking any music has been connected to autism, but just vocals? And why is Kate Bush's voice the equivalent of nails on a chalkboard to some? I'll chalk that up (SCNR) to individual physiology for now, assuming that maybe the annoying frequency components are perceived more prominently, but really, your guess is as good as mine.

As far as I'm concerned, it should be no secret that I'm a "MF" type. How exactly this came about is only moderately clear. Back in the olden days I used to be fairly indifferent, in fact vocals certainly weren't my main priority since I was listening to a lot of instrumental music. Even then, however, my preferences definitely were on the "civilized" side, not "noisy" or even "brutal". (That's how I roll, you see. I can't even begin to describe how clichÚ most metal sounds to me.) When I finally started getting more into music, I came across more and more of these awesome female singers, starting with our dear Kate herself. (After a while, I could even make out what she was singing. Seems clear as a bell to me now. Brain magic FTW.) For some reason, there seem to be a lot more great female singers than great male singers, possibly related to the generally better command of language (due to better-connected brain halves) in the fairer sex.

Looks like I should read up on what neuroscientists have to say re: music.

Back to topics

Entry last modified: 2013-08-10 – Entry created: 2013-08-10

2013 music update

Here's what I've been up to musically this year. (Also see: 2012 music update and What am I listening to anyway?)

You can still visit me on and on RYM if you want.


I finally managed to drag myself to some concerts this summer. Quite nice actually, especially after my hearing protection arrived (a must IMO, at least for anything involving a PA). Going alone kinda sucks though, as you might expect. (I should also get some sort of fancy electronic device to aid in navigation. Orientation has never really been my kind of thing. I guess once I end up with a fancy cellphone with GPS, I'll use that, but so far I only have a dumbphone from work.)

New artists in my music collection

Branching out


Back to topics

Entry last modified: 2013-10-29 – Entry created: 2013-07-05

Reading Kristin Hersh's “Rat Girl: A Memoir”

I finally got around to purchasing this book from Throwing Muses' founder, and I must say it turned out to be a great read. Raw, intelligent, funny, inspiring. Let's hear what my Amazon review has to say:

(Also issued in the UK as “Paradoxical Undressing”.)

You see, I've never been too much into prose. Instead, I've been devouring nonfiction ever since I was a little kid, and unfortunately I tend to apply this sort of reading style to anything, tearing through books like there's no tomorrow. I'll tell you that much, this can leave you more than just slightly dizzy after you're finished. (How I envy people who flip through books at a leisurely pace sometimes, like my mom.) I guess I'm a bit weird…

And maybe that's precisely why I was able to relate to this book and its author. Kristin Hersh comes across as an intelligent, introverted person with a good sense of humor who's quite capable of poignant writing. Now granted, this isn't quite your average book, much like Throwing Muses aren't quite your average band. It eschews the idea of chapters but is loosely grouped into sections of the main story as based on her 1985/86 diary, separated by historic anecdotes from former family life. Select song lyrics are interspersed where they fit. Sure enough, there's a fair amount of “ah, so that's where that came from!” moments to be had for the fan. (It is recommended that you be equipped with “In a Doghouse” [compilation of early Throwing Muses output, ed.] or similar.) I can't really say their music has become that much less opaque to me though.

The unconventional structure did not impede readability for me – much like many TM song do retain a certain pop appeal. Things do get a little disjointed by the middle when her mental disorder really kicks in in the main storyline, but I feel that that's the very point. I mean, her head was a mess at the time.

Overall, this makes quite a brilliant coming of age story, not totally unlike the classic “The Catcher in the Rye” that I read at school back in the day. I wouldn't hesitate recommending this to my old English teacher for grades 12/13 or so – it's rated 18+, and that seems reasonable. If psychology is your thing, it may also be of interest. (It be noted that Ms. Hersh quite obviously is a synesthete, too.) And finally, there's any number of plain hilarious moments that make “Rat Girl“ an enjoyable read even when the protagonists happen to be living under less than desirable circumstances. Reality is what you see in it, I suppose, and I'd say Kristin Hersh does pretty well in terms of observation.

“I've only written one book”, said she in an interview for The Guardian, “and I didn't know how to write that.”
Well, considering that, the result certainly isn't half-bad... ;)

Oh, and the book took me about 6-7 hours net for 300-odd pages, including the largest part of one night. (Is that fast or slow? No idea.) Felt pretty lousy the next day, but it was definitely worth it. Since then, I've read random bits and pieces again and still enjoyed those.

So much for your daily dose of smug remarks. Now please go and poke your nose into the book preview – maybe you'll also like it.

Back to topics

Entry last modified: 2013-01-25 – Entry created: 2013-01-25

2012 music update

Here's just a little update from what's changed since last year's "What am I listening to anyway?". Not that extremely much, it turns out (having been broke for a long time had something to do with it, and there were several investments with higher priority which were needed first).

You can visit me on and on RYM if you want.

New artists

Virtually entirely female-fronted. Most noteworthy additions:



Back to topics

Entry last modified: 2012-12-08 – Entry created: 2012-11-15

Resampling quality in Audacity

Update 2013-07-05: Meanwhile they have switched to SoX' resampling library, which should give impeccable quality in VHQ.

Recently I found that results for Audacity 2.0's built-in sample rate converter had been included on the SRC comparisons site. While 1.3.9 had fared pretty well, resampling quality now proved to be mediocre. Nothing I'd consider readily audible, mind you, but still far from state of the art. What had happened?

Turns out the issue actually is quite old already. As documented in Audacity's wiki, their resampling library of choice used to be libsamplerate. Now at some point after 1.3.9, Audacity enabled support for the runtime loading of VST plugins, which generally are not published under the GPL or compatible licenses like the rest of Audacity's code. While apparently there is no consensus on whether doing something like this violates the GPL, libsamplerate's author Erik de Castro Lopo thinks it does and accordingly has asked for his library not to be used in builds distributed with VST support enabled. Any pre-compiled build of Audacity hence uses their own libresample, whose "High Quality" setting should be about equivalent to "Fastest" in libsamplerate and thus not anywhere near "Medium" or "Best".

This obviously is unfortunate for anyone not able to compile Audacity for themselves. Of course you can still use an external resampler like the one in SoX (which gives top-notch quality in its best settings), but it's handy to have a reliable one integrated. Anyway, an external resampler seems like the best workaround for now. Note that the internal resampler is also employed when copying audio between tracks at different sample rates, in an effort to solve the pitch/speed problem occurring if you don't. Hence you may not want to do that either.

For me it wasn't much of an issue once I found out, as I had already compiled my own Audacity build with ASIO support anyway (something that, while still taking some effort, proved much less of a hassle with a newer computer and OS than back in the day).

Back to topics

Entry last modified: 2013-07-05 – Entry created: 2012-05-03

Why does nobody get "Mastered for iTunes"?

I must admit that whenever I stumble across media coverage on Apple's "Mastered for iTunes" campaign, it tends to be a frustrating read. Studying their guidelines, it seems that the actual goals were perfectly reasonable:

Yet, articles on the matter usually fail to mention these central points altogether.

Instead, you get heaps of unsubstantiated claims, flawed tests and invalid conclusions, usually from people trying to "get the lossy version closer to the original" by applying EQ and other such things. Rubbish! You'd think that if a non-transparent encode could be fixed by simple EQ, codec developers would have implemented that long ago. How do people get such ideas? Lack of proper level matching and use of invalid methods like null testing (merely evaluating the difference to the original has long been proven to be unsuited for the evaluation of perceptual coding algorithms) has a lot to do with it. Garbage in, garbage out.

For example, look at this Ars Technica article. The first page is OK, but it's all downhill from there. People on HA were, understandably, not particularly amused. Thankfully the readers on Ars seem to be better-informed, as obvious from their comments.

If we're talking AAC 256 kbit VBR, transparency should be achieved in such a vast majority of cases that no kind of special optimization (save for avoiding clipping) should be necessary. Not even for 128 kbit, in fact.

People: Just because someone calls himself a mastering engineer doesn't mean he can't be an uninformed fool when it comes to the intricacies of digital signal processing. Where's your questioning of authorities, which I thought would be included in any journalist's toolbox?

Back to topics

Entry last modified: 2012-12-24 – Entry created: 2012-05-03

Music Critique for the 21st Century

Being a music enthusiast means you get to read your share of music reviews. Some of them are well-informed, intelligently written pieces like they ought to be, others are just pompous garbage (you'll know what I mean once you come across one like that), and then there's a lot in between.

Why is that so important? Put simply, it is quite impossible for any single individual to handle the amount of music that's commercially released these days (which can be hundreds of albums per week). Some kind of arbitration is absolutely needed – not only to separate the wheat from the chaff, but also to mediate between music output and listener groups.

It is interesting to note how distribution and promotion channels for music have changed. Mainstream radio has largely made itself obsolete in many places on the globe, with lack of variety and musical expertise, plus catering to the lowest common denominator and unwillingness to take any kind of risks (not to mention being generally annoying). Music television is a mere shadow of what it used to be. In return, specialty radio stations have become all the more important, and a large number of artists are making a living from contributions to movies, TV series and computer games. Online video platforms have become an important promotional tool, essentially replacing music TV. The first professional reviewing channels have also established themselves there, though most music reviewing is still done through websites and blogs. ("Inofficial" distribution channels are alive and well, too, with tape trading replaced by private and Internet-based file sharing.)

If I have learned anything, it's that professional music critique is anything but dead. Quite the contrary, there is significant demand for good reviews, i.e. both quantity and quality (which normally tend to be mutually exclusive). At the same time, a review in certain places can literally "make or break" an artist's career. Now we've all had a bad day once in a while, as do music critics. At the same time, hardly anyone does technical evaluations of recordings. So what would my ideal music review be like?

Who's going to pay all this? You find out – I'm an academic. :p

Back to topics

Entry last modified: 2012-04-04 – Entry created: 2012-04-04

O headphone output, thou unspecified one

(Reprinted from my tech soapbox since I was wondering where I'd posted this one and couldn't find it in the usual spot, i.e. here. Written in October 2010. There is some overlap with my last entry, but hey, a bit of redundancy isn't a bad thing.)

Manufacturers of hi-fi components have this really annoying habit of equipping their products with headphone outputs without bothering to specify their performance in any sensible way. You might get "suitable for headphones from 32 to 600 ohms" or "suchandsuch mW, 32 ohms" – or nothing at all. Now this may have sufficed back in the day, but in this day and age where headphones constitute serious hi-fi gear, it is unacceptable.

As a user of a headphone output on a hi-fi component, I am interested in whether it will be suited for the model of headphone I'm using. That implies (a) sufficient output power for normal volumes and (b) a frequency response worthy of the "hi-fi" label. The latter is almost universally overlooked.

Headphones are an Ohmic load about as much as loudspeakers – i.e. not very much. They may exhibit significant variation of impedance over frequency, up to almost a factor of 5 (e.g. Sennheiser HD555/595: min |Z| = 50 ohm, max |Z| ~= 230 ohm in the audible range). If a certain amount of amplifier output resistance comes into play, you'll get a complex voltage divider. In effect, the frequency response will be distorted. Fullsize headphones usually have an impedance peak in the midbass range, so they can potentially get very bass-heavy and boomy. Single-driver IEMs would get very midrange-y under the same conditions, and Multi-driver IEMs can be all over the place.

Now there are some models that are very sensitive to this due to low and highly varying impedance, and others that aren't as critical by far – you can look at this using raw data from Headroom and a little spreadsheet. Many are optimized for low output impedances, but some prefer something in the 100..150 ohm range. Whatever the case, it is important to know the output impedance. Yet does anyone ever bother to specify it? Nope, or at least very, very rarely.

So much for one big hurdle. Another point of interest would be the noise level in ÁV, A-weighted. With the headphones' sensitivity spec and output impedance, it is easy to calculate the background noise level observed by the user (a spreadsheet may help). A S/N spec is less user-friendly as it involves a larger number of variables and conditions, but may be necessary if e.g. noise level varies a lot with volume setting.

Back to topics

Entry last modified: 2012-02-15 – Entry created: 2010-10-17

Headphone Outputs That Suck

Those of you who are into web design will probably be aware of the site Web Pages That Suck, which displays instructive examples of badly-done websites. Now the world of headphone outputs is too small to provide as much suckage as the interwebs, but I've definitely run across a few turkeys. Behold!

1. The average integrated amplifier / receiver

One of the most common kinds of headphone output found on equipment primarily designed to drive speakers looks like this:

| Power |
|  Amp  |    
|       |----+-----> Speaker Out    
|  |\   |    |
|  |/   |    -
|       |   | |
+-------+   | | R
             -   drop
             |  +--- from R_ch
             |  |
              > |
               <  HP Jack

The basic idea behind it is that the dropping resistor and the headphone driver form a voltage divider that reduces the signal and noise amplitudes, as those would usually be excessive for headphones. By definition, this requires a dropping resistor value that on average is rather higher than headphone impedance.

But alas, a headphone isn't a plain resistance. Its impedance can vary greatly across the audible range, with variations of up to a factor of 5 for large headphones or even up to 10 for some particularly critical IEMs. Hence, the amount of signal amplitude reaching the headphones becomes frequency-dependent, with amplitude variation approaching impedance variation for dropping resistors that are much larger than headphone impedance. In other words, frequency response may be warped quite significantly. You can calculate the magnitude of the effect with a little spreadsheet.

[4 impedance responses]
Impedance magnitude of three critical low/medium-impedance headphones and one non-critical model. (Source.)

[3 impedance responses]
Lower-impedance headphones tend to be more critical – not so in this case, where the highest-impedance model actually is the most fussy one. (Source.)

Typical values for these dropping resistors range from 330 to 680 ohms, depending on manufacturer and amplifier power. You'll usually see 390 ohms on Onkyos, 470 ohms on Yamahas and 600 (2x 1k2 in parallel) or 680 on Sonys.

I would term outputs with this high an output impedance near useless for hi-fi playback in this day and age.

A few manufacturers included an extra resistor in parallel to the headphones at least, for example 330 (series) and 680 (parallel) on a Pioneer A-757 amp or 220 and 150 on a Grundig V5000, for output resistance values of about 220 and 89 ohms, respectively. This means more power dissipation in the resistors and lower output levels, but it can already reduce output impedance quite a bit, so at least your usual high-impedance 'phones in the 250..600 ohm range should be reasonably to very happy.

Note that amplifiers using Class D or bridged (BTL) power amps cannot use the dropping resistor solution, as the two channels do not share a common ground as required for headphones. (It would have worked for the old 4-pin DIN headphone plug, but that's long out of fashion of course.) Thus you'll typically find the usual opamp based headphone driver circuits in these that are known from CD players and preamps. The same tends to apply to modern-day AV Receivers near the top of the line.

2. Onkyo CD players

I don't know what it is about recent Onkyo CD players. Their headphone outputs used to be fairly standard NJM4556 or NJM4565, 110 ohm output impedance jobs similar to what everybody else had. Nothing great by today's standards, but generally OK for driving your usual 250..600 ohm suspects. The last couple of years, however, they've had some pretty... interesting ideas.

[Schematic of DX-7555 headphone circuitry]
Headphone circuitry, Onkyo DX-7555 (2005).

The opamp is a pretty standard 4556 job – but look at those output series resistors. Someone apparently thought consistency with their integrated amplifiers would be a good thing, and chose 390 ohms. Too bad that this value is far too high for anything that's supposed to be considered "hi-fi" – the headphones' impedance response would have to be near ruler flat if an impact on frequency response is to be avoided. As outlined earlier, integrated amplifiers only use dropping resistors this high to get rid of their excessive voltage gain and output amplitude, so if anything, far less would be required here.

The combination of a 20k volume pot and an inverting circuit with a 4k7 input impedance seems odd at first sight, but I guess it's a (cheaper) linear pot that is made more logarithmic this way. Not a bad idea, plus inverting operation ensures no common-mode distortion (at the cost of more noise). So the basic circuit actually is fairly sound, only marred by too high an output impedance.

It gets even better though.

[Schematic of C-7030 headphone circuitry]
Headphone circuitry, Onkyo C-7030 (2011).

In the next generation of players, the output current capability of one 4556 opamp is now provided by two 4580s (manufacturers tend to confine themselves to a few select types which are then bought by the bucketload for best per-unit pricing, plus power dissipation of two ICs also tends to be better), and circuitry is non-inverting again. The result is, however, not very smartly designed. The two opamp halves per channel use independent gain-setting resistors (tolerances anyone?), and then the signal is combined via large-value output resistors. Resulting output impedance again is very high at 340 ohms.

When you've got two opamp halves at your disposal, there really is no reason not to use an Apheared-47 style circuit. It also gives twice the output current capability, but nonlinear distortion improves dramatically and resulting output impedance is very low.

Obviously this would require moving the muting somewhere else. That's another gripe of mine with many CD players and preamps. Why have this on the headphone output, necessitating at least a few dozen ohms of series resistance? Right in front of the volume pot we can easily afford a few hundred ohms, so why not have it there instead?
Muting on the output only makes sense if there's a relay making the connection.

As this is a non-inverting circuit, the values of the feedback resistors could also be reduced in the interest of lower noise. With an Apheared-47 style circuit, one could easily use 3k3s or 2k2s instead of 10ks.

3. Your average notebook computer

The audio system in notebooks tends to be a bit of an afterthought. Budgets and PCB real estate are commonly tight, and time-to-market can be quite critical. Unsurprisingly then, headphone output performance tends to be all over the map. The most common problems include:

4. The "No-Fi" department

As you may have noticed, yours truly is also interested in radio frequency ranges that aren't exactly known for hi-fi requirements, shortwave in particular. Designers of the respective equipment have usually tended to assign audio quality a relatively low priority. While the requirements on distortion are obviously not as stringent as in a hi-fi application, audio performance is not as irrelevant as one may be inclined to think.

In addition, there may be more gremlins. The headphone output of an AOR AR7030 sounds quite ugly at low volumes (which are pretty much all you realistically need unless you only have very insensitive 600 ohm headphones like K240Ms), and mine has weird cracking on AGC peaks in the right channel. Strangely enough, the same signal seems fine when amplified by the speaker amp (after passive mono downmix) and accessed via the external loudspeaker jack. It also does if I use a passive -19 dB attenuator on the headphone out. The datasheet for the MC3403 opamp used there says it's free from crossover distortion – doesn't really sound like that, to be honest. (That said, I simulated the output stage topology, and it does seem to work as advertised.) The opamp also sees a fairly high impedance at the inverting input (1 meg || 220k), but noise and distortion should be dominated by the preceding TDA9860 anyway. It's not exactly a high current champ in any case. I've been contemplating the use of a MC33179 (the most promising-looking quad opamp I could find) in a buffer configuration. (Or maybe a TS524?)

Back to topics

Entry last modified: 2013-10-16 – Entry created: 2012-02-09

Why over-compressed recordings sound as bad as they do

Controlling dynamic range is important in recorded music. Average, peak and minimum levels have to be within certain ranges for our perception to work well. If even in a quiet listening environment you feel the need to ride the volume control all the time, chances are dynamics are too great. Conversely, something that came through well in a noisy environment may sound flat and lifeless in a quiet one. (Personally I've found that heavily compressed material can give me a headache or even cause nausea – I'm a bit sensitive to these things, I guess.) Using dynamics for effect can give music another dimension, but sadly this is not done very often.

It is quite common for "raw" recordings to contain excessive dynamics in the wrong places. Have you ever watched how good studio singers tend to move away from the microphone when they start singing more loudly? That's a basic form of dynamic range control. It gets a little harder when you have, say, a drum kit. In the olden days of tape recording, the inherent soft-limiting properties of tape would catch rogue peaks without it getting objectionable, but when digital recording came around, peak amplitudes became a real problem. Conventional analog dynamic range compressors (with VCAs and all) had been in use going back to the late '70s at least, when they were used to give pop recordings more "punch", but they weren't that effective for peak limiting. With the advent of DSPs and memory, however, look-ahead limiting became possible.

Unfortunately tools can be both used and abused, and by about 1997, popular music was firmly in "abused" territory, with the loudness war in full swing. This then got us into a decade of over-compressed music. Brickwall limiters weren't the only tool involved, but definitely the most well-known one. But it's not only that, studio recording culture in general has apparently gone from enhancing performances to taking away from them. One of the most common complaints of music listeners nowadays is that the studio versions of songs pale when compared to fairly basic live recordings. That's where I say something must have gone terribly wrong, unless the artist would have happened to evolve greatly in the meantime.

Let us, however, get back to digital look-ahead / brickwall limiting. There is one central problem with digital limiters: Nonlinear operations in the digital domain are not inherently band-limited.
Let me illustrate this with a simple example, a 10 kHz sine whose amplitude was increased 3 dB beyond the point of clipping. Clipping most definitely is a nonlinear operation.

[Spectrum of clipped sine]
Spectrum of clipped 10 kHz sine, fs = 44.1 kHz.

Oops. With clipping in the analog domain you would expect the original sine along with a long line of its harmonics – and nothing else. That would mean there would be nothing but 10 and 20 kHz components. Instead, we're getting a whole zoo of anharmonics here. As it turns out, clipping extended the signal spectrum beyond half sample rate, and that in turn means the excess components reappear as aliasing. You can think of the process as analog clipping followed by sampling without any kind of anti-alias filtering.
Let me borrow my spectrum for a "well-behaved" signal from Frequency domain considerations, reconstruction and aliasing:

             ^ power density
        __   |   __                       __       __
       /  \  |  /  \                     /  \     /  \  
...   /    . | .    \                   /    .   .    \   ...
     /     | | |     \                 /     |   |     \
    /      | | |      \               /      |   |      \
   |         |         |      |      |         |         |  f
 -f          0        f      f     f - f       f       f + f
   max                 max    S     S   max     S       S   max

The unclipped sine was such a signal:

              ^ power density
    .         |                     .                     .     
    .    |    |    |           |    .    |           |    .    |
... .    |    |    |           |    .    |           |    .    | ...
    .    |    |    |           |    .    |           |    .    |
    .    |    |    |           |    .    |           |    .    |
         |    |    |     |     |    |    |                         f
        -f    0   f     f   f - f   f  f + f   
          1        1     S   S   1   S  S   1  

The clipped sine isn't. Its harmonics "leak" into multiple repeat spectra.

              ^ power density
    .         |                     .                     .     
    ..   |    |    |    .      |    .    |           |    .    |
... .|   |    |    |    |    | |  . .    |           |    .    | ...
    .|   |    |    |    |    | |  | .  | |  .        |    .    |
    .|   |    |    |    |    | |  | .  | |  |    |   |.   .    |
         |    |    |     |     |    |    |                         f
        -f    0   f     f   f - f   f  f + f   
          1        1     S   S   1   S  S   1  
                        |    |    |    |    |    |    | 
                        2f  3f   4f   5f   6f   7f   8f 
                          1   1    1    1    1    1    1

The repeat spectra obviously grow the same harmonics (not shown), and it all becomes a big mess.

Similar things happen in a digital limiter. Smart people have therefore invented oversampling limiters. If you work at a higher sample rate, the chance of any high-frequency components generating aliasing is greatly reduced. Here's what you get if you clip our sine at 192 kHz (RMAA wouldn't accept 176.4 for some reason):

[Spectrum of clipped sine, 
192 kHz]
Spectrum of clipped 10 kHz sine, fs = 192 kHz.

Now let's reduce levels a bit (at least 1.3 dB proved necessary in this case) and resample to 44.1 kHz again:

[Spectrum of clipped sine, 
downsampled from 192 to 44]
Spectrum of clipped 10 kHz sine, fs = 192 kHz, downsampled to 44.1 kHz.

Here's what you get if you start out at 176.4 kHz instead:

[Spectrum of clipped sine, 
downsampled from 176 to 44]
Spectrum of clipped 10 kHz sine, fs = 176.4 kHz, downsampled to 44.1 kHz.

Now doesn't that look a whole lot more well-behaved than the mess we started out with?

[Spectrum of clipped sine]
Spectrum of clipped 10 kHz sine, fs = 44.1 kHz.

Another problem in non-oversampling limiters is that they generate intersample overs – peaks beyond full-scale amplitude that only show up in the signal's continuous-time representation (or when upsampling), with individual sample values being within the permitted range. On my "hottest" CDs, I have seen peaks up to +2.08 dB when resampling to 176.4k using SSRC (which is not too far off from the +3dBFS fs/4 test tone). Digital filtering and other processing, DAC and following analog stages must have enough headroom in order to avoid even further deterioration of signal quality.

Back to topics

Entry last modified: 2012-01-20 – Entry created: 2012-01-18

Yay! Podcasts for audio geeks!

So far, I haven't run across too many podcasts that would be of interest to audio enthusiasts. Well, to be honest, I found the first one last week – Home Theater Geeks with Scott Wilkinson. In each episode of typically an hour, Scott (video)chats with a guest from the ranks of industry veterans. With names like Floyd Toole, Bob Carver, Nelson Pass, John Atkinson and Tyll Hertsens listed, you bet it'll get interesting. Two video qualities and one audio-only version (64 kbit/s 44.1 kHz mono MP3, OK sounding and Rockbox-friendly) are offered for download.

The episodes I have enjoyed so far include:
#1, #9, #10, #14, #16, #17, #20, #22, #24, #29, #42, #51, #55, #69, #84, #90, #91, and #92 will probably be next.

It is obviously helpful to have some background so you don't have to take everything as gospel. Even veterans can be plain wrong once in a while (audiophiles in particular). It happens to (almost) all of us. Anyway, plenty of food for thought for sure.

Back to topics

Entry last modified: 2011-12-22 – Entry created: 2011-12-22

Rockbox – the audio enthusiast's (almost) ideal MP3 player firmware

Rockbox is an open-source firmware for MP3 players (more correctly called digital audio players) that has more recently also been ported to Android to be used as kind of a player application. In its fully-featured but functional and no-BS approach, it seems like the natural companion to the "Swiss army knife of audio players", Foobar2000. I'm a total fan, and let me tell you why:

So, are there any downsides? Well, of course.

Back to topics

Entry last modified: 2013-07-19 – Entry created: 2011-12-15

What am I listening to anyway?

For a music-related blog there's been precious little discussion of music here, don't you think? Then again, how interesting could the musical taste of a slightly weird egocentric technophile (and yes, headphone guy, no surprises there) ever be to the general public? Well, find out.

My parents had a modest record collection: Quite a bit of classical, some Elvis here, CCR, Beatles and 'Stones there, '70s pop like ABBA and Fleetwood Mac's inescapable "Rumours", prog-pop like Supertramp, ELO and Alan Parsons Project, electronic/instrumental from Jean-Michel Jarre and Mike Oldfield, and a bit of '80s stuff (like Springsteen's "Born in the USA" or some Chris Rea, and a Juliane Werding album with lyricist Michael Kunze – one of the few newer non-classical and non-folk things my mom likes). Nothing all too fancy there, getting some decent records in the GDR wasn't all that easy. The first CD would eventually be Roxette's "The Look" (again, not exactly music nerd territory but still something I might listen to out of nostalgia).

I could never get much into the Beatles, interestingly enough, and preferred classical, instrumental and prog-pop, with some CCR and ABBA sprinkled in (I never got a big ABBA fan but did like their "Dancing Queen" album, mostly identical to "Arrival"). My first CDs accordingly were classical, Mike Oldfield and Jean-Michel Jarre and the odd Roxette album.

Fast-forward to the present. In the meantime I became much more interested in music, fueled by the right kind of radio stations and ye olde interweb.

In terms of classical, I haven't progressed that much. The odd symphony here and there, and stuff like that. But hey, I still have a few decades till retirement. Coolest recording award: The 4th movement from Bruckner's 8th (Karajan / Preu▀ische Staatskapelle), captured on early stereophonic tape in 1944. While obviously restored, resulting sound quality is a lot better than you'd expect in a recording that old.

The non-classical department is mostly populated by sophisticated / prog-influenced (indie-)pop and folk acts with a female twist. The usual suspects include:

This list is not nearly complete, but I hope I haven't forgotten anyone important.

Soul, funk and stuff like that plus jazzy things tend to be covered by corresponding radio programmes, so there's not as much of these in my personal library.

Back to topics

Entry last modified: 2011-12-15 – Entry created: 2011-12-07

How-To: Getting the best out of your MP3s

While music playback on "grown-up" computers is likely to – and should – involve losslessly compressed material e.g. in FLAC or Apple Lossless nowadays, there still are plenty of places in which lossy data reduction formats (MP3, AAC, Vorbis) are a lot more practical. Contrary to popular belief, those actually do a pretty good job, provided your hearing is reasonably healthy. You should obey a few simple rules though:

Back to topics

Entry last modified: 2013-06-14 – Entry created: 2011-11-29

Are SHM-CDs a ripoff?

The SHM-CD format (Super High Material CD) makes use of some kind of special polycarbonate plastic with better optical properties than regular polycarbonate, which (of course) is supposed to give improved audio quality. Now ordinary CDs have been perfectly fine in terms of readability in the vast majority of cases, thank you very much, so it would probably take some very special conditions for this to matter. That, however, is not the part that angers me.

No, it's the audio material they put on there (which is what matters a great deal, as you'll hopefully agree). A quick search in the Dynamic Range Database shows that it's all over the place as far as dynamics go, with both a few original CD masters and a few real turkeys included. Improved audio quality, yeah right.

To add another example, today I was able to compare a 1987 (1984?) CD edition of Fleetwood Mac's million-seller "Rumours" to the SHM-CD edition. A look with Audacity quickly revealed that both must have come from the same 16-bit master, but the latter had apparently seen remastering and was approximately 3..4 dB louder, with peaks limited accordingly. No dithering. While this remaster is by no means a botch-job and would seem to be less heavy-handed than the 2004 one, I would have expected more considering the audio quality claims for SHM-CD. Now of course it would sound "better" to the uninitiated when compared to the CD (since it's simply louder), and it would probably be objectively better than the 2004 remaster, but that's some weird logic if you ask me.

Interestingly, after getting ahold of the 1990 German CD reissue of said record, it would seem this was mastered from an analog tape copy (of a digital master, judging from steep lowpass filter action at 20 kHz). Complete with DC offset and inverted absolute phase. This is lower in level and thus gives about 1 or 2 dB higher peak amplitudes than even the 1987 CD, but does sound rather muffled and even has a small dropout. I'll have to drag out the vinyl copy in order to determine which tonal balance is right, but it really shouldn't be as muffled as this. Funnily enough, the 1988 Greatest Hits CD is different yet again, with tonality being the same as the 1987 CD's but levels being lower, so peaks are somewhat better preserved still. What a mess.

Back to topics

Entry last modified: 2011-11-20 – Entry created: 2011-12-01

THD is dead, my friends – Audibility of distortion

THD (Total Harmonic Distortion) has been a standard way of condensing nonlinear distortion performance into a single number. It sums the power of all the harmonics a nonlinear device creates in addition to a pure sine wave. However, even many decades ago people noticed that what they were hearing correlated badly with this measure. Early weighting schemes that put more emphasis on higher-order harmonics were proposed as early as the mid-1930s, to be refined later on. Geddes and Lee's "GedLee metric" from last decade is one of the youngest ones.

The root to the disparity lies in human hearing, which is a nonlinear apparatus in itself. First of all it works in frequency domain, like a spectrum analyzer – however, it treats frequencies semi-logarithmically, in what is known as a "mel" or Bark scale (linear to about 500 Hz and logarithmic beyond). This also causes a major nonlinear effect, masking of frequencies – as sound waves travel down the basilar membrane, they pass the sensory cells for high frequencies first, and for low frequencies they have to pass all the others which also have some out-of-band sensitivity, the more the closer they are to the target cells (after which the sound is quickly attenuated). Hence, a tone at one frequency will cause a fake response in the region above it. This is not directly audible as processing has adapted to the problem, but it does increase hearing threshold in the affected region. See ISO 532B and DIN 45631.

Now it would be highly surprising if the auditory system didn't also have its share of conventional nonlinearity (distortion). There is nothing inherently symmetric here, so the expected distortion profile would be much like a single-ended amplifier's – dominant second harmonic, then dropping off quickly at low sound levels and less quickly at higher ones.

The Bryan / Parbrook studies from 1960 allow a glimpse at masking behavior, as they determined the level of detectibility for various harmonics of a 360 Hz fundamental (table reproduced from Human Hearing - Distortion Audibility Part 3):

dB SPL 2nd 3rd 4th
52.5 -44 -52 -52
60 -52 -57 -61
70 -47 -62 -67
76 n/a -54 -59

From these numbers it is obvious that audibility of harmonics is limited by two major factors:

  1. Frequency masking, as discussed, and
  2. Hearing threshold. For obvious reasons, if you can't hear the harmonic even by itself, you aren't going to pick it up when combined with its fundamental. (It's not as obvious as you may think though – in the funny world of hearing, a combination of two tones can be a lot more audible than either by themselves.)

It also seems like odd-order distortion is a few dB more audible.

Now what about higher-order harmonics? I conducted the most simple experiment possible, using Audacity for tone generation and level adjustment and my trusty Sennheiser HD580 headphones connected to a Terratec Aureon Sky soundcard for listening. As expected, a 440 Hz tone's 2nd harmonic at -40 dB was detectable but by no means strong, only giving the signal some "grit". It was definitely gone 20 dB below this level. 3rd, easily detected at -40 dB, had also gone by -60 dB. So far, it seems I'm a slightly worse "distortion listener" than the people on those studies, which does not surprise me.
Now the higher ones: 5th was just barely audible at -60 dB, as was 6th. 7th and 8th were still audible at -70 dB, requiring fairly high listening volume already (fundamental amplitude 0.8, Prodigy 7.1 driver main volume 43%, headphone channel gain -6 dB).

I guess you can see the trend. That's what makes slowly-decaying or near-flat distortion spectra (typical for output stage distortion) problematic. These tend to be dominant odd-order, too. And if the spectrum looks bad at low frequencies, high-frequency intermod isn't likely to be pretty either. Counting on sound transducer distortion to mask high-order amplifier distortion is pretty much futile, as that tends to be dominant low order (mostly 2nd/3rd), too.

As an audio equipment designer, you can only make sure that distortion stays below the worst-case envelope by at least 10 dB or so. You never know what kind of frequency response deviation the sound transducers may have.

Back to topics

Entry last modified: 2011-11-20 – Entry created: 2011-11-03

Engineer's Corner: Fun with Chip Amps

"Chip amps", power amplifier ICs delivering less than a watt to several dozen watts into typical speakers, are popular in DIY since they are compact and known-working circuits (which is something you'll appreciate if you don't feel like designing / debugging a discrete design). There must be dozens, if not hundreds of different types, but few of them are ever seen driving headphones. Let's examine a few that may find use as such:


The venerable LM386 is a small mono amplifier IC, usually in an 8-pin DIP package, that's been around since the mid-1970s. It offers gains in the 26 to 46 dB range, externally settable, and runs on a single supply voltage with a capacitor-coupled output. Originally from National Semiconductor, it or similar chips have been manufactured by everyone and their dog. Even NSC themselves offer multiple versions (I'd prefer the beefier N-3), and then there's the JRC/NJR NJM386 which is pin-compatible but is quite different internally (and, again, has a better-performing "big brother" called NJM386B). What a mess. Result, you're never going to know what you get if you find a random '386 chip in your junkbox (and that doesn't even include Intel's).

'386s have a reputation for being first-rate hiss and distortion generators. I guess the noise is rooted in the level shifting transistors at the inputs which run on very little current. Output noise level was experimentally found to be around 150 ÁVrms across the audio bandwidth at 26 dB gain, which translates to an equivalent input noise of 7.5 ÁVrms or input noise density of approximately 50 nV/√(Hz), definitely on the high side of things. (No wonder it's not specified.) It takes rather insensitive headphones to push that kind of a noise level into inaudible territory.

Nonetheless, LM386 equipped headphone amplifiers have long been a staple in band practising rooms and similar non-demanding applications. Noise levels become more acceptable when dropping the gain to 20 dB as the Headbanger amp circuit does (which according to simulation still is extremely stable, in agreement with the datasheet), and the bypass capacitor really helps keeping noisy power supplies in check (even though PSRR still is relatively pedestrian at lower frequencies when compared to typical opamp circuits).

As far as linearity is concerned, this chip is an interesting case. The less muscular versions like the LM386N-1 definitely struggle when trying to drive speakers, which is also reflected in the SPICE model that you'll find in the LTspice group. Linearity with 32 ohm loads (headphones) is better but still nothing much to write home about. There are ways of tweaking it though.

In its usual application, the NSC LM386 pretty much employs a single-ended input stage. While it does essentially have a differential amplifier, one half of it is merely used as a ground level shifter and for setting output stage offset.

[LM386: Equivalent circuit]
LM386 equivalent circuit as found in datasheet from National Semiconductor.

Have you ever wondered how the output stage "knows" that it has to operate around half supply? In this case, it's a simple trick:
By using a current mirror, they ensured that both non-inverting and inverting input transistors would run at the same current. Statically, both inputs will also be at ground level, and so both ends of the 1.35k + 150R gain-setting resistors will end up two B-E voltage drops higher, i.e. there is essentially no DC current running through these. From this point, it's two 15k resistors up to supply on the inverting input side (left), and one 15k resistor to the output on the non-inverting input side (right). The non-inverting input transistor can only draw current through that one 15k resistor. Hence the potential there will end up being pretty much exactly the same as on "bypass" pin 7, halfway between two B-E voltage drops up and supply! Simulation says that it should be about half supply plus 0.5 V.

Back in the day, many a single-ended pnp input power amplifier used input transistor collector current to set output stage offset, so the above technique should have been a lot less exotic than it might seem today. Not being able to choose input transistor Ic and feedback resistor independently can be annoying though.

I was looking for ways of improving device performance beyond the levels displayed by the "Headbanger" circuit. So I thought, "Why not use the thing like an ordinary op-amp?", cranked up the loop gain and added an external feedback loop. (I probably wasn't the first one to come up with that idea.) So I modified the example circuit accordingly and simulated it:

[LM386 used a bit 
LM386 used as op-amp, 20 dB gain.

Resulting simulated distortion improved by at least 10 dB over the "Headbanger" circuit, not only in quantity but also in quality (distribution of harmonics). Since there is no free lunch, I had to tame a high-frequency response peak, and getting the affair stable for capacitive loads greater than 22 nF (which already is about 10 times as much as I'd expect for any headphone cable) involved a 1 ohm series resistor. Dropping gain to less than 20 dB expectedly makes things a lot more critical still, so I wouldn't recommend that.


The '70s brought about quite a number of small chip amps. There were many radios of all kinds that appreciated them. One of them was ST Micro's TBA820M, a mono effort in a DIP-8 package, also sold as Samsung KA2201. In spite of having no more pins than the LM386, this part squeezed in the ability of restricting bandwidth via an external compensation capacitor including VAS and output stage, and would accomodate an external bootstrap capacitor for increased output voltage swing near supply – all this while keeping external bypass and gain setting and having reduced input noise (3 ÁV across the audio bandwidth) and more output power. With less noise, minimum recommended gain was increased to 34 dB, but given that the circuit uses external compensation, it shouldn't be too hard to adapt to lower gains.

[TBA820M equivalent schematic]
TBA820M internals, taken from datasheet.

Now that's a bit fancier looking than ye olde LM386, isn't it?

The input stage is nothing too extraordinary by today's standards, a differential amp (Q2/5) with current source (Q6) and current mirror (Q3/4), with a level shifter transistor (Q1) on the input side so it'll accept input down to -0.3 V and change. When simulating circuits like these, I had big trouble with input stage distortion. Eventually I found out that both the level shifter and differential amp transistors had to be types with low saturation voltage (Is), which in hindsight makes a whole lot of sense – this means maximum B-E voltage drop at a given current, hence maximum Vce for the differential amp transistors and thus maximum accepted negative input voltage swing before saturation.

Setting output offset is a current mirror affair not too dissimilar from what the LM386 does. A dual-transistor current source (Q8/9, R4) establishes a reference current which is then mirrored elsewhere via a diode (Q7) to be used for input stage, VAS and output stage bias. Now Q9's current, which comes from supply via 5k9 (R2) and 6k (R3), is mirrored by Q10. Q10 in turn can only draw current from the output via another 6k (R5), hence the output ends up at pin 8 potential, as in the LM386. (Yes, I neglected Q5 base current, but that would contribute no more than 1% here.)

Transistor Q11 does voltage amplification stage (VAS) duties, with Q12 being its current source. Miller compensation, requiring an external capacitor, stretches across both VAS and output stage. This bears some risks WRT stability (capacitive loading in particular), but also allows bandwidth limitation without degrading linearity a whole lot.

The output stage is a quasi-complementary affair, as in most any IC power amp to this day. Seems like npn transistors still are more efficient when it comes to die area per power handling. Let's look at both halves separately.

The lower half (current sink) essentially is a CFP arrangement (Q13, output driver Q15), with an additional level shifter thrown in (Q14), plus a two-diode level shifter (D3/4) and bias current source (Q16). The extra parts are needed for two reasons:

  1. Q14 essentially replaces a Baxandall diode, which reduces nonlinear distortion by ironing out an ugly kink near crossover in the quasicomp stage's transfer characteristic (CFP then more or less mimicks EF).
  2. With the level shifting, output level can swing down all the way to Q15's saturation voltage, only about 0.3 V from ground. In amplifier ICs powered from small supply voltages, that's important.

The upper half of the output stage (current source) is a relatively standard 2-stage emitter follower / Darlington affair (Q17, Q18, R6, bias via D1/2, bias current source Q12) – with a little twist that, again, is intended to increase voltage swing. You've probably noticed that there are two distinct positive supplies – main supply is on pin 6, and connects to the secondary supply on pin 7 via an external 56 ohm resistor. Pin 7 also has an external 100 ÁF capacitor going to the output, a prime example of the technique called "bootstrapping". While statically the secondary supply will be a little below main supply (no real heavy loads there so the drop across 56 ohms won't be too big), dynamically the output signal will be superimposed on it. This means that secondary supply may swing up to almost 150% of main supply, always providing enough "headroom" for Q18 to be biased properly. Thus the output can come as close as Q18's saturation voltage to main supply, like we saw on the current sink side.

Bootstrapped supplies are neat, but the obvious downside is that a relatively big electrolytic capacitor is needed unless you were willing to run your speaker load between output and main supply. The technique also shows its limits once you get to very low supply voltages (less than 3 V), then current source topology needs to be changed for a lower minimum voltage drop.


You can, however, even squeeze a stereo power amp into a DIP-8 package, which became interesting in the '80s. NJR's NJM2073 was one example, ST Micro's TDA2822M is another. (A TDA2822 sans M is a bigger 16-pin affair that is better suited to getting rid of heat.) Just the minimum of connections here, and an internally-set gain. The NJR part's datasheet shows a way of reducing gain externally, but minimum stable gain is officially limited to about 26 dB.

[Gain-reduced NJM2073 circuit]
Gain reduction for NJM2073 as shown in datasheet.

The same way of gain reduction applies with the TDA2822M, and it seems that this part can take significant amounts of resistance added to its input ground pin – up to 5k6, which should translate to little more than 6 dB of gain. (At this point, a compensation capacitor of maybe 33 pF from output to inverting input seems to be advisable.) Input noise is given as 3 ÁV with a 10k source resistance, translating to about 16 nV/√(Hz) – still not exciting, but about 10 dB better than the LM386 at least. Plus, the thing is dirt cheap nowadays, so you can afford to fry one. Sounds like the right chip for a cheap and cheerful headphone amp, huh?

You can actually buy one as a kit with the Samsung equivalent KA2209 if you're in the UK, with the options of using either stock (40 dB) or reduced gain (20 dB). The measurements given look pretty good, and most importantly noise should be more than 6 dB lower than for a LM386-based amp. At 30 ÁV output noise, only reasonably sensitive headphones from about 110 dB SPL / 1 Vrms up should show any audible hiss. (At stock gain, the chip's noise can only be tamed by my least sensitive 600 ohm cans.)

The TDA2822M's inner workings aren't too hard to grasp once you've studied the TBA820M's above. Output offset setting still is sort of a current mirror arrangement (R3, D6, Q12/13, R1/2, R4/5), though Q/D device characteristics would now come into play. For lack of a bootstrapped supply, the output stage's upper half (current source) had to be changed; output swing extends to about 1 V from positive supply, which is not grand but saves one B-E voltage drop (0.6 V) at least. Some parts of the schematic have been boxed up to reduce visual complexity, which is a bit of a pity as I'd certainly like to know how the quiescent current control works.


An LM1876 is a seriously "grown-up" two-channel chip amp of hi-fi quality that can deliver 20 W into 8 ohm speakers and is operated from a split power supply. Its input noise level of about 1.7 ÁVrms(A) (calculated from SNR) is a little lower than the TDA2822's, about 3 dB or so. Power supply rejection is on opamp level.

This is an unusual part to use in a headphone amplifier, but various Lake People amps use the LM1876 as an output buffer with 8 dB of gain. I guess they had to use an external compensation capacitor or "bleed off" some open-loop gain with a small cap across the inputs for this to work, since ICs like that usually have a minimum stable gain of 20 dB. Then, however, you end up with an output buffer that can really take a beating while giving entirely non-critical output noise levels and low output impedance. Smart move.

Interestingly enough, all the chip amps presented so far have one thing in common: An oldschool quasi-complementary output stage! Those have not been used in commercial discrete amplifiers since the mid to late 1970s, as "real" complementary topologies tended to give lower distortion. I guess going all NPN for the power transistors still is the best option when die area is in short supply. You can usually tell the two topologies apart by looking at the distortion spectrum under heavy output loading – very symmetric amplifiers (up to all-complementary push-pull concepts) will have dominating odd-order harmonics, while for very asymmetric ones the even harmonics will dominate. Our hearing seems to mask even-order distortion a bit better.

Back to topics

Entry last modified: 2011-11-21 – Entry created: 2011-10-29

Engineer's Corner: Pole Splitting in a Nutshell

I'm sure those dabbling in discrete amplifier circuits have seen the term "pole splitting" thrown around. You move one pole down in frequency which in turn shifts a second one up so you don't have to shift the first one quite as far down to achieve stability (Miller compensation). Sounds kinda complicated, doesn't it? So how does that work, and why?

[Pole splitting: Example circuit]
Circuit in which one might apply pole splitting.

Here's a typical circuit configuration in which pole splitting might be employed. You may recognize it as the VAS and half the output stage in an typical audio amplifier.

First, let's look where the second pole comes from. That's easy. Your typical output stage transistor is a little bigger and thus may have input capacitance in the hundreds of pF, and the output resistance of a common emitter stage would typically be tens or hundreds of ohms.

[Pole splitting: Second pole]
Origin of second pole.

Now for the first pole. It originates in feedback capacitance (transistor Ccb), typically low pF range for an average small-signal transistor. Input capacitance is effectively increased via Miller effect, as Ccb is seen multiplied by voltage gain.

[Pole splitting: First pole]
Origin of first pole.

Now for the "trick" employed in pole splitting:
If we artifically increase first-stage feedback capacitance, not only will its pole be shifted down in frequency, the increase in feedback at higher frequencies also decreases its gain and output impedance. Now the output impedance (resistance) together with the second stage's input capacitance was responsible for the second pole. Hence that one promptly moves up in frequency! Neat, huh?
Besides, you typically need a pole for dominant-pole (Miller) compensation anyway, so our first stage is an ideal place to apply it. Two birds, one stone.

This is useful because the output stage is usually the slowest part in an amplifier, i.e. its pole is lowest in frequency. If you get that one moved up, less compensation is required overall in order to achieve closed-loop stability, i.e. you can afford a higher gain-bandwidth product. That in turn reduces nonlinear distortion.

Now you should be able to understand the usual formal explanations of the topic a whole lot better.

(And yes, I noticed that my illustrations are BS and need to be redone, even if the basic idea is correct. You'd think that an engineer should usually be able to get his current and voltage sources sorted out. Usually.)

Back to topics

Entry last modified: 2012-06-03 – Entry created: 2011-10-27

What's so great about "Class A"?

Any audiophile is likely to have encountered the term "Class A" in the context of amplifier circuitry. Now Wikipedia is likely to tell you most anything you (n)ever wanted to know about class A, B, AB and all the rest, but today I want to look at the topic in the greater scheme of things.

Do you know these "pick two out of three" scenarios that seem to pop up in the most impossible places? Here's another:
Low nonlinear distortion, low circuit complexity, low operating current – pick two.

That's pretty much what it boils down to.

Class A picks the first two at the expense of the last one. Getting any noteworthy amount of power out of circuitry with a Class A output stage involves quite a bit of input power and things getting nice and toasty. In return, a handful of active components may give very decent results already, like this John Linsley Hood 5-transistor headphone amplifier. Back in the olden days, semiconductors were expensive – as were the vacuum tubes preceding them.

At the opposite end, there's the kind of circuitry that does a pretty good job driving headphones to several hundred mVrms in portable MP3 players, with a quiescent current somewhere in the single-digit mA. Low currents make semiconductors slower and reduce amplification, thus you can't apply as much feedback without things getting instable. To make matters worse, running a typical output stage at a low quiescent current increases its distortion. There is only one way of keeping distortion down under adverse conditions like these: Use the high level of integration that's possible today and increase circuit complexity and pull all kinds of topological tricks.

Any practical solution is likely to be somewhere in between these extremes. If you wanted to build a headphone amplifier that performs well without being too complex or overly power hungry, for example, you might go with something involving an op-amp IC and a discrete AB output stage.

Back to topics

Entry last modified: 2011-10-22 – Entry created: 2011-10-22

X-Fi "machine gun" / "buzzing" noises: A fix?

A number of X-Fi soundcards (whether from Creative or Auzentech) seem to develop an annoying problem after a while, especially those not yet shipped with a heatsink for the EMU20Kx chip:

Instead of audio, they only output a loud, machine gun like noise. This may only occur sporadically at first, until eventually it does all the time.

So far, it appears nobody has come up with a good explanation, except that the problem must have a thermal background of some kind, as the cards with heatsinks are affected much less frequently.

Here's my two theories:

  1. The X-Fi chip gets too warm, deteriorates and eventually becomes flaky above a certain temperature, as half-dead semiconductors like to do. That's the boring one.
  2. I noticed that the EMU20K2 chip on the Auzentech X-Fi Forte comes in a BGA (ball grid array) package. Now the combination of BGA and thermal stress rang a bell, bigtime. Ever since manufacturing went lead-free, this combination has been causing a lot of trouble. Remember flaky XBox 360s? Or Power Mac G5s acting up? Or a bunch of Thinkpads with "flexing" issues? Essentially thermal cycles eventually lead to cracks in the solder, with all the problems that may bring.

If theory #2 is correct, there is a chance of fixing affected cards. This fix would involve two steps:

  1. Resolder card in a reflow oven. Enthusiasts have been known to construct ones at home, but keeping a well-defined temperature profile is another matter. Soundcards also have plenty of electrolytic capacitors, which shouldn't be exposed to soldering temperatures for very long at all.
  2. Once the card is confirmed working again, install heatsink on EMU20Kx with thermal glue.

Back to topics

Entry last modified: 2011-10-22 – Entry created: 2011-10-22

My dear audio equipment tweakers…

Modifying audio equipment for (supposedly) better performance has become kind of a sport in the audiophile community, at least among those able to tell the two ends of a soldering iron apart. Even the enthusiast with no soldering abilities is commonly provided with tweaking opportunities right from the factory, like socketed opamps to allow "opamp rolling" (analogous to "tube rolling" among the fans of hollow state devices). Now while the latter usually doesn't do much harm (as the manufacturer will probably have taken care of the usual pitfalls), more advanced hacks come with their share of problems.

Let's be honest, most of the time people don't really know what they're doing. They'll swap out parts for what they consider to be "better" based on hearsay, and do away with some that they consider potentially detrimental. Usually they have no idea of what kind of improvements to expect (or the wrong one), and few ever bother with verifying performance even if they'd be able to. (Obviously, some things like EMI testing are way out of reach for the average hobbyist.) They'll usually judge things by ear, usually hearing massive improvements – yeah right. Ever heard of placebo effect?

As an engineer, I cannot regard most of these "mods" as more than mindless tinkering. So you've got a soundcard that looks like a porcupine tree – great, but you probably have no idea whether it performs any better or worse than the original, in which aspects and why. You only know that the whole affair cost you money in parts plus some of your time. Not terribly satisfying if you ask me.

The usual procedure for modifying a piece of equipment would be:

  1. Quantify performance.
  2. Study (reverse-engineer if necessary) circuit. Identify potential bottlenecks and possible causes for them.
  3. Work out a modification that eliminates one bottleneck at a time and apply it.
  4. Verify performance. Identify changes, if any. Discard and undo worthless or detrimental mods.

Any mods that do not follow this scheme in some way are probably worthless and should not be published as a example for others to follow. I can think of very few mods with immediately audible effects, mostly things like changing output resistance or previously overly small coupling capacitors, so usually measurements will be necessary.

When can you expect to achieve any noteworthy improvements anyway? Well, pretty much under the following conditions only:

Do not, in general, expect to be smarter than the original designer. Usually the folks who construct basically well-performing electronics aren't dumb. Too many modders seem to think that they are – and if that isn't foolish I don't know what is.

Back to topics

Entry last modified: 2011-10-22 – Entry created: 2011-10-20

About development of musical taste

Ed. note: This topic is scientifically covered by sociomusicology.

Teaching an old dog new tricks is, as you'll probably know, a non-trivial affair. Given how much we pick up in our youth, it shouldn't be surprising that musical taste is shaped along the way and evolves in a similar manner.

Up to the onset of puberty, kids absorb influences better than many a sponge. Thus if you (more or less) "get" a style of music by age 12 or 13, you won't have a problem with it later in life. If, however, you'd never even heard of it at this point, there is a non-zero chance that you'll never like it.

About age 12 or 13 seems to be quite typical for really getting interested in popular music of some kind. Listening habits develop and change as the kids themselves do. There still is lots of opportunity to pick up new musical influences here, but they may already be concentrated in a smaller range.

The next phase typically starts in the early 20s. By then, raging hormones have typically calmed down a bit and world view is no longer is gloomy as it once was. With a more open mind, looking beyond "angry young men's music" (or whatever else dominates adolescence) becomes more enticing again. Typically having some spare cash doesn't hurt either.

It would be very unusual to see any kind of dramatic changes beyond about the age of 30. At this point, musical tastes seem to be settled down fairly well – unsurprisingly so, since people tend to be quite busy in other areas (work and family and such). You may still encounter gradual changes in the following decades, depending on how much interest in music there was to begin with and how open-minded people remain.

Back to topics

Entry last modified: 2011-10-20 – Entry created: 2011-09-09

Separate songwriters and performers or all original material – what's best?

And the answer is: 42.

As you may have guessed by now, it very much depends on the circumstances and whatever the goal is. Both approaches have their merits.

Lately I was looking at German folk music and found that work was typically split about as far as possible: Lyricist, composer, performer. Back in the 18th and 19th century, it was not at all unusual to reuse older melodies (sometimes hundreds of years old), or compose a new tune for a text that could be several decades old.

Now folk music being what it is, ordinary people had to be able to sing it, which highlights an important aspect: Interoperability. The further all the people involved are apart, the more things have to stick to some sort of standards. In return, you potentially get the typical advantages associated with division of labor (a rather successful concept among humans and other lifeforms alike). You are much more likely to find a good lyricist, a good composer and a good performer compared to a single person equally talented and with equal experience in all three fields. That also is why it takes a genius of a bedroom producer to rival a big studio's output. Since nowadays most any self-respecting artist tries to come up with original material, there's a good bit of mediocre output floating around.

On the flipside, a singer-songwriter's output can be a lot more personal (and still be as good as anything). There's an arbitrary number of songs out there which are arbitrarily hard to cover for various reasons (for example, try singing something like Kate Bush's "Kite" if you don't have the vocal range it requires – good luck). With the advent of music recording, the requirement for songwriter / performer interoperability more or less evaporated. It will, however, not disappear entirely as some demand for sing-along songs does remain.

In this context, it is interesting to note the different approaches in building up a pop star. In the US, you commonly find the classic "top-down" approach: Record company finds person with performing talent, sticks them in some drawer (people sure love their genres over there, and I guess they can afford to because there's so much personnel to begin with) and has songs written to them. Sometimes it works (don't think people like Michael Jackson wrote all of their stuff), but frequently the result is yawntastic.
In the UK, things are more commonly handled "bottom-up" – the artist carves out a little niche, and it's very much a self-made (wo)man affair.

Back to topics

Entry last modified: 2011-09-09 – Entry created: 2011-09-09

Youtube memes

Youtube commenters, widely known to be about the smartest people you'll find on the interwebs, are good for some amusing social phenomena. Those who like to watch music videos on there (it's a unique tool for exploring the world of music, isn't it?) are likely to be familiar with the following…

  1. "What a shame kids today don't know this any more…" – is how it started out. Some time later you started seeing comments like…
  2. "Hey, I'm 13/14/15 and I listen to <this and similar artists>!" – which nowadays seem to be countered by
  3. "Oh, just shut up, OK?"

In accordance with step number three, mention of $infamous_pop_star_of_the_day (Justin Bieber, Lady Gaga) has also been decreasing – thankfully so.

Entry last modified: 2011-09-09 – Entry created: 2011-09-09

Remasters that are safe to buy

As a general rule, I do not touch remastered CDs with the proverbial 10-foot pole if I can help it. Usually the loudness levels of those produced in the late 1990s through the 2000s were adapted to contemporary tastes, which more often than not means that dynamics have suffered. Now for any rule, there are exceptions, of course.

It looks like the era of "pushed" remasters may slowly be coming to a close. If so, it was about time.

Back to topics

Entry last modified: 2011-09-04 – Entry created: 2011-09-04

Gender relations in popular music

Most populations on this planet have about a 50:50 gender ratio, give or take a few percent. Now from my experience, females are more likely to be drawn to arts of all kinds than males. Hence you would expect at least parity between genders in music, wouldn't you? Interestingly enough, this doesn't seem to be the case – for example, Kate Nash in her Rock 'n' Roll for Girls After School Music Club video, cites a number of 14% (that's about 1 in 7) of performance royalties collected by PRS going to women.

However, changes already are well underway. Look at female drummers, for example. They used to be quite exotic even 25 years ago – not any more these days. In the future, I would expect male domination in music to fade away even more than it already has. Get used to it, folks.

Now speaking of gender relations… apparently the worst thing you can do as a straight male is enjoying music that's leaning more towards the female side. (There's a limit to everything, of course – it tends to get pretty boring when approaching classic "girly" stuff. You know, relationships, relationships and, err, more relationships. If they're packaged in an interesting way, I'm fine with that though.) Nobody has a problem with girls being into punk rock, heavy metal or other traditionally "male" genres these days. The opposite tends to get you looks like you've got three heads or something, from both genders alike no less. (And you know what happened to the Hydra in Greek mythology...) Hey, I'm a science kid – I don't need testosterone dripping out of my music left, right and center, 'k?

What little music I had in my youth was mostly classical, instrumental (e.g. Mike Oldfield) and some both-genders-alike pop (like Roxette – the stuff you like as a kid…). With that kind of background, I was easy prey to Kate Bush many years later (I didn't actually become overly interested in music until my early 20s). The rest, as they say, is history…

Let's see what my music library has to say on the subject. I made a list of artists and grouped these as "female solo artists", "female-fronted bands", "male-fronted bands", "male solo artists" (including several classical composers), plus the rest without a distinct gender or with both being present about equally. Rinse and repeat for a number of artists still waiting to be added.

Artist type Music library To be added Total
female solo 51 12 62
female-fronted 27 3 30
male-fronted 41 0 41
male solo 38 4 41
indifferent 8 0 8
Total 165 19 184

Interestingly enough, in spite of my music collection leaning quite heavily towards female artists, the disparity isn't all that large – yet. It would seem to be growing in the future.

These numbers do not show the respective typical target audiences, of course. That would be interesting, but not terribly easy to determine.

Back to topics

Entry last modified: 2011-08-20 – Entry created: 2011-08-20

Engineer's Corner: Op-Amp Gain Error at High Frequencies


Recently I stumbled across an old edition of EDN Europe magazine that had an article on op-amp gain error. While technically correct, it still left me with a big question mark floating above my head – why was it like that? So I proceeded to turn the interwebs upside down, collect the information needed and grab a good ol' spreadsheet. Let's turn that question mark into a lightbulb, shall we?

The gist of the above article is: If we need a small-signal bandwidth of X in our op-amp based amplifier circuit, and then choose an op-amp that has a gain bandwidth product (GBW) of only a wee bit more than the rule-of-thumb minimum of X times non-inverting gain (noise gain), we need not be surprised if actual closed-loop gain is up to 6 dB less than intended when approaching frequency X. Let's examine why.

Part uno: A look at closed-loop gain

Here's an expression for closed-loop gain of a circuit using a differential amplifier of finite and frequency-dependent open-loop gain A(f) in a non-inverting configuration:

G = ----------
    1 + A(f)×β

…where β, our feedback factor, is simply the inverse of nominal non-inverting gain or noise gain:

     1       g
β = --- = -------
     G    R  + R
      N    f    g

…with Rf and Rg being the feedback and ground resistors you'll see in the non-inverting op-amp circuit. In other words,

       A(f)             A(f)
G = ---------- = G  × ---------
         A(f)     N   G  + A(f)
     1 + ----          N

In terms of asymptotic behavior, we find

G → G ; A(f) >> G
     N           N

(phew!), and

G → A(f) ; A(f) << G .

Finally, let's examine two specific values of A(f):
Firstly, A(f) = 1, which happens to be our definition of unity-gain bandwidth:

G = ------ ; A(f) = 1
    1 + G

Next, A(f) = GN, i.e. the point where open-loop gain is down to desired closed-loop gain:

G = --- ; A(f) = G
     2            N

Here closed-loop gain is already down by not 3, but a whopping 6 dB!

Part due: Examining Open-loop gain

In most of ordinary voltage feedback op-amps, open-loop gain follows a first-order lowpass response with a high initial value AOL (commonly around 1E5) and low corner frequency fc (in the 10s or 100s of Hz), due to the compensation applied. The response is determined by a constant gain-bandwidth product (GBW) over a large frequency range, not uncommonly from 100s of Hz well into the MHz range.

A(f) × f = GBW = const

In other words, we get this handy expression for A(f):

A(f) = ---

If we go all out with the math and derive a proper first-order lowpass response, we obtain

A(f) = --------------------------
            / /    / A      \2 \
           / |    |   OL     |  |
       _  /  |1 + |  --- * f |  |
        \/    \    \ GBW    /  /

…which thankfully reduces to the above for f >> GBW / AOL.

Now I don't know about you, but I'd much rather stick with the simple formula for the time being.

Part tre: Putting it all together

Now we have everything we need. At this point we can already whip out the spreadsheet and have our open loop gains computed for a range of frequencies and a given set of op-amp AOL, GBW and desired GN, which can then be used to compute closed-loop gain, plus fun stuff like its deviation from nominal in dB and all that jazz.

Now where's that -6 dB point that we examined earlier? That's easy, here are the relevant formulas again:

G = --- ; A(f) = G
     2            N
A(f) = ---

From those it follows pretty clearly that

f  = ---
 6    G

…which is exactly our gain-bandwidth rule of thumb. Thus our estimated bandwidth is at -6 dB! If you need less than 3 dB of deviation, you're well advised to stay a factor of two lower, or a factor of 4 for -1 dB.

Therefore an audio amplifier with a gain of 10 that's supposed to be flat to -1 dB to 20 kHz would have to have a rule-of-thumb GBW of

GBW = 4 × f  × G  = 4 × 20 kHz × 10 = 800 kHz
           1    N

(In this case the dominant consideration in real life would be nonlinearity, as suppression of nonlinear distortion cannot be higher than whatever the "spare" open-loop gain is. Ideally you want at least 40 dB at 20 kHz, which would necessitate a GBW of 20 MHz here. This is also about the maximum you'll find in typical audio op-amps, in the interest of stability. More advanced designs employ additional internal feedback for reduced distortion.)

Back to topics

Entry last modified: 2011-08-03 – Entry created: 2011-07-29

Stroboscopic speed indicators explained


You'll see them on most any halfway "serious" turntable / record player: Stroboscopic speed indicators with a little neon or glow lamp and a pattern on the side of the disc platter that you have to make "stand still" for speed to be accurate. But how does that work? And how close to the real deal can you get?

[AT-LP120-USB turntable platter]
Strobe pattern on turntable platter.

(Audio Technica AT-LP120-USB image reproduced courtesy of CNET.)

Basic operation

The basic principle is simple:
The lamp (strobe light) flashes periodically, usually once per mains frequency cycle. It then briefly lights up the periodic pattern. (Human vision has the peculiar property of retaining images that flash up shortly but brightly for some time, which helps here.) If this is supposed to appear standing still, it has to move by exactly one division per cycle – or two, or any other integer number of divisions.

Does that remind you of something? Well, of course, that's sampling! With aliasing!
Looking at it in frequency domain, a sine at sampling frequency (or its multiples) is aliased down to one at zero, i.e. one that is standing still. And that's exactly what we get.


So how many divisions of platter circumference do we need? Apparently just as many as we have mains cycles in the time the platter takes to complete one rotation, or an integer multiple:

Ndiv = n * fmains * Tr; n ∈ {1, 2, 3, ...}

With rotational speed typically given in RPM, that means

N    = n * ------ * 60 s; n ∈ {1, 2, 3, ...}
 div        RPM

With this formula, calculating the minimum number of divisions required for common RPMs and mains frequencies is hardly rocket science:

331/3 rpm 45 rpm 78 rpm
50 Hz 90 200 * ≅77 **
60 Hz 108 80 ≅46

*) n = 3.
**) n = 2.

But hey, what's up with 78 rpm? Simple, you can't match it exactly within a reasonable number of divisions. You have to be content with 77.922 rpm or 78.261 rpm, respectively. (For an exact match, you'd have to go up to n = 13, and that would result in 500 and 600 divisions, or <=2 mm per division on the outside of the platter. Not exactly a joy to manufacture, I imagine. Besides, the adjacent "stand-still" points would be at 72 and 84 rpm, so the speed would be very hard to ballpark.) Now given the variations in RPM among 78s, that's probably small potatoes. Let's hope you've got someone with perfect pitch at hand if you don't have it yourself.

Now if you were looking at the image of the real-life strobo pattern earlier, you may have noticed that it does not correspond to the numbers given above. Instead, it appears to be n = 3 throughout, which would give the following division numbers:

331/3 rpm 45 rpm
50 Hz 270 200
60 Hz 324 240

Interpreting pattern movement and adjustment accuracy

So what about speed deviations? As it turns out, any observed slow pattern movement can be treated as being linearly superposed upon the correct rotational speed. Or in other words, real platter edge velocity is nominal platter edge velocity plus strobo pattern movement velocity (positive if clockwise).

vedge = vedge,n + vdrift

Therefore, if you know the platter diameter D and observe a certain amount of pattern movement (drift) vdrift, it is easy to calculate the speed difference:

ΔRPM = ------ * 60 s

For example, a 1 mm/s drift to the right (counterclockwise) on a platter 310 mm in diameter indicates that speed is slow by 0.0616 rpm, or -0.18% at 33 rpm.
Since a drift in that order still is quite easily visible, it should be possible to get it down by another factor of 3 at least, so we're looking at a minimum deviation of 0.06% (600 ppm) or less. For reference, the audibility threshold is considered to be about 0.3%, so we're comfortably below that.

Of course there still is one variable that we have no control over: Mains frequency accuracy. This may vary depending on where you are. I have measured 50.00±0.02 Hz here (within ±400 ppm), but you cannot take that kind of accuracy for granted. Usually only the total number of cycles over a 24-hour period will be very tightly controlled (i.e. ∫f rather than f), for mains-sync'd clocks to be accurate. In extreme cases, deviations of up to 0.8% may occur. So if you want to be absolutely sure, you'll need a crystal-controlled strobe.

Valid speed range

Now for any formula, you typically want to know where it holds. Earlier I mentioned that there would be other stand-still speeds which are not the same as target speed. So where do those come from? Let's recap how we picked the number of divisions:

N    = n * ------ * 60 s; n ∈ {1, 2, 3, ...}
 div        RPM

This gives us a set of fixed values {Ndiv, n, RPMn}. RPMn is nominal RPM, n the value chosen for this speed, and Ndiv is the resulting number of divisions, of course.

With a given number of divisions, that's easily solved for RPM:

RPM = m * ------ * 60 s; m ∈ {1, 2, 3, ...}

As n is now considered fixed, we have substituted it by the variable m.
We will now express Ndiv as a function of nominal RPM RPMn and the value of n that belongs to the selected value of Ndiv:

N    = n * ------ * 60 s; n ∈ {1, 2, 3, ...} fixed
 div        RPM

Now let's put that into the previous equation:

RPM = --- * RPM ; m ∈ {1, 2, 3, ...}, n fixed
       n       n

Or to make things even more clear:

RPM = m * ------ ; m ∈ {1, 2, 3, ...}, n fixed

When we picked n > 1, the lowest stand-still RPM dropped by the same factor. Now remember that the whole affair is periodic in frequency, and lowest stand-still RPM determines periodicity. Therefore, the pattern drift speed and direction will only indicate the correct deviation from nominal speed in a band of width RPMn / n around RPMn.

    !               1                  1   
RPM ∈ ( RPM * (1 - ----) ; RPM * (1 + ----) )
           n        2n        n        2n  
v      ^                    
 drift |                    
+v    -+- -.- - - - . - - - . - - - . - - - - -
  max  |  .        /       /       /       .
       | /        /       /       /       .
       |/        /       /       /       .
    0 -+- - - - / - - - / - - - / - - - / - - -
       |       /.      /.      /.      / 
       |      / .     / .     / .     /  
       |     /  .    /  .    /  .    /   
-v    -+--...---|---.---|---.---|--------...--->
  max  |   n-1  |   .   |   .   | n+1        RPM
       0   --- RPM  .  RPM  .     --- RPM 
            n     n .     n .      n     n
                    .       .
                    .  RPM  .
                    .     n .
                    .  ---- .
                    .   n   .
n 1 2 3 4 5 6 7 8 9 10
1/2n 50% 25% 16.67% 12.5% 10% 8.33% 7.14% 6.25% 5.56% 5%

Real-life record players tend to have pitch adjustment ranges of maybe ±10% to ±12%. As you can see, anything much beyond n = 4 is problematic. At n = 13 (as would be necessary for 78 rpm) we're down to a valid indication range of a mere ±3.85%.

Back to topics

Entry last modified: 2011-06-19 – Entry created: 2011-06-17

How audio equipment specifications can help you (2)

If the first part of this series went right over your head, no worries – here's your chance of catching up with the help of a simple real-life example.

Let's say we want to assemble a headphone listening system with a signal source S, an amplifier A and a headphone model H. Will this be sufficiently loud?

First let's look at a system-level model of the whole affair:

+--------+    +-------+    +--------+
| Source |    |  Amp  |    | Trans- |
|        |V   |       |    | ducer  |
|        | out|  |\   |    |   _/|  |
|  /\/   |--->|  |/   |--->|  |_)|  |---> Sound
|        |    |       |  Z |    \|  |
|   G    |    |  A    |   T|   G    |
|    S   |    |   V   |    |    T   |
+--------+    +-------+    +--------+

Transducer is a fancy name for something that converts electric power into sonic power or vibration (and vice versa if need be – many of them are reciprocal, which is the fancy way of saying that it works in both directions).

So what do we need to know?

Phew. Still with me?

Now for the numeric example I promised:

Will this be loud enough?

First let's see what we get out of the amplifier at maximum gain for a 0 dBFS signal (sine-referred). That's approximately 6.5 Vrms. This is below maximum output, and into 600 ohms only requires about 10 mA of RMS output current, so the amplifier would be expected to drive that kind of load with ease.

At this point we are getting about 70 mW of power per channel into the headphones, which is close to but still short of their maximum rating.

Computed output volume is 112 dB SPL. Even with loud passages being at -10 dBFS, we thus get over 100 dB SPL if need be, which is really loud.

Now let's try these same headphones on an MP3 player that gives us 600 mVrms maximum for a 0 dBFS sine. In this case we're hardly getting to 92 dB SPL, and chances are we won't get very much beyond 85 dB SPL on real-life signals. That's a bit tight.

Back to topics

Entry last modified: 2011-05-31 – Entry created: 2011-05-31

A few places related to audio equipment measurements on the web

Here are a few new(ish) ones that I've been enjoying lately.

And here are some other resources that I've known for a while longer:

Back to topics

Entry last modified: 2012-01-12 – Entry created: 2011-05-31

Testing for processing headroom in digital audio players

It should be fairly well-known by now that FFT-based audio data reduction formats like to increase peak levels. The classic MP3 format is particularly notorious for this. With some loudness war victims, I have seen peak levels of up to 1.5 times fullscale (+3.6 dBFS) in LAME -V 6 quality. Needless to say, those better be reproduced correctly, or sound may suffer even more than it had already.

So how does one test for sufficient processing headroom then? That turns out to be quite easy with the help of the classic MP3Gain tool. All you need to do is generate, say, a sine test tone at a few hundred Hz or lower (Audacity will do that fine) and encode that as MP3. Then you can apply gain in 1.5 dB steps to push decoded audio peaks above fullscale.

If a 1.5 dB granularity seems too coarse to you, adjust amplitude during test tone generation.

In my experience even a fairly small amount of clipping is plainly audible on a low-frequency sine.

For another twist, you can also Replaygain-scan the result (e.g. with the classic "Swiss army knife of audio players", Foobar2000) and see whether that gets the playback chain out of clipping.

Here's the little test MP3 I made. This contains a 440 Hz sine with a peak amplitude of 1.17845 times fullscale (+1.4 dBFS), Replaygain -16.23 dB. I guess I should have used some lower-frequency tone instead, where hearing is less sensitive, but anyway.

The results obtained with this one were quite interesting already. On my Sansa Clip+ with original firmware 01.02.15, there was no way I could play it without clipping. Replaygain made things quieter, but it still clipped. By contrast, the only way I could make things clip in Rockbox (r29855) on the very same player is turning the volume waaay up, even with Replaygain off. That's even better than expected.

If you want to test a DAC's or resampler's 0dBFS+ handling, here's a little WAV file with the infamous fs/4 +3dBFS sine. This is best used in conjunction with a scope or audio analyzer, since most of us won't be able to hear any harmonics of 11.025 kHz and I'm not sure how many bats are into audio stuff. ;)

Back to topics

Entry last modified: 2011-05-14 – Entry created: 2011-05-13

Apples, Oranges and Amplifier Specifications (1): Noise


To most people, the specifications of electronic devices are plenty obscure numbers. However, they can be quite useful. (That is, provided they aren't rigged, like the sensitivity specs for some loudspeakers. An overstatement of 6 dB is too much, period.) For example, if you have ever been bothered by amplifier hiss, you may want to know whether this is going to be a problem in your new amp. So let's get noisy, shall we?

A few real-life examples

Here are the output power into 8 ohms, high-level input sensitivity and noise specs of several affordable mass-market hi-fi integrated amplifiers:

Now you can certainly tell me which one is the noisiest and which one is the least noisy, and whether it matters for you. You can't? Well, then let's inspect this in some more detail.

Basics on amplifiers and noise

First of all, let's have a look at the components inside a typical, rather conventional hi-fi integrated amplifier:

           +-------+    +---------+    +-------+
           | Input |    | Volume  |    |  Amp  |
           | o   o |    | --+     |    |       |
           |     | |    |   |     |    |  |\   |
Source --->| o---o |--->|  |R|    |--->|  |/   |---> Speaker
           |   | | |    |  |_|<-- |    |       |
           | o v o |    |   |     |    | 45 dB |
           |       |    |  ---    |    |       |
           +-------+    +---------+    +-------+

There is an input selector – which can be a straightforward mechanical switch – followed by a potentiometer (a resistor with a variable tap) for volume control and finally the power amplifier.

You're missing the tone controls (including balance and stuff)? Well yes, we left them out here, as would be the case when using the "Source Direct" or "Pure Direct" functionality present on many amps – keep it simple. If you do want them to be included by all means, here's a typical arrangement:

           +-------+    +------+    +---------+    +-------+
           | Input |    | Tone |    | Volume  |    |  Amp  |
           | o   o |    | _ B  |    | --+     |    |       |
           |     | |    | _\__ |    |   |     |    |  |\   |
Source --->| o---o |--->| _/ _ |--->|  |R|    |--->|  |/   |---> Speaker
           |   | | |    | __/_ |    |  |_|<-- |    |       |
           | o v o |    |   \_ |    |   |     |    | 45 dB |
           |       |    |  T   |    |  ---    |    |       |
           +-------+    +------+    +---------+    +-------+

Let's go back to our simplified amplifier though…

           +-------+    +---------+    +-------+
           | Input |    | Volume  |    |  Amp  |
           | o   o |    | --+     |    |       |
           |     | |    |   |     |    |  |\   |
Source --->| o---o |--->|  |R|    |--->|  |/   |---> Speaker
           |   | | |    |  |_|<-- |    |       |
           | o v o |    |   |     |    | 45 dB |
           |       |    |  ---    |    |       |
           +-------+    +---------+    +-------+

…and inspect the noise sources. That's quite straightforward, the only active component in here is the power amplifier, which usually employs heavy feedback so that its noise characteristics are input-dominated. Any noise at the input will be amplified by the power amplifier's voltage gain and fed to the speaker, where it may become audible. We have 3 contributions to input noise here:

  1. Amplifier voltage noise with spectral noise density en
  2. Amplifier current noise with spectral noise density in, giving a voltage noise density contribution of Rs × in
  3. Source impedance (thermal) noise with spectral noise density contribution en,s = √(4 kB T Rs) (≈ √(1.63E-20 Rs) at room temperature); there may be further, so-called "excess" noise

Once you have a given voltage noise density, obtaining the RMS noise voltage within a certain bandwidth is easy:

Vn = en × √(BW)

For the typical 20 kHz, the factor becomes 100×√(2) √(Hz), which is about 141 √(Hz).

Determining the total amplitude of the noise contributions isn't too hard either, they are statistically independent and thus their powers add up:

Pn,tot = ∑ Pn,i; i = 1..3 Vn,tot = √(∑ (Vn,i)▓); i = 1..3 = √( (Vn,1)▓ + (Vn,2)▓ + (Vn,3)▓ )

(A little trick: Equivalent noise resistances add up. Thus if you have an opamp, the resistances it sees at its two inputs can simply be added when computing their thermal noise contribution.)

Amplifier voltage noise is constant, while the other two contributions depend upon the source impedance presented by the volume pot, which is

                                 R   ( R   + R   - R   )
                                  tap   pot   src   tap
R  = R   || (R   + R   - R   ) = -----------------------,
 s    tap     pot   src   tap          R   + R   
                                        pot   src

with Rsrc being the signal source's source impedance.

This value can range between about zero and half the total potentiometer resistance, but in the important lower range it is approximately

Rs ≈ Rtap ; Rtap << Rpot ≈ Rpot × Gv,tap ,

with Gv,tap being the voltage "gain" at the tap (which, of course, actually is a loss, always being less than 1 = 0 dB).

…and the consequences

Thus if you turn down the volume (so Gv,tap approaches zero), only the amplifier's voltage noise will remain at some point, with negligible contributions from the other noise sources. This is what they call residual noise.

As the volume is turned up, typically source impedance noise will appear first, rising by 3 dB for any 6 dB volume increase (note the √(Rs) and thus approximate √(Gv,tap) dependency). If the amplifier's input stage exhibits enough current noise (bipolar ones commonly do for typical 50 kOhm volume pots), this will also make an appearance eventually, rising in an approximately linear fashion with volume.

Here's a quick numeric example. The amplifier as outlined above be assumed to be equipped with a 50 kOhm volume pot and a perfect, noiseless power amplifier. It then be fed with a 300 mVrms line level to give an output of 50 mW into 4 ohms. What is the resulting noise level and SNR?
The desired output level of 447 mVrms requires a modest 3.46 dB total voltage gain, which means we need to set the volume pot for 41.5 dB of attenuation or 419 ohms. This resistor generates a voltage noise density of 2.6 nV/√(Hz), which amounts to 370 nVrms over a 20 kHz bandwidth. Amplified by 45 dB in the power amp, this becomes 66 ÁVrms at the output. Our SNR thus is 76.7 dB. This is the theoretical maximum. Most any real-life power amplifier will have at least equally much voltage noise (commonly 50% to 200% more), so the real-life result is likely to be at least 3 dB worse.

Let's put this into perspective. A 4 ohm hi-fi loudspeaker of moderate sensitivity, 85 dB SPL / 1 W / 1 m, produces 72 dB SPL of output at 1 m for a 50 mW input. Our real-life amplifier noise is thus likely to end up somewhere around 0 dB SPL @ 1 m, a level that should be on the limit of audibility and therefore uncritical.
Now let's replace the speaker with a "cute little" Klipschorn, 8 ohms and (supposedly) 104 dB SPL / 1 W / 1 m. The same amplifier output now produces 88 dB SPL of output at 1 m, and noise level ends up at about 15 dB SPL @ 1 m, which is plainly audible. (And this amplifier isn't even particularly noisy. Some known offenders don't have 100, but 500 ÁVrms of output noise.)

If you are not satisfied with the resulting noise level, here are the options that you have:

Amplifiers with redistributed gain

We have seen that apparently the amplifier stage right behind the volume pot is critical. But why is that? Simple, here the signal is commonly attenuated to very low levels, and the more gain follows, the less the input signal amplitude will be for a given output level. Since some voltage noise is quite unavoidable, high gains are begging for trouble.

What, then, can you do to maximize SNR? Simple, increase power levels in the volume pot. Specifically, an increase in signal amplitude delivered to it will make for better signal-to-noise ratios at the power amplifier input. Power amplifier gain can then be reduced by the same amount. Here's an example:

           +-------+    +-------+    +---------+    +-------+
           | Input |    |  Amp  |    | Volume  |    |  Amp  |
           | o   o |    |       |    | --+     |    |       |
           |     | |    |  |\   |    |   |     |    |  |\   |
Source --->| o---o |--->|  |/   |--->|  |R|    |--->|  |/   |---> Speaker
           |   | | |    |       |    |  |_|<-- |    |       |
           | o v o |    | 10 dB |    |   |     |    | 35 dB |
           |       |    |       |    |  ---    |    |       |
           +-------+    +-------+    +---------+    +-------+

And that already is pretty much what the various Yamaha amplifiers with CD-Direct look like:

           +-------+    +-------+    +---------+    +-------+
           |  Amp  |    | Input |    | Volume  |    |  Amp  |
           |       |    | o   o |    | --+     |    |       |
           |  |\   |    |     | |    |   |     |    |  |\   |
Source --->|  |/   |--->| o---o |--->|  |R|    |--->|  |/   |---> Speaker
           |       |    |   | | |    |  |_|<-- |    |       |
           | 10 dB |    | o v o |    |   |     |    | 33.5  |
           |       |    |       |    |  ---    |    |  dB   |
           +-------+    +-------+    +---------+    +-------+

What are the limitations of this approach? First, the input amplifier needs to be able to handle the maximum input signal levels without running into clipping at the output. For typical +/-15 V supplies, an opamp wil usually handle output amplitudes of about 9 Vrms (25.5 Vpp). (At levels like these, you will also have to consider the nonlinear distortion.) By contrast, some CD players have fullscale output amplitudes of 2.2 to 2.3 Vrms, with worst-case intersample-overs of 3 dB higher or about 3.25 Vrms. Thus maximum input amplifier voltage gain will be limited to about 3 (approximately 10 dB). At least your input amplifier will commonly drive lower-impedance loads than the minimum required for a high-level input (e.g. down to 2 kOhm while itself presenting 47 kOhm to the signal source), so you can reduce the value of the volume pot and thus achieve some current gain as well.

Then, of course, you don't want to fry the poor volume pot. These commonly handle only about 50 mW, and you don't want to go anywhere near that to avoid longterm problems – so maybe 10 mW at nominal maximum input level, but not any more. For our 9 Vrms level above, we can use about 8 kOhms or higher, so a 10k part should be fine.

Here's a little spreadsheet I made that allows looking at an integrated amplifier's output noise level and SNR as a function of volume. With this you can easily see what a change in gain stage voltage or current noise or another value of volume pot will do, for configurations with or without pre-gain). Matching an amplifier's known performance can also be used to estimate the performance of its components.

So is there any even smarter solution? Yes there is – use a two-stage volume control, employing a 4-gang pot for a stereo amplifier. Here's a typical example:

                                    .                           .
           +-------+    +---------+.   +-------+    +---------+.   +-------+
           | Input |    | Volume1 |    |  Amp  |    | Volume2 |    |  Amp  |
           | o   o |    | --+    .|    |       |    | --+    .|    |       |
           |     | |    |   |   . |    |  |\   |    |   |   . |    |  |\   |
Source --->| o---o |--->|  |R| .  |--->|  |/   |--->|  |R| .  |--->|  |/   |---> Speaker
           |   | | |    |  |_|<-- |    |       |    |  |_|<-- |    |       |
           | o v o |    |   |     |    | 16 dB |    |   |     |    | 29 dB |
           |       |    |  ---    |    |       |    |  ---    |    |       |
           +-------+    +---------+    +-------+    +---------+    +-------+

This amplifier will be even less noisy at low volumes, having only 29 dB after the second volume pot. It will also maintain a significant SNR advantage over its single-pot colleagues throughout much of the volume range, as in order to achieve, say, 40 dB of attenuation, you only need 20 dB at both pots now, and the minimum signal level is -24 dB (at pot 2). Nonetheless, it offers a lot of total gain if needed, and the preamplifier would never even get close to clipping (in a 100 W/8 ohm amplifier, it would have to drive about 1 Vrms at most – small potatoes).

If you want to keep the values of both volume pot sections at minimum value, an input buffer may be necessary:

                                           .                           .
     +-------+    +-------+    +---------+.   +-------+    +---------+.   +-------+    
     |  Buf  |    | Input |    | Volume1 |    |  Amp  |    | Volume2 |    |  Amp  |    
     |       |    | o   o |    | --+    .|    |       |    | --+    .|    |       |    
     |  |\   |    |     | |    |   |   . |    |  |\   |    |   |   . |    |  |\   |    
 +-->|  |/   |--->| o---o |--->|  |R| .  |--->|  |/   |--->|  |R| .  |--->|  |/   |--+ 
 |   |       |    |   | | |    |  |_|<-- |    |       |    |  |_|<-- |    |       |  | 
Src  | 0 dB  |    | o v o |    |   |     |    | 16 dB |    |   |     |    | 29 dB |  v 
     |       |    |       |    |  ---    |    |       |    |  ---    |    |       | Spk
     +-------+    +-------+    +---------+    +-------+    +---------+    +-------+    

The buffer will limit maximum input level, but since it has no voltage gain, the limit will usually be significantly above real-life signal levels. As a nice side-effect, it tends to reduce impedance on the potentially long lines to the input selector, reducing crosstalk of all kinds along the way.

So... any downsides? Well, first of all 4-gang volume pots don't exactly grow on trees. If you have an old but good preamp or integrated amp that uses one, treasure it. Secondly, the classic problem of channel tracking may become even more severe. (Because of this, Yamaha used a series resistor on the first section that restricted maximum attenuation to 20 dB. Clever, that.)

How could one achieve something similar without using one of these elusive 4-gang pots then? Well, maybe like this:

           +-------+    +----------+    +-------+    +---------+    +-------+
           | Input |    | StpAtten |    |  Amp  |    | Volume  |    |  Amp  |
           | o   o |    | --+      |    |       |    | --+     |    |       |
           |     | |    |   | -    |    |  |\   |    |   |     |    |  |\   |
Source --->| o---o |--->|  |R|-<-- |--->|  |/   |--->|  |R|    |--->|  |/   |---> Speaker
           |   | | |    |  |_|-    |    |       |    |  |_|<-- |    |       |
           | o v o |    |   |      |    | 16 dB |    |   |     |    | 29 dB |
           |       |    |  ---     |    |       |    |  ---    |    |       |
           +-------+    +----------+    +-------+    +---------+    +-------+

Here the first section of the volume pot has been replaced by a stepped attenuator. A relatively coarse affair would be quite sufficient in practice, down to a simple 20 dB "Mute" switch. Switches and resistors with low tolerances are quite abundant.

If the stepped attenuator reduces input impedance too much, there's always the trusty old buffer:

     +-------+    +-------+    +----------+    +-------+    +---------+    +-------+
     |  Buf  |    | Input |    | StpAtten |    |  Amp  |    | Volume  |    |  Amp  |
     |       |    | o   o |    | --+      |    |       |    | --+     |    |       |
     |  |\   |    |     | |    |   | -    |    |  |\   |    |   |     |    |  |\   |
 +-->|  |/   |--->| o---o |--->|  |R|-<-- |--->|  |/   |--->|  |R|    |--->|  |/   |--+
 |   |       |    |   | | |    |  |_|-    |    |       |    |  |_|<-- |    |       |  |
Src  | 0 dB  |    | o v o |    |   |      |    | 16 dB |    |   |     |    | 29 dB |  v
     |       |    |       |    |  ---     |    |       |    |  ---    |    |       | Spk
     +-------+    +-------+    +----------+    +-------+    +---------+    +-------+

When using an oldfashioned mechanical input selector, one could easily employ a buffer with good current drive capability and a fairly low stepped attenuator resistance. The downside: You need as many "beefy" buffers as inputs. It may be more efficient to use "weak" buffers on the input and follow the input selector with a single "beefy" one. This setup also accomodates electronic input selectors.

For another idea, why would all inputs need to have the same sensitivity? Basically you're a lot more flexible with an A/D, DSP and D/A setup here, but even the classic way you could equip the CD input with 10 dB of attenuation while another, intended for notoriously weak digital audio players, might have full gain. (Using a software-controlled PGA also enables per-input gain control, as demonstrated by Yamaha's R-S500 and RS-700 receivers. They're not the first to do it, but it's kinda neat anyway.)

If you intend to use PGAs (PGA2320, CS3318 etc.) instead of potentiometers, expect to get quite a different optimum gain distribution. Sometimes as little as 10 dB of effective voltage gain may be needed in the power amplifier for a typical hi-fi amp, with a headphone amplifier requiring a healthy amount of attenuation.

Noise specifications discussed

With all of this background, let's go back to our practical examples now. These showed about 4 different kinds of noise specs:

Full power SNR is the signal-to-noise ratio on the minimum signal needed to achieve full output power when the volume is cranked up all the way, i.e. the same level as when specifying nominal input sensitivity. In practice, it is sufficient to measure noise levels at this setting and compute the SNR value. Noise levels are commonly A-weighted to (crudely) approximate subjective perception, which also tends to do away with mains hum components that may be present. Shorting the input has a simple reason, it means that input source impedance cannot contribute any noise.

Full power SNR gives big numbers (which people like), but only shows the whole picture if there are no other amplifying components in front of the volume control (see our most basic amplifier as discussed earlier).

Normally we don't crank up an amplifier all the way. Therefore it makes sense to specify SNR at more realistic power levels, where noise would be more likely to be actually audible. For the 50 mW at 4 ohm referred measurement according to trusty old DIN 45500, volume is turned down until a signal at nominal input sensitivity results in a 447 mVrms output (which, as you might have guessed, delivers 50 mW into a 4 ohm load). At this point, most amplifiers will be down to a constant noise level independent of volume setting, as we discussed earlier. That's the kind of constant noise level that might prove disturbing when too high. As we have seen, something around 72 dB of 50 mW SNR is desirable when using hi-fi speakers of average sensitivity. Noise tends to become rather audible as we enter the mid-60 dB range, and objectionable at about 60 dB.

A 1 W / 8 ohm (2.83 Vrms) referred measurement is basically similar. However, note a bit of "cheating" in the Marantz amplifier, where the measurement is carried out at a higher level to keep volume pot noise down.

Finally, residual noise is measured at the output with the volume control all the way down. It tends to be about constant well into normal volume control settings. The Yamaha amplifier has two different specs because the gain distribution varies.

Now how do we convert the results from one kind of measurement to another? In general this is not easy, but there are some cases which do allow it:

The noise level of the power amplifier part driven from an approximate short (as specified for the NAD model) is obviously constant regardless of input signal level. Therefore it should come as no surprise that the full power and 1 W SNR specs will differ by exactly 10*log10(Pmax/W). For the NAD unit this gives an output noise level of 28 ÁVrms(A), or an effective input noise level of 1.0 ÁVrms(A), so our input voltage noise density should be in the order of 7 nV/√(Hz).

A basic amplifier as discussed earlier will reveal its residual noise level via the full power SNR spec. This is because the maxed-out volume pot essentially gives a direct connection to the source, so it's a low-impedance affair similar to what you get at the low end of the volume range. Among our contenders, the Denon and Pioneer units belong into this group when their respective "Direct" functions are enabled, and presumably so does the Marantz.

For the Pioneer model, the power amplifier's voltage gain is about 40.6 dB. The full power SNR of 106 dB(A) for a 35 Wpc unit hints at a residual noise level of about 84 ÁVrms(A), while the 50 mW spec of 71 dB(A) shows that at this position of the volume control, noise has already increased to 126 ÁVrms(A), about 3.5 dB. Input wise, that's some 1.2 ÁVrms(A), or roughly 8 nV/√(Hz). Let's check… we need a 33.6 dB attenuation here, on a 50k pot that's about 1.0 kOhm, plus 2.2 kOhm of series resistance, so we could expect about 7 nV/√(Hz) from there. Bingo. (The ÁPC4570 opamp in there only has about 3.5 nV/√(Hz) of voltage noise, and the other terminal sees a very low 24 ohms.) With this high-valued series resistor, it seems like full power SNR is a touch overstated, like 1 or 2 dB or so – nothing to write home about.
The Marantz unit seems quite similar in concept. Translating the 87 dB(A) (1 W / 8 ohm) spec in terms of input level and load impedance, it should give about 79 dB(A) at 320 mW into 4 ohms for a 200 mVrms input, or 127 ÁVrms(A).

So how do we translate this into a proper 50 mW spec? Well, we have to estimate. Depending on which noise source is dominant, SNR could scale with anything between half a dB per dB of signal level (if it's volume pot thermal noise) and signal level itself (if it's constant voltage noise). In this case the difference could be anything between 4 and 8 dB, for 71 to 75 dB(A). This unit would thus be expected to exhibit similar noise levels as the Pioneer or a bit less. Not a big surprise there.

The Denon unit, giving about 1.5 dB more power and 5 dB more voltage gain than the previous two, is specified to give about 1 dB more than the Pioneer unit in terms of full power SNR, so the residual noise level would be expected to be about the same. We'd thus need a voltage noise density of about 3.5 to 4 nV/√(Hz), which does seem doable.

- To be continued, please check back shortly -
(Or so I wrote a year ago...)

Back to topics

Entry last modified: 2012-06-03 – Entry created: 2011-03-25

How (not) to build an audiophile hi-fi component

So you think an audiophile component (like an amplifier) would require state-of-the-art technology and every effort to make it as good as possible? It would be subjectively and objectively impeccable, right?


The decisive buzzword is "product differentiation". In a crowded market, you have to make your product stand out somehow. It may be that not everyone can build an amplifier that works well, but still there are enough of them that marketing one more isn't easy. If you want people's attention, it has to be exotic, exciting. Everyone is looking for "hidden treasures".

You have to leave trodden conventional paths. Designs with ordinary semiconductors and lots of negative feedback? Pah, everyone can do that. You need tubes (or valves for you UK folks), preferably OTL. Or at least your own very special circuit topology that is nothing less than the holy grail itself (of course). Let's do away with that pesky negative feedback, it's got a bad reputation anyway. So what if we end up with a power hog with overly high parts count – if anything, the customer will only think that we spared no effort, and marvel at the internals. Good measured performance? The subjectivists won't give a damn anyway. So what if it's noisy, has modest distortion performance and a lousy damping factor and will make any cellphone within a 5 m radius heard – it's an audiophile component, that'll excuse anything. (If in doubt, most of the self-ascribed "golden ears" won't pick up the distortion levels anyway.) Hey, it has gold-plated fuses, it must be good!

What to file this under? Simple, design by agenda – the classic sure-fire way of ending up at a local minimum rather than a global one. Normally you'd start with a performance specification (treating the device to be constructed as a black box that has to do certain things with some kind of performance and within a certain budget) and then work out what to put in so that the final device gets the job done (usually from a choice of existing solutions and in the most economic or feasible way). Starting with some kind of circuitry and then working out how the result performs is a clear violation of this workflow. This may be common in tinkering, but shouldn't be the approach of a pro.

So to sum it up – what does that mean for me as a consumer? Easy, the best product is not necessarily the most expensive or most fancy one. Usually the average performance vs. cost curve only increases at the very bottom, while beyond a level that allows flawless performance, it can get highly erratic. Better look out for indications that those who constructed the device put in some thought about how to meet the user's needs.

What can one do as an honest engineer then? Simple, think about how to best meet people's needs. Gather experience from practical use. Listen to users who know what they're doing – and even those who don't, as long as you interpret things correctly. Don't be afraid of rethinking old or "standard" design practices in light of changed usage patterns or technology, and do think outside the box if necessary. Nobody said headphone outputs in integrated amplifiers had to be dropping resistor jobs until the end of time, or that input sensitivity adjustments were of no use. At the same time, if you stumble across an interesting construction detail or feature in an old design that you think made sense at the time and still does, don't be afraid of implementing it (even if possibly it never really caught on). People had plenty of good ideas in the past, too.

Back to topics

Entry last modified: no idea – Entry created: 2011-03-22

Tweaking the Rotel RA-980BX Integrated Amplifier for Less Noise

The RA-980BX is an upper middle class integrated amplifier from the late '80s that was and still is rather powerful and sports a good phono section. The only major flaw is a fairly high level of noise present at all volume settings. There is something that can be done about this, however.

As we learned in the last entry, the noise (hiss) floor at low volume levels is dominated by voltage noise of the amplifier stage directly after the volume potentiometer. Inspecting the schematic reveals a circuit using an AD712JN opamp here, a FET input device cited to have high slew rate and low distortion – and a voltage noise density of a whopping 18 nV/√(Hz) (where very low-noise parts can have less than one tenth). Adding the noise from the gain setting resistors, we're at a nominal 18.7 nV/√(Hz).

Total voltage gain after the volume pot comes out as a fairly standard 45 dB (the first 16 of which are achieved by the opamp circuit), which gives a computed noise level of almost 500 ÁVrms at the output, about in line with the spec. This is not particularly grand. Even a hi-fi speaker of moderate sensitivity (85 dB SPL / 1 W / 1 m, 4 ohm) would give off about 13 dB SPL of hiss. From personal experience I know that even 6 dB less still is easily audible.

Now let's improve the noise level. This basically takes two steps:

  1. Select an opamp with low noise that fits the working environment.
  2. Reduce noise from gain setting resistors.

So let's pick an opamp:

The first guy I discussed this with bravely went with a LM4562 for IC501 and IC502; hopefully the slightly over-spec supplies won't give any trouble in the long run. The closely related LME49860 would be a better choice, it is rated for +/-22 rather than only +/-17 V. Otherwise the fairly low voltage noise (2.7 nV/√(Hz) nominal), good output drive capability, excellent transfer linearity and reasonably low common-mode distortion make this part a good choice here.

The original gain setting resistors are 10k and 1.8k parts (R505/507, R506/508). We can cut these values by a factor of 10 to reduce noise even further, as their contribution would be dominant at low volumes otherwise. New values are 1k and 180 ohms, respectively. Expected total voltage noise would be 2.8 nV/√(Hz) with the volume turned down, for a noise reduction of up to 16.5 dB (possibly limited by the power amplifier and very likely to be less when the tone controls are active).

The proud owner of the modified amplifier stated that the noise was cut significantly. Where it had been plainly audible before, you now had to listen with your ear close to the speaker to pick up any at all. I consider that a success. Subjectively, sound after the mod was perceived to be "sharper, more accurate". (Audible noise is reputed to make sound "softer", so that would fit right in.)

Back to topics

Entry last modified: no idea – Entry created: 2011-03-22

Application Note: Using CD-Direct Functionality on Yamaha Hi-Fi Amplifiers

The Yamaha AX-397 and AX-497 integrated amplifiers and the related RX-797 receiver (as well as the older AX-396/496 and AX-596 models and newer A-S700) offer a feature called CD-Direct, which promises even better performance when using the CD input. We'll now look at what it does and when it may be useful.

In CD-Direct mode, the following two things happen:

  1. Tone control circuitry is bypassed for lower distortion and noise, as in Source-Direct mode.
  2. Some voltage gain (about 9.2 or 10.7 dB, respectively) is shifted from directly after the volume control to the input, which employs a preamplifier whose effect is negated immediately after in normal operation.

Now you have to know that in a regular hi-fi amplifier, the noise (hiss) floor at low volume levels is dominated by voltage noise of the amplifier stage directly after the volume potentiometer. This noise is amplified by whatever voltage gain follows and then made more or less audible by attached speakers, depending on their sensitivity and listening distance.

Under these circumstances, taking away some voltage gain after the volume pot reduces background noise, which may be quite welcome when using the amplifier to drive speakers at low listening distances. In case of the AX-497, it is about 8 dB less noise for 9 dB less gain, which is not a bad deal. According to specs, noise floor drops to 35 ÁVrms, A-weighted. Audible noise already is at around 0 dB SPL / 1 m with ordinary hi-fi speakers (or monitors) of average sensitivity in Pure-Direct mode, in CD-Direct mode it drops noticeably below the hearing threshold at this distance. Those with very low listening distances or very sensitive speakers (e.g. horn types) should appreciate that.

The input then makes up for the missing total gain. So far, so good.

Unfortunately, the older models (AX-396/496/596) as well as the AX-397 exhibit one potential problem here: When used with a modern-day CD player that delivers up to 2.2 or 2.3 Vrms for fullscale output and hotly mastered CD material that could contain worst-case intersample overs of +3 dB (see Overly loud CDs), we are potentially looking at 3.25 Vrms of maximum input level. The amplifier at the CD input would have to drive up to 11.5 Vrms or 32.6 Vpp, which however is outright impossible for something that only has 28.5 Vpp available in terms of supply, with a minimum distance of about 1.5 V to either side no less – so the maximum output level is 25.5 Vpp or 9 Vrms. The maximum permissible input level thus is about 2.5 Vrms, potentially giving less than a dB of headroom above fullscale – rather tight. Maybe this is part of why some people consider these models "bright". I'd preferably use the CD input for something with a less hot output, like a typical PC soundcard (where Replaygain may find use, too).

The AX-497 employs somewhat less gain in the input amplifier (2.96x rather than 3.55x), which means it can handle about 3.0 Vrms of input. Not truly worst-case, but probably adequate in practice.

If you intend to upgrade the more problematic models for bulletproof CD input handling (about 3.4 Vrms), the gain for the CD input amp needs to be lowered to about 2.65x. I'd suggest swapping the 1.2k and 470 ohm gain setting resistors for 1k and 620 ohms, respectively. The CD input will then be a touch quieter (obviously), but if anything this would only buy you a more comfortable volume control setting.

The A-S700 contains a special goof in the CD preamp – in an attempt to reduce noise and distortion even further, gain setting resistors of 390 and 220 ohms were chosen, but this means that the OP275 used has to drive a nominal 710 ohm load. That's not too different from 600 ohms, which was shown to noticeably decrease linearity in Samuel Groner's opamp measurements, starting at levels well below 1 Vrms. (If at least the supply rails were higher, the chip would be more well-behaved, with dominant and steadily decreasing even-order harmonics.) If you feel like swapping the opamp, an SOIC version of LME49720 (LM4562) or LME49860 should be a suitable replacement.

It looks like the A-S700 circuit was taken over from the RX-797 receiver, where the standard issue NJM2068 opamp had been used instead. With this low-noise part, the low resistor values do make some kind of sense from a noise perspective (even if the practical benefit would be nonexistant), but a 710 ohm load means that the opamp has already lost almost 3 Vpp of its maximum voltage swing. It should still accept a little over 3.0 Vrms of input like this, but I doubt the opamp is a current driving king, so distortion is likely to be higher than necessary. If you don't feel like replacing the opamp, you can try resistor values of 1.5k / 820 or 1.2k / 680 ohms. The guys at Yamaha would probably have trusted it to drive a 1k / 560 ohm combo. Note that this board is apparently equipped with surface-mount parts, which makes soldering less fun. Use thin-film resistors (which are pretty much equivalent to metal film parts in through-hole), not the cheaper thick-film ones.

Back to topics

Entry last modified: 2013-09-23 – Entry created: 2011-03-21

Remastering time!

Yours truly has been trying to avoid buying albums which have been mastered overly loud, knowing that they would eventually gather dust or at the very least not get as much play time as they'd deserve. However, a few have crept in that I considered just too good to pass up. Thus, here's a short list of albums from the last decade that I'd like to see remastered at a more reasonable level (typically between 3 and 6 dB lower, and with dithering please), along with the current editions' replaygain level as per Foobar2000.

Other examples of "too loud to be really listenable in the long term" include The Ting Tings - We Started Nothing (2008, -10.72 dB) and Ladytron - Velocifero (2008, -9.80 dB). I'm sure there are lots and lots more.

Isn't it ironic that the decade which saw an awful lot of remasters of older material would now need some remastering itself?

Back to topics

Entry last modified: 2010-08-13 – Entry created: 2010-08-13

Replaygain levels demystified

Update 2011-05-31: This article needs a revision since it erroneously makes use of square-wave-referenced rather than sine-referenced dBFS (as I used Audacity to determine reference noise RMS level). Most of the levels thus are 3 dB low. Meanwhile, a major overhaul of the Replaygain documentation has brought about much-needed clarification and a section on RMS level calculation.

Have you been wondering what the connection is between Replaygain levels and the ominous 89 dB SPL, and how all this relates to levels in the digital domain? Then read on.

The basic aim of Replaygain is clear: Providing an about equal listening level regardless of how loud the original source material is. For this to work, you obviously need to find out how loud it would appear to us and compare with something of known volume. Here this is done by performing some frequency weighing according to a somewhat crude hearing sensitivity curve plus low-frequency roll-off, then computing the RMS values of the result and comparing with the result for a reference signal.

The reference signal, to be obtained on this page, contains one channel of pink noise at about -23 dBFS. When played back at a movie mixing desk with calibrated speaker system, this would give 80 dB SPL (C-weighted) over one speaker or 83 dB SPL when blowing it up to stereo. (Replaygain automatically assumes that mono files will be played back on two channels at once, giving twice the sound power a.k.a. 3 dB more.) The replay gain for this file should be +0.0 dB according to the proposal.

Practical implementations usually aim for a 89 dB SPL level, i.e. 6 dB louder. Therefore it's not surprising that Foobar2000 assigns the reference file a replay gain of +5.99 dB. This gives us a pink noise level of -17 dBFS, with a maximum amplitude of about 0.56. So basically we have about 17 dB of headroom to work with. That correlates pretty well with the results in the dynamic range database, where contemporary loud pop albums with replay gains of ca. -9 dB achieve about a 6 or 7 dB rating (which is not too far off from the expected 8 dB – music is only approximately pink noise after all).

In my experience, most recordings get along just fine with the aforementioned ca. 17 dB, even though there is the occasional '80s CD which needs 2, 3 or even 4 dB more (among them the infamous Dire Straits – Brothers in Arms original edition with a maximum track gain of +3.78 dB at peak amplitude 1 [another track with +6.82 dB and peak 0.974 doesn't count because the peak belongs to a nice cracking noise resulting from a digital transfer error], Laurie Anderson's Mister Heartbreak, Peter Gabriel IV or Vangelis' Blade Runner soundtrack).

Back to topics

Entry last modified: 2011-05-31 – Entry created: 2010-07-05

A few useful spreadsheets

This entry has moved. Please update your bookmarks. I apologize for the inconvenience.

Back to topics

Entry last modified: 2020-02-21 – Entry created: 2010-07-01

Y knot...? (2)

These days, portable MP3 players with associated earphones or headphones are very common. Paradoxically, there is very little source material that would specifically target headgear (not necessarily exclusively, but also). There's the odd binaural recording, either in album format, as radio play or on demo CDs (usually from headphone manufacturers), but rather little from the normally playful pop music world. So Radiohead used binaural recording, and there's Pearl Jam's album "Binaural" (which seemingly is better suited for speakers anyway), but otherwise there doesn't seem to be a whole lot in the "goodies for headphone users" department. It's not like binaural recording would be required, since you can also do cool things in a more conventional way. But very few people seem to bother at all.

To me, that very much is surprising.

Back to topics

Y knot...? (1)

Did you know that a regular DVD can hold a 96-kHz 24-bit stereo audio stream, in addition to (for example) another 48-kHz 16-bit stereo one? In fact, this has been possible ever since the very first DVD spec in 1996. The DVD-Audio format added true multichannel 24/96 audio (data rate limitations would allow for no more than 3 channels on a plain vanilla DVD), nonetheless the standard DVD would seem to be an attractive choice for music distribution. Production technology is mature (with demand probably shrinking due to the impact of Blueray discs), compatible playback devices are very common, and extracting the audio data isn't significantly more difficult than for an audio CD, allowing for easy integration into harddrive-based libraries.

Nonetheless, you very rarely encounter such discs. Maybe on the odd audiophile label, but that's about it. There are a few paid 24/96 downloads available, like Peter Gabriel's covers album "Scratch My Back", but those still are rare.

I wonder why?

(Recording quality of pop CDs may be pretty sucktastic on average these days, making the choice of format quite secondary, but still there should be the occasional candidate for a 24/96 release.)

Speaking of hi-res audio formats, did you know that DSD as used on SACD is actually a rather poor choice with lousy storage efficiency? I suspected something like that all along – it was more about have a format that's as obscure as possible in order to make copying even more unattractive. And to my knowledge, there still isn't a way of digitally copying the contents of a SACD other than tapping off the data stream inside a SACD player, while you can apparently very much rip DVD-Audios (most definitely non-encrypted ones). In other words, SACDs are just about entirely useless in the age of harddrive-based music libraries and streaming clients. Well, thank you very much for a format that's obsolete by design.

Back to topics

On overly loud CDs, quiet MP3 players and things related

Overly loud CDs

Buying new music can be frustrating these days – provided you've got ears and some half-decent playback equipment, that is. The reason: As a result of the loudness war that started raging in popular music from about the early/mid-1990s on, many CDs are just too darn loud and not uncommonly sound like crap as a result.

How you mean, too loud, you might say. Let me explain:

As you may know from the digital audio basics on this page on mine, digital audio is a series of numbers in regular intervals. For CD audio, that would be 44100 times per second, with the numbers being 16-bit integers. For 16-bit integer numbers in the common 2's complement representation, the possible values range from -32768 to +32767. This range is considered full scale (sometimes also with the very smallest value left out for symmetry considerations, but that is largely academic). Most importantly, it is quite obviously limited.

Therefore, you cannot make a digital waveform arbitrarily loud without introducing clipping – the signal peaks are chopped off, and eventually this becomes audible as distortion.

Now with advanced DSP-based lookahead compressor / limiter technology, it is possible to increase peak to average ratio quite a bit without too much impact on sound quality – or even further, right into audibly distorted territory if so desired. Too much of the current CD output is in the latter camp.

This has a number of downsides:

  1. Sound quality can be degraded quite significantly for the discerning listener, up to the point of perceived "flatness" and listening fatigue. Accordingly, the willingness to buy new records (yes, buy) decreases. Now one would think that losing loyal paying (!) customers is about the last thing the music industry could afford these days.
  2. Devaluation of music in the long run. Subpar sound quality always hurts long-term appreciation in some way. A throwaway society might not care but in general music shouldn't be some kind of throwaway goods.
  3. Mixing recordings of varying vintage is no fun, especially on portable players. Imagine you just got done listening to Enya's Watermark (1987, album gain +2.9 dB, still a headphone junkie's delight BTW) and then chose a modern-day pop recording (say, about -9.5 dB). If your player doesn't support ReplayGain or anything similar, you better turn the volume waaay down before your ears are blown off.
  4. Many integrated amplifiers (most past ones and a number of current ones) have an input sensitivity of 150 mV, forcing operation of the volume pot in an uncomfortably low range that may aggravate channel tracking issues and make precise setting of volume (especially by remote control) tricky. Levels on CD were originally set up so that they'd match other devices, which meant plenty of headroom (like 17 dB for the typical CD fullscale amplitude of 2 Vrms) with an easily sufficient amount of dynamic range left. Given today's technology (most importantly 24/32 bit processing and dithering), it would definitely be sufficient, given typical amplifier noise floors. Instead, stuff is crammed into the very top of the dynamic range, not uncommonly necessitating no more than 8 (eight) bits per sample.
  5. Even more distortion may be added by playback devices through overflows in digital filters (intersample overs; a few examples of how consumer electronics devices behave).
  6. The conversion to lossy data reduction formats, most prominently MP3, opens up another can of worms. Since those are typically based on the FFT with frequency-domain filtering, peak amplitudes tend to rise due to the Gibbs phenomenon. In the LAME 3.98.2 -V 4 -q 0 files that I use for my portable player, I have found peak amplitudes as high as +3.6 dBFS after decoding (±1.5something in the floating point representation Ó la Foobar2000, where the usual 16-bit value range maps out to -1 to +0.999969…). If the MP3 decoder library and following processing chain don't provide some headroom, there will be even more distortion. (The players from a certain fruity brand are particularly notorious for this.) Encoded data rates also go up slightly, as the clipping already present in the input material means additional high-frequency content.
  7. Passing the whole shebang through the kind of fancy multiband compression commonly used in radio stations doesn't make things any better. In fact, heavy brickwalling can actually be counterproductive as excessive high-frequency content makes the compressor turn down the volume. Oops.

By contrast, I cannot see any real upsides. How dynamic a record is mostly depends on production, so even in critical environments like cars the difference between a heavily brickwalled version and another at more reasonable level (with the volume adjusted accordingly – contrary to popular belief, people do know how to operate a volume control) wouldn't be all that dramatic. Besides, environments like this would be better served by DSP-based dynamic compression and ambient-noise-level-based EQing in the playback device (car radio) anyway, both of which have been technically feasible for a while. It cannot be the job of the source material to cater to the lowest common denominator while ignoring everything else. Lowest common denominator standards tend to be pretty low these days.

So… can we have CD levels back where they were in the early '90s please? I'm sick and tired of having to scrutinize promising new releases for mastering levels and sound quality in order to make sure that I get something that I actually want to listen to after buying. (And don't even get me started about "remastered" titles – or should I say "butchered", which in most cases is equally fitting?)

This whole affair also bugs me on a more abstract level because it turns the whole idea of progress upside down. More advanced technology used to make worse-sounding records, that doesn't sit right with me as an engineer. (I tend to marvel at what ingenious minds – mostly smarter than yours truly, it will seem – have pulled off with much less advanced technology in the past.)

It's interesting how musicians, being the creative bunch that they are, have found ways to make things sound pretty good in spite of the whole loudness craze. This, however, still assumes the latter is necessary. I'd rather get the basic assumptions right. Definitely helps in engineering (provided you follow a result-driven rather than agenda-driven approach), can't be that far off elsewhere.

I have yet to see any factual evidence that levels being as high as they typically are nowadays is actually beneficial – which means it comes down to believing rather than knowing, an approach that has thoroughly messed up the classic Hi-Fi hobby (consider the case of the "CD demagnetizers" that people quite obviously bought – too bad that there aren't any ferromagnetic substances in CDs at all). The main reason they still are, I guess, is that people are lemmings and will do whatever everyone else does without giving it much thought, and paranoia never goes out of fashion anyway. In addition, it has become much easier to record a CD, and in theory one single musician can do all the work by himself in a smallish home studio – in practice, however, it takes a genius to equal the expertise of all the people found in a classic recording studio, so the smaller the scale of the whole operation the more can potentially go wrong. Hard to beat plain ol' manpower sometimes.
You know that something is wrong when you hear of the band whose CD was found to be much louder than the Myspace samples (i.e. too loud), and who didn't even know of it when asked – apparently the CD pressing plant had "spiced up" the material in much the same way that some photo labs do (except that that I wouldn't call material with normal loudness levels the equivalent of underexposed). It gets really scary when people actually complain when they encounter a record with halfway-normal dynamic range (seen among the first reviews of Mumford & Sons' "Sigh No More") – in a way, they are used to overspiced "music convenience food".

Here are some initiatives that aim to bring back more dynamic range to music:

Honorable mention (pun intended) also goes to the Honor Roll of Dynamic Recordings and other articles by mastering engineer Bob Katz, as well as the mastering articles by Nielsen / Lund at TC Electronics.

Back to topics

Quiet MP3 players

If you are a European citizen, you may have noticed the result of misguided well-meaning politics: Portable MP3 players with rather limited output volume indeed (usually with the same models going noticeably louder elsewhere, sometimes even when set up for another region). Those are usually loud enough with the supplied earduds, err, -buds and common in-ears, but try connecting some "grown-up" headphones, and they'll run out of steam very quickly. The same applies when used as high-level sources for some other equipment, although it may be possible to compensate by turning up the volume externally.
Some players have additional output series resistors to drop volume on common low-impedance earphones, which opens up another can of worms (see output impedance calculator spreadsheet).

I will try explaining why a fixed hard limit to the player's volume setting is rather pointless.

First of all, the intent of this legislation was keeping youths from blowing their ears out while walking around with their MP3 players. (That is, if they haven't "upgraded" to a tinny cellphone speaker that lets the environment take part in their well-developed taste in music along the way. I guess those still sound better than the early transistor radios back in the day, but it's not a long way off for sure…) Now why would they do that? Usually it would be to drown out external noise. Unfortunately, many environments are too noisy on their own – at like 75 dB SPL, there's not too much room for music on top of that before reaching dangerous levels. Therefore the only answer can be attenuating external noise by using suitable headphones or more likely earphones with good isolation properties. With like 20 or 30 dB of attenuation, the world looks quite different. In fact, levels with music at reasonable volume may now be lower than with nothing at all!

With that out of the way, let's have a look at the factors influencing playback volume for a given volume setting:

  1. Headphone sensitivity.
    There are two ways of rating this, both specify sonic output in dB SPL at 1 kHz but one per 1 mW of input power and the other per 1 Vrms of input signal amplitude (it be noted that especially the latter may be a calculated value using a measurement at much lower volume, as 1 Vrms may be quite a bit beyond what the drivers can handle). The conversion from one to the other is possible if you know the nominal headphone impedance.
    For a low-impedance source like your average MP3 player, the 1 Vrms referred spec is the most practical. According to this list that I originally took over from Head-Fi member j-curve, the sensitivity of regular headphones and IEMs ranges from about 90 to 139 dB SPL (that's almost 50 dB of difference, folks!), or most definitely from under 100 to over 130 dB.
  2. Recording levels.
    As discussed further up, modern-day pop / rock recordings may average at around -7 dBFS rms, while a number of my '80s CDs are at around -17dBFS or even lower. That means more than 10 dB of possible extra variation.

So overall, depending on the type of headphone and material, there could be anything from about 40 dB to 60 dB (!) of variation. That's a lot. A signal to noise ratio of 60 dB is commonly perceived as entirely noise-free. 40 dB still makes the difference from a fairly normal home listening volume (65 dB SPL) to ear-damaging disco levels (105 dB SPL).

So, now please pick a suitable setting for a volume cap. What, you don't see how? Nor do I.

To sum it up: Education (!), isolated earphones and earplugs (for concerts and such) help. Artificial non-adjustable volume limits, by contrast, are more of an annoyance than anything else.

Back to topics

© Stephan Gro▀kla▀ 2021. Commercial duplication of this content, including eBay descriptions and similar, with prior permission only.

Contact me

Created: 2010-05-16
Last modified: 2021-07-09