Neil Puttock | 29 Nov 00:10

Re: Re: Re: Centered Textspan for Piano music

2008/11/25 stefankaegi <skaegi <at> hispeed.ch>:
> Thank you very much. This has already helped a lot. Yes, I'm using
> lilypond 2.11.64. There's still a small problem. I marked it red in the
> picture. There's a line too far left in bar 14. Don't quite know what's
> the problem of this.

This is part of the problem I mentioned about TextSpanner alignment
when using the centred dynamics template.  Normally, using
'end-on-note would align the start point with the first note after the
break, but this is ignored when the spanner is attached to skips.
You'll have to add some 'left-broken 'padding to shift the line the
the right.

> And btw: do you have an idea how I could maybe make the bar lines like
> half transparent? The text and the bar lines sometimes collide in the
> piece.

The simplest way is to use \whiteout:

\override TextSpanner #'bound-details #'right #'text = \markup
\whiteout { rit. }

You might find that there's not enough whitespace around the text; in
this case, you're better off combining the text with a white box,
setting the box dimensions manually.

Regards,
Neil
stefankaegi | 22 Nov 14:37
Favicon

Centered Textspan for Piano music

Good afternoon

I'd like to have a centered accelerando Textspan for a piano piece.
Something like this: acc. -   -   -   -

I'm using the last template from here:
http://lilypond.org/doc/v2.10/Documentation/user/lilypond/Piano-templates#Piano-templates

So I tried to do this Textspan in the dynamics section. It now looks
something like this:

> \override TextSpanner #'edge-text = #'("acc " . "")
> s2. s4\startTextSpan
> 
> s4.\stopTextSpan

Unfortunately this does not work. I hope you have an idea.

Thanks a lot for your effort
Cheers
Mark Polesky | 22 Nov 22:05
Favicon

Re: Centered Textspan for Piano music

November 22, 2008, stefankaegi wrote:

> I'd like to have a centered accelerando Textspan for a piano piece.
> Something like this: acc. -   -   -   -

Did you mean...
1) center the text-spanner between the 2 staves
2) center the dashes in the text-spanner vertically
      ( acc. - - - as opposed to acc. _ _ _ )
or
3) both? 

I don't know if this works for version 2.10, but here's how to do it in 2.11: 

First, you need the updated template:
http://lilypond.org/doc/v2.11/Documentation/user/lilypond-learning/Piano-templates#Piano-templates

Then add this line to the list of \consists in the Dynamics context definition:
\consists "Text_spanner_engraver"

If you want the dash centered vertically, 
then add this line to the list of \overrides:
\override TextSpanner #'bound-details #'left #'stencil-align-dir-y = #CENTER

Then enter your spanner-text like so:

dynamics = {
  \override TextSpanner #'bound-details #'left #'text = #"acc. "
  s2. s4\startTextSpan
  s4.\stopTextSpan
(Continue reading)

stefankaegi | 23 Nov 14:13
Favicon

Re: Centered Textspan for Piano music

Thank you very much, Mark, for your generous help. This was exactly what
I was looking for. :)

Stefan
stefankaegi | 24 Nov 21:13
Favicon

Re: Re: Centered Textspan for Piano music

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.

So not with this interruption.

Best wishes
Stefan
_______________________________________________
lilypond-user mailing list
lilypond-user <at> gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user
Neil Puttock | 24 Nov 23:48

Re: Re: Centered Textspan for Piano music

Hi Stefan,

2008/11/24 stefankaegi <skaegi <at> hispeed.ch>:
> 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
(Continue reading)

stefankaegi | 29 Nov 13:15
Favicon

Re: Re: Re: Centered Textspan for Piano music

Thank you very much again. Worked all fine. :)

Best wishes
Stefan

Gmane