lilypond-user
[Top][All Lists]
Advanced

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

Compound time sig with parentheses (Was: How to prevent \center-column)


From: Risto Vääräniemi
Subject: Compound time sig with parentheses (Was: How to prevent \center-column)
Date: Sun, 9 Nov 2008 13:00:04 +0200

On 08/11/2008, Neil Puttock <address@hidden> wrote:

> The second column needs to be aligned in relation to the first using
> \left-align:

Thanks a lot, Neil.

Anyway... I made yet another type of time compound signature. This
time the "descriptive" part is wrapped in parentheses. Since I
couldn't find a way to add the parentheses with LP commands I used
PostScript instead.

-Risto

%%%%%%
\version "2.11.63"

parenthps = #"
0 0 translate
45 45 scale
0 0 0 setrgbcolor
[] 0 setdash
1 setlinewidth
0 setlinejoin
0 setlinecap
newpath
0.0147465 0 moveto
0.011106 0.00351338 0.00916298 0.00598483 0.00710032 0.00978362 curveto
0.00248893 0.01832964 3e-008 0.02925362 3e-008 0.04074722 curveto
3e-008 0.05157272 0.00218483 0.06173772 0.00625033 0.07019282 curveto
0.00855727 0.07474937 0.01061993 0.07759971 0.0147465 0.08158922 curveto
0.0147465 0.07807584 lineto
0.00867816 0.06971302 0.00625033 0.05898344 0.00625033 0.04074724 curveto
0.00625033 0.02250984 0.00867816 0.01187244 0.0147465 0.00351344 curveto
0.0147465 6e-008 lineto
0.0147465 0 lineto
closepath
fill"

parenthL = \markup
{
    \with-dimensions #'(0 . 0.68) #'(0 . 3.67)
    \postscript #parenthps
}

parenthR = \markup { \rotate #180 \parenthL }

#(define (compound-time-parentheses one two num)
  (markup #:override '(baseline-skip . 0) #:number
   (#:line (#:left-align (#:center-column (one num))
     #:concat (#:vcenter parenthL #:hspace 0.2
      (#:left-align (#:center-column (two num))) #:hspace 0.2
      #:vcenter parenthR)))))


%%%%%%%%%%%


\relative c'
{
    \time 7/4
    \override Staff.TimeSignature #'stencil = #ly:text-interface::print
    \override Staff.TimeSignature #'text =
        #(compound-time-parentheses "7" "4+3" "4" )

    c1 \bar "dashed" c2. \time 12/4
    \override Staff.TimeSignature #'text =
        #(compound-time-parentheses "12" "5+4+3" "4" )
    c1 ~ c4 \bar "dashed" c1 \bar "dashed" c2. \bar "|."
}
%%%%%%

Attachment: compound_time_sig_parentheses.png
Description: PNG image


reply via email to

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