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

Playback Equipment – General Tech Topics

Playback Equipment – Circuitry & DIY

Music-related software and misc.

Music – General

Music – Technical

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?

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

Output Loading Immunity and Other Fun with Jellybean Opamps

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 output loading characteristics, shall we?

TL07x:
With good transfer linearity and fairly low current consumption (plus availability of quads even), this classic line of opamps may still be of use today – but load driving definitely is not its fortÚ. Driving 600 ohms on +/-15 V, the output stage gets out of Class A operation at about -5 dBu, and distortion starts to rise quickly from about -17 dBu up – at +20 dBu, this one should be driving 10k or higher. Note that common-mode linearity degrades distortion even in a unity-gain follower. Also mind phase reversal in this one. Apparently it's not too fond of capacitive loads either. Finally, as in many JFET input opamps, careful balancing of impedances (or, failing that, inverting operation, or common-mode bootstrapping even) is advised to keep input impedance distortion at bay.
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. Again, beware of phase reversal.

LF356:
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.

4558:
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.
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, BA15218, NJM4565, stuff like that. Then there still is the beefy NJM4556A, developed for headphone driving applications. Versions with lower voltage noise have also been developed – ÁPC4570, NJM2043, NJM4580 (note comparatively high output current), and BA4580 (which is not terribly great when compared to the JRC part). Finally, the LM833 derives from the same architecture, as does the NJM2068 (which employs second-order compensation).
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.

NE5532:
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, which perhaps not so accidentally also are the cheapest ones you can get). 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. Add the moderate noise levels and input impedance distortion, plus suitability for voltages up to at least +/-18 V (things are starting to get rather warm once you approach the maximum ratings), and you know why these things have been so popular. Input bias current of this bipolar part needs some attention though (note that there is some variation between manufacturers), as well as high-frequency common-mode distortion, which may be significantly higher than in nominally lesser parts (e.g. MC33078, LM833), presumably due to dropping CMRR. 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.
JRC's NJM2114 arguably is the souped-up low-noise version of this one. It never was too popular, maybe because it requires some extra attention and needs more than 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 has surfaced on some soundcards in modern times.

NE5534:
The single companion to the ubiquitous NE5532 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.

LM833:
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, and common-mode distortion may still beat a second-sourced '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.
Note that TI now sells two LM833 variations, one the original NatSemi part (called "LM833-N", LM833N in DIP), one their take on the MC33078 as discussed below (LM833P in DIP).

MC33078 (TI):
Slightly less voltage and current noise when compared to the NE5532 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.

LM837:
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), as well as not being particularly short-circuit-proof. A real diva if you will. I'd rather use an MC33079.

OP275:
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. 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 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. Input impedance nonlinearity is about as bad as it gets in FET input parts.

MC33178:
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 and use with high source impedance would require extra compensation, 4 stages in parallel would give 4 nV/sqrt(Hz) and 0.3 pA/sqrt(Hz), a voltage-current noise product rivalling the NE5534A. Granted, 400 nA worth of input bias current is getting a bit high, but still.

NJM2068:
A.k.a., "The Great Unknown". Strictly speaking, it's not that unknown, though I do wish more comprehensive measurements were available. Meanwhile let's see what NwAvguy's measurements, Sijosae's output level tests and the datasheet tell us: This is a low-noise (<3 nV/sqrt(Hz)), rather fast (GBW@10k = 27 MHz) part – the latter means that attention to layout will be needed, and indeed Sijosae ran into oscillation issues. (It should be better-behaved than you might think though, since thanks to second-order compensation, unity gain frequency is only 5.5 MHz.) Slew rate is moderately fast but easily adequate for audio at 6 V/Ás. 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.
Architecture wise, this is a 4558-derived part employing second-order compensation.

NJM4556A:
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 super fast slew rate or super high bandwidth or anything (3 V/Ás, 8 MHz), but that isn't really needed in typical applications either.

LM358:
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. 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.

Back to topics

Entry last modified: 2015-07-20 – 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, favoring 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.
Hissss.
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.

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 triple.fi 10 Pros and Hifiman HE-6s are probably out.

Back to topics

Entry last modified: 2014-01-12 – 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: 2013-11-08 – Entry created: 2013-11-08

Headphone Output Impedance Calculator

Here's a little JS-based online adaptation of one of my spreadsheets. With this you can determine how much a given amplifier output impedance will warp frequency response with a variable-impedance load like headphones or speakers when compared to an ideal 0-ohm output (or optionally, when compared to a given baseline output resistance). You can also have output resistance estimated if you have determined a certain amount of frequency response deviation. Headphone impedance plots can be obtained from various places.

Determine frequency response deviation

Data entry ohms * **
ohms *
ohms
ohms (optional)

*) within audible range, ~40 Hz .. 15 kHz recommended
**) May be same as nominal impedance |Z_n|

Results dB peak-peak
dB peak-peak

And now the inverse:

Determine output resistance

Data entry ohms * **
ohms *
dB peak-peak

*) within audible range, ~40 Hz .. 15 kHz recommended
**) May be same as nominal impedance |Z_n|

Results ohms

Technical background

