]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/lily-guile.cc (alist_to_hashq): new function
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 5 Feb 2004 00:02:49 +0000 (00:02 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 5 Feb 2004 00:02:49 +0000 (00:02 +0000)
* scm/lily.scm (alist->hash-table): new function.

* Documentation/user/refman.itely (Percussion staves): update doco.

* input/regression/drums.ly (timb): updates

* lily/note-performer.cc (create_audio_elements): robustness fix.

* ly/engraver-init.ly: add DrumStaff and DrumVoice contexts

* lily/drum-note-engraver.cc: new file.

* ly/drumpitch-init.ly: move drum definitions

* scm/drums.scm: remove file.

* lily/*.cc: remove abort-event everywhere.

* lily/note-heads-engraver.cc (process_music): robustification.

* lily/accidental-engraver.cc (process_acknowledged_grobs): robustification.

* lily/parser.yy (simple_element): add \drums mode.
(simple_element): remove \pitchnames , \chordmodifiers. Use
variables to store this.

* lily/lexer.ll (My_lily_lexer): remove support for \PITCHNAME
outside \notes.

54 files changed:
ChangeLog
Documentation/topdocs/NEWS.texi
Documentation/user/refman.itely
VERSION
input/regression/drums.ly
lily/accidental-engraver.cc
lily/beam-engraver.cc
lily/cluster-engraver.cc
lily/coherent-ligature-engraver.cc
lily/drum-note-engraver.cc [new file with mode: 0644]
lily/dynamic-engraver.cc
lily/gregorian-ligature-engraver.cc
lily/include/lily-guile.hh
lily/include/my-lily-lexer.hh
lily/include/script.hh
lily/lexer.ll
lily/ligature-bracket-engraver.cc
lily/ligature-engraver.cc
lily/lily-guile.cc
lily/lyric-extender.cc
lily/mensural-ligature-engraver.cc
lily/my-lily-lexer.cc
lily/new-fingering-engraver.cc
lily/note-heads-engraver.cc
lily/note-performer.cc
lily/parser.yy
lily/phrasing-slur-engraver.cc
lily/piano-pedal-engraver.cc
lily/script-engraver.cc
lily/slur-engraver.cc
lily/text-spanner-engraver.cc
lily/vaticana-ligature-engraver.cc
ly/catalan.ly
ly/chord-modifiers-init.ly
ly/declarations-init.ly
ly/deutsch.ly
ly/drumpitch-init.ly
ly/english.ly
ly/engraver-init.ly
ly/espanol.ly
ly/init.ly
ly/italiano.ly
ly/nederlands.ly
ly/norsk.ly
ly/suomi.ly
ly/svenska.ly
mf/feta-bolletjes.mf
scm/define-music-properties.scm
scm/define-music-types.scm
scm/define-translator-properties.scm
scm/document-music.scm
scm/drums.scm [deleted file]
scm/lily.scm
scripts/convert-ly.py

index b4876dcbc044522527fead7a848c1bcbaa5083ad..62a9524764e47f097ce12259ccac51a5ade87409 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2004-02-05  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+
+       * lily/lily-guile.cc (alist_to_hashq): new function
+
+       * scm/lily.scm (alist->hash-table): new function.
+
+       * Documentation/user/refman.itely (Percussion staves): update doco.
+
+       * input/regression/drums.ly (timb): updates
+
+       * lily/note-performer.cc (create_audio_elements): robustness fix.
+
+       * ly/engraver-init.ly: add DrumStaff and DrumVoice contexts
+
 2004-02-05  Jan Nieuwenhuizen  <janneke@gnua.org>
 
        * scripts/filter-lilypond-book.py (find_toplevel_snippets): Do not
@@ -5,6 +19,25 @@
 
 2004-02-04  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/drum-note-engraver.cc: new file.
+
+       * ly/drumpitch-init.ly: move drum definitions
+
+       * scm/drums.scm: remove file.
+
+       * lily/*.cc: remove abort-event everywhere.
+
+       * lily/note-heads-engraver.cc (process_music): robustification.
+
+       * lily/accidental-engraver.cc (process_acknowledged_grobs): robustification.
+
+       * lily/parser.yy (simple_element): add \drums mode.
+       (simple_element): remove \pitchnames , \chordmodifiers. Use
+       variables to store this. 
+
+       * lily/lexer.ll (My_lily_lexer): remove support for \PITCHNAME
+       outside \notes.
+
        * VERSION: release 2.1.18.
        
        * input/test: remove octave-duplicate.ly
index 41916e01df6532f0014a9470306014a421755806..254494e6ef2848253b6687e146bd085e1078312d 100644 (file)
@@ -18,8 +18,19 @@ Version 2.1.13
 
 @itemize @bullet
 
+@item Drum notation is now supported  natively:
+percussion may be entered in @code{\drums} mode, and printed in a
+@code{DrumStaff} context:
+
+@example
+  \score @{
+    \drums \new DrumStaff @{ hihat4 cowbell8 @}
+  @}
+@end example
+
+
 @item The automatic staff changer was internally rewritten. As a
-result, the syntax  has been simplified as well:
+result, the syntax has been simplified as well:
 
 @example
   \autochange @var{the music}
index 7178017d4501cf78fb6ce0d36b180273fef4ebf8..0d5fa6950cff30fd15f64fce606d3ae17399705f 100644 (file)
@@ -2780,68 +2780,57 @@ of percussion.
 
 @syntax
 
-Percussion staves are typeset with help of a set of Scheme
-functions. The system is based on the general MIDI drum-pitches.
-Include @file{drumpitch-init.ly} to use drum pitches. This file
-defines the pitches from the Scheme variable @code{drum-pitch-names},
-the definition of which can be read in @file{scm/drums.scm}.  Each
-piece of percussion has a full name and an abbreviated name, and either
-the full name or the abbreviation may be used in input files.
-
-To typeset the music on a staff apply the function @code{drums->paper}
-to the percussion music. This function takes a list of percussion
-instrument names, notehead scripts and staff positions (i.e.
-pitches relative to the C-clef) and transforms the input
-music by moving the pitch, changing the notehead and (optionally)
-adding a script:
+Percussion notes may be entered in @code{\drums} mode, which is
+similar to @code{notes}.  Each piece of percussion has a full name and
+an abbreviated name, and both be used in input files:
+
+@lilypond[singleline]
+ \drums { hihat4 hh4 }
+@end lilypond
+
+To typeset the music, the notes must be interpreted in a
+@internalsref{DrumStaff} and @internalsref{DrumVoice} contexts:
+
 @c
 @lilypond[singleline,verbatim,quote]
-\include "drumpitch-init.ly"
-up = \notes { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
-down = \notes { bassdrum4 snare8 bd r bd sn4 }
+up = \drums { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
+down = \drums { bassdrum4 snare8 bd r bd sn4 }
 \score {
-    \apply #(drums->paper 'drums) \context Staff <<
-        \clef percussion
-        \new Voice { \voiceOne \up }
-        \new Voice { \voiceTwo \down }
-    >>
-}
-
+    \new DrumStaff
+        << \new DrumVoice { \voiceOne \up } 
+           \new DrumVoice { \voiceTwo \down } 
+>> }
 @end lilypond
-In the above example the music was transformed using the list @code{'drums}.
-The following lists are defined in @file{scm/drums.scm}:
+
+There are also other layout possibilities. To use these, set the
+property @code{drumStyleTable} in context @internalsref{DrumVoice}.
+The following variables have been predefined:
+
 @table @code
-@item 'drums
-to typeset a typical drum kit on a five-line staff:
+@item drums-style
+is the default. It typesets a typical drum kit on a five-line staff
 
 @lilypond[noindent]
-\include "drumpitch-init.ly"
 nam = \lyrics { cymc cyms cymr hh hhc hho hhho hhp cb hc
     bd sn ss tomh tommh tomml toml tomfh tomfl }
-mus = \notes  { cymc cyms cymr hh hhc hho hhho hhp cb hc
+mus = \drums  { cymc cyms cymr hh | hhc hho hhho hhp | \break cb hc
     bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
 \score {
-    <<
-        \apply #(drums->paper 'drums) \context Staff <<
-            \clef percussion
-            \mus
-        >>
-        \context Lyrics \nam 
-    >>
-    \paper {
-        linewidth = 100.0\mm
-        \translator {
-            \StaffContext
+    << \new DrumStaff\with {
             \remove Bar_engraver
             \remove Time_signature_engraver
+            Stem \set #'transparent =  ##t
+            Stem \set #'Y-extent-callback =  ##f
             minimumVerticalExtent = #'(-4.0 . 5.0)
-        }
-        \translator {
-            \VoiceContext
-            \remove Stem_engraver
-        }
-   }   
-}
+    } \mus
+        \context Lyrics \nam 
+    >>
+    \paper {
+    %% need to do this, because of indented @itemize
+    linewidth= 9 \cm 
+    \translator { \ScoreContext
+    BarNumber \set #'transparent =##T
+}}}
 @end lilypond
 
 The drum scheme supports six different toms.  When there fewer toms, simply
@@ -2849,129 +2838,92 @@ select the toms that produce the desired result, i.e. to get toms on
 the three middle lines you use @code{tommh}, @code{tomml} and
 @code{tomfh}.
 
-Because general MIDI does not contain rimshots the sidestick is used
-for this purpose instead.
-@item 'timbales
+@item timbales-style
 to typeset timbales on a two line staff:
 
 @lilypond[singleline]
-\include "drumpitch-init.ly"
 nam = \lyrics { timh ssh timl ssl cb }
-mus = \notes  { timh ssh timl ssl cb s16 }
+mus = \drums  { timh ssh timl ssl cb s16 }
 \score {
     <<
-        \apply #(drums->paper 'timbales) \context Staff <<
-            \clef percussion
-            \mus
-        >>
-        \context Lyrics \nam 
-    >>
-    \paper {
-        \translator {
-            \StaffContext
+        \context DrumStaff \with {
             \remove Bar_engraver
             \remove Time_signature_engraver
+            Stem \set #'transparent =  ##t
+            Stem \set #'Y-extent-callback =  ##f
             StaffSymbol \override #'line-count = #2
             StaffSymbol \override #'staff-space = #2
             minimumVerticalExtent = #'(-3.0 . 4.0)
-        }
-        \translator {
-            \VoiceContext
-            \remove Stem_engraver
-        }
-
-    }   
+            drumStyleTable = #timbales-style
+        } \mus
+        \context Lyrics \nam 
+    >>
 }
 @end lilypond
-@item 'congas
+@item congas-style
 to typeset congas on a two line staff:
 
 @lilypond[singleline]
-\include "drumpitch-init.ly"
 nam = \lyrics { cgh cgho cghm ssh cgl cglo cglm ssl }
-mus = \notes  { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
+mus = \drums  { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
 \score {
     <<
-        \apply #(drums->paper 'congas) \context Staff <<
-            \clef percussion
-            \mus
-        >>
-        \context Lyrics \nam 
-    >>
-    \paper {
-        \translator {
-            \StaffContext
+        \context DrumStaff\with {
             \remove Bar_engraver
             \remove Time_signature_engraver
+            drumStyleTable = #congas-style
             StaffSymbol \override #'line-count = #2
+            
+            %% this sucks; it will lengthen stems.
             StaffSymbol \override #'staff-space = #2
-            minimumVerticalExtent = #'(-3.0 . 4.0)
-        }
-        \translator {
-            \VoiceContext
-            \remove Stem_engraver
-        }
-    }   
+            Stem \set #'transparent =  ##t
+            Stem \set #'Y-extent-callback =  ##f
+        } \mus
+        \context Lyrics \nam 
+    >>
 }
 @end lilypond
-@item 'bongos
+@item bongos-style
 to typeset bongos on a two line staff:
 
 @lilypond[singleline]
-\include "drumpitch-init.ly"
 nam = \lyrics { boh boho bohm ssh bol bolo bolm ssl }
-mus = \notes  { boh boho bohm ssh bol bolo bolm ssl s16 }
+mus = \drums  { boh boho bohm ssh bol bolo bolm ssl s16 }
 \score {
     <<
-        \apply #(drums->paper 'bongos) \context Staff <<
-            \clef percussion
-            \mus
-        >>
-        \context Lyrics \nam 
-    >>
-    \paper {
-        \translator {
-            \StaffContext
+        \context DrumStaff\with {
             \remove Bar_engraver
             \remove Time_signature_engraver
             StaffSymbol \override #'line-count = #2
+            drumStyleTable = #bongos-style
+           
+            %% this sucks; it will lengthen stems.
             StaffSymbol \override #'staff-space = #2
-            minimumVerticalExtent = #'(-3.0 . 4.0)
-        }
-        \translator {
-            \VoiceContext
-            \remove Stem_engraver
-        }
-    }   
+            Stem \set #'transparent =  ##t
+            Stem \set #'Y-extent-callback =  ##f
+        } \mus
+        \context Lyrics \nam 
+    >>
 }
 @end lilypond
-@item 'percussion
+
+@item percussion-style
 to typeset all kinds of simple percussion on one line staves:
 @lilypond[singleline]
-\include "drumpitch-init.ly"
 nam = \lyrics { tri trio trim gui guis guil cb cl tamb cab mar hc }
-mus = \notes  { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
+mus = \drums  { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
 \score {
     <<
-        \apply #(drums->paper 'percussion) \context Staff <<
-            \clef percussion
-            \mus
-        >>
-        \context Lyrics \nam 
-    >>
-    \paper {
-        \translator {
-            \StaffContext
+        \context DrumStaff\with{
             \remove Bar_engraver
-            \remove Time_signature_engraver
+            drumStyleTable = #percussion-style
             StaffSymbol \override #'line-count = #1
-            minimumVerticalExtent = #'(-2.0 . 3.0)
-        }
-        \translator {
-            \VoiceContext
-            \remove Stem_engraver
-        }
-    }   
+            \remove Time_signature_engraver
+            Stem \set #'transparent =  ##t
+            Stem \set #'Y-extent-callback =  ##f
+        } \mus
+        \context LyricsVoice \nam 
+    >>
 }
 @end lilypond
 @end table
@@ -2980,61 +2932,42 @@ If you do not like any of the predefined lists you can define your own
 list at the top of your file:
 
 @lilypond[singleline, verbatim]
-#(set-drum-kit 'mydrums `(
-        (bassdrum     default   #f        ,(ly:make-pitch -1 2 0))
-        (snare        default   #f        ,(ly:make-pitch 0 1 0))
-        (hihat        cross     #f        ,(ly:make-pitch 0 5 0))
-        (pedalhihat   xcircle   "stopped" ,(ly:make-pitch 0 5 0))
-        (lowtom              diamond   #f        ,(ly:make-pitch -1 6 0))
+#(define mydrums '(
+        (bassdrum     default   #f        -1)
+        (snare        default   #f        0)
+        (hihat        cross     #f        1)
+        (pedalhihat   xcircle   "stopped" 2)
+        (lowtom              diamond   #f       3)
 ))
-\include "drumpitch-init.ly"
-up = \notes { hh8 hh hh hh hhp4 hhp }
-down = \notes { bd4 sn bd toml8 toml }
-\score {    
-    \apply #(drums->paper 'mydrums) \context Staff <<
-        \clef percussion
-        \new Voice { \voiceOne \up }
-        \new Voice { \voiceTwo \down }
+up = \drums { hh8 hh hh hh hhp4 hhp }
+down = \drums { bd4 sn bd toml8 toml }
+\score {
+    \new DrumStaff <<
+        \property DrumStaff.drumStyleTable
+           = #(alist->hash-table mydrums)
+        \new DrumVoice { \voiceOne \up }
+        \new DrumVoice { \voiceTwo \down }
     >>
 }
 @end lilypond
 
-To use a modified existing list, one can prepend modifications to the
-the existing list:
 
-@example
-#(set-drum-kit 'mydrums (append `(
-   (bassdrum default #f ,(ly:make-pitch -1 2 0))
-   (lowtom   diamond #f ,(ly:make-pitch -1 6 0))
-) (get-drum-kit 'drums)))
-@end example
+@seealso
+
+Init files: @file{ly/drumpitch-init.ly}
+
+@refbugs
+
+Short polyphonic notation, @code{<< @dots{} \\ @dots{} >>}, does not
+work for @internalsref{DrumVoices}.
+
 
-You can easily combine percussion notation with pitched notation.
-Indeed, the file @file{drumpitch-init.ly} replaces the normal pitch
-names, so you will have to reinclude @file{nederlands.ly} after the
-drum-pattern-definitions to enter normal notes:
-@c
-@lilypond[singleline,verbatim]
-\include "drumpitch-init.ly"
-up = \notes { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
-down = \notes { bassdrum4 snare8 bd r bd sn4 }
-\include "nederlands.ly"
-bass = \notes \transpose c c,, { a4. e8 r e g e }
-\score {
-    <<
-        \apply #(drums->paper 'drums) \new Staff <<
-            \clef percussion
-            \new Voice { \voiceOne \up }
-            \new Voice { \voiceTwo \down }
-        >>
-        \new Staff { \clef "F_8" \bass }
-    >>
-}
-@end lilypond
 
 @node Percussion MIDI output
 @subsection Percussion MIDI output
 
+@ignore
+
 In order to produce correct MIDI output you need to produce two score
 blocks---one for the paper and one for the MIDI output.  To use the
 percussion channel you set the property @code{instrument} to
@@ -3060,12 +2993,15 @@ none of the scheme functions to get the correct MIDI output:
 @}
 @end example
 
-@refbugs
+Because general MIDI does not contain rimshots the sidestick is used
+for this purpose instead.
 
 
-Chords entered with @code{< @dots{} >} do not work.  This scheme is a
-temporary implementation.
+@end ignore
+
+@refbugs
 
+MIDI output for drums is temporarily broken.
 
 @node Piano music
 @section Piano music
diff --git a/VERSION b/VERSION
index 1c463fd07a873a52e8db29e2950c27c4d5770fab..135f37eea51d8a099cd778d1e412623faa78d7d4 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=1
-PATCH_LEVEL=18
+PATCH_LEVEL=19
 MY_PATCH_LEVEL=
 
index 95ba4501af79871db52d7e53c4212ffd2b2ad666..8d1785b43e92a3ce5c71a57bdd008df4f02cd5fb 100644 (file)
@@ -1,64 +1,36 @@
-% tests drum notation and midi-drums.
-% see ly/drumpitch-init.ly for list of instruments and paper-kits.
-%     scm/midi.scm for list of midi-drumkits.
 
 \header {
-texidoc = "Drum notation, although kludgy, should work."
+   texidoc = "Test drum notation."
 }
 
-\include "drumpitch-init.ly"
 
-\version "2.1.7"
-
-drh = \notes { cymc4.^"crash" hhc16^"h.h." hh \repeat "unfold" 5 {hhc8 hho hhc8 hh16 hh} hhc4 r4 r2 }
-drl = \notes {\repeat "unfold" 3 {bd4 sn8 bd bd4 << bd ss >> } bd8 tommh tommh bd toml toml bd tomfh16 tomfh }
-timb = \notes \repeat "unfold" 2 {timh4 ssh timl8 ssh r timh r4 ssh8 timl r4 cb8 cb}
-
-\score { \repeat "volta" 2
- <<
-  \context TwoLineStaff=timbst \notes <<
-    \property Staff.instrument="timbales"
-    \clef "percussion"
-    \apply #(drums->paper 'timbales) \timb
-  >>
-  \context Staff=drumst \notes <<
-    \property Staff.instrument="drums"
-    \clef "percussion"
-    \apply #(drums->paper 'drums) <<
-      \context Voice=voa {\stemUp \drh }
-      \context Voice=vob {\stemDown \drl }
+\version "2.1.19"
+
+drh = \drums { cymc4.^"crash" hhc16^"h.h." hh \repeat "unfold" 5 {hhc8 hho hhc8 hh16 hh} hhc4 r4 r2 }
+drl = \drums {\repeat "unfold" 3 {bd4 sn8 bd bd4 << bd ss >> } bd8 tommh tommh bd toml toml bd tomfh16 tomfh }
+timb = \drums \repeat "unfold" 2 {timh4 ssh timl8 ssh r timh r4 ssh8 timl r4 cb8 cb}
+
+\score {
+    \repeat "volta" 2
+    <<
+       \new DrumStaff \with {
+           drumStyleTable = #timbales-style
+           StaffSymbol \override #'line-count = #2
+           BarLine \override #'bar-size = #2
+       } <<
+           \property Staff.instrument="timbales"
+           \timb
+       >>
+       \new DrumStaff <<
+           \property Staff.instrument="drums"
+           \new DrumVoice {\stemUp \drh }
+           \new DrumVoice {\stemDown \drl }
+       >>
     >>
-  >>
- >>
- \paper {
-   \translator {
-      \StaffContext
-      \consists Instrument_name_engraver
-      Script \override #'padding = #0.5
-   }
-   \translator {
-      \StaffContext
-      \name TwoLineStaff
-      \alias Staff
-      \consists Instrument_name_engraver
-      StaffSymbol \override #'line-count = #2
-      BarLine \override #'bar-size = #2
-   }
-   \translator {
-      \ScoreContext
-      \accepts TwoLineStaff
-   }
- }
-}
+    \paper {}
 
-\score { \repeat "unfold" 2
-  \context Staff \notes <<
-    \property Staff.instrument="drums"
-    \timb
-    \drh
-    \drl
-  >>
-  \midi{ \tempo 4=120 }
+    %% broken:
+    \midi{ \tempo 4=120 }
 }
 
 
index 3548a84ee6a58eadcd2959485e22bc89dbec563b..ec6f3e451aeae0a464c221837a92966fc515af32 100644 (file)
@@ -241,6 +241,9 @@ Accidental_engraver::process_acknowledged_grobs ()
          Translator_group * origin = accidentals_[i].origin_;
 
          Pitch * pitch = unsmob_pitch (note->get_mus_property ("pitch"));
+         if (!pitch)
+           continue;
+         
          int num = number_accidentals (note, pitch, origin, accidentals, barnum);
          int num_caut = number_accidentals (note, pitch, origin, cautionaries, barnum);
          bool cautionary = to_boolean (note->get_mus_property ("cautionary"));
index 27cfca60699fd9deddfb44491dffb9feb0b4cd7f..335863b9cdf1e94b000bca892afb6c3a53812157 100644 (file)
@@ -94,15 +94,7 @@ Beam_engraver::Beam_engraver ()
 bool
 Beam_engraver::try_music (Music *m)
 {
-  if (m->is_mus_type ("abort-event"))
-    {
-      evs_drul_[START] = 0;
-      evs_drul_[STOP] = 0;
-      if (beam_)
-       beam_->suicide ();
-      beam_ = 0;
-    }
-  else if (m->is_mus_type ("beam-event"))
+  if (m->is_mus_type ("beam-event"))
     {
       Direction d = to_dir (m->get_mus_property ("span-direction"));
       if (d == START && !valid_start_point ())
@@ -301,7 +293,7 @@ ENTER_DESCRIPTION(Beam_engraver,
 /* descr */       "Handles Beam events by engraving Beams.    If omitted, then notes will be "
 "printed with flags instead of beams.",
 /* creats*/       "Beam",
-/* accepts */     "beam-event abort-event",
+/* accepts */     "beam-event",
 /* acks  */      "stem-interface rest-interface",
 /* reads */       "beamMelismaBusy beatLength subdivideBeams",
 /* write */       "");
