7 mtor
<< " at "<<when
<<'\n';
8 mtor
<< "meeter " << whole_per_measure
<< "/" << 1/one_beat
9 << "\nposition "<< bars
<< ":" << whole_in_measure
<<'\n';
14 assert(whole_in_measure
< whole_per_measure
&& 0 <= whole_in_measure
);
17 Moment::Moment(Real dt
, Moment
const *prev
)
23 whole_in_measure
+= dt
;
24 while ( whole_in_measure
>= whole_per_measure
) {
25 whole_in_measure
-= whole_per_measure
;
28 } else { // default 4/4
29 whole_per_measure
= 1;
38 Moment::set_meter(int l
, int o
)
42 whole_per_measure
= Real(l
) * one_beat
;
46 Moment::setpartial(Real p
)
49 error_t ("Partial measure only allowed at beginning.", when
);
50 if (p
<0||p
> whole_per_measure
)
51 error_t ("Partial measure has incorrect size", when
);
52 whole_in_measure
= whole_per_measure
- p
;
57 return whole_per_measure
-whole_in_measure
;