]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/define-music-types.scm
*** empty log message ***
[lilypond.git] / scm / define-music-types.scm
index 4578a7a481c8ab2037fa79d301a7c3557e90b2bd..73ab524a2f762153e92aa0e922212be82e13d0b3 100644 (file)
@@ -2,7 +2,7 @@
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;; 
-;;;; (c)  1998--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;;; (c) 1998--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 ;;;;                Jan Nieuwenhuizen <janneke@gnu.org>
 
 ;; TODO: should link back into user manual.
@@ -198,7 +198,8 @@ Syntax: @var{note}\\cr
     (GraceMusic
      . (
        (description .  "Interpret the argument as grace notes. ")
-       (internal-class-name . "Grace_music")
+       (internal-class-name . "Music_wrapper")
+       (start-callback . ,Grace_music::start_callback)
        (length . ,(ly:make-moment 0 1))
        (iterator-ctor . ,Grace_iterator::constructor)
        (types . (grace-music music-wrapper-music general-music))
@@ -229,7 +230,7 @@ Syntax: @var{note}\\cr
 
 Syntax: @code{\\key } @var{name} @var{scale}.")
 
-       (internal-class-name . "Key_change_ev")
+       (internal-class-name . "Event")
        (types . (general-music key-change-event event))
        ))
     
@@ -246,11 +247,12 @@ Syntax: @code{\\key } @var{name} @var{scale}.")
      . (
        (description .  "Align lyrics to the start of notes.
 
+Syntax @var{\\oldaddlyrics }@var{music} @var{lyrics}.")
 
-Syntax @var{\\addlyrics }@var{music} @var{lyrics}.")
-
-       (internal-class-name . "Lyric_combine_music")
+       (internal-class-name . "Music")
        (types . (general-music lyric-combine-music))
+       (length-callback . ,Lyric_combine_music::length_callback)
+       (start-callback . ,Music_sequence::first_start_callback)
        (iterator-ctor . ,Lyric_combine_music_iterator::constructor)
        ))
     
@@ -258,8 +260,7 @@ Syntax @var{\\addlyrics }@var{music} @var{lyrics}.")
      . (
        (description .  "Align lyrics to the start of notes.
 
-
-Syntax @var{\\addlyrics }@var{music} @var{lyrics}.")
+Syntax @var{\\lyricsto }@var{voicename} @var{lyrics}.")
        (internal-class-name . "Music")
        (length . ,(ly:make-moment 0 1))
        (types . (general-music lyric-combine-music))
@@ -351,7 +352,9 @@ SYNTAX
      . (
        (description .  "Combine two parts on a staff, either merged or
 as separate voices.")
-       (internal-class-name . "Simultaneous_music")
+       (internal-class-name . "Music")
+       (length-callback . ,Music_sequence::maximum_length_callback)
+       (start-callback . ,Music_sequence::minimum_start_callback)
        (types . (general-music part-combine-music))
        (iterator-ctor . ,Part_combine_iterator::constructor)
        ))
@@ -368,15 +371,12 @@ Syntax NOTE \\(  and \\) NOTE")
      . (
        (description .  "Set a context property.
 
-
-
 Syntax: @code{\\property @var{context}.@var{prop} = @var{scheme-val}}.")
        (internal-class-name . "Music")
        (types . (layout-instruction general-music))
        (iterator-ctor . ,Property_iterator::constructor)
-       )
-     )
-    
+       ))
+
     (PropertyUnset
      . (
        (description .  "Remove the definition of a context @code{\\property}.")
@@ -384,8 +384,7 @@ Syntax: @code{\\property @var{context}.@var{prop} = @var{scheme-val}}.")
        (internal-class-name . "Music")
        (types . (layout-instruction general-music))
        (iterator-ctor . ,Property_unset_iterator::constructor)
-       )
-     )
+       ))
     
     (PesOrFlexaEvent
      . (
@@ -407,7 +406,8 @@ goes down).")
     
     (RelativeOctaveCheck
      . ((description . "Check if a pitch is in the correct octave.")
-       (internal-class-name . "Relative_octave_check")
+       (internal-class-name . "Music")
+       (to-relative-callback . ,Relative_octave_check::relative_callback)
        (types . (general-music relative-octave-check))
        ))
     
@@ -452,8 +452,9 @@ previously added property from a graphical object definition
 
 Syntax \\sequential @{..@} or simply @{..@} .")
 
-       (internal-class-name . "Sequential_music")
+       (internal-class-name . "Music")
        (length-callback . ,Music_sequence::cumulative_length_callback)
+       (start-callback . ,Music_sequence::first_start_callback)
        (iterator-ctor . ,Sequential_music_iterator::constructor)
        (types . (general-music sequential-music))
        ))
@@ -464,8 +465,9 @@ Syntax \\sequential @{..@} or simply @{..@} .")
 to group start-mmrest, skip, stop-mmrest sequence. 
 
 Syntax @code{R2.*5} for 5 measures in 3/4 time.")
-       (internal-class-name . "Sequential_music")
+       (internal-class-name . "Music")
        (length-callback . ,Music_sequence::cumulative_length_callback)
+       (start-callback . ,Music_sequence::first_start_callback)
        (iterator-ctor . ,Sequential_music_iterator::constructor)
        (types . (general-music sequential-music))
        ))
@@ -498,9 +500,11 @@ SYNTAX
 
 @code{ \\simultaneous @{ .. @}} or < .. >.")
 
