Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Equalizer plugin

This plugin lets you change the tone of a track: more bass, less boxiness, a bit more sparkle. It works on any track, guitars, basses, drums or keys, whether the track plays a sound set alone or through an amp model. You set it per track in the Track tab’s Equalizer section (How to use it shows where), and it is saved with the song in its .oxg file beside it.

What an equalizer does

Every sound is a mix of frequencies: low ones you feel as boom and body, middle ones that carry most of a guitar’s character, high ones that give attack and air. Frequencies are measured in hertz (Hz), vibrations per second. A bass guitar’s low E is about 41 Hz, a guitar’s top string about 330 Hz, and the fizz of a cymbal goes up past 10,000 Hz (10 kHz).

An equalizer (EQ) turns some of those frequencies up and others down. How much is measured in decibels (dB): +6 dB doubles the signal’s level, −6 dB halves it, and 0 dB leaves that part of the sound alone.

The bass, middle and treble knobs on a guitar amp are an equalizer. So are the sliders on an old hi-fi. The plugin has both kinds:

  • Basic is an amp’s tone stack: three knobs, Bass around 120 Hz, Middle around 700 Hz and Treble around 3.2 kHz. Bass and Treble are shelves: they lift or cut everything below or above their frequency. Middle is a peak: a hump or a dip around its frequency.
  • Graphic has ten sliders an octave apart, 31 Hz to 16 kHz. Each octave doubles the frequency, so the sliders, side by side, draw a rough picture of what you are doing to the sound: hence “graphic”.

Why it’s useful here

A sound set, especially a free one, can be harsh, thin or boomy, and an amp profile may be too dark or too bright for the song. The equalizer is the quickest fix, and since it costs almost nothing to run, it is the right tool on tracks where an amp model would be too heavy or makes no sense, like drums or keys.

How to use it

Turn it on for a track

  1. Click a note of the track you want to shape, and choose the Track tab on the right.
  2. Scroll down to the Equalizer section and open Mode:

  1. Pick Basic or Graphic, and move the sliders. Each goes from −12 to +12 dB in half-decibel steps. You hear the change at once, even while the song plays: each band glides to its new level in 20 ms, so nothing clicks.

Flat sets every band of the current mode back to 0 dB. Basic and Graphic each keep their own values, so you can switch between them and lose nothing. Off, the default, lets the track through untouched.

Some starting points

ToTry
Take the harshness off a fizzy distorted guitarTreble −3 to −6 dB, or 4 kHz and 8 kHz down on Graphic
Give a thin sound set more bodyBass +3 dB
Make a guitar sit behind the vocalsMiddle −2 to −4 dB
Make a guitar cut through a busy mixMiddle +2 to +4 dB
Tame a boomy bass62 Hz or 125 Hz down a few dB on Graphic
Add “air” to an acoustic guitar8 kHz and 16 kHz up a little on Graphic

Small moves go a long way. If you find yourself pushing everything up, turn the track’s volume up in the mixer instead.

With an amp model

With the NAM plugin on the same track, the amp runs first and the equalizer shapes what comes out of it, as on a real rig with an EQ after the amp. The small arrows at the right of each section’s title on the Track tab change the order:

Good to know

  • It works on any track: guitars, basses, drums, keys, anything a plugin plays.
  • The settings are kept with the song, in its .oxg file beside it. The score itself doesn’t change.
  • They also apply to audio exports.

Architecture and strategy

How it fits into OxiGuitar

The plugin is an effect: it sits on a track after the instrument that plays it. OxiGuitar hands it the track’s sound in small blocks while the song plays, and the plugin hands them back changed. With the NAM plugin on the same track, the amp runs first and then the equalizer, as on a real rig where the EQ comes after the amp; the arrows in the Track tab swap them.