@@ -344,7 +336,7 @@ ENTER_DESCRIPTION(Grace_beam_engraver,
 " are at grace points in time. "
 ,
 /* creats*/       "Beam",
-/* accepts */     "beam-event abort-event",
+/* accepts */     "beam-event",
 /* acks  */      "stem-interface rest-interface",
 /* reads */       "beamMelismaBusy beatLength allowBeamBreak subdivideBeams",
 /* write */       "");
index a58a5f57b1a258a5bb09b94723283c9392fcf3a4..3f6f0cb5b9e3f6f6e0066638b0d9d1a2b5f8bffc 100644 (file)
@@ -67,15 +67,7 @@ Cluster_spanner_engraver::typeset_grobs ()
 bool
 Cluster_spanner_engraver::try_music (Music *m)
 {
-  if (m->is_mus_type ("abort-event"))
-    {
-      if (spanner_)
-       {
-         spanner_->suicide ();
-         spanner_ = 0;
-       }
-    }
-  else if (m->is_mus_type ("cluster-note-event"))
+  if (m->is_mus_type ("cluster-note-event"))
     {
       cluster_notes_.push (m);
       return true;
@@ -147,7 +139,7 @@ Cluster_spanner_engraver::acknowledge_grob (Grob_info info)
 ENTER_DESCRIPTION(Cluster_spanner_engraver,
 /* descr */    "Engraves a cluster using Spanner notation ",
 /* creats*/    "ClusterSpanner ClusterSpannerBeacon",
-/* accepts */  "cluster-note-event abort-event",
+/* accepts */  "cluster-note-event",
 /* acks  */    "note-column-interface",
 /* reads */    "",
 /* write */    "");
index 50e6d57057b981571b97e8dd5fea074d5c9b9a41..98570dec3c61ad56563c84732f2c6df5d9df4e13 100644 (file)
@@ -222,7 +222,7 @@ Coherent_ligature_engraver::typeset_ligature (Spanner *ligature,
 ENTER_DESCRIPTION (Coherent_ligature_engraver,
 /* descr */       "This is an abstract class.  Subclasses such as Gregorian_ligature_engraver handle ligatures by glueing special ligature heads together.",
 /* creats*/       "",
-/* accepts */     "ligature-event abort-event",
+/* accepts */     "ligature-event",
 /* acks  */      "note-head-interface rest-interface",
 /* reads */       "",
 /* write */       "");
diff --git a/lily/drum-note-engraver.cc b/lily/drum-note-engraver.cc
new file mode 100644 (file)
index 0000000..89d8dfd
--- /dev/null
@@ -0,0 +1,197 @@
+/*
+  drum-note-engraver.cc
+  
+  (c)  1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+#include <ctype.h>
+
+#include "rhythmic-head.hh"
+#include "event.hh"
+#include "item.hh"
+#include "engraver.hh"
+#include "warn.hh"
+#include "side-position-interface.hh"
+#include "script.hh"
+#include "stem.hh"
+#include "note-column.hh"
+
+class Drum_notes_engraver : public Engraver
+{
+  Link_array<Item> notes_;
+  Link_array<Item> dots_;
+  Link_array<Item> scripts_;
+  Link_array<Music> events_;
+
+public:
+  TRANSLATOR_DECLARATIONS(Drum_notes_engraver);
+
+protected:
+  virtual bool try_music (Music *ev) ;
+  virtual void process_music ();
+  virtual void acknowledge_grob (Grob_info); 
+  virtual void stop_translation_timestep ();
+};
+
+Drum_notes_engraver::Drum_notes_engraver()
+{
+}
+
+bool
+Drum_notes_engraver::try_music (Music *m) 
+{
+  if (m->is_mus_type ("note-event"))
+    {
+      events_.push (m);
+      return true;
+    }
+  else if (m->is_mus_type ("busy-playing-event"))
+    return events_.size ();
+  else if (m->is_mus_type ("start-playing-event"))
+    return events_.size ();
+  
+  return false;
+}
+
+
+void
+Drum_notes_engraver::process_music ()
+{
+  SCM tab = 0;
+  for (int i=0; i < events_.size (); i++)
+    {
+      if (!tab)
+       tab = get_property ("drumStyleTable");
+      
+      Item *note = make_item ("NoteHead");
+      Music * ev = events_[i];
+      
+      Duration dur = *unsmob_duration (ev->get_mus_property ("duration"));
+
+      note->set_grob_property ("duration-log", gh_int2scm (dur.duration_log ()));
+
+      if (dur.dot_count ())
+       {
+         Item * d = make_item ("Dots");
+         Rhythmic_head::set_dots (note, d);
+         
+         if (dur.dot_count ()
+             != robust_scm2int (d->get_grob_property ("dot-count"), 0))
+           d->set_grob_property ("dot-count", gh_int2scm (dur.dot_count ()));
+
+         d->set_parent (note, Y_AXIS);
+         announce_grob (d, SCM_EOL);
+         dots_.push (d);
+       }
+
+      SCM drum_type =  ev->get_mus_property ("drum-type");
+
+      SCM defn = SCM_EOL;
+
+      if (scm_hash_table_p (tab) == SCM_BOOL_T)
+       defn = scm_hashq_ref (tab, drum_type, SCM_EOL);
+      
+      if (gh_pair_p (defn))
+       {
+         SCM pos = gh_caddr (defn);
+         SCM style =gh_car (defn);
+         SCM script = gh_cadr (defn);
+         
+         if (scm_integer_p (pos) == SCM_BOOL_T)
+           note->set_grob_property ("staff-position", pos);
+         if (gh_symbol_p (style))
+           note->set_grob_property ("style", style);
+
+         if (gh_string_p (script))
+           {
+             Item *p  = make_item ("Script");
+             SCM desc  = SCM_EOL;
+             make_script_from_event (p, &desc,
+                                     daddy_trans_, script,
+                                     0);
+
+             if (p->get_grob_property ("follow-into-staff"))
+               p->set_grob_property ("staff-padding", SCM_EOL);
+             
+             announce_grob (p, ev->self_scm ());
+
+             p->set_parent (note, Y_AXIS);
+             Side_position_interface::add_support (p, note); 
+             scripts_.push (p);
+           }
+       }
+
+
+      
+      announce_grob (note,ev->self_scm());
+      notes_.push (note);
+    }
+}
+
+void
+Drum_notes_engraver::acknowledge_grob (Grob_info inf)
+{
+  if (Stem::has_interface (inf.grob_))
+    {
+      for (int i=0; i < scripts_.size (); i++)
+       {
+         Grob*e = scripts_[i];
+
+         if (to_dir (e->get_grob_property ("side-relative-direction")))
+           e->set_grob_property ("direction-source", inf.grob_->self_scm ());
+
+         /*
+           add dep ? 
+          */
+         e->add_dependency (inf.grob_);
+         Side_position_interface::add_support (e, inf.grob_);
+       }
+    }
+   else if (Note_column::has_interface (inf.grob_))
+    {
+      for (int i=0; i < scripts_.size (); i++)
+       {
+         Grob *e = scripts_[i];
+         
+         if (!e->get_parent (X_AXIS) &&
+             Side_position_interface::get_axis (e) == Y_AXIS)
+           {
+             e->set_parent (inf.grob_, X_AXIS);
+           }
+       }
+    }
+
+}
+
+
+void
+Drum_notes_engraver::stop_translation_timestep ()
+{
+  for (int i=0; i < notes_.size (); i++)
+    {
+      typeset_grob (notes_[i]);
+    }
+  notes_.clear ();
+  for (int i=0; i < dots_.size (); i++)
+    {
+      typeset_grob (dots_[i]);
+    }
+  dots_.clear ();
+  for (int i=0; i < scripts_.size (); i++)
+    {
+      typeset_grob (scripts_[i]);
+    }
+  scripts_.clear ();
+  
+  events_.clear ();
+}
+
+
+
+ENTER_DESCRIPTION(Drum_notes_engraver,
+/* descr */       "Generate noteheads.",
+/* creats*/       "NoteHead Dots Script",
+/* accepts */     "note-event busy-playing-event",
+/* acks  */       "stem-interface note-column-interface",
+/* reads */       "drumStyleTable",
+/* write */       "");
+
index 9d62bec204d1d00b38b05671e52fe94d69bfb108..c559689b2f6cfad75a12c843d1647b52c2d82aac 100644 (file)
@@ -94,21 +94,6 @@ Dynamic_engraver::try_music (Music * m)
       script_ev_ = m;
       return true;
     }
