# Helpful Audio-Related Calculators

Originally featured on my blogalike, these now inhabit a page of their own here.

## Overview

## DIY Acoustic Level Calibration

So you've got your measurement microphone and your audio interface. But how on Earth do you go about calibrating your absolute sound pressure levels now?! As it turns out, you can ballpark the calibration pretty well with just a handful of data:

Entry last modified: 2021-09-10 – Entry created: 2021-09-06

## Universal L-pad Calculator

The kind of L-pad calculator found on the web tends to assume a desired input impedance (of L-pad + load) equal to load impedance, as well as a source impedance of zero. What if that doesn't do it though?

### Calculate the effect of a known L-pad

### Calculate required L-pad values

TODO

Entry last modified: 2020-08-28 – Entry created: 2020-08-28

## RMS Summing and Unsumming Calculator

### RMS summing

This calculator will RMS sum the contributions of up to three voltage noise
sources, each arbitrarily given either in µV, dBV, dBu, a voltage noise density
at a given bandwidth, or a resistance value at a given ambient temperature and
bandwidth.

Currently temperature and bandwidth cannot be set individually; if you need
something more advanced, consider badgering the author.

### RMS unsumming

This calculator allows subtracting the contributions of up to two additional
noise sources from a total combined (RMS summed) voltage noise value to arrive
at the contribution of the remaining noise source, each of them arbitrarily
given either in µV, dBV, dBu, a voltage noise density at a given bandwidth, or
a resistance value at a given ambient temperature and bandwidth. So if you've
always wanted to know what the input noise density is for a microphone preamp
given with an EIN of -128.5 dBu under the conditions of 20 kHz bandwidth and
150 ohm source, this is the one for you!

Currently temperature and bandwidth cannot be set individually; if you need
something more advanced, consider badgering the author.

Entry last modified: 2020-03-13 – Entry created: 2020-02-15

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

And now the inverse:

### Determine output resistance

### 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 R_{out} 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.

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

## Output noise calculator for opamp-based amplifiers

Say you want to build an opamp-based headphone amp or preamplifier (or a power amp or literally anything else with something that behaves like an opamp) and would like to know what sort of output noise levels to expect in the audible range. Here's a little online calculator for you.

Noninverting amplifier with part names. (Current noise source at inverting input is missing.)

### Notes

**Note 1:** If you fill in input bias current, a lower boundary
of input noise density will be calculated. It's the shot noise contribution
`√(2*q*2I`

("fudge factor" of 2 currently under
investigation). For obvious reasons, this only gives sensible results for parts
without input bias current cancellation. Parts employing this may actually show
substantially higher current noise density than spec when confronted with
unbalanced impedances, e.g. more than twice in the LT1028 or LT1115._{b})

**Note 2:** If you need a unity gain follower, enter some very
large number for R_{g} (at least a factor of 1000 greater than
R_{f} or so).

**Note 3:** For a circuit without a volume pot, enter its source
resistance into the R_{series} field. Sources are assumed
noiseless, which may not be the case in practice.

**Note 4:** A parallel resistor R_{par} 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 (R_{pot} +
R_{source})/4 + R_{series}, while that parallel resistor tends
to be in the order of R_{pot} or greater). If this is not the case yet
accurate worst-case (no source) results are desired, input a value of
R_{par} || R_{pot} in the R_{pot} field.

**Note 5:** You can also use this calculator for determining
the noise of a basic *inverting* circuit (minus the R_{pot} and
R_{source} 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 i_{n} gives the current
noise contribution. Finally the previous two terms and opamp e_{n} are
RMS summed, giving total input-referred noise density. (Equivalent opamp
voltage noise density is the RMS sum of e_{n} and the
i_{n}-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.

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

## A few useful spreadsheets

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

- Headphone / earphone sensitivity table – I took that over from Head-Fi user j-curve a long time ago. Sensitivity per mW or per Vrms are calculated from each other as needed, and you can specify an amplifier output impedance to see how loud things will be there. I have added the sensitivity per mA of current, which is a measure of the BL product. The list is pretty big but not comprehensive, in particular the last major update was in like 2008 or so, so the very newest models won't be in it.
- Output Impedance Influence Calculator – This calculates how much the frequency response will be bent by the frequency-dependent (headphone/speaker) driver impedance when operating on an output with a given output resistance. While dedicated headphone amplifiers usually have a low output resistance, not uncommonly below 10 ohms, integrated amplifiers and receivers can have hundreds of ohms, potentially leading to a considerably skewed frequency response. Headphone impedance plots can be obtained from various places.
- Headphone Level Calculator – This allows you to estimate headphone sound levels in three different scenarios, depending on what you can or cannot measure. If you do not have a suitable multimeter, a rockboxed Sansa Clip+ / ClipV2 / FuzeV2 is the next best thing, for I have determined its maximum output level. Make sure your headphone sensitivity spec is halfway accurate. The other information can be determined by examining settings and using software.
- Integrated Amplifier Noise Calculator – This allows looking at an integrated amplifier's output noise level and SNR as a function of volume. Here you can easily see what a change in gain stage voltage or current noise or another value of volume pot will do, for two different types of gain distribution (pre-gain and no pre-gain). Matching an amplifier's known performance can also be used to estimate the performance of its components. Probably of most interest to the engineer, enthusiast DIYer or noise geek, as this is quite technical.

Entry last modified: 2012-06-03 – Entry created: 2010-07-01