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

Picking plugin

A string sounds different depending on how it’s struck. A downstroke with a pick has more punch than an upstroke. A plectrum is brighter than a fingertip. And when the pick hits the same string twice in the same direction, it has to come back over the string first, and you hear it land: that’s the chug in a run of downstrokes. This plugin gives OxiGuitar’s playback those differences.

You choose per track, in the Track tab’s Picking section, whether it’s played with a Plectrum or Fingerstyle. The plugin then works out how each note is struck, and the sound plugin plays it that way. What you write always wins: pick strokes and right-hand fingers on the page are played exactly as marked. The plugin also puts the palette’s pick-stroke and finger buttons there for you to write them.

It changes only what you hear. The score, the tablature and the saved file stay exactly as written, apart from the marks you add with its buttons.

What it plays

  • With a plectrum, the hand swings like a pendulum: down on the beat, up in between. Eighths and sixteenths alternate down and up, a gallop is played down, down-up, and quarter notes are all downstrokes.
  • Fingerstyle, the thumb (p) plays the bass strings, striking down, and the index, middle and ring fingers (i, m, a) play the treble strings, striking up. A run of notes on the treble strings alternates i and m.
  • Twice the same way: when a stroke goes the same way as the one before, on the same string while it still rings, it sounds percussive. When it goes on to another string, it sounds smoother, as a sweep does.

The sound itself comes from the sound plugin: the MIDI plugin’s manual explains what each kind of stroke sounds like there.

How to use it

Choose how a track is picked

  1. Select a guitar or bass track and open the Track tab.
  2. In the Picking section, pick Plectrum or Fingerstyle.

A track nobody has set plays the way its sound was recorded: Fingerstyle for a nylon-string guitar and a fingered bass, Plectrum for everything else. The choice is saved with the song, beside the score file.

Write a stroke or a finger

The palette’s Effects group has six buttons from this plugin:

ButtonWhat it writes
Downward PickstrokeThe beat is picked down
Upward PickstrokeThe beat is picked up
p, i, m, aThe note is played with the thumb, index, middle or ring finger

Each works on the caret’s beat (a stroke) or the note on the caret’s string (a finger), or on everything you have selected. Pressed again, the mark comes off. Shift + D and Shift + U also write pick strokes, and the Note tab picks any finger, without this plugin.

What you write is always played as written. The rest the plugin works out.

Tune how it sounds

Plugins → Picking… opens a window with a slider for each of the numbers the picking is most sensitive to, so you can tune it by ear:

UnderSliderWhat it setsDefault
The handCoarsest swingThe longest step the picking hand swings in: a quarter (quarter notes alternate), an eighth, or a sixteenthEighth
Still ringing withinHow long before a stroke a note may end and still count as ringing into it (for restrikes and glides)5 ms
The soundUpstroke level, Upstroke onsetHow much softer an upstroke is, and how long its start takes to rise−1.5 dB, 1.5 ms
Finger onset, Thumb onsetHow long a finger’s and the thumb’s start take to rise, on a set recorded with a pick2.5 ms, 4 ms
Tone fromWhere the fingers’ rounder tone and a pick’s brighter one start2.5 kHz
Plectrum liftHow much brighter a pick is on a set recorded with the fingers4 dB
Pick’s tick, Finger’s tickHow loud a restrike’s tick is, against what was ringing−12 dB, −20 dB
Tick’s fall, Tick’s pitchHow fast the tick dies away, and how high it is (in harmonics of the note)0.8 ms, ×8
Glide level, Glide onsetHow much softer and smoother a glide is−0.5 dB, 1 ms

Apply keeps them and leaves the window open, so you can press Play and listen; OK keeps them and closes it; Cancel forgets what you didn’t apply; Defaults sets every slider back. They’re saved in OxiGuitar’s settings.json, under oxiguitar.picking, and the song plays with them from the next Play. The sound’s numbers are played by the sound plugin: the MIDI plugin reads them each time it gets a song ready.

How it works

OxiGuitar asks the plugin about each track before a song plays or is exported. It gets the track’s notes and every beat with its rhythm, and gives the notes back marked with how each one is struck: down or up, which finger if any, and whether the stroke lands on a ringing string or carries on from another. The sound plugin hears those marks with each note.

With a plectrum

The picking hand of most guitarists moves like a pendulum, in time with the music: down on each beat, up between beats, and it keeps moving even when it doesn’t touch the strings. So a note’s direction depends on where it falls in the bar, not on the note before it.

The plugin looks at each quarter note in turn. It takes the shortest note that starts there, an eighth at the longest, as the size of the hand’s swing. Notes on the first, third, fifth… step of that swing are downstrokes, the others upstrokes. So:

  • eighths go down, up, down, up;
  • sixteenths go down, up, down, up, four to a beat;
  • a gallop (an eighth then two sixteenths) goes down, then down, up;
  • quarter notes are all down;
  • a note on the “and” after a rest is an upstroke, as the hand was already on its way up.

Triplets are the exception: three to a beat don’t divide evenly into down and up, so the hand keeps alternating from one beat to the next (down, up, down, then up, down, up). A chord is one stroke: every note in it goes the same way. Hammer-ons, pull-offs, slides, taps, slaps and pops aren’t struck, and grace notes are left as they are.

Fingerstyle

The thumb strikes down and the fingers strike up. On an instrument with five strings or more, the thumb takes the lower half of the strings. The fingers take the rest, lowest first: one note is i, alternating with m when the note before was also a lone i; two notes are i and m; three are i, m and a. Any more go to the thumb. On four strings (a bass, a ukulele), the fingers play everything.

The same way twice

