lilypond-user
[Top][All Lists]
Advanced

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

Re: Re: Centered Textspan for Piano music


From: Neil Puttock
Subject: Re: Re: Centered Textspan for Piano music
Date: Mon, 24 Nov 2008 22:48:24 +0000

Hi Stefan,

2008/11/24 stefankaegi <address@hidden>:
> Ok... I discovered a little problem with this method. I think you can
> best see it in the attachement in the bars 12 - 14. I'd like to have the
> spanner something like this:
>
> 12      13      14      15
> acc. _ _ _ _ _ _ _ _rit.

Have you upgraded to 2.11 like Mark suggested?

If not, I'm afraid it's quite tricky to fix this, involving Scheme
callback overrides of the type detailed here:
http://lilypond.org/doc/v2.10/Documentation/user/lilypond/Difficult-tweaks#Difficult-tweaks

If you have upgraded, you're in luck, since overriding TextSpanner
'bound-details will allow you to control exactly where the text
appears, and how it's positioned in relation to the line and
noteheads:

% set start text
\override TextSpanner #'bound-details #'left #'text = #"acc."
% hide text at end of line before break
\override TextSpanner #'bound-details #'right-broken #'text = ##f
% set end text
\override TextSpanner #'bound-details #'right #'text = #"rit."
% align spanner with first note after line break
\override TextSpanner #'bound-details #'left-broken #'end-on-note = ##t
% hide start text after break
\override TextSpanner #'bound-details #'left-broken #'text = ##f

One caveat though: you'll find that these settings don't work as well
if you're using the centred dynamics template; unfortunately, it's a
bit broken since the spanner isn't attached to note columns: the
'end-on-note property is ignored and the text attachment is incorrect.
 You can see this problem in Mark's picture, since the "acc." text
starts before the note (it's actually attached to a paper column).

Unless you want to use trial and error tweaks to correct the
positioning, I'd advise putting the text spanner in one of the voices
and increasing the padding until it appears to be centred.

Regards,
Neil

Attachment: spanner.png
Description: PNG image


reply via email to

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