I think I've reduced the problem to a mere syntactical issue.  

This compiles, but doesn't quite do what I need:

        \version "2.16.2"
        
        % Adapted from snippet 725 "Combining a time signature glyph and
        a default time signature"
        
        music = \relative c' {
        \time 3/4
        c8 b c d e f g4
        \mark \markup \concat { #(markup #:number
                             (#:line ((markup (#:musicglyph
        "timesig.mensural64"))
                                              (#:fontsize -4 #:column
        ("3" "2"))))) " X"}
        g g g4 a8 g f e d2. \bar "|."
        }
        
        \score { \music }
        

But when I try to move all the complicated Scheme stuff into a function,
it gives an impenetrable thicket of errors:

        \version "2.16.2"
        
        mensSign = #(define-scheme-function (parser location name)
        (string?)
          (case name
            (("C")  (#(markup #:number

                     (#:line ((markup (#:musicglyph
"timesig.mensural64"))
                                      (#:fontsize -4 #:column ("3"
"2")))))))


          )
        )
        
        music = \relative c' {
        \time 3/4
        c8 b c d e f g4
        \mark \markup { \mensSign #"C" }
        g g g4 a8 g f e d2. \bar "|."
        }
        
        \score { \music }




On Mon, 2013-09-09 at 20:48 +0100, Graham King wrote:

> I'm a novice Scheme programmer writing a music-function for
> manipulating temporal proportion in music transcribed from white
> mensural notation.  Amongst other things, the function includes the
> original mensural timesig in a \mark \markup, using the following
> code:
> 
> 
>         #(define mensurationSign '(("C"    . "timesig.neomensural44")
>                                    ("cutC" . "timesig.neomensural22")
>                                    %... and so on...
>         ))
>         
>         mensuration = #(define-music-function (P L mensuralTimesig
>         %.....)
>         % ...
>             #{  \mark \markup {
>                     \concat {
>                         \musicglyph #(cdr (assoc mensuralTimesig
>         mensurationSign))
>                         % ... and so on...
> 
> 
> So far, so good - this all works fine.  However, I would like to
> extend this to work with mensuration signs that don't appear as
> musicglyphs.  For example: "C2" or "3".  Please could one of you
> experts point me in a sensible direction to achieve this?
> (I could probably do this by splitting the mensuralTimesig argument
> into two separate arguments, but this would create an inelegant
> interface to the function.)
> 
> Thanks in anticipation of your sage advice. 
> 
> _______________________________________________
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to