Difference between revisions of "User:Mjb/Time-constant-based EQ"

From Offset
Jump to navigationJump to search
Line 1: Line 1:
 
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:
 
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.
 
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.
Line 5: Line 7:
 
The time constant "τ" is R×C (resistance × capacitance) and is a way of expressing the filter's frequency response curve.
 
The time constant "τ" is R×C (resistance × capacitance) and is a way of expressing the filter's frequency response curve.
  
Given that R=V/A and C=(A×τ)/V, where V=potential in Volts, A=current in Amperes, and τ=time in seconds, the calculation of R×C results in just a time duration in seconds. 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.
+
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 "corner" or "cutoff" frequency. This is where the voltage and power drop by -3.0103 dB.
+
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. 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.
 
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.
Line 17: Line 21:
 
Some common audio cutoff frequencies:
 
Some common audio cutoff frequencies:
  
* cassette normal EQ = 120 µs → 1326 Hz (lowpass for playback only)
+
* 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)
+
* 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)
 
* 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)
 
* 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)
  
These standards assume 1000 Hz is 0 dB (no change from input to output).
+
I believe these standards assume 1000 Hz is 0 dB (no change from input to output). Maybe 315 Hz for cassette?
 +
 
 +
==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 slow-moving tape is not easy, though; there are massive losses in the upper midrange and treble, for various reasons.
 +
 
 +
[I am still working on this section.]
  
 +
==References==
 
Some references I used:
 
Some references I used:
 
* https://www.electronicshub.org/passive-low-pass-rc-filters/
 
* https://www.electronicshub.org/passive-low-pass-rc-filters/

Revision as of 19:48, 28 September 2019

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.

The time constant "τ" is R×C (resistance × capacitance) and is a way of expressing the filter's frequency response 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. 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!

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 these standards assume 1000 Hz is 0 dB (no change from input to output). Maybe 315 Hz for cassette?

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 slow-moving tape is not easy, though; there are massive losses in the upper midrange and treble, for various reasons.

[I am still working on this section.]

References

Some references I used: