lilypond-user
[Top][All Lists]
Advanced

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

Re: Adjustment to tablature output


From: Carl Sorensen
Subject: Re: Adjustment to tablature output
Date: Thu, 10 May 2012 04:06:50 +0000
User-agent: Microsoft-MacOutlook/14.2.1.120420

On 5/9/12 6:09 PM, "David Nalesnik" <address@hidden> wrote:

>
>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.

I'm pretty sure he wants to use the *baseline* of the characters to align
relative to the staff line.  So you can't use tab-note-head::print, since
it centers the *total extent* of the characters.

You need to find the character lookup from tab-note-head::print, and use
the character lookup to get the markup to be displayed, and offset that
from the staff line.  You'll have to do all the calculations to get to the
right string, I think.

I may be able to look at this some this weekend.

Thanks,

Zcarl




reply via email to

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