]> 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:44:38 +0000 (15:44 +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 27a0437ffa4ee62f3701de8a3bc3f0cadcc2d7f7..1a3a8c9686a76a14636809d3c723a058ae8946fd 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 ad55398b0cdef9e9278bb497a819f81f7b5d0dc3..fc401c6b17e26a685704dfe77a5619a54be328b2 100644 (file)
@@ -330,6 +330,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)))))) 
 
@@ -338,8 +349,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)