From: Neil Puttock Date: Sun, 12 Sep 2010 20:49:11 +0000 (+0100) Subject: Fix #1258. X-Git-Tag: release/2.13.34-1~22^2~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=098c46f8bd3f9173838a9dcdc78c89ca11e46b79;p=lilypond.git Fix #1258. * 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 --- diff --git a/input/regression/repeat-tremolo-chord-rep.ly b/input/regression/repeat-tremolo-chord-rep.ly new file mode 100644 index 0000000000..d1d5676143 --- /dev/null +++ b/input/regression/repeat-tremolo-chord-rep.ly @@ -0,0 +1,12 @@ +\version "2.13.34" + +\header { + texidoc = "Tremolos work with chord repetitions." +} + +\relative c' { + 1 + \repeat tremolo 4 q16 + \repeat tremolo 4 { q16 } + \repeat tremolo 4 { c16 q16 } +} diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc index 0547072415..d09e3b95b8 100644 --- a/lily/stem-engraver.cc +++ b/lily/stem-engraver.cc @@ -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) { diff --git a/scm/music-functions.scm b/scm/music-functions.scm index a9f54cd443..4a322b5b50 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -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)))