]> git.donarmstrong.com Git - lilypond.git/blobdiff - lib/duration.cc
release: 1.0.15
[lilypond.git] / lib / duration.cc
index eca46dd12bdb212c4c72176e0be4e24614127634..f65348ae6daa2a199124f5e49867bf42bf7ef337 100644 (file)
@@ -3,8 +3,8 @@
 
   source file of the LilyPond music typesetter
 
-  (c) 1997 Jan Nieuwenhuizen <jan@digicash.com>
-           Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Jan Nieuwenhuizen <janneke@gnu.org>
+           Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include <assert.h>
@@ -16,6 +16,7 @@
 #include "moment.hh"
 #include "duration.hh"
 #include "duration-convert.hh"
+#include "duration-iter.hh"
 
 // statics Duration
 int Duration::division_1_i_s = 384 * 4;
@@ -37,6 +38,13 @@ Duration::duration_type_b (int t)
   return t == Duration_convert::type2_i (Duration_convert::i2_type (t));
 }
 
+void
+Duration::compress (Moment m)
+{
+  plet_.iso_i_ *= m.num_i ();
+  plet_.type_i_ *= m.den_i (); 
+}
+
 // ugh, what's this?
 // i should be called "mom ()", ... or at least "length_mom ()"
 Moment
@@ -52,12 +60,14 @@ Duration::set_plet (int i, int t)
   plet_.type_i_ = t;
 }
 
+/*
 void
 Duration::set_plet (Duration d)
 {
   plet_.iso_i_ = d.plet_.iso_i_; 
   plet_.type_i_ = d.plet_.type_i_;
 }
+*/
 
 void
 Duration::set_ticks (int ticks_i)
@@ -79,3 +89,4 @@ Duration::plet_b ()
 {
   return !plet_.unit_b ();
 }
+