]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/include/music.hh (class Music): unvirtualize transpose().
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 14 Jan 2005 17:18:24 +0000 (17:18 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 14 Jan 2005 17:18:24 +0000 (17:18 +0000)
* lily/sequential-music.cc: remove file.

* 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/include/music.hh
lily/music.cc
lily/translator-group.cc
lily/untransposable-music.cc
scm/define-music-properties.scm
scm/define-music-types.scm

index 16536ccc2d01d153d665fadfdefc26024e35c101..edca9632e8088110da9957e05d6977a6cd29209f 100644 (file)
 
 #define is_mus_type(x) internal_is_music_type (ly_symbol2scm (x))
 
-/** Music is anything that has duration and supports both time compression and
-  transposition.
-  
-  In Lily, everything that can be thought to have a length and a pitch
- (which has a duration which can be transposed) is considered "music",
-
-  Music is hierarchical: 
-
-  @see Music_sequence
-
 
-  TODO: make a equalp function for general music. 
-  */
 class Music
 {
 public:
index 958eedc221bcb1092a3161709c5678b8c12fdf30..645b5d1846f7dea079e2ca827a6a258fe25cda8b 100644 (file)
 #include "score.hh"
 #include "warn.hh"
 
+/*
+  Music is anything that has duration and supports both time compression
+  and transposition.
+  
+  In Lily, everything that can be thought to have a length and a pitch
+ (which has a duration which can be transposed) is considered "music",
+*/
 bool
 Music::internal_is_music_type (SCM k) const
 {
index d9a6a609302c7698be152b09f8f7f0f4ffe76cb6..27f0d336f203831185afe02fac940daf2d31e48d 100644 (file)
@@ -108,7 +108,6 @@ recurse_over_translators (Context * c, Translator_method ptr, Direction dir)
   Translator_group * tg
     = dynamic_cast<Translator_group*> (c->implementation ());
 
-
   /*
     Top down: 
    */
@@ -120,7 +119,7 @@ recurse_over_translators (Context * c, Translator_method ptr, Direction dir)
       (tg->*ptr) ();
     }
 
-  for (SCM s = c->children_contexts () ; scm_is_pair (s);
+  for (SCM s = c->children_contexts (); scm_is_pair (s);
        s = scm_cdr (s))
     {
       recurse_over_translators (unsmob_context (scm_car (s)), ptr, dir);
@@ -129,7 +128,7 @@ recurse_over_translators (Context * c, Translator_method ptr, Direction dir)
   if (dir == UP)
     {
       translator_each (tg->get_simple_trans_list (),
-                    ptr);
+                      ptr);
 
       (tg->*ptr) ();
     }
index 02ef66debef553f4faac378692ba5630a474aa39..e791bde068df37b384c7ab3c9154a58aabd444a9 100644 (file)
@@ -9,16 +9,6 @@ source file of the GNU LilyPond music typesetter
 
 #include "untransposable-music.hh"
 
-/*
-  todo: This one, together with Un_relativable_music is ugh.
-
-  fixthis.
-*/
-void
-Untransposable_music::transpose (Pitch)
-{
-}
-
 Pitch
 Untransposable_music::to_relative_octave (Pitch p)
 {
index a441f45eb19df25ce40fa1090c3c6630ff6d7a1f..0dc59137654f56a91f4edf99f413e11a71d71959 100644 (file)
@@ -97,8 +97,6 @@ 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")
-     (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
@@ -116,5 +114,5 @@ a string) for figured bass")
      (bracket-start ,boolean? "start a bracket
 here. TODO: use span requests?")
      (bracket-stop ,boolean? "stop a bracket here.")
-
+     (untransposable ,boolean? "If set, this music is not transposed.")
      )))
index 5fac2678b56f433de9163a33cbc10867f67aef1c..96a4b37076e308ef090b0b764d4978ead9576ce2 100644 (file)
@@ -573,7 +573,7 @@ Syntax @code{\\times @var{fraction} @var{music}}, e.g.
     (UntransposableMusic
      . (
        (description .  "Music that can not be transposed.")
-
+       (untransposable . #t)
        (internal-class-name . "Untransposable_music")
        (types . (music-wrapper-music general-music untransposable-music)) 
        ))