After the directions are set, each stroke is compared with the one just before it:

  • The same direction, on a string that is still ringing: the pick, or the finger, lands on the vibrating string before it can strike it. That is the percussive “restrike”.
  • The same direction, onto another string: the stroke carries on through, like a sweep or a rest stroke. That is the smoother “glide”.

A rest, or a note that has stopped ringing, breaks the chain. This holds for the fingers too, by their direction: two upward fingers in a row on one ringing string restrike.

The numbers

Every number above that shapes what you hear (the hand’s coarsest swing, how long a note counts as ringing, and the sound plugin’s levels, onsets, tone and tick) can be tuned in Plugins → Picking… (How to use it). The plugin keeps them in settings.json and hands the sound’s to the sound plugin through a small service of its own, picking-sound, which the MIDI plugin asks each time it gets a song ready to play. A sound plugin that doesn’t ask plays its own defaults, and the MIDI plugin’s defaults are the same numbers.

What is written

OxiGuitar itself reads the marks in the score: pick strokes, the direction of a brush, right-hand fingers, tremolo picking (alternating from its written stroke), a rasgueado’s strokes. The plugin never changes those. It only fills in what isn’t written, and adds the restrikes and glides.

Requirements and assumptions

Requirements

  • OxiGuitar 0.26 or later (plugin interface 3.1). See the OxiGuitar manual.
  • A sound plugin that plays how notes are struck. The MIDI plugin does this; others play the notes as before.
  • Windows, macOS or Linux.

Assumptions

  • The beat is a quarter note. In 6/8 or 12/8 the eighths still alternate, which is how most players pick them.
  • One hand plays every voice of a track: notes of different voices at the same moment are one stroke.
  • Guitarists differ. Some pick strictly alternately, some use economy picking, some downpick everything. The pendulum is the most common, and a written stroke always overrides it.

Installing

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

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

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

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

Features and their tests

Every feature of this repository and the tests that check it. python3 scripts/test-all.py runs them and checks that every row names a test that exists. A new feature or plugin comes with its tests and a row here, in the same pull request. How the Tests column is written, and what goes into tests/suite.json, is on the Testing page of OxiGuitar’s manual (docs/manual/src/testing.md in the OxiGuitar repository).

FeatureWhat it doesTests
A plugin that keeps the contractLoads in OxiGuitar’s host, with a valid manifest that lists every palette tool.contract::the_plugin_file_keeps_the_contract, tests::the_manifest_is_valid_for_the_plugin, tests::every_palette_tool_is_in_the_manifest
Plectrum or Fingerstyle per trackChosen in the Track tab’s Picking section; a track nobody set follows its instrument (fingers for nylon guitar and fingered bass). Only fretted and fretless tracks.settings::tests::a_track_nobody_set_follows_its_instrument_and_a_choice_wins, section::tests::the_section_lists_both_ways_and_picks_one, perform::tests::nylon_guitars_default_to_fingers_and_other_classes_are_left_alone
The palette’s buttonsDownward and Upward Pickstroke on beats, p, i, m and a on notes: the caret’s or the selection’s, on unless all have it, then off.marks::tests::a_pick_stroke_goes_on_every_selected_beat_with_notes_then_comes_off, marks::tests::a_finger_goes_on_the_note_on_the_caret_s_string_or_every_selected_note
The plectrum’s pendulumDown on the beat: eighths and sixteenths alternate, a gallop goes down, down-up, quarter notes all down, and triplets keep alternating.perform::tests::a_plectrum_swings_down_on_the_beat, perform::tests::through_triplets_the_hand_keeps_alternating, perform::tests::lengths_count_dots_and_tuplets
FingerstyleThe thumb down on the bass strings, i, m and a up on the treble ones; a lone treble note alternates i and m; a chord is shared out.perform::tests::fingerstyle_plays_the_thumb_down_and_the_fingers_up, perform::tests::a_chord_is_one_stroke_and_fingers_share_it_out
Written marks winWritten strokes and fingers are played as written; notes not picked take no stroke, and a rest breaks the chain.perform::tests::what_the_score_writes_wins, perform::tests::notes_not_picked_and_rests_break_nothing
Restrike and glideThe same direction on the same ringing string restrikes; onto another string it glides; through OxiGuitar’s host too.perform::tests::a_plectrum_swings_down_on_the_beat, contract::the_host_plays_a_track_as_it_is_picked
Plugins > Picking…The numbers the picking is most sensitive to, a slider each, kept in settings.json with Apply or OK (Cancel forgets, Defaults sets back): the hand’s coarsest swing and ringing window, and how each kind of stroke sounds, handed to the instrument through the picking-sound service.calibration::tests::unset_or_unreadable_values_are_the_defaults_and_others_read_back, calibration::tests::a_knob_snaps_to_its_range_and_step_and_reads_in_its_unit, calibration::tests::the_service_answers_the_sound_knobs_only, window::tests::the_window_lists_the_hand_and_the_sound_and_its_sliders_set_them, window::tests::cancel_forgets_what_was_not_applied, perform::tests::the_calibration_sets_the_coarsest_swing_and_how_long_a_note_rings, contract::the_calibration_in_settings_json_reaches_the_instrument_through_the_service

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-picking/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

This plugin is small, and it stands on what other people found out and wrote down. Thank you to all of them.

Code we use

ProjectWhat it does hereLicence
OxiGuitar’s plugin SDKTalks to OxiGuitarMIT OR Apache-2.0

What the picking is based on

  • The pendulum: the common teaching that the strumming and picking hand moves down on the beat and up off it, used by strumming methods and by virtual guitar instruments alike.
  • Classical right-hand fingering: the thumb for the bass strings, i, m and a for the treble, and alternating fingers on repeated notes.
  • Mateus Rocha de Paula’s description of what to hear, in issue #364: the same direction on one string percussive, onto another string smoother.