X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fchord-tremolo-iterator.cc;h=71e206aa0322d4b403a8c5ed5b407d104e54f8c9;hb=9c4b0d53715d94ee923729eb40416ea90f71516c;hp=45ddbc443d65121fc4b1b7fcadf009fb67fef568;hpb=8b500afb9431f5471e385fa2eeb8fde868e4fc49;p=lilypond.git diff --git a/lily/chord-tremolo-iterator.cc b/lily/chord-tremolo-iterator.cc index 45ddbc443d..71e206aa03 100644 --- a/lily/chord-tremolo-iterator.cc +++ b/lily/chord-tremolo-iterator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 2000--2006 Han-Wen Nienhuys + (c) 2000--2007 Han-Wen Nienhuys Erik Sandberg */ @@ -29,7 +29,9 @@ Chord_tremolo_iterator::get_music_list () const int elt_count = body_is_sequential ? scm_ilength (body->get_property ("elements")) : 1; - if (body_is_sequential && elt_count != 2) + if (body_is_sequential && + (elt_count != 2 + && elt_count != 1)) mus->origin ()->warning (_f ("expect 2 elements for chord tremolo, found %d", elt_count)); if (elt_count <= 0) @@ -39,7 +41,7 @@ Chord_tremolo_iterator::get_music_list () const Rational note_dur = total_dur / Rational (elt_count * Repeated_music::repeat_count (mus)); SCM tremolo_type = scm_int2num (note_dur.den ()); - int expected_beaming_ = max (0, (intlog2 (total_dur.den ()) - 2)); + int expected_beaming_ = max (0, (intlog2 (total_dur.den ()) - intlog2 (total_dur.num () + 1) - 1)); if (elt_count == 1) {