3 #include "linestaff.hh"
9 #include "rhythmstaf.hh"
10 #include "lookupsyms.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
++) {
74 WARN
<< "too many notes.\n";
86 Rhythmic_column::typeset_command(Command
*com
, int breakst
)
91 if (com
-> args
[0] == "BAR" ) {
92 s
= Lookup::bar(com
->args
[1]);
93 } else if (com
->args
[0] == "METER") {
94 Parametric_symbol
*p
= Lookup::meter("general");
95 svec
<String
> arg( com
->args
);
101 Molecule
* m
=new Molecule(Atom(s
));
104 svec
<Item
*> sv(staff_
->pscore_
->
105 select_items(staff_
->theline
, score_column
->pcol
));
106 for (int j
=0; j
<sv
.sz(); j
++) {
107 wid
.unite(sv
[j
]->output
->extent().x
);
110 m
->translate(Offset(wid
.max
,0));
113 staff_
->pscore_
->typeset_item(i
, score_column
->pcol
,
114 staff_
->theline
,breakst
);
118 Rhythmic_column::typeset_req(Request
*rq
)
125 s
= Lookup::ball(rq
->note()->balltype
);
127 dots
=rq
->rhythmic()->dots
;
129 s
= Lookup::rest(rq
->rest()->balltype
);
131 Molecule
*m
= new Molecule(Atom(s
));
133 Symbol d
= Lookup::dots(dots
);
139 staff_
->pscore_
->typeset_item(i
, score_column
->pcol
, staff_
->theline
,0 );
143 Rhythmic_staff::grant_requests()
145 for (PCursor
<Staff_column
*> cc(cols
); cc
.ok(); cc
++) {
146 Rhythmic_column
*rp
= (Rhythmic_column
*)*cc
;
148 rp
->typeset_req( rp
->the_note
);
153 Rhythmic_staff::create_col(Score_column
*s
)
155 Rhythmic_column
*rc
= new Rhythmic_column(s
,this);
161 get_new_rhythmstaff()
163 return new Rhythmic_staff
;