1 #include "getcommand.hh"
4 #include "inputmusic.hh"
5 #include "inputstaff.hh"
6 #include "inputcommand.hh"
7 #include "staffcommands.hh"
9 #include "complexstaff.hh"
11 #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)
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 == "rhythmic")
42 p = new Rhythmic_staff;
46 if (type == "melodic")
47 p = new Complex_staff;
48 else if (type == "lyric")
51 error( "Unknown staff-type `" + type +"\'", 0 );
53 p->score_l_ = score_l;
54 p->define_spot_str_ = ""; // todo
56 for (iter_top(music_,i); i.ok(); i++) {
57 Voice_list vl = i->convert();
62 Array<String> mark_arr;
63 Array<Moment> moment_arr;
64 p->get_marks(mark_arr, moment_arr);
65 score_l->add_marks(mark_arr, moment_arr);
71 Input_staff::Input_staff(Input_staff const&s)
74 for (iter_top(s.commands_,i); i.ok(); i++)
75 commands_.bottom().add(new Input_command(**i));
76 for (iter_top(s.music_,i); i.ok(); i++)
78 defined_ch_c_l_ = s.defined_ch_c_l_;
83 Input_staff::print() const
86 mtor << "Input_staff {\n";
87 for (iter_top(commands_,i); i.ok(); i++)
89 for (iter_top(music_,i); i.ok(); i++)