Each band is a biquad filter, the standard small building block of digital EQs, designed from Robert Bristow-Johnson’s Audio EQ Cookbook: low shelf, peak and high shelf for Basic, peaks for Graphic. The code is ours, with no other library. It runs on the audio thread with no latency and no memory allocated, and each band glides to a new gain over 20 ms so moving a slider never clicks.

The settings are saved per track in the song’s .oxg file. The score itself doesn’t change.

Current limitations

  • Fixed frequencies. You set how much, not where: Basic’s three frequencies and Graphic’s ten are fixed, and so is how wide each band is.
  • No analyser. There is no picture of the track’s sound to aim at. You set it by ear.
  • No presets to save and reuse across songs.
  • ±12 dB per band. Enough for tone shaping, not for surgery.

Left out on purpose

  • A parametric EQ. Freely movable frequencies and widths are powerful and easy to get lost in. The plugin aims to be simple and predictable: one slider per band and nothing hidden. A parametric mode could still come later as its own mode.
  • Compression, limiting and the like. Those are other effects and belong in other plugins.
  • Other libraries. The filters are a few dozen lines of well-known maths. Writing them ourselves keeps the plugin small and lets the tests compare every filter against the cookbook’s own formulas.

Where you can help

  • Presets: a small list of starting points (a “scooped” metal tone, a brighter acoustic) would help beginners.
  • A response curve drawn in the section, like the picture in the overview, so you can see what the sliders do.
  • Listening: tell us if a band feels too wide or too narrow on real songs.

Every change needs its tests and a row on the Features page; the Testing page says how to run them.

Requirements and assumptions

Requirements

  • OxiGuitar 0.25 or later (plugin interface 3.0). See the OxiGuitar manual. Version 0.3 of the plugin works with OxiGuitar 0.20 and later, version 0.2 with 0.14 and later.
  • Windows, macOS or Linux.
  • A plugin that plays the track, since the equalizer shapes sound that another plugin makes.

Assumptions

  • You set it by ear. There is no analyser and no presets.
  • Settings belong to the track and are saved beside the score. The score itself doesn’t change.

Installing

You need OxiGuitar first: its manual says how to get it. This page is about the Equalizer plugin.

From a release

Each release on the releases page has a zip for each system (Linux, Windows and macOS; Linux and Windows for x86_64 and ARM64), a .deb, an .rpm and a Flatpak for Linux, a setup program for Windows that installs for you alone (no administrator password), a .pkg for macOS that does the same, and a SHA256SUMS file to check the downloads against. Take the file that matches your system.

Copying the file yourself

A plugin is a single file ending in .oxp. Unzip the release for your system and put eq.oxp in your plugins folder:

SystemYour plugins folder
Linux~/.local/share/oxiguitar/plugins/
macOS~/Library/Application Support/OxiGuitar/plugins/
Windows%APPDATA%\OxiGuitar\plugins\

Start OxiGuitar again. Tools → Plugins… lists what it found. The same menu switches a plugin off, and deleting the file removes it.

On macOS, a plugin file you downloaded yourself may be refused as coming from an unverified developer. Clear the download mark and start OxiGuitar again:

xattr -d com.apple.quarantine ~/Library/Application\ Support/OxiGuitar/plugins/*.oxp

A plugin installed with the .pkg is not marked this way.

Linux package managers

The package is called oxiguitar-eq. It lives in a signed package repository on GitHub Pages that you add once.

Debian, Ubuntu and relatives:

sudo install -d -m 0755 /etc/apt/keyrings
sudo curl -fsSL https://mateusrdp.github.io/oxiguitar-packages/oxiguitar.gpg -o /etc/apt/keyrings/oxiguitar.gpg
sudo curl -fsSL https://mateusrdp.github.io/oxiguitar-packages/oxiguitar.sources -o /etc/apt/sources.list.d/oxiguitar.sources
sudo apt update
sudo apt install oxiguitar-eq

Fedora and relatives:

sudo curl -fsSL https://mateusrdp.github.io/oxiguitar-packages/oxiguitar.repo -o /etc/yum.repos.d/oxiguitar.repo
sudo dnf install oxiguitar-eq

Normal system updates keep the plugin current from then on.

OxiGuitar’s Flatpak is a sandbox that cannot see the system’s plugin folders, so it needs the plugin as a Flatpak extension. Flathub comes first because Flatpak takes its runtime from there:

flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak remote-add --if-not-exists oxiguitar https://mateusrdp.github.io/oxiguitar-packages/flatpak/oxiguitar.flatpakrepo
flatpak install oxiguitar io.github.mateusrdp.OxiGuitar.Plugin.eq

flatpak update keeps it current and flatpak remove takes it away.

Features and their tests

Everything the equalizer does, and the tests that check it. The test names are the ones cargo test prints. scripts/test-all.py fails when a feature here names no test, or names a test that doesn’t exist, so a new feature gets its row and its tests in the same pull request (the Testing page says how to run them).

FeatureWhat it doesTests
Off by defaultA track with the equalizer off passes through untouched, and a band at 0 dB is left out of the chain.tests::a_track_changes_only_when_a_band_of_its_mode_is_raised_or_lowered, eq::tests::a_band_that_changes_nothing_is_left_out, eq::tests::a_band_back_at_zero_rests
Basic modeThree bands, like an amp’s tone stack: Bass (low shelf at 120 Hz), Middle (peak at 700 Hz), Treble (high shelf at 3.2 kHz).eq::tests::shelves_have_their_gain_on_their_side_and_half_of_it_at_their_frequency, eq::tests::a_peak_is_its_gain_at_its_frequency_and_half_of_it_at_its_edges, settings::tests::every_band_is_there_and_only_the_picked_mode_s_have_gains
Graphic modeTen peak bands an octave apart, 31 Hz to 16 kHz.eq::tests::a_peak_is_its_gain_at_its_frequency_and_half_of_it_at_its_edges, eq::tests::a_sine_through_the_chain_comes_out_at_the_chain_s_response, settings::tests::every_band_is_there_and_only_the_picked_mode_s_have_gains
Only the picked mode playsBoth modes keep their values; switching loses nothing, and only the picked one is heard and shown.settings::tests::only_the_picked_mode_plays, settings::tests::the_gains_shown_are_the_picked_mode_s
Gains in half-decibel stepsEach band from -12 to +12 dB in 0.5 dB steps; wrong values in a file fall back to their defaults.section::tests::the_bands_move_and_flatten, settings::tests::wrong_values_keep_their_defaults_and_gains_keep_to_their_steps
FlatSets the shown mode’s bands back to 0 dB, and only that mode’s.section::tests::the_bands_move_and_flatten
The Equalizer section of the Track tabThe mode picker, one vertical slider per band of the picked mode, side by side with its gain on top and its name below (“+3.5” over “1k”), 20 to 40 px wide, and Flat; drawn by ui/eq.slint, which compiles with what the plugin sets and hears.section::tests::it_shows_the_mode_and_the_picked_mode_s_bands, section::tests::the_bands_move_and_flatten, section::tests::the_slint_file_has_what_the_section_sets_and_hears
Saved with the trackThe settings are kept in the score file’s plugin data; keys this version doesn’t know are kept.settings::tests::settings_round_trip_and_keep_unknown_keys
Changes while playing, without clicksA running equalizer follows new settings; a new gain glides there in 20 ms.tests::a_running_equalizer_follows_new_settings, eq::tests::a_new_gain_glides_without_a_jump, eq::tests::a_bank_at_rest_is_its_chain
A clean tailWhen the track stops, the filters ring out to exact zeros.eq::tests::the_tail_ends_in_zeros
After the ampAn effect with order 300, so with an amp model on the same track the amp runs first.tests::the_manifest_is_valid_for_the_plugin, oxiguitar_plugin_checks::the_manifest_matches_the_plugin
Real timeNothing allocated and no system calls on the audio thread, within its time budget.contract::the_equalizer_runs_in_real_time
A working plugin fileThe .oxp file keeps the plugin contract, built by this repository’s SDK version and by the newest release of OxiGuitar.contract::the_plugin_file_keeps_the_contract, stage:contract (latest core)

Testing

Every test of this repository runs with one command, on your own machine, and anyone can run it. When something fails, it tells you how to report it.

Run everything

python3 scripts/test-all.py

On Windows, type python instead of python3 if that’s what you have.

You need:

  • Rust, from rustup (the version in Cargo.toml’s rust-version or newer);
  • git, and Python 3.8 or newer (nothing to install with pip);
  • on Linux, the libraries a build needs: libasound2-dev, libpipewire-0.3-dev and libclang-dev on Debian and Ubuntu (alsa-lib-devel, pipewire-devel and clang-devel on Fedora);

It runs:

  1. every Rust test of the repository (cargo test over the whole workspace), with a progress bar;
  2. the plugin against the newest release of OxiGuitar: it fetches that release’s source with git (once per release, kept in a cache folder every OxiGuitar repository on your machine shares: ~/.cache/oxiguitar-test-all, ~/Library/Caches/oxiguitar-test-all on macOS, %LOCALAPPDATA%\oxiguitar-test-all on Windows, or OXIGUITAR_TEST_CACHE), builds its oxiguitar-cli and oxiguitar-plugin-test, builds this repository’s plugin file for your system and runs the plugin contract on it;
  3. a check of the Features page: every feature names a test, and every test it names exists.

It tests the system and processor it runs on, and only those (as Rust sees them: rustc -vV’s host). Tests for other systems are left out and the summary says so; they are not failures.

What you get

A line per stage while it runs, then the result. In target/test-all/<date>-<time>/:

  • summary.md: the result, your system, what failed and why, short enough to paste into a GitHub issue;
  • test-all.log: everything that happened, every command and its output;

The script exits with 0 when everything passed, 1 when something failed, and 2 when it couldn’t start.

When something fails

  1. Update to the newest develop (git checkout develop && git pull) and run it again: it may be fixed already.
  2. Look for an issue about the same test at github.com/mateusrdp/oxiguitar-eq/issues.
  3. Otherwise open one: call it test-all: <the first failing test>, paste the whole summary.md, and attach test-all.log (drag it onto the text box; zip it first if it’s over 25 MB). Read the log first: it has your folder names, so change anything you’d rather keep private.
  4. You can also give summary.md and test-all.log to a language model along with this repository and ask it to find the cause.

Options

  • --release: an optimised test build: slower to build, faster corpus tests.
  • --ignore-rust-version: for a Rust older than rust-version (unsupported, but handy).
  • --core DIR: test against a checkout of OxiGuitar you already have, instead of its newest release; --core-version v0.21.5 picks a release.
  • --out DIR: where the results go.

Adding a feature

A new feature comes with its tests and a row on the Features page, in the same pull request; a new corpus test uses tests/support/corpus.rs. The script fails until the row names tests that exist.

Credits

Thank you to the people whose work this small plugin rests on.

Code we use

ProjectAuthorsWhat it does hereLicence
OxiGuitar’s plugin SDK (oxiguitar-plugin, and oxiguitar-host and oxiguitar-plugin-test for the tests)Mateus Rocha de Paula and the OxiGuitar contributorsThe plugin interface, and OxiGuitar’s own host to test againstMIT OR Apache-2.0
Rust and its standard libraryThe Rust ProjectEverythingMIT OR Apache-2.0

The filters are our own code.

Published work

SourceWhat we took
Robert Bristow-Johnson, Audio EQ CookbookThe formulas for every filter

Tools

ToolUse
mdBookBuilds this manual
cargo-denyChecks the licences of everything we build with

Thanks

To Robert Bristow-Johnson, whose cookbook has been the starting point of countless equalizers for decades, and to everyone who tries this plugin and tells us how it sounds.