|
From: | Ben |
Subject: | Re: Alignment issues of Time signature above the staff |
Date: | Fri, 3 Apr 2020 21:41:19 -0400 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
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 <address@hidden>
发送时间: 2020年3月28日 08:48
收件人: Chen Leo <address@hidden>
抄送: address@hidden <address@hidden>
主题: Re: Alignment issues of Time signature above the staffHi 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 <address@hidden> 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. }
>
> >>
>
> }
>
>
Hi Chen,
The measure numbers should be aligned correctly
throughout your score, except in the certain cases where there
happens to be a time signature change at the end of the system
and/or at the start of a new line.
In which case you could simply use an override like this: \once \override Score.BarNumber.Y-offset = #-6.
Would this help?
(see attached)
%%%%%%%%%%%
\version "2.19.0"
\layout {
\context {
\type "Engraver_group"
\consists "Time_signature_engraver"
\consists "Axis_group_engraver"
\consists "Staff_symbol_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"
}
\context {
\Score
\remove "System_start_delimiter_engraver"
}
}
timeSignatures = {
\numericTimeSignature \time 4/4 s1 \time 3/8 s4.
\time 3/4 s2. \break \time 4/4 s1
}
\score {
<<
\new TimeSig \with {
\override
VerticalAxisGroup.default-staff-staff-spacing.padding = #2
\override StaffSymbol.transparent = ##t
} {
\timeSignatures
}
\new StaffGroup \with {
\consists "System_start_delimiter_engraver"
systemStartDelimiter = #'SystemStartBar
} <<
\new Staff \relative c' {
c4 ^\markup \column {"a" "b" "c"} ( d4
e4 f4 ) a''4
^\markup \column {"a" "b" "c"} ( g8 ) R2.
\once \override Score.BarNumber.Y-offset = #-6
c,1 c c c c c \break c c
}
\new Staff \relative c' {
R1
R4.
\clef bass
a2.
c1
}
\new Staff \relative c' { R1 R4. R2. c1 }
>>
>>
}
chen-fix.png
Description: PNG image
[Prev in Thread] | Current Thread | [Next in Thread] |