[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Specific large "watermark" time signature
From: |
Urs Liska |
Subject: |
Re: Specific large "watermark" time signature |
Date: |
Thu, 11 Aug 2016 15:22:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
Hi Malte,
thanks for your suggestions.
Am 11.08.2016 um 13:09 schrieb Malte Meyn:
>
>
> Am 11.08.2016 um 09:54 schrieb Urs Liska:
>> manually editing Y-offset doesn't
>> seem like a good idea, as I don't have the impression there's an easy
>> relation that could be set up between font-size and Y-offset.
>
> There is such a relation: The time signature in the Score context is
> aligned to the top of the Score, in this case it’s the top of the
> treble clef. So one has to offset by 1.75 (approximate height of
> treble clef above the Staff) and two staff spaces scaled by font-size
> (because a time signature digit is two staff spaces tall). See first
> example below. This might break when there are other things that go
> above the treble clef.
This is interesting but of course completely unreliable: it will break
with any item going over the treble clef (e.g. a \tempo or a \mark).
>
> Alternatively you can print the time signature in the topmost staff
> (if you never remove it by \RemoveEmptyStaves) and set it’s Y-extent
> to empty. See second example below.
This works out perfectly, thank you.
>
> Concerning your second wish in the comments: You can put \consists and
> \remove into the \layout { \context { … } } blocks so you don’t have
> to use \with.
I had already figured that out before you replied. Unfortunately this
doesn't work out if you for example want to have the time signature
printed at every staff group. However, I found the way to do it: wrap
the context mod in a function, remove all time signatures by default and
apply the function to whichever staff should print the time signature.
See the attached files..
Best
Urs
>
> %%%%%%%%%%%%%%%%%%%%% FIRST EXAMPLE
>
> \version "2.19.46"
>
> \layout {
> tsfs = 15.3 % time signature font size
> \context {
> \Score
> \consists Time_signature_engraver
> \override TimeSignature.font-size = \tsfs
> \override TimeSignature.X-extent = #'(0 . 0)
> \override TimeSignature.space-alist.first-note = #'(fixed-space . 0)
> \override TimeSignature.color = #'(0.8 0.8 0.9)
> \override TimeSignature.layer = -1
> \override TimeSignature.Y-offset =
> #(-
> (* -2 (magstep tsfs)) ; two staff spaces = one digit height
> 1.75) % height of treble clef above topmost staff line
> }
> \context {
> \Staff
> \remove Time_signature_engraver
> }
> }
>
> \score {
> \new StaffGroup <<
> \new GrandStaff <<
> \new Staff \relative c' {
> \time 7/4
> c1 c2.
> \time 5/4
> c2. c2
> }
> \new Staff \relative c {
> \clef bass
> c1 c2.
> c2. c2
> }
> >>
> \new Staff \relative c'' {
> c1 c2. c2. c2
> }
> >>
> }
>
> %%%%%%%%%%%%%%%%%%%%% SECOND EXAMPLE
>
> \version "2.19.46"
>
> tsfs = 15.3 % time signature font size
>
> \layout {
> \context {
> \Staff
> \remove Time_signature_engraver
> }
> }
>
> \score {
> \new StaffGroup <<
> \new GrandStaff <<
> \new Staff \with {
> \consists Time_signature_engraver
> \override TimeSignature.font-size = \tsfs
> \override TimeSignature.X-extent = #'(0 . 0)
> \override TimeSignature.space-alist.first-note =
> #'(fixed-space . 0)
> \override TimeSignature.color = #'(0.8 0.8 0.9)
> \override TimeSignature.layer = -1
> \override TimeSignature.Y-offset =
> #(-
> 2 ; 2 staff spaces because it’s normally center-aligned
> (* 2 (magstep tsfs))) % two staff spaces = one digit height
> \override TimeSignature.Y-extent = #'(+inf.0 . -inf.0)
> }\relative c' {
> \time 7/4
> c1 c2.
> \time 5/4
> c2. c2
> }
> \new Staff \relative c {
> \clef bass
> c1 c2.
> c2. c2
> }
> >>
> \new Staff \relative c'' {
> c1 c2. c2. c2
> }
> >>
> }
>
> %%%%%%%%%%%%%%%%%%%%% END
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
watermark-timesig.ily
Description: Text document
watermark-timesig.ly
Description: Text Data