]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/sequential-music.cc: remove file.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 14 Jan 2005 14:51:41 +0000 (14:51 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 14 Jan 2005 14:51:41 +0000 (14:51 +0000)
* lily/include/music.hh (class Music): replace Music::start_mom()
by start-callback property

* lily/time-scaled-music.cc: remove file.

* lily/include/music.hh (class Music): include SCM init argument.
(class Music): replace Music::get_length() virtual by
length-callback property everywhere.

lily/event.cc
lily/include/music.hh
lily/lily-guile.cc
lily/music.cc
scm/define-music-properties.scm

index d25ec1a149d3387c209af058efb3ae08dc62ca56..d4beba4c13b3cdc6833800fc73960fabda15f1a0 100644 (file)
@@ -24,11 +24,6 @@ Event::length_callback (SCM m)
   return mom.smobbed_copy();
 }
 
-void
-Event::compress (Moment m)
-{
-}
-
 
 Pitch
 Event::to_relative_octave (Pitch last)
@@ -83,21 +78,4 @@ Key_change_ev::transpose (Pitch p)
   Event::transpose (p);
 }
 
-bool
-alist_equal_p (SCM a, SCM b)
-{
-  for (SCM s = a;
-       scm_is_pair (s); s = scm_cdr (s))
-    {
-      SCM key = scm_caar (s);
-      SCM val = scm_cdar (s);
-      SCM l = scm_assoc (key, b);
-
-      if (l == SCM_BOOL_F
-         || !ly_c_equal_p ( scm_cdr (l), val))
-
-       return false;
-    }
-  return true;
-}
 ADD_MUSIC (Key_change_ev);
index b0ddf77f3ff3fd4d803409c095a9cc140d8f1851..664b8be6b4bbf8067de6fd236ba74da760f2756e 100644 (file)
@@ -49,6 +49,7 @@ public:
   Moment get_length () const;
   Moment start_mom () const;
   void print () const;
+
   /// Transpose, with the interval central C to #p#
   virtual void transpose (Pitch p);
 
index 3b21744973b60f5943d6b0794cecb69b451cb834..5c3c3a134e70d4eee60b89d9ba7e3cd4ef445136 100644 (file)
@@ -703,3 +703,22 @@ alist_to_hashq (SCM alist)
     }
   return tab; 
 }
+
+
+bool
+alist_equal_p (SCM a, SCM b)
+{
+  for (SCM s = a;
+       scm_is_pair (s); s = scm_cdr (s))
+    {
+      SCM key = scm_caar (s);
+      SCM val = scm_cdar (s);
+      SCM l = scm_assoc (key, b);
+
+      if (l == SCM_BOOL_F
+         || !ly_c_equal_p ( scm_cdr (l), val))
+
+       return false;
+    }
+  return true;
+}
index ea8e3d8d19e5c732f5716545c6a64c01e36db7ca..4ebfc6a13ccac6ecc30aae58e86dfcc7330747df 100644 (file)
@@ -173,7 +173,7 @@ Music::compress (Moment factor)
   compress_music_list (get_property ("elements"), factor);
   Duration *d =  unsmob_duration (get_property ("duration"));
   if (d)
-    set_property ("duration", d ->compressed (m.main_part_).smobbed_copy ());
+    set_property ("duration", d ->compressed (factor.main_part_).smobbed_copy ());
 }
 
 void
index 8b730ef2ab92ff87dfc834917470ce83b1364deb..a441f45eb19df25ce40fa1090c3c6630ff6d7a1f 100644 (file)
@@ -48,11 +48,8 @@ descend in the context tree.")
      (digit ,integer? "digit for fingering")
      (direction ,ly:dir? "Print this up or down?")
      (drum-type ,symbol? "Which percussion instrument to play this note on.")
-
      (tags ,list? "List of symbols that for denoting extra details,
 e.g. @code{\\tag #'part ...} could tag a piece of music as only being active in a part.")
-
-
      (text-type ,symbol? "Particular type of text script (e.g. finger, dynamic).")
      (tempo-unit ,ly:duration? "The unit for the metronome count.")
      (tonic ,ly:pitch? "Base of the scale")
@@ -91,10 +88,7 @@ For chord inversions, this is negative.")
      (quoted-context-type ,symbol? "The name of the context to direct quotes to, eg., @code{Voice}.")
      (quoted-context-id ,string? "The id of the context to direct quotes to, eg., @code{cue}.")
 
-     (type ,symbol? "The type of this music object. Determines iteration in some cases.")
-     (types ,list? "The types of this music
-object; determines by what engraver this music expression is
-processed.")
+     (to-relative-callback ,procedure? "How to transform a piece of music to relative pitches")
      (repeat-count  ,integer? "do a @code{\repeat} how ofen?")
      (span-direction ,ly:dir? "Does this start or stop a spanner?")
      (split-list ,list? "splitting moments for part combiner.")
@@ -103,8 +97,12 @@ starting grace notes.")
      (string-number ,integer? "The number of the string in a String_number_req")
      (symbol ,symbol? "Grob name to perform an override/revert on.")
      (text ,markup? "markup expression to be printed")
-     ;; markup?
+     (transpose-callback ,procedure? "How to transpose a piece of
+music")
      (tremolo-type ,integer? "")
+     (type ,symbol? "The type of this music object. Determines iteration in some cases.")
+     (types ,list? "The types of this music object; determines by what
+engraver this music expression is processed.")
      (value ,scheme? "Assignment value for a
 translation property")
      (what ,symbol? "What to change for auto-change. FIXME, naming")