3 #include "linestaff.hh"
9 #include "rhythmstaf.hh"
13 Rhythmic_column::Rhythmic_column(Score_column
*s
, Rhythmic_staff
*rs
)
22 Rhythmic_staff::set_output(PScore
* ps
)
24 theline
= new Linestaff(1);
26 pscore_
->add(theline
);
29 // should integrate handling of BREAK commands into Staff_column
31 Rhythmic_column::process_commands( )
33 int breakstat
= BREAK_END
;
34 for (int i
= 0 ; i
< s_commands
.sz(); i
++) {
35 Command
*com
= s_commands
[i
];
43 score_column
->set_breakable();
44 breakstat
= com
->code
;
48 typeset_command ( com
, breakstat
);
67 Rhythmic_column::process_requests()
69 for (int i
= 0 ; i
< v_elts
.sz(); i
++)
70 for (PCursor
<Request
*> rqc(v_elts
[i
]->reqs
); rqc
.ok(); rqc
++) {
76 WARN
<< "too many notes.\n";
91 Rhythmic_column::typeset_command(Command
*com
, int breakst
)
96 if (com
-> args
[0] == "BAR" ) {
97 s
= Symbol::find_bar(com
->args
[1]);
101 i
->output
=new Molecule(Atom(s
));
102 staff_
->pscore_
->typeset_item(i
, score_column
->pcol
,
103 staff_
->theline
,breakst
);
107 Rhythmic_column::typeset_req(Request
*rq
)
114 s
= Symbol::find_ball(rq
->note()->balltype
);
117 s
= Symbol::find_rest(rq
->rest()->balltype
);
123 i
->output
= new Molecule(Atom(s
));
125 staff_
->pscore_
->typeset_item(i
, score_column
->pcol
, staff_
->theline
,0 );
129 Rhythmic_staff::grant_requests()
131 for (PCursor
<Staff_column
*> cc(cols
); cc
.ok(); cc
++) {
132 Rhythmic_column
*rp
= (Rhythmic_column
*)*cc
;
134 rp
->typeset_req( rp
->the_note
);
139 Rhythmic_staff::create_col(Score_column
*s
)
141 Rhythmic_column
*rc
= new Rhythmic_column(s
,this);
147 get_new_rhythmstaff()
149 return new Rhythmic_staff
;