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

Wah-wah plugin

This plugin brings the wah-wah pedal to OxiGuitar: it writes wah marks into a score, lets you shape how the pedal moves, and plays them. OxiGuitar itself has no wah tool, editor or sound. All of that comes from here.

You get two tools on the palette, under Effects, Closed Wah-Wah and Open Wah-Wah, and a small editor for each mark. When the song plays, the marks rock a virtual pedal back and forth. How to use it walks through it.

What a wah pedal does

A wah-wah is a guitar pedal you rock with your foot. Inside is a filter that boosts one narrow band of frequencies, a resonance, and lets the rest through quieter. Rocking the pedal slides that band up and down:

  • Heel down (closed), the peak sits low, around 450 Hz, and is narrow: the sound is dark and throaty, like an “oo”.
  • Toe down (open), the peak moves up past 2 kHz and widens: the sound is bright and cutting, like an “ah”.

Rock it in time and the guitar says “wah”. Jimi Hendrix’s “Voodoo Child (Slight Return)” and Isaac Hayes’s “Theme from Shaft” made the sound famous, and the Dunlop Cry Baby is the pedal most people picture.

How sharp the peak is, is called its Q. A high Q is a narrow, nasal, vocal peak; a low Q is a gentle, wide one. The Cry Baby’s is about 4 with the pedal half way.

Wah marks in a score

Tablature writes the wah with two signs over a beat: o for open (toe down) and + for closed (heel down). They are part of the score: Guitar Pro files hold them, and OxiGuitar draws them with or without this plugin.

What a written mark can’t say is how the pedal moves across the beat. This plugin adds that: each mark can carry its own curve, from heel to toe, and its own Q. Those are saved in the song’s .oxg file beside it, since no score format has a place for them.

How to use it

Write a wah mark

  1. Click the beat where the pedal should move, or select several beats.
  2. In the palette on the left, under Effects, click Open Wah-Wah (the “o”) or Closed Wah-Wah (the “+”):

  1. The wah-wah editor opens:

  • The first list is the mark: Off, Open or Close.
  • The second is the pedal’s Q: 4 is a Cry Baby’s, higher is more nasal and vocal, lower is gentler.
  • The curve is the pedal across the beat: left to right is time, bottom to top is heel to toe. Drag the points to shape it. An open mark starts with the pedal going from heel to toe over the first half of the beat.
  1. Click OK. The mark appears over the beat, and one Undo takes it all back.

To change a mark later, select its beat and click either wah tool again.

Hear it

Press Play. An open mark takes the pedal from heel to toe, a closed mark takes it back, and marks that alternate rock it back and forth. On beats with no mark the pedal is off. It works on any track, and sits before the amp and the equalizer, like a pedal in front of an amplifier.

Change a mark from the Track tab

On the Track tab, the Wah-wah section is the same editor, on the beat the caret is on (or the selected beats). Every change goes straight into the score, one Undo step at a time. Pick a mark on a beat that has none to add one. The red X removes the mark.

Tune the pedal

Plugins > Wah-Wah Pedal… sets up the pedal every track plays:

  • Heel: where the sweep starts, 200 to 800 Hz.
  • Sweep: how far the toe takes it, 1 to 3.5 octaves.
  • Cry Baby puts both back to a Cry Baby’s (450 Hz, 2.3 octaves).

OK keeps them for every song; Cancel forgets them. A song that is playing keeps the pedal it started with.

Good to know

  • The open and closed marks are part of the score. Guitar Pro files keep them, and anyone opening the file sees them.
  • Your curves and Q values are kept in the song’s .oxg file beside it, since no score format has room for them. Share that file along with the song to keep them.
  • They follow the beat when you copy or move it.

Architecture and strategy

How it fits into OxiGuitar

The plugin does three jobs through OxiGuitar’s plugin interface:

  1. It adds two tools to the palette, which write the open or closed mark on the caret’s beat or on the selected beats, as one Undo step.
  2. It draws the editor, a window with the mark, its Q and the pedal’s curve, drawn in Slint (ui/wah.slint) as the Track tab’s Wah-wah section is: the section is the same editor, on the caret’s beat.
  3. It runs an effect that follows the score: OxiGuitar tells it every beat the track plays, with its marks, and the effect builds one curve for the pedal out of them. An open mark takes the pedal from heel to toe over the first half of its beat, a closed mark takes it back, and a mark with a curve of its own plays that. On beats with no mark the pedal is off and the track passes untouched.

The effect runs before the amp and the equalizer, like a pedal in front of an amplifier, unless you move it in the Track tab.

The sound

The filter is Julius O. Smith’s digital model of a Dunlop Cry Baby, from Making Virtual Electric Guitars and Associated Effects Using Faust (CCRMA, Stanford). He measured a real Cry Baby at several pedal angles and fitted one resonance to each. With the pedal at w, from 0 (heel) to 1 (toe), the peak sits at 450 · 2^(2.3 w) Hz, its Q is 2^(2 (1 − w) + 1) and its gain 0.1 · 4^w. The code is ours, written from those formulas, with no other library. It has no latency, allocates nothing while playing, and fades in and out over 10 ms so nothing clicks.

Current limitations

  • One pedal. Every track’s pedal is a Cry Baby, adjustable only by where the sweep starts (Heel) and how far it goes (Sweep). Other classic wahs (a Vox, a bass wah) would each need their own measured curve.
  • Curves don’t travel. A mark’s curve and Q live in the .oxg file. Send someone the .gp file alone and they get plain open and closed marks.
  • No auto-wah. The pedal only moves where the score has marks. A wah that follows how hard you pick (an envelope filter) is a different effect.
  • No expression pedal input. You can’t rock a real pedal plugged into the computer: OxiGuitar has no live input yet.

