Creat Dulcimer Tabs with Lilypond

Last month my daughter was inspired to learn the Mountain Dulcimer. We started looking for tablature on the Internet to help us get started (one great resource is the web site Everything Dulcimer). But I also wanted to be able to create simple tabs on my own.

I had used Lilypond in the past to create sheet music for my drum students. I figured it should be simple enough to use it again for the dulcimer. Unfortunately there are a few quirks to learn before you can create exactly what you want.

First the dulcimer has an unusual fret and tuning arrangement that does not match any of the tunings present in Lilypond by default. So the first step in the process is to create a custom string tuning. I found one on the lilypond-user listserv that I tweaked to get this:


\with {
stringTunings = #`(
,(ly:make-pitch 0 1 0)
,(ly:make-pitch -1 5 0)
,(ly:make-pitch -1 1 0)
)
fretLabels = #'(
"0" "0+" "1" "1+" "2" "3" "3+" "4" "4+" "5" "6" "6+"
"7" "7+" "8" "8+" "9" "10" "10+" "11" "11+" "12" "13" "13+"
"14" "14+" "15" "15+" "16" "17" "17+" "18" "18+" "19" "20" "20+"
)
tablatureFormat = #fret-letter-tablature-format
fontSize = #2
}

This whole section will go in the TabStaff section. The key difference is the string pitches are upside down to match the arrangement of the dulcimer strings.

The second quirk is that if you tweak the notes to match the standard staff you may discover the tablature has gone awry. I ended up using a copy of the music for the tab so I could shift the octave up to fit within the dulcimer’s range as specified by the string tunings. For example this is Twinkle, Twinkle in G major:


melodyOne = {
g4 g d' d | e e d2 | c4 c b b | a a g2 | \break
d'4 d c c | b b a2 | d4 d c c | b b a2 | \break
g4 g d' d | e e d2 | c4 c b b | a a g2 |
}

lilypond_example_1

It produces a descent looking staff, but when used as a tab it comes out quite awkward.

There are a number of things that need to be tweaked to get it to look right for a dulcimer. First, if you have tuned to D-A-D, you’ll need to transpose from G to D. Then lilypond is going to want to put some of the notes in the wrong octave, this is easy to fix with an apostrophe to bring it back up. The other nice thing is you can specify which string to use when it’s in tablature mode. For example this melody should only be played on the bottom “dd” strings, so I used \3 to force Lilypond to keep the note on that string.


melodyTab = {
\transpose g d {
g4 g d'\3 d'\3 | e'\3 e'\3 d'2\3 | c'4 c' b b | a a g2 |
d'4\3 d'\3 c'\3 c'\3 | b b a2 | d'4\3 d'\3 c' c' | b b a2 |
g4 g d'\3 d'\3 | e'\3 e'\3 d'2\3 | c'4\3 c'\3 b b | a a g2 |
}
}

lilypond_example_2

Once I had those pieces in place, the tab looked the way I wanted it to.

While you could probably move the string tuning to a separate file, in this example, it is part of the tabStaff. I also included lyrics as an extra touch. Note that the key of the tablature does not match the musical notation (D vs. G).

lilypond_example_3

You can download the full file here.