lilypond-user
[Top][All Lists]
Advanced

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

Positioning text below notes at the same height


From: address@hidden
Subject: Positioning text below notes at the same height
Date: Thu, 02 Aug 2012 16:41:12 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20120713 Thunderbird/14.0

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?
// Anders
PS! This is the first function I have written so please suggest improvements!!

\version "2.14.2"

\header {

title = "Test of Fret numbering"

subtitle = "E9th Pedal Steel Guitar"

arranger = "Anders Eriksson"

}

%% -------------------------------------------------

%% fret-number.lyi

%% Function for creating a fretnumber below note or chord.

%% Call:

%% c4-\fN "8"

%% <c e g>-\fN "3"

%% -------------------------------------------------

fN =

#(define-music-function (parser location fretp) (string?)

(make-music

'TextScriptEvent

'direction

-1

'text

(markup #:line (#:box (#:italic fretp )))))

%% end of function fN

\relative c' {

c4-\fN "8" d e c'-\fN "10"

}


--
English isn't my first language.
So any error or strangeness is due to the translation.
Please correct my English so that I may become better.




reply via email to

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