X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fly-syntax-constructors.scm;h=584dd6b3e17943623010c56e969c406ca94d3674;hb=7e2d3e7e87fa65f5b67ffa64a4749c952debf048;hp=9e6325a1563b9897828eb8e8ebfa3e2cfac3fdb2;hpb=a3765e1d290e5e49093e7ca7791bf3fe20be1726;p=lilypond.git diff --git a/scm/ly-syntax-constructors.scm b/scm/ly-syntax-constructors.scm index 9e6325a156..584dd6b3e1 100644 --- a/scm/ly-syntax-constructors.scm +++ b/scm/ly-syntax-constructors.scm @@ -78,15 +78,28 @@ (make-music 'TransposedMusic 'element (ly:music-transpose music pitch))) -(define-ly-syntax-simple (tempo duration tempo) +(define-ly-syntax-simple (tempo text duration tempo) + (let ((props (list + (make-property-set 'tempoWholesPerMinute + (ly:moment-mul (ly:make-moment tempo 1) + (ly:duration-length duration))) + (make-property-set 'tempoUnitDuration duration) + (make-property-set 'tempoUnitCount tempo)))) + (set! props (cons + (if text (make-property-set 'tempoText text) + (make-property-unset 'tempoText)) + props)) + (context-spec-music + (make-sequential-music props) + 'Score))) + +(define-ly-syntax-simple (tempoText text) (context-spec-music (make-sequential-music (list - (make-property-set 'tempoWholesPerMinute - (ly:moment-mul (ly:make-moment tempo 1) - (ly:duration-length duration))) - (make-property-set 'tempoUnitDuration duration) - (make-property-set 'tempoUnitCount tempo))) + (make-property-unset 'tempoUnitDuration) + (make-property-unset 'tempoUnitCount) + (make-property-set 'tempoText text))) 'Score)) (define-ly-syntax-simple (skip-music dur)