User:Mjb/Time-constant-based EQ

From Offset
< User:Mjb
Revision as of 21:10, 30 September 2019 by Mjb (talk | contribs) (Overview)
Jump to navigationJump to search

One thing I have always found a bit mysterious is how audio equalization filters are described in terms of "cutoff frequencies" and "time constants". Finally I think I understand it well enough, so here my attempt at explaining it to myself:

Overview

A simple, passive, "first-order" a.k.a. "one-pole" type of "lowpass" a.k.a "RC" filter consists of a resistor in series followed by a capacitor in parallel. If the components are swapped, they comprise a highpass filter. Add another resistor and reconfigure the components with the resistor & capacitor together in parallel, followed by a resistor in parallel, and you have a pre-emphasis filter (a variation of highpass) or a de-emphasis filter (a variation of lowpass). Incorporate an op-amp in to the design, and any of these will amplify the signal and then can be called active instead of passive. These are all still considered RC filters.

The time constant "τ" is R×C (resistance × capacitance) and is a way of expressing a bend in an RC filter's frequency response curve. If there is only one pole, then the time constant describes the entire curve.

A resistor resists the flow of electrical current. A capacitor is like a little battery or reservoir for electricity; it charges and discharges over a very short amount of time.

Given that R=V/A and C=(A×τ)/V, where V=potential in Volts, A=current in Amperes, and τ=time in seconds—or given that R=(mass×length²)∕(τ×charge²) and C=(τ²×charge²)∕(mass×length²)— the calculation of R×C results in just a time duration! It is the time required to charge or discharge the capacitor by about 63.2%. For audio frequency filtering, this time is typically expressed in microseconds (µs). A microsecond is 1∕1000th of a millisecond.

Another property of τ is that it equals 1∕(2×π×f), where f is the "pole", also called the "transition", "corner", or "cutoff" frequency. This is where the voltage and power drop by -3.0103 dB to 1∕√2. f works out to be exactly 159155∕T where T is the τ value (e.g. 70 or 120). For 70 it is ~2274 Hz, and for 120 it is ~1326 Hz.

Very roughly drawn, a Bode plot (a typical logarithmic frequency response graph) has a horizontal line at 0 dB up to this frequency (this frequency range is the "pass band"), and a 45° diagonal line beyond it (this frequency range is the "stop band"). The slope of the diagonal line shows a 6 dB drop per octave (doubling of frequency), and 20 dB per decade (10X increase in frequency). The actual curve is exponential and uses those lines as its asymptotes (the lines which the curve approaches). The curve deviates from the asymptotes by 3 dB at the corner frequency, and by 1 dB at half and at double the corner frequency.

Add another resistor–capacitor pair and you have a second-order or two-pole filter which will have a slope twice as steep (12 dB per octave or 20 dB per decade). Third order would be 18 dB∕octave or 30 dB∕decade, and so on.

A side effect of these simple filters is a phase shift, in this case meaning latency, a delay in the output. As the frequency goes up, the phase of the output gets closer to 180°. Even at the cutoff frequency, the output signal is -45° out of phase. Relatively sophisticated circuits can minimize the error. In actual music, this kind of frequency-dependent phase error can result in smearing of some transients, but otherwise is harmless; just don't mix it with the original undelayed signal!

Pre-emphasis and de-emphasis circuits are often implemented with two cutoffs. The lower one is the normal one where the signal begins to rise (for pre-emphasis) or finishes falling (for de-emphasis). The upper one is where the slope becomes level again at the higher dB level. The RIAA vinyl LP curve has three cutoffs.

Some common audio cutoff frequencies:

  • cassette normal EQ = 120 µs → 1326 Hz (lowpass for playback only, see info below)
  • cassette chrome EQ = 70 µs → 2274 Hz (lowpass for playback only, see info below)
  • CD/DAT emphasis = 50 µs and 15 µs → 3183 Hz and 10610 Hz (for playback, 3183 highpass and 10610 lowpass)
  • RIAA vinyl LP EQ = 75 μs, 318 μs, and 3180 μs → 2122 Hz, 500 Hz and 50 Hz (for playback, 2122 & 50 lowpass, 500 highpass)

I believe the tape standards assume 400 Hz is at 0 dB (no change from input to output). The others I think use 1000 Hz as the 0 dB reference.

Cassette EQ

Magnetic tape EQ is complicated.

Much like how magnetic (MC or MM) phono cartridges are "velocity" devices, so too is a tape playback head. This means that when the tape moves past the playback head, it induces a current which results in a signal with extremely weak bass and greatly exaggerated treble. A flat signal on the tape, when played by an ideal head, produces an increasing slope of 6 dB per octave across the spectrum. This is corrected by applying a -6 dB/octave EQ in the playback amp.

Getting a flat signal onto a relatively slow-moving (1⅞ ips) cassette tape is not easy, though; there are massive treble losses during both recording and playback. The highest reel-to-reel tape speeds (30 ips) do not have this problem, so they require very little additional equalization, but the slower speeds run into physical limitations of the system. Tape formulations also affect the treble response of the tape itself; Type I has weaker treble response.

The actual signal on the tape does not need to be flat, anyway. Just like with vinyl records, there is plenty of room to exaggerate the higher frequencies during recording, and reduce them back down to normal during playback. This has the effect of keeping the signal flat yet cuts down on the HF background noise added by the medium, thus improving SNR. The NAB and IEC came up with EQ standards for EQing tape this way, concentrating on the playback side, and making it so that tapes recorded on different decks would not have extreme differences in sound quality. So, tape is expected to contain greatly exaggerated treble and slightly exaggerated bass, all of which is then corrected to be pretty close to flat during playback.

  • Playback EQ consists of -6 dB/octave, plus a standard 50µs lowpass, plus an optional 3180µs highpass (proposed in 1976 but not widely adopted), plus a 120µs or 70µs lowpass depending on the cassette type. The 0 dB reference point is at 400 Hz.
  • Record EQ is expected to be whatever it takes for a particular deck to produce flat output for the playback EQ. So this always consists of a mild bass boost and a strong treble boost, plus additional EQ tuned to the individual deck. It also includes a 120µs or 70µs adjustment selected via a cassette shell notch sensor or a manual switch. Other than that sensor or switch, most decks do not allow a way to customize the record EQ without adjusting pots on the circuit board.

Visualizing all of this is difficult enough. It is even harder to understand why using 70µs EQ to play a tape recorded with 120µs EQ results in duller sound, when a 70µs rolloff instead of 120µs should result in brighter treble.

[I am still working on this section.]

References

Some references I used: