[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: custom metronome-markup procedure causes weird goops-error
From: |
Neil Puttock |
Subject: |
Re: custom metronome-markup procedure causes weird goops-error |
Date: |
Fri, 25 Apr 2008 17:12:14 +0100 |
On 25/04/2008, Neil Puttock <address@hidden> 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
- custom metronome-markup procedure causes weird goops-error, Valentin Villenave, 2008/04/25
- Re: custom metronome-markup procedure causes weird goops-error, Valentin Villenave, 2008/04/25
- Re: custom metronome-markup procedure causes weird goops-error, Neil Puttock, 2008/04/25
- Re: custom metronome-markup procedure causes weird goops-error, Reinhold Kainhofer, 2008/04/29
- Re: custom metronome-markup procedure causes weird goops-error, Nicolas Sceaux, 2008/04/29
- Re: custom metronome-markup procedure causes weird goops-error, Valentin Villenave, 2008/04/29
- Re: custom metronome-markup procedure causes weird goops-error, Nicolas Sceaux, 2008/04/29
- Re: custom metronome-markup procedure causes weird goops-error, Risto Vääräniemi, 2008/04/29
- Re: custom metronome-markup procedure causes weird goops-error, Valentin Villenave, 2008/04/29
- Re: custom metronome-markup procedure causes weird goops-error, Neil Puttock, 2008/04/29
- Re: custom metronome-markup procedure causes weird goops-error, Valentin Villenave, 2008/04/29