summaryrefslogtreecommitdiff
path: root/lily/chord-tremolo-engraver.cc
diff options
context:
space:
mode:
authorErik Sandberg <mandolaerik@gmail.com>2006-09-22 07:51:37 +0000
committerErik Sandberg <mandolaerik@gmail.com>2006-09-22 07:51:37 +0000
commit68f8545bd6a0221ee1100336e4ad49399a7ffaa4 (patch)
treef2e2548eef3745db1e038d6a8a0ef4c33ad786f3 /lily/chord-tremolo-engraver.cc
parent19e574828ecfeb68ca7f6477348ed963c5e1fc92 (diff)
* lily/translator.cc, lily/context.cc:, lily/translator-group.cc:
remove try_music * lily/*-engraver.cc, lily/*-performer.cc: Remove all remaining references to Music; use ASSIGN_EVENT_ONCE everywhere * lily/grob-info.cc: junk *music_cause * lily/music.cc: copy eventified articulations to stream event * lily/part-combine-iterator.cc: Cleanup using enums * lily/translator-group.cc: Junk OldMusicEvent, and associated methods * lily/include/engraver.hh: Junk music.hh include * lily/stream-event.cc: Changed constructors
Diffstat (limited to 'lily/chord-tremolo-engraver.cc')
-rw-r--r--lily/chord-tremolo-engraver.cc22
1 files changed, 13 insertions, 9 deletions
diff --git a/lily/chord-tremolo-engraver.cc b/lily/chord-tremolo-engraver.cc
index b0f17352ba..f07e984626 100644
--- a/lily/chord-tremolo-engraver.cc
+++ b/lily/chord-tremolo-engraver.cc
@@ -73,15 +73,19 @@ Chord_tremolo_engraver::listen_tremolo_span (Stream_event *ev)
Direction span_dir = to_dir (ev->get_property ("span-direction"));
if (span_dir == START)
{
- repeat_ = ev;
- int type = scm_to_int (ev->get_property ("tremolo-type"));
- /* e.g. 1 for type 8, 2 for type 16 */
- flags_ = intlog2 (type) - 2;
- expected_beam_count_ = scm_to_int (ev->get_property ("expected-beam-count"));
- beam_dir_ = RIGHT;
+ if (ASSIGN_EVENT_ONCE (repeat_, ev))
+ {
+ int type = scm_to_int (ev->get_property ("tremolo-type"));
+ /* e.g. 1 for type 8, 2 for type 16 */
+ flags_ = intlog2 (type) - 2;
+ expected_beam_count_ = scm_to_int (ev->get_property ("expected-beam-count"));
+ beam_dir_ = RIGHT;
+ }
}
else if (span_dir == STOP)
{
+ if (!repeat_)
+ ev->origin ()->warning (_ ("No tremolo to end"));
repeat_ = 0;
beam_ = 0;
expected_beam_count_ = 0;
@@ -123,13 +127,13 @@ Chord_tremolo_engraver::acknowledge_stem (Grob_info info)
if (beam_dir_ == RIGHT)
beam_dir_ = LEFT;
- if (info.ultimate_music_cause ()->is_mus_type ("rhythmic-event"))
+ if (info.ultimate_event_cause ()->in_event_class ("rhythmic-event"))
Beam::add_stem (beam_, s);
else
{
string s = _ ("stem must have Rhythmic structure");
- if (info.music_cause ())
- info.music_cause ()->origin ()->warning (s);
+ if (info.event_cause ())
+ info.event_cause ()->origin ()->warning (s);
else
::warning (s);
}