lilypond-user
[Top][All Lists]
Advanced

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

Re: Adjustment to tablature output


From: Choan Gálvez
Subject: Re: Adjustment to tablature output
Date: Wed, 09 May 2012 16:01:57 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:12.0) Gecko/20120428 Thunderbird/12.0.1

On 5/9/12 09:34 , Christopher Webster wrote:

From: Choan Gálvez
Subject: Re: Adjustment to tablature output
Date: Wed, 09 May 2012 01:23:26 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:12.0)
Gecko/20120428 Thunderbird/12.0.1
On 5/8/12 10:48 , Christopher Webster wrote:
Is there a recommended way of adjusting TabStaff output so that the
note-heads (fret indications) appear _above_ rather than _on_ the lines
representing the strings, please? This would make it more closely
resemble English renaissance lute tablature, and I have a particular
piece of transcription for which that is a desirable goal.

I've got as far as guessing that assigning a non-standard procedure
value as the tabStaffLineLayoutFunction property of
Tab_note_heads_engraver would probably get me towards where I want to
be, but alas I'm too stupid and/or too ill-informed to see how to write
such a procedure.

Shouldn't be that difficult. Check this thread:
<http://comments.gmane.org/gmane.comp.gnu.lilypond.general/57580>. By
adjusting the `TabNoteHead #'extra-offset` you can put the letters
above the lines.

Unfortunately, they won't align that nicely... but I can't help any
further.

Best.
--
Choan Gálvez

Ukecosas. Los ukeleles que nos gustan, también para ti
Visítanos: <http://ukecosas.es/>
Degústanos en Facebook: <http://facebook.com/ukecosas>

Many thanks for the advice and the link.

In the meantime, I searched this list's archives more carefully and
found a solution which works perfectly.

Posted by Neil Puttock on Fri, 8 Apr 2011 20:40:16 +0100 and archived at
http://lists.gnu.org/archive/html/lilypond-user/2011-04/msg00187.html :

\override TabNoteHead #'Y-offset =
#(lambda (grob)
(+ (/ (ly:staff-symbol-staff-space grob) 2)
(ly:staff-symbol-referencer::callback grob)))
\override TabNoteHead #'whiteout = ##f

What wasn't immediately obvious to me was where to insert that fragment,
but I got lucky at the first attempt by putting it inside the \with
construct for my TabStaff :

\new TabStaff
\with
{
tablatureFormat = #fret-letter-tablature-format
fretLabels = #luteFretLabels % defined elsewhere by me
stringTunings = #bandoraTuningSet % defined elsewhere by me
\override TabNoteHead #'Y-offset =
#(lambda (grob)
(+ (/ (ly:staff-symbol-staff-space grob) 2)
(ly:staff-symbol-referencer::callback grob)))
\override TabNoteHead #'whiteout = ##f
\remove "Clef_engraver"
\remove "Time_signature_engraver"
}
{
% stuff ...
}

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.

% simplified example
\version "2.14.2"
\new TabStaff
  \with
  {
    tablatureFormat = #fret-letter-tablature-format
    \override TabNoteHead #'Y-offset =
      #(lambda (grob)
        (+ (/ (ly:staff-symbol-staff-space grob) 2)
          (ly:staff-symbol-referencer::callback grob)))
    \override TabNoteHead #'whiteout = ##f
  }
  {
e' f' fis' g' gis' a' ais' b' c'' cis'' d'' dis'' e'' f'' fis'' g'' gis''
  }
% end example

Best.
--
Choan Gálvez

Attachment: tab_letters_above_line.pdf
Description: Adobe PDF document


reply via email to

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