[prev in list] [next in list] [prev in thread] [next in thread]
List: lilypond-user
Subject: Re: Alignment issues of Time signature above the staff
From: Chen Leo <leo04chen () outlook ! com>
Date: 2020-03-29 6:10:42
Message-ID: SL2PR04MB30335793478264A804971581BECA0 () SL2PR04MB3033 ! apcprd04 ! prod ! outlook ! com
[Download RAW message or body]
[Attachment #2 (text/plain)]
Hi Kevin,
Thank you for your reply.
For the first problem, you will have to set break-align-symbol to ##f to reproduce \
the problem. That is because by default break-align-symbol is set to \
#'time-signature. so commenting out the override shouldn't help.
Secondly, using \override TimeSignature.X-extent = #'(0 . 0) causes collisions when \
texts and notes are displayed above the staff because lilypond is not adding vertical \
spacing above the staff. And it seems like now all the time signatures are shifted a \
bit to the right instead of aligning right after the bar line.
Thirdly, the bar numbers are raised to align vertically with the time-signatures, \
which is not something I would like to have. It will be nice if you can share any \
ideas on how that can be solved.
Leo
Here's an example:
\version "2.20.0"
\layout {
\context {
\type "Engraver_group"
\consists "Time_signature_engraver"
\consists "Axis_group_engraver"
\name "TimeSig"
\alias "Staff"
% original settings from "http://lsr.di.unimi.it/LSR/Snippet?id=272"
%{
\override TimeSignature.font-size = #3
\override TimeSignature.break-align-symbol = ##f
\override TimeSignature.X-offset =
#ly:self-alignment-interface::x-aligned-on-self
\override TimeSignature.self-alignment-X = #CENTER
\override TimeSignature.after-line-breaking =
#shift-right-at-line-begin
%}
% settings after adjustments
{
\override TimeSignature.font-size = #4
\override TimeSignature.X-offset =
#ly:self-alignment-interface::x-aligned-on-self
\override TimeSignature.self-alignment-X = #LEFT
\override TimeSignature.X-extent = #'(0 . 0)
}
}
\context {
\Score
\accepts TimeSig
}
\context {
\Staff
\remove "Time_signature_engraver"
}
}
timeSignatures = { \numericTimeSignature \time 4/4 s1 \time 3/8 s4. \time 3/4 s2. \
\break \time 4/4 s1 }
\score {
<<
\new TimeSig \timeSignatures
\new Staff \relative c' { c4 ^\markup \column {"a" "b" "c"} ( d4 e4 f4 ) a''4
^\markup \column {"a" "b" "c"} ( g8 ) R2. c1 }
\new Staff \relative c' { R1 R4. \clef bass a2. c1 }
\new Staff \relative c' { R1 R4. R2. c1 }
>>
}
________________________________
·¢¼þÈË: Kevin Barry <barrykp@gmail.com>
·¢ËÍʱ¼ä: 2020Äê3Ô 28ÈÕ 08:48
ÊÕ¼þÈË: Chen Leo <leo04chen@outlook.com>
³ËÍ: lilypond-user@gnu.org <lilypond-user@gnu.org>
Ö÷Ìâ: Re: Alignment issues of Time signature above the staff
Hi Chen,
I was able to solve the second of your problems (the whole bar rests
being shifted by the time signatures in the TimeSig context) by
adding:
\override TimeSignature.X-extent = ##f
(You could also use the value #'(0 . 0) if the warnings are off
putting, but I noticed that that doesn't *quite* fix it fully.)
I tried to reproduce your description of the first problem (time
signatures aligning over cue clefs), but even commenting out the
break-align-symbol override didn't make it appear. I was able to
correct the alignment of the first time signature by removing the
line:
\override TimeSignature.after-line-breaking = #shift-right-at-line-begin
After both of the above modifications everything looks OK to me, but
perhaps we need a fuller example.
Kevin
On Sat, 28 Mar 2020 at 10:30, Chen Leo <leo04chen@outlook.com> wrote:
>
> Hi, I am trying to put time signatures above the staffs according to \
> "http://lsr.dsi.unimi.it/LSR/Item?id=272".
>
>
> I discovered an issue, that is whenever a clef change is made, the time signature \
> on the next bar fails to align to the bar line, it aligns to the cue clef in the \
> previous bar instead. After some research, I found out that this is because the \
> TimeSignature property "break-align-symbol" is set to "##f". I set \
> "break-align-symbol" back to "#'time-signature", and this problem is solved, \
> however, the horizontal alignments of the other time signatures are messed up. \
> (Using the code presented below, the 4/4 in the first bar moves to the right & the \
> bar rest on the third bar stretches to the right. ) Are there any ways to align all \
> the time signatures to their corresponding bar lines without changing the \
> alignments of other objects? Thank you.
>
>
> \version "2.20.0"
>
>
>
> \layout {
>
> \context {
>
> \type "Engraver_group"
>
> \consists "Time_signature_engraver"
>
> \consists "Axis_group_engraver"
>
> \name "TimeSig"
>
> \alias "Staff"
>
> \override TimeSignature.font-size = #4
>
> \override TimeSignature.break-align-symbol = #'time-signature
>
> \override TimeSignature.X-offset =
>
> #ly:self-alignment-interface::x-aligned-on-self
>
> \override TimeSignature.self-alignment-X = #LEFT
>
> \override TimeSignature.after-line-breaking =
>
> #shift-right-at-line-begin
>
> }
>
> \context {
>
> \Score
>
> \accepts TimeSig
>
> }
>
> \context {
>
> \Staff
>
> \remove "Time_signature_engraver"
>
> }
>
> }
>
>
>
> timeSignatures = { \numericTimeSignature \time 4/4 s1 \time 3/8 s4. \time 3/4 s2. }
>
>
>
> \score {
>
> <<
>
> \new TimeSig \timeSignatures
>
> \new Staff \relative c' { c4 ( d4 e4 f4 ) a4 ( g8 ) R2. }
>
> \new Staff \relative c' { R1 R4. \clef bass a2. }
>
> \new Staff \relative c' { R1 R4. R2. }
>
> > >
>
> }
>
>
[Attachment #3 (text/html)]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} \
</style> </head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; \
color: rgb(0, 0, 0);"> <div style="margin: 0px; font-size: 12pt; font-family: \
Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255)"> <p \
style="font-size: 10.5pt; font-family: µÈÏß; text-align: justify; margin: 0px"><span \
lang="en-US" style="margin: 0px; font-family: Arial, Helvetica, sans-serif">Hi \
Kevin,</span></p> <p style="font-size: 10.5pt; font-family: µÈÏß; text-align: \
justify; margin: 0px"><br> </p>
<p style="font-size: 10.5pt; font-family: µÈÏß; text-align: justify; margin: \
0px"><span lang="en-US" style="margin: 0px; font-family: Arial, Helvetica, \
sans-serif">Thank you for your reply.</span></p> <p style="font-size: 10.5pt; \
font-family: µÈÏß; text-align: justify; margin: 0px"><br> </p>
<p style="font-size: 10.5pt; font-family: µÈÏß; text-align: justify; margin: \
0px"><span lang="en-US" style="margin: 0px; font-family: Arial, Helvetica, \
sans-serif">For the first problem, you will have to set break-align-symbol to ##f to \
reproduce the problem. </span><span style="margin: 0px; font-family: Arial, \
Helvetica, sans-serif; letter-spacing: 0px">That is because by default \
break-align-symbol is set to #'time-signature. so commenting out the override \
shouldn't help.</span></p> <p style="font-size: 10.5pt; font-family: µÈÏß; \
text-align: justify; margin: 0px"><span style="margin: 0px; letter-spacing: 0px"><br> \
</span></p> <p style="font-size: 10.5pt; font-family: µÈÏß; text-align: justify; \
margin: 0px"><span style="margin: 0px; font-family: Arial, Helvetica, sans-serif; \
letter-spacing: 0px">Secondly, using \override TimeSignature.X-extent = #'(0 . \
0) causes collisions when texts and notes are displayed above the staff because \
lilypond is not adding vertical spacing above the staff. And it seems like now all \
the time signatures are shifted a bit to the right instead of aligning right after \
the bar line.</span></p> <p style="font-size: 10.5pt; font-family: µÈÏß; text-align: \
justify; margin: 0px"><span style="margin: 0px; letter-spacing: 0px"><br> </span></p>
<p style="font-size: 10.5pt; font-family: µÈÏß; text-align: justify; margin: \
0px"><span style="margin: 0px; font-family: Arial, Helvetica, sans-serif; \
letter-spacing: 0px">Thirdly, the bar numbers are raised to align vertically with the \
time-signatures, which is not something I would like to have. It will be nice if you \
can share any ideas on how that can be solved.</span></p> <p style="font-size: \
10.5pt; font-family: µÈÏß; text-align: justify; margin: 0px"><span style="margin: \
0px; letter-spacing: 0px"><br> </span></p>
<p style="font-size: 10.5pt; font-family: µÈÏß; text-align: justify; margin: \
0px"><span style="margin: 0px; font-family: Arial, Helvetica, sans-serif; \
letter-spacing: 0px">Leo</span></p> <br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, \
sans-serif; background-color: rgb(255, 255, 255)"> Here's an example:</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, \
sans-serif; background-color: rgb(255, 255, 255)"> <br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, \
sans-serif; background-color: rgb(255, 255, 255)"> <span style="margin: 0px">\version \
"2.20.0"<br> </span>
<div style="margin: 0px"><br>
</div>
<div style="margin: 0px">\layout {<br>
</div>
<div style="margin: 0px"> \context {<br>
</div>
<div style="margin: 0px"> \type "Engraver_group"<br>
</div>
<div style="margin: 0px"> \consists \
"Time_signature_engraver"<br> </div>
<div style="margin: 0px"> \consists "Axis_group_engraver"<br>
</div>
<div style="margin: 0px"> \name "TimeSig"<br>
</div>
<div style="margin: 0px"> \alias "Staff"<br>
</div>
<div style="margin: 0px"> % original settings from \
"http://lsr.di.unimi.it/LSR/Snippet?id=272"<br> </div>
<div style="margin: 0px"> %{<br>
</div>
<div style="margin: 0px"> \override TimeSignature.font-size = \
#3<br> </div>
<div style="margin: 0px"> \override \
TimeSignature.break-align-symbol = ##f<br> </div>
<div style="margin: 0px"> \override TimeSignature.X-offset =<br>
</div>
<div style="margin: 0px"> \
#ly:self-alignment-interface::x-aligned-on-self<br> </div>
<div style="margin: 0px"> \override \
TimeSignature.self-alignment-X = #CENTER<br> </div>
<div style="margin: 0px"> \override \
TimeSignature.after-line-breaking =<br> </div>
<div style="margin: 0px"> #shift-right-at-line-begin<br>
</div>
<div style="margin: 0px"> %}<br>
</div>
<div style="margin: 0px"> % settings after adjustments<br>
</div>
<div style="margin: 0px"> {<br>
</div>
<div style="margin: 0px"> \override TimeSignature.font-size = #4<br>
</div>
<div style="margin: 0px"> \override TimeSignature.X-offset =<br>
</div>
<div style="margin: 0px"> \
#ly:self-alignment-interface::x-aligned-on-self<br> </div>
<div style="margin: 0px"> \override TimeSignature.self-alignment-X = \
#LEFT<br> </div>
<div style="margin: 0px"> \override TimeSignature.X-extent = #'(0 . \
0)<br> </div>
<div style="margin: 0px"> }<br>
</div>
<div style="margin: 0px"> }<br>
</div>
<div style="margin: 0px"> \context {<br>
</div>
<div style="margin: 0px"> \Score<br>
</div>
<div style="margin: 0px"> \accepts TimeSig<br>
</div>
<div style="margin: 0px"> }<br>
</div>
<div style="margin: 0px"> \context {<br>
</div>
<div style="margin: 0px"> \Staff<br>
</div>
<div style="margin: 0px"> \remove \
"Time_signature_engraver"<br> </div>
<div style="margin: 0px"> }<br>
</div>
<div style="margin: 0px">}<br>
</div>
<div style="margin: 0px"><br>
</div>
<div style="margin: 0px">timeSignatures = { \numericTimeSignature \time 4/4 s1 \time \
3/8 s4. \time 3/4 s2. \break \time 4/4 s1 }<br> </div>
<div style="margin: 0px"><br>
</div>
<div style="margin: 0px">\score {<br>
</div>
<div style="margin: 0px"> <<<br>
</div>
<div style="margin: 0px"> \new TimeSig \timeSignatures<br>
</div>
<div style="margin: 0px"> \new Staff \relative c' { c4 ^\markup \column \
{"a" "b" "c"} ( d4 e4 f4 ) a''4<span style="margin: \
0px"> </span><br> </div>
<div style="margin: 0px"> \
^\markup \column {"a" \
"b" "c"} ( g8 ) R2. c1 }<br> </div>
<div style="margin: 0px"> \new Staff \relative c' { R1 R4. \clef bass \
a2. c1 }<br> </div>
<div style="margin: 0px"> \new Staff \relative c' { R1 R4. R2. c1 }<br>
</div>
<div style="margin: 0px"> >><br>
</div>
<span style="margin: 0px">}</span></div>
<br>
</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> <br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" \
style="font-size:11pt"><b>·¢¼þÈË:</b> Kevin Barry <barrykp@gmail.com><br> \
<b>·¢ËÍʱ¼ä:</b> 2020Äê3Ô 28ÈÕ 08:48<br> <b>ÊÕ¼þÈË:</b> Chen Leo \
<leo04chen@outlook.com><br> <b>³ËÍ:</b> lilypond-user@gnu.org \
<lilypond-user@gnu.org><br> <b>Ö÷Ìâ:</b> Re: Alignment issues of Time signature \
above the staff</font> <div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Hi Chen,<br>
<br>
I was able to solve the second of your problems (the whole bar rests<br>
being shifted by the time signatures in the TimeSig context) by<br>
adding:<br>
\override TimeSignature.X-extent = ##f<br>
(You could also use the value #'(0 . 0) if the warnings are off<br>
putting, but I noticed that that doesn't *quite* fix it fully.)<br>
<br>
I tried to reproduce your description of the first problem (time<br>
signatures aligning over cue clefs), but even commenting out the<br>
break-align-symbol override didn't make it appear. I was able to<br>
correct the alignment of the first time signature by removing the<br>
line:<br>
\override TimeSignature.after-line-breaking = #shift-right-at-line-begin<br>
<br>
After both of the above modifications everything looks OK to me, but<br>
perhaps we need a fuller example.<br>
<br>
Kevin<br>
<br>
On Sat, 28 Mar 2020 at 10:30, Chen Leo <leo04chen@outlook.com> wrote:<br>
><br>
> Hi, I am trying to put time signatures above the staffs according to "<a \
href="http://lsr.dsi.unimi.it/LSR/Item?id=272">http://lsr.dsi.unimi.it/LSR/Item?id=272</a>".<br>
><br>
><br>
><br>
> I discovered an issue, that is whenever a clef change is made, the time \
signature on the next bar fails to align to the bar line, it aligns to the cue clef \
in the previous bar instead. After some research, I found out that this is because \
the TimeSignature property "break-align-symbol" is set to "##f". \
I set "break-align-symbol" back to "#'time-signature", and this \
problem is solved, however, the horizontal alignments of the other time signatures \
are messed up. (Using the code presented below, the 4/4 in the first bar moves to \
the right & the bar rest on the third bar stretches to the right. ) Are there any \
ways to align all the time signatures to their corresponding bar lines without \
changing the alignments of other objects? Thank you.<br> ><br>
><br>
><br>
> \version "2.20.0"<br>
><br>
><br>
><br>
> \layout {<br>
><br>
> \context {<br>
><br>
> \type "Engraver_group"<br>
><br>
> \consists "Time_signature_engraver"<br>
><br>
> \consists "Axis_group_engraver"<br>
><br>
> \name "TimeSig"<br>
><br>
> \alias "Staff"<br>
><br>
> \override TimeSignature.font-size = #4<br>
><br>
> \override TimeSignature.break-align-symbol = \
#'time-signature<br> ><br>
> \override TimeSignature.X-offset =<br>
><br>
> \
#ly:self-alignment-interface::x-aligned-on-self<br> ><br>
> \override TimeSignature.self-alignment-X = #LEFT<br>
><br>
> \override TimeSignature.after-line-breaking =<br>
><br>
> #shift-right-at-line-begin<br>
><br>
> }<br>
><br>
> \context {<br>
><br>
> \Score<br>
><br>
> \accepts TimeSig<br>
><br>
> }<br>
><br>
> \context {<br>
><br>
> \Staff<br>
><br>
> \remove "Time_signature_engraver"<br>
><br>
> }<br>
><br>
> }<br>
><br>
><br>
><br>
> timeSignatures = { \numericTimeSignature \time 4/4 s1 \time 3/8 s4. \time 3/4 \
s2. }<br> ><br>
><br>
><br>
> \score {<br>
><br>
> <<<br>
><br>
> \new TimeSig \timeSignatures<br>
><br>
> \new Staff \relative c' { c4 ( d4 e4 f4 ) a4 ( g8 ) R2. \
}<br> ><br>
> \new Staff \relative c' { R1 R4. \clef bass a2. }<br>
><br>
> \new Staff \relative c' { R1 R4. R2. }<br>
><br>
> >><br>
><br>
> }<br>
><br>
><br>
</div>
</span></font></div>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic