lilypond-user
[Top][All Lists]
Advanced

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

Re: Adjustment to tablature output


From: David Nalesnik
Subject: Re: Adjustment to tablature output
Date: Wed, 9 May 2012 19:09:37 -0500


Hi,

On Wed, May 9, 2012 at 10:13 AM, Carl Sorensen <address@hidden> wrote:
On 5/9/12 8:01 AM, "Choan Gálvez" <address@hidden> wrote:

>
>Nice. But... it still results in the same ugly (to me) vertical
>alignments: letters with ascendant strokes look nice, letters with
>descendant strokes are aligned by its bottom, letters without ascendants
>or descendants leave a gap between its bottom and the line. See
>attachment.

The challenge is that note heads are intended to be centered vertically on
the desired placement.  And apparently your usage for tablature is to have
the fret labels *rest* on the staff line, rather than be *centered* in the
staff gap.

This is potentially resolvable, because markup text does have a baseline
reference.  It will require something more than adding the offset, however.

Probably a new stencil function should be defined, and the stencil
property of the TabNoteHead overwritten.

I don't have time to write the new function right now, but I hope that
pointing you (or others) in the right direction may help.

I'm not confident I understand how you'd like the letters to align.  If you want the bottom-most point of the letters to touch the staff line (even though this means that they won't line up as in the text I'm typing now), then the stencil override Carl mentions might be achieved like this:

\new TabStaff
 \with
 {
   tablatureFormat = #fret-letter-tablature-format
   \override TabNoteHead #'whiteout = ##f
 }
 {
   \override TabNoteHead #'stencil = #(lambda (grob)
     (ly:stencil-translate-axis
       (ly:stencil-aligned-to (tab-note-head::print grob) Y -1)
       (ly:staff-symbol-line-thickness grob) Y))
   e' f' fis' g' gis' a' ais' b' c'' cis'' d'' dis'' e'' f'' fis'' g'' gis''
 }

For some reason, the override won't work for me inside the \with block.

Do you want some separation between the characters and the staff line?  If not, the line-thickness of the staff line should be halved.

HTH,
David



reply via email to

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