lilypond-user
[Top][All Lists]
Advanced

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

Re: ottava text and offset


From: Nick Payne
Subject: Re: ottava text and offset
Date: Wed, 18 Apr 2012 13:30:58 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

On 16/04/12 00:08, Paolo Prete wrote:
Hi all,

How can I make the "ottava" text similar to that:

http://i44.tinypic.com/14vpgud.png

(note the "big fat 8 " and the smaller "va")

In addition, how can I move the ottava text+bracket so that the X position of 
the note head is exactly placed where the number 8 finishes? (note the red 
segment in the above image)

In the first bar I've fudged having the spanner on a single note by using a silent grace note on which to start the spanner:

\version "2.15.32"

eightva = #(define-music-function (parser location dirn shorten adjBreak adjEnd)
    (number? pair? number? number?)
#{
\once \override TextSpanner #'bound-details #'left #'text = \markup\tiny { \concat { 8 \lower #1 \italic\super "va" } }
    \once \override TextSpanner #'font-shape = #'upright
    \once \override TextSpanner #'direction = #dirn
    \once \override TextSpanner #'dash-period = #0.8
    \once \override TextSpanner #'dash-fraction = #0.6
    \once \override TextSpanner #'thickness = #0.8
\once \override TextSpanner #'bound-details #'right #'text = \markup { \draw-line #(cons 0 (/ dirn -2)) } \once \override TextSpanner #'bound-details #'left #'stencil-align-dir-y = #CENTER \once \override TextSpanner #'bound-details #'left #'padding = #(car shorten) \once \override TextSpanner #'bound-details #'right #'padding = #(cdr shorten) \once \override TextSpanner #'bound-details #'right-broken #'padding = #adjEnd \once \override TextSpanner #'bound-details #'left-broken #'X = #adjBreak
    \once \override TextSpanner #'bound-details #'left-broken #'text = ##f
    \once \override TextSpanner #'bound-details #'right-broken #'text = ##f
#})

\relative c'' {
c4 \eightva #UP #'(0.5 . -1.5) #7 #0.5 \grace s8\startTextSpan c'4\stopTextSpan c, c
    c4 \eightva #UP #'(-0.8 . -1) #7 #0.5 c\startTextSpan c\stopTextSpan c
}

Attachment: test.png
Description: PNG image


reply via email to

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