-  else if (m->is_mus_type ("abort-event"))
-    {
-      accepted_spanreqs_drul_[LEFT] = 0;
-      accepted_spanreqs_drul_[RIGHT] = 0;
-      /*
-       Let's not kill the line spanner, since that would fuck up
-       earlier, not-to-be-terminated stuff.
-
-       It will disappear by itself when stop_translation_timestep
-       () finds that there is nothing to support anymore.  */
-         
-      if (cresc_)
-       cresc_->suicide ();
-      cresc_ = 0;
-    }
   else if (m->is_mus_type ("decrescendo-event")
           || m->is_mus_type ("crescendo-event"))
     {
index 20c5cd06e56d7937009e8664af35a8072a588501..579aae5c799ed18662c62cbff9fc58dbd8271aa5 100644 (file)
@@ -277,7 +277,7 @@ Gregorian_ligature_engraver::stop_translation_timestep ()
 ENTER_DESCRIPTION (Gregorian_ligature_engraver,
 /* descr */       "This is an abstract class.  Subclasses such as Vaticana_ligature_engraver handle ligatures by glueing special ligature heads together.",
 /* creats*/       "",
-/* accepts */     "ligature-event abort-event",
+/* accepts */     "ligature-event",
 /* acks  */      "note-head-interface rest-interface",
 /* reads */       "",
 /* write */       "");
index 1a8883b9ab87461b12910234b2a0dfda1be25a0d..79701a9b3b28e0691b827734b1fc2473817de61f 100644 (file)
@@ -173,7 +173,7 @@ SCM ly_number2string (SCM s);
 
 SCM parse_symbol_list (char const *);
 SCM robust_list_ref(int i, SCM l);
-
+SCM alist_to_hashq (SCM);
 
 inline SCM ly_cdr (SCM x) { return SCM_CDR (x); }
 inline SCM ly_car (SCM x) { return SCM_CAR (x); } 
index e50fd7273c8a295460f8c67620ba4fc0c51cdf6b..68c50f332c1ea4c68e8018006ca736648604f206 100644 (file)
@@ -37,7 +37,7 @@ public:
     Scheme hash tables with (oct name acc)  values, and symbol keys
    */
   Protected_scm chordmodifier_tab_;
-  Protected_scm pitchname_tab_;
+  Protected_scm pitchname_tab_stack_;
   Keyword_table * keytable_;
   int errorlevel_;
 
@@ -56,7 +56,7 @@ public:
   void start_main_input ();
 
   SCM lookup_identifier (String s);
-  void push_note_state ();
+  void push_note_state (SCM tab);
   void push_markup_state ();
   void push_figuredbass_state ();
   void push_chord_state ();
index d6681f2d026f52e1f2878bb460da4bb2328075aa..060e51e4bf74f69900ef2f8ba15d24605ce7850e 100644 (file)
@@ -28,5 +28,9 @@ public:
   DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
 };
 
+void make_script_from_event (Grob *p,
+                            SCM * descr, Translator_group*tg,
+                            SCM type, 
+                            int index);
 #endif /* Stem_SCRIPT_HH */
 
index 1c859e27a475ded1eb2b49936d577c9166bce1ff..bf829eab8082b17558251ad3902bfdbf589279fc 100644 (file)
@@ -606,8 +606,9 @@ HYPHEN              --
 %%
 
 void
-My_lily_lexer::push_note_state ()
+My_lily_lexer::push_note_state (SCM tab)
 {
+       pitchname_tab_stack_ = gh_cons (tab, pitchname_tab_stack_);
        yy_push_state (notes);
 }
 
@@ -637,6 +638,8 @@ My_lily_lexer::push_markup_state ()
 void
 My_lily_lexer::pop_state ()
 {
+       if (YYSTATE == notes)
+               pitchname_tab_stack_ = gh_cdr (pitchname_tab_stack_);
        yy_pop_state ();
 }
 
