source file of the GNU LilyPond music typesetter
- (c) 2000 Jan Nieuwenhuizen <janneke@gnu.org>
+ (c) 2000--2004 Jan Nieuwenhuizen <janneke@gnu.org>
*/
#include "performer.hh"
-#include "command-request.hh"
-#include "musical-request.hh"
+
+#include "event.hh"
#include "audio-item.hh"
struct Audio_dynamic_tuple
virtual void acknowledge_audio_element (Audio_element_info);
virtual void process_music ();
virtual void stop_translation_timestep ();
- virtual void start_translation_timestep ();
private:
Audio_dynamic* audio_;
Real last_volume_;
- Span_req* span_start_req_;
- Drul_array<Span_req*> span_req_l_drul_;
+ Music* span_start_req_;
+ Drul_array<Music*> span_req_l_drul_;
Array<Audio_dynamic_tuple> dynamic_tuples_;
Array<Audio_dynamic_tuple> finished_dynamic_tuples_;
Direction dir_;
play_element (audio_);
audio_ = 0;
}
-}
-void
-Span_dynamic_performer::start_translation_timestep ()
-{
span_req_l_drul_[STOP] = 0;
span_req_l_drul_[START] = 0;
+
}
bool
Span_dynamic_performer::try_music (Music* r)
{
- if (Span_req * s = dynamic_cast<Span_req*> (r))
+ if (r->is_mus_type ("crescendo-event")
+ || r->is_mus_type ("decrescendo-event"))
{
- String t = ly_scm2string (s->get_mus_property ("span-type"));
- if (t == "crescendo" || t == "decrescendo")
- {
- span_req_l_drul_[s->get_span_dir ()] = s;
- return true;
- }
+ Direction d = to_dir (r->get_mus_property ("span-direction"));
+ span_req_l_drul_[d] = r;
+ return true;
}
return false;
}
-ENTER_DESCRIPTION (Span_dynamic_performer, "","","","","" );
+ENTER_DESCRIPTION (Span_dynamic_performer,
+ "", "",
+ "crescendo-event decrescendo-event",
+ "", "", "");