Jump to content

Let TabStaff print the topmost string at bottom: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
In tablatures usually the first string is printed topmost. If you want to have it at the bottom change the <code>stringOneTopmost</code>-context-property. For a context-wide setting this could be done in <code>layout</code> as well.
In tablatures, the first string is usually printed topmost. If you want to have it at the bottom, set the <code>stringOneTopmost</code> context property to <code>#f</code>. For a context-wide setting this could be done in the <code>\layout</code> block as well.


<lilypond version="2.24.0">
<lilypond version="2.24">
%\layout {
%\layout {
%  \context {
%  \context {
Line 20: Line 20:


<<
<<
   \new Staff { \clef "G_8" <>_"default" \m <>_"italian (historic)"\m }
   \new Staff {
    \clef "G_8"
    <>_"default" \m
    <>_"italian (historic)"\m
  }
   \new TabStaff  
   \new TabStaff  
   {
   {
Line 31: Line 35:
</lilypond>
</lilypond>


[[Category:Fretted strings]]
[[Category:Staff notation]]
[[Category:Staff notation]]
[[Category:Fretted strings]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]

Latest revision as of 17:59, 10 December 2025

In tablatures, the first string is usually printed topmost. If you want to have it at the bottom, set the stringOneTopmost context property to #f. For a context-wide setting this could be done in the \layout block as well.

\version "2.24"

%\layout {
%  \context {
%    \Score
%    stringOneTopmost = ##f
%  }
%  \context {
%    \TabStaff
%    tablatureFormat = #fret-letter-tablature-format 
%  }
%}

m = {
  \cadenzaOn
  e, b, e gis! b e'
  \bar "||"
}

<<
  \new Staff {
    \clef "G_8"
    <>_"default" \m
    <>_"italian (historic)"\m
  }
  \new TabStaff 
  {
    \m
    \set Score.stringOneTopmost = ##f 
    \set TabStaff.tablatureFormat = #fret-letter-tablature-format 
    \m
  }
>>