]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix #289.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 19 Feb 2007 14:40:16 +0000 (15:40 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 19 Feb 2007 14:40:16 +0000 (15:40 +0100)
Override graceSettings for \voiceOne, \voiceTwo.

input/regression/grace-direction-polyphony.ly [new file with mode: 0644]
ly/engraver-init.ly
scm/music-functions.scm

diff --git a/input/regression/grace-direction-polyphony.ly b/input/regression/grace-direction-polyphony.ly
new file mode 100644 (file)
index 0000000..924a58e
--- /dev/null
@@ -0,0 +1,13 @@
+\header {
+
+  texidoc = "The @code{\voiceOne} setting is retained after
+finishing the grace section."
+
+}
+\version "2.10.19"
+
+\relative c''' {
+  \voiceOne
+  c4
+  \grace d8 c4
+}
index 0f8560c8106926083f3518db1cedc1f34bbd1cc5..a69c7ad16f34278fabefaf1913bd666af8a6393a 100644 (file)
@@ -592,6 +592,9 @@ AncientRemoveEmptyStaffContext = \context {
 %%
   figuredBassFormatter = #format-bass-figure
   metronomeMarkFormatter = #format-metronome-markup
+
+
+  %% See also make-voice-props-set
   graceSettings = #`(
     (Voice Stem direction ,UP)
     (Voice Stem font-size -3)
index 1a1af41991760e401dbad3c76393cf8d2f05385a..928eaf71692a5cf06c4f58fd480e3f7c290fab22 100644 (file)
@@ -351,6 +351,17 @@ i.e.  this is not an override"
                                             (if (odd? n) -1 1)))
         direction-polyphonic-grobs)
     (list
+     (make-property-set 'graceSettings
+                       ;; TODO: take this from voicedGraceSettings or similar.
+                       '((Voice Stem font-size -3)
+                         (Voice NoteHead font-size -3)
+                         (Voice Dots font-size -3)
+                         (Voice Stem length-fraction 0.8)
+                         (Voice Stem no-stem-extend #t)
+                         (Voice Beam thickness 0.384)
+                         (Voice Beam length-fraction 0.8)
+                         (Voice Accidental font-size -4)))
+    
      (make-grob-property-set 'NoteColumn 'horizontal-shift (quotient n 2))
      (make-grob-property-set 'MultiMeasureRest 'staff-position (if (odd? n) -4 4)))))) 
 
@@ -359,8 +370,9 @@ i.e.  this is not an override"
    (append
     (map (lambda (x) (make-grob-property-revert x 'direction))
         direction-polyphonic-grobs)
-    (list (make-grob-property-revert 'NoteColumn 'horizontal-shift))
-    (list (make-grob-property-revert 'MultiMeasureRest 'staff-position)))))
+    (list (make-property-unset 'graceSettings)
+         (make-grob-property-revert 'NoteColumn 'horizontal-shift)
+         (make-grob-property-revert 'MultiMeasureRest 'staff-position)))))
 
 
 (define-safe-public (context-spec-music m context #:optional id)