2 duration.cc -- implement Duration, Plet,
4 source file of the LilyPond music typesetter
6 (c) 1997--2000 Jan Nieuwenhuizen <janneke@gnu.org>
7 Han-Wen Nienhuys <hanwen@cs.uu.nl>
13 #include "lily-proto.hh"
16 #include "duration.hh"
27 Duration::compress (Rational m
)
29 tuplet_iso_i_
*= m
.num_i ();
30 tuplet_type_i_
*= m
.den_i ();
34 Duration::length_mom () const
36 Rational
mom (1 << abs (durlog_i_
));
43 for (int d
= dots_i_
; d
; d
--)
49 return mom
* Moment (tuplet_iso_i_
, tuplet_type_i_
);
53 Duration::set_plet (int i
, int t
)
61 Duration::str () const
63 return to_str (durlog_i_
) + to_str ('.', dots_i_
);
70 return tuplet_iso_i_
!= 1 || tuplet_type_i_
!= 1;