-       (internal-class-name . "Simultaneous_music")
+       (internal-class-name . "Music")
        (iterator-ctor . ,Simultaneous_music_iterator::constructor)
+       (start-callback . ,Music_sequence::minimum_start_callback)
        (length-callback . ,Music_sequence::maximum_length_callback)
+       (to-relative-callback . ,Music_sequence::simultaneous_relative_callback)
        
        (types . (general-music simultaneous-music))
        ))
@@ -564,15 +568,17 @@ Syntax @code{\\times @var{fraction} @var{music}}, e.g.
     (TransposedMusic
      . (
        (description .  "Music that has been transposed.")
-       (internal-class-name . "Transposed_music")
+       (internal-class-name . "Music_wrapper")
+       (to-relative-callback . ,Relative_octave_music::no_relative_callback)
        (types . (music-wrapper-music general-music transposed-music))
        ))
 
     (UntransposableMusic
      . (
        (description .  "Music that can not be transposed.")
-
-       (internal-class-name . "Untransposable_music")
+       (to-relative-callback . ,Relative_octave_music::no_relative_callback)
+       (untransposable . #t)
+       (internal-class-name . "Music_wrapper")
        (types . (music-wrapper-music general-music untransposable-music)) 
        ))
 
@@ -580,27 +586,28 @@ Syntax @code{\\times @var{fraction} @var{music}}, e.g.
      . (
        (description .  "Music that can not be converted from relative to absolute notation.
 For example, transposed music.")
-       (internal-class-name . "Un_relativable_music")
+       (to-relative-callback . ,Relative_octave_music::no_relative_callback)
+       (internal-class-name . "Music_wrapper")
        (types . (music-wrapper-music general-music unrelativable-music))
        ))
 
     (RelativeOctaveMusic
      . (
        (description .  "Music that was entered in relative octave notation.")
-
-       (internal-class-name . "Relative_octave_music")
+       (to-relative-callback . ,Relative_octave_music::relative_callback)
+       (internal-class-name . "Music_wrapper")
        (types . (music-wrapper-music general-music relative-octave-music))
        ))
     
     (EventChord
      . (
        (description .  "Internally used to group a set of events.")
-       (internal-class-name . "Event_chord")
+       (internal-class-name . "Music")
        (iterator-ctor . ,Event_chord_iterator::constructor)
        (length-callback . ,Music_sequence::maximum_length_callback)
+       (to-relative-callback . ,Music_sequence::event_chord_relative_callback)
        (types . (general-music event-chord simultaneous-music))
-       )
-     )
+       ))
     
     (ScriptEvent
      . (
@@ -713,9 +720,9 @@ Syntax: @code{\\\\}")
     (VoltaRepeatedMusic
      . (
        (iterator-ctor . ,Volta_repeat_iterator::constructor)
-       (internal-class-name . "Repeated_music")
+       (internal-class-name . "Music")
        (description . "")
-       (start-moment-function .  ,Repeated_music::first_start)
+       (start-callback .  ,Repeated_music::first_start)
        (length-callback . ,Repeated_music::volta_music_length)
        (types . (general-music repeated-music volta-repeated-music))
        ))
@@ -724,17 +731,17 @@ Syntax: @code{\\\\}")
      . (
        (iterator-ctor . ,Unfolded_repeat_iterator::constructor)
        (description .  "")
-       (start-moment-function .  ,Repeated_music::first_start)
-       (internal-class-name . "Repeated_music")
+       (start-callback .  ,Repeated_music::first_start)
+       (internal-class-name . "Music")
        (types . (general-music repeated-music unfolded-repeated-music))
        (length-callback . ,Repeated_music::unfolded_music_length)
        ))
     (PercentRepeatedMusic
      . (
-       (internal-class-name . "Repeated_music")
+       (internal-class-name . "Music")
        (description .  "Repeats encoded by percents.")
        (iterator-ctor . ,Percent_repeat_iterator::constructor)
-       (start-moment-function .  ,Repeated_music::first_start)
+       (start-callback .  ,Repeated_music::first_start)
        (length-callback . ,Repeated_music::unfolded_music_length)
        (types . (general-music repeated-music percent-repeated-music))
        ))
@@ -743,8 +750,8 @@ Syntax: @code{\\\\}")
      . (
        (iterator-ctor . ,Chord_tremolo_iterator::constructor)
        (description .  "Repeated notes denoted by tremolo beams.")
-       (internal-class-name . "Repeated_music")
-       (start-moment-function .  ,Repeated_music::first_start)
+       (internal-class-name . "Music")
+       (start-callback .  ,Repeated_music::first_start)
 
        ;; the length of the repeat is handled by shifting the note logs
        (length-callback . ,Repeated_music::folded_music_length)
@@ -754,10 +761,10 @@ Syntax: @code{\\\\}")
     
     (FoldedRepeatedMusic
      . (
-       (internal-class-name . "Repeated_music")
+       (internal-class-name . "Music")
        (description .  "Repeats with alternatives placed in parallel. ")
        (iterator-ctor  . ,Folded_repeat_iterator::constructor)
-       (start-moment-function .  ,Repeated_music::minimum_start)
+       (start-callback .  ,Repeated_music::minimum_start)
        (length-callback . ,Repeated_music::folded_music_length)
        (types . (general-music repeated-music folded-repeated-music))
        ))