2 tempo-performer.cc -- implement Tempo_performer
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2006 Jan Nieuwenhuizen <janneke@gnu.org>
9 #include "performer.hh"
11 #include "audio-item.hh"
12 #include "duration.hh"
13 #include "stream-event.hh"
15 #include "translator.icc"
17 class Tempo_performer : public Performer
20 TRANSLATOR_DECLARATIONS (Tempo_performer);
25 virtual void derived_mark () const;
26 void stop_translation_timestep ();
27 void process_music ();
34 Tempo_performer::derived_mark () const
36 scm_gc_mark (last_tempo_);
39 Tempo_performer::Tempo_performer ()
41 last_tempo_ = SCM_EOL;
45 Tempo_performer::~Tempo_performer ()
50 Tempo_performer::process_music ()
52 SCM w = get_property ("tempoWholesPerMinute");
54 && !ly_is_equal (w, last_tempo_))
56 Rational r = unsmob_moment (w)->main_part_;
59 audio_ = new Audio_tempo (r.to_int ());
61 Audio_element_info info (audio_, 0);
62 announce_element (info);
69 Tempo_performer::stop_translation_timestep ()
77 ADD_TRANSLATOR (Tempo_performer, "", "",
78 "tempoWholesPerMinute ",