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"
12 #include "complexstaff.hh"
15 Input_staff::add(Array<Input_command*> &s)
17 commands_.bottom().add(get_reset_command());
18 for (int i=0; i < s.size(); i++)
19 commands_.bottom().add(s[i]);
23 Input_staff::Input_staff(String s)
29 Input_staff::add(Input_music*m)
31 music_.bottom().add(m);
35 Input_staff::parse(Score*score_l)
40 p = new Melodic_staff;
41 else if (type == "melodic")
42 p = new Complex_staff;
43 else if (type == "rhythmic")
44 p = new Rhythmic_staff;
45 else if (type == "lyric")
48 error("Unknown staff-type `" + type +"\'");
50 p->score_l_ = score_l;
51 p->define_spot_str_ = define_spot_str_;
53 for (iter_top(music_,i); i.ok(); i++) {
54 Voice_list vl = i->convert();
59 Array<String> mark_arr;
60 Array<Moment> moment_arr;
61 p->get_marks(mark_arr, moment_arr);
62 score_l->add_marks(mark_arr, moment_arr);
68 Input_staff::Input_staff(Input_staff const&s)
70 for (iter_top(s.commands_,i); i.ok(); i++)
71 commands_.bottom().add(new Input_command(**i));
72 for (iter_top(s.music_,i); i.ok(); i++)
74 define_spot_str_ = s.define_spot_str_;
79 Input_staff::print() const
82 mtor << "Input_staff {\n";
83 for (iter_top(commands_,i); i.ok(); i++)
85 for (iter_top(music_,i); i.ok(); i++)