lilypond-user
[Top][All Lists]
Advanced

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

Re: time signature magic


From: David Nalesnik
Subject: Re: time signature magic
Date: Sat, 23 May 2015 18:05:24 -0500

Hi Alex,

On Sat, May 23, 2015 at 5:41 PM, Alex Jones <address@hidden> wrote:
Thank you, this works!

It does look a little clunky.

I agree--there's too much space.  A simple fix is to use \concat, which puts items directly beside each other, instead of \line in the original function:

\version "2.18"

#(define ((time-parenthesized-time up down upp downp) grob)
   (grob-interpret-markup grob
     (markup #:override '(baseline-skip . 0) #:number
       (#:concat (
                   (#:column (up down))
                   #:vcenter "("
                   (#:column (upp downp))
                   #:vcenter ")" )))))



 

I saw this, which gets the parentheses but doesn’t include the first non-parenthesized item.  Can these two items be combined?



Yes, and this will allow you control over the shape of the parentheses:

#(define ((time-parenthesized-time up down upp downp) grob)
   (ly:stencil-combine-at-edge
    (grob-interpret-markup grob
      (markup #:override '(baseline-skip . 0) #:number #:column (up down)))
    X RIGHT
    (parenthesize-stencil
     (grob-interpret-markup grob 
       (markup #:override '(baseline-skip . 0) #:number #:column (upp downp)))
     0.1 0.7 0.7 0.1) ; these numbers affect the parentheses
    0.0 ; padding between columns
    ))


\relative c' {
  \override Staff.TimeSignature.stencil = #(time-parenthesized-time "3" "4" "6" "8")      
  \time 3/4
  b8 b8 gis8 gis4 gis8
}

%%%%

Hope this helps!

David


reply via email to

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