FX INTRODUCTION / 06 / DRAFT
EQ: adjust separate frequency bands
Change the balance of low, mid, and high frequencies instead of the overall Gain.
This article is a work in progress. The examples will be refined through listening. Run starts playback; Stop ends it. Use Apply after editing values. Stop the playing iframe before trying another one.
Listen with the built-in FX
| Setting | Meaning |
|---|---|
| bass | Bass boost/cut (dB) |
| mid | Midrange boost/cut (dB) |
| treble | Treble boost/cut (dB) |
Select none in FX Monitor to see the waveform after the built-in FX. This pass-through effect makes input and output overlap; it does not compare the signal before and after the built-in FX.
How the PCM is processed
The learning example uses two low-pass filters. The low band is the lower-cutoff output; the mid band is the difference between the two outputs; the high band is the original minus the higher-cutoff output. Scale and sum them. With all three multipliers at 1, they algebraically reconstruct the original.
input[ch][i] is one input sample. ch identifies a left or right audio channel, not a physical FM voice. Store values carried between blocks in state. Since process cannot access outer variables, put settings in context.
Try it with liveFx
The 48000 in context.sampleRate is a placeholder. Match it to the actual output rate shown in FX Monitor. It is used to calculate times and frequencies; it does not change the browser's output sample rate.
Open in a separate Playground tab ↗
Select eq-lab in FX Monitor to compare the input and output of this process.
- Set all three learning-example multipliers to 1 and check that input and output overlap.
- Set only mid to 0, then only bass to 0, and compare.
- Remember that the built-in version uses dB, while the learning example uses linear multipliers.
Scope of this example
The built-in EQ uses a 200 Hz low shelf, a 1 kHz peaking filter, and a 4 kHz high shelf. This differs from the learning example's band split; the bands are not sharply isolated. Combining boosts increases the output level.
The waveform shows changes over time; Spectrum shows the strength of frequency components. A short display window or smoothing can hide some changes. Listen while changing one setting at a time.