2 staff-performer.cc -- implement Staff_performer
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Jan Nieuwenhuizen <jan@digicash.com>
9 #include "staff-performer.hh"
10 #include "translator-group.hh"
12 #include "audio-column.hh"
13 #include "audio-item.hh"
14 #include "audio-staff.hh"
16 IMPLEMENT_IS_TYPE_B1(Staff_performer
,Performer_group_performer
);
17 ADD_THIS_TRANSLATOR(Staff_performer
);
19 Staff_performer::Staff_performer()
24 Staff_performer::~Staff_performer()
26 delete audio_staff_p_
;
30 Staff_performer::do_creation_processing()
32 audio_staff_p_
= new Audio_staff
;
34 if (instrument_str().length_i())
37 play (new Audio_text (Audio_text::TRACK_NAME
, id_str_
));
38 // instrument description
39 play (new Audio_text (Audio_text::INSTRUMENT_NAME
, instrument_str ()));
43 play (new Audio_tempo (get_tempo_i ()));
45 if (instrument_str ().length_i ())
47 play (new Audio_instrument (instrument_str ()));
48 Performer_group_performer::do_creation_processing ();
52 Staff_performer::do_removal_processing()
54 Performer_group_performer::do_removal_processing ();
55 Performer::play (audio_staff_p_
);
60 Staff_performer::instrument_str()
62 return get_property ("instrument");
66 Staff_performer::play (Audio_element
* p
)
68 if (p
->is_type_b (Audio_item::static_name()))
70 audio_staff_p_
->add ((Audio_item
*)p
);