]> git.donarmstrong.com Git - lilypond.git/commitdiff
Add commands \markLengthOn \markLengthOff; issue 3279
authorKeith OHara <k-ohara5a5a@oco.net>
Sat, 4 May 2013 06:04:21 +0000 (23:04 -0700)
committerKeith OHara <k-ohara5a5a@oco.net>
Mon, 20 May 2013 04:36:49 +0000 (21:36 -0700)
Documentation/learning/tweaks.itely
Documentation/notation/rhythms.itely
Documentation/notation/text.itely
input/regression/metronome-marking.ly
ly/property-init.ly
scm/define-grobs.scm

index 9dc53ff8f9dcb331097b863e1877764423c23a14..5e8365a90893d1f057b85021bea7edc0c5a65d53 100644 (file)
@@ -2285,6 +2285,9 @@ The command to revert to the default behavior is
 @code{\textLengthOff}.  Alternatively, @code{\once} may be used
 with @code{\textLengthOn} if the effect is to be limited to just a
 single musical moment.
+The corresponding spacing behavior for rehearsal marks and tempo
+indications is independently controlled with the commands
+@code{\markLengthOn} and @code{\markLengthOff}.
 
 @cindex markup text, allowing collisions
 
index 08d9b7ca13c5c61d9ab56711a1a5f23e3a8e32f0..488cfd670cab289515b0db8c52044465f895cd3a 100644 (file)
@@ -1333,6 +1333,26 @@ written by including an empty string in the input:
 d4 g e c
 @end lilypond
 
+@funindex \markLengthOn
+@funindex markLengthOn
+@funindex \markLengthOff
+@funindex markLengthOff
+
+In a part for an instrument with long periods of rests,
+tempo indications sometimes follow each other closely.
+The command @code{\markLengthOn} provides extra horizontal space
+to prevent tempo indications from overlapping, and @code{\markLengthOff}
+restores the default behavior of ignoring tempo marks
+for horizontal spacing.
+
+@lilypond[quote,relative=0]
+\compressFullBarRests
+\markLengthOn
+\tempo "Molto vivace"
+R1*12
+\tempo "Meno mosso"
+R1*16
+@end lilypond
 
 @snippets
 
index e6a085fc56e0b6488be5580168fdd8fafb5e6104..82c7a209a3476f2a6f1f5535d172fb835f7fc595 100644 (file)
@@ -268,6 +268,15 @@ c1 c
 c  c
 @end lilypond
 
+@funindex \markLengthOn
+@funindex markLengthOn
+@funindex \markLengthOff
+@funindex markLengthOff
+
+@predefined
+@code{\markLengthOn},
+@code{\markLengthOff}.
+@endpredefined
 
 @snippets
 
index e987176b7e1a08a269b188d2e7975e977ec8e977..6fd2ed2441c56a02205751dc68b0943457c3799c 100644 (file)
@@ -17,7 +17,9 @@ The marking is left aligned with the time signature, if there is one.
 \version "2.16.0"
 
 \relative c'' {
-  \tempo \breve = 100 c1 c1 \tempo 8.. = 50 c1
+  \tempo \breve = 100 c1 c1
+  \markLengthOn
+  \tempo "Allegro" 8.. = 50 c1 \tempo "Adagio" c2 c'
 }
 
 
index 1c97c04fabf096b6f496cfe9a1ad521fdd59b255..85ae984374b58e02894c76b4eb042ced9482e096 100644 (file)
@@ -563,6 +563,20 @@ textLengthOff = {
   \override TextScript.extra-spacing-height = #'(0 . 0)
 }
 
+markLengthOn = {
+  \override Score.MetronomeMark.extra-spacing-width = #'(0 . 1.0)
+  \override Score.RehearsalMark.extra-spacing-width = #'(-0.5 . 0.5)
+  % Raise as much as four staff-spaces before pushing notecolumns right
+  \override Score.MetronomeMark.extra-spacing-height = #'(4 . 4)
+  \override Score.RehearsalMark.extra-spacing-height = #'(4 . 4)
+}
+
+markLengthOff = {
+  \override Score.MetronomeMark.extra-spacing-width = #'(+inf.0 . -inf.0)
+  \override Score.RehearsalMark.extra-spacing-width = #'(+inf.0 . -inf.0)
+  \revert Score.MetronomeMark.extra-spacing-height
+  \revert Score.RehearsalMark.extra-spacing-height
+}
 
 %% text spanners
 
index d016c7a2e2a8416989546def3eaa9697793e2b28..9ab189d16cae1705e6e40ad2ab97856836ec881d 100644 (file)
        (break-visibility . ,end-of-line-invisible)
        (direction . ,UP)
        (extra-spacing-width . (+inf.0 . -inf.0))
-       (outside-staff-horizontal-padding . 0.12)
+       (outside-staff-horizontal-padding . 0.2)
        (outside-staff-priority . 1000)
        (padding . 0.8)
        (side-axis . ,Y)
-       (skyline-horizontal-padding . 0.2)
        (stencil . ,ly:text-interface::print)
        (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
        (Y-offset . ,side-position-interface::y-aligned-side)