2 duration.cc -- implement Duration, Plet,
4 source file of the LilyPond music typesetter
6 (c) 1997 Jan Nieuwenhuizen <jan@digicash.com>
7 Han-Wen Nienhuys <hanwen@stack.nl>
14 #include "source-file.hh"
17 #include "duration.hh"
18 #include "duration-convert.hh"
21 int Duration::division_1_i_s
= 384 * 4;
32 Duration::duration_type_b(int t
)
35 ugh. Assuming behavior of conversion funcs on broken input.
37 return t
== Duration_convert::type2_i( Duration_convert::i2_type(t
));
41 // i should be called "mom()", ... or at least "length_mom()"
43 Duration::length() const
45 return Duration_convert::dur2_mom(*this);
49 Duration::set_plet(int i
, int t
)
56 Duration::set_plet(Duration d
)
58 plet_
.iso_i_
= d
.plet_
.iso_i_
;
59 plet_
.type_i_
= d
.plet_
.type_i_
;
63 Duration::set_ticks( int ticks_i
)
65 assert( durlog_i_
<10 );
73 return Duration_convert::dur2_str(*this);
80 return !plet_
.unit_b();