]> git.donarmstrong.com Git - lilypond.git/blob - lib/include/duration.hh
release: 0.1.11
[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   /**
29     Ctor of Duration. 
30     */
31   Duration();
32   /// is the "plet factor" of this note != 1 ?
33   bool plet_b();
34   String str() const;
35   void set_plet(int,int );
36   void set_plet(Duration );
37   static bool duration_type_b(int t);
38   void set_ticks( int ticks_i );
39   Moment length() const ;       // zo naai mij
40   static int division_1_i_s;
41
42   /// Logarithm of the base duration.
43   int durlog_i_;
44   int dots_i_;
45   Plet plet_;
46   int ticks_i_;
47 };
48 #endif // DURATION_HH
49