Hello Kieren,

after some trial and error and \displayMusic I got the attached solution with a music function. My (primitive enough) moment->duration function came in handy there. It would have been nicer to receive an attachment ready for opening in frescobaldi and starting work, though. I had to write some context and restore some auto-corrected ' and " before I could have a go.

HTH, Simon

Am 01.06.2015 um 17:44 schrieb Kieren MacMillan:
Hello all,

I have a piece which starts with a flute cadenza. In the other parts, I put

   #(mmrest-of-length flute_intro)

Now I want to add tagged MultiMeasureRestText items to this, e.g.,

   #(mmrest-of-length flute_intro) -\tag #’(part-violin) ^\markup \bold “[flute 
solo]”

But this doesn’t compile, and

   #(mmrest-of-length flute_intro)
       \tag #’(part-violin) <>^\markup \bold “[flute solo]”

creates a regular markup, not a MultiMeasureRestText.

Any help/suggestions would be appreciated.

Thanks,
Kieren.

________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [email protected]


_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

\version "2.19.20"

#(define moment->duration
   (lambda (mom)
     (if (not (= 0 (ly:moment-grace mom)))
         (ly:warning "ly:moment->duration omits grace timing"))
     (ly:make-duration 0 0 (ly:moment-main mom))))

flute_intro = { \repeat unfold 4 { c2 } }

mmr-of-length-with-text =
#(define-music-function (parser location id mrkp) (symbol? markup?)
   (make-music
  'SequentialMusic
  'elements
  (list (make-music
          'MultiMeasureRestMusic
          'duration
          (moment->duration (ly:music-length (ly:parser-lookup parser id)))
          'articulations
          (list (make-music
                  'MultiMeasureTextEvent
                  'tags
                  (list (quote part-violin))
                  'direction
                  1
                  'text
                  mrkp))))))

{
  \mmr-of-length-with-text #'flute_intro \markup \bold "[flute solo]"
}
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to