2008/4/25 Valentin Villenave <[EMAIL PROTECTED]>:
> Here's my code; it works quite well on simple examples, but on complex
> scores it triggers an error I've never seen:
OK, I've fixed it; it actually involved using a different name for the
metronomeMarkFormatter procedure:
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: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)))))
Now it works perfectly -- sorry for the noise!
(by the way, if anyone has some clues to clean or optimize my code,
feel free to suggest any improvements you can think of)
Cheers,
Valentin
_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user