When a load whose impedance varies over frequency is attached to an amplifier with a given output resistance, a complex voltage divider is formed. As a result, the signal received by the load becomes frequency-dependent, with higher impedance giving higher levels. For example, many big open headphones have an impedance peak in the 80-100 Hz vicinity, which thus results in increased bass levels. The impedance response of multi-driver balanced armature IEMs can even be a real rollercoaster (e.g. Triple.fi 10s, varying betwen about 7 and 65 ohms), potentially resulting in significant coloration. See the Headphone Outputs That Suck article for more information.

A few headphones actually sound their best when operated with a nonzero output resistance. Thus the option for a baseline Rout as a reference point.

My rule of thumb is that you're doing fairly well if the deviation from the ideal response is about 1 dB maximum. Perfectionists will want to shoot for about 0.3 dB (the approximate limit of audibility), especially if the critical region is found somewhere from midbass to several kHz.

Back to topics

Entry last modified: 2014-06-11 – 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

Say you want to build an opamp-based headphone amp or preamplifier (or a power amp) and would like to know what sort of output noise levels to expect. Here's a little online calculator if you do not feel like using the spreadsheet. Note that unlike the latter, this calculator takes input current noise into account at both inputs.

[Schematic: Example noninverting amplifier]
Noninverting amplifier with part names.

Data entry

Opamp noise data (optional) nV/√(Hz)
pA/√(Hz)
Part values kOhms
kOhms
kOhms (optional)
kOhms (optional)
kOhms (optional)
K (optional)

See notes

Results

Gains
dB
Minimum noise floor @ low volume nV/√(Hz)
ÁVrms
dBV
nV/√(Hz)
nV/√(Hz)
Maximum noise floor w/ source nV/√(Hz)
ÁVrms
dBV
Maximum noise floor, no source nV/√(Hz)
ÁVrms
dBV

Notes

Note 1: If you need a unity gain follower, enter some very large number for Rg (at least a factor of 1000 greater than Rf or so).

Note 2: For a circuit without a volume pot, enter its source resistance into the Rseries field. Sources are assumed noiseless, which may not be the case in practice.

Note 3: A parallel resistor Rpar to ground at the input is not taken into account as its contribution to noise is usually negligible in practice, being much larger than highest source impedance seen by the opamp with a source connected (which usually is (Rpot + Rsource)/4 + Rseries, while that parallel resistor tends to be in the order of Rpot or greater). If this is not the case yet accurate worst-case (no source) results are desired, input a value of Rpar || Rpot in the Rpot field.

Note 4: You can also use this calculator for determining the noise of a basic inverting circuit (minus the Rpot and Rsource related niceties). After all, that one only swaps the signal (voltage) source and ground reference when compared to its noninverting cousin, and voltage sources are shorts in a small-signal model, so signal input is totally equivalent to ground here.

What it does

The calculator first computes the impedances that the opamp sees at its inverting and noninverting inputs for 3 different cases (minimum volume, maximum source impedance with a source connected, and maximum source impedance with the input left open). Then these are added (a little trick, equivalent to RMS summing their voltage noise) and their corresponding thermal voltage noise density is computed. The same value times opamp in gives the current noise contribution. Finally the previous two terms and opamp en are RMS summed, giving total input-referred noise density. (Equivalent opamp voltage noise density is the RMS sum of en and the in-related contribution.) Applying noise gain gives output noise density, which times √(20000 Hz) gives total output noise within 20 kHz. That value referred to 1 V in dB gives dBV.

It is assumed that any coupling capacitors are big enough for their effect to be neglected.

Back to topics

Entry last modified: 2015-03-22 – 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 foe 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
Male MM MF MB MN
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 last.fm and on RYM if you want.

Concerts

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

Up

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 last.fm and on RYM if you want.

New artists

Virtually entirely female-fronted. Most noteworthy additions:

Up

Down

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
                             --
                              2

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  
                        --                     
                         2                     

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  
                        --                     
                         2                     
                        |    |    |    |    |    |    | 
                        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:

LM386

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 
differently]
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.

TBA820M

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.

TDA2822M

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.

LM1876

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

Introduction

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:

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

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

            R
     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
          G
           N

In terms of asymptotic behavior, we find

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

(phew!), and

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

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
       N
G = ------ ; A(f) = 1
    1 + G
         N

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

     G
      N
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):

       GBW
A(f) = ---
        f

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

                 A
                  OL
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
      N
G = --- ; A(f) = G
     2            N
       GBW
A(f) = ---
        f

From those it follows pretty clearly that

     GBW
f  = ---
 6    G
       N

…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

Intro

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.

Dimensioning

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

           f
            mains
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:

       v
        drift   
ΔRPM = ------ * 60 s
         πD

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:

           f
            mains
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:

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

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:

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

Now let's put that into the previous equation:

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

Or to make things even more clear:

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

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

Intro

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?

WRONG.

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

These are mainly geared towards the headphone user. OpenDocument format.

Back to topics

Entry last modified: 2012-06-03 – 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▀ 2015. Commercial use, including eBay descriptions and similar, with prior permission only.

Contact me

Created: 2010-05-16
Last modified: 2015-07-20