lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tuning description at beginning of TabStaff


From: Valentin Petzel
Subject: Re: Tuning description at beginning of TabStaff
Date: Sun, 29 Jan 2023 23:02:17 +0100

Hi Stefan,

The markup command \column uses the property baseline-skip for the minmal 
distance between two baselines. You need to reduce this value to the actual 
distance between two tab lines, which is by default 1.5 for a TabStaff.

So this will align more or less:

\score
{
<<
\new TabStaff  \with {
\override InstrumentName.self-alignment-X = #RIGHT
\override InstrumentName.font-size = #-1.5
instrumentName = \markup \override #`(baseline-skip . 1.5) \right-column {
     "d" "b" "g" "D" "A" "D"
       }
   } {
      \set TabStaff.stringTunings = \stringTuning <d, a, d g a d'>
      {d,8\6 d'\2 d\4 d'\1  d,8\6 d'\2 d4\4 } }
>>
}

This will not evenly spread the letters out though. This can be circumvented 
by raising the g a bit:

\score
{
<<
\new TabStaff  \with {
\override InstrumentName.self-alignment-X = #RIGHT
\override InstrumentName.font-size = #-1.5
instrumentName = \markup \override #`(baseline-skip . 1.5) \right-column {
     "d" "b" \raise #0.4 "g" "D" "A" "D"
       }
   } {
      \set TabStaff.stringTunings = \stringTuning <d, a, d g a d'>
      {d,8\6 d'\2 d\4 d'\1  d,8\6 d'\2 d4\4 } }
>>
}

but generallly I think one could pretty easily do a more robust implementation 
for this. It’s just too late today for me :).

Cheers,
Valentin

Am Sonntag, 29. Jänner 2023, 22:20:14 CET schrieb Stefan E. Mueller:
> Hi,
> 
> I am using Lilypond for writing guitar tablature, and sometimes open
> or special tunings are used (e.g. DADGAD). I know how to specify the
> tuning in Lilypond using  \stringTuning <d, a, d g a d'>, so the tablature
> comes out nice and correct.
> 
> What I would like to know is whether it is possible to give the tuning
> notes right before the first Tabstaff, vertically aligned to the tablature
> lines. I tried accomplish this using "instrumentName", but it does not
> align nicely:
> 
> \score
> {
> <<
> \new TabStaff  \with {
> \override InstrumentName.self-alignment-X = #RIGHT
> \override InstrumentName.font-size = #-1.5
> instrumentName = \markup \right-column {
>      "d" "b" "g" "D" "A" "D"
>        }
>    } {
>       \set TabStaff.stringTunings = \stringTuning <d, a, d g a d'>
>       {d,8\6 d'\2 d\4 d'\1  d,8\6 d'\2 d4\4 } }
> 
> }
> 
> Any help is appreciated, many thanks -
> 
>       Stefan
> 
> --
> Stefan E. Mueller
> 
> stefan.e.mueller@gmx.de

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]