Writing accordion parts with LilyPond
LilyPond is an open-source sheet music engraving software. Its main value is that insetad of a WYSIWYG editor where you have to drag things around to a good layout, and copy-paste repetitive music, you input just the music and LilyPond decides how to lay it out, with good spacing, no collisions, etc.
The stradella-clef library for LilyPond lets you engrave all three styles of bass from a single source: full chords, single notes with text above, or the new Stradella clef. If you’re using LilyPond for the first time, this video teaches you how to install it and write your first accordion part:
I use LilyPond to rewrite commercial sheet music and parts from my band in my choice of bass notation (which is always Stradella clef for me, but might be single notes with text labels for you). I find it takes 3-4 hours per piece on average (depending on how long the piece is). It then takes almost no time to fix any errors from the original part, add extra rehearsal marks or fingerings, or transpose it to a different key.
The Stradella clef library works with LilyPond 2.24.3 or newer. (File an issue on the GitHub repo if you need support for older versions, and I’ll look into it.)
Get the library
-
Save this file next to your score:
-
Include it from your score:
\include "stradella-clef.ly"LilyPond searches the score’s folder for includes first, so you don’t need to set any include paths. But if you want to store the library in one place and use it from any folder, you can use LilyPond’s
-Ioption. -
Replace the
Staffcontext in your bass part withStradellaStaff:\new PianoStaff << \new Staff { ... treble music ... } \new StradellaStaff { ... bass music ... } >>
Selecting the style
To use the new Stradella clef, just use \clef stradella instead of \clef bass. Don’t bother with octave marks, because they aren’t represented in the notation anyway.
To use the two classical styles of notation, apply the \stradellaTriads or \stradellaSymbols functions to your music.
\clef bass
\stradellaTriads { c4 \maj c g \maj c }
\section
\stradellaSymbols { c4 \maj c g \maj c }Both functions ignore the octave you write, and put root notes in the bottom half of the staff and chords in the top half, as is the convention. Don’t use \relative, \fixed or \transpose around the function, or they will overwrite the octaves.
% WRONG!
\relative c, {
\stradellaTriads { c4 \maj c g \maj c }
}
You can use \transpose inside the music, but you don’t need to use \relative or \fixed at all.
% GOOD
\clef bass
\stradellaTriads {
\transpose c d {
\key c \major
c4 \maj c g \maj c
}
}It’s probably easiest to use it in the \score block itself rather than on individual variable definitions, unless you’re switching between different styles mid-piece.
vocalPart = \relative c' { ... }
treblePart = \relative c' { ... }
bassPart = { ... }
\score <<
\new Staff { \vocalPart }
\new PianoStaff <<
\new Staff { \treblePart }
\new StradellaStaff { \stradellaSymbols \bassPart }
>>
>>
Writing chords
The library gives you a command for each row / each chord shape: \maj \min \sev and \dimin. (\dimin is longer because \dim gives you a diminuendo.) Each command takes a single note as an argument. Unlike articulations and \chordmode, the command comes before the note name/duration, so here’s an alternating bass on C major:
\clef bass
\stradellaSymbols {
c4 \maj c4 g4 \maj c4
}The first C and the G are bass/root notes, and the other Cs are major chords.
You can omit pitches or durations according to the usual LilyPond rules. Stradella clef can represent chord combining, so you can also use each command on individual notes of a chord:
\clef stradella
<\maj c \min a>2Writing counterbass
The \cnt command works the same as the others and gives you a counterbass note. Name the actual note name you want played. If you select Stradella clef, it will automatically move the note down a third to show the player which button to play. In the other notations, it uses the conventional legato mark.
\clef stradella
\cnt e4 % lives on the C line
\clef bass
\stradellaTriads {
\cnt e4
}Conclusion
With LilyPond, stradella-clef.ly gives you an easy way to write accordion music and switch between the different notation styles without inputting all the notes again. You could generate a Stradella clef and a traditional part and let people choose which to play.