From 6aa8bbfc9b240c0437ded6780a772b3cc66d6ac0 Mon Sep 17 00:00:00 2001 From: hanwen Date: Sat, 4 May 2002 12:35:32 +0000 Subject: [PATCH] mats pats --- ChangeLog | 5 +++++ lily/chord-tremolo-engraver.cc | 20 ++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 522c32b10c..41ff8d68ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-05-03 Mats Bengtsson + + * lily/chord-tremolo-engraver.cc (try_music): Handle chord + tremolos of dotted duration. + 2002-05-04 Han-Wen * input/mozart-hrn*.ly: many corrections. diff --git a/lily/chord-tremolo-engraver.cc b/lily/chord-tremolo-engraver.cc index 8f0b97500c..d2e8d5af83 100644 --- a/lily/chord-tremolo-engraver.cc +++ b/lily/chord-tremolo-engraver.cc @@ -22,6 +22,7 @@ #include "chord-tremolo-iterator.hh" #include "stem-tremolo.hh" #include "music-list.hh" +#include "math.h" // ceil /** This acknowledges repeated music with "tremolo" style. It typesets @@ -52,6 +53,7 @@ protected: Moment beam_start_location_; int note_head_i_; + int dots_i_; bool sequential_body_b_; Spanner * beam_p_; @@ -71,6 +73,7 @@ Chord_tremolo_engraver::Chord_tremolo_engraver () beam_p_ = finished_beam_p_ = 0; repeat_ =0; note_head_i_ = 0; + dots_i_ = 0; stem_tremolo_ = 0; sequential_body_b_ = false; } @@ -89,8 +92,10 @@ Chord_tremolo_engraver::try_music (Music * m) stop_mom_ = start_mom_ + l; sequential_body_b_ = dynamic_cast (rp->body ()); - // ugh. should generate dots, triplet beams. - note_head_i_ = l.den () 0, 3->1, 7->2 + note_head_i_ = note_head_i_ set_grob_property ("duration-log", gh_int2scm (intlog2 (note_head_i_))); + if (dots_i_ > 0) + { + Item * d = new Item (get_property ("Dots")); + Rhythmic_head::set_dots (info.grob_l_, d); + + d->set_grob_property ("dot-count", gh_int2scm (dots_i_)); + + d->set_parent (info.grob_l_, Y_AXIS); + announce_grob (d, SCM_EOL); + + } } } -- 2.39.5