@@ -653,7 +656,7 @@ My_lily_lexer::scan_escaped_word (String str)
 {
        // use more SCM for this.
 
-       SCM sym = ly_symbol2scm (str.to_str0 ());
+//     SCM sym = ly_symbol2scm (str.to_str0 ());
 
        int l = lookup_keyword (str);
        if (l != -1) {
@@ -666,15 +669,6 @@ My_lily_lexer::scan_escaped_word (String str)
                return identifier_type (sid);
        }
 
-       if ((YYSTATE != notes) && (YYSTATE != chords)) {
-               SCM pitch = scm_hashq_get_handle (pitchname_tab_, sym);
-               
-               if (gh_pair_p (pitch))
-               {
-                       yylval.scm = ly_cdr (pitch);
-                       return NOTENAME_PITCH;
-               }
-       }
        String msg (_f ("unknown escaped string: `\\%s'", str));        
        LexerError (msg.to_str0 ());
 
@@ -688,13 +682,18 @@ My_lily_lexer::scan_bare_word (String str)
 {
        SCM sym = ly_symbol2scm (str.to_str0 ());
        if ((YYSTATE == notes) || (YYSTATE == chords)) {
-               SCM pitch = scm_hashq_get_handle (pitchname_tab_, sym);
-               if (gh_pair_p (pitch)) {
-                   yylval.scm = ly_cdr (pitch);
-                    return (YYSTATE == notes) ? NOTENAME_PITCH : TONICNAME_PITCH;
-               } else if ((pitch = scm_hashq_get_handle (chordmodifier_tab_, sym))!= SCM_BOOL_F)
+               SCM handle = scm_hashq_get_handle (gh_car (pitchname_tab_stack_), sym);
+               
+               if (gh_pair_p (handle)) {
+                       yylval.scm = ly_cdr (handle);
+                       if (unsmob_pitch (yylval.scm)) 
+                           return (YYSTATE == notes) ? NOTENAME_PITCH : TONICNAME_PITCH;
+                       else if (gh_symbol_p (yylval.scm))
+                           return DRUM_PITCH;
+               }
+               else if ((handle = scm_hashq_get_handle (chordmodifier_tab_, sym))!= SCM_BOOL_F)
                {
-                   yylval.scm = ly_cdr (pitch);
+                   yylval.scm = ly_cdr (handle);
                    return CHORD_MODIFIER;
                }
        }
index 5b8d9d558355d6597caf7abe4ccdd31a90657cd6..b95b6b6997a5f4bf015aea9ec38471f5e21513df 100644 (file)
@@ -65,7 +65,7 @@ Ligature_bracket_engraver::acknowledge_grob (Grob_info info)
 ENTER_DESCRIPTION(Ligature_bracket_engraver,
 /* descr */       "Handles Ligature_events by engraving Ligature brackets.",
 /* creats*/       "TupletBracket",
-/* accepts */     "ligature-event abort-event",
+/* accepts */     "ligature-event",
 /* acks  */      "rest-interface note-column-interface",
 /* reads */       "",
 /* write */       "");
index 8a93f264343059be76375c96d88d5dc7024a5071..617072c690f66653539d32f2dc4cc88b334dfe37 100644 (file)
@@ -77,15 +77,7 @@ Ligature_engraver::Ligature_engraver ()
 bool
 Ligature_engraver::try_music (Music *m)
 {
-  if (m->is_mus_type ("abort-event"))
-    {
-      reqs_drul_[START] = 0;
-      reqs_drul_[STOP] = 0;
-      if (ligature_)
-       ligature_->suicide ();
-      ligature_ = 0;
-    }
-  else if (m->is_mus_type ("ligature-event"))
+  if (m->is_mus_type ("ligature-event"))
     {
       Direction d = to_dir (m->get_mus_property ("span-direction"));
       reqs_drul_[d] = m;
@@ -294,7 +286,7 @@ Ligature_engraver::acknowledge_grob (Grob_info info)
 ENTER_DESCRIPTION (Ligature_engraver,
 /* descr */       "Abstract class; a concrete subclass handles Ligature_events by engraving Ligatures in a concrete style.",
 /* creats */      "",
-/* accepts */     "ligature-event abort-event",
+/* accepts */     "ligature-event",
 /* acks  */      "note-head-interface rest-interface",
 /* reads */       "",
 /* write */       "");
index 104fffc3ba0837624f4e811135c4c9cea574108d..5c726793cb55116e30889ad8cf0364e61713a9d9 100644 (file)
@@ -768,3 +768,20 @@ robust_scm2int (SCM k, int o)
 
   return o;
 }
+
+
+SCM
+alist_to_hashq (SCM alist)
+{
+  int i = scm_ilength (alist);
+  if (i < 0)
+    return scm_make_vector (gh_int2scm (0), SCM_EOL);
+         
+  SCM tab = scm_make_vector (gh_int2scm (i), SCM_EOL);
+  for (SCM s = alist; gh_pair_p (s); s = ly_cdr (s))
+    {
+      SCM pt = ly_cdar (s);
+      scm_hashq_set_x (tab, ly_caar (s), pt);
+    }
+  return tab; 
+}
index 73a1d49119c070b4a6605cb3feaf02bf6f136be3..441d7ea602f2cb6fef4bb19481455e2d4327fa65 100644 (file)
@@ -48,8 +48,8 @@ Lyric_extender::brew_molecule (SCM smob)
     return SCM_EOL;
 
   /*
-    It seems that short extenders are even lengthened to go past the note head,  but
-    haven't found a pattern in it yet. --hwn  1/1/04
+    It seems that short extenders are even lengthened to go past the
+    note head, but haven't found a pattern in it yet. --hwn 1/1/04
     
    */
   SCM minlen =  me->get_grob_property ("minimum-length");
@@ -73,7 +73,7 @@ Lyric_extender::brew_molecule (SCM smob)
 
   Real w = right_point - left_point;
 
-  if (w < 0)
+  if (w < 1.5 * h)
     return SCM_EOL;
   
   Molecule  mol (Lookup::round_filled_box (Box (Interval (0,w), Interval (0,h)),
index f982a11ac7afa8332da5a2bfa0068aa66efb9161..1611f40cb93d2b3bb817c9f6ee10a3cf1bb3e0b4 100644 (file)
@@ -448,7 +448,7 @@ Mensural_ligature_engraver::build_ligature (Spanner *ligature,
 ENTER_DESCRIPTION (Mensural_ligature_engraver,
 /* descr */       "Handles Mensural_ligature_events by glueing special ligature heads together.",
 /* creats*/       "MensuralLigature",
-/* accepts */     "ligature-event abort-event",
+/* accepts */     "ligature-event",
 /* acks  */      "note-head-interface rest-interface",
 /* reads */       "",
 /* write */       "");
index c2ee25616ee264792565ac7cccdf7e6da1db4f41..dbfd239d7cd0941ef5c2f990292299c7bc243a26 100644 (file)
@@ -39,7 +39,6 @@ static Keyword_ent the_key_tab[]={
   {"bar", BAR},
   {"breathe", BREATHE},
   {"change", CHANGE},
-  {"chordmodifiers", CHORDMODIFIERS},
   {"chords", CHORDS},
   {"clef", CLEF},
   {"consists", CONSISTS},
@@ -47,6 +46,7 @@ static Keyword_ent the_key_tab[]={
   {"context", CONTEXT},
   {"default", DEFAULT},
   {"denies", DENIES},
+  {"drums", DRUMS},
   {"description", DESCRIPTION},
   {"figures",FIGURES},
   {"grace", GRACE},
@@ -67,7 +67,6 @@ static Keyword_ent the_key_tab[]={
   {"paper", PAPER},
   {"partcombine", PARTCOMBINE},
   {"partial", PARTIAL},
-  {"pitchnames", PITCHNAMES},
   {"property", PROPERTY},
   {"relative", RELATIVE},
   {"remove", REMOVE},
@@ -99,7 +98,7 @@ My_lily_lexer::My_lily_lexer ()
   keytable_ = new Keyword_table (the_key_tab);
 
   chordmodifier_tab_ = scm_make_vector (gh_int2scm (1), SCM_EOL);
-  pitchname_tab_ = scm_make_vector (gh_int2scm (1), SCM_EOL);
+  pitchname_tab_stack_ = SCM_EOL; 
   
   scopes_ = SCM_EOL;
   
index 043b432121c96f007b7d80e5aec801a6ee2b34cf..6476234aabfc091de314c07ae354c79bbcecaa7f 100644 (file)
@@ -97,8 +97,6 @@ New_fingering_engraver::acknowledge_grob (Grob_info inf)
     }
 }
 
-extern void make_script_from_event (Grob *, SCM * descr, Translator_group*tg, Music * event,
-                                    int index);
 void
 New_fingering_engraver::add_script (Grob * head,
                                    Music * event,
@@ -107,7 +105,8 @@ New_fingering_engraver::add_script (Grob * head,
   Finger_tuple ft ;
 
   Grob * g=  make_item ("Script");
-  make_script_from_event (g, &ft.description_, daddy_trans_, event, 0);
+  make_script_from_event (g, &ft.description_, daddy_trans_,
+                         event->get_mus_property ("articulation-type"), 0);
   if (g)
     {
       ft.script_ =g ;
@@ -132,7 +131,7 @@ New_fingering_engraver::add_fingering (Grob * head,
   
   Side_position_interface::add_support (ft.script_, head);
 
-  int d = gh_scm2int ( event->get_mus_property ("digit"));
+  int d = gh_scm2int (event->get_mus_property ("digit"));
   
   /*
     TODO:
index bd8b1c8a86810d6223bfb2750561d4fbc2ebfd0b..69880a43f0056827c18dd587ae4addaa3732dd2f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  head-grav.cc -- part of GNU LilyPond
+  note-heads-engraver.cc -- part of GNU LilyPond
 
   (c)  1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 #include "engraver.hh"
 #include "warn.hh"
 
-/**
-  make balls and rests
- */
-
 class Note_heads_engraver : public Engraver
 {
   Link_array<Item> notes_;
-  
   Link_array<Item> dots_;
   Link_array<Music> note_reqs_;
 
@@ -86,7 +81,7 @@ Note_heads_engraver::process_music ()
 
       Pitch *pit =unsmob_pitch (req->get_mus_property ("pitch"));
 
-      int pos = pit->steps ();
+      int pos = pit ? pit->steps () : 0;
       SCM c0 = get_property ("centralCPosition");
       if (gh_number_p (c0))
        pos += gh_scm2int (c0);
@@ -119,7 +114,7 @@ Note_heads_engraver::stop_translation_timestep ()
 ENTER_DESCRIPTION(Note_heads_engraver,
 /* descr */       "Generate noteheads.",
 /* creats*/       "NoteHead Dots",
-/* accepts */     "note-event busy-playing-event ligature-event abort-event",
+/* accepts */     "note-event busy-playing-event",
 /* acks  */      "",
 /* reads */       "centralCPosition",
 /* write */       "");
index eb950c42c7d525c6f6cfc50cff89d13af71a7a88..5ba558cfc70c74b1859c007ac0bc68bc597484c6 100644 (file)
@@ -47,11 +47,15 @@ Note_performer::create_audio_elements ()
       while (note_evs_.size ())
        {
          Music* n = note_evs_.pop ();
-         Pitch pit =  * unsmob_pitch (n->get_mus_property ("pitch"));
-         Audio_note* p = new Audio_note (pit,  n->get_length (), transposing_i);
-         Audio_element_info info (p, n);
-         announce_element (info);
-         notes_.push (p);
+         Pitch *pit =  unsmob_pitch (n->get_mus_property ("pitch"));
+
+         if (pit)
+           {
+             Audio_note* p = new Audio_note (*pit,  n->get_length (), transposing_i);
+             Audio_element_info info (p, n);
+             announce_element (info);
+             notes_.push (p);
+           }
        }
       note_evs_.clear ();
     }
index 268c18715d17286b442ecb96c8b4372e82b33b8d..de1b8e81c137caff4a8ad886435fa6dc09843b96 100644 (file)
@@ -283,7 +283,6 @@ yylex (YYSTYPE *s,  void * v)
 %token PAPER
 %token PARTCOMBINE
 %token PARTIAL
-%token PITCHNAMES
 %token PROPERTY
 %token RELATIVE
 %token REMOVE
@@ -327,7 +326,8 @@ yylex (YYSTYPE *s,  void * v)
 %token <scm>   DURATION_IDENTIFIER
 %token <scm>    FRACTION
 %token <id>    IDENTIFIER
-%token <scm>   CHORDNAMES
+%token DRUMS
+%token <scm>   DRUM_PITCH
 %token <scm>   CHORD_MODIFIER
 %token <scm>   SCORE_IDENTIFIER
 %token <scm>   MUSIC_OUTPUT_DEF_IDENTIFIER
@@ -394,7 +394,6 @@ yylex (YYSTYPE *s,  void * v)
 
 %type <scm>    translator_spec_block translator_spec_body
 %type <music>  tempo_event
-%type <scm> notenames_body notenames_block chordmodifiers_block
 %type <scm>    script_abbreviation
 
 
@@ -420,13 +419,7 @@ lilypond:  /* empty */
        ;
 
 toplevel_expression:
-       notenames_block                 {
-               THIS->lexer_->pitchname_tab_ =  $1;
-       }
-       | chordmodifiers_block                  {
-               THIS->lexer_->chordmodifier_tab_  = $1;
-       }
-       | lilypond_header {
+       lilypond_header {
                THIS->input_file_->header_ = $1;
        }
        | score_block {
@@ -478,26 +471,7 @@ embedded_scm:
        ;
 
 
-chordmodifiers_block:
-       CHORDMODIFIERS notenames_body   {  $$ = $2; }
-       ;
-
-notenames_block:
-       PITCHNAMES notenames_body   {  $$ = $2; }
-       ;
-
-notenames_body:
-       embedded_scm    {
-         int i = scm_ilength ($1);
 
-         SCM tab = scm_make_vector (gh_int2scm (i), SCM_EOL);
-         for (SCM s = $1; gh_pair_p (s); s = ly_cdr (s)) {
-               SCM pt = ly_cdar (s);
-               scm_hashq_set_x (tab, ly_caar (s), pt);
-         }
-         $$ = tab;
-       }
-       ;
 
 lilypond_header_body:
        {
@@ -1048,7 +1022,19 @@ basic music objects too, since the meaning is different.
                        }
        }
        | NOTES
-               { THIS->lexer_->push_note_state (); }
+               {
+               SCM nn = THIS->lexer_->lookup_identifier ("pitchnames");
+               THIS->lexer_->push_note_state (alist_to_hashq (nn));
+       }
+       Music
+               { $$ = $3;
+                 THIS->lexer_->pop_state ();
+               }
+       | DRUMS
+               {
+               SCM nn = THIS->lexer_->lookup_identifier ("drumPitchNames");
+               THIS->lexer_->push_note_state (alist_to_hashq (nn));
+       }
        Music
                { $$ = $3;
                  THIS->lexer_->pop_state ();
@@ -1065,7 +1051,10 @@ basic music objects too, since the meaning is different.
                  THIS->lexer_->pop_state ();
        }
        | CHORDS
-               { THIS->lexer_->push_chord_state (); }
+               {
+               SCM nn = THIS->lexer_->lookup_identifier ("chordmodifiers");
+               THIS->lexer_->chordmodifier_tab_ = alist_to_hashq (nn);
+               THIS->lexer_->push_chord_state (); }
        Music
                {
                  Music * chm = MY_MAKE_MUSIC("UnrelativableMusic");
@@ -1960,6 +1949,21 @@ simple_element:
                n->set_spot (i);
                $$ = v;
        }
+       | DRUM_PITCH optional_notemode_duration {
+               Input i = THIS->pop_spot ();
+
+               Music *n =  MY_MAKE_MUSIC("NoteEvent");
+               n->set_mus_property ("duration" ,$2);
+               n->set_mus_property ("drum-type" , $1);
+
+               Music *v = MY_MAKE_MUSIC("EventChord");
+               v->set_mus_property ("elements", scm_list_n (n->self_scm (), SCM_UNDEFINED));
+               scm_gc_unprotect_object (n->self_scm());
+               v->set_spot (i);
+               n->set_spot (i);
+               $$ = v;
+               
+       }
        | figure_spec optional_notemode_duration {
                Music * m = unsmob_music ($1);
                Input i = THIS->pop_spot (); 
@@ -2458,3 +2462,4 @@ get_next_unique_context ()
                
        return scm_makfrom0str (s);
 }
+
index 03f13e6dbbed23627143160ebef5d5be7b7e811c..d4b81eac49a1f5d7040292214e8bcfef22e0bc38 100644 (file)
@@ -48,22 +48,7 @@ Phrasing_slur_engraver::Phrasing_slur_engraver ()
 bool
 Phrasing_slur_engraver::try_music (Music *ev)
 {
-  if (ev->is_mus_type ("abort-event"))
-    {
-      for (int i = 0; i < phrasing_slur_l_stack_.size (); i++)
-       {
-         phrasing_slur_l_stack_[i]->suicide ();
-       }
-      phrasing_slur_l_stack_.clear ();
-      for (int i = 0; i < end_phrasing_slurs_.size (); i++)
-       {
-         end_phrasing_slurs_[i]->suicide ();
-       }
-      end_phrasing_slurs_.clear ();
-      eventses_.clear ();
-      new_phrasing_slur_evs_.clear ();
-    }
-  else if (ev->is_mus_type ("phrasing-slur-event"))
+ if (ev->is_mus_type ("phrasing-slur-event"))
     {
       /*
        Let's not start more than one phrasing slur per moment.
index c4fab9af8736a11197da4fe7d468c64eaefb5bb1..c71c424af9dfc852474fc915f7b1d281300976fc 100644 (file)
@@ -159,19 +159,7 @@ Piano_pedal_engraver::acknowledge_grob (Grob_info info)
 bool
 Piano_pedal_engraver::try_music (Music *m)
 {
-  if (m->is_mus_type ("abort-event"))
-    {
-      for (Pedal_info*p = info_list_; p->name_; p ++)
-       {
-         p->event_drul_[START] = 0;
-         p->event_drul_[STOP] = 0;
-         
-         if (p->bracket_)
-           p->bracket_->suicide ();
-         p->bracket_ = 0;
-       }
-    }
-  else if  (m->is_mus_type ("pedal-event"))
+ if  (m->is_mus_type ("pedal-event"))
     {
       for (Pedal_info*p = info_list_; p->name_; p ++)
        {
@@ -566,7 +554,7 @@ Piano_pedal_engraver::typeset_all ()
 ENTER_DESCRIPTION (Piano_pedal_engraver,
 /* descr */       "Engrave piano pedal symbols and brackets.",
 /* creats*/       "SostenutoPedal SustainPedal UnaCordaPedal SostenutoPedalLineSpanner SustainPedalLineSpanner UnaCordaPedalLineSpanner",
-/* accepts */     "pedal-event abort-event",
+/* accepts */     "pedal-event",
 /* acks  */       "note-column-interface",
 /* reads */       "pedalSostenutoStrings pedalSustainStrings pedalUnaCordaStrings pedalSostenutoStyle pedalSustainStyle pedalUnaCordaStyle",
 /* write */       "");
index 553561fe7ad19e5b9c27e9858306dce1fd50d689..ca8d85398b2149955a6808e1f4f98b73b21ed171 100644 (file)
@@ -12,6 +12,7 @@
 #include "engraver.hh"
 #include "note-column.hh"
 #include "translator-group.hh"
+#include "warn.hh"
 
 struct Script_tuple
 {
@@ -82,29 +83,25 @@ copy_property (Grob * g , SCM sym, SCM alist)
   ScriptStaccato , ScriptMarcato, etc. )
  */
 void make_script_from_event (Grob *p,
-                            SCM * descr, Translator_group*tg, Music * event,
+                            SCM * descr, Translator_group*tg,
+                            SCM art_type, 
                             int index)
 {
   SCM alist = tg->get_property ("scriptDefinitions");
-  SCM art_type= event->get_mus_property ("articulation-type");
   SCM art = scm_assoc (art_type, alist);
 
   if (art == SCM_BOOL_F)
     {
-      event->origin ()->warning (_("Don't know how to interpret articulation:"));
-      event->origin ()->warning (_("Scheme encoding: "));
+      warning (_("Don't know how to interpret articulation:"));
+      warning (_("Scheme encoding: "));
       scm_write (art_type, scm_current_error_port ());
       return  ;
     }
 
   art = gh_cdr (art);
-    
   
   *descr = art;  
 
-  SCM force_dir = event->get_mus_property ("direction");
-  if (is_direction (force_dir) && to_dir (force_dir))
-    p->set_grob_property ("direction", force_dir);
 
   copy_property (p, ly_symbol2scm ("script-molecule"), art);
   copy_property (p, ly_symbol2scm ("direction"), art);
@@ -136,9 +133,17 @@ Script_engraver::process_music ()
 
       Grob * p = make_item ("Script");
 
-      make_script_from_event (p, &scripts_[i].description_, daddy_trans_, l, i);
+      make_script_from_event (p, &scripts_[i].description_, daddy_trans_,
+                             l->get_mus_property ("articulation-type"),
+                             i);
 
       scripts_[i].script_ = p;
+
+      
+      SCM force_dir = l->get_mus_property ("direction");
+      if (is_direction (force_dir) && to_dir (force_dir))
+       p->set_grob_property ("direction", force_dir);
+      
       if (p)
        announce_grob (p, l->self_scm());
     }
index 33b5a43417bc61b73481dbc2d238b9e5a7da9472..c59954034229469a7ffe1cc6a14361c84e0a76f2 100644 (file)
@@ -44,22 +44,7 @@ Slur_engraver::Slur_engraver ()
 bool
 Slur_engraver::try_music (Music *ev)
 {
-  if (ev->is_mus_type ("abort-event"))
-    {
-      for (int i = 0; i < slur_stack_.size (); i++)
-       {
-         slur_stack_[i]->suicide ();
-       }
-      slur_stack_.clear ();
-      for (int i = 0; i < end_slurs_.size (); i++)
-       {
-         end_slurs_[i]->suicide ();
-       }
-      end_slurs_.clear ();
-      events_.clear ();
-      new_slur_evs_.clear ();
-    }
-  else if (ev->is_mus_type ("slur-event"))
+  if (ev->is_mus_type ("slur-event"))
     {
       /*
        Let's not start more than one slur per moment.
index dd95d7d03c6b78651ee43b9fffa8ff480c9fb4d9..14b8c3874bce36958ab6ca785e053d1c269a9c61 100644 (file)
@@ -50,14 +50,6 @@ Text_spanner_engraver::try_music (Music *m)
       req_drul_[d] = m;
       return true;
     }
-  else if (m->is_mus_type ("abort-event"))
-    {
-      req_drul_[LEFT] = 0;
-      req_drul_[RIGHT] = 0;
-      if (span_)
-       span_->suicide ();
-      span_ = 0;
-    }
 
   return false;
 }
index 8839658e8d73873e7740dbdc51eb5fd1744fcd0e..3f2f96004934d23fc53ad4877341b25712193da5 100644 (file)
@@ -581,7 +581,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
 ENTER_DESCRIPTION (Vaticana_ligature_engraver,
 /* descr */       "Handles ligatures by glueing special ligature heads together.",
 /* creats*/       "VaticanaLigature",
-/* accepts */     "ligature-event abort-event",
+/* accepts */     "ligature-event",
 /* acks  */      "note-head-interface rest-interface",
 /* reads */       "",
 /* write */       "");
index 2fd33abd75628121711a62c9f1fe767dae365b62..cc93ae08f005776aed3d57987e22c5268aa03a6c 100644 (file)
@@ -17,7 +17,7 @@
 
 
 % For using "sostingut" notation, which is also correct
-\pitchnames #`(
+pitchnamesCatalan = #`(
        (dobb . ,(ly:make-pitch -1 0 DOUBLE-FLAT))
        (dob . ,(ly:make-pitch -1 0 FLAT))
        (do . ,(ly:make-pitch -1 0 NATURAL))
@@ -71,6 +71,6 @@
        (siss . ,(ly:make-pitch -1 6 DOUBLE-SHARP))
 )
 
+pitchnames = \pitchnamesCatalan
 
-
-\version "1.9.8"
+\version "2.1.19"
index 6b0de39aa949a1b81c832e66e962187234aae305..a74dfb5b499e6605a54c1cc7687678b434900a64 100644 (file)
@@ -1,6 +1,6 @@
-\version "1.9.8"
+\version "2.1.19"
 
-\chordmodifiers #default-chord-modifier-list
+chordmodifiers = #default-chord-modifier-list
 
 whiteTriangleMarkup = #(make-override-markup
                        '(font-family . math) (make-simple-markup "M"))
index 97a45982b1a73fc24cbb67061fc5b8002d99b3f0..344e00f0b1874bf53f4dd08fcbd9a1c873909f1a 100644 (file)
@@ -1,11 +1,12 @@
 #(ly:set-option 'old-relative)
 
-\version "2.1.13"
+\version "2.1.19"
 breve = #(ly:make-duration -1 0)
 longa = #(ly:make-duration -2 0 )
 maxima = #(ly:make-duration -3 0)
 
 \include "nederlands.ly"               % dutch
+\include "drumpitch-init.ly"           
 \include "chord-modifiers-init.ly"
 \include "script-init.ly"
 
index 0218310437576cb05ef45849846b4e4416e14d10..b4dec3933aee90da6bca048fd0a381d13be66fd8 100644 (file)
@@ -7,7 +7,7 @@
 %            added asas and marked ases as `unusual'
 
 
-\pitchnames  #`(
+pitchnamesDeutsch =  #`(
        (ceses . ,(ly:make-pitch -1 0 DOUBLE-FLAT))
        (ces . ,(ly:make-pitch -1 0 FLAT))
        (c . ,(ly:make-pitch -1 0 NATURAL))
@@ -47,6 +47,6 @@
 )
 
 
+pitchnames = \pitchnamesDeutsch
 
-
-\version "1.9.8"
+\version "2.1.19"
index 796b73f7bcd568d8957af5c8098bbd08ba8b5fdc..cc4ad8e7ef533dd3ae1db93233d42eb33127fd8c 100644 (file)
@@ -1,8 +1,241 @@
 
-\pitchnames
-#(append (map (lambda (x) (cons (car x) (caddr x))) drum-pitch-names)
-        (map (lambda (x) (cons (cadr x) (caddr x))) drum-pitch-names)
- )
+drumPitchNames =
+#'((acousticbassdrum . acousticbassdrum)
+   (bassdrum . bassdrum)
+   (hisidestick . hisidestick)
+   (sidestick . sidestick)
+   (losidestick . losidestick)
+   (acousticsnare . acousticsnare)
+   (snare . snare)
+   (handclap . handclap)
+   (electricsnare . electricsnare)
+   (lowfloortom . lowfloortom)
+   (closedhihat . closedhihat)
+   (hihat . hihat)
+   (highfloortom . highfloortom)
+   (pedalhihat . pedalhihat)
+   (lowtom . lowtom)
+   (openhihat . openhihat)
+   (halfopenhihat . halfopenhihat)
+   (lowmidtom . lowmidtom)
+   (himidtom . himidtom)
+   (crashcymbala . crashcymbala)
+   (crashcymbal . crashcymbal)
+   (hightom . hightom)
+   (ridecymbala . ridecymbala)
+   (ridecymbal . ridecymbal)
+   (chinesecymbal . chinesecymbal)
+   (ridebell . ridebell)
+   (tambourine . tambourine)
+   (splashcymbal . splashcymbal)
+   (cowbell . cowbell)
+   (crashcymbalb . crashcymbalb)
+   (vibraslap . vibraslap)
+   (ridecymbalb . ridecymbalb)
+   (mutehibongo . mutehibongo)
+   (hibongo . hibongo)
+   (openhibongo . openhibongo)
+   (mutelobongo . mutelobongo)
+   (lobongo . lobongo)
+   (openlobongo . openlobongo)
+   (mutehiconga . mutehiconga)
+   (muteloconga . muteloconga)
+   (openhiconga . openhiconga)
+   (hiconga . hiconga)
+   (openloconga . openloconga)
+   (loconga . loconga)
+   (hitimbale . hitimbale)
+   (lotimbale . lotimbale)
+   (hiagogo . hiagogo)
+   (loagogo . loagogo)
+   (cabasa . cabasa)
+   (maracas . maracas)
+   (shortwhistle . shortwhistle)
+   (longwhistle . longwhistle)
+   (shortguiro . shortguiro)
+   (longguiro . longguiro)
+   (guiro . guiro)
+   (claves . claves)
+   (hiwoodblock . hiwoodblock)
+   (lowoodblock . lowoodblock)
+   (mutecuica . mutecuica)
+   (opencuica . opencuica)
+   (mutetriangle . mutetriangle)
+   (triangle . triangle)
+   (opentriangle . opentriangle)
+   (oneup . oneup)
+   (twoup . twoup)
+   (threeup . threeup)
+   (fourup . fourup)
+   (fiveup . fiveup)
+   (onedown . onedown)
+   (twodown . twodown)
+   (threedown . threedown)
+   (fourdown . fourdown)
+   (fivedown . fivedown)
+   (bda . acousticbassdrum)
+   (bd . bassdrum)
+   (ssh . hisidestick)
+   (ss . sidestick)
+   (ssl . losidestick)
+   (sna . acousticsnare)
+   (sn . snare)
+   (hc . handclap)
+   (sne . electricsnare)
+   (tomfl . lowfloortom)
+   (hhc . closedhihat)
+   (hh . hihat)
+   (tomfh . highfloortom)
+   (hhp . pedalhihat)
+   (toml . lowtom)
+   (hho . openhihat)
+   (hhho . halfopenhihat)
+   (tomml . lowmidtom)
+   (tommh . himidtom)
+   (cymca . crashcymbala)
+   (cymc . crashcymbal)
+   (tomh . hightom)
+   (cymra . ridecymbala)
+   (cymr . ridecymbal)
+   (cymch . chinesecymbal)
+   (rb . ridebell)
+   (tamb . tambourine)
+   (cyms . splashcymbal)
+   (cb . cowbell)
+   (cymcb . crashcymbalb)
+   (vibs . vibraslap)
+   (cymrb . ridecymbalb)
+   (bohm . mutehibongo)
+   (boh . hibongo)
+   (boho . openhibongo)
+   (bolm . mutelobongo)
+   (bol . lobongo)
+   (bolo . openlobongo)
+   (cghm . mutehiconga)
+   (cglm . muteloconga)
+   (cgho . openhiconga)
+   (cgh . hiconga)
+   (cglo . openloconga)
+   (cgl . loconga)
+   (timh . hitimbale)
+   (timl . lotimbale)
+   (agh . hiagogo)
+   (agl . loagogo)
+   (cab . cabasa)
+   (mar . maracas)
+   (whs . shortwhistle)
+   (whl . longwhistle)
+   (guis . shortguiro)
+   (guil . longguiro)
+   (gui . guiro)
+   (cl . claves)
+   (wbh . hiwoodblock)
+   (wbl . lowoodblock)
+   (cuim . mutecuica)
+   (cuio . opencuica)
+   (trim . mutetriangle)
+   (tri . triangle)
+   (trio . opentriangle)
+   (ua . oneup)
+   (ub . twoup)
+   (uc . threeup)
+   (ud . fourup)
+   (ue . fiveup)
+   (da . onedown)
+   (db . twodown)
+   (dc . threedown)
+   (dd . fourdown)
+   (de . fivedown)
+   )
+
+
+
+#(map
+  (lambda (k-v)
+    (module-define! (current-module)
+                   (car k-v)
+                   (alist->hash-table (cdr k-v)))
+    )
+   '((drums-style .
+     (
+      (acousticbassdrum () #f -3)
+      (bassdrum () #f -3)
+      (sidestick cross #f 1)
+      (acousticsnare () #f 1)
+      (snare () #f 1)
+      (handclap triangle #f 1)
+      (electricsnare () #f 1)
+      (lowfloortom () #f -4)
+      (closedhihat cross "stopped" 3)
+      (hihat cross #f 3)
+      (highfloortom () #f -2)
+      (pedalhihat cross #f -5)
+      (lowtom () #f -1)
+      (openhihat cross "open" 3)
+      (halfopenhihat xcircle #f 3)
+      (lowmidtom () #f 0)
+      (himidtom () #f 2)
+      (crashcymbala xcircle #f 5)
+      (crashcymbal xcircle #f 5)
+      (hightom () #f 4)
+      (ridecymbala cross #f 5)
+      (ridecymbal cross #f 5)
+      (chinesecymbal mensural #f 5)
+      (ridebell () #f 5)
+      (splashcymbal diamond #f 5)
+      (cowbell triangle #f 5)
+      (crashcymbalb cross #f 5)
+      (vibraslap diamond #f 4)
+      (ridecymbalb cross #f 5)
+      ))
+
+   (timbales-style .
+     ((losidestick cross #f -1)
+      (lotimbale () #f -1)
+      (cowbell triangle #f 2)
+      (hisidestick cross #f 1)
+      (hitimbale () #f 1)
+      ))
+
+
+   (congas-style .
+     ((losidestick cross #f -1)
+      (loconga () #f -1)
+      (openloconga () "open" -1)
+      (muteloconga () "stopped" -1)
+      (hisidestick cross #f 1)
+      (hiconga () #f 1)
+      (openhiconga () "open" 1)
+      (mutehiconga () "stopped" 1)
+      ))
+
+
+   (bongos-style .
+     ((losidestick cross #f -1)
+      (lobongo () #f -1)
+      (openlobongo () "open" -1)
+      (mutelobongo () "stopped" -1)
+      (hisidestick cross #f 1)
+      (hibongo () #f 1)
+      (openhibongo () "open" 1)
+      (mutehibongo () "stopped" 1)
+      ))
+
+
+   (percussion-style .
+     ((opentriangle cross "open" 0)
+      (mutetriangle cross "stopped" 0)
+      (triangle cross #f 0)
+      (shortguiro () staccato 0)
+      (longguiro () tenuto 0)
+      (guiro () #f 0)
+      (cowbell triangle #f 0)
+      (claves () #f 0)
+      (tambourine () #f 0)
+      (cabasa cross #f 0)
+      (maracas () #f 0)
+      (handclap () #f 0)
+      ))
+   ))
 
 
-\version "1.9.8"
index 97428e9566dd1571f4113c9ffc668ca593ee2b77..68449064248e4031641dd3160fbbf4f304a425c9 100644 (file)
@@ -3,7 +3,7 @@
      with s for sharp and f for flat.
 %}
 
-\pitchnames #`(
+pitchnamesEnglish = #`(
        (cflatflat . ,(ly:make-pitch -1 0 DOUBLE-FLAT))
        (cflat . ,(ly:make-pitch -1 0 FLAT))
        (c . ,(ly:make-pitch -1 0 NATURAL))
@@ -85,5 +85,7 @@
        (bx . ,(ly:make-pitch -1 6 DOUBLE-SHARP))
 )
 
-\version "1.9.8"
+pitchnames = pitchnamesEnglish
+
+\version "2.1.19"
 
index 3a50e0caee094db9fbabdfe6fa641b389a09a07f..4f3ac1a64742572edd2491ad25923ff5535fd7a4 100644 (file)
        \accepts "Voice"
 }
 
-
 \translator {
-       \type Engraver_group_engraver
-       \consists "Axis_group_engraver"
-       minimumVerticalExtent = ##f
-       extraVerticalExtent = ##f
-       verticalExtent = ##f 
-       localKeySignature = #'()
+    \StaffContext
+    \type "Engraver_group_engraver"
+    \name DrumStaff
+    \alias Staff
+
+    \remove "Accidental_engraver"
+    \remove "Ottava_spanner_engraver"
+    \remove "Key_engraver" 
+    \remove "Piano_pedal_engraver"
+    \remove "String_number_engraver"
+    
+    \description "Handles typesetting for percussion."
+
+    \denies Voice
+    \accepts DrumVoice
 
-       \accepts Staff
-       \name StaffContainer
+    clefGlyph = #"clefs-percussion"
+    clefPosition = #0
+    Script \set #'staff-padding = #0.75 
 }
 
+
 \translator {
-       \type "Engraver_group_engraver"
-       \name InnerChoirStaff
-       \consists "System_start_delimiter_engraver"
-       systemStartDelimiter = #'SystemStartBracket
-       localKeySignature = #'()
+    \type Engraver_group_engraver
+    \consists "Axis_group_engraver"
+    minimumVerticalExtent = ##f
+    extraVerticalExtent = ##f
+    verticalExtent = ##f 
+    localKeySignature = #'()
+
+    \accepts Staff
+    \name StaffContainer
+}
 
-       \accepts "Staff"
-       \accepts "RhythmicStaff"
-       \accepts "GrandStaff"
-       \accepts "PianoStaff"
-       \accepts "Lyrics"
-       \accepts "ChordNames"
+\translator {
+    \type "Engraver_group_engraver"
+    \name InnerChoirStaff
+    \consists "System_start_delimiter_engraver"
+    systemStartDelimiter = #'SystemStartBracket
+    localKeySignature = #'()
+
+    \accepts "Staff"
+    \accepts "DrumStaff"
+    \accepts "RhythmicStaff"
+    \accepts "GrandStaff"
+    \accepts "PianoStaff"
+    \accepts "Lyrics"
+    \accepts "ChordNames"
 }
 
 \translator {
 
 
 \translator{
-       \type "Engraver_group_engraver"
-       
-       \consists "Output_property_engraver"    
+    \type "Engraver_group_engraver"
+    
+    \consists "Output_property_engraver"       
 
-\description  "
+    \description  "
     A context like @code{Staff} but for printing rhythms.  Pitches are
     ignored; the notes are printed on one line.  
 "
-       minimumVerticalExtent = ##f
-       extraVerticalExtent = ##f
-       verticalExtent = ##f 
-       localKeySignature = #'()
-
-       \consists "Pitch_squash_engraver"
-       \consists "Separating_line_group_engraver"      
-       \name RhythmicStaff
-       \alias "Staff"
-       
-       BarLine \override #'bar-size = #4
-       VoltaBracket \override #'minimum-space =  #15
-       VoltaBracket \override #'padding =  #5
-       StaffSymbol \override #'line-count = #1 
-
-       Stem \override #'neutral-direction = #1
-       Beam \override #'neutral-direction = #1         
-%      \consists "Repeat_engraver"
-       \consists "Dot_column_engraver"
-       \consists "Volta_engraver"
-       \consists "Bar_engraver"
-       \consists "Time_signature_engraver"
-       \consists "Staff_symbol_engraver"
-       \consists "Instrument_name_engraver"
-       \consistsend "Axis_group_engraver"
-       \accepts "Voice"
+    minimumVerticalExtent = ##f
+    extraVerticalExtent = ##f
+    verticalExtent = ##f 
+    localKeySignature = #'()
+
+    \consists "Pitch_squash_engraver"
+    \consists "Separating_line_group_engraver" 
+    \name RhythmicStaff
+    \alias "Staff"
+    
+    BarLine \override #'bar-size = #4
+    VoltaBracket \override #'minimum-space =  #15
+    VoltaBracket \override #'padding =  #5
+    StaffSymbol \override #'line-count = #1    
+
+    Stem \override #'neutral-direction = #1
+    Beam \override #'neutral-direction = #1    
+                               %       \consists "Repeat_engraver"
+    \consists "Dot_column_engraver"
+    \consists "Volta_engraver"
+    \consists "Bar_engraver"
+    \consists "Time_signature_engraver"
+    \consists "Staff_symbol_engraver"
+    \consists "Instrument_name_engraver"
+    \consistsend "Axis_group_engraver"
+    \accepts "Voice"
 }
 
 
 \translator {
-       \type "Engraver_group_engraver"
-       \name Voice
+    \type "Engraver_group_engraver"
+    \name Voice
 
-\description "
+    \description "
     Corresponds to a voice on a staff.  This context handles the
     conversion of dynamic signs, stems, beams, super- and subscripts,
     slurs, ties, and rests.
     You have to instantiate this explicitly if you want to have
     multiple voices on the same staff."
 
-       localKeySignature = #'()
-       \consists "Font_size_engraver"
-       
-       \consists "Output_property_engraver"    
-       \consists "Arpeggio_engraver"
-       \consists "Multi_measure_rest_engraver"
-       \consists "Text_spanner_engraver"
-       \consists "Grob_pq_engraver"
-
-       \consists "Note_head_line_engraver"
-       \consists "Glissando_engraver"
-       \consists "Ligature_bracket_engraver"
-       \consists "Breathing_sign_engraver"
-       % \consists "Rest_engraver"
-       \consists "Stem_engraver"
-       \consists "Beam_engraver"
-       \consists "Grace_beam_engraver"
-       \consists "Auto_beam_engraver"
-       \consists "New_fingering_engraver"
-       \consists "Chord_tremolo_engraver"
-       \consists "Percent_repeat_engraver"
-       \consists "Slash_repeat_engraver"
-       \consists "Melisma_engraver"
-       \consists "Part_combine_engraver"
+    localKeySignature = #'()
+    \consists "Font_size_engraver"
+    
+    \consists "Output_property_engraver"       
+    \consists "Arpeggio_engraver"
+    \consists "Multi_measure_rest_engraver"
+    \consists "Text_spanner_engraver"
+    \consists "Grob_pq_engraver"
+
+    \consists "Note_head_line_engraver"
+    \consists "Glissando_engraver"
+    \consists "Ligature_bracket_engraver"
+    \consists "Breathing_sign_engraver"
+                               % \consists "Rest_engraver"
+    \consists "Stem_engraver"
+    \consists "Beam_engraver"
+    \consists "Grace_beam_engraver"
+    \consists "Auto_beam_engraver"
+    \consists "New_fingering_engraver"
+    \consists "Chord_tremolo_engraver"
+    \consists "Percent_repeat_engraver"
+    \consists "Slash_repeat_engraver"
+    \consists "Melisma_engraver"
+    \consists "Part_combine_engraver"
 
 %{
- Must come before text_engraver, but after note_column engraver.
   Must come before text_engraver, but after note_column engraver.
 
 %}
-       \consists "Text_engraver"
-       \consists "Dynamic_engraver"
-       \consists "Fingering_engraver"
-
-       \consists "Script_engraver"
-       \consists "Script_column_engraver"
-       \consists "Rhythmic_column_engraver"
-       \consists "Phrasing_slur_engraver"
-       \consists "Cluster_spanner_engraver"
-       \consists "Slur_engraver"
-       \consists "Tie_engraver"
-       \consists "Tuplet_engraver"
-
-       \consists "Skip_event_swallow_translator"
-       \accepts Thread % bug if you leave out this!
+    \consists "Text_engraver"
+    \consists "Dynamic_engraver"
+    \consists "Fingering_engraver"
+
+    \consists "Script_engraver"
+    \consists "Script_column_engraver"
+    \consists "Rhythmic_column_engraver"
+    \consists "Phrasing_slur_engraver"
+    \consists "Cluster_spanner_engraver"
+    \consists "Slur_engraver"
+    \consists "Tie_engraver"
+    \consists "Tuplet_engraver"
+
+    \consists "Skip_event_swallow_translator"
+    \accepts Thread % bug if you leave out this!
+}
+
+\translator {
+    \VoiceContext
+    \name DrumVoice
+    \alias Voice
+
+    \description " A voice on a percussion staff."
+    
+    
+    \remove "Arpeggio_engraver"
+    \consists "Multi_measure_rest_engraver"
+    \consists "Text_spanner_engraver"
+    \consists "Grob_pq_engraver"
+
+    \remove "Note_head_line_engraver"
+    \remove "Glissando_engraver"
+    \remove "Ligature_bracket_engraver"
+    \remove "Note_heads_engraver"
+    \consists "Rest_engraver"
+    \consists "Drum_notes_engraver"
+    \remove "New_fingering_engraver"
+
+    \remove "Fingering_engraver"
+
+    \remove "Phrasing_slur_engraver"
+    \remove "Cluster_spanner_engraver"
+    \remove "Slur_engraver"
+    \consists "Tuplet_engraver"
+
+    \consists "Skip_event_swallow_translator"
+    \denies Thread
 }
 
 \translator{
-       \type Engraver_group_engraver
-       \name Thread
-       localKeySignature = #'()
-\description "
+    \type Engraver_group_engraver
+    \name Thread
+    localKeySignature = #'()
+    \description "
     Handles note heads, and is contained in the Voice context.  You
     have to instantiate this explicitly if you want to adjust the
     style of individual note heads.
 "
-       \consists "Font_size_engraver"  
-       \consists "Note_heads_engraver"
-       \consists "Rest_engraver"
+    \consists "Font_size_engraver"     
+    \consists "Note_heads_engraver"
+    \consists "Rest_engraver"
 
-       % why here ? 
-       \consists "Output_property_engraver"    
+                               % why here ? 
+    \consists "Output_property_engraver"       
 }
 
 
 \translator{
-       \type "Engraver_group_engraver"
-       \name GrandStaff
-       localKeySignature = #'()
-       
-       \description " A group of staffs, with a brace on the left
+    \type "Engraver_group_engraver"
+    \name GrandStaff
+    localKeySignature = #'()
+    
+    \description " A group of staffs, with a brace on the left
     side, grouping the staves together.  The bar lines of the
     contained staves are connected vertically.  "
 
-       \consists "Span_bar_engraver"
-       \consists "Span_arpeggio_engraver"
-       \consists "System_start_delimiter_engraver"
-       systemStartDelimiter = #'SystemStartBrace
+    \consists "Span_bar_engraver"
+    \consists "Span_arpeggio_engraver"
+    \consists "System_start_delimiter_engraver"
+    systemStartDelimiter = #'SystemStartBrace
 
-       \accepts "Staff"
+    \accepts "Staff"
 }
 
 \translator{
-       \GrandStaffContext
-       \name "PianoStaff"
-       \alias "GrandStaff"
-\description "
+    \GrandStaffContext
+    \name "PianoStaff"
+    \alias "GrandStaff"
+    \description "
     Just like @code{GrandStaff} but with @code{minVerticalAlign} set
     equal to @code{maxVerticalAlign} so that interstaff beaming and
     slurring can be used."
-       verticalAlignmentChildCallback = #Align_interface::fixed_distance_alignment_callback
-       VerticalAlignment \override #'forced-distance = #12
-       VerticalAlignment \override #'self-alignment-Y = #0
+    verticalAlignmentChildCallback = #Align_interface::fixed_distance_alignment_callback
+    VerticalAlignment \override #'forced-distance = #12
+    VerticalAlignment \override #'self-alignment-Y = #0
 
-       \consists "Vertical_align_engraver"
-       \consists "Instrument_name_engraver"
-       
-       instrument = #'()
-       instr = #'()
-       
-%      \consistsend "Axis_group_engraver"
+    \consists "Vertical_align_engraver"
+    \consists "Instrument_name_engraver"
+    
+    instrument = #'()
+    instr = #'()
 }
 
 \translator {
-       \type "Engraver_group_engraver"
-       \name InnerStaffGroup
-       localKeySignature = #'()
-
-       \consists "Span_bar_engraver"
-       \consists "Span_arpeggio_engraver"
-       \consists "Output_property_engraver"    
-       systemStartDelimiter = #'SystemStartBracket
-
-       \consists "System_start_delimiter_engraver"
-       \accepts "Staff"
-       \accepts "RhythmicStaff"
-       \accepts "GrandStaff"
-       \accepts "PianoStaff"
-       \accepts "TabStaff"     
-       \accepts "Lyrics"
-       \accepts "ChordNames"
+    \type "Engraver_group_engraver"
+    \name InnerStaffGroup
+    localKeySignature = #'()
+
+    \consists "Span_bar_engraver"
+    \consists "Span_arpeggio_engraver"
+    \consists "Output_property_engraver"       
+    systemStartDelimiter = #'SystemStartBracket
+
+    \consists "System_start_delimiter_engraver"
+    \accepts "Staff"
+    \accepts "RhythmicStaff"
+    \accepts "DrumStaff"
+    \accepts "GrandStaff"
+    \accepts "PianoStaff"
+    \accepts "TabStaff"        
+    \accepts "Lyrics"
+    \accepts "ChordNames"
 }
 
 \translator {
-       \InnerStaffGroupContext
-       \name StaffGroup
-       
-       \description
+    \InnerStaffGroupContext
+    \name StaffGroup
+    
+    \description
 
-       " Groups staffs while adding a bracket on the left side,
+    " Groups staffs while adding a bracket on the left side,
        grouping the staves together.  The bar lines of the contained
        staves are connected vertically.
 "
-       
-       \accepts "InnerChoirStaff"
-       \accepts "ChoirStaff"
-       \accepts "InnerStaffGroup"
-       \accepts "FiguredBass"
+    
+    \accepts "InnerChoirStaff"
+    \accepts "ChoirStaff"
+    \accepts "InnerStaffGroup"
+    \accepts "FiguredBass"
 }
 
 
-% UGH! JUNKME
 \translator{
-       \type "Engraver_group_engraver"
-       \consistsend "Hara_kiri_engraver"
-       minimumVerticalExtent = #'(-1.2 . 2.4)
-       extraVerticalExtent = ##f
-       verticalExtent = ##f
+    \type "Engraver_group_engraver"
+    \consistsend "Hara_kiri_engraver"
+    minimumVerticalExtent = #'(-1.2 . 2.4)
+    extraVerticalExtent = ##f
+    verticalExtent = ##f
 
-       \description "
+    \description "
     Corresponds to a voice with lyrics.  Handles the printing of a
     single line of lyrics.
 "
-       
-       \name LyricsVoice 
-       \consists "Separating_line_group_engraver"
-       \consists "Lyric_engraver"
-       \consists "Extender_engraver"
-       \consists "Hyphen_engraver"
-       \consists "Stanza_number_engraver"
-       \consists "Vocal_name_engraver"
-       \consists "Skip_event_swallow_translator"
-       SeparationItem \set #'padding = #0.5
+    
+    \name LyricsVoice 
+    \consists "Separating_line_group_engraver"
+    \consists "Lyric_engraver"
+    \consists "Extender_engraver"
+    \consists "Hyphen_engraver"
+    \consists "Stanza_number_engraver"
+    \consists "Vocal_name_engraver"
+    \consists "Skip_event_swallow_translator"
+    SeparationItem \set #'padding = #0.5
 }
+
 \translator {
-       \type "Engraver_group_engraver"
-       \name NoteNames
-       \consistsend "Axis_group_engraver"
+    \type "Engraver_group_engraver"
+    \name NoteNames
+    \consistsend "Axis_group_engraver"
 
-       minimumVerticalExtent = ##f
-       extraVerticalExtent = ##f
-       verticalExtent = ##f 
+    minimumVerticalExtent = ##f
+    extraVerticalExtent = ##f
+    verticalExtent = ##f 
 
-       
-       \consists "Rest_swallow_translator" 
-       \consists "Skip_event_swallow_translator"
-       \consists "Tie_engraver"
-       \consists "Note_swallow_translator"
-       \consists "Note_name_engraver"
-       \consists "Separating_line_group_engraver"
+    
+    \consists "Rest_swallow_translator" 
+    \consists "Skip_event_swallow_translator"
+    \consists "Tie_engraver"
+    \consists "Note_swallow_translator"
+    \consists "Note_name_engraver"
+    \consists "Separating_line_group_engraver"
 }
 
 \translator {
-       \type "Engraver_group_engraver"
-       \name Lyrics
-       \description  "Typesets lyrics."
-       
-       %% To get folded repeats right.
-       \consists Vertical_align_engraver 
+    \type "Engraver_group_engraver"
+    \name Lyrics
+    \description  "Typesets lyrics."
+    
+    %% To get folded repeats right.
+    \consists Vertical_align_engraver 
 
-       minimumVerticalExtent = ##f
-       extraVerticalExtent = ##f
-       verticalExtent = ##f 
-       
-       \accepts "LyricsVoice"
+    minimumVerticalExtent = ##f
+    extraVerticalExtent = ##f
+    verticalExtent = ##f 
+    
+    \accepts "LyricsVoice"
 }
 
 
 \translator {
-       \type "Engraver_group_engraver"
-       \name ChordNames
-       \description "Typesets chord names."
-       
-       \consists "Rest_swallow_translator" 
-       \consists "Output_property_engraver"    
-       \consists "Separating_line_group_engraver"
-       \consists "Chord_name_engraver"
-       \consists "Skip_event_swallow_translator"
-       \consistsend "Hara_kiri_engraver"
-       
-       minimumVerticalExtent = #'(0 . 2.5)
-       extraVerticalExtent = ##f
-       SeparatingGroupSpanner \override #'padding = #0.8
-       verticalExtent = ##f 
+    \type "Engraver_group_engraver"
+    \name ChordNames
+    \description "Typesets chord names."
+    
+    \consists "Rest_swallow_translator" 
+    \consists "Output_property_engraver"       
+    \consists "Separating_line_group_engraver"
+    \consists "Chord_name_engraver"
+    \consists "Skip_event_swallow_translator"
+    \consistsend "Hara_kiri_engraver"
+    
+    minimumVerticalExtent = #'(0 . 2.5)
+    extraVerticalExtent = ##f
+    SeparatingGroupSpanner \override #'padding = #0.8
+    verticalExtent = ##f 
 }
 
 
 RemoveEmptyStaffContext= \translator {
-       \StaffContext
-       \remove "Axis_group_engraver"
-       \consistsend "Hara_kiri_engraver"
-       \accepts "Voice"
+    \StaffContext
+    \remove "Axis_group_engraver"
+    \consistsend "Hara_kiri_engraver"
+    \accepts "Voice"
 
-       % hara kiri & auto knee don't work together.
-       Beam \override #'auto-knee-gap = #'()
+                               % hara kiri & auto knee don't work together.
+    Beam \override #'auto-knee-gap = #'()
 }
 
 AncientRemoveEmptyStaffContext = \translator {
     %% why not add by default?
     
-       \RemoveEmptyStaffContext
-       \accepts "VaticanaVoice"
-       \accepts "GregorianTranscriptionVoice"
+    \RemoveEmptyStaffContext
+    \accepts "VaticanaVoice"
+    \accepts "GregorianTranscriptionVoice"
 }
 
 \translator {
-       \type Score_engraver
-       \name Score
-       localKeySignature = #'()
+    \type Score_engraver
+    \name Score
+    localKeySignature = #'()
 
-       \description "This is the top level notation context.  No
+    \description "This is the top level notation context.  No
     other context can contain a @code{Score} context.  This context
     handles the administration of time signatures.  It also makes sure
     that items such as clefs, time signatures, and key-signatures are
@@ -397,163 +451,165 @@ AncientRemoveEmptyStaffContext = \translator {
     not contained in any other context).  It is instantiated
     automatically when an output definition (a @code{\score} or
     @code{\paper} block) is processed."
-       
-       \consists "Repeat_acknowledge_engraver"
-       \consists "Staff_collecting_engraver"
+    
+    \consists "Repeat_acknowledge_engraver"
+    \consists "Staff_collecting_engraver"
 
-       % move the alias along with the engraver.
+                               % move the alias along with the engraver.
 
-       %% TODO? add this alias from Timing_engraver::initialize() ? 
-       \consists "Timing_engraver"
-       \alias "Timing"
-       
-       \consists "Output_property_engraver"
-       \consists "System_start_delimiter_engraver"
-       \consists "Mark_engraver"       
-       \consists "Metronome_mark_engraver"     
-       \consists "Break_align_engraver"
-       \consists "Spacing_engraver"
-       \consists "Vertical_align_engraver"
-       \consists "Lyric_phrasing_engraver"
-       \consists "Bar_number_engraver"
-       \consists "Span_arpeggio_engraver"
-
-       \accepts "Staff"
-       \accepts "TabStaff"
-       \accepts "VaticanaStaff"
-       \accepts "GregorianTranscriptionStaff"
-       \accepts "StaffContainer"
-       \accepts "StaffGroup"
-       \accepts "RhythmicStaff"
-       \accepts "Lyrics"
-       \accepts "ChordNames"
-       \accepts "GrandStaff"
-       \accepts "ChoirStaff"
-       \accepts "PianoStaff"
-       \accepts "Devnull"
-       \accepts "NoteNames"
-       \accepts "FiguredBass"
-
-       soloText = #"Solo"
-       soloIIText = #"Solo II"
-       aDueText = #"a2"
-       soloADue = ##t
-       systemStartDelimiter =#'SystemStartBar
-
-       melismaBusyProperties = #default-melisma-properties
-       
-       clefGlyph = #"clefs-G"
-       clefPosition = #-2
-       centralCPosition = #-6
-       
-       defaultBarType = #"|"
-       barNumberVisibility = #default-bar-number-visibility
-       automaticBars = ##t
-       
-       explicitClefVisibility = #all-visible
-       explicitKeySignatureVisibility = #all-visible
-       autoBeamSettings = #default-auto-beam-settings
-       autoBeaming = ##t
-       scriptDefinitions = #default-script-alist
-
-       verticalAlignmentChildCallback = #Align_interface::alignment_callback
-
-       pedalSustainStrings = #'("Ped." "*Ped." "*")
-       pedalSustainStyle = #'text
-       pedalUnaCordaStrings = #'("una corda" "" "tre corde")
-       pedalUnaCordaStyle = #'text
-
-       %% These are in ordinary italic font, including the *,
-       %% but they are unlikely to be used, 
-       %% as the default pedal-style for SostenutoPedal is 'mixed':
-       %% i.e.  Sost. Ped_____________________ 
-       pedalSostenutoStrings = #'("Sost. Ped." "*Sost. Ped." "*") 
-       pedalSostenutoStyle = #'mixed
-
-       fingeringOrientations = #'(up down)
-       tupletNumberFormatFunction = #denominator-tuplet-formatter
-       markFormatter = #format-mark-letters
-       rehearsalMark = #1 
-       subdivideBeams = ##f
-       allowBeamBreak = ##f
-       extraNatural = ##t
-       autoAccidentals = #'(Staff (same-octave . 0))
-       autoCautionaries = #'()  
-
-       keyAccidentalOrder = #`(
-         (6 . ,FLAT) (2  . ,FLAT) (5 . ,FLAT ) (1  . ,FLAT) (4  . ,FLAT) (0  . ,FLAT) (3  . ,FLAT)
-        (3  . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP) (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP)
-         (6 . ,DOUBLE-FLAT) (2  . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1  . ,DOUBLE-FLAT) (4  . ,DOUBLE-FLAT) (0  . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
-         (3  . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
-        )
-       breakAlignOrder = #'(
-         instrument-name
-         left-edge
-         ambitus
-         breathing-sign
-         clef
-         rehearsal-mark
-         staff-bar
-         key-signature
-         time-signature
-         custos
-       )
-       barCheckSynchronize = ##f
-       
-       %% chord names:
-       chordNameFunction = #ignatzek-chord-names
-       majorSevenSymbol = #whiteTriangleMarkup
-       chordNameSeparator = #(make-simple-markup  "/")
-       chordNameExceptions = #ignatzekExceptions
-       chordNoteNamer = #'()
-       chordRootNamer = #note-name->markup
-
-       chordNameExceptionsFull = #fullJazzExceptions
-       chordNameExceptionsPartial = #partialJazzExceptions
-       
-       %% tablature:
-       stringOneTopmost = ##t
-       highStringOne = ##t
-
-       %% One may change the strings tuning as following :
-       %% The lenght of the list must be equal to the number of string
-       stringTunings   = #guitar-tunings
-       tablatureFormat = #fret-number-tablature-format
-
-       %%
-       bassFigureFormatFunction = #make-bass-figure-markup
-       metronomeMarkFormatter = #format-metronome-markup
-       graceSettings = #`#(
-                (Voice Stem direction 1)
-
-                ;; TODO: should take from existing definition.
-                ;; c&p from define-grobs.scm
-                
-                (Voice Stem lengths ,(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0)))
-                (Voice Stem stem-shorten (0.4 0))
-                (Voice Stem  font-size -3)
-                (Voice NoteHead  font-size -3)
-                (Voice Dots  font-size -3)
-                (Voice Stem beamed-lengths  
-                 ,(map (lambda (x) (* 0.8 x)) '(3.26)))
-                (Voice Stem beamed-minimum-free-lengths  
-                 ,(map (lambda (x) (* 0.8 x)) '(2.5 2.0 1.5)))
-                (Voice Stem beamed-extreme-minimum-free-lengths  
-                 ,(map (lambda (x) (* 0.8 x)) '(1.83 1.5)))
-
-                (Voice Stem no-stem-extend #t)
-                (Voice Beam thickness 0.384)
-                (Voice Beam space-function ,(lambda (beam mult)
-                                               (* 0.8 (Beam::space_function
-                                                       beam mult))))
-                (Voice Beam position-callbacks (,Beam::least_squares
-                                                   ,Beam::check_concave
-                                                   ,Beam::slope_damping))
-                (Staff Accidental font-size -4)
-                (Voice Slur direction -1)
-       )
+    %% TODO? add this alias from Timing_engraver::initialize() ? 
+    \consists "Timing_engraver"
+    \alias "Timing"
+    
+    \consists "Output_property_engraver"
+    \consists "System_start_delimiter_engraver"
+    \consists "Mark_engraver"  
+    \consists "Metronome_mark_engraver"        
+    \consists "Break_align_engraver"
+    \consists "Spacing_engraver"
+    \consists "Vertical_align_engraver"
+    \consists "Lyric_phrasing_engraver"
+    \consists "Bar_number_engraver"
+    \consists "Span_arpeggio_engraver"
+
+    \accepts "Staff"
+    \accepts "TabStaff"
+    \accepts "VaticanaStaff"
+    \accepts "GregorianTranscriptionStaff"
+    \accepts "StaffContainer"
+    \accepts "StaffGroup"
+    \accepts "RhythmicStaff"
+    \accepts "DrumStaff"
+    \accepts "Lyrics"
+    \accepts "ChordNames"
+    \accepts "GrandStaff"
+    \accepts "ChoirStaff"
+    \accepts "PianoStaff"
+    \accepts "Devnull"
+    \accepts "NoteNames"
+    \accepts "FiguredBass"
+
+    soloText = #"Solo"
+    soloIIText = #"Solo II"
+    aDueText = #"a2"
+    soloADue = ##t
+    systemStartDelimiter =#'SystemStartBar
+
+    drumStyleTable = #drums-style
+    
+    melismaBusyProperties = #default-melisma-properties
+    
+    clefGlyph = #"clefs-G"
+    clefPosition = #-2
+    centralCPosition = #-6
+    
+    defaultBarType = #"|"
+    barNumberVisibility = #default-bar-number-visibility
+    automaticBars = ##t
+    
+    explicitClefVisibility = #all-visible
+    explicitKeySignatureVisibility = #all-visible
+    autoBeamSettings = #default-auto-beam-settings
+    autoBeaming = ##t
+    scriptDefinitions = #default-script-alist
+
+    verticalAlignmentChildCallback = #Align_interface::alignment_callback
+
+    pedalSustainStrings = #'("Ped." "*Ped." "*")
+    pedalSustainStyle = #'text
+    pedalUnaCordaStrings = #'("una corda" "" "tre corde")
+    pedalUnaCordaStyle = #'text
+
+    %% These are in ordinary italic font, including the *,
+    %% but they are unlikely to be used, 
+    %% as the default pedal-style for SostenutoPedal is 'mixed':
+    %% i.e.  Sost. Ped_____________________ 
+    pedalSostenutoStrings = #'("Sost. Ped." "*Sost. Ped." "*") 
+    pedalSostenutoStyle = #'mixed
+
+    fingeringOrientations = #'(up down)
+    tupletNumberFormatFunction = #denominator-tuplet-formatter
+    markFormatter = #format-mark-letters
+    rehearsalMark = #1 
+    subdivideBeams = ##f
+    allowBeamBreak = ##f
+    extraNatural = ##t
+    autoAccidentals = #'(Staff (same-octave . 0))
+    autoCautionaries = #'()  
+
+    keyAccidentalOrder = #`(
+       (6 . ,FLAT) (2  . ,FLAT) (5 . ,FLAT ) (1  . ,FLAT) (4  . ,FLAT) (0  . ,FLAT) (3  . ,FLAT)
+       (3  . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP) (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP)
+       (6 . ,DOUBLE-FLAT) (2  . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1  . ,DOUBLE-FLAT) (4  . ,DOUBLE-FLAT) (0  . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
+       (3  . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
+    )
+    breakAlignOrder = #'(
+    instrument-name
+    left-edge
+    ambitus
+    breathing-sign
+    clef
+    rehearsal-mark
+    staff-bar
+    key-signature
+    time-signature
+    custos
+    )
+    barCheckSynchronize = ##f
+    
+    %% chord names:
+    chordNameFunction = #ignatzek-chord-names
+    majorSevenSymbol = #whiteTriangleMarkup
+    chordNameSeparator = #(make-simple-markup  "/")
+    chordNameExceptions = #ignatzekExceptions
+    chordNoteNamer = #'()
+    chordRootNamer = #note-name->markup
+    chordNameExceptionsFull = #fullJazzExceptions
+    chordNameExceptionsPartial = #partialJazzExceptions
+    
+    %% tablature:
+    stringOneTopmost = ##t
+    highStringOne = ##t
+
+    %% One may change the strings tuning as following :
+    %% The lenght of the list must be equal to the number of string
+    stringTunings   = #guitar-tunings
+    tablatureFormat = #fret-number-tablature-format
+
+    %%
+    bassFigureFormatFunction = #make-bass-figure-markup
+    metronomeMarkFormatter = #format-metronome-markup
+    graceSettings = #`#(
+       (Voice Stem direction 1)
+
+       ;; TODO: should take from existing definition.
+       ;; c&p from define-grobs.scm
        
-       \grobdescriptions #all-grob-descriptions
+       (Voice Stem lengths ,(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0)))
+       (Voice Stem stem-shorten (0.4 0))
+       (Voice Stem  font-size -3)
+       (Voice NoteHead  font-size -3)
+       (Voice Dots  font-size -3)
+       (Voice Stem beamed-lengths  
+        ,(map (lambda (x) (* 0.8 x)) '(3.26)))
+       (Voice Stem beamed-minimum-free-lengths  
+        ,(map (lambda (x) (* 0.8 x)) '(2.5 2.0 1.5)))
+       (Voice Stem beamed-extreme-minimum-free-lengths  
+        ,(map (lambda (x) (* 0.8 x)) '(1.83 1.5)))
+
+       (Voice Stem no-stem-extend #t)
+       (Voice Beam thickness 0.384)
+       (Voice Beam space-function ,(lambda (beam mult)
+                                    (* 0.8 (Beam::space_function
+                                            beam mult))))
+       (Voice Beam position-callbacks (,Beam::least_squares
+                                       ,Beam::check_concave
+                                       ,Beam::slope_damping))
+       (Staff Accidental font-size -4)
+       (Voice Slur direction -1)
+    )
+    
+    \grobdescriptions #all-grob-descriptions
 }
 
 OrchestralScoreContext = \translator {
index b3573148bc236c7d24d855b2e227698b3ab4f125..595af54c4f47382f68b8020256cb0e7e8bdd8a4c 100644 (file)
@@ -12,7 +12,7 @@
 
 
 % For using "sostingut" notation, which is also correct
-\pitchnames #`(
+pitchnamesEspanol = #`(
        (dobb . ,(ly:make-pitch -1 0 DOUBLE-FLAT))
        (dob . ,(ly:make-pitch -1 0 FLAT))
        (do . ,(ly:make-pitch -1 0 NATURAL))
@@ -56,6 +56,6 @@
        (siss . ,(ly:make-pitch -1 6 DOUBLE-SHARP))
 )
 
+pitchnames = \pitchnamesEspanol
 
-
-\version "1.9.8"
+\version "2.1.19"
index 4971f643819506f51af0b6427a908ff9d167d3d2..d640456328324ac32374e2e3da76d5bbd4f79781 100644 (file)
@@ -3,7 +3,6 @@
 #(define-public point-and-click #f)
 #(define-public midi-debug #f)
 
-#(reset-drum-kit)
 
 \version "1.9.8"
 
index 291613c0b56ed163f0cf40c33b9edfa1ec229c48..418b9491f385e943535785cae5bd0afbf1a05441 100644 (file)
@@ -11,7 +11,7 @@
 % contributed by Paolo Zuliani <<zuliap@easynet.it>>
 % additions for semi-sharps and semi-flats by Eric Wurbel <<wurbel@univ-tln.fr>>
 
-\pitchnames #`(
+pitchnamesItaliano = #`(
        (dobb . ,(ly:make-pitch -1 0 DOUBLE-FLAT))
        (dobsb . ,(ly:make-pitch -1 0 THREE-Q-FLAT))
        (dob . ,(ly:make-pitch -1 0 FLAT))
@@ -84,4 +84,6 @@
 
 )
 
-\version "2.1.0"
+pitchnames = \pitchnamesItaliano
+
+\version "2.1.19"
index f8786302232af7296aa988b706a5cfc2b867547b..f0e1ad12be84e57d7f2eff3f274e6ddfb6fa2609 100644 (file)
@@ -1,9 +1,9 @@
-\version "1.9.8"
+\version "2.1.19"
 %{
  common dutch names for notes. es means flat, is means sharp
 %}
 
-\pitchnames #`(
+dutchPitchnames =  #`(
        (ceses . ,(ly:make-pitch -1 0 DOUBLE-FLAT))
 
        (ceh . ,(ly:make-pitch -1 0 SEMI-FLAT))
@@ -81,3 +81,4 @@
        )
 
 
+pitchnames = \dutchPitchnames 
index d8cee531fa86ee52db7083ce3389e167fea29d61..1f1ec4fdc43a35c0ea220a675cbd64e3d26b69f2 100644 (file)
@@ -27,7 +27,7 @@
 
 %}
 
-\pitchnames #`(
+pitchnamesNorsk = #`(
        (ceses . ,(ly:make-pitch -1 0 DOUBLE-FLAT))
        (cessess . ,(ly:make-pitch -1 0 DOUBLE-FLAT))
        (ces . ,(ly:make-pitch -1 0 FLAT))
 )
 
 
+pitchnames =\pitchnamesNorsk
 
-\version "1.9.8"
+\version "2.1.19"
index 7e111db3b41033695e7b538887db933fa1d65d0e..1a826871713194a95b12d6a5995de217722064da 100644 (file)
@@ -6,7 +6,7 @@
 % 2001/08/28 Heikki Junes <<heikki.junes@hut.fi>>
 %            added bb and marked heses as `unusual'
 
-\pitchnames #`(
+pitchnamesSuomi = #`(
        (ceses . ,(ly:make-pitch -1 0 DOUBLE-FLAT))
        (ces . ,(ly:make-pitch -1 0 FLAT))
        (c . ,(ly:make-pitch -1 0 NATURAL))
@@ -45,4 +45,7 @@
        (his . ,(ly:make-pitch -1 6 SHARP))
        (hisis . ,(ly:make-pitch -1 6 DOUBLE-SHARP))
 )
-\version "1.9.8"
+
+pitchnames = \pitchnamesSuomi
+
+\version "2.1.19"
index a3e07ce8426bfb02dbc3808803736f168320aeff..d81d7f1467b80f1ba1dc2575db6f1bdc6c28f9a6 100644 (file)
@@ -3,7 +3,7 @@
 %
 % by Mats Bengtsson.
 
-\pitchnames #`(
+pitchnamesSvenska = #`(
        (cessess . ,(ly:make-pitch -1 0 DOUBLE-FLAT))
        (cess . ,(ly:make-pitch -1 0 FLAT))
        (c . ,(ly:make-pitch -1 0 NATURAL))
@@ -40,4 +40,6 @@
        (hiss . ,(ly:make-pitch -1 6 SHARP))
        (hississ . ,(ly:make-pitch -1 6 DOUBLE-SHARP))
 )
-\version "1.9.8"
+
+pitchnames =  \pitchnamesSvenska
+\version "2.1.19"
index 2f4237f3d39827b438a6d98788b5364fb91f6b24..7adbf7f4878566f170b175a5cd447c84631ff6eb 100644 (file)
@@ -293,7 +293,7 @@ fet_beginchar("Half diamondhead", "1diamond",
 
 fet_endchar;
 
-fet_beginchar("Quart diamondheadh", "2diamondh", "diamondheadh")
+fet_beginchar("Quart diamondhead", "2diamond", "diamondhead")
        draw_outside_ellipse (1.80, 35, 0.495, -0.25);
 fet_endchar;
 
index a118419f74fc0ad3e52d5b22981cbce030a0c7db..b3badcf8d04f29b0fadb9ced2510612abf1b2987 100644 (file)
@@ -45,6 +45,8 @@ TODO: consider making type into symbol ")
 (music-property-description 'denominator integer? "denominator in a time signature")
 (music-property-description 'digit integer? "digit for fingering")
 (music-property-description 'direction ly:dir? "Print this up or down?")
+(music-property-description 'drum-type symbol? "Which percussion instrument to play this note on.")
+
 (music-property-description 'tags list? "List of symbols that for denoting extra details,
 eg. @code{\\tag #'part ...} could tag a piece of music as only being active in a part.")
 
index 6b31bd7524f6d611e6a2ce206d4a8fece2113fbe..2c675c159a8a9b824f49a4ef5d30c0316094d1dd 100644 (file)
@@ -1,13 +1,6 @@
 
 (define-public music-descriptions
   `(
-    (AbortEvent
-     . (
-   (description .  "End the currently running spanners.")
-       (internal-class-name . "Event")
-       (span-type . "abort")
-       (types . (general-music event abort-event))
-       ))
     (AbsoluteDynamicEvent
      . (
    (description . "Creates a dynamic mark.  Syntax: @var{note}@code{\\x},
index 617a51fa268c23c335dd639f55c5daf382483d68..047ef08d884d4a7a1e1b49ac0f0bfb520fd54986 100644 (file)
@@ -190,6 +190,14 @@ arpeggios that cross staves.
 (translator-property-description 'crescendoText markup? "Text to print at start of non-hairpin crecscendo, ie: @samp{cresc.}")
 (translator-property-description 'crescendoSpanner symbol? "Type of spanner to be used for crescendi.  One of: @samp{hairpin}, @samp{line}, @samp{dashed-line}, @samp{dotted-line}.  If unset, hairpin type is used.")
 (translator-property-description 'decrescendoText markup? "Text to print at start of non-hairpin decrecscendo, ie: @samp{dim.}")
+(translator-property-description 'drumStyleTable hash-table?
+                                "A hash table containing mapping drums to layout settings.
+Predefined values: @code{drums-style}, @code{timbales-style}, @code{congas-style}, @code{bongos-style}
+and @code{percussion-style}.
+
+The layout style is a hash table, containing the drum-pitches  (eg. the symbol @code{hihat}) as key,
+and a list (@var{notehead-style} @var{script} @var{vertical-position}) as values.
+ ")
 (translator-property-description 'currentBarNumber integer? "Contains the current barnumber. This property is incremented at
 every barline.
 ")
index c7979b59b1e1c05255803f67d0178198381571ca..97991c8971f1419d58d58dc4fb1588a2ea29a522 100644 (file)
   music-descriptions)
 
 
-(define (hash-table->alist t)
-  "Convert table t to list"
-  (apply append
-        (vector->list t)
-  ))
 
 (define (strip-description x)
     (cons (symbol->string (car x))
diff --git a/scm/drums.scm b/scm/drums.scm
deleted file mode 100644 (file)
index 66f3cf8..0000000
+++ /dev/null
@@ -1,332 +0,0 @@
-;;;; drum-"hack". See input/regression/drums.ly and ly/drumpitch-init.ly
-;;;; 2001/03/25 Rune Zedeler <rune@zedeler.dk>
-
-;;;; changed eval to primitive-eval for guile 1.4/1.4.1 compatibility --jcn
-
-;; TODO: the design of this hack should be rethought.
-
-
-;; ugh. Should make separate module?
-(define-public drum-pitch-names `(
-       (acousticbassdrum bda   ,(ly:make-pitch -3 6 NATURAL))
-       (bassdrum         bd    ,(ly:make-pitch -2 0 NATURAL))
-       (hisidestick      ssh   ,(ly:make-pitch -3 6 DOUBLE-SHARP))
-       (sidestick        ss    ,(ly:make-pitch -2 0 SHARP))
-       (losidestick      ssl   ,(ly:make-pitch -2 1 FLAT))
-       (acousticsnare    sna   ,(ly:make-pitch -2 1 NATURAL))
-       (snare            sn    ,(ly:make-pitch -2 2 DOUBLE-FLAT))
-       (handclap         hc    ,(ly:make-pitch -2 1 SHARP))
-       (electricsnare    sne   ,(ly:make-pitch -2 2 NATURAL))
-       (lowfloortom      tomfl ,(ly:make-pitch -2 3 NATURAL))
-       (closedhihat      hhc   ,(ly:make-pitch -2 3 SHARP))
-       (hihat            hh    ,(ly:make-pitch -2 4 FLAT))
-       (highfloortom     tomfh ,(ly:make-pitch -2 4 NATURAL))
-       (pedalhihat       hhp   ,(ly:make-pitch -2 4 SHARP))
-       (lowtom           toml  ,(ly:make-pitch -2 5 NATURAL))
-       (openhihat        hho   ,(ly:make-pitch -2 5 SHARP))
-       (halfopenhihat    hhho  ,(ly:make-pitch -2 5 SHARP))
-       (lowmidtom        tomml ,(ly:make-pitch -2 6 NATURAL))
-       (himidtom         tommh ,(ly:make-pitch -1 0 NATURAL))
-       (crashcymbala     cymca ,(ly:make-pitch -1 0 SHARP))
-       (crashcymbal      cymc  ,(ly:make-pitch -1 1 FLAT))
-       (hightom          tomh  ,(ly:make-pitch -1 1 NATURAL))
-       (ridecymbala      cymra ,(ly:make-pitch -1 1 SHARP))
-       (ridecymbal       cymr  ,(ly:make-pitch -1 2 FLAT))
-       (chinesecymbal    cymch ,(ly:make-pitch -1 2 NATURAL))
-       (ridebell         rb    ,(ly:make-pitch -1 3 NATURAL))
-       (tambourine       tamb  ,(ly:make-pitch -1 3 SHARP))
-       (splashcymbal     cyms  ,(ly:make-pitch -1 4 NATURAL))
-       (cowbell          cb    ,(ly:make-pitch -1 4 SHARP))
-       (crashcymbalb     cymcb ,(ly:make-pitch -1 5 NATURAL))
-       (vibraslap        vibs  ,(ly:make-pitch -1 5 SHARP))
-       (ridecymbalb      cymrb ,(ly:make-pitch -1 6 NATURAL))
-       (mutehibongo      bohm  ,(ly:make-pitch -1 6 SHARP))
-       (hibongo          boh   ,(ly:make-pitch 0 0 NATURAL))
-       (openhibongo      boho  ,(ly:make-pitch 0 1 DOUBLE-FLAT))
-       (mutelobongo      bolm  ,(ly:make-pitch -1 6 DOUBLE-SHARP))
-       (lobongo          bol   ,(ly:make-pitch 0 0 SHARP))
-       (openlobongo      bolo  ,(ly:make-pitch 0 1 FLAT))
-       (mutehiconga      cghm  ,(ly:make-pitch 0 1 NATURAL))
-       (muteloconga      cglm  ,(ly:make-pitch 0 2 DOUBLE-FLAT))
-       (openhiconga      cgho  ,(ly:make-pitch 0 1 SHARP))
-       (hiconga          cgh   ,(ly:make-pitch 0 2 FLAT))
-       (openloconga      cglo  ,(ly:make-pitch 0 1 DOUBLE-SHARP))
-       (loconga          cgl   ,(ly:make-pitch 0 2 NATURAL))
-       (hitimbale        timh  ,(ly:make-pitch 0 3 NATURAL))
-       (lotimbale        timl  ,(ly:make-pitch 0 3 SHARP))
-       (hiagogo          agh   ,(ly:make-pitch 0 4 NATURAL))
-       (loagogo          agl   ,(ly:make-pitch 0 4 SHARP))
-       (cabasa           cab   ,(ly:make-pitch 0 5 NATURAL))
-       (maracas          mar   ,(ly:make-pitch 0 5 SHARP))
-       (shortwhistle     whs   ,(ly:make-pitch 0 6 NATURAL))
-       (longwhistle      whl   ,(ly:make-pitch 1 0 NATURAL))
-       (shortguiro       guis  ,(ly:make-pitch 1 0 SHARP))
-       (longguiro        guil  ,(ly:make-pitch 1 1 NATURAL))
-       (guiro            gui   ,(ly:make-pitch 1 0 DOUBLE-SHARP))
-       (claves           cl    ,(ly:make-pitch 1 1 SHARP))
-       (hiwoodblock      wbh   ,(ly:make-pitch 1 2 NATURAL))
-       (lowoodblock      wbl   ,(ly:make-pitch 1 3 NATURAL))
-       (mutecuica        cuim  ,(ly:make-pitch 1 3 SHARP))
-       (opencuica        cuio  ,(ly:make-pitch 1 4 NATURAL))
-       (mutetriangle     trim  ,(ly:make-pitch 1 4 SHARP))
-       (triangle         tri   ,(ly:make-pitch 1 4 DOUBLE-SHARP))
-       (opentriangle     trio  ,(ly:make-pitch 1 5 NATURAL))
-       ;; "transposing" pitches:
-       (oneup            ua    ,(ly:make-pitch 0 1 NATURAL))
-       (twoup            ub    ,(ly:make-pitch 0 2 NATURAL))
-       (threeup          uc    ,(ly:make-pitch 0 3 NATURAL))
-       (fourup           ud    ,(ly:make-pitch 0 4 NATURAL))
-       (fiveup           ue    ,(ly:make-pitch 0 5 NATURAL))
-       (onedown          da    ,(ly:make-pitch -1 6 NATURAL))
-       (twodown          db    ,(ly:make-pitch -1 5 NATURAL))
-       (threedown        dc    ,(ly:make-pitch -1 4 NATURAL))
-       (fourdown         dd    ,(ly:make-pitch -1 3 NATURAL))
-       (fivedown         de    ,(ly:make-pitch -1 2 NATURAL))
-))
-
-;;
-;; all settings for percussive instruments.
-;; public so people can add their own stuff.
-;;
-
-(define-public
-  percussive-instrument-init-settings
-  `((drums
-    . (
-       (acousticbassdrum default       #f        ,(ly:make-pitch -1 4 NATURAL))
-       (bassdrum         default       #f        ,(ly:make-pitch -1 4 NATURAL))
-       (sidestick        cross         #f        ,(ly:make-pitch 0 1 NATURAL))
-       (acousticsnare    default       #f        ,(ly:make-pitch 0 1 NATURAL))
-       (snare            default       #f        ,(ly:make-pitch 0 1 NATURAL))
-       (handclap         triangle      #f        ,(ly:make-pitch 0 1 NATURAL))
-       (electricsnare    default       #f        ,(ly:make-pitch 0 1 NATURAL))
-       (lowfloortom      default       #f        ,(ly:make-pitch -1 3 NATURAL))
-       (closedhihat      cross         "stopped" ,(ly:make-pitch 0 3 NATURAL))
-       (hihat            cross         #f        ,(ly:make-pitch 0 3 NATURAL))
-       (highfloortom     default       #f        ,(ly:make-pitch -1 5 NATURAL))
-       (pedalhihat       cross         #f        ,(ly:make-pitch -1 2 NATURAL))
-       (lowtom           default       #f        ,(ly:make-pitch -1 6 NATURAL))
-       (openhihat        cross         "open"    ,(ly:make-pitch 0 3 NATURAL))
-       (halfopenhihat    xcircle       #f        ,(ly:make-pitch 0 3 NATURAL))
-       (lowmidtom        default       #f        ,(ly:make-pitch 0 0 NATURAL))
-       (himidtom         default       #f        ,(ly:make-pitch 0 2 NATURAL))
-       (crashcymbala     xcircle       #f        ,(ly:make-pitch 0 5 NATURAL))
-       (crashcymbal      xcircle       #f        ,(ly:make-pitch 0 5 NATURAL))
-       (hightom          default       #f        ,(ly:make-pitch 0 4 NATURAL))
-       (ridecymbala      cross         #f        ,(ly:make-pitch 0 5 NATURAL))
-       (ridecymbal       cross         #f        ,(ly:make-pitch 0 5 NATURAL))
-       (chinesecymbal    mensural      #f        ,(ly:make-pitch 0 5 NATURAL))
-       (ridebell         default       #f        ,(ly:make-pitch 0 5 NATURAL))
-       (splashcymbal     diamond       #f        ,(ly:make-pitch 0 5 NATURAL))
-       (cowbell          triangle      #f        ,(ly:make-pitch 0 5 NATURAL))
-       (crashcymbalb     cross         #f        ,(ly:make-pitch 0 5 NATURAL))
-       (vibraslap        diamond       #f        ,(ly:make-pitch 0 4 NATURAL))
-       (ridecymbalb      cross         #f        ,(ly:make-pitch 0 5 NATURAL))
-      ))
-
-  (timbales
-   . (
-       (losidestick      cross         #f        ,(ly:make-pitch -1 6 NATURAL))
-       (lotimbale        default       #f        ,(ly:make-pitch -1 6 NATURAL))
-       (cowbell          triangle      #f        ,(ly:make-pitch 0 2 NATURAL))
-       (hisidestick      cross         #f        ,(ly:make-pitch 0 1 NATURAL))
-       (hitimbale        default       #f        ,(ly:make-pitch 0 1 NATURAL))
-      ))
-
-  (congas
-   . (
-       (losidestick      cross         #f        ,(ly:make-pitch -1 6 NATURAL))
-       (loconga          default       #f        ,(ly:make-pitch -1 6 NATURAL))
-       (openloconga      default       "open"    ,(ly:make-pitch -1 6 NATURAL))
-       (muteloconga      default       "stopped" ,(ly:make-pitch -1 6 NATURAL))
-       (hisidestick      cross         #f        ,(ly:make-pitch 0 1 NATURAL))
-       (hiconga          default       #f        ,(ly:make-pitch 0 1 NATURAL))
-       (openhiconga      default       "open"    ,(ly:make-pitch 0 1 NATURAL))
-       (mutehiconga      default       "stopped" ,(ly:make-pitch 0 1 NATURAL))
-      ))
-
-  (bongos
-    . (
-       (losidestick      cross         #f        ,(ly:make-pitch -1 6 NATURAL))
-       (lobongo          default       #f        ,(ly:make-pitch -1 6 NATURAL))
-       (openlobongo      default       "open"    ,(ly:make-pitch -1 6 NATURAL))
-       (mutelobongo      default       "stopped" ,(ly:make-pitch -1 6 NATURAL))
-       (hisidestick      cross         #f        ,(ly:make-pitch 0 1 NATURAL))
-       (hibongo          default       #f        ,(ly:make-pitch 0 1 NATURAL))
-       (openhibongo      default       "open"    ,(ly:make-pitch 0 1 NATURAL))
-       (mutehibongo      default       "stopped" ,(ly:make-pitch 0 1 NATURAL))
-      ))
-
-
-  (percussion
-   . (
-       (opentriangle     cross         "open"    ,(ly:make-pitch 0 0 NATURAL))
-       (mutetriangle     cross         "stopped" ,(ly:make-pitch 0 0 NATURAL))
-       (triangle         cross         #f        ,(ly:make-pitch 0 0 NATURAL))
-       (shortguiro       default       "staccato",(ly:make-pitch 0 0 NATURAL))
-       (longguiro        default       "tenuto"  ,(ly:make-pitch 0 0 NATURAL))
-       (guiro            default       #f        ,(ly:make-pitch 0 0 NATURAL))
-       (cowbell          triangle      #f        ,(ly:make-pitch 0 0 NATURAL))
-       (claves           default       #f        ,(ly:make-pitch 0 0 NATURAL))
-       (tambourine       default       #f        ,(ly:make-pitch 0 0 NATURAL))
-       (cabasa           cross         #f        ,(ly:make-pitch 0 0 NATURAL))
-       (maracas          default       #f        ,(ly:make-pitch 0 0 NATURAL))
-       (handclap         default       #f        ,(ly:make-pitch 0 0 NATURAL))
-      ))
-  ))
-
-
-(define percussive-instrument-settings percussive-instrument-init-settings)
-
-;; don't use assoc-set!, since this will overwrite Scheme defaults, and leak
-;; into other files.
-(define-public (set-drum-kit kit value)
-  (set! percussive-instrument-settings
-       (acons kit value  percussive-instrument-settings)))
-
-(define-public (reset-drum-kit)
-  (set! percussive-instrument-settings percussive-instrument-init-settings))
-
-(define-public (get-drum-kit kit)
-  (assoc-get-default kit percussive-instrument-settings '()))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-
-(define (make-articulation-script x) 
-     (let* ((m (make-music-by-name 'ArticulationEvent)))
-     (ly:set-mus-property! m 'articulation-type x)
-     m))
-
-;; adds the articulation script x to m if x is not #f.
-(define (add-articulation-script m x)
-  (if x
-   (if (and x (equal? (ly:get-mus-property m 'name) 'EventChord))
-     (ly:set-mus-property! m 'elements
-       (cons (make-articulation-script x) (ly:get-mus-property m 'elements))
-     )
-     (let* ( (es (ly:get-mus-property m 'elements))
-            (e (ly:get-mus-property m 'element)) )
-       (map (lambda (y) (add-articulation-script y x)) es)
-       (if (ly:music? e)
-         (add-articulation-script e x))
-     )
-   )
-  )
-  m
- )
-
-(define (make-head-type-elem t)
-   (let* ( (m (make-music-by-name 'OverrideProperty)))
-     (set-mus-properties!
-      m
-      `((symbol . NoteHead)
-       (grob-property . style)
-       (grob-value . ,t)
-       (pop-first  . #t)))
-      m
-
-   )
- )
-
-(define (make-head-type t)
-  (context-spec-music (make-head-type-elem t) 'Thread))
-
-(define (make-thread-context thread-name element)
-  (context-spec-music element 'Thread thread-name))
-
-;; makes a sequential-music of thread-context, head-change and note
-(define (make-drum-head kit req-ch )
-  (let ((es (ly:get-mus-property req-ch 'elements)))
-   (if (equal? es '())
-    req-ch
-    (let* ((fe (car es))
-           (oldp (ly:get-mus-property fe 'pitch))
-         )
-      (if (not (ly:pitch? oldp))
-       req-ch
-       (let* ((pap ((pitch->paper kit) oldp ))
-             (style (car pap))
-             (script (cadr pap))
-             (pitch (caddr pap))
-             (ht (make-head-type style))
-             (seq (make-sequential-music (list ht req-ch)))
-             )
-         (add-articulation-script req-ch script)
-         (ly:set-mus-property! fe 'pitch pitch)
-         (set! req-ch (make-thread-context (symbol->string style) seq))
-        req-ch
-       )
-      )
-    )
-   )
-  )
- )
-
-;; whoa, hadn't head of "assoc" when I made this :)
-(define ((pitch->paper kit) p)
-   (let p2p ((pitches drum-pitch-names))
-     (cond ((eq? pitches '())     
-             (begin
-              (display p) ;; UGH. FIXME. pitch->string ???
-              (ly:warn " unknown drumpitch.")
-              (cdar (get-drum-kit kit))
-          ))
-         ((eq? p (caddr (car pitches))) ((name->paper kit) (caar pitches)) )
-        (else                          (p2p (cdr pitches) ) )
-     )
-   )
- )
-
-(define ((name->paper kit) n)
-   (let n2p ((pitches (get-drum-kit kit)))
-     (cond ((eq? pitches '())
-             (begin
-              (ly:warn (string-append "Kit `" (symbol->string kit) "' doesn't contain drum `" n
-                                      "'\nSee ly/drumpitch-init.ly for supported drums."))
-              (cdar (get-drum-kit kit))
-            ))
-           ((eq? n (caar pitches))  (cdar pitches) )
-          (else                    (n2p (cdr pitches) ) )
-     )
-   )
- )
-
-;;
-;; converts a midi-pitched (ly/drumpitch.ly) file to paper output.
-;;
-(define-public ((drums->paper kit) music)
-  (begin
-   (if (equal? (ly:get-mus-property music 'name) 'EventChord)
-    (set! music (make-drum-head kit music))
-    (let* ((es (ly:get-mus-property music 'elements))
-           (e (ly:get-mus-property music 'element))
-           (p (ly:get-mus-property music 'pitch))
-           (body (ly:get-mus-property music 'body))
-           (alts (ly:get-mus-property music 'alternatives)))
-
-      (if (pair? es)
-       (ly:set-mus-property! music 'elements (map (drums->paper kit) es) )
-      )
-
-      (if (ly:music? alts)
-        (ly:set-mus-property!
-         music 'alternatives
-         ((drums->paper kit) alts)))
-
-      (if (ly:music? body)
-        (ly:set-mus-property!
-         music 'body
-         ((drums->paper kit) body)))
-
-      (if (ly:music? e)
-        (begin
-          (ly:set-mus-property!
-           music 'element
-           ((drums->paper kit) e))
-        ))))
-   music
-  ))
-
-
index 65e40d0c2b4cfb7b6a0d6b060f56684f131599be..882445dae340a1cad09e36e4342554d37e635c5c 100644 (file)
       ))
  
 
+(define-public (hash-table->alist t)
+  "Convert table t to list"
+  (apply append
+        (vector->list t)
+  ))
+
+;; todo: code dup with C++. 
+(define-public (alist->hash-table l)
+  "Convert alist to table"
+  (let
+      ((m (make-hash-table (length l))))
+
+    (map (lambda (k-v)
+          (hashq-set! m (car k-v) (cdr k-v)))
+        l)
+
+    m))
+       
+
 
 ;;;;;;;;;;;;;;;;
 ; list
@@ -383,7 +402,6 @@ L1 is copied, L2 not.
        "define-translator-properties.scm"
        "translation-functions.scm"
        "script.scm"
-       "drums.scm"
        "midi.scm"
 
        "beam.scm"
index c2908d0698e5a418eee451a08de8943b1f49444b..596798627bf4ca25372c55b809ca087a3ff81f37 100644 (file)
@@ -1762,6 +1762,7 @@ def conv (str):
 
 conversions.append (((2,1,17), conv, """\\partcombine syntax change to \\newpartcombine"""))
 
+
 def conv (str):
        str = re.sub (r'\\newpartcombine', r'\\partcombine', str)
        str = re.sub (r'\\autochange\s+Staff', r'\\autochange ', str)
@@ -1771,6 +1772,23 @@ conversions.append (((2,1,18), conv, """\\newpartcombine -> \\partcombine,
 \\autochange Staff -> \\autochange
 """))
 
+
+
+def conv (str):
+       str = re.sub (r'\\include "drumpitch-init.ly','', str)
+       str = re.sub (r'\\pitchnames ','pitchnames = ', str)
+       str = re.sub (r'\\chordmodifiers ','chordmodifiers = ', str)
+
+       if re.search ('drums->paper', str):
+               sys.stderr.write ("\nDrum notation found. Check file manually!")
+               
+       str = re.sub (r"""\\apply\s+#\(drums->paper\s+'([a-z]+)\)""",
+                     r"""\property DrumStaff.drumStyleTable = #\1-style""",
+                     str)
+       return str
+
+conversions.append (((2,1,19), conv, """Drum notation changes, Removing \chordmodifiers, \notenames  ."""))
+
 ################################
 #      END OF CONVERSIONS      
 ################################