|
From: | Br. Gabriel-Marie | SSPX |
Subject: | Re: tiny function |
Date: | Thu, 30 Jun 2016 17:05:11 -0500 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 |
Thanks,
Mr. Meyn, That certainly does the trick. So you can't write macros for \with{} statements? Why couldn't I do it this way, if I just want to create the \with statement? Where can I find the docs to explain how the macro works? (I've looked all over) verseNumber = #(define-music-function(whatnumber)(string?)#{ \with { instrumentName = whatnumber shortInstrumentName = whatnumber } #}) On 6/30/2016 4:54 PM,
address@hidden wrote:
This would have to be \new Lyrics \with { \verseNumber 1 } or, easier to type, \lyricsWithVerseNumber 1 like in the code below: %%%% \version "2.18.2" lyricsWithVerseNumber = #(define-music-function (parser location number music) (number? ly:music?) #{ \new Lyrics \with { instrumentName = #(string-append (number->string number) ".") shortInstrumentName = #(string-append (number->string number) ".") } $music #}) \lyricsWithVerseNumber 7 \lyricmode { \repeat unfold 40 foo } |
[Prev in Thread] | Current Thread | [Next in Thread] |