]> git.donarmstrong.com Git - lilypond.git/blob - lib/include/duration.hh
release: 1.3.0
[lilypond.git] / lib / include / duration.hh
1 /*
2   duration.hh -- declare Duration
3   
4   source file of the LilyPond music typesetter
5
6   (c)  1997--1999 Jan Nieuwenhuizen <janneke@gnu.org>
7
8 */
9
10 // split into 4?
11
12 #ifndef DURATION_HH
13 #define DURATION_HH
14
15 #include "fproto.hh"
16 #include "rational.hh"
17 #include "plet.hh"
18
19 /**
20    Handle "musical" durations. This means: balltype 1,2,4,etc. and dots.
21    
22   (dur)
23   */
24 struct Duration {
25   Duration ();
26   /// is the "plet factor" of this note != 1 ?
27   bool plet_b ();
28   String str () const;
29   void set_plet (int,int );
30   void compress (Rational);
31
32   static bool duration_type_b (int t);
33   void set_ticks (int ticks_i );
34   Rational length_mom () const ;
35   static int division_1_i_s;
36
37   /// Logarithm of the base duration.
38   int durlog_i_;
39   int dots_i_;
40   Plet plet_;
41   int ticks_i_;
42 };
43 #endif // DURATION_HH
44