diff options
author | Han-Wen Nienhuys <hanwen@xs4all.nl> | 2007-02-19 15:40:16 +0100 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@xs4all.nl> | 2007-02-19 15:40:16 +0100 |
commit | 264d51268e3ba26d6fb8cff9e5ba3d7e08f9de77 (patch) | |
tree | 8d98f86a97a34910b0dc39515ffd431ac0240fa4 | |
parent | e7c5f6a239c1d40363355a90034c772874814217 (diff) |
Fix #289.
Override graceSettings for \voiceOne, \voiceTwo.
-rw-r--r-- | input/regression/grace-direction-polyphony.ly | 13 | ||||
-rw-r--r-- | ly/engraver-init.ly | 3 | ||||
-rw-r--r-- | scm/music-functions.scm | 16 |
3 files changed, 30 insertions, 2 deletions
diff --git a/input/regression/grace-direction-polyphony.ly b/input/regression/grace-direction-polyphony.ly new file mode 100644 index 0000000000..924a58e0f9 --- /dev/null +++ b/input/regression/grace-direction-polyphony.ly @@ -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 +} diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 0f8560c810..a69c7ad16f 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -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) diff --git a/scm/music-functions.scm b/scm/music-functions.scm index 1a1af41991..928eaf7169 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -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) |