1 #include "getcommand.hh"
4 #include "inputmusic.hh"
5 #include "inputstaff.hh"
6 #include "inputcommand.hh"
7 #include "staffcommands.hh"
8 #include "melodicstaff.hh"
9 #include "rhythmstaff.hh"
10 #include "lyricstaff.hh"
14 Input_staff::add(Array<Input_command*> &s)
16 commands_.bottom().add(get_reset_command());
17 for (int i=0; i < s.size(); i++)
18 commands_.bottom().add(s[i]);
22 Input_staff::Input_staff(String s)
28 Input_staff::add(Input_music*m)
30 music_.bottom().add(m);
34 Input_staff::parse(Score*score_l)
38 if (type == "melodic")
39 p = new Melodic_staff;
40 else if (type == "rhythmic")
41 p = new Rhythmic_staff;
42 else if (type == "lyric")
44 p->score_l_ = score_l;
45 p->define_spot_str_ = define_spot_str_;
47 for (iter_top(music_,i); i.ok(); i++) {
48 Voice_list vl = i->convert();
53 Array<String> mark_arr;
54 Array<Moment> moment_arr;
55 p->get_marks(mark_arr, moment_arr);
56 score_l->add_marks(mark_arr, moment_arr);
62 Input_staff::Input_staff(Input_staff const&s)
64 for (iter_top(s.commands_,i); i.ok(); i++)
65 commands_.bottom().add(new Input_command(**i));
66 for (iter_top(s.music_,i); i.ok(); i++)
68 define_spot_str_ = s.define_spot_str_;
73 Input_staff::print() const
76 mtor << "Input_staff {\n";
77 for (iter_top(commands_,i); i.ok(); i++)
79 for (iter_top(music_,i); i.ok(); i++)