Left out on purpose

  • Wah support in the core. The mark is the score’s, but the tool, the editor and the sound are all the plugin’s, so OxiGuitar stays lean and anyone can write a different wah plugin.
  • Editing while playing. OxiGuitar doesn’t edit the score while a song plays, and a playing song keeps the pedal it started with: a new Heel or Sweep is heard the next time it starts.

Where you can help

  • More pedals. If you can measure a real wah’s response at several positions, a second preset is a self-contained job (src/wah.rs, src/settings.rs).
  • Listening. Tell us if the default open and closed shapes feel right in 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.
  • Windows, macOS or Linux.
  • A plugin that plays the track.

Assumptions

  • The pedal is a Cry Baby by default. Other pedals need their own settings.
  • Curves and Q values live only in the .oxg file. If you send the song to someone without that file, they get the open and closed marks and not your curves.

Installing

You need OxiGuitar first: its manual says how to get it. This page is about the Wah-wah 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 wah.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-wah. 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-wah

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

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.wah

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

Features and their tests

Everything the wah-wah plugin 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
Open and closed wah marksTools put a mark on the caret’s beat or on the selected beats, in one Undo step, and the mark reads back.editor::tests::a_selection_names_the_beats_that_take_a_mark, editor::tests::a_mark_and_its_shape_are_written_on_the_beat_and_read_back, tests::the_tools_and_the_views_are_the_manifest_s
The mark’s editorOpens on the kind asked for; picking a kind gives its curve, “no wah” none; Q and the drawn curve follow the window’s choices and the pointer; Cancel or closing the window changes nothing.editor::tests::the_editor_shows_the_form_and_follows_its_choices_and_the_pointer, form::tests::a_new_mark_opens_on_the_kind_asked_for_ready_to_apply, form::tests::picking_a_kind_gives_its_curve_and_no_wah_gives_none, form::tests::a_mark_s_own_shape_is_shown_and_left_alone_until_changed
The pedal’s shapeAn open mark rocks heel to toe over the first half of its beat and holds, a closed one back; a mark’s own drawn shape is kept in order and in range.shape::tests::a_kind_s_own_shape_rocks_over_the_first_half_and_holds, shape::tests::a_kept_shape_is_read_back_in_order_and_in_range
Marks become one movementAlternating marks rock the pedal back and forth; between marks the pedal is off; overlapping marks follow the first.curve::tests::marks_become_one_curve_and_the_pedal_is_off_between_them, curve::tests::without_marks_there_is_no_curve_and_overlapping_marks_follow_the_first
It sounds like a Cry BabyA band-pass sweeping 450 Hz to 2.2 kHz whose peak narrows at the heel; Q narrows or widens it; stable at every rate and Q.wah::tests::the_cry_baby_sweeps_from_450_hz_to_2200_and_its_peak_narrows_at_the_heel, wah::tests::a_mark_s_q_narrows_or_widens_the_peak_and_keeps_its_height, wah::tests::a_rocking_pedal_stays_stable_at_every_rate_and_q
Only where the score saysThe pedal changes a track only while a mark’s beat plays; off, the track passes untouched, and it comes in without a click.tests::the_pedal_changes_the_track_only_while_a_mark_s_beat_plays, wah::tests::off_it_passes_the_track_untouched_and_it_comes_in_without_a_click
The Wah-wah section of the Track tabThe editor on the caret’s beat: its mark, none, or nothing on a beat that takes none; a pick or a point let go is written at once, a drag only redrawn; Remove takes the mark off.section::tests::it_shows_the_caret_s_mark_or_none_and_nothing_on_a_rest, section::tests::a_pick_or_a_point_let_go_is_written_and_a_drag_only_shown
The pedal’s windowHeel and Sweep for every track, Cry Baby sets them back, Cancel forgets them; every track plays the shared pedal.pedal::tests::it_shows_a_cry_baby_with_nothing_to_set_back, pedal::tests::its_sliders_set_the_pedal_and_cry_baby_sets_it_back, pedal::tests::cancel_forgets_the_window_s_pedal, tests::every_track_plays_the_shared_pedal
The windows and the section in Slintui/wah.slint compiles as OxiGuitar compiles it, with every property and callback the Wah-Wah and Wah-Wah Pedal windows and the Wah-wah section use.tests::the_slint_file_has_what_the_views_set_and_hear
Saved in the plugin’s settingsValues kept in step and in range; missing or unreadable settings are a Cry Baby.settings::tests::values_are_kept_in_step_and_in_range_and_written_as_typed, settings::tests::missing_or_unreadable_settings_are_a_cry_baby
Before the ampAn effect ordered before amps and equalizers, like a pedal in front of an amplifier.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_pedal_runs_in_real_time
A working plugin fileThe .oxp file keeps the plugin contract, with this repository’s SDK version and with 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-wah/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 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 filter, the editor and the curves are our own code.

Published work

SourceWhat we took
Julius O. Smith, “Digital CryBaby”, in Making Virtual Electric Guitars and Associated Effects Using Faust, CCRMA, Stanford UniversityThe measured model of the Cry Baby pedal

Cry Baby is a trademark of Dunlop Manufacturing. This plugin has nothing to do with Dunlop.

Tools

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

Thanks

To Julius O. Smith and CCRMA, who have published so much of what anyone knows about modelling musical instruments, and to everyone who tries this plugin and tells us how it sounds.