lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Some clean up about grace-settings in music-functions.scm (issue 1311104


From: thomasmorley65
Subject: Some clean up about grace-settings in music-functions.scm (issue 13111045)
Date: Tue, 20 Aug 2013 20:22:05 +0000

Reviewers: ,

Message:
Hi,

please review, though, I don't expect any visible changes in reg-tests
or docs.

Description:
Some clean up about grace-settings in music-functions.scm

- Stores a list,general-grace-settings, used by make-voice-props-set and
make-voice-props-override.
- Settings to be used by the Score-context are appended to
general-grace-settings and stored in score-grace-settings, used in
engraver-init.ly

Please review this at https://codereview.appspot.com/13111045/

Affected files:
  M ly/engraver-init.ly
  M scm/music-functions.scm


Index: ly/engraver-init.ly
diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly
index 99647c75d03182f2ab159a44d4a86c9264d50149..0d1fe3d08056428cac0fb53b37fb442f6b743072 100644
--- a/ly/engraver-init.ly
+++ b/ly/engraver-init.ly
@@ -704,26 +704,8 @@ automatically when an output definition (a @code{\\score} or
   figuredBassFormatter = #format-bass-figure
   metronomeMarkFormatter = #format-metronome-markup

-
   %% See also make-voice-props-set
-  graceSettings = #`(
-    (Voice Stem direction ,UP)
-    (Voice Stem font-size -3)
-    (Voice Flag font-size -3)
-    (Voice NoteHead font-size -3)
-    (Voice TabNoteHead font-size -4)
-    (Voice Dots font-size -3)
-    (Voice Stem length-fraction 0.8)
-    (Voice Stem no-stem-extend #t)
-    (Voice Beam beam-thickness 0.384)
-    (Voice Beam length-fraction 0.8)
-    (Voice Accidental font-size -4)
-    (Voice AccidentalCautionary font-size -4)
-    (Voice Slur direction ,DOWN)
-    (Voice Script font-size -3)
-    (Voice Fingering font-size -8)
-    (Voice StringNumber font-size -8)
-  )
+  graceSettings = #score-grace-settings

   keepAliveInterfaces = #'(
     bass-figure-interface
Index: scm/music-functions.scm
diff --git a/scm/music-functions.scm b/scm/music-functions.scm
index ff2bcb7ec72ea5b79e311f1566247af73b4940a5..bb5b6e8731c572d9b504d3f8945d5eaeb55c3753 100644
--- a/scm/music-functions.scm
+++ b/scm/music-functions.scm
@@ -503,6 +503,28 @@ in @var{grob}."
     TupletBracket
     TrillSpanner))

+(define general-grace-settings
+  `((Voice Stem font-size -3)
+    (Voice Flag font-size -3)
+    (Voice NoteHead font-size -3)
+    (Voice TabNoteHead font-size -4)
+    (Voice Dots font-size -3)
+    (Voice Stem length-fraction 0.8)
+    (Voice Stem no-stem-extend #t)
+    (Voice Beam beam-thickness 0.384)
+    (Voice Beam length-fraction 0.8)
+    (Voice Accidental font-size -4)
+    (Voice AccidentalCautionary font-size -4)
+    (Voice Script font-size -3)
+    (Voice Fingering font-size -8)
+    (Voice StringNumber font-size -8)))
+
+(define-public score-grace-settings
+  (append
+    `((Voice Stem direction ,UP)
+      (Voice Slur direction ,DOWN))
+    general-grace-settings))
+
 (define-safe-public (make-voice-props-set n)
   (make-sequential-music
    (append
@@ -510,26 +532,9 @@ in @var{grob}."
                                              (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 Flag font-size -3)
-                          (Voice NoteHead font-size -3)
-                          (Voice TabNoteHead font-size -4)
-                          (Voice Dots font-size -3)
-                          (Voice Stem length-fraction 0.8)
-                          (Voice Stem no-stem-extend #t)
-                          (Voice Beam beam-thickness 0.384)
-                          (Voice Beam length-fraction 0.8)
-                          (Voice Accidental font-size -4)
-                          (Voice AccidentalCautionary font-size -4)
-                          (Voice Script font-size -3)
-                          (Voice Fingering font-size -8)
-                          (Voice StringNumber font-size -8)))
-
+     (make-property-set 'graceSettings general-grace-settings)
(make-grob-property-set 'NoteColumn 'horizontal-shift (quotient n 2))))))

-
 (define-safe-public (make-voice-props-override n)
   (make-sequential-music
    (append
@@ -537,23 +542,7 @@ in @var{grob}."
                                                   (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 Flag font-size -3)
-                          (Voice NoteHead font-size -3)
-                          (Voice TabNoteHead font-size -4)
-                          (Voice Dots font-size -3)
-                          (Voice Stem length-fraction 0.8)
-                          (Voice Stem no-stem-extend #t)
-                          (Voice Beam beam-thickness 0.384)
-                          (Voice Beam length-fraction 0.8)
-                          (Voice Accidental font-size -4)
-                          (Voice AccidentalCautionary font-size -4)
-                          (Voice Script font-size -3)
-                          (Voice Fingering font-size -8)
-                          (Voice StringNumber font-size -8)))
-
+     (make-property-set 'graceSettings general-grace-settings)
(make-grob-property-override 'NoteColumn 'horizontal-shift (quotient n 2)) (make-grob-property-override 'MultiMeasureRest 'staff-position (if (odd? n) -4 4))))))






reply via email to

[Prev in Thread] Current Thread [Next in Thread]