lilypond-user
[Top][All Lists]
Advanced

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

Scheme function help


From: Phil Holmes
Subject: Scheme function help
Date: Sun, 15 Jun 2014 15:16:17 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

> I'm not top posting

I'm typesetting quite a bit of mensural music, and using the same music 
source for both mensural and modern.  The mensural rests tend to be 
pitched and the modern ones aren't.  So I often have to use the following 
as input:

\tag #'mens { f2 \rest } \tag #'mod { r2 } 

and then I typeset the mensural version with \keepWithTag #'mens.  I 
thought it would be easier if I could have a music function that would 
emit the tagged version from a function call; something like:

\menrest { f2 }

would provide the output shown above.  I'm falling at the first hurdle of 
getting the pitched rest: 

menrest = #(define-music-function
  (parser location noteval )
  (ly:music?)
#{
  \tag #'mens { #noteval \rest } \tag #'mod { #noteval }
#})

gives the error "unexpected \rest".  And of course the second expression 
only gives the note currently.

Could anyone point out the way forward, please?




reply via email to

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