]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/define-music-types.scm
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / scm / define-music-types.scm
index cd2629b8510bcf3329d9d9248d80bb0cf74f3007..69c654b019467e3c24515a3f663f75ddb01c3802 100644 (file)
@@ -2,29 +2,26 @@
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;; 
-;;;; (c)  1998--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;;; (c) 1998--2006 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 ;;;;                Jan Nieuwenhuizen <janneke@gnu.org>
 
-
 ;; TODO: should link back into user manual.
 
 (define-public music-descriptions
   `(
     (AbsoluteDynamicEvent
      . (
-   (description . "Creates a dynamic mark.
+       (description . "Creates a dynamic mark.
 
 Syntax: @var{note}@code{\\x},
 where x is one of \\ppp, \\pp, \\p, \\mp, \\mf, \\f, \\ff, \\fff.")
-       (internal-class-name . "Event")
        (types . (general-music event dynamic-event absolute-dynamic-event))
        ))
     (ApplyContext
      . (
        (description . "Call the argument with the current context during interpreting phase")
-       (internal-class-name . "Music")
        (types . (general-music apply-context))
-       (iterator-ctor . ,Apply_context_iterator::constructor)
+       (iterator-ctor . ,ly:apply-context-iterator::constructor)
        ))
     (ApplyOutputEvent
      . (
@@ -33,15 +30,13 @@ Call the argument with all current grobs during interpreting phase.
 
 Syntax
 
-\\applyoutput FUNC
+\\applyOutput #'Context FUNC
 
 arguments to func are 1. the grob, 2. the originating context,
 3. context where FUNC is called.
 
 ")
-       (internal-class-name . "Event")
-       (iterator-ctor . ,Output_property_music_iterator::constructor)
-       (types . (general-music layout-instruction))
+       (types . (general-music event layout-instruction))
        ))
     (ArpeggioEvent 
      . (
@@ -49,7 +44,6 @@ arguments to func are 1. the grob, 2. the originating context,
 
 Syntax:
 @var{note}-@code{\\arpeggio}")
-       (internal-class-name .  "Event")
        (types . (general-music arpeggio-event event))
        ))
 
@@ -57,7 +51,7 @@ Syntax:
     ;; separate non articulation scripts  
     (ArticulationEvent
      . (
-   (description .  "Adds an articulation marking to a note.  
+       (description .  "Adds an articulation marking to a note.  
 
 Syntax:
 @var{note}@code{X}@code{Y}, where X is a direction (up @code{^}, down
@@ -65,46 +59,41 @@ Syntax:
 is an articulation (such as @code{-.}, @code{->}, @code{\\tenuto},
 @code{\\downbow}).  See the user manual for details.")
 
-       (internal-class-name . "Event")
        (types . (general-music event articulation-event script-event))
        )) 
     (AutoChangeMusic
      . (
        (description .  "Used for making voices that switch between piano staves automatically.")
-
-       (internal-class-name . "Music_wrapper")
-       (iterator-ctor . ,Auto_change_iterator::constructor)
+       (iterator-ctor . ,ly:auto-change-iterator::constructor)
+       (start-callback . ,ly:music-wrapper::start-callback)
+       (length-callback . ,ly:music-wrapper::length-callback)
        (types . (general-music music-wrapper-music auto-change-instruction))
        ))
     (BarCheck
      . (
        (description .
                     "Check whether this music coincides with the start of the measure.")
-       (internal-class-name . "Music")
        (types . (general-music bar-check))
-       (iterator-ctor . ,Bar_check_iterator::constructor)
+       (iterator-ctor . ,ly:bar-check-iterator::constructor)
        ))
     (BassFigureEvent
      . (
        (description .  "Print a bass-figure text")
 
-       (internal-class-name . "Event")
        (types . (general-music event rhythmic-event bass-figure-event))
        ))
     (BeamEvent
      . (
-   (description .  "Starts or stops a beam.  
+       (description .  "Starts or stops a beam.  
 
 Syntax for manual control:
 c8-[ c c-] c8")
-       (internal-class-name . "Event")
        (types . (general-music event beam-event span-event))
        ))
     (BreakEvent
      . (
-   (description .  "Create a line break, Syntax: \\break or page break, Syntax: \\pagebreak.")
-
-       (internal-class-name . "Event")
+       (description .  "Create a line break, Syntax: \\break or page break, Syntax: \\pagebreak.")
+       
        (types . (general-music break-event event))
        ))
     (BreathingSignEvent
@@ -114,14 +103,12 @@ c8-[ c c-] c8")
 Syntax:
 @var{note}\\breathe.")
 
-       (internal-class-name . "Event")
        (types . (general-music event breathing-event))
        )) 
     (BusyPlayingEvent
      . (
        (description .  "Used internally to signal beginning and ending of notes.")
 
-       (internal-class-name . "Event")
        (types . (general-music event busy-playing-event))
        ))
     (ContextChange
@@ -129,25 +116,23 @@ Syntax:
        (description .  "Change staffs in Piano staff. 
 
 Syntax @code{\\translator Staff = @var{new-id}}.")
-       (internal-class-name . "Music")
-       (iterator-ctor . , Change_iterator::constructor)
+       (iterator-ctor . , ly:change-iterator::constructor)
        (types . (general-music translator-change-instruction))
        ))
 
     (ClusterNoteEvent
-     . (
-       (description .  "A note that is part of a cluster.")
-       (internal-class-name . "Event")
+     . ((description . "A note that is part of a cluster.")
 
-       ; not a note-event, to ensure that Note_engraver doesn't eat it. 
+       ;; not a note-event, to ensure that Note_engraver doesn't eat it. 
        (types . (general-music cluster-note-event melodic-event rhythmic-event event))
        ))
     
     (ContextSpeccedMusic
      . (
        (description .  "Interpret the argument music within a specific context.")
-       (iterator-ctor . ,Context_specced_music_iterator::constructor)
-       (internal-class-name . "Music_wrapper")
+       (iterator-ctor . ,ly:context-specced-music-iterator::constructor)
+       (length-callback . ,ly:music-wrapper::length-callback)
+       (start-callback . ,ly:music-wrapper::start-callback)
        (types . (context-specification general-music music-wrapper-music))
        ))
     
@@ -159,68 +144,70 @@ Syntax: @var{note}\\cr
 ... @var{note}\\rc (you can also use \\<, \\!, \\cresc, and
 \\endcresc.  See the user manual for details.).")
 
-       (internal-class-name . "Event")
        (types . (general-music dynamic-event crescendo-event event))
        )) 
     (DecrescendoEvent
      . (
        (description .  "See @ref{CrescendoEvent}.")
 
-       (internal-class-name . "Event")
        (types . (general-music dynamic-event decrescendo-event event))
        ))
+    
     (ExtenderEvent
      . (
        (description .  "Extend lyrics.")
 
-       (internal-class-name . "Event")
        (types . (general-music extender-event event))
        ))
+
+    
+    (EventChord
+     . (
+       (description .  "Internally used to group a set of events.")
+       (iterator-ctor . ,ly:event-chord-iterator::constructor)
+       (length-callback . ,ly:music-sequence::maximum-length-callback)
+       (to-relative-callback . ,ly:music-sequence::event-chord-relative-callback)
+       (types . (general-music event-chord simultaneous-music))
+       ))
+
     (FingerEvent
      . (
        (description . "Specify what finger to use for this note.")
-       (internal-class-name . "Event")
        (types . (general-music fingering-event event))
        ))
     (BeamForbidEvent
      . (
        (description . "Specify that a note may not auto-beamed ")
-       (internal-class-name . "Event")
        (types . (general-music event beam-forbid-event))
        ))
     (GlissandoEvent
      . (
        (description .  "Start  a glissando on this note.")
-       (internal-class-name . "Event")
        (types . (general-music glissando-event event))
        ))
     
     (GraceMusic
      . (
        (description .  "Interpret the argument as grace notes. ")
-
-       (internal-class-name . "Grace_music")
-       (iterator-ctor . ,Grace_iterator::constructor)
+       (start-callback . ,ly:grace-music::start-callback)
+       (length . ,ZERO-MOMENT)
+       (iterator-ctor . ,ly:grace-iterator::constructor)
        (types . (grace-music music-wrapper-music general-music))
        ))
     (NoteGroupingEvent
      . (
        (description . "Start or stop grouping brackets.")
-       (internal-class-name . "Event")
        (types . (general-music event note-grouping-event))
        ))
     (HarmonicEvent
      . (
        (description . "Mark a note as harmonic")
-       (internal-class-name . "Event")
        (types . (general-music event harmonic-event))
        ))
     (HyphenEvent
      . (
        (description .  "A hyphen between lyric syllables.")
 
-       (internal-class-name . "Event")
        (types . (general-music hyphen-event event))
        ))
     
@@ -229,42 +216,36 @@ Syntax: @var{note}\\cr
        (description .  "Change the key signature. 
 
 Syntax: @code{\\key } @var{name} @var{scale}.")
-
-       (internal-class-name . "Key_change_ev")
+       (to-relative-callback . ,(lambda (x p) p))
        (types . (general-music key-change-event event))
        ))
-    
+    (LaissezVibrerEvent
+     . ((description . "Don't damp this chord.
+
+Syntax: @var{note}\\laissezVibrer.")
+
+       (types . (general-music event laissez-vibrer-event))
+       ))
     (LigatureEvent
      . (
-       (description .  "(docme).")
-
-       (internal-class-name . "Event")
+       (description .  "Start or end a ligature.")
        (span-type . ligature)
        (types . (general-music span-event ligature-event event))
        ))
-    
-    (LyricCombineMusic
+    (LineBreakEvent
      . (
-       (description .  "Align lyrics to the start of notes.
-
-
-Syntax @var{\\addlyrics }@var{music} @var{lyrics}.")
-
-       (internal-class-name . "Lyric_combine_music")
-       (types . (general-music lyric-combine-music))
-       (iterator-ctor . ,Lyric_combine_music_iterator::constructor)
+       (description .  "Allow, forbid or force a line break.")
+       (types . (general-music break-event event))
        ))
     
-    (NewLyricCombineMusic
+    (LyricCombineMusic
      . (
        (description .  "Align lyrics to the start of notes.
 
-
-Syntax @var{\\addlyrics }@var{music} @var{lyrics}.")
-       (internal-class-name . "Music")
-       (length . ,(ly:make-moment 0 1))
+Syntax @var{\\lyricsto }@var{voicename} @var{lyrics}.")
+       (length . ,ZERO-MOMENT)
        (types . (general-music lyric-combine-music))
-       (iterator-ctor . ,New_lyric_combine_music_iterator::constructor)
+       (iterator-ctor . ,ly:lyric-combine-music-iterator::constructor)
        ))
 
     (LyricEvent
@@ -272,7 +253,6 @@ Syntax @var{\\addlyrics }@var{music} @var{lyrics}.")
        (description .  "A lyric syllable. Must be entered in lyrics mode, i.e.
 @code{\\lyrics @{ twinkle4 twinkle4 @} } .")
 
-       (internal-class-name . "Event")
        (types . (general-music rhythmic-event lyric-event event))
        ))
     (MarkEvent
@@ -282,23 +262,18 @@ Syntax @var{\\addlyrics }@var{music} @var{lyrics}.")
 Syntax: @code{\\mark} @var{marker},
 e.g. @code{\\mark \"A\"}.")
 
-       (internal-class-name . "Event")
        (types . (general-music mark-event event))
        ))
     (MelismaPlayingEvent
      . (
        (description .  "Used internally to signal melismas.")
-       (internal-class-name . "Event")
        (types . (general-music melisma-playing-event event))
        ))
     (ManualMelismaEvent
      . (
        (description .  "Start or stop a melisma.
 
-
-
-Syntax:@code{c4\\melisma d\\melismaEnd}.")
-       (internal-class-name . "Event")
+Syntax: @code{c4\\melisma d\\melismaEnd}.")
        (types . (general-music melisma-span-event event))
        ))
     
@@ -308,17 +283,27 @@ Syntax:@code{c4\\melisma d\\melismaEnd}.")
 
 Syntax
 @code{R2.*4} for 4 measures in 3/4 time. Note the capital R.")
-       (internal-class-name . "Event")
        (types . (general-music event rhythmic-event multi-measure-rest-event))
        ))
     
+    (MultiMeasureRestMusicGroup
+     . (
+       (description .  "Like sequential-music, but specifically intended
+to group start-mmrest, skip, stop-mmrest sequence. 
+
+Syntax @code{R2.*5} for 5 measures in 3/4 time.")
+       (length-callback . ,ly:music-sequence::cumulative-length-callback)
+       (start-callback . ,ly:music-sequence::first-start-callback)
+       (iterator-ctor . ,ly:sequential-music-iterator::constructor)
+       (types . (general-music sequential-music))
+       ))
+    
     (MultiMeasureTextEvent
      . (
        (description . "Texts on mm rests. 
 
 Syntax
 @code{R-\\markup @{ \\roman \"bla\" @}}. Note the explicit font switch.")
-       (internal-class-name . "Event")
        (types . (general-music event multi-measure-text-event))
        ))
 
@@ -326,14 +311,11 @@ Syntax
      . (
        (description .  "Generic type for music expressions.")
 
-       (internal-class-name . "Music")
        (types . (general-music)) 
        ))
     (NoteEvent
      . (
        (description .  "A note.")
-
-       (internal-class-name . "Event")
        (types . (general-music event note-event rhythmic-event melodic-event))
        ))
     
@@ -343,98 +325,98 @@ Syntax
 
 SYNTAX
 
-@code{\\propery Foo.Bar \\override} @var{SYMBOL} = @var{VALUE}
-
+@code{\\override [ @var{Ctxt} . ] @var{Obj} @var{prop} = @var{val}}
 ")
-
-       (internal-class-name . "Music")
        (types . (general-music layout-instruction))
-       (iterator-ctor . ,      Push_property_iterator::constructor)
+       (iterator-ctor . ,ly:push-property-iterator::constructor)
+       ))
+    (PageBreakEvent
+     . (
+       (description .  "Allow, forbid or force a page break.")
+       (types . (general-music break-event event))
+       ))
+    (PageTurnEvent
+     . (
+       (description .  "Allow, forbid or force a page turn.")
+       (types . (general-music break-event event))
        ))
     (PartCombineMusic
      . (
        (description .  "Combine two parts on a staff, either merged or
 as separate voices.")
-
-       (internal-class-name . "Simultaneous_music")
+       (length-callback . ,ly:music-sequence::maximum-length-callback)
+       (start-callback . ,ly:music-sequence::minimum-start-callback)
        (types . (general-music part-combine-music))
-       (iterator-ctor . ,Part_combine_iterator::constructor)
+       (iterator-ctor . ,ly:part-combine-iterator::constructor)
        ))
     (PhrasingSlurEvent
      . (
        (description . "Start or end phrasing slur. 
 
 Syntax NOTE \\(  and \\) NOTE")
-       (internal-class-name . "Event")
-       (types . (general-music span-event phrasing-slur-event))
+       (types . (general-music span-event event phrasing-slur-event))
        ))
     
     (PropertySet
      . (
        (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)
-       )
-     )
-    
+       (iterator-ctor . ,ly:property-iterator::constructor)
+       ))
+
     (PropertyUnset
      . (
        (description .  "Remove the definition of a context @code{\\property}.")
 
-       (internal-class-name . "Music")
        (types . (layout-instruction general-music))
-       (iterator-ctor . ,Property_unset_iterator::constructor)
-       )
-     )
-    
+       (iterator-ctor . ,ly:property-unset-iterator::constructor)
+       ))
+
+    (PercentEvent
+     . (
+       (description .  "Used internally to signal percent repeats.")
+       (types . (general-music event percent-event))
+       ))
+
     (PesOrFlexaEvent
      . (
        (description .  "Within a ligature, mark the previous and the
 following note to form a pes (if melody goes up) or a flexa (if melody
 goes down).")
 
-       (internal-class-name . "Event")
        (types . (general-music pes-or-flexa-event event))
        ))
 
     (QuoteMusic
      . (
        (description . "Quote preprocessed snippets of music. ")
-       (internal-class-name . "Event") ;;  so we get Event::get_length ().
-       (iterator-ctor . ,Quote_iterator::constructor)
-       (types . (general-music))
-       ))
-    (NewQuoteMusic
-     . (
-       (description . "Quote preprocessed snippets of music. ")
-       (internal-class-name . "Music_wrapper") ;;  so we get Event::get_length ().
-       (iterator-ctor . ,New_quote_iterator::constructor)
-       (types . (general-music))
+       (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
+       (length-callback . ,ly:music-wrapper::length-callback)
+       (start-callback . ,ly:music-wrapper::start-callback)
+       (types . (general-music music-wrapper-music))
        ))
     
     (RelativeOctaveCheck
      . ((description . "Check if a pitch is in the correct octave.")
-       (internal-class-name . "Relative_octave_check")
+       (to-relative-callback . ,ly:relative-octave-check::relative-callback)
        (types . (general-music relative-octave-check))
        ))
     
     (RepeatedMusic
      . (
        (description .  "Repeat music in different ways")
-       (type .  repeated-music)
        (types . (general-music repeated-music))
        ))
-    
+    (RepeatTieEvent
+     . (
+       (description . "Ties for starting a second volta bracket.")
+       (types . (general-music event repeat-tie-event))
+       ))
     (Event
      . (
        (description .  "Atomic music event.")
-
-       (internal-class-name . "Event")
        (types . (general-music event))
        ))
     
@@ -444,7 +426,6 @@ goes down).")
 
 Syntax @code{r4} for a quarter rest. ")
 
-       (internal-class-name . "Event")
        (types . (general-music event rhythmic-event rest-event))
        )) 
     (RevertProperty
@@ -453,9 +434,8 @@ Syntax @code{r4} for a quarter rest. ")
 previously added property from a graphical object definition
  ")
 
-       (internal-class-name . "Music")
        (types . (general-music layout-instruction))
-       (iterator-ctor . ,      Pop_property_iterator::constructor)
+       (iterator-ctor . ,      ly:pop-property-iterator::constructor)
        ))
 
     (SequentialMusic
@@ -464,39 +444,26 @@ previously added property from a graphical object definition
 
 Syntax \\sequential @{..@} or simply @{..@} .")
 
-       (internal-class-name . "Sequential_music")
-       (iterator-ctor . ,Sequential_music_iterator::constructor)
-       (types . (general-music sequential-music))
-       ))
-    
-    (MultiMeasureRestMusicGroup
-     . (
-       (description .  "Like sequential-music, but specifically intended
-to group start-mmrest, skip, stop-mmrest sequence. 
-
-Syntax @code{R2.*5} for 5 measures in 3/4 time.")
-       (internal-class-name . "Sequential_music")
-       (iterator-ctor . ,Sequential_music_iterator::constructor)
+       (length-callback . ,ly:music-sequence::cumulative-length-callback)
+       (start-callback . ,ly:music-sequence::first-start-callback)
+       (iterator-ctor . ,ly:sequential-music-iterator::constructor)
        (types . (general-music sequential-music))
        ))
 
     (SoloOneEvent
      . (
        (description . "Print Solo.1")
-       (internal-class-name . "Event")
        (part-combine-status . solo1)
        (types . (general-music event part-combine-event))
        ))
     (SoloTwoEvent
      . (
        (description . "Print Solo.2")
-       (internal-class-name . "Event")
        (part-combine-status . solo2)
        (types . (general-music event part-combine-event))
        ))
     (UnisonoEvent
      . ((description . "Print a2")
-       (internal-class-name .  "Event")
        (part-combine-status . unisono)
        (types . (general-music event part-combine-event))))
     
@@ -506,10 +473,12 @@ Syntax @code{R2.*5} for 5 measures in 3/4 time.")
 
 SYNTAX
 
-@code{ \\simultaneous @{ .. @}} or < .. >.")
+@code{ \\simultaneous @{ .. @}} or << .. >>.")
 
-       (internal-class-name . "Simultaneous_music")
-       (iterator-ctor . ,Simultaneous_music_iterator::constructor)
+       (iterator-ctor . ,ly:simultaneous-music-iterator::constructor)
+       (start-callback . ,ly:music-sequence::minimum-start-callback)
+       (length-callback . ,ly:music-sequence::maximum-length-callback)
+       (to-relative-callback . ,ly:music-sequence::simultaneous-relative-callback)
        
        (types . (general-music simultaneous-music))
        ))
@@ -518,46 +487,45 @@ SYNTAX
      . (
        (description . "Start or end slur. 
 
-Syntax NOTE(    and )NOTE")
-       (internal-class-name . "Event")
-       (types . (general-music span-event slur-event))
-       ))
+Syntax NOTE(    and NOTE) ")
 
+       (types . (general-music span-event event slur-event))
+       ))
+    
+    (StaffSpanEvent
+     . ((description . "Start or  stop a staff symbol.")
+       (types . (general-music event span-event staff-span-event))
+     ))
+    
     (StartPlayingEvent
      . (
        (description .  "Used internally to signal beginning of notes.")
 
-       (internal-class-name . "Event")
        (types . (general-music event start-playing-event))
        ))
     
-    (OutputPropertySetMusic
-     . (
-       (description .  "Set grob properties in objects
-individually. 
-
-Syntax @code{\\outputproperty @var{predicate} @var{prop}
-= @var{val}}.")
-
-       (internal-class-name . "Music")
-       (iterator-ctor . ,Output_property_music_iterator::constructor)
-       (types . (general-music layout-instruction))
-       ))
-    
     (TextSpanEvent
      . (
        (description . "Start a text spanner like 8va.....|")
-       (internal-class-name . "Event")
-       (types . (general-music span-event text-span-event))
+       (types . (general-music span-event event text-span-event))
        ))
     
     (TrillSpanEvent
      . (
        (description . "Start a trill spanner tr~~~")
-       (internal-class-name . "Event")
-       (types . (general-music span-event trill-span-event))
+       (types . (general-music span-event event trill-span-event))
        ))
     
+    (TransposedMusic
+     . (
+       (description .  "Music that has been transposed.")
+       (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
+       (start-callback . ,ly:music-wrapper::start-callback)
+       (length-callback . ,ly:music-wrapper::length-callback)
+       (to-relative-callback . ,ly:relative-octave-music::no-relative-callback)
+       (types . (music-wrapper-music general-music transposed-music))
+       ))
+
     (TimeScaledMusic
      . (
        (description .  "Multiply durations, as in tuplets. 
@@ -565,56 +533,41 @@ Syntax @code{\\outputproperty @var{predicate} @var{prop}
 Syntax @code{\\times @var{fraction} @var{music}}, e.g.
 @code{\\times 2/3 @{ ... @}} for triplets.
  ")
-       (internal-class-name . "Time_scaled_music")
-       (iterator-ctor . ,Time_scaled_music_iterator::constructor)
+       (length-callback . ,ly:music-wrapper::length-callback)
+       (start-callback . ,ly:music-wrapper::start-callback)
+       (iterator-ctor . ,ly:time-scaled-music-iterator::constructor)
        (types . (time-scaled-music music-wrapper-music general-music))
        ))
-    
-    (TransposedMusic
-     . (
-       (description .  "Music that has been transposed.")
-       (internal-class-name . "Transposed_music")
-       (types . (music-wrapper-music general-music transposed-music))
-       ))
 
-    (UntransposableMusic
+    (TupletEvent
      . (
-       (description .  "Music that can not be transposed.")
-
-       (internal-class-name . "Untransposable_music")
-       (types . (music-wrapper-music general-music untransposable-music)) 
-       ))
+       (description .  "Used internally to signal where tuplet brackets start and stop.")
+       (types . (tuplet-spanner-event span-event event general-music))
+       ))
 
     (UnrelativableMusic
      . (
        (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 . ,ly:relative-octave-music::no-relative-callback)
+       (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
+       (length-callback . ,ly:music-wrapper::length-callback)
        (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 . ,ly:relative-octave-music::relative-callback)
+       (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
+       (length-callback . ,ly:music-wrapper::length-callback)
+       (start-callback . ,ly:music-wrapper::start-callback)
        (types . (music-wrapper-music general-music relative-octave-music))
        ))
-    
-    (EventChord
-     . (
-       (description .  "Internally used to group a set of events.")
-       (internal-class-name . "Event_chord")
-       (iterator-ctor . ,Event_chord_iterator::constructor)
-       (types . (general-music event-chord simultaneous-music))
-       )
-     )
-    
     (ScriptEvent
      . (
        (description .  "Add an articulation mark to a note. ")
 
-       (internal-class-name . "Event")
        (types . (general-music event))
        ))
 
@@ -626,12 +579,11 @@ does not create staffs or voices implicitly.
 
 
 Syntax: @code{\\skip }@var{duration}.")
-       (internal-class-name . "Music")
-       (length . ,ly:music-duration-length)
-       (iterator-ctor . ,Simple_music_iterator::constructor)
+       (length-callback . ,ly:music-duration-length)
+       (iterator-ctor . ,ly:simple-music-iterator::constructor)
        (types . (general-music event rhythmic-event skip-event))
        ))
-     
+    
     (SkipEvent
      . (
        (description .  "Filler that takes up duration, but does not print anything.
@@ -640,36 +592,31 @@ Syntax: @code{\\skip }@var{duration}.")
 
 Syntax: @code{s}@var{duration}")
 
-       (internal-class-name . "Event")
        (types . (general-music event rhythmic-event skip-event))
        ))
     (SpanEvent
      . (
        (description .  "Event for anything that is started at a different time than stopped.")
 
-       (internal-class-name . "Event")
        (types . (general-music event))
        ))
     
     (SustainEvent
      . (
        (description . "Depress or release sustain pedal. ")
-       (internal-class-name . "Event")
-       (types . (general-music pedal-event sustain-pedal-event))
+       (types . (general-music event pedal-event sustain-pedal-event))
        ))
     
     (SostenutoEvent
      . (
        (description . "Depress or release sostenuto pedal. ")
-       (internal-class-name . "Event")
-       (types . (general-music pedal-event sostenuto-pedal-event))
+       (types . (general-music event pedal-event sostenuto-pedal-event))
        ))
     
     (UnaCordaEvent
      . (
        (description . "Depress or release una-corda pedal.")
-       (internal-class-name . "Event")
-       (types . (general-music pedal-event una-corda-pedal-event))
+       (types . (general-music event pedal-event una-corda-pedal-event))
        ))
     
     (StringNumberEvent
@@ -678,95 +625,90 @@ Syntax: @code{s}@var{duration}")
 
 Syntax: @code{\\@var{number}}.")
 
-       (internal-class-name . "Event")
        (types . (general-music string-number-event event))
        )) 
 
     (MetronomeChangeEvent
      . (
        (description .  "Change tempo setting (in beats per minute).")
-       (internal-class-name . "Event")
        (types . (general-music metronome-change-event tempo-event event))
        ))
     
     (TextScriptEvent
      . (
        (description .  "")
-       (internal-class-name . "Event")
        (types . (general-music script-event text-script-event event))
        )) 
     (TieEvent
      . (
        (description .  "A tie.  Entered as @var{note}-~.")
-       (internal-class-name . "Event")
        (types . (general-music tie-event event))
        ))
     (TremoloEvent
      . (
        (description . "Un measured tremolo.")
-       (internal-class-name . "Event")
        (types . (general-music event tremolo-event))
        ))
     
+    (TremoloSpanEvent
+     . (
+       (description . "Tremolo over two stems")
+       (types . (general-music event span-event tremolo-span-event))
+       ))
+
     (VoiceSeparator
      . (
        (description .  "Separate polyphonic voices in simultaneous music. 
 
 Syntax: @code{\\\\}")
 
-       (internal-class-name . "Music")
        (types . (separator general-music))
        ))
 
     (VoltaRepeatedMusic
      . (
-       (iterator-ctor . ,Volta_repeat_iterator::constructor)
-       (internal-class-name . "Repeated_music")
+       (iterator-ctor . ,ly:volta-repeat-iterator::constructor)
        (description . "")
-       (start-moment-function .  ,Repeated_music::first_start)
-       (length . ,Repeated_music::volta_music_length)
+       (start-callback .  ,ly:repeated-music::first-start)
+       (length-callback . ,ly:repeated-music::volta-music-length)
        (types . (general-music repeated-music volta-repeated-music))
        ))
     
     (UnfoldedRepeatedMusic
      . (
-       (iterator-ctor . ,Unfolded_repeat_iterator::constructor)
+       (iterator-ctor . ,ly:unfolded-repeat-iterator::constructor)
        (description .  "")
-       (start-moment-function .  ,Repeated_music::first_start)
-       (internal-class-name . "Repeated_music")
+       (start-callback .  ,ly:repeated-music::first-start)
        (types . (general-music repeated-music unfolded-repeated-music))
-       (length . ,Repeated_music::unfolded_music_length)
+       (length-callback . ,ly:repeated-music::unfolded-music-length)
        ))
     (PercentRepeatedMusic
      . (
-       (internal-class-name . "Repeated_music")
        (description .  "Repeats encoded by percents.")
-       (iterator-ctor . ,Percent_repeat_iterator::constructor)
-       (start-moment-function .  ,Repeated_music::first_start)
-       (length . ,Repeated_music::unfolded_music_length)
+       (iterator-ctor . ,ly:percent-repeat-iterator::constructor)
+       (start-callback .  ,ly:repeated-music::first-start)
+       (length-callback . ,ly:repeated-music::unfolded-music-length)
        (types . (general-music repeated-music percent-repeated-music))
        ))
     
     (TremoloRepeatedMusic
      . (
-       (iterator-ctor . ,Chord_tremolo_iterator::constructor)
+       (iterator-ctor . ,ly:chord-tremolo-iterator::constructor)
        (description .  "Repeated notes denoted by tremolo beams.")
-       (internal-class-name . "Repeated_music")
-       (start-moment-function .  ,Repeated_music::first_start)
+       (start-callback .  ,ly:repeated-music::first-start)
 
        ;; the length of the repeat is handled by shifting the note logs
-       (length . ,Repeated_music::folded_music_length)
+       (length-callback . ,ly:repeated-music::folded-music-length)
        (types . (general-music repeated-music tremolo-repeated-music))
        
        ))
     
     (FoldedRepeatedMusic
      . (
-       (internal-class-name . "Repeated_music")
        (description .  "Repeats with alternatives placed in parallel. ")
-       (iterator-ctor  . ,Folded_repeat_iterator::constructor)
-       (start-moment-function .  ,Repeated_music::minimum_start)
-       (length . ,Repeated_music::folded_music_length)
+       (iterator-ctor  . ,ly:folded-repeat-iterator::constructor)
+       (start-callback .  ,ly:repeated-music::minimum-start)
+       (length-callback . ,ly:repeated-music::folded-music-length)
        (types . (general-music repeated-music folded-repeated-music))
        ))
     ))
@@ -774,8 +716,7 @@ Syntax: @code{\\\\}")
 (set! music-descriptions
       (sort music-descriptions alist<?))
 
-(define music-name-to-property-table (make-vector 59 '()))
-
+(define-public music-name-to-property-table (make-vector 59 '()))
 
 ;; init hash table,
 ;; transport description to an object property.
@@ -785,16 +726,14 @@ Syntax: @code{\\\\}")
        (set-object-property! (car x)
                              'music-description
                              (cdr (assq 'description (cdr x))))
-       (let
-           ((l (cdr x)))
-         (set! l (assoc-set! l 'name (car x)))
-         (set! l (assq-remove!  l 'description))
-         (hashq-set! music-name-to-property-table (car x) l)
-         (cons (car x) l)
-         ))
+       (let ((lst (cdr x)))
+         (set! lst (assoc-set! lst 'name (car x)))
+         (set! lst (assq-remove! lst 'description))
+         (hashq-set! music-name-to-property-table (car x) lst)
+         (cons (car x) lst)))
       music-descriptions))
 
-(define-public (make-music name . music-properties)
+(define-safe-public (make-music name . music-properties)
   "Create a music object of given name, and set its properties
 according to `music-properties', a list of alterning property symbols
 and values. E.g:
@@ -803,11 +742,11 @@ and values. E.g:
              'grob-property 'thickness
              'grob-value (* 2 1.5))"
   (if (not (symbol? name))
-      (error (format "Not a symbol: ~a" name)))
+      (ly:error (_ "symbol expected: ~S") name))
   (let ((props (hashq-ref music-name-to-property-table name '())))
     (if (not (pair? props))
-       (error "Can not find music object" name))
-    (let ((m (ly:make-bare-music (cdr (assoc 'internal-class-name props)) props)))
+       (ly:error (_ "can't find music object: ~S") name))
+    (let ((m (ly:make-music props)))
       (define (set-props mus-props)
        (if (and (not (null? mus-props))
                 (not (null? (cdr mus-props))))
@@ -817,7 +756,6 @@ and values. E.g:
       (set-props music-properties)
       m)))
 
-
 (define-public (make-repeated-music name)
   (let* ((handle (assoc name '(("volta" . VoltaRepeatedMusic)
                               ("unfold" . UnfoldedRepeatedMusic)
@@ -827,7 +765,8 @@ and values. E.g:
         (music-name (if (pair? handle)
                         (cdr handle)
                         (begin
-                          (ly:warn "Unknown repeat type `~S'\nSee music-types.scm for supported repeats" name)
+                          (ly:warning (_ "unknown repeat type `~S'") name)
+                          (ly:warning (_ "See music-types.scm for supported repeats"))
                           'VoltaRepeatedMusic))))
     (make-music music-name)))