lilypond-user
[Top][All Lists]
Advanced

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

Re: How to print a timesig.C22 character in the context of a grob


From: David Nalesnik
Subject: Re: How to print a timesig.C22 character in the context of a grob
Date: Tue, 18 Sep 2012 12:43:48 -0500

Hi Laura,

On Tue, Sep 18, 2012 at 11:46 AM, Laura Conrad <address@hidden> wrote:
>
> I have managed to modify the compound time snippet to print a
> neomensural time signature like "C3".
>
> Now I want one with the 2/2 C style instead of the 4/4 style.
>
> My code (don't laugh too hard, I just fiddled until it worked) looks
> like:
>
> settime = {
> #(define ((compound-time one two num) grob)
>    (grob-interpret-markup grob
>                           (markup  #:override '(baseline-skip . 0)
>                                    #:number
>                                   (#:line ((#:vcenter "C")
>                                           (#:vcenter "3"))))))
>
>   \override Staff.TimeSignature #'stencil = #(compound-time "C" "3" "1")
>   \time 3/2
>
> }
>
> It surprised me that "C" actually produces something like the time
> signature "C", although it isn't typographically much like the time
> signature "3", and I don't think it's actually the timesig.44 glyph.
>
> So how do I get the timesig.22 glyph in there instead of the C?
>
> I've really tried a lot of stuff with \markup and \musicglyph, and it
> doesn't seem to work in this context, although if I put plain strings in
> there, they print instead of the "C".
>

You're very close!  The problem appears to be that you're not using
the correct name for the glyphs you want.  The glyphs are
"timesig.C22" and "timesig.C44"

So you'll get the "C" glyph like so:

\version "2.16.0"

settime = {
#(define ((compound-time one two num) grob)
   (grob-interpret-markup grob
                          (markup  #:override '(baseline-skip . 0)
                                   #:number
                                  (#:line ((#:vcenter #:musicglyph
"timesig.C44")
                                          (#:vcenter two))))))

  \override Staff.TimeSignature #'stencil = #(compound-time "C" "3" "1")
  \time 3/2
}

{
  \settime
  c2 c c
}

HTH,
David



reply via email to

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