Next: Fret diagram markups, Previous: Default tablatures, Up: Common notation for fretted strings
LilyPond tabulature automatically calculates the fret for
a note based on the string to which the note is assigned.
In order to do this, the tuning of the strings must be
specified. The tuning of the strings is given in the
StringTunings
property.
LilyPond comes with predefined string tunings for banjo, mandolin, guitar and bass guitar. Lilypond automatically sets the correct transposition for predefined tunings. The following example is for bass guitar, which sounds an octave lower than written.
<< \new Staff { \clef "bass_8" \relative c, { c4 d e f } } \new TabStaff { \set TabStaff.stringTunings = #bass-tuning \relative c, { c4 d e f } } >>
The default string tuning is guitar-tuning
, which
is the standard EADGBE tuning. Some other predefined tunings are
guitar-open-g-tuning
, mandolin-tuning
and
banjo-open-g-tuning
. The predefined string tunings
are found in scm/output-lib.scm
.
A string tuning is a Scheme list of string pitches, one for each string, ordered by string number from 1 to N, where string 1 is at the top of the tablature staff and string N is at the bottom. This ordinarily results in ordering from highest pitch to lowest pitch, but some instruments (e.g. ukulele) do not have strings ordered by pitch.
A string pitch in a string tuning list is the pitch difference of the open string from middle C measured in semitones. The string pitch must be an integer. Lilypond calculates the actual pitch of the string by adding the string tuning pitch to the actual pitch for middle C.
LilyPond automatically calculates the number of strings in the
TabStaff
as the number of elements in stringTunings
.
Any desired string tuning can be created. For example, we can
define a string tuning for a four-string instrument with pitches
of a''
, d''
, g'
, and c'
:
mynotes = { c'4 e' g' c'' | e'' g'' b'' c''' } << \new Staff { \clef treble \mynotes } \new TabStaff { \set TabStaff.stringTunings = #'(21 14 7 0) \mynotes } >>
Installed Files: scm/output-lib.scm.
Snippets: Fretted strings.
Internals Reference: Tab_note_heads_engraver.
This page is for LilyPond-2.11.58 (development-branch).
Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.
Your suggestions for the documentation are welcome.