lilypond-devel
[Top][All Lists]
Advanced

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

Re: Issue 3918: Add \alternatingTimeSignatures (issue 97110045)


From: Urs Liska
Subject: Re: Issue 3918: Add \alternatingTimeSignatures (issue 97110045)
Date: Sat, 17 May 2014 11:03:28 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Am 17.05.2014 01:51, schrieb Thomas Morley:
2014-05-17 0:38 GMT+02:00 Urs Liska <address@hidden>:
Am 16.05.2014 09:41, schrieb address@hidden:


Well, we have \omit already.  What if we had
\appearance [markup] [grobname or music]

Which would basically be the syntactic sugar for overriding the stencil
with an appropriate grob-interpret-markup?

That way one could just define some markup function for formatting time
signatures and use it either in markup contexts or indeed for overriding
a time signature.


If I understand you correctly this would mean that one would write

\appearance \fractionList #'((6 8)(5 4)) Score.TimeSignature

instead of

\override Score.TimeSignature.stencil = \fractionList #'((6 8)(5 4))

?

I think David thought of something at the lines of the following function:

appearance =
#(define-music-function (parser location mrkp item)
    (markup? symbol-list-or-music?)
  (let ((stil (lambda (item)
                (grob-interpret-markup item mrkp))))
    #{ \tweak stencil #stil #item #}))

\relative c' {
     \appearance
       \markup "XY"
       Staff.Clef

     \appearance
       \markup
         \override #'(baseline-skip . 0)
         \override #'(word-space . 0.2)
         \line {
           \center-column { \number 3 \number 4 }
           \center-column { \number 6 \number 8 }
         }
       Score.TimeSignature
     c1
}

That looks good.
With a little modification (just skipping the wrapping of the generated markup to a stencil one could still use fractionList with that like:

\appearance \fractionList #'(#t (6 8)(7 8)) Score.TimeSignature

What do you think?

a) \appearance still seems a bit odd because it's not a verb.
   \use would be appropriate but I'm not sure if that's too generic
   to be used for the discussed function.
b) What would be the right order of operations?
   I assume "appearance" should be included first
   (or in one combined step because it's not so useful to first
   add \fractionList just to modify it immediately afterwards.

Urs


Cheers,
   Harm


Attachment: modified-fractionList.ly
Description: Text Data


reply via email to

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