Name tuning of each string in a TabStaff: Difference between revisions
Appearance
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series |
m New category |
||
| (One intermediate revision by the same user not shown) | |||
| Line 77: | Line 77: | ||
[[Category:Staff notation]] | [[Category:Staff notation]] | ||
[[Category:Fretted strings]] | [[Category:Fretted strings]] | ||
[[Category:Snippet]] | |||
Latest revision as of 23:33, 21 November 2025
In a TabStaff, the tuning of each string can be displayed to the left of the system using markup commands.
\version "2.24"
%% http://lsr.di.unimi.it/LSR/Item?id=658
%% Currently there's a bug in LSR
%% Thus the overrides for font-name below are commented
%% See: https://lists.gnu.org/archive/html/lilypond-user/2025-07/msg00073.html
%% --Harm, July 2025
%%------------------------------------------
\layout {
tagline = ##f
}
\layout {
\override Staff.InstrumentName.self-alignment-X = #RIGHT
}
EADGBE =
\markup {
\fontsize #-4
\override #'(baseline-skip . 1.5)
\column
%\override #'(font-name . "Arial Bold")
{
E B G D A E
}
}
%%------------------------------------------------
\new TabStaff {
\set TabStaff.instrumentName = \markup { " " \EADGBE }
\set TabStaff.shortInstrumentName = \markup \EADGBE
e,8 c e gis b e'
}
%% To get accidentals from the musicfont use
%% \concat { <string-name> \musicglyph <accidental-string> }
%% use \raise and \fontsize to taste
strangeTuning =
\markup {
\fontsize #-4
\override #'(baseline-skip . 1.5)
\column
%\override #'(font-name . "Arial Bold")
{
D C
\concat {
F
\raise #0.5 \fontsize #-2 \musicglyph #"accidentals.sharp"
}
D
\concat {
B
\raise #0.2 \fontsize #-2 \musicglyph #"accidentals.flat"
}
F
}
}
<<
\new Staff { \clef "G_8" f, bes, d fis c' d' }
\new TabStaff {
\set TabStaff.stringTunings = \stringTuning <f, bes, d fis c' d'> %D C F D Bb F>
\set TabStaff.instrumentName = \markup { " " \strangeTuning }
\set TabStaff.shortInstrumentName = \markup \strangeTuning
f, bes, d fis c' d'
}
>>
%%------------------------------------------------