diff options
author | Neil Puttock <n.puttock@gmail.com> | 2010-09-12 21:49:11 +0100 |
---|---|---|
committer | Neil Puttock <n.puttock@gmail.com> | 2010-09-12 21:56:37 +0100 |
commit | 098c46f8bd3f9173838a9dcdc78c89ca11e46b79 (patch) | |
tree | 25ea3ad82834fdf2dcc89395fe753e07702fdaaf | |
parent | 0030bb3de3906d21019cb1a0ed4a7aad7cdf0a59 (diff) |
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
-rw-r--r-- | input/regression/repeat-tremolo-chord-rep.ly | 12 | ||||
-rw-r--r-- | lily/stem-engraver.cc | 6 | ||||
-rw-r--r-- | scm/music-functions.scm | 4 |
3 files changed, 17 insertions, 5 deletions
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' { + <c e g>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))) |