lilypond-user
[Top][All Lists]
Advanced

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

Re: Accidentals centred above notes


From: Richard Shann
Subject: Re: Accidentals centred above notes
Date: Sun, 10 Aug 2014 09:25:21 +0100

On Thu, 2014-08-07 at 20:44 +0200, Janek Warchoł wrote:
> Hi,
> 
> 2014-08-07 9:26 GMT+02:00 Phil Holmes <address@hidden>:
> > ----- Original Message ----- From: "Richard Shann" <address@hidden>
> > To: <address@hidden>
> > Sent: Thursday, August 07, 2014 7:58 AM
> > Subject: Accidentals centred above notes
> > It looks like the use of the \sharp markup does indeed put the sharp sign
> > somewhat left.  It looks to me like the ficta sharp is correctly aligned on
[...]
> > I have come up with this:
> >
> > \version "2.18.0"
> > \relative c''' {
> > \once \override TextScript.self-alignment-X=#'-1.5  a2 ^\markup { \tiny
> > \sharp}
> > \set suggestAccidentals = ##t ais
> > }
> 
> You asked about things changing in future LilyPond versions, and
> actually this is an example: with 2.18, writing \override
> TextScript.self-alignment-X = #something produces weird alignment.  I
> believe it was a broken user-interface and i'm working on changing
> that.  Please wait until
> https://code.google.com/p/lilypond/issues/detail?id=4022 is merged;
> after that you can use
> 
> \version "2.19.12"
> \relative c''' {
>   \once \override TextScript.self-alignment-X = #CENTER
>   \once \override TextScript.parent-alignment-X = #CENTER
>   a2 ^\markup { \tiny \sharp}
>   \set suggestAccidentals = ##t ais
> }
> 
> to get centered markup (note that, unlike your current code, this will
> produce correct alignment regardless of the size of the notehead and
> markup).

I hadn't realized that I had stumbled into an area of live development -
thanks for making me aware of what is going on. Reflecting on things, I
thought I should anyway develop a general-purpose interface for people
to place an ornament with an accidental above/and or below all nicely
centered. I got as far as the following example, which may simply
reflect an inadequate understanding of the docs, or may be of interest
to those working on the alignment of markup and notes:

\version "2.18.0"

{
   a''  ^\markup {\center-column {\tiny \sharp \musicglyph #"scripts.turn" 
\tiny \flat}}
   a''  -\tweak baseline-skip #2  ^\markup {\center-column {\tiny \sharp 
\musicglyph #"scripts.turn" \tiny \flat}}
   a''  -\tweak baseline-skip #0  ^\markup {\center-column {\tiny \sharp 
\musicglyph #"scripts.turn" \tiny \flat}}
    
}

I imagined the tweak would take control of the line spacing in the
markup (and from the lowest line to the note), which the first two lines
seem to confirm; varying the value passed to baseline skip as in the
third line does not seem to do anything useful.

This sort of ornament is fairly common in romantic music, it seems
surprising that the lsr does not seem to cover it...

Richard









reply via email to

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