]> git.donarmstrong.com Git - lilypond.git/blob - lib/include/duration.hh
69eaf8dcaf769e867573a5e4b215cbdc19111c67
[lilypond.git] / lib / include / duration.hh
1 /*
2   duration.hh -- declare Duration Plet
3
4   source file of the LilyPond music typesetter
5
6   (c) 1997 Jan Nieuwenhuizen <jan@digicash.com>
7
8 */
9
10 // split into 4?
11
12 #ifndef DURATION_HH
13 #define DURATION_HH
14
15 #include "fproto.hh"
16 #include "moment.hh"
17 #include "plet.hh"
18 // ugh, to get me in lily lib
19 extern bool no_triplets_bo_g;
20
21
22 /**
23   Class to handle "musical" durations. This means: balltype 1,2,4,etc. and dots.
24    
25   (dur)
26   */
27 struct Duration {
28   Duration ();
29   /// is the "plet factor" of this note != 1 ?
30   bool plet_b ();
31   String str () const;
32   void set_plet (int,int );
33   void set_plet (Duration );
34   static bool duration_type_b (int t);
35   void set_ticks (int ticks_i );
36   Moment length () const ;      // zo naai mij
37   static int division_1_i_s;
38
39   /// Logarithm of the base duration.
40   int durlog_i_;
41   int dots_i_;
42   Plet plet_;
43   int ticks_i_;
44 };
45 #endif // DURATION_HH
46