lilypond-user
[Top][All Lists]
Advanced

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

Re: Positioning text below notes at the same height


From: Thomas Morley
Subject: Re: Positioning text below notes at the same height
Date: Thu, 2 Aug 2012 18:46:00 +0200

2012/8/2 address@hidden <address@hidden>:
> I have made a small function that allows me to put out the fret number (of a
> guitar) below a note. My problem is that the text is positioned below the
> note at a specific distance. Which means that if the note is high on the
> staff the text will be high and if the note is low on the staff it will be
> lower.
>
> Is there someway of setting that I want all text the same distance from the
> staff, not from the note?

How about:

\version "2.14.2"

fN =
#(define-music-function (parser location fretp) (string?)
  (let ((m (make-music 'TextScriptEvent 'text fretp)))
        (set! (ly:music-property m 'tweaks)
                (acons 'staff-padding 4 (ly:music-property m 'tweaks)))
  m))

%% end of function fN

\relative c' {
c4-\fN "8" d e c'-\fN "10"
}


-Harm



reply via email to

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