From: Han-Wen Nienhuys Date: Mon, 18 Nov 2002 23:52:01 +0000 (+0000) Subject: * ly/property-init.ly (setMmRestFermata): added. X-Git-Tag: release/1.7.8~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6349772d0e909b2d9edbb3cf5e50a1f18ed77c5e;p=lilypond.git * ly/property-init.ly (setMmRestFermata): added. * Documentation/user/refman.itely (Multi measure rests): fermatas on mm rests. * input/regression/apply-context.ly (texidoc): new file --- diff --git a/ChangeLog b/ChangeLog index 235a726efb..07dd8ec138 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2002-11-19 Han-Wen Nienhuys + * ly/property-init.ly (setMmRestFermata): added. + + * Documentation/user/refman.itely (Multi measure rests): fermatas + on mm rests. + * input/regression/apply-context.ly (texidoc): new file * lily/parser.yy (Simple_music): \applycontext #FUNCTION allows diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index afa7f51015..8cb5be61a7 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -3585,11 +3585,10 @@ effect music that appears inside a @code{\transpose}. Multi measure rests are entered using `@code{R}'. It is specifically meant for full bar rests and for entering parts: the rest can expand to -fill a score with -rests, or it can be printed as a single multimeasure rest This expansion -is controlled by the property @code{Score.skipBars}. If this is set to true, -Lily will not expand empty measures, and the appropriate number is added -automatically. +fill a score with rests, or it can be printed as a single multimeasure +rest This expansion is controlled by the property +@code{Score.skipBars}. If this is set to true, Lily will not expand +empty measures, and the appropriate number is added automatically. @lilypond[fragment,verbatim] \time 4/4 r1 | R1 | R1*2 @@ -3617,14 +3616,29 @@ rest centered in the measure, regardless of the time signature. @cindex whole rests for a full measure -The object for this object is @internalsref{MultiMeasureRest}. +The object for this object is @internalsref{MultiMeasureRest}, and +@internalsref{MultiMeasureRestNumber}. @refbugs Currently, there is no way to automatically condense multiple rests into a single multimeasure rest. Multi measure rests do not take part -in rest collisions. There is no way to put texts centered on -multi-measure rests. +in rest collisions. + +Multi-measure rests do not accept @var{note}-@code{text} syntax for +putting texts and scripts on the rest. This has to be done by setting +@code{#'text} in @internalsref{MultiMeasureRestNumber}. An identifier is +provided for a fermata: + +@cindex text on multi-measure rest +@cindex script on multi-measure rest +@cindex fermata on multi-measure rest + +@lilypond[verbatim,fragment] + \time 3/4 + \setMmRestFermata R2. +@end lilypond + @cindex condensing rests diff --git a/input/regression/apply-context.ly b/input/regression/apply-context.ly new file mode 100644 index 0000000000..2cf54b1b99 --- /dev/null +++ b/input/regression/apply-context.ly @@ -0,0 +1,22 @@ +\header { + +texidoc = "with \\applycontext, \\properties can be modified +procedurally. Applications include: checking bar numbers, smart +octavation. " + +} + +\score { \notes \relative c'' { + c1 c1 + + %% todo: should put something interesting in the .tex output. + + \applycontext #(lambda (tr) + (let* ((bn (ly:get-context-property tr 'currentBarNumber))) + (if (= bn 3) + #t + (format #t "We were called in ~a" bn)) + )) + + c1 c1 +}} diff --git a/ly/property-init.ly b/ly/property-init.ly index c035bfc3dd..6ff4c9ceba 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -240,3 +240,6 @@ turnOff = #'() arpeggioBracket = #(lambda (grob) (Arpeggio::brew_chord_bracket grob)) arpeggio = #(make-music-by-name 'ArpeggioEvent) glissando = #(make-music-by-name 'GlissandoEvent) + +setMmRestFermata = + \once \property Voice.MultiMeasureRestNumber \override #'text = #'(music "scripts-ufermata")