]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix #1258.
authorNeil Puttock <n.puttock@gmail.com>
Sun, 12 Sep 2010 20:49:11 +0000 (21:49 +0100)
committerNeil Puttock <n.puttock@gmail.com>
Sun, 12 Sep 2010 20:56:37 +0000 (21:56 +0100)
* lily/stem-engraver.cc (make_stem):

  robustify property lookup for tremolo-type (ensures compilation can
  continue even if there is an error inside make-repeat which prevents
  correct calculation)

* scm/music-functions.scm (make-repeat):

  don't filter out child music which uses the 'element property

input/regression/repeat-tremolo-chord-rep.ly [new file with mode: 0644]
lily/stem-engraver.cc
scm/music-functions.scm

diff --git a/input/regression/repeat-tremolo-chord-rep.ly b/input/regression/repeat-tremolo-chord-rep.ly
new file mode 100644 (file)
index 0000000..d1d5676
--- /dev/null
@@ -0,0 +1,12 @@
+\version "2.13.34"
+
+\header {
+  texidoc = "Tremolos work with chord repetitions."
+}
+
+\relative c' {
+  <c e g>1
+  \repeat tremolo 4 q16
+  \repeat tremolo 4 { q16 }
+  \repeat tremolo 4 { c16 q16 }
+}
index 05470724151221d42ff6c3b07fef627843ee4e44..d09e3b95b8bb637de93018f12ab9f5f51eade291 100644 (file)
@@ -69,14 +69,14 @@ Stem_engraver::make_stem (Grob_info gi)
   if (tremolo_ev_)
     {
       /* Stem tremolo is never applied to a note by default,
-        is must me requested.  But there is a default for the
+        it must be requested.  But there is a default for the
         tremolo value:
 
         c4:8 c c:
 
-        the first and last (quarter) note bothe get one tremolo flag.  */
+        the first and last (quarter) note both get one tremolo flag.  */
       int requested_type
-       = scm_to_int (tremolo_ev_->get_property ("tremolo-type"));
+       = robust_scm2int (tremolo_ev_->get_property ("tremolo-type"), 0);
       SCM f = get_property ("tremoloFlags");
       if (!requested_type)
        {
index a9f54cd443765c9bd0041594ace63c5a47223d5b..4a322b5b507fb745c493d38e94d9a29c1d9d63be 100644 (file)
@@ -270,7 +270,8 @@ through MUSIC."
     (set! (ly:music-property r 'repeat-count) (max times 1))
     (set! (ly:music-property r 'elements) talts)
     (if (and (equal? name "tremolo")
-            (pair? (ly:music-property main 'elements)))
+            (or (pair? (ly:music-property main 'elements))
+                (ly:music? (ly:music-property main 'element))))
        ;; This works for single-note and multi-note tremolos!
        (let* ((children (if (music-is-of-type? main 'sequential-music)
                             ;; \repeat tremolo n { ... }
@@ -324,7 +325,6 @@ through MUSIC."
        (let* ((props (ly:music-mutable-properties music))
               (old-name (ly:music-property music 'name))
               (flattened (flatten-alist props)))
-
          (set! music (apply make-music (cons 'UnfoldedRepeatedMusic
                                              flattened)))