lilypond-user
[Top][All Lists]
Advanced

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

Re: Change time signature font


From: David Kastrup
Subject: Re: Change time signature font
Date: Fri, 24 May 2013 16:17:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

David Nalesnik <address@hidden> writes:

> Hi Andrew,
>
>
> On Fri, May 24, 2013 at 8:05 AM, Andrew Bernard <address@hidden>wrote:
>
>> What is the best way to change the font and size of a time signature? For
>> the contemporary scores that I am setting, the traditional engraved
>> old-fashioned face for time signatures just looks out of place, and, like
>> some other engravers, I am attempting to match a very idiosyncratic
>> handwritten style in the manuscript.
>>
>> I have:
>>
>>   \override Staff.TimeSignature #'stencil = #ly:text-interface::print
>>   \override Staff.TimeSignature #'text = \markup {  \abs-fontsize #14.5
>> \bold \override #'(baseline-skip . 2.5) \center-column { \line { 16 } \line
>> { 4 } } }
>>
>> This works, but seems terribly clumsy. Is there a more elegant way?
>>
>
> The solution is to wrap your markup in some sort of function.
>
> You could do something like this:
>
> myTimeSig =
> #(define-music-function (parser location num denom)
>   (string? string?)
>   #{
>     \override Staff.TimeSignature #'text =
>     \markup {
>       \abs-fontsize #14.5 \bold \override #'(baseline-skip . 2.5)
>       \center-column {
>         \line { #num }
>         \line { #denom }
>       }
>     }
>   #})

I'd rather use
myTimeSig =
#(define-music-function (parser location frac)
  (fraction?)
  #{
    \once\override Staff.TimeSignature #'text =
    \markup {
      \abs-fontsize #14.5 \bold \override #'(baseline-skip . 2.5)
      \center-column {
        \line { #(number->string (car frac)) }
        \line { #(number->string (cdr frac)) }
      }
    }
    \time #frac
  #})


> \new Staff {
>   \override Staff.TimeSignature #'stencil = #ly:text-interface::print

Is that one necessary?

>   \myTimeSig "16" "4"
>   \time 16/4

and here just

    \myTimeSig 16/4

> The following function draws the information from the time signature's
> properties:

Well, that's nicer anyway.  But doing the simpler version simpler has
its charms.

-- 
David Kastrup




reply via email to

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