On 25/04/2008, Neil Puttock <[EMAIL PROTECTED]> wrote:

>  If the MIDI problem can be solved, I think this would prove a better
>  snippet than the one I added, since it works under 2.10.

It's almost too simple; I was thinking up all sorts of outlandish
constructs to get the right value, but the answer's right there in
ly-syntax-constructors.scm:

mov =
#(define-music-function (parser location texte duration count music)
(string? string? integer? ly:music?)
(define (format-movement-markup dur count context)
   (make-line-markup
    (list
     (markup #:mvt texte #:hspace 1)
     (make-simple-markup  "(")
     (make-general-align-markup Y DOWN (make-smaller-markup
                    (make-note-by-number-markup (ly:duration-log dur)
                                                (ly:duration-dot-count dur) 1)))
     (make-simple-markup  "=")
     (make-simple-markup (number->string count))
     (make-simple-markup  ")"))))
(make-music 'SequentialMusic 'elements
     (list (make-music 'ContextSpeccedMusic
             'context-type 'Score 'element
             (make-music 'PropertySet
               'value format-movement-markup
               'symbol 'metronomeMarkFormatter))
           (make-music 'ContextSpeccedMusic
             'context-type 'Score 'element
             (make-music 'SequentialMusic 'elements
             (list (make-music 'PropertySet
                    'value (ly:moment-mul (ly:make-moment count 1)
                                          (ly:duration-length
                                            (string->duration duration)))
                    'symbol 'tempoWholesPerMinute)
                   (make-music 'PropertySet
                    'value (string->duration duration)
                    'symbol 'tempoUnitDuration)
                   (make-music 'PropertySet
                    'value count
                    'symbol 'tempoUnitCount))))
                    music
                    (make-music 'ContextSpeccedMusic
             'context-type 'Score 'element
             (make-music 'PropertySet
               'value format-metronome-markup
               'symbol 'metronomeMarkFormatter)))))

Regards,
Neil


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

Reply via email to