]> git.donarmstrong.com Git - lilypond.git/blobdiff - lib/include/duration.hh
release: 1.3.0
[lilypond.git] / lib / include / duration.hh
index c46fc5a7c0d7320ad4ef9834ec46e421e970e6fa..28580b63af32f93c5a0a56211c89a3b107700dbb 100644 (file)
@@ -1,9 +1,9 @@
 /*
-  duration.hh -- declare Duration Plet
-
+  duration.hh -- declare Duration
+  
   source file of the LilyPond music typesetter
 
-  (c) 1997 Jan Nieuwenhuizen <jan@digicash.com>
+  (c)  1997--1999 Jan Nieuwenhuizen <janneke@gnu.org>
 
 */
 
 #define DURATION_HH
 
 #include "fproto.hh"
-#include "moment.hh"
-
-// ugh, to get me in lily lib
-extern bool no_triplets_bo_g;
-
-/** 
-  The type and replacement value of a  plet (triplet, quintuplet.) Conceptually the same as a rational, but 4/6 != 2/3.
-  
-  (plet)
- */
-struct Plet {
-    Plet();
-    Moment mom()const;
-    bool unit_b()const;
-    int iso_i_;  // 2/3; 2 is not duration, maar of count!
-    int type_i_;
-};
+#include "rational.hh"
+#include "plet.hh"
 
 /**
-  Class to handle "musical" durations. This means: balltype 1,2,4,etc. and dots.
+   Handle "musical" durations. This means: balltype 1,2,4,etc. and dots.
    
   (dur)
   */
 struct Duration {
-    /**
-      Ctor of Duration. type_i should be a power of 2. 
-       */
-    Duration();
-    /// is the "plet factor" of this note != 1 ?
-    bool plet_b();
-    String str()const;
-    void set_plet(int,int );
-    void set_plet(Duration );
-    static bool duration_type_b(int t);
-    void set_ticks( int ticks_i );
-    Moment length() const ;    // zo naai mij
-    static int division_1_i_s;
-    int type_i_;
-    int dots_i_;
-    Plet plet_;
-    int ticks_i_;
+  Duration ();
+  /// is the "plet factor" of this note != 1 ?
+  bool plet_b ();
+  String str () const;
+  void set_plet (int,int );
+  void compress (Rational);
+
+  static bool duration_type_b (int t);
+  void set_ticks (int ticks_i );
+  Rational length_mom () const ;
+  static int division_1_i_s;
+
+  /// Logarithm of the base duration.
+  int durlog_i_;
+  int dots_i_;
+  Plet plet_;
+  int ticks_i_;
 };
 #endif // DURATION_HH