]> git.donarmstrong.com Git - lilypond.git/commitdiff
Bring dev/johngourlay/issue-4751 up to date with respect to staging.
authorJohn Gourlay <john@weathervanefarm.net>
Fri, 10 Jun 2016 14:22:41 +0000 (10:22 -0400)
committerJohn Gourlay <john@weathervanefarm.net>
Fri, 10 Jun 2016 14:22:41 +0000 (10:22 -0400)
268 files changed:
Documentation/es/web/community.itexi
Documentation/fr/web/community.itexi
Documentation/ja/web/community.itexi
Documentation/snippets/contemporary-notation.snippet-list
Documentation/snippets/customize-drumpitchnames,-drumstyletable-and-drumpitchtable-in-layout-and-midi.ly [new file with mode: 0644]
Documentation/snippets/flat-ties.ly [new file with mode: 0644]
Documentation/snippets/midi.snippet-list
Documentation/snippets/obtaining-2.12-lyrics-spacing-in-newer-versions.ly
Documentation/snippets/percussion.snippet-list
Documentation/snippets/piano-template-with-centered-lyrics.ly
Documentation/snippets/pitches.snippet-list
Documentation/snippets/scheme-language.snippet-list
Documentation/snippets/simultaneous-notes.snippet-list
Documentation/snippets/specific-notation.snippet-list
Documentation/snippets/staff-notation.snippet-list
Documentation/snippets/tweaks-and-overrides.snippet-list
Documentation/snippets/two--partcombine-pairs-on-one-staff.ly [new file with mode: 0644]
Documentation/web/community.itexi
Documentation/web/news-front.itexi
Documentation/web/news.itexi
VERSION
aclocal.m4
lily/accidental-engraver.cc
lily/all-font-metrics.cc
lily/ambitus-engraver.cc
lily/arpeggio-engraver.cc
lily/auto-beam-engraver.cc
lily/axis-group-engraver.cc
lily/balloon-engraver.cc
lily/bar-engraver.cc
lily/bar-number-engraver.cc
lily/beam-collision-engraver.cc
lily/beam-engraver.cc
lily/beam-performer.cc
lily/bend-engraver.cc
lily/book-scheme.cc
lily/box.cc
lily/break-align-engraver.cc
lily/breathing-sign-engraver.cc
lily/callback.cc [deleted file]
lily/chord-name-engraver.cc
lily/chord-tremolo-engraver.cc
lily/clef-engraver.cc
lily/cluster-engraver.cc
lily/collision-engraver.cc
lily/completion-note-heads-engraver.cc
lily/completion-rest-engraver.cc
lily/concurrent-hairpin-engraver.cc
lily/context-def.cc
lily/context-mod.cc
lily/context-property.cc
lily/context.cc
lily/control-track-performer.cc
lily/cue-clef-engraver.cc
lily/custos-engraver.cc
lily/default-bar-line-engraver.cc
lily/dispatcher.cc
lily/dot-column-engraver.cc
lily/dots-engraver.cc
lily/double-percent-repeat-engraver.cc
lily/drum-note-engraver.cc
lily/drum-note-performer.cc
lily/duration.cc
lily/dynamic-align-engraver.cc
lily/dynamic-engraver.cc
lily/dynamic-performer.cc
lily/episema-engraver.cc
lily/extender-engraver.cc
lily/figured-bass-engraver.cc
lily/figured-bass-position-engraver.cc
lily/fingering-column-engraver.cc
lily/fingering-engraver.cc
lily/font-metric.cc
lily/font-size-engraver.cc
lily/footnote-engraver.cc
lily/forbid-break-engraver.cc
lily/fretboard-engraver.cc
lily/glissando-engraver.cc
lily/grace-engraver.cc
lily/grace-spacing-engraver.cc
lily/grid-line-span-engraver.cc
lily/grid-point-engraver.cc
lily/grob-array.cc
lily/grob-pq-engraver.cc
lily/grob-smob.cc
lily/horizontal-bracket-engraver.cc
lily/hyphen-engraver.cc
lily/include/all-font-metrics.hh
lily/include/book.hh
lily/include/box.hh
lily/include/callback.hh
lily/include/coherent-ligature-engraver.hh
lily/include/context-def.hh
lily/include/context-mod.hh
lily/include/context.hh
lily/include/dispatcher.hh
lily/include/duration.hh
lily/include/engraver.hh
lily/include/font-metric.hh
lily/include/gregorian-ligature-engraver.hh
lily/include/grob-array.hh
lily/include/grob-interface.hh
lily/include/grob.hh
lily/include/input.hh
lily/include/ligature-engraver.hh
lily/include/lily-imports.hh
lily/include/lily-lexer.hh
lily/include/lily-parser.hh
lily/include/listener.hh
lily/include/moment.hh
lily/include/music-function.hh
lily/include/music-iterator.hh
lily/include/music-output.hh
lily/include/output-def.hh
lily/include/page-marker.hh
lily/include/paper-book.hh
lily/include/paper-column-engraver.hh
lily/include/paper-outputter.hh
lily/include/pitch.hh
lily/include/prob.hh
lily/include/protected-scm.hh
lily/include/scale.hh
lily/include/scheme-engraver.hh
lily/include/scm-hash.hh
lily/include/score.hh
lily/include/skyline-pair.hh
lily/include/skyline.hh
lily/include/slur-proto-engraver.hh
lily/include/smobs.hh
lily/include/smobs.tcc
lily/include/source-file.hh
lily/include/spring.hh
lily/include/stencil.hh
lily/include/translator-dispatch-list.hh
lily/include/translator-group.hh
lily/include/translator.hh
lily/include/translator.icc
lily/include/unpure-pure-container.hh
lily/input-smob.cc
lily/instrument-name-engraver.cc
lily/instrument-switch-engraver.cc
lily/keep-alive-together-engraver.cc
lily/key-engraver.cc
lily/key-performer.cc
lily/kievan-ligature-engraver.cc
lily/laissez-vibrer-engraver.cc
lily/ledger-line-engraver.cc
lily/ligature-bracket-engraver.cc
lily/lily-imports.cc
lily/lily-lexer.cc
lily/lily-parser.cc
lily/listener.cc
lily/lyric-engraver.cc
lily/lyric-performer.cc
lily/mark-engraver.cc
lily/measure-grouping-engraver.cc
lily/melody-engraver.cc
lily/mensural-ligature-engraver.cc
lily/metronome-engraver.cc
lily/midi-control-function-performer.cc
lily/moment.cc
lily/multi-measure-rest-engraver.cc
lily/music-function.cc
lily/music-iterator.cc
lily/music-output.cc
lily/new-fingering-engraver.cc
lily/note-head-line-engraver.cc
lily/note-heads-engraver.cc
lily/note-name-engraver.cc
lily/note-performer.cc
lily/note-spacing-engraver.cc
lily/open-type-font-scheme.cc
lily/ottava-engraver.cc
lily/output-def-scheme.cc
lily/output-property-engraver.cc
lily/page-marker.cc
lily/page-turn-engraver.cc
lily/paper-book.cc
lily/paper-column-engraver.cc
lily/paper-outputter.cc
lily/parenthesis-engraver.cc
lily/parser.yy
lily/part-combine-engraver.cc
lily/percent-repeat-engraver.cc
lily/pfb-scheme.cc
lily/phrasing-slur-engraver.cc
lily/piano-pedal-align-engraver.cc
lily/piano-pedal-engraver.cc
lily/piano-pedal-performer.cc
lily/pitch-squash-engraver.cc
lily/pitch.cc
lily/pitched-trill-engraver.cc
lily/prob.cc
lily/protected-scm.cc
lily/pure-from-neighbor-engraver.cc
lily/repeat-acknowledge-engraver.cc
lily/repeat-tie-engraver.cc
lily/rest-collision-engraver.cc
lily/rest-engraver.cc
lily/rhythmic-column-engraver.cc
lily/scale.cc
lily/scheme-engraver.cc
lily/scm-hash.cc
lily/score.cc
lily/script-column-engraver.cc
lily/script-engraver.cc
lily/script-row-engraver.cc
lily/separating-line-group-engraver.cc
lily/skyline-pair.cc
lily/skyline.cc
lily/slash-repeat-engraver.cc
lily/slur-engraver.cc
lily/slur-performer.cc
lily/source-file.cc
lily/spacing-engraver.cc
lily/span-arpeggio-engraver.cc
lily/span-bar-engraver.cc
lily/span-bar-stub-engraver.cc
lily/spanner-break-forbid-engraver.cc
lily/spring-smob.cc
lily/staff-collecting-engraver.cc
lily/staff-performer.cc
lily/staff-symbol-engraver.cc
lily/stanza-number-align-engraver.cc
lily/stanza-number-engraver.cc
lily/stem-engraver.cc
lily/stencil.cc
lily/system-start-delimiter-engraver.cc
lily/tab-note-heads-engraver.cc
lily/tab-staff-symbol-engraver.cc
lily/tab-tie-follow-engraver.cc
lily/tempo-performer.cc
lily/text-engraver.cc
lily/text-spanner-engraver.cc
lily/tie-engraver.cc
lily/tie-performer.cc
lily/time-signature-engraver.cc
lily/time-signature-performer.cc
lily/timing-translator.cc
lily/translator-dispatch-list.cc
lily/translator-group.cc
lily/translator.cc
lily/trill-spanner-engraver.cc
lily/tuplet-engraver.cc
lily/tweak-engraver.cc
lily/undead.cc
lily/unpure-pure-container.cc
lily/vaticana-ligature-engraver.cc
lily/vertical-align-engraver.cc
lily/volta-engraver.cc
ly/Welcome-to-LilyPond-MacOS.ly
ly/Welcome_to_LilyPond.ly
mf/99-lilypond-fonts.conf.in
po/lilypond.pot
scm/chord-entry.scm
scm/define-context-properties.scm
scm/define-event-classes.scm
scm/define-music-display-methods.scm
scm/define-note-names.scm
scm/framework-ps.scm
scm/lily.scm
scm/output-ps.scm
scm/output-svg.scm
scripts/build/create-weblinks-itexi.py
scripts/midi2ly.py
stepmake/stepmake/executable-rules.make
stepmake/stepmake/test-rules.make
tex/texinfo.tex

index 72d2bd2df430c9b7c5bcf82cafa9d225218beade..cdbf9c870dfb1973e884fa8fee694c7139338fa2 100644 (file)
@@ -1059,7 +1059,7 @@ Carl Sorensen
 Para barras de corchea normales, de pentagrama cruzado,
 interrumpidas y en Ã¡ngulo.  El barrado debería depender del
 contexto y de las notas vecinas (véase la sección 2.2 de
-@uref{http://imslp.org/wiki/Repository_of_Music-Notation_Mistakes_%28Coulon,_Jean-Pierre%29,
+@uref{http://imslp.org/wiki/Repository_of_Music-Notation_Mistakes_%28Coulon%2C_Jean-Pierre%29,
 este libro}).  Si es posible, reducir el tiempo de cálculo del
 barrado.
 
index b0ff6a68cb2d718bfb784034b1eca89d2250d549..98cf3dc3b03c29e4c744c06581342a94c15ac691 100644 (file)
@@ -1092,7 +1092,7 @@ LilyPond
 Une ligature, qu'elle soit rectiligne, passe d'une portée Ã  l'autre,
 discontinue ou coudée, devrait dépendre du contexte et des notes
 adjacentes (voir
-@uref{http://imslp.org/wiki/Repository_of_Music-Notation_Mistakes_%28Coulon,_Jean-Pierre%29,
+@uref{http://imslp.org/wiki/Repository_of_Music-Notation_Mistakes_%28Coulon%2C_Jean-Pierre%29,
 la section 2.2 de cet article}).  Dans la mesure du possible, raccourcir
 le temps de calcul nécessaire Ã  la génération des ligatures.
 
index 7a5e4de0cbcccd4ac46828f2033c80d7eaf75272..0b8448c59b354ae8747c413cf0ed910e94fe656a 100644 (file)
@@ -1027,7 +1027,7 @@ Carl Sorensen
 
 For regular, cross-staff, broken and kneed beams.  Beaming should depend
 on context and neighbor notes (see section 2.2 of
-@uref{http://imslp.org/wiki/Repository_of_Music-Notation_Mistakes_%28Coulon,_Jean-Pierre%29,
+@uref{http://imslp.org/wiki/Repository_of_Music-Notation_Mistakes_%28Coulon%2C_Jean-Pierre%29,
 this book}).  If possible also reduce beaming-computation time.
 
 @strong{Difficulty:} medium
index 098532b9612292a9a54bd76b2c7df02b1abf9026..b12e5980dd81307fd6a8ecd3161a32864da7acf1 100644 (file)
@@ -4,6 +4,7 @@ clusters.ly
 contemporary-glissando.ly
 double-glissando.ly
 flat-flags-and-beam-nibs.ly
+flat-ties.ly
 flute-slap-notation.ly
 heavily-customized-polymetric-time-signatures.ly
 laissez-vibrer-ties.ly
diff --git a/Documentation/snippets/customize-drumpitchnames,-drumstyletable-and-drumpitchtable-in-layout-and-midi.ly b/Documentation/snippets/customize-drumpitchnames,-drumstyletable-and-drumpitchtable-in-layout-and-midi.ly
new file mode 100644 (file)
index 0000000..0d2a8ce
--- /dev/null
@@ -0,0 +1,151 @@
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
+
+\header {
+  lsrtags = "midi, percussion, pitches, specific-notation"
+
+  texidoc = "
+If you want to use customized drum-pitch-names for an own drum-style
+with proper output for layout and midi, follow the steps as
+demonstrated in the code below. In short:
+
+* define the names * define the appearence * tell LilyPond to use it
+for layout * assign pitches to the names * tell LilyPond to use them
+for midi
+
+"
+  doctitle = "Customize drumPitchNames drumStyleTable and drumPitchTable in layout and midi"
+} % begin verbatim
+
+%% This snippet tries to amend
+%% NR 2.5.1 Common notation for percussion - Custom percussion staves
+%% http://lilypond.org/doc/v2.18/Documentation/notation/common-notation-for-percussion#custom-percussion-staves
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% To use custom drum-pitch-names for your score and midi you need to follow
+%% this route:
+%%
+%%%%%%%%%%%%
+%% LAYOUT:
+%%%%%%%%%%%%
+%%
+%% (1) Define a name and put it in `drumPitchNames'
+%%     This can be done at toplevel with
+%%         drumPitchNames #'my-name  = #'my-name
+%%     or shorter:
+%%         drumPitchNames.my-name  = #'my-name
+%%     It's possible to add an alias as well.
+%% (2) Define how it should be printed
+%%     Therefore put them into a toplevel-list, where each entry should look:
+%%         (my-name
+%%           note-head-style-or-default
+%%             articulation-string-or-#f
+%%               staff-position)
+%%     Example:
+%%         #(define my-style
+%%           '(
+%%             (my-name default "tenuto" -1)
+%%             ; ...
+%%             ))
+%% (3) Tell LilyPond to use this custom-definitions, with
+%%         drumStyleTable = #(alist->hash-table my-style)
+%%     in a \layout or \with
+%%
+%%     Now we're done for layout, here a short, but complete example:
+%%         \new DrumStaff
+%%           \with { drumStyleTable = #(alist->hash-table my-style) }
+%%           \drummode { my-name }
+%%
+%%%%%%%%%%%%
+%% MIDI:
+%%%%%%%%%%%%
+%%
+%% (1) Again at toplvel, assign a pitch to your custom-note-name
+%%         midiDrumPitches #'my-name = #(ly:make-pitch -1 4 FLAT)
+%%     or shorter:
+%%         midiDrumPitches.my-name = ges
+%%     Note that you have to use the name, which is in drumPitchNames, no alias
+%% (2) Tell LilyPond to use this pitch(es), with
+%%         drumPitchTable = #(alist->hash-table midiDrumPitches)
+%%
+%%     Example:
+%%         \score {
+%%            \new DrumStaff
+%%             \with {
+%%               drumStyleTable = #(alist->hash-table my-style)
+%%               drumPitchTable = #(alist->hash-table midiDrumPitches)
+%%             }
+%%             \drummode { my-name4 }
+%%           \layout {}
+%%           \midi {}
+%%         }
+%%
+%%%%%%%%%%%%
+%% TESTING
+%%%%%%%%%%%%
+%%
+%% To test whether all is fine, run the following sequence in terminal:
+%%         lilypond my-file.ly
+%%         midi2ly my-file.midi
+%%         gedit my-file-midi.ly
+%%
+%% Which will do:
+%% 1. create pdf and midi
+%% 2. transform the midi back to a .ly-file
+%%    (note: midi2ly is not always good in correctly identifying enharmonic pitches)
+%% 3. open this file in gedit (or use another editor)
+%% Now watch what you've got.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% FULL EXAMPLE
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+drumPitchNames.dbass      = #'dbass
+drumPitchNames.dba        = #'dbass  % 'db is in use already
+drumPitchNames.dbassmute  = #'dbassmute
+drumPitchNames.dbm        = #'dbassmute
+drumPitchNames.do         = #'dopen
+drumPitchNames.dopenmute  = #'dopenmute
+drumPitchNames.dom        = #'dopenmute
+drumPitchNames.dslap      = #'dslap
+drumPitchNames.ds         = #'dslap
+drumPitchNames.dslapmute  = #'dslapmute
+drumPitchNames.dsm        = #'dslapmute
+
+#(define djembe
+  '((dbass      default  #f         -2)
+    (dbassmute  default  "stopped"  -2)
+    (dopen      default  #f          0)
+    (dopenmute  default  "stopped"   0)
+    (dslap      default  #f          2)
+    (dslapmute  default  "stopped"   2)))
+
+midiDrumPitches.dbass = g
+midiDrumPitches.dbassmute = fis
+midiDrumPitches.dopen =  a
+midiDrumPitches.dopenmute = gis
+midiDrumPitches.dslap =  b
+midiDrumPitches.dslapmute = ais
+
+one = \drummode { r4 dba4 do ds r dbm dom dsm }
+
+\score {
+   \new DrumStaff
+    \with {
+      \override StaffSymbol.line-count =  #3
+      instrumentName = #"Djembe "
+      drumStyleTable = #(alist->hash-table djembe)
+      drumPitchTable = #(alist->hash-table midiDrumPitches)
+    }
+    \one
+  \layout {}
+  \midi {}
+}
diff --git a/Documentation/snippets/flat-ties.ly b/Documentation/snippets/flat-ties.ly
new file mode 100644 (file)
index 0000000..db63fb4
--- /dev/null
@@ -0,0 +1,117 @@
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
+
+\header {
+  lsrtags = "contemporary-notation, scheme-language, staff-notation, tweaks-and-overrides"
+
+  texidoc = "
+The function takes the default @code{Tie.stencil} as an argument,
+calculating the result relying on the extents of this default. Further
+tweaking is possible by overriding @code{Tie.details.height-limit} or
+with @code{\\shape}. It's also possible to change the custom-definition
+on the fly.
+
+"
+  doctitle = "Flat Ties"
+} % begin verbatim
+
+%% http://lsr.di.unimi.it/LSR/Item?id=1031
+
+#(define ((flared-tie coords) grob)
+
+  (define (pair-to-list pair)
+     (list (car pair) (cdr pair)))
+
+  (define (normalize-coords goods x y dir)
+    (map
+      (lambda (coord)
+        ;(coord-scale coord (cons x (* y dir)))
+        (cons (* x (car coord)) (* y dir (cdr coord))))
+      goods))
+
+  (define (my-c-p-s points thick)
+    (make-connected-path-stencil
+      points
+      thick
+      1.0
+      1.0
+      #f
+      #f))
+
+  ;; outer let to trigger suicide
+  (let ((sten (ly:tie::print grob)))
+    (if (grob::is-live? grob)
+        (let* ((layout (ly:grob-layout grob))
+               (line-thickness (ly:output-def-lookup layout 'line-thickness))
+               (thickness (ly:grob-property grob 'thickness 0.1))
+               (used-thick (* line-thickness thickness))
+               (dir (ly:grob-property grob 'direction))
+               (xex (ly:stencil-extent sten X))
+               (yex (ly:stencil-extent sten Y))
+               (lenx (interval-length xex))
+               (leny (interval-length yex))
+               (xtrans (car xex))
+               (ytrans (if (> dir 0)(car yex) (cdr yex)))
+               (uplist
+                 (map pair-to-list
+                      (normalize-coords coords lenx (* leny 2) dir))))
+
+   (ly:stencil-translate
+       (my-c-p-s uplist used-thick)
+     (cons xtrans ytrans)))
+   '())))
+
+#(define flare-tie
+  (flared-tie '((0 . 0)(0.1 . 0.2) (0.9 . 0.2) (1.0 . 0.0))))
+
+\layout {
+  \context {
+    \Voice
+    \override Tie.stencil = #flare-tie
+  }
+}
+
+\paper { ragged-right = ##f }
+
+\relative c' {
+  a4~a
+  \override Tie.height-limit = 4
+  a'4~a
+  a'4~a
+  <a,, c e a c e a c e>~ q
+
+  \break
+
+  a'4~a
+  \once \override Tie.details.height-limit = 14
+  a4~a
+
+  \break
+
+  a4~a
+  \once \override Tie.details.height-limit = 0.5
+  a4~a
+
+  \break
+
+  a4~a
+  \shape #'((0 . 0) (0 . 0.4) (0 . 0.4) (0 . 0)) Tie
+  a4~a
+
+  \break
+
+  a4~a
+  \once \override Tie.stencil =
+    #(flared-tie '((0 . 0)(0.1 . 0.4) (0.9 . 0.4) (1.0 . 0.0)))
+  a4~a
+
+  a4~a
+  \once \override Tie.stencil =
+    #(flared-tie '((0 . 0)(0.06 . 0.1) (0.94 . 0.1) (1.0 . 0.0)))
+  a4~a
+}
index ecc73acb4ec684a3a281941deb1d7cc73b8cc445..243a5a03a077a3f4c6cfbddfe3d30480faca3651 100644 (file)
@@ -1,5 +1,6 @@
 changing-midi-output-to-one-channel-per-voice.ly
 changing-the-tempo-without-a-metronome-mark.ly
 creating-custom-dynamics-in-midi-output.ly
+customize-drumpitchnames,-drumstyletable-and-drumpitchtable-in-layout-and-midi.ly
 demo-midiinstruments.ly
 replacing-default-midi-instrument-equalization.ly
index 1b294569e36e422ffde26d600bb93215525f6a25..de3e108a48ddd409f42afcee13e1ec400e16a6d2 100644 (file)
@@ -49,7 +49,7 @@ bassMusic = \relative c {
 }
 
 words = \lyricmode {
-  Great is Thy faith- ful- ness,
+  Great is Thy faith -- ful -- ness,
 }
 
 \score {
index 5a29fb2c15ba4277b065119f7803ae21c2b6efb8..edef3b78e2c16030d4d2501963dcbbf36d4bb1f0 100644 (file)
@@ -1,4 +1,5 @@
 adding-drum-parts.ly
+customize-drumpitchnames,-drumstyletable-and-drumpitchtable-in-layout-and-midi.ly
 heavily-customized-polymetric-time-signatures.ly
 jazz-combo-template.ly
 percussion-beaters.ly
index d1f05af6dcf6d13257a4f06c86539221883519f3..008535e304ef6cdf50082a81294bccd01b208260 100644 (file)
@@ -38,20 +38,11 @@ text = \lyricmode {
 }
 
 \score {
-  \new GrandStaff <<
+  \new PianoStaff <<
     \new Staff = upper { \new Voice = "singer" \upper }
     \new Lyrics \lyricsto "singer" \text
     \new Staff = lower { \lower }
   >>
-  \layout {
-    \context {
-      \GrandStaff
-      \accepts "Lyrics"
-    }
-    \context {
-      \Lyrics
-      \consists "Bar_engraver"
-    }
-  }
+  \layout { }
   \midi { }
 }
index 7410307eb56c51fd12a96bef68c36872d8668d93..ce27407d6774da7489cab95ac2d3a8f3698b3473 100644 (file)
@@ -12,6 +12,7 @@ clefs-can-be-transposed-by-arbitrary-amounts.ly
 coloring-notes-depending-on-their-pitch.ly
 creating-a-sequence-of-notes-on-various-pitches.ly
 creating-custom-key-signatures.ly
+customize-drumpitchnames,-drumstyletable-and-drumpitchtable-in-layout-and-midi.ly
 forcing-a-clef-symbol-to-be-displayed.ly
 generating-random-notes.ly
 hiding-accidentals-on-tied-notes-at-the-start-of-a-new-system.ly
index 2513ba46821897a6c08c4b9fcd31f2ebf82ee258..a963aea6be9089a9804e0b2f30b2484975d7e58a 100644 (file)
@@ -11,6 +11,7 @@ customizing-the-position-and-number-of-dots-in-repeat-sign-bar-lines.ly
 displaying-grob-ancestry.ly
 drawing-boxes-around-grobs.ly
 drawing-circles-around-various-objects.ly
+flat-ties.ly
 generating-random-notes.ly
 generating-whole-scores-also-book-parts-in-scheme-without-using-the-parser.ly
 outputting-the-version-number.ly
index c2be0bb2e3db035d22068fe9b09b930e74390bf8..cd3e01f1de44b8af34317100b364052adc55ed29 100644 (file)
@@ -9,3 +9,4 @@ forcing-horizontal-shift-of-notes.ly
 making-an-object-invisible-with-the-transparent-property.ly
 moving-dotted-notes-in-polyphony.ly
 suppressing-warnings-for-clashing-note-columns.ly
+two--partcombine-pairs-on-one-staff.ly
index b372f9879f5fdb373bc50a5524c0dd0186add950..bc43d7d3ba6e1594b5f4fcbf8ac5ba2130d78eae 100644 (file)
@@ -15,6 +15,7 @@ contemporary-glissando.ly
 controlling-the-placement-of-chord-fingerings.ly
 creating-blank-staves.ly
 custodes.ly
+customize-drumpitchnames,-drumstyletable-and-drumpitchtable-in-layout-and-midi.ly
 demo-midiinstruments.ly
 embedding-native-postscript-in-a--markup-block.ly
 engravers-one-by-one.ly
index 0322a423b049fc0f76149c9d0682a6a62e8d47b2..bfb3706161f78a4ce689d99cc3e14f4862298ff2 100644 (file)
@@ -16,6 +16,7 @@ cross-staff-stems.ly
 display-bracket-with-only-one-staff-in-a-system.ly
 extending-a-trillspanner.ly
 extending-glissandi-across-repeats.ly
+flat-ties.ly
 forcing-measure-width-to-adapt-to-metronomemarks-width.ly
 glissandi-can-skip-grobs.ly
 how-to-print-two-rehearsal-marks-above-and-below-the-same-barline-method-1.ly
@@ -43,6 +44,7 @@ tick-bar-lines.ly
 time-signature-in-parentheses---method-3.ly
 time-signature-in-parentheses.ly
 tweaking-clef-properties.ly
+two--partcombine-pairs-on-one-staff.ly
 use-square-bracket-at-the-start-of-a-staff-group.ly
 using-autochange-with-more-than-one-voice.ly
 vertical-aligned-staffgroups-without-connecting-systemstartbar.ly
index ed848f2c0a4941d07a3cefb7e3ec2ea32cad677d..b0bf51340d84c1233da34532774be4cb0e5ae1c6 100644 (file)
@@ -42,6 +42,7 @@ dynamics-text-spanner-postfix.ly
 extending-a-trillspanner.ly
 extending-glissandi-across-repeats.ly
 fine-tuning-pedal-brackets.ly
+flat-ties.ly
 forcing-horizontal-shift-of-notes.ly
 fret-diagrams-explained-and-developed.ly
 generating-custom-flags.ly
diff --git a/Documentation/snippets/two--partcombine-pairs-on-one-staff.ly b/Documentation/snippets/two--partcombine-pairs-on-one-staff.ly
new file mode 100644 (file)
index 0000000..da3d7b3
--- /dev/null
@@ -0,0 +1,101 @@
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.19.22"
+
+\header {
+  lsrtags = "simultaneous-notes, staff-notation"
+
+  texidoc = "
+The @code{\\partcombine} function takes two music expressions each
+containing a part, and distributes them among four @code{Voice}s named
+@qq{two} @qq{one} @qq{solo} and @qq{chords} depending on when and how
+the parts merged into a common voice.   The voices output from
+@code{\\partcombine} can have their layout properties adjusted in the
+usual way.  Here we define extensions of @code{\\partcombine} to make
+it easier to put four voices on a staff.
+
+soprano = @{ d'4 | cis'  b  e'  d'8 cis' | cis'2 b @} alto = @{ fis4 |
+e8 fis gis ais b4 b | b ais fis2 @} tenor = @{ a8 b | cis' dis' e'4 b8
+cis' d'4 | gis cis' dis'2 @} bass = @{ fis8 gis | a4 gis g fis | eis
+fis b,2 @}
+
+\\new Staff <<
+  \\key b\\minor
+  \\clef alto
+  \\partial 4
+  \\transpose b b'
+  \\partcombineUp \\soprano \\alto
+  \\partcombineDown \\tenor \\bass >>
+
+"
+  doctitle = "Two \\partcombine pairs on one staff"
+} % begin verbatim
+
+\layout {
+  \context {
+    \Staff
+    \accepts "VoiceBox"
+  }
+  \context {
+    \name "VoiceBox"
+    \type "Engraver_group"
+    \defaultchild "Voice"
+    \accepts "Voice"
+  }
+}
+
+partcombineUp =
+#(define-music-function (partOne partTwo)
+  (ly:music? ly:music?)
+"Take the music in @var{partOne} and @var{partTwo} and return
+a @code{VoiceBox} named @q{Up} containing @code{Voice}s
+that contain @var{partOne} and @var{partTwo} merged into one
+voice where feasible.  This variant sets the default voicing
+in the output to use upward stems."
+#{
+  \new VoiceBox = "Up" <<
+    \context Voice = "one" { \voiceOne }
+    \context Voice = "two" { \voiceThree }
+    \context Voice = "shared" { \voiceOne }
+    \context Voice = "solo" { \voiceOne }
+    \partcombine #partOne #partTwo
+  >>
+#})
+
+partcombineDown = #
+(define-music-function (partOne partTwo)
+  (ly:music? ly:music?)
+"Take the music in @var{partOne} and @var{partTwo} and return
+a @code{VoiceBox} named @q{Down} containing @code{Voice}s
+that contain @var{partOne} and @var{partTwo} merged into one
+voice where feasible.  This variant sets the default voicing
+in the output to use downward stems."
+#{
+  \new VoiceBox = "Down" <<
+    \set VoiceBox.soloText = #"Solo III"
+    \set VoiceBox.soloIIText = #"Solo IV"
+    \context Voice ="one" { \voiceFour }
+    \context Voice ="two" { \voiceTwo }
+    \context Voice ="shared" { \voiceFour }
+    \context Voice ="solo" { \voiceFour }
+    \partcombine #partOne #partTwo
+  >>
+#})
+
+soprano = { d'4 | cis'  b  e'  d'8 cis' | cis'2 b }
+alto = { fis4 | e8 fis gis ais b4 b | b ais fis2 }
+tenor = { a8 b | cis' dis' e'4 b8 cis' d'4 | gis cis' dis'2 }
+bass = { fis8 gis | a4 gis g fis | eis fis b,2 }
+
+\new Staff <<
+  \key b\minor
+  \clef alto
+  \partial 4
+  \transpose b b'
+  \partcombineUp \soprano \alto
+  \partcombineDown \tenor \bass
+>>
index 4f37c3fb9e5222cca64c1a7cdc748d7ceb1d22ef..31b400fa893909c31ff9e907bce19cc34c8f651a 100644 (file)
@@ -1016,7 +1016,7 @@ Carl Sorensen
 
 For regular, cross-staff, broken and kneed beams.  Beaming should depend
 on context and neighbor notes (see section 2.2 of
-@uref{http://imslp.org/wiki/Repository_of_Music-Notation_Mistakes_%28Coulon,_Jean-Pierre%29,
+@uref{http://imslp.org/wiki/Repository_of_Music-Notation_Mistakes_%28Coulon%2C_Jean-Pierre%29,
 this book}).  If possible also reduce beaming-computation time.
 
 @strong{Difficulty:} medium
index 46d45d3e3148f9f8122eef885a4a8ec90f42c5ae..675244a21385af5870e545715f3ecc986d7c7ac1 100644 (file)
@@ -9,10 +9,10 @@
 @c used for news about the upcoming release; see CG 10.2
 
 @newsItem
-@subheading LilyPond 2.19.42 released  @emph{May 15, 2016}
+@subheading LilyPond 2.19.43 released  @emph{June 8, 2016}
 
 We are happy to announce the release of LilyPond
-2.19.42.  This release includes a number of enhancements, and contains some
+2.19.43.  This release includes a number of enhancements, and contains some
 work in progress.  You will have access to the very latest features, but
 some may be incomplete, and you may encounter bugs and crashes.  If you
 require a stable version of Lilypond, we recommend using the 2.18
@@ -138,115 +138,3 @@ Jean-Charles Malahieude, Till Paala, Yoshiki Sawada
 and numerous other contributors.
 
 @newsEnd
-
-@newsItem
-@subheading LilyPond blog.  @emph{June 2, 2013}
-
-Janek WarchoÅ‚ has created a LilyPond blog.  You can find it at
-@uref{http://lilypondblog.org/, lilypondblog.org}!
-
-@newsEnd
-
-@newsItem
-@subheading LilyPond 2.16.2 released!  @emph{January 4, 2013}
-
-We are happy to announce the release of LilyPond 2.16.2. This release is mainly
-to correct a problem with lilypond-book running on Windows. We recommend that
-only people requiring this functionality upgrade to this version.
-
-@newsEnd
-
-@newsItem
-@subheading The LilyPond Report #28.  @emph{November 12, 2012}
-
-The @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-28, October
-issue of the @emph{LilyPond Report}} focuses on the
-@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?LilyPond-meeting-in-Waltrop,
-meeting of LilyPond developers and users} in Waltrop, Germany last
-August.  Of course, there are also some musings on LilyPond
-triggered by the release of 2.16.0 and 2.17.0 occuring from that
-venue.
-
-There are also two monthly financial reports from David Kastrup
-whose work on LilyPond is
-@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-24#an_urgent_request_for_funding,
-solely paid for} by financial contributions from other developer
-and users (thank you!), and a report about experiences from
-@uref{http://scorio.com, a web-based music typesetting service}
-using LilyPond internally.
-
-Come @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-28, read
-LilyPond Report 28} now; comments and contributions are warmly
-encouraged!
-@newsEnd
-
-@newsItem
-@subheading LilyPond 2.16.1 released!  @emph{November 9, 2012}
-
-We are happy to announce the release of LilyPond 2.16.1. This has a number of
-updates to the previous stable version, and should cause no problems. We
-recommend that everybody upgrade to this version.
-@newsEnd
-
-@newsItem
-@subheading Lilypond 2.16.0 released!  @emph{August 24, 2012}
-
-We are proud to announce the release of GNU LilyPond 2.16.1.
-LilyPond is a music engraving program, devoted to producing the
-highest-quality sheet music possible.  It brings the aesthetics of
-traditionally engraved music to computer printouts.
-
-Many improvements have been made in the past year since the previous
-main stable version. A few major improvements are:
-
-@itemize
-@item
-Support for kievan square notation
-@item
-User and programming interfaces have greatly improved
-@item
-Music functions have become quite more versatile
-@end itemize
-
-A full list of new features is given in:
-
-@example
-@uref{http://lilypond.org/doc/v2.16/Documentation/changes/index.html}
-@end example
-
-Happy music typesetting!  LilyPond 2.16 was brought to you by...
-
-Main development team:
-
-Bertrand Bordage, Trevor Daniels, Colin Hall, Phil Holmes, Ian Hulin,
-Reinhold Kainhofer, David Kastrup, Jonathan Kulp, Werner Lemberg,
-John Mandereau, Patrick McCarty, Joe Neeman, Han-Wen Nienhuys,
-Jan Nieuwenhuizen, Graham Percival, Mark Polesky, Neil Puttock,
-Mike Solomon, Carl Sorensen, Francisco Vila, Valentin Villenave,
-Jan WarchoÅ‚
-
-Programming contributors:
-
-Aleksandr Andreev, Sven Axelsson, Peter Chubb, Karin Hoethker,
-Marc Hohl, David Nalesnik, Justin Ohmie, BenkÅ‘ Pál, Julien Rioux, Patrick Schmidt,
-Adam Spiers, Heikki Taurainen, Piers Titus van der Torren,
-Jan-Peter Voigt, Janek Warchol
-
-Documentation contributors:
-
-James Lowe, Pavel Roskin, Alberto Simoes, Stefan Weil
-
-Bug squad:
-
-Colin Campbell, Eluze, Phil Holmes, Marek Klein, Ralph Palmer,
-James Lowe
-
-Support:
-
-Colin Campbell, Christian Hitz, Phil Holmes
-
-Translation contributors:
-
-Jean-Charles Malahieude, Till Paala, Yoshiki Sawada
-
-@newsEnd
index 03548578eba66669432fef1388982396f39d649b..fbabbd846e324499d911c3f58a031f11ea7989f8 100644 (file)
@@ -26,6 +26,18 @@ NOTE:
   * don't duplicate entries from news-front.itexi
 @end ignore
 
+@newsItem
+@subheading LilyPond 2.19.42 released  @emph{May 15, 2016}
+
+We are happy to announce the release of LilyPond
+2.19.42.  This release includes a number of enhancements, and contains some
+work in progress.  You will have access to the very latest features, but
+some may be incomplete, and you may encounter bugs and crashes.  If you
+require a stable version of Lilypond, we recommend using the 2.18
+version.
+
+@newsEnd
+
 @newsItem
 @subheading LilyPond 2.19.41 released  @emph{May 1, 2016}
 
@@ -719,6 +731,14 @@ a stable version of Lilypond, we recommend using the 2.16 version.
 
 @newsEnd
 
+@newsItem
+@subheading LilyPond blog.  @emph{June 2, 2013}
+
+Janek WarchoÅ‚ has created a LilyPond blog.  You can find it at
+@uref{http://lilypondblog.org/, lilypondblog.org}!
+
+@newsEnd
+
 @newsItem
 @subheading LilyPond 2.17.19 released!  @emph{May 26, 2013}
 
@@ -830,6 +850,15 @@ a stable version of Lilypond, we recommend using the 2.16 version.
 
 @newsEnd
 
+@newsItem
+@subheading LilyPond 2.16.2 released!  @emph{January 4, 2013}
+
+We are happy to announce the release of LilyPond 2.16.2. This release is mainly
+to correct a problem with lilypond-book running on Windows. We recommend that
+only people requiring this functionality upgrade to this version.
+
+@newsEnd
+
 @newsItem
 @subheading LilyPond 2.17.9 released!  @emph{December 15, 2012}
 
@@ -864,6 +893,30 @@ a stable version of Lilypond, we recommend using the 2.16 version.
 @newsEnd
 
 
+@newsItem
+@subheading The LilyPond Report #28.  @emph{November 12, 2012}
+
+The @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-28, October
+issue of the @emph{LilyPond Report}} focuses on the
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?LilyPond-meeting-in-Waltrop,
+meeting of LilyPond developers and users} in Waltrop, Germany last
+August.  Of course, there are also some musings on LilyPond
+triggered by the release of 2.16.0 and 2.17.0 occuring from that
+venue.
+
+There are also two monthly financial reports from David Kastrup
+whose work on LilyPond is
+@uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-24#an_urgent_request_for_funding,
+solely paid for} by financial contributions from other developer
+and users (thank you!), and a report about experiences from
+@uref{http://scorio.com, a web-based music typesetting service}
+using LilyPond internally.
+
+Come @uref{http://web.archive.org/web/20110325004849/http://news.lilynet.net/?The-LilyPond-Report-28, read
+LilyPond Report 28} now; comments and contributions are warmly
+encouraged!
+@newsEnd
+
 @newsItem
 @subheading LilyPond 2.16.1 released!  @emph{November 9, 2012}
 
@@ -954,7 +1007,7 @@ highest-quality sheet music possible.  It brings the aesthetics of
 traditionally engraved music to computer printouts.
 
 Many improvements have been made in the past year since the previous
-main stable version. A few major improvements are: 
+main stable version. A few major improvements are:
 
 @itemize
 @item
@@ -962,7 +1015,7 @@ Support for kievan square notation
 @item
 User and programming interfaces have greatly improved
 @item
-Music functions have become quite more versatile 
+Music functions have become quite more versatile
 @end itemize
 
 A full list of new features is given in:
@@ -1004,7 +1057,7 @@ Colin Campbell, Christian Hitz, Phil Holmes
 
 Translation contributors:
 
-Jean-Charles Malahieude, Till Paala, Yoshiki Sawada 
+Jean-Charles Malahieude, Till Paala, Yoshiki Sawada
 
 @newsEnd
 
diff --git a/VERSION b/VERSION
index b9f70a09e94b42e9db1dd3771132ed1802417c6a..f18fd1a1d691befcba07dd999722e15a44979297 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=19
-PATCH_LEVEL=43
+PATCH_LEVEL=44
 MY_PATCH_LEVEL=
 VERSION_STABLE=2.18.2
-VERSION_DEVEL=2.19.42
+VERSION_DEVEL=2.19.43
index 0037c58ca807c403a206647415ed64ef8c00bf05..ed47b8350efe006c1bf6443d775b79bd282ebece 100644 (file)
@@ -281,11 +281,9 @@ AC_DEFUN(STEPMAKE_CXX, [
     STEPMAKE_OPTIONAL_REQUIRED(CXX, c++, $1)
 
     CXXFLAGS="$CXXFLAGS $OPTIMIZE"
-    LD='$(CXX)'
 
     AC_SUBST(CXX)
     AC_SUBST(CXXFLAGS)
-    AC_SUBST(LD)
 ])
 
 
index f9d2e15cd4c0e298f9c6a9fbcb3caea2a93fe172..1be735b0ed2dab1d7478370fb38d2daa59bf4be9 100644 (file)
@@ -511,11 +511,16 @@ Accidental_engraver::process_music ()
     update_local_key_signature (sig);
 }
 
-ADD_ACKNOWLEDGER (Accidental_engraver, arpeggio);
-ADD_ACKNOWLEDGER (Accidental_engraver, finger);
-ADD_ACKNOWLEDGER (Accidental_engraver, rhythmic_head);
-ADD_END_ACKNOWLEDGER (Accidental_engraver, tie);
-ADD_ACKNOWLEDGER (Accidental_engraver, note_column);
+
+void
+Accidental_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Accidental_engraver, arpeggio);
+  ADD_ACKNOWLEDGER (Accidental_engraver, finger);
+  ADD_ACKNOWLEDGER (Accidental_engraver, rhythmic_head);
+  ADD_END_ACKNOWLEDGER (Accidental_engraver, tie);
+  ADD_ACKNOWLEDGER (Accidental_engraver, note_column);
+}
 
 ADD_TRANSLATOR (Accidental_engraver,
                 /* doc */
index a560a25940b5dbd065d50ed6ad8d81f6af6b6782..ab4f2a4ce4e3a09651b674a8f9598e2cdd6699f5 100644 (file)
@@ -27,8 +27,6 @@
 #include "scm-hash.hh"
 #include "warn.hh"
 
-const char * const All_font_metrics::type_p_name_ = 0;
-
 Index_to_charcode_map const *
 All_font_metrics::get_index_to_charcode_map (const string &filename,
                                              int face_index,
index 9ceea9387c59eb09a380fd23ebeaf4b84d9601c9..665c83a4cc51c6b5648df8ee06565aaf6f9a093e 100644 (file)
@@ -40,7 +40,7 @@ class Ambitus_engraver : public Engraver
 public:
   TRANSLATOR_DECLARATIONS (Ambitus_engraver);
 protected:
-  DECLARE_ACKNOWLEDGER (note_head);
+  void acknowledge_note_head (Grob_info);
 
   void process_music ();
   void stop_translation_timestep ();
@@ -218,7 +218,12 @@ Ambitus_engraver::finalize ()
     }
 }
 
-ADD_ACKNOWLEDGER (Ambitus_engraver, note_head);
+void
+Ambitus_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Ambitus_engraver, note_head);
+}
+
 ADD_TRANSLATOR (Ambitus_engraver,
                 /* doc */
                 "Create an ambitus.",
index e191470161d99070b8f03597168b82e2b3eadcb2..d308a430686a6dc085685b4ac1f68304eb6621fe 100644 (file)
@@ -43,7 +43,7 @@ public:
 protected:
   void process_music ();
   void stop_translation_timestep ();
-  DECLARE_TRANSLATOR_LISTENER (arpeggio);
+  void listen_arpeggio (Stream_event *);
 private:
   Item *arpeggio_;
   Stream_event *arpeggio_event_;
@@ -55,7 +55,6 @@ Arpeggio_engraver::Arpeggio_engraver ()
   arpeggio_event_ = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Arpeggio_engraver, arpeggio);
 void Arpeggio_engraver::listen_arpeggio (Stream_event *ev)
 {
   ASSIGN_EVENT_ONCE (arpeggio_event_, ev);
@@ -109,9 +108,15 @@ Arpeggio_engraver::stop_translation_timestep ()
   arpeggio_event_ = 0;
 }
 
-ADD_ACKNOWLEDGER (Arpeggio_engraver, stem);
-ADD_ACKNOWLEDGER (Arpeggio_engraver, rhythmic_head);
-ADD_ACKNOWLEDGER (Arpeggio_engraver, note_column);
+
+void
+Arpeggio_engraver::boot ()
+{
+  ADD_LISTENER (Arpeggio_engraver, arpeggio);
+  ADD_ACKNOWLEDGER (Arpeggio_engraver, stem);
+  ADD_ACKNOWLEDGER (Arpeggio_engraver, rhythmic_head);
+  ADD_ACKNOWLEDGER (Arpeggio_engraver, note_column);
+}
 
 ADD_TRANSLATOR (Arpeggio_engraver,
                 /* doc */
index 68c61d97a8f011dd9d2ae7152a6b59c619671857..a7a92d9d6dfac2f8196b3d10a60f547765ab3ebf 100644 (file)
@@ -45,12 +45,13 @@ protected:
   virtual void finalize ();
   virtual void derived_mark () const;
 
-  DECLARE_ACKNOWLEDGER (rest);
-  DECLARE_ACKNOWLEDGER (beam);
-  DECLARE_ACKNOWLEDGER (bar_line);
-  DECLARE_ACKNOWLEDGER (breathing_sign);
-  DECLARE_ACKNOWLEDGER (stem);
-  DECLARE_TRANSLATOR_LISTENER (beam_forbid);
+public:
+  void acknowledge_rest (Grob_info);
+  void acknowledge_beam (Grob_info);
+  void acknowledge_bar_line (Grob_info);
+  void acknowledge_breathing_sign (Grob_info);
+  void acknowledge_stem (Grob_info);
+  void listen_beam_forbid (Stream_event *);
 
 private:
   virtual bool test_moment (Direction, Moment, Moment);
@@ -160,7 +161,6 @@ Auto_beam_engraver::Auto_beam_engraver ()
   beam_settings_ = SCM_EOL;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Auto_beam_engraver, beam_forbid);
 void
 Auto_beam_engraver::listen_beam_forbid (Stream_event *ev)
 {
@@ -541,11 +541,17 @@ Auto_beam_engraver::process_acknowledged ()
   process_acknowledged_count_++;
 }
 
-ADD_ACKNOWLEDGER (Auto_beam_engraver, stem);
-ADD_ACKNOWLEDGER (Auto_beam_engraver, bar_line);
-ADD_ACKNOWLEDGER (Auto_beam_engraver, beam);
-ADD_ACKNOWLEDGER (Auto_beam_engraver, breathing_sign);
-ADD_ACKNOWLEDGER (Auto_beam_engraver, rest);
+void
+Auto_beam_engraver::boot ()
+{
+  ADD_LISTENER (Auto_beam_engraver, beam_forbid);
+  ADD_ACKNOWLEDGER (Auto_beam_engraver, stem);
+  ADD_ACKNOWLEDGER (Auto_beam_engraver, bar_line);
+  ADD_ACKNOWLEDGER (Auto_beam_engraver, beam);
+  ADD_ACKNOWLEDGER (Auto_beam_engraver, breathing_sign);
+  ADD_ACKNOWLEDGER (Auto_beam_engraver, rest);
+}
+
 ADD_TRANSLATOR (Auto_beam_engraver,
                 /* doc */
                 "Generate beams based on measure characteristics and observed"
@@ -574,8 +580,7 @@ ADD_TRANSLATOR (Auto_beam_engraver,
 class Grace_auto_beam_engraver : public Auto_beam_engraver
 {
   TRANSLATOR_DECLARATIONS (Grace_auto_beam_engraver);
-  TRANSLATOR_INHERIT (Auto_beam_engraver)
-  DECLARE_TRANSLATOR_LISTENER (beam_forbid);
+  TRANSLATOR_INHERIT (Auto_beam_engraver);
 
 private:
   Moment last_grace_start_; // Full starting time of last grace group
@@ -592,13 +597,6 @@ Grace_auto_beam_engraver::Grace_auto_beam_engraver ()
   // not considered.
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Grace_auto_beam_engraver, beam_forbid);
-void
-Grace_auto_beam_engraver::listen_beam_forbid (Stream_event *ev)
-{
-  Auto_beam_engraver::listen_beam_forbid (ev);
-}
-
 bool
 Grace_auto_beam_engraver::is_same_grace_state (Moment, Moment)
 {
@@ -638,11 +636,17 @@ Grace_auto_beam_engraver::test_moment (Direction dir, Moment test_mom, Moment)
   return !test_mom.grace_part_;
 }
 
-ADD_ACKNOWLEDGER (Grace_auto_beam_engraver, stem);
-ADD_ACKNOWLEDGER (Grace_auto_beam_engraver, bar_line);
-ADD_ACKNOWLEDGER (Grace_auto_beam_engraver, beam);
-ADD_ACKNOWLEDGER (Grace_auto_beam_engraver, breathing_sign);
-ADD_ACKNOWLEDGER (Grace_auto_beam_engraver, rest);
+void
+Grace_auto_beam_engraver::boot ()
+{
+  ADD_LISTENER (Auto_beam_engraver, beam_forbid);
+  ADD_ACKNOWLEDGER (Auto_beam_engraver, stem);
+  ADD_ACKNOWLEDGER (Auto_beam_engraver, bar_line);
+  ADD_ACKNOWLEDGER (Auto_beam_engraver, beam);
+  ADD_ACKNOWLEDGER (Auto_beam_engraver, breathing_sign);
+  ADD_ACKNOWLEDGER (Auto_beam_engraver, rest);
+}
+
 ADD_TRANSLATOR (Grace_auto_beam_engraver,
                 /* doc */
                 "Generates one autobeam group across an entire grace phrase. "
index 3a9b0d67752d58fcaa5d52886426c73e65659e97..2bc4858479898f905cc3799aba21074a2111038a 100644 (file)
@@ -43,7 +43,7 @@ protected:
   void process_music ();
   virtual void initialize ();
   virtual void finalize ();
-  DECLARE_ACKNOWLEDGER (grob);
+  void acknowledge_grob (Grob_info);
   void process_acknowledged ();
   virtual Spanner *get_spanner ();
   virtual void add_element (Grob *);
@@ -165,7 +165,12 @@ Axis_group_engraver::add_element (Grob *e)
   Axis_group_interface::add_element (staffline_, e);
 }
 
-ADD_ACKNOWLEDGER (Axis_group_engraver, grob);
+
+void
+Axis_group_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Axis_group_engraver, grob);
+}
 
 ADD_TRANSLATOR (Axis_group_engraver,
                 /* doc */
index 980aa9223154ff967c4c7157349c25204b36577a..4f0f136db05b8ca6f5edf72bfd9ead489859b34f 100644 (file)
@@ -28,8 +28,8 @@ class Balloon_engraver : public Engraver
 {
   TRANSLATOR_DECLARATIONS (Balloon_engraver);
 
-  DECLARE_TRANSLATOR_LISTENER (annotate_output);
-  DECLARE_ACKNOWLEDGER (grob);
+  void listen_annotate_output (Stream_event *);
+  void acknowledge_grob (Grob_info);
   vector<Stream_event *> events_;
 
   void stop_translation_timestep ();
@@ -37,7 +37,6 @@ class Balloon_engraver : public Engraver
   void balloonify (Grob *, Stream_event *);
 };
 
-IMPLEMENT_TRANSLATOR_LISTENER (Balloon_engraver, annotate_output);
 void
 Balloon_engraver::listen_annotate_output (Stream_event *ev)
 {
@@ -85,7 +84,13 @@ Balloon_engraver::acknowledge_grob (Grob_info info)
     }
 }
 
-ADD_ACKNOWLEDGER (Balloon_engraver, grob);
+
+void
+Balloon_engraver::boot ()
+{
+  ADD_LISTENER (Balloon_engraver, annotate_output);
+  ADD_ACKNOWLEDGER (Balloon_engraver, grob);
+}
 
 ADD_TRANSLATOR (Balloon_engraver,
                 /* doc */
index 397743b4b07b87d8fd4cf49f1384d49aa8ce15e4..8feb63dd134fa873d229fc4e3f4b10ecd98ca9c6 100644 (file)
@@ -38,7 +38,7 @@ protected:
   void stop_translation_timestep ();
   void process_acknowledged ();
 
-  DECLARE_END_ACKNOWLEDGER (spanner);
+  void acknowledge_end_spanner (Grob_info);
 
 private:
   void create_bar ();
@@ -108,7 +108,12 @@ Bar_engraver::acknowledge_end_spanner (Grob_info gi)
     spanners_.push_back (dynamic_cast<Spanner *> (g));
 }
 
-ADD_END_ACKNOWLEDGER (Bar_engraver, spanner);
+
+void
+Bar_engraver::boot ()
+{
+  ADD_END_ACKNOWLEDGER (Bar_engraver, spanner);
+}
 
 ADD_TRANSLATOR (Bar_engraver,
                 /* doc */
index 144076439c6e27fb787a6d50251cf3c2e7ea7ab0..1af5f19da1777115acda72facd0dd63d630a1c68 100644 (file)
@@ -45,14 +45,13 @@ protected:
 
 protected:
   void stop_translation_timestep ();
-  DECLARE_TRANSLATOR_LISTENER (alternative);
-  DECLARE_ACKNOWLEDGER (break_alignment);
+  void listen_alternative (Stream_event *);
+  void acknowledge_break_alignment (Grob_info);
   void process_music ();
   void create_items ();
   TRANSLATOR_DECLARATIONS (Bar_number_engraver);
 };
 
-IMPLEMENT_TRANSLATOR_LISTENER (Bar_number_engraver, alternative);
 void
 Bar_number_engraver::listen_alternative (Stream_event *ev)
 {
@@ -177,7 +176,13 @@ Bar_number_engraver::create_items ()
   text_ = make_item ("BarNumber", SCM_EOL);
 }
 
-ADD_ACKNOWLEDGER (Bar_number_engraver, break_alignment);
+
+void
+Bar_number_engraver::boot ()
+{
+  ADD_LISTENER (Bar_number_engraver, alternative);
+  ADD_ACKNOWLEDGER (Bar_number_engraver, break_alignment);
+}
 
 ADD_TRANSLATOR (Bar_number_engraver,
                 /* doc */
index 151ffacf16eab597378664eeb3d84a74f7ce5229..31f96b72b17b4f406d2f87720b6af847bab55f23 100644 (file)
@@ -30,15 +30,15 @@ protected:
   vector<Grob_info> beams_;
   vector<Grob_info> covered_grobs_;
 
-  DECLARE_ACKNOWLEDGER (note_head);
-  DECLARE_ACKNOWLEDGER (stem);
-  DECLARE_ACKNOWLEDGER (accidental);
-  DECLARE_ACKNOWLEDGER (clef);
-  DECLARE_ACKNOWLEDGER (clef_modifier);
-  DECLARE_ACKNOWLEDGER (key_signature);
-  DECLARE_ACKNOWLEDGER (time_signature);
-  DECLARE_ACKNOWLEDGER (beam);
-  DECLARE_ACKNOWLEDGER (flag);
+  void acknowledge_note_head (Grob_info);
+  void acknowledge_stem (Grob_info);
+  void acknowledge_accidental (Grob_info);
+  void acknowledge_clef (Grob_info);
+  void acknowledge_clef_modifier (Grob_info);
+  void acknowledge_key_signature (Grob_info);
+  void acknowledge_time_signature (Grob_info);
+  void acknowledge_beam (Grob_info);
+  void acknowledge_flag (Grob_info);
 
   virtual void finalize ();
 
@@ -193,15 +193,20 @@ Beam_collision_engraver::acknowledge_beam (Grob_info i)
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Beam_collision_engraver, note_head);
-ADD_ACKNOWLEDGER (Beam_collision_engraver, stem);
-ADD_ACKNOWLEDGER (Beam_collision_engraver, accidental);
-ADD_ACKNOWLEDGER (Beam_collision_engraver, clef);
-ADD_ACKNOWLEDGER (Beam_collision_engraver, key_signature);
-ADD_ACKNOWLEDGER (Beam_collision_engraver, time_signature);
-ADD_ACKNOWLEDGER (Beam_collision_engraver, clef_modifier);
-ADD_ACKNOWLEDGER (Beam_collision_engraver, flag);
-ADD_ACKNOWLEDGER (Beam_collision_engraver, beam);
+
+void
+Beam_collision_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Beam_collision_engraver, note_head);
+  ADD_ACKNOWLEDGER (Beam_collision_engraver, stem);
+  ADD_ACKNOWLEDGER (Beam_collision_engraver, accidental);
+  ADD_ACKNOWLEDGER (Beam_collision_engraver, clef);
+  ADD_ACKNOWLEDGER (Beam_collision_engraver, key_signature);
+  ADD_ACKNOWLEDGER (Beam_collision_engraver, time_signature);
+  ADD_ACKNOWLEDGER (Beam_collision_engraver, clef_modifier);
+  ADD_ACKNOWLEDGER (Beam_collision_engraver, flag);
+  ADD_ACKNOWLEDGER (Beam_collision_engraver, beam);
+}
 
 ADD_TRANSLATOR (Beam_collision_engraver,
                 /* doc */
index 554aeda7a1858694432b226c47efe3f9313c75fd..277d1b0a0eae6a6de6dfcd9ff46f3a8ef9f26d22 100644 (file)
@@ -38,8 +38,8 @@
 class Beam_engraver : public Engraver
 {
 public:
-  DECLARE_ACKNOWLEDGER (stem);
-  DECLARE_ACKNOWLEDGER (rest);
+  void acknowledge_stem (Grob_info);
+  void acknowledge_rest (Grob_info);
 
 protected:
   Stream_event *start_ev_;
@@ -77,7 +77,7 @@ protected:
   virtual bool valid_start_point ();
   virtual bool valid_end_point ();
 
-  DECLARE_TRANSLATOR_LISTENER (beam);
+  void listen_beam (Stream_event *);
 public:
   TRANSLATOR_DECLARATIONS (Beam_engraver);
 };
@@ -112,7 +112,6 @@ Beam_engraver::Beam_engraver ()
   prev_start_ev_ = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Beam_engraver, beam);
 void
 Beam_engraver::listen_beam (Stream_event *ev)
 {
@@ -312,8 +311,14 @@ Beam_engraver::acknowledge_stem (Grob_info info)
   Beam::add_stem (beam_, stem);
 }
 
-ADD_ACKNOWLEDGER (Beam_engraver, stem);
-ADD_ACKNOWLEDGER (Beam_engraver, rest);
+
+void
+Beam_engraver::boot ()
+{
+  ADD_LISTENER (Beam_engraver, beam);
+  ADD_ACKNOWLEDGER (Beam_engraver, stem);
+  ADD_ACKNOWLEDGER (Beam_engraver, rest);
+}
 
 ADD_TRANSLATOR (Beam_engraver,
                 /* doc */
@@ -338,7 +343,7 @@ class Grace_beam_engraver : public Beam_engraver
 public:
   TRANSLATOR_DECLARATIONS (Grace_beam_engraver);
   TRANSLATOR_INHERIT (Beam_engraver);
-  DECLARE_TRANSLATOR_LISTENER (beam);
+  void listen_beam (Stream_event *);
 
 protected:
   virtual bool valid_start_point ();
@@ -366,7 +371,6 @@ Grace_beam_engraver::valid_end_point ()
 /*
   Ugh, C&P code.
  */
-IMPLEMENT_TRANSLATOR_LISTENER (Grace_beam_engraver, beam);
 void
 Grace_beam_engraver::listen_beam (Stream_event *ev)
 {
@@ -378,8 +382,14 @@ Grace_beam_engraver::listen_beam (Stream_event *ev)
     stop_ev_ = ev;
 }
 
-ADD_ACKNOWLEDGER (Grace_beam_engraver, stem);
-ADD_ACKNOWLEDGER (Grace_beam_engraver, rest);
+
+void
+Grace_beam_engraver::boot ()
+{
+  ADD_LISTENER (Grace_beam_engraver, beam);
+  ADD_ACKNOWLEDGER (Beam_engraver, stem);
+  ADD_ACKNOWLEDGER (Beam_engraver, rest);
+}
 
 ADD_TRANSLATOR (Grace_beam_engraver,
                 /* doc */
index a6e78d67c7f2353515b263f749f6ece4951c9d2a..0970e8b5e74831d5767b2e8367f7d00eb8c55fff 100644 (file)
@@ -35,7 +35,7 @@ protected:
   void start_translation_timestep ();
   void process_music ();
   void set_melisma (bool);
-  DECLARE_TRANSLATOR_LISTENER (beam);
+  void listen_beam (Stream_event *);
 private:
   Stream_event *start_ev_;
   Stream_event *now_stop_ev_;
@@ -80,7 +80,6 @@ Beam_performer::start_translation_timestep ()
   now_stop_ev_ = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Beam_performer, beam);
 void
 Beam_performer::listen_beam (Stream_event *ev)
 {
@@ -92,6 +91,12 @@ Beam_performer::listen_beam (Stream_event *ev)
     now_stop_ev_ = ev;
 }
 
+void
+Beam_performer::boot ()
+{
+  ADD_LISTENER (Beam_performer, beam);
+}
+
 ADD_TRANSLATOR (Beam_performer,
                 /* doc */
                 "",
index 44b0f21eaaa6820b96d7fc24e274db9c107b82f6..83c98a94e082a612a18d6c30c3d3935e090b7285 100644 (file)
@@ -29,10 +29,10 @@ class Bend_engraver : public Engraver
 {
 public:
   TRANSLATOR_DECLARATIONS (Bend_engraver);
-  DECLARE_ACKNOWLEDGER (note_head);
+  void acknowledge_note_head (Grob_info);
 
 protected:
-  DECLARE_TRANSLATOR_LISTENER (bend_after);
+  void listen_bend_after (Stream_event *);
   void finalize ();
   void process_music ();
   void stop_translation_timestep ();
@@ -115,7 +115,6 @@ Bend_engraver::Bend_engraver ()
   fall_event_ = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Bend_engraver, bend_after);
 void
 Bend_engraver::listen_bend_after (Stream_event *ev)
 {
@@ -133,7 +132,13 @@ Bend_engraver::process_music ()
     }
 }
 
-ADD_ACKNOWLEDGER (Bend_engraver, note_head);
+
+void
+Bend_engraver::boot ()
+{
+  ADD_LISTENER (Bend_engraver, bend_after);
+  ADD_ACKNOWLEDGER (Bend_engraver, note_head);
+}
 
 ADD_TRANSLATOR (Bend_engraver,
                 /* doc */
index cf35a7c1bdf0adcdc87a0eac3a68545c401c9b78..af0cb6263221e745f6b5d27d2dce49ba6fa9668c 100644 (file)
@@ -178,4 +178,4 @@ LY_DEFINE (ly_book_scores, "ly:book-scores",
 }
 
 
-const char Book::type_p_name_[] = "ly:book?";
+const char * const Book::type_p_name_ = "ly:book?";
index 629b8010fae6b2ab9b429399e463952d5ed2aa04..6569493419da6a66c44077feab15ea5297c46ee9 100644 (file)
@@ -133,4 +133,4 @@ Box::print ()
 /****************************************************************/
 
 
-const char Box::type_p_name_[] = "ly:box?";
+const char * const Box::type_p_name_ = "ly:box?";
index f9090c8e0829718e61a594437d185ac3e235d771..55a638da870283b10b8446695221264a581c8991 100644 (file)
@@ -40,8 +40,8 @@ protected:
   virtual void derived_mark () const;
 public:
   TRANSLATOR_DECLARATIONS (Break_align_engraver);
-  DECLARE_ACKNOWLEDGER (break_aligned);
-  DECLARE_ACKNOWLEDGER (break_alignable);
+  void acknowledge_break_aligned (Grob_info);
+  void acknowledge_break_alignable (Grob_info);
 };
 
 void
@@ -155,8 +155,13 @@ Break_align_engraver::add_to_group (SCM align_name, Item *item)
   Axis_group_interface::add_element (group, item);
 }
 
-ADD_ACKNOWLEDGER (Break_align_engraver, break_aligned);
-ADD_ACKNOWLEDGER (Break_align_engraver, break_alignable);
+void
+Break_align_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Break_align_engraver, break_aligned);
+  ADD_ACKNOWLEDGER (Break_align_engraver, break_alignable);
+}
+
 ADD_TRANSLATOR (Break_align_engraver,
                 /* doc */
                 "Align grobs with corresponding @code{break-align-symbols}"
index 34b296d10b248028416c87286138c4073c6583af..ade1b15f297ea1dd4f32a1bfc1437c51fce8935e 100644 (file)
@@ -39,7 +39,7 @@ protected:
   void process_music ();
   void stop_translation_timestep ();
 
-  DECLARE_TRANSLATOR_LISTENER (breathing);
+  void listen_breathing (Stream_event *);
 private:
   Stream_event *breathing_sign_event_;
   Grob *breathing_sign_;
@@ -51,7 +51,6 @@ Breathing_sign_engraver::Breathing_sign_engraver ()
   breathing_sign_event_ = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Breathing_sign_engraver, breathing);
 void
 Breathing_sign_engraver::listen_breathing (Stream_event *ev)
 {
@@ -74,6 +73,12 @@ Breathing_sign_engraver::stop_translation_timestep ()
   breathing_sign_event_ = 0;
 }
 
+void
+Breathing_sign_engraver::boot ()
+{
+  ADD_LISTENER (Breathing_sign_engraver, breathing);
+}
+
 ADD_TRANSLATOR (Breathing_sign_engraver,
                 /* doc */
                 "Create a breathing sign.",
diff --git a/lily/callback.cc b/lily/callback.cc
deleted file mode 100644 (file)
index baab7b0..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
-  This file is part of LilyPond, the GNU music typesetter.
-
-  Copyright (C) 2016  David Kastrup <dak@gnu.org>
-
-  LilyPond is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  LilyPond is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "callback.hh"
-
-const char * const Callback_wrapper::type_p_name_ = 0;
-const char * const Callback2_wrapper::type_p_name_ = 0;
-const char * const Callback0_wrapper::type_p_name_ = 0;
-const char * const Method_instance::type_p_name_ = 0;
index db8493e2a5a6648478caf455e780dc104d15c65f..3a14ff4b07f44168ce5117712d7e99e73812cc91 100644 (file)
@@ -39,8 +39,8 @@ protected:
   void stop_translation_timestep ();
   void process_music ();
   virtual void finalize ();
-  DECLARE_TRANSLATOR_LISTENER (note);
-  DECLARE_TRANSLATOR_LISTENER (rest);
+  void listen_note (Stream_event *);
+  void listen_rest (Stream_event *);
 private:
   vector<Stream_event *> notes_;
 
@@ -143,14 +143,12 @@ Chord_name_engraver::process_music ()
   context ()->set_property ("lastChord", markup);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Chord_name_engraver, note);
 void
 Chord_name_engraver::listen_note (Stream_event *ev)
 {
   notes_.push_back (ev);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Chord_name_engraver, rest);
 void
 Chord_name_engraver::listen_rest (Stream_event *ev)
 {
@@ -168,6 +166,13 @@ Chord_name_engraver::stop_translation_timestep ()
   The READs description is not strictly accurate:
   which properties are read depend on the chord naming function active.
 */
+void
+Chord_name_engraver::boot ()
+{
+  ADD_LISTENER (Chord_name_engraver, note);
+  ADD_LISTENER (Chord_name_engraver, rest);
+}
+
 ADD_TRANSLATOR (Chord_name_engraver,
                 /* doc */
                 "Catch note and rest events and generate the appropriate chordname.",
index 3855c350d73e8e15b7e0faaa37d008ed902b0d6a..7a17c1350e36567857acb983eeda04695df3827f 100644 (file)
@@ -62,8 +62,8 @@ protected:
 protected:
   virtual void finalize ();
   void process_music ();
-  DECLARE_TRANSLATOR_LISTENER (tremolo_span);
-  DECLARE_ACKNOWLEDGER (stem);
+  void listen_tremolo_span (Stream_event *);
+  void acknowledge_stem (Grob_info);
 };
 
 Chord_tremolo_engraver::Chord_tremolo_engraver ()
@@ -73,7 +73,6 @@ Chord_tremolo_engraver::Chord_tremolo_engraver ()
   previous_stem_ = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Chord_tremolo_engraver, tremolo_span);
 void
 Chord_tremolo_engraver::listen_tremolo_span (Stream_event *ev)
 {
@@ -158,7 +157,13 @@ Chord_tremolo_engraver::acknowledge_stem (Grob_info info)
     }
 }
 
-ADD_ACKNOWLEDGER (Chord_tremolo_engraver, stem);
+void
+Chord_tremolo_engraver::boot ()
+{
+  ADD_LISTENER (Chord_tremolo_engraver, tremolo_span);
+  ADD_ACKNOWLEDGER (Chord_tremolo_engraver, stem);
+}
+
 ADD_TRANSLATOR (Chord_tremolo_engraver,
                 /* doc */
                 "Generate beams for tremolo repeats.",
index 940a18d2010849e27ecf73b66f99361aa6a3260c..00b3c3e55a736ef930d8d048afe30c2d74869df3 100644 (file)
@@ -39,7 +39,7 @@ public:
 protected:
   void stop_translation_timestep ();
   void process_music ();
-  DECLARE_ACKNOWLEDGER (bar_line);
+  void acknowledge_bar_line (Grob_info);
 
   virtual void derived_mark () const;
 private:
@@ -203,7 +203,12 @@ Clef_engraver::stop_translation_timestep ()
     }
 }
 
-ADD_ACKNOWLEDGER (Clef_engraver, bar_line);
+void
+Clef_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Clef_engraver, bar_line);
+}
+
 ADD_TRANSLATOR (Clef_engraver,
                 /* doc */
                 "Determine and set reference point for pitches.",
index bb5ed0dc54da0b6f79b430afb227b2bb35682ab7..0c84d1cb650019a32607e4744588715ea3b4d09e 100644 (file)
@@ -34,8 +34,8 @@ class Cluster_spanner_engraver : public Engraver
 
 protected:
   TRANSLATOR_DECLARATIONS (Cluster_spanner_engraver);
-  DECLARE_TRANSLATOR_LISTENER (cluster_note);
-  DECLARE_ACKNOWLEDGER (note_column);
+  void listen_cluster_note (Stream_event *);
+  void acknowledge_note_column (Grob_info);
   void stop_translation_timestep ();
   virtual void process_music ();
   virtual void finalize ();
@@ -81,7 +81,6 @@ Cluster_spanner_engraver::typeset_grobs ()
   beacon_ = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Cluster_spanner_engraver, cluster_note);
 void
 Cluster_spanner_engraver::listen_cluster_note (Stream_event *ev)
 {
@@ -142,7 +141,13 @@ Cluster_spanner_engraver::acknowledge_note_column (Grob_info info)
     }
 }
 
-ADD_ACKNOWLEDGER (Cluster_spanner_engraver, note_column);
+void
+Cluster_spanner_engraver::boot ()
+{
+  ADD_LISTENER (Cluster_spanner_engraver, cluster_note);
+  ADD_ACKNOWLEDGER (Cluster_spanner_engraver, note_column);
+}
+
 ADD_TRANSLATOR (Cluster_spanner_engraver,
                 /* doc */
                 "Engrave a cluster using @code{Spanner} notation.",
index d1eb2dd3c0a4b49bc29a7f4553468c43b677420c..ca6a52d320a09dde5c5ff326611bfe4309ded81b 100644 (file)
@@ -31,7 +31,7 @@ class Collision_engraver : public Engraver
   vector<Grob *> note_columns_;
 
 protected:
-  DECLARE_ACKNOWLEDGER (note_column);
+  void acknowledge_note_column (Grob_info);
   void process_acknowledged ();
   void stop_translation_timestep ();
 public:
@@ -78,7 +78,12 @@ Collision_engraver::Collision_engraver ()
   col_ = 0;
 }
 
-ADD_ACKNOWLEDGER (Collision_engraver, note_column);
+
+void
+Collision_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Collision_engraver, note_column);
+}
 
 ADD_TRANSLATOR (Collision_engraver,
                 /* doc */
index 34a985d32da3cd1b16f2dda5e7bb2ff5a93fd5b2..ef3a5012a26cbc5a77d192904ffb216d5082c4ab 100644 (file)
@@ -80,7 +80,7 @@ protected:
   void start_translation_timestep ();
   void process_music ();
   void stop_translation_timestep ();
-  DECLARE_TRANSLATOR_LISTENER (note);
+  void listen_note (Stream_event *);
 };
 
 void
@@ -89,7 +89,6 @@ Completion_heads_engraver::initialize ()
   is_first_ = false;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Completion_heads_engraver, note);
 void
 Completion_heads_engraver::listen_note (Stream_event *ev)
 {
@@ -307,6 +306,12 @@ Completion_heads_engraver::Completion_heads_engraver ()
   tie_column_ = 0;
 }
 
+void
+Completion_heads_engraver::boot ()
+{
+  ADD_LISTENER (Completion_heads_engraver, note);
+}
+
 ADD_TRANSLATOR (Completion_heads_engraver,
                 /* doc */
                 "This engraver replaces @code{Note_heads_engraver}.  It plays"
index 8f809fde7021f9cd7cc9a175602ef6cbc1435b61..2b5693916e96ee25e02d0d1ff9a4882e50b51b1d 100644 (file)
@@ -76,7 +76,7 @@ protected:
   void start_translation_timestep ();
   void process_music ();
   void stop_translation_timestep ();
-  DECLARE_TRANSLATOR_LISTENER (rest);
+  void listen_rest (Stream_event *);
 };
 
 void
@@ -85,7 +85,6 @@ Completion_rest_engraver::initialize ()
   is_first_ = false;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Completion_rest_engraver, rest);
 void
 Completion_rest_engraver::listen_rest (Stream_event *ev)
 {
@@ -258,6 +257,12 @@ Completion_rest_engraver::Completion_rest_engraver ()
 {
 }
 
+void
+Completion_rest_engraver::boot ()
+{
+  ADD_LISTENER (Completion_rest_engraver, rest);
+}
+
 ADD_TRANSLATOR (Completion_rest_engraver,
                 /* doc */
                 "This engraver replaces @code{Rest_engraver}.  It plays"
index aa167b7de40a55120e4179d3d8c1a4ca05582bcd..3fdf6524c243f6745fa93883b7b46223528c1ca7 100644 (file)
@@ -34,8 +34,8 @@ public:
   TRANSLATOR_DECLARATIONS (Concurrent_hairpin_engraver);
 
 protected:
-  DECLARE_ACKNOWLEDGER (hairpin);
-  DECLARE_END_ACKNOWLEDGER (hairpin);
+  void acknowledge_hairpin (Grob_info);
+  void acknowledge_end_hairpin (Grob_info);
 
   void stop_translation_timestep ();
   void finalize ();
@@ -100,8 +100,13 @@ Concurrent_hairpin_engraver::finalize ()
   hairpins_hanging_out_.resize (0);
 }
 
-ADD_ACKNOWLEDGER (Concurrent_hairpin_engraver, hairpin);
-ADD_END_ACKNOWLEDGER (Concurrent_hairpin_engraver, hairpin);
+
+void
+Concurrent_hairpin_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Concurrent_hairpin_engraver, hairpin);
+  ADD_END_ACKNOWLEDGER (Concurrent_hairpin_engraver, hairpin);
+}
 
 ADD_TRANSLATOR (Concurrent_hairpin_engraver,
                 /* doc */
index 3258297b49539e2af7ed329eba280fc1b4192e6c..402bd80b6e8baf329b52b07c16275751f8c0b95b 100644 (file)
@@ -82,7 +82,7 @@ Context_def::~Context_def ()
 {
 }
 
-const char Context_def::type_p_name_[] = "ly:context-def?";
+const char * const Context_def::type_p_name_ = "ly:context-def?";
 
 int
 Context_def::print_smob (SCM port, scm_print_state *) const
index a533da2cbd05f4f2e990263e6396d2a4fb536491..892d692bbf8f6c2a89ff1d7288929cf8a8891e95 100644 (file)
@@ -34,7 +34,7 @@ Context_mod::Context_mod (SCM mod_list)
   mods_ = scm_reverse (mod_list);
 }
 
-const char Context_mod::type_p_name_[] = "ly:context-mod?";
+const char * const Context_mod::type_p_name_ = "ly:context-mod?";
 
 int
 Context_mod::print_smob (SCM port, scm_print_state *) const
index e0acae14557319223f253df2655caf80950796c0..6e22b2f808211b28aaa7acedad6afba52f9829f6 100644 (file)
@@ -66,7 +66,7 @@ class Grob_properties : public Simple_smob<Grob_properties>
 {
 public:
   SCM mark_smob () const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
 private:
   friend class Grob_property_info;
   friend SCM ly_make_grob_properties (SCM);
@@ -97,7 +97,7 @@ private:
     cooked_ (alist), cooked_from_ (alist), nested_ (0) { }
 };
 
-const char Grob_properties::type_p_name_[] = "ly:grob-properties?";
+const char * const Grob_properties::type_p_name_ = "ly:grob-properties?";
 
 SCM
 Grob_properties::mark_smob () const
index d96382e968226f697f300a24e05919f50fa959dc..7de61c5796fd291739c8f8e700a8132f58e1b2a8 100644 (file)
@@ -779,7 +779,7 @@ Context::mark_smob () const
   return properties_scm_;
 }
 
-const char Context::type_p_name_[] = "ly:context?";
+const char * const Context::type_p_name_ = "ly:context?";
 
 Global_context *
 Context::get_global_context () const
index 82beebe122fb002066f0fede1a4303c67fcbadd7..db6efe649ed5b3fa15c6155d51e8d8084e51b14f 100644 (file)
@@ -66,6 +66,12 @@ Control_track_performer::initialize ()
   add_text (Audio_text::TEXT, id_string);
 }
 
+void
+Control_track_performer::boot ()
+{
+
+}
+
 ADD_TRANSLATOR (Control_track_performer,
                 /* doc */
                 "",
index 383c9a1b1f7c33c2150a30c8e2e8fc6444d93408..53640afadc17264e62e765b6a1f238d592e5e548 100644 (file)
@@ -41,7 +41,7 @@ public:
 protected:
   void stop_translation_timestep ();
   void process_music ();
-  DECLARE_ACKNOWLEDGER (bar_line);
+  void acknowledge_bar_line (Grob_info);
 
   virtual void derived_mark () const;
 private:
@@ -209,7 +209,12 @@ Cue_clef_engraver::stop_translation_timestep ()
     }
 }
 
-ADD_ACKNOWLEDGER (Cue_clef_engraver, bar_line);
+void
+Cue_clef_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Cue_clef_engraver, bar_line);
+}
+
 ADD_TRANSLATOR (Cue_clef_engraver,
                 /* doc */
                 "Determine and set reference point for pitches in cued voices.",
index 5893dc205b731d84d6e8b3901d992b23bac4b6a9..a21ad4eb787ee8c9a4a91047abad40ffaa802601 100644 (file)
@@ -39,8 +39,8 @@ class Custos_engraver : public Engraver
 public:
   TRANSLATOR_DECLARATIONS (Custos_engraver);
   void start_translation_timestep ();
-  DECLARE_ACKNOWLEDGER (bar);
-  DECLARE_ACKNOWLEDGER (note_head);
+  void acknowledge_bar (Grob_info);
+  void acknowledge_note_head (Grob_info);
   void process_acknowledged ();
   void stop_translation_timestep ();
   virtual void finalize ();
@@ -142,8 +142,13 @@ Custos_engraver::finalize ()
   custodes_.clear ();
 }
 
-ADD_ACKNOWLEDGER (Custos_engraver, bar);
-ADD_ACKNOWLEDGER (Custos_engraver, note_head);
+
+void
+Custos_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Custos_engraver, bar);
+  ADD_ACKNOWLEDGER (Custos_engraver, note_head);
+}
 
 ADD_TRANSLATOR (Custos_engraver,
                 /* doc */
index 4eeb23036774feb4373e67bdad6e5577918678ba..a8b9898276c518ea263b3663e67d1df37b7bcdc5 100644 (file)
@@ -37,6 +37,12 @@ public:
 
 #include "translator.icc"
 
+void
+Default_bar_line_engraver::boot ()
+{
+
+}
+
 ADD_TRANSLATOR (Default_bar_line_engraver,
                 /* doc */
                 "This engraver determines what kind of automatic bar lines"
index 8f938d6f91a8bcd86a3721128bf0ba5c11920619..b1b076759f83b8a7e1a655d84054957b84afb4c5 100644 (file)
@@ -23,7 +23,7 @@
 #include "warn.hh"
 #include "lily-imports.hh"
 
-const char Dispatcher::type_p_name_[] = "ly:dispatcher?";
+const char * const Dispatcher::type_p_name_ = "ly:dispatcher?";
 
 Dispatcher::~Dispatcher ()
 {
index c646ed038cde099d9169ff488e34e125c5a48081..c5c80015249791f858e82ba1499e820122be975a 100644 (file)
@@ -32,7 +32,7 @@ public:
 
 protected:
 
-  DECLARE_ACKNOWLEDGER (rhythmic_head);
+  void acknowledge_rhythmic_head (Grob_info);
 
   void stop_translation_timestep ();
 };
@@ -61,7 +61,12 @@ Dot_column_engraver::acknowledge_rhythmic_head (Grob_info info)
     }
 }
 
-ADD_ACKNOWLEDGER (Dot_column_engraver, rhythmic_head);
+void
+Dot_column_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Dot_column_engraver, rhythmic_head);
+}
+
 ADD_TRANSLATOR (Dot_column_engraver,
                 /* doc */
                 "Engrave dots on dotted notes shifted to the right of the"
index 5465f460f6077e61d46fa4de53ffadbfe90b9495..cbd6c718a9e944bcc70b245b64b88045575c4ed6 100644 (file)
@@ -27,7 +27,7 @@
 
 class Dots_engraver : public Engraver
 {
-  DECLARE_ACKNOWLEDGER (rhythmic_head);
+  void acknowledge_rhythmic_head (Grob_info);
   TRANSLATOR_DECLARATIONS (Dots_engraver);
 };
 
@@ -56,7 +56,12 @@ Dots_engraver::acknowledge_rhythmic_head (Grob_info gi)
     }
 }
 
-ADD_ACKNOWLEDGER (Dots_engraver, rhythmic_head);
+
+void
+Dots_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Dots_engraver, rhythmic_head);
+}
 
 ADD_TRANSLATOR (Dots_engraver,
                 "Create @ref{Dots} objects for"
index d85648293ece82b38ed4f8a327ff8d2492783be1..d1717f8314a96f68b67cb85367f8a79910673767 100644 (file)
@@ -38,7 +38,7 @@ protected:
   // moment (global time) where percent started
   Moment start_mom_;
 
-  DECLARE_TRANSLATOR_LISTENER (double_percent);
+  void listen_double_percent (Stream_event *);
 
   void process_music ();
 };
@@ -48,7 +48,6 @@ Double_percent_repeat_engraver::Double_percent_repeat_engraver ()
   percent_event_ = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Double_percent_repeat_engraver, double_percent);
 void
 Double_percent_repeat_engraver::listen_double_percent (Stream_event *ev)
 {
@@ -95,6 +94,12 @@ Double_percent_repeat_engraver::process_music ()
     }
 }
 
+void
+Double_percent_repeat_engraver::boot ()
+{
+  ADD_LISTENER (Double_percent_repeat_engraver, double_percent);
+}
+
 ADD_TRANSLATOR (Double_percent_repeat_engraver,
                 /* doc */
                 "Make double measure repeats.",
index 09a58fa24b873722f89bddc8310cc41ed529f1ef..16b089cb703cca7877766b9e16ed202929357fbb 100644 (file)
@@ -43,9 +43,9 @@ public:
 
 protected:
   void process_music ();
-  DECLARE_ACKNOWLEDGER (stem);
-  DECLARE_ACKNOWLEDGER (note_column);
-  DECLARE_TRANSLATOR_LISTENER (note);
+  void acknowledge_stem (Grob_info);
+  void acknowledge_note_column (Grob_info);
+  void listen_note (Stream_event *);
   void stop_translation_timestep ();
 };
 
@@ -53,7 +53,6 @@ Drum_notes_engraver::Drum_notes_engraver ()
 {
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Drum_notes_engraver, note);
 void
 Drum_notes_engraver::listen_note (Stream_event *ev)
 {
@@ -140,8 +139,14 @@ Drum_notes_engraver::stop_translation_timestep ()
   events_.clear ();
 }
 
-ADD_ACKNOWLEDGER (Drum_notes_engraver, stem);
-ADD_ACKNOWLEDGER (Drum_notes_engraver, note_column);
+
+void
+Drum_notes_engraver::boot ()
+{
+  ADD_LISTENER (Drum_notes_engraver, note);
+  ADD_ACKNOWLEDGER (Drum_notes_engraver, stem);
+  ADD_ACKNOWLEDGER (Drum_notes_engraver, note_column);
+}
 
 ADD_TRANSLATOR (Drum_notes_engraver,
                 /* doc */
index 0285de650478c880493963c576389112057058c5..93f648f3d765b4047afc23803e1e6eb8eda3a840 100644 (file)
@@ -33,7 +33,7 @@ public:
 protected:
   void stop_translation_timestep ();
   void process_music ();
-  DECLARE_TRANSLATOR_LISTENER (note);
+  void listen_note (Stream_event *);
 private:
   vector<Stream_event *> note_evs_;
 };
@@ -96,13 +96,18 @@ Drum_note_performer::stop_translation_timestep ()
   note_evs_.clear ();
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Drum_note_performer, note);
 void
 Drum_note_performer::listen_note (Stream_event *ev)
 {
   note_evs_.push_back (ev);
 }
 
+void
+Drum_note_performer::boot ()
+{
+  ADD_LISTENER (Drum_note_performer, note);
+}
+
 ADD_TRANSLATOR (Drum_note_performer,
                 /* doc */
                 "Play drum notes.",
index 0b1001954072852ea366ad18c257aa19ef0fb4e0..0c6fa4dd5f55c89b5fe628276c04b47acc3f7cc4 100644 (file)
@@ -136,7 +136,7 @@ Duration::to_string () const
   return s;
 }
 
-const char Duration::type_p_name_[] = "ly:duration?";
+const char * const Duration::type_p_name_ = "ly:duration?";
 
 
 int
index 0abb39a7f2614b5bd0ab79e488b2159e46890f14..c276e217593e7b209e1cce5f47b15a8610dd8e1b 100644 (file)
 class Dynamic_align_engraver : public Engraver
 {
   TRANSLATOR_DECLARATIONS (Dynamic_align_engraver);
-  DECLARE_ACKNOWLEDGER (rhythmic_head);
-  DECLARE_ACKNOWLEDGER (stem);
-  DECLARE_ACKNOWLEDGER (dynamic);
-  DECLARE_ACKNOWLEDGER (footnote_spanner);
-  DECLARE_END_ACKNOWLEDGER (dynamic);
+  void acknowledge_rhythmic_head (Grob_info);
+  void acknowledge_stem (Grob_info);
+  void acknowledge_dynamic (Grob_info);
+  void acknowledge_footnote_spanner (Grob_info);
+  void acknowledge_end_dynamic (Grob_info);
 
 protected:
   virtual void stop_translation_timestep ();
@@ -64,11 +64,6 @@ Dynamic_align_engraver::Dynamic_align_engraver ()
   current_dynamic_spanner_ = 0;
 }
 
-ADD_ACKNOWLEDGER (Dynamic_align_engraver, dynamic);
-ADD_ACKNOWLEDGER (Dynamic_align_engraver, rhythmic_head);
-ADD_ACKNOWLEDGER (Dynamic_align_engraver, stem);
-ADD_ACKNOWLEDGER (Dynamic_align_engraver, footnote_spanner);
-ADD_END_ACKNOWLEDGER (Dynamic_align_engraver, dynamic);
 
 void
 Dynamic_align_engraver::create_line_spanner (Grob *cause)
@@ -232,6 +227,16 @@ Dynamic_align_engraver::stop_translation_timestep ()
   support_.clear ();
 }
 
+void
+Dynamic_align_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Dynamic_align_engraver, dynamic);
+  ADD_ACKNOWLEDGER (Dynamic_align_engraver, rhythmic_head);
+  ADD_ACKNOWLEDGER (Dynamic_align_engraver, stem);
+  ADD_ACKNOWLEDGER (Dynamic_align_engraver, footnote_spanner);
+  ADD_END_ACKNOWLEDGER (Dynamic_align_engraver, dynamic);
+}
+
 ADD_TRANSLATOR (Dynamic_align_engraver,
                 /* doc */
                 "Align hairpins and dynamic texts on a horizontal line.",
index edfd35fcb5912652b08a46dd3548da3cc5866ac6..5d4ef33de3aee6f282176fd92d3f82baf23966dc 100644 (file)
 class Dynamic_engraver : public Engraver
 {
   TRANSLATOR_DECLARATIONS (Dynamic_engraver);
-  DECLARE_ACKNOWLEDGER (note_column);
-  DECLARE_TRANSLATOR_LISTENER (absolute_dynamic);
-  DECLARE_TRANSLATOR_LISTENER (span_dynamic);
-  DECLARE_TRANSLATOR_LISTENER (break_span);
+  void acknowledge_note_column (Grob_info);
+  void listen_absolute_dynamic (Stream_event *);
+  void listen_span_dynamic (Stream_event *);
+  void listen_break_span (Stream_event *);
 
 protected:
   virtual void process_music ();
@@ -69,14 +69,12 @@ Dynamic_engraver::Dynamic_engraver ()
   end_new_spanner_ = false;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Dynamic_engraver, absolute_dynamic);
 void
 Dynamic_engraver::listen_absolute_dynamic (Stream_event *ev)
 {
   ASSIGN_EVENT_ONCE (script_event_, ev);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Dynamic_engraver, span_dynamic);
 void
 Dynamic_engraver::listen_span_dynamic (Stream_event *ev)
 {
@@ -85,7 +83,6 @@ Dynamic_engraver::listen_span_dynamic (Stream_event *ev)
   ASSIGN_EVENT_ONCE (accepted_spanevents_drul_[d], ev);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Dynamic_engraver, break_span);
 void
 Dynamic_engraver::listen_break_span (Stream_event *event)
 {
@@ -278,7 +275,15 @@ Dynamic_engraver::acknowledge_note_column (Grob_info info)
     finished_spanner_->set_bound (RIGHT, info.grob ());
 }
 
-ADD_ACKNOWLEDGER (Dynamic_engraver, note_column);
+void
+Dynamic_engraver::boot ()
+{
+  ADD_LISTENER (Dynamic_engraver, absolute_dynamic);
+  ADD_LISTENER (Dynamic_engraver, span_dynamic);
+  ADD_LISTENER (Dynamic_engraver, break_span);
+  ADD_ACKNOWLEDGER (Dynamic_engraver, note_column);
+}
+
 ADD_TRANSLATOR (Dynamic_engraver,
                 /* doc */
                 "Create hairpins, dynamic texts and dynamic text spanners.",
index 6a6f8b8cf9acefceb7235547568556133609388e..46a8a446d35af8c3a32e949c34f59ed962e520c1 100644 (file)
@@ -33,9 +33,9 @@ protected:
   void process_music ();
   Real equalize_volume (Real);
 
-  DECLARE_TRANSLATOR_LISTENER (decrescendo);
-  DECLARE_TRANSLATOR_LISTENER (crescendo);
-  DECLARE_TRANSLATOR_LISTENER (absolute_dynamic);
+  void listen_decrescendo (Stream_event *);
+  void listen_crescendo (Stream_event *);
+  void listen_absolute_dynamic (Stream_event *);
 private:
   Stream_event *script_event_;
   Drul_array<Stream_event *> span_events_;
@@ -206,7 +206,6 @@ Dynamic_performer::stop_translation_timestep ()
     = span_events_[RIGHT] = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Dynamic_performer, decrescendo);
 void
 Dynamic_performer::listen_decrescendo (Stream_event *r)
 {
@@ -215,7 +214,6 @@ Dynamic_performer::listen_decrescendo (Stream_event *r)
   grow_dir_[d] = SMALLER;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Dynamic_performer, crescendo);
 void
 Dynamic_performer::listen_crescendo (Stream_event *r)
 {
@@ -224,7 +222,6 @@ Dynamic_performer::listen_crescendo (Stream_event *r)
   grow_dir_[d] = BIGGER;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Dynamic_performer, absolute_dynamic);
 void
 Dynamic_performer::listen_absolute_dynamic (Stream_event *r)
 {
@@ -232,6 +229,14 @@ Dynamic_performer::listen_absolute_dynamic (Stream_event *r)
     script_event_ = r;
 }
 
+void
+Dynamic_performer::boot ()
+{
+  ADD_LISTENER (Dynamic_performer, decrescendo);
+  ADD_LISTENER (Dynamic_performer, crescendo);
+  ADD_LISTENER (Dynamic_performer, absolute_dynamic);
+}
+
 ADD_TRANSLATOR (Dynamic_performer,
                 /* doc */
                 "",
index a62ed3726f8bd9c2269e4c8f73148dba80528d0b..d2fc2f398f9ac8856a0ef4b69cf2e5d3392edb20 100644 (file)
@@ -33,9 +33,9 @@ public:
   TRANSLATOR_DECLARATIONS (Episema_engraver);
 protected:
   virtual void finalize ();
-  DECLARE_TRANSLATOR_LISTENER (episema);
-  DECLARE_ACKNOWLEDGER (note_column);
-  DECLARE_ACKNOWLEDGER (note_head);
+  void listen_episema (Stream_event *);
+  void acknowledge_note_column (Grob_info);
+  void acknowledge_note_head (Grob_info);
   void stop_translation_timestep ();
   void process_music ();
 
@@ -56,7 +56,6 @@ Episema_engraver::Episema_engraver ()
   event_drul_.set (0, 0);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Episema_engraver, episema);
 void
 Episema_engraver::listen_episema (Stream_event *ev)
 {
@@ -161,8 +160,14 @@ Episema_engraver::acknowledge_note_head (Grob_info info)
     }
 }
 
-ADD_ACKNOWLEDGER (Episema_engraver, note_column);
-ADD_ACKNOWLEDGER (Episema_engraver, note_head);
+
+void
+Episema_engraver::boot ()
+{
+  ADD_LISTENER (Episema_engraver, episema);
+  ADD_ACKNOWLEDGER (Episema_engraver, note_column);
+  ADD_ACKNOWLEDGER (Episema_engraver, note_head);
+}
 
 ADD_TRANSLATOR (Episema_engraver,
                 /* doc */
index 3f3ef3b3ff3941527362496a43e9f2a3f964274a..39fa7788dedb87fa6a4ff5344c865f9c963383c3 100644 (file)
@@ -43,9 +43,9 @@ public:
   TRANSLATOR_DECLARATIONS (Extender_engraver);
 
 protected:
-  DECLARE_TRANSLATOR_LISTENER (extender);
-  DECLARE_TRANSLATOR_LISTENER (completize_extender);
-  DECLARE_ACKNOWLEDGER (lyric_syllable);
+  void listen_extender (Stream_event *);
+  void listen_completize_extender (Stream_event *);
+  void acknowledge_lyric_syllable (Grob_info);
 
   virtual void finalize ();
 
@@ -60,7 +60,6 @@ Extender_engraver::Extender_engraver ()
   ev_ = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Extender_engraver, extender);
 void
 Extender_engraver::listen_extender (Stream_event *ev)
 {
@@ -73,7 +72,6 @@ Extender_engraver::listen_extender (Stream_event *ev)
   end before the associated voice (this prevents the right bound being extended
   to the next note-column if no lyric follows the extender)
 */
-IMPLEMENT_TRANSLATOR_LISTENER (Extender_engraver, completize_extender);
 void
 Extender_engraver::listen_completize_extender (Stream_event * /* ev */)
 {
@@ -180,7 +178,14 @@ Extender_engraver::finalize ()
     }
 }
 
-ADD_ACKNOWLEDGER (Extender_engraver, lyric_syllable);
+void
+Extender_engraver::boot ()
+{
+  ADD_LISTENER (Extender_engraver, extender);
+  ADD_LISTENER (Extender_engraver, completize_extender);
+  ADD_ACKNOWLEDGER (Extender_engraver, lyric_syllable);
+}
+
 ADD_TRANSLATOR (Extender_engraver,
                 /* doc */
                 "Create lyric extenders.",
index 2ed07e3e836fc410e2cddb846b332b9e2d3bab2a..9785f3fef47e763efc7acc2da7636ed7e20a7b72 100644 (file)
@@ -122,8 +122,8 @@ protected:
   Moment stop_moment_;
   bool have_rest_;
 
-  DECLARE_TRANSLATOR_LISTENER (rest);
-  DECLARE_TRANSLATOR_LISTENER (bass_figure);
+  void listen_rest (Stream_event *);
+  void listen_bass_figure (Stream_event *);
 
   virtual void derived_mark () const;
 
@@ -180,14 +180,12 @@ Figured_bass_engraver::stop_translation_timestep ()
     clear_spanners ();
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Figured_bass_engraver, rest);
 void
 Figured_bass_engraver::listen_rest (Stream_event *)
 {
   have_rest_ = true;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Figured_bass_engraver, bass_figure);
 void
 Figured_bass_engraver::listen_bass_figure (Stream_event *ev)
 {
@@ -504,6 +502,13 @@ Figured_bass_engraver::add_brackets ()
     }
 }
 
+void
+Figured_bass_engraver::boot ()
+{
+  ADD_LISTENER (Figured_bass_engraver, rest);
+  ADD_LISTENER (Figured_bass_engraver, bass_figure);
+}
+
 ADD_TRANSLATOR (Figured_bass_engraver,
                 /* doc */
                 "Make figured bass numbers.",
index c1df4623e6271a610fc6bc8df3f373418c7e6e74..66fabb1ffb6d4a0a316aeccb31bec741bfefd759 100644 (file)
@@ -36,12 +36,12 @@ class Figured_bass_position_engraver : public Engraver
   vector<Grob *> support_;
   vector<Grob *> span_support_;
 protected:
-  DECLARE_ACKNOWLEDGER (note_column);
-  DECLARE_ACKNOWLEDGER (slur);
-  DECLARE_END_ACKNOWLEDGER (slur);
-  DECLARE_END_ACKNOWLEDGER (tie);
-  DECLARE_ACKNOWLEDGER (bass_figure_alignment);
-  DECLARE_END_ACKNOWLEDGER (bass_figure_alignment);
+  void acknowledge_note_column (Grob_info);
+  void acknowledge_slur (Grob_info);
+  void acknowledge_end_slur (Grob_info);
+  void acknowledge_end_tie (Grob_info);
+  void acknowledge_bass_figure_alignment (Grob_info);
+  void acknowledge_end_bass_figure_alignment (Grob_info);
 
   virtual void finalize ();
   void start_spanner ();
@@ -138,13 +138,18 @@ Figured_bass_position_engraver::acknowledge_bass_figure_alignment (Grob_info inf
   start_spanner ();
 }
 
-ADD_ACKNOWLEDGER (Figured_bass_position_engraver, note_column);
-ADD_ACKNOWLEDGER (Figured_bass_position_engraver, slur);
-ADD_END_ACKNOWLEDGER (Figured_bass_position_engraver, slur);
 
-ADD_END_ACKNOWLEDGER (Figured_bass_position_engraver, tie);
-ADD_ACKNOWLEDGER (Figured_bass_position_engraver, bass_figure_alignment);
-ADD_END_ACKNOWLEDGER (Figured_bass_position_engraver, bass_figure_alignment);
+
+void
+Figured_bass_position_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Figured_bass_position_engraver, note_column);
+  ADD_ACKNOWLEDGER (Figured_bass_position_engraver, slur);
+  ADD_END_ACKNOWLEDGER (Figured_bass_position_engraver, slur);
+  ADD_END_ACKNOWLEDGER (Figured_bass_position_engraver, tie);
+  ADD_ACKNOWLEDGER (Figured_bass_position_engraver, bass_figure_alignment);
+  ADD_END_ACKNOWLEDGER (Figured_bass_position_engraver, bass_figure_alignment);
+}
 
 ADD_TRANSLATOR (Figured_bass_position_engraver,
                 /* doc */
index 1c5b904809809c81f09022b68638edab7c39637d..a2a37143b37a81efc59482fda913b1b7c7eddf20 100644 (file)
@@ -37,7 +37,7 @@ class Fingering_column_engraver : public Engraver
 public:
   TRANSLATOR_DECLARATIONS (Fingering_column_engraver);
 protected:
-  DECLARE_ACKNOWLEDGER (finger);
+  void acknowledge_finger (Grob_info);
   void process_acknowledged ();
   void stop_translation_timestep ();
 };
@@ -101,7 +101,12 @@ Fingering_column_engraver::process_acknowledged ()
     }
 }
 
-ADD_ACKNOWLEDGER (Fingering_column_engraver, finger);
+void
+Fingering_column_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Fingering_column_engraver, finger);
+}
+
 ADD_TRANSLATOR (Fingering_column_engraver,
                 /* doc */
                 "Find potentially colliding scripts and put them into a"
index d5b4102d8bf844bd3ef8cbb28aa71a357bb673aa..8de44e96984ed22d18a504a1d5fe41bc9118d8bc 100644 (file)
@@ -38,16 +38,15 @@ public:
 protected:
   void stop_translation_timestep ();
   void process_music ();
-  DECLARE_TRANSLATOR_LISTENER (fingering);
-  DECLARE_ACKNOWLEDGER (rhythmic_head);
-  DECLARE_ACKNOWLEDGER (stem);
-  DECLARE_ACKNOWLEDGER (flag);
+  void listen_fingering (Stream_event *);
+  void acknowledge_rhythmic_head (Grob_info);
+  void acknowledge_stem (Grob_info);
+  void acknowledge_flag (Grob_info);
 
 private:
   void make_script (Direction, Stream_event *, int);
 };
 
-IMPLEMENT_TRANSLATOR_LISTENER (Fingering_engraver, fingering);
 void
 Fingering_engraver::listen_fingering (Stream_event *ev)
 {
@@ -141,9 +140,15 @@ Fingering_engraver::Fingering_engraver ()
 {
 }
 
-ADD_ACKNOWLEDGER (Fingering_engraver, rhythmic_head);
-ADD_ACKNOWLEDGER (Fingering_engraver, stem);
-ADD_ACKNOWLEDGER (Fingering_engraver, flag);
+
+void
+Fingering_engraver::boot ()
+{
+  ADD_LISTENER (Fingering_engraver, fingering);
+  ADD_ACKNOWLEDGER (Fingering_engraver, rhythmic_head);
+  ADD_ACKNOWLEDGER (Fingering_engraver, stem);
+  ADD_ACKNOWLEDGER (Fingering_engraver, flag);
+}
 
 ADD_TRANSLATOR (Fingering_engraver,
                 /* doc */
index f2b6a0e1476c2e669a1917d47f8d17343960ac37..c9daa95f3edf2000d39fb47a5d856a8df505073a 100644 (file)
@@ -112,7 +112,7 @@ Font_metric::print_smob (SCM port, scm_print_state *) const
   return 1;
 }
 
-const char Font_metric::type_p_name_[] = "ly:font-metric?";
+const char * const Font_metric::type_p_name_ = "ly:font-metric?";
 
 SCM
 Font_metric::font_file_name () const
index b9250358dd2197a48356529db9aa5db9954f9bdb..4dfd24d01444a561a2485f6001aeb9f14f57c8d3 100644 (file)
@@ -25,7 +25,7 @@ class Font_size_engraver : public Engraver
 
   TRANSLATOR_DECLARATIONS (Font_size_engraver);
 protected:
-  DECLARE_ACKNOWLEDGER (font);
+  void acknowledge_font (Grob_info);
   void process_music ();
   Real size;
 private:
@@ -61,7 +61,12 @@ Font_size_engraver::acknowledge_font (Grob_info gi)
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Font_size_engraver, font);
+void
+Font_size_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Font_size_engraver, font);
+}
+
 ADD_TRANSLATOR (Font_size_engraver,
                 /* doc */
                 "Put @code{fontSize} into @code{font-size} grob property.",
index 636379125f73b36caf936bbddba4fc632244f0e8..e80d9b64cec69b8016a4a2aca5cb5bdfb4f924f5 100644 (file)
@@ -33,8 +33,8 @@ class Footnote_engraver : public Engraver
 {
   TRANSLATOR_DECLARATIONS (Footnote_engraver);
 
-  DECLARE_ACKNOWLEDGER (grob);
-  DECLARE_END_ACKNOWLEDGER (grob);
+  void acknowledge_grob (Grob_info);
+  void acknowledge_end_grob (Grob_info);
 
   vector<Drul_array<Spanner *> > annotated_spanners_;
 
@@ -114,8 +114,13 @@ Footnote_engraver::acknowledge_end_grob (Grob_info info)
       }
 }
 
-ADD_ACKNOWLEDGER (Footnote_engraver, grob);
-ADD_END_ACKNOWLEDGER (Footnote_engraver, grob);
+
+void
+Footnote_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Footnote_engraver, grob);
+  ADD_END_ACKNOWLEDGER (Footnote_engraver, grob);
+}
 
 ADD_TRANSLATOR (Footnote_engraver,
                 /* doc */
index db0e254739c3cc5d7cee1a1eecaa1ada39adcb68..9cfdef24c82566634160bc4d22ba655e2be1e9e2 100644 (file)
@@ -58,6 +58,12 @@ Forbid_line_break_engraver::start_translation_timestep ()
     }
 }
 
+void
+Forbid_line_break_engraver::boot ()
+{
+
+}
+
 ADD_TRANSLATOR (Forbid_line_break_engraver,
                 /* doc */
                 "Forbid line breaks when note heads are still playing at some"
index 2ce799bf0f94b4516b90086bcd0f194fe17196bf..18843fc87c6d3c2d9829c6b29f1f337d85cd14f2 100644 (file)
@@ -48,9 +48,9 @@ protected:
   void stop_translation_timestep ();
   void process_music ();
   virtual void derived_mark () const;
-  DECLARE_TRANSLATOR_LISTENER (note);
-  DECLARE_TRANSLATOR_LISTENER (string_number);
-  DECLARE_TRANSLATOR_LISTENER (fingering);
+  void listen_note (Stream_event *);
+  void listen_string_number (Stream_event *);
+  void listen_fingering (Stream_event *);
 
 private:
   SCM last_placements_;
@@ -68,21 +68,18 @@ Fretboard_engraver::Fretboard_engraver ()
   last_placements_ = SCM_BOOL_F;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Fretboard_engraver, note);
 void
 Fretboard_engraver::listen_note (Stream_event *ev)
 {
   note_events_.push_back (ev);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Fretboard_engraver, string_number);
 void
 Fretboard_engraver::listen_string_number (Stream_event *ev)
 {
   tabstring_events_.push_back (ev);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Fretboard_engraver, fingering);
 void
 Fretboard_engraver::listen_fingering (Stream_event *ev)
 {
@@ -128,6 +125,14 @@ Fretboard_engraver::stop_translation_timestep ()
   fingering_events_.clear ();
 }
 
+void
+Fretboard_engraver::boot ()
+{
+  ADD_LISTENER (Fretboard_engraver, note);
+  ADD_LISTENER (Fretboard_engraver, string_number);
+  ADD_LISTENER (Fretboard_engraver, fingering);
+}
+
 ADD_TRANSLATOR (Fretboard_engraver,
                 /* doc */
                 "Generate fret diagram from one or more events of type"
index c7744d1f4b2db3288cbbb252f12ccd0e4b9d4824..878e7f88b355539a7f29e1cf75aa3e3e701108be 100644 (file)
@@ -35,8 +35,8 @@ public:
   TRANSLATOR_DECLARATIONS (Glissando_engraver);
 
 protected:
-  DECLARE_TRANSLATOR_LISTENER (glissando);
-  DECLARE_ACKNOWLEDGER (note_column);
+  void listen_glissando (Stream_event *);
+  void acknowledge_note_column (Grob_info);
   virtual void finalize ();
 
   void stop_translation_timestep ();
@@ -60,7 +60,6 @@ Glissando_engraver::Glissando_engraver ()
   stop_glissandi_ = false;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Glissando_engraver, glissando);
 void
 Glissando_engraver::listen_glissando (Stream_event *ev)
 {
@@ -170,7 +169,13 @@ Glissando_engraver::finalize ()
     kill_me_[i]->suicide ();
 }
 
-ADD_ACKNOWLEDGER (Glissando_engraver, note_column);
+void
+Glissando_engraver::boot ()
+{
+  ADD_LISTENER (Glissando_engraver, glissando);
+  ADD_ACKNOWLEDGER (Glissando_engraver, note_column);
+}
+
 ADD_TRANSLATOR (Glissando_engraver,
                 /* doc */
                 "Engrave glissandi.",
index 5279cab4c0fb2ed3fa7f2dd03bc4846a84d998a0..57ccb1e0fa4d18202fff38f18cc002a38b0f77f8 100644 (file)
@@ -157,6 +157,12 @@ Grace_engraver::derived_mark () const
   Engraver::derived_mark ();
 }
 
+void
+Grace_engraver::boot ()
+{
+
+}
+
 ADD_TRANSLATOR (Grace_engraver,
                 /* doc */
                 "Set font size and other properties for grace notes.",
index 5da9c90b5cc40b16f177261373e99c2096fdb0b3..445d2b0f81a7504c44df39d87efbeebd1b4be4ba 100644 (file)
@@ -77,6 +77,12 @@ Grace_spacing_engraver::stop_translation_timestep ()
     grace_spacing_ = 0;
 }
 
+void
+Grace_spacing_engraver::boot ()
+{
+
+}
+
 ADD_TRANSLATOR (Grace_spacing_engraver,
                 "Bookkeeping of shortest starting and playing notes in grace"
                 " note runs.",
index a61f61df789162cd495cca4b73e202a995784019..efecf676228f01de4c5d225f68231d5a7b3f749c 100644 (file)
@@ -31,7 +31,7 @@ class Grid_line_span_engraver : public Engraver
 public:
   TRANSLATOR_DECLARATIONS (Grid_line_span_engraver);
 protected:
-  DECLARE_ACKNOWLEDGER (grid_point);
+  void acknowledge_grid_point (Grob_info);
   void stop_translation_timestep ();
 };
 
@@ -70,7 +70,12 @@ Grid_line_span_engraver::stop_translation_timestep ()
   lines_.resize (0);
 }
 
-ADD_ACKNOWLEDGER (Grid_line_span_engraver, grid_point);
+void
+Grid_line_span_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Grid_line_span_engraver, grid_point);
+}
+
 ADD_TRANSLATOR (Grid_line_span_engraver,
                 /* doc */
                 "This engraver makes cross-staff lines: It catches all normal"
index f4361957874aadb5cd71e7f0d3b69776a11662a6..d67fb191b6463605ae35440913b6bd7d6deab823 100644 (file)
@@ -48,6 +48,12 @@ Grid_point_engraver::Grid_point_engraver ()
 {
 }
 
+void
+Grid_point_engraver::boot ()
+{
+
+}
+
 ADD_TRANSLATOR (Grid_point_engraver,
                 /* doc */
                 "Generate grid points.",
index ec0ee43e1895f92eb21f16f616110f5e1ed2ed0e..f5228dfd7148d91296dac7765b8b197cb162f34c 100644 (file)
@@ -116,7 +116,7 @@ Grob_array::filter_map_assign (const Grob_array &src,
     filter_map (map_fun);
 }
 
-const char Grob_array::type_p_name_[] = "ly:grob-array?";
+const char * const Grob_array::type_p_name_ = "ly:grob-array?";
 
 
 SCM
index 45b4ff2b359d7aca819c4ab074145eb9df430e4a..25392a43556d8746b6742cded90cb9e30da521a9 100644 (file)
@@ -42,7 +42,7 @@ public:
   TRANSLATOR_DECLARATIONS (Grob_pq_engraver);
 protected:
   virtual void initialize ();
-  DECLARE_ACKNOWLEDGER (grob);
+  void acknowledge_grob (Grob_info);
   void start_translation_timestep ();
   void stop_translation_timestep ();
   void process_acknowledged ();
@@ -148,7 +148,12 @@ Grob_pq_engraver::start_translation_timestep ()
     context ()->set_property ("busyGrobs", busy);
 }
 
-ADD_ACKNOWLEDGER (Grob_pq_engraver, grob);
+void
+Grob_pq_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Grob_pq_engraver, grob);
+}
+
 ADD_TRANSLATOR (Grob_pq_engraver,
                 /* doc */
                 "Administrate when certain grobs (e.g., note heads) stop"
index 066b700a252004ac86f809d721208c1f243fa8d9..72949973b1acf777fb88295945c7cf44e7f6e489 100644 (file)
@@ -23,7 +23,7 @@
 #include "warn.hh"
 
 
-const char Grob::type_p_name_[] = "ly:grob?";
+const char * const Grob::type_p_name_ = "ly:grob?";
 
 SCM
 Grob::mark_smob () const
index cd46817904db5726a5ed2dee7026b4fd1a2649e6..d50146a2d0ddaf0061104d33252b73166d36077b 100644 (file)
@@ -39,8 +39,8 @@ public:
 
   void stop_translation_timestep ();
   void process_music ();
-  DECLARE_ACKNOWLEDGER (note_column);
-  DECLARE_TRANSLATOR_LISTENER (note_grouping);
+  void acknowledge_note_column (Grob_info);
+  void listen_note_grouping (Stream_event *);
 };
 
 Horizontal_bracket_engraver::Horizontal_bracket_engraver ()
@@ -49,7 +49,6 @@ Horizontal_bracket_engraver::Horizontal_bracket_engraver ()
   push_count_ = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Horizontal_bracket_engraver, note_grouping);
 void
 Horizontal_bracket_engraver::listen_note_grouping (Stream_event *ev)
 {
@@ -109,7 +108,13 @@ Horizontal_bracket_engraver::stop_translation_timestep ()
   events_.clear ();
 }
 
-ADD_ACKNOWLEDGER (Horizontal_bracket_engraver, note_column);
+void
+Horizontal_bracket_engraver::boot ()
+{
+  ADD_LISTENER (Horizontal_bracket_engraver, note_grouping);
+  ADD_ACKNOWLEDGER (Horizontal_bracket_engraver, note_column);
+}
+
 ADD_TRANSLATOR (Horizontal_bracket_engraver,
                 /* doc */
                 "Create horizontal brackets over notes for musical analysis"
index be436655561f8421eac94c40d32c1b7950796839..19ff388963d2273934eb9a5356b1da005557aefe 100644 (file)
@@ -42,8 +42,8 @@ public:
 
 protected:
 
-  DECLARE_ACKNOWLEDGER (lyric_syllable);
-  DECLARE_TRANSLATOR_LISTENER (hyphen);
+  void acknowledge_lyric_syllable (Grob_info);
+  void listen_hyphen (Stream_event *);
 
   virtual void finalize ();
 
@@ -74,7 +74,6 @@ Hyphen_engraver::acknowledge_lyric_syllable (Grob_info i)
     finished_hyphen_->set_bound (RIGHT, item);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Hyphen_engraver, hyphen);
 void
 Hyphen_engraver::listen_hyphen (Stream_event *ev)
 {
@@ -155,7 +154,13 @@ Hyphen_engraver::stop_translation_timestep ()
   ev_ = 0;
 }
 
-ADD_ACKNOWLEDGER (Hyphen_engraver, lyric_syllable);
+
+void
+Hyphen_engraver::boot ()
+{
+  ADD_LISTENER (Hyphen_engraver, hyphen);
+  ADD_ACKNOWLEDGER (Hyphen_engraver, lyric_syllable);
+}
 
 ADD_TRANSLATOR (Hyphen_engraver,
                 /* doc */
index f206a3b95d7ec375f6a864c44a8aab7b43170e05..a2d090a6dfd71c7567447e5ff75dd87ece76f756 100644 (file)
@@ -48,7 +48,6 @@ class All_font_metrics : public Smob<All_font_metrics>
 
   All_font_metrics (All_font_metrics const &);
 public:
-  static const char * const type_p_name_; // = 0
   SCM mark_smob () const;
 
   Index_to_charcode_map const *get_index_to_charcode_map (const string &filename,
index 3ea6c2c550b0346db2e77d88903df91735c6a2b4..0a71a6b9e442a6901b82028d45c83ca09831a945 100644 (file)
@@ -30,7 +30,7 @@ class Book : public Smob<Book>
 {
 public:
   SCM mark_smob () const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   virtual ~Book ();
   SCM header_;
   Output_def *paper_;
index 7d5745d6965b757123606d33b4b25edf64dc1779..d4a8655a429b0cf965364132871cf2b7f9c3b054 100644 (file)
@@ -12,7 +12,7 @@
 class Box : public Simple_smob<Box>
 {
 public:
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
 private:
   Interval interval_a_[NO_AXES];
 public:
index 963f4eb59cdf633435b16aa0a479068981c628b8..671140673f5df0dd242c5ac883ff0b274128bb29 100644 (file)
@@ -48,7 +48,6 @@ class Callback_wrapper : public Simple_smob<Callback_wrapper>
     : trampoline_ (trampoline)
   { } // Private constructor, use only in make_smob
 public:
-  static const char * const type_p_name_; // = 0
   LY_DECLARE_SMOB_PROC (&Callback_wrapper::call, 2, 0, 0)
   SCM call (SCM target, SCM arg)
   {
@@ -77,7 +76,6 @@ class Callback2_wrapper : public Simple_smob<Callback2_wrapper>
     : trampoline_ (trampoline)
   { } // Private constructor, use only in make_smob
 public:
-  static const char * const type_p_name_; // = 0
   LY_DECLARE_SMOB_PROC (&Callback2_wrapper::call, 3, 0, 0)
   SCM call (SCM target, SCM arg1, SCM arg2)
   {
@@ -102,7 +100,6 @@ class Callback0_wrapper : public Simple_smob<Callback0_wrapper>
     : trampoline_ (trampoline)
   { } // Private constructor, use only in make_smob
 public:
-  static const char * const type_p_name_; // = 0
   LY_DECLARE_SMOB_PROC (&Callback0_wrapper::call, 1, 0, 0)
   SCM call (SCM target)
   {
@@ -153,7 +150,6 @@ class Method_instance : public Simple_smob<Method_instance>
 {
   SCM method_, instance_;
 public:
-  static const char * const type_p_name_; // = 0
   LY_DECLARE_SMOB_PROC (&Method_instance::call, 0, 0, 1)
   SCM call (SCM rest)
   {
index b7f77f84028210b4939a8c3643c710303410381e..78bfef8897e626c20daaf07353f3b6243c8f5348 100644 (file)
@@ -26,7 +26,7 @@ class Coherent_ligature_engraver : public Ligature_engraver
 public:
   // no TRANSLATOR_DECLARATIONS (Coherent_ligature_engraver) needed
   // since this class is abstract
-  TRANSLATOR_INHERIT (Ligature_engraver)
+  TRANSLATOR_INHERIT (Ligature_engraver);
   DECLARE_TRANSLATOR_CALLBACKS (Coherent_ligature_engraver);
 
 protected:
index c49fee1e305a6ada60a051ac52400a0e7044bfae..b068e204c02e345d50bf2343def2e95a68941c27 100644 (file)
@@ -35,7 +35,7 @@ struct Context_def : public Smob<Context_def>
 {
   SCM mark_smob () const;
   int print_smob (SCM, scm_print_state *) const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   virtual ~Context_def ();
 private:
   /*
index c9f0caa8fbb9c32228b28ae56a0df1c14ad37deb..81b1f34e36c47189b543eda186e84dbf66e6fb98 100644 (file)
@@ -38,7 +38,7 @@ struct Context_mod : public Simple_smob<Context_mod>
 {
   SCM mark_smob () const;
   int print_smob (SCM, scm_print_state *) const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
 private:
   SCM mods_;
 public:
index 130a304f935ea694c71d3f9d773ad1aed98e365d..468f612061707734ee3865faf8937cba06ea92ec 100644 (file)
@@ -33,7 +33,7 @@ class Context : public Smob<Context>
 public:
   SCM mark_smob () const;
   int print_smob (SCM, scm_print_state *) const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   virtual ~Context ();
 private:
   Scheme_hash_table *properties_dict () const;
index f0eb30ba6dc41d8d8ad392e362d6ec480a7fa49d..98a8626fd8f04f370c632209b053c40d77bb0953 100644 (file)
@@ -29,7 +29,7 @@ class Dispatcher : public Smob<Dispatcher>
 public:
   int print_smob (SCM, scm_print_state *) const;
   SCM mark_smob () const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   virtual ~Dispatcher ();
 private:
   /* Hash table. Each event-class maps to a list of listeners. */
index 7a57cf53af6a4ff5dd333266173374a89bac9591..6233fc1b2d4fdff1c897cc33c040e8145fbf457e 100644 (file)
@@ -29,7 +29,7 @@ struct Duration : public Simple_smob<Duration>
 {
   static SCM equal_p (SCM, SCM);
   int print_smob (SCM, scm_print_state *) const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   Duration ();
   Duration (int, int);
   Duration (Rational, bool scale);
index d0f6e8979ced98b1688462f03409d6936be10185..928f6a969dbddad717c25856351b53b9fba4f5d5 100644 (file)
@@ -58,9 +58,6 @@ public:
     (t->*callback) (Grob_info (e, g));
     return SCM_UNSPECIFIED;
   }
-  template <class T, void (T::*callback)(Grob_info)>
-  static SCM ack_find_base ()
-  { return Callback2_wrapper::make_smob<ack_trampoline<T, callback> > (); }
 
   /**
      Announce element. Default: pass on to daddy. Utility
index d74c8157ca9f50003aa1777d9cb35ed3d8923b19..e385a1e7af7ad603a9bb043b0c7fa4dcb6b9a995 100644 (file)
@@ -35,7 +35,7 @@ class Font_metric : public Smob<Font_metric>
 public:
   int print_smob (SCM, scm_print_state *) const;
   SCM mark_smob () const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   virtual ~Font_metric ();
 private:
   DECLARE_CLASSNAME (Font_metric);
index a29b9d64e86aae55dd5580015bcc03e7053a811c..d7011bda99f975ec540ac1d3b9b48b68d5005649 100644 (file)
@@ -26,15 +26,15 @@ class Gregorian_ligature_engraver : public Coherent_ligature_engraver
   Stream_event *pes_or_flexa_req_;
 
 public:
+  void listen_pes_or_flexa (Stream_event *ev);
   // no TRANSLATOR_DECLARATIONS (Gregorian_ligature_engraver) needed
   // since this class is abstract
 
-  TRANSLATOR_INHERIT(Coherent_ligature_engraver)
+  TRANSLATOR_INHERIT(Coherent_ligature_engraver);
   DECLARE_TRANSLATOR_CALLBACKS (Gregorian_ligature_engraver);
 protected:
   Gregorian_ligature_engraver ();
 
-  virtual void listen_pes_or_flexa (Stream_event *ev);
   virtual void build_ligature (Spanner *ligature,
                                vector<Grob_info> const &primitives);
   virtual void transform_heads (Spanner *ligature,
index 1a755fe66196c2bdbbf301c2217a068d06a010b0..ca925b42917621842afd3ce2fc5512a21662ff5d 100644 (file)
@@ -29,7 +29,7 @@ class Grob_array : public Simple_smob<Grob_array>
 public:
   int print_smob (SCM, scm_print_state *) const;
   SCM mark_smob () const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
 private:
   vector<Grob *> grobs_;
   bool ordered_;
index 9c3eadb4b06b7deccf252f2cabfbe65f4cc91fa1..bde5f5263d4130091afbd44a803501ee9fc9da69 100644 (file)
@@ -21,6 +21,7 @@
 #define INTERFACE_HH
 
 #include "lily-guile.hh"
+#include "protected-scm.hh"
 
 class Grob;
 
@@ -57,14 +58,14 @@ private:
   friend bool has_interface(Grob *);
 
 private:
-  static SCM interface_symbol_;
+  static Protected_scm interface_symbol_;
   static char const *cxx_name_;
   static char const *description_;
   static char const *variables_;
 };
 
 template <class Interface>
-SCM Grob_interface<Interface>::interface_symbol_;
+Protected_scm Grob_interface<Interface>::interface_symbol_;
 
 #endif /* INTERFACE_HH */
 
index db51e02e73cb0a0c5ec6ce1f4e91d56d5bc69bbe..a9408f09a2ac1cbc6beb21a9766526c3d3af5914 100644 (file)
@@ -32,7 +32,7 @@ class Grob : public Smob<Grob>
 public:
   int print_smob (SCM, scm_print_state *) const;
   SCM mark_smob () const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   virtual ~Grob ();
 private:
   DECLARE_CLASSNAME (Grob);
index b77db2d66f547051ca07fd51cdb615dfbc34126d..aab0d117a66a561b7f6a0cea4c727a97b64d3e24 100644 (file)
@@ -32,7 +32,7 @@ class Input : public Simple_smob<Input>
   char const *end_;
   Source_file *source_file_;
 public:
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   int print_smob (SCM, scm_print_state *) const;
   static SCM equal_p (SCM, SCM);
   SCM mark_smob () const;
index 0c45f8c2257817299637adc4be5cf4f7f01783d1..1f8fd8b85f37d574160e4fcb0d99f4143c74e3f9 100644 (file)
@@ -30,9 +30,6 @@ protected:
   void stop_translation_timestep ();
   virtual void finalize ();
 
-  DECLARE_ACKNOWLEDGER (rest);
-  DECLARE_ACKNOWLEDGER (ligature_head);
-  virtual void listen_ligature (Stream_event *ev);
   void process_music ();
   virtual Spanner *create_ligature_spanner () = 0;
   virtual void typeset_ligature (Spanner *ligature,
@@ -41,6 +38,9 @@ protected:
   SCM brew_ligature_primitive_proc;
 
 public:
+  void acknowledge_rest (Grob_info);
+  void acknowledge_ligature_head (Grob_info);
+  void listen_ligature (Stream_event *ev);
   // no TRANSLATOR_DECLARATIONS (Ligature_engraver) needed since this
   // class is abstract
   DECLARE_TRANSLATOR_CALLBACKS (Ligature_engraver);
index 97982895f50c851ef1b993c157956fdf9fb771b6..d930f69cf940527ddd9eba2703ecf5920e220d34 100644 (file)
@@ -58,8 +58,10 @@ namespace Lily {
   extern Variable beat_structure;
   extern Variable calc_repeat_slash_count;
   extern Variable car_less;
+  extern Variable chordmodifiers;
   extern Variable construct_chord_elements;
   extern Variable default_time_signature_settings;
+  extern Variable drum_pitch_names;
   extern Variable grob_compose_function;
   extern Variable grob_offset_function;
   extern Variable hash_table_to_alist;
@@ -91,6 +93,7 @@ namespace Lily {
 #endif
   extern Variable f_parser;
   extern Variable percussion_p;
+  extern Variable pitchnames;
   extern Variable pure_chain_offset_callback;
   extern Variable remove_stencil_warnings;
   extern Variable scale_layout;
index 0e001ec187a76aae50ecf7aec3e312349df280a3..626d24efa64ba2242afe7a1a5ab697941a3043e4 100644 (file)
@@ -36,7 +36,7 @@ class Lily_lexer : public Smob<Lily_lexer>, public Includable_lexer
 public:
   int print_smob (SCM, scm_print_state *) const;
   SCM mark_smob () const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   virtual ~Lily_lexer ();
 private:
   int lookup_keyword (const string&);
index b08df7c7a4ab487f5329b6f4f981a1b2c68f234b..e4ff2969b92ce8143326b8a4a7889ee0ee64169e 100644 (file)
@@ -36,7 +36,7 @@ class Lily_parser : public Smob<Lily_parser>
 public:
   int print_smob (SCM, scm_print_state *) const;
   SCM mark_smob () const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   virtual ~Lily_parser ();
   Lily_lexer *lexer_;
   Sources *sources_;
index b9042ba301ac79f715b197ed22d159bbb47943df..a13fdc66e14e141d28917e4ffa46d72494b7e740 100644 (file)
@@ -96,7 +96,7 @@ private:
   SCM callback_;
   SCM target_;
 public:
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
 
   Listener (SCM callback, SCM target)
     : callback_ (callback), target_ (target) { }
index d84a992b40e73eb6b649476ffb14481558f259d4..c29032f99dc6f56d32fc087b2dcecfaccda7fe16 100644 (file)
@@ -32,7 +32,7 @@ class Moment : public Simple_smob<Moment>
 public:
   static SCM equal_p (SCM, SCM);
   int print_smob (SCM, scm_print_state *) const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   Moment ();
   Moment (int m);
 
index f2c349a3e1cdfd1f2bb6572c3c54c727b973bfe4..80239a61aaefe202f8282c78f453564a55b31b36 100644 (file)
@@ -27,7 +27,7 @@
 class Music_function : public Smob2<Music_function>
 {
 public:
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   int print_smob (SCM, scm_print_state *) const;
   SCM get_signature () const { return scm1 (); }
   SCM get_function () const { return scm2 (); }
index 810d230aac279b447a0c7bd989a1093141567221..bb095df71869e84bbd25d84042cd30adab580e79 100644 (file)
@@ -63,7 +63,7 @@ class Music_iterator : public Smob<Music_iterator>
 public:
   int print_smob (SCM, scm_print_state *) const;
   SCM mark_smob () const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   virtual ~Music_iterator ();
 protected:
   Moment music_length_;
index dc1111b78ac58b9070f5ecb352baac9d522d2ca4..208c01a831e9f2f2920dd5b1407e15aed4a76668 100644 (file)
@@ -31,7 +31,7 @@ class Music_output : public Smob<Music_output>
 public:
   int print_smob (SCM, scm_print_state *) const;
   SCM mark_smob () const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   virtual ~Music_output ();
 private:
   DECLARE_CLASSNAME (Music_output);
index 5de672e67addf202f1609017da8d0d838272bb81..8c188f2707872e0d8ea62bf8d5d71e41fca0b6bc 100644 (file)
@@ -51,7 +51,7 @@ class Output_def : public Smob<Output_def>
 public:
   int print_smob (SCM, scm_print_state *) const;
   SCM mark_smob () const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   virtual ~Output_def ();
   VIRTUAL_COPY_CONSTRUCTOR (Output_def, Output_def);
 
index 02233d30a6d804d06bfa8d420e6e4187944007df..33f3a38c06151c9c46d4b851dedea23f6572d89c 100644 (file)
@@ -27,7 +27,7 @@ class Page_marker : public Smob<Page_marker>
 {
 public:
   SCM mark_smob () const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   virtual ~Page_marker ();
 private:
   SCM symbol_; /* either 'page-turn-permission or 'page-break-permission */
index b105cdb3de50d5763909b3d38ef900de8468a286..9530c94b7076fb5a9137253adbcd8732a6900836 100644 (file)
@@ -31,7 +31,7 @@ class Paper_book : public Smob<Paper_book>
 {
 public:
   SCM mark_smob () const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   virtual ~Paper_book ();
 private:
   SCM systems_;
index 1279ff17c990c527db9eaba102eba4aa859357cf..a176fc48ebf6a667d894eb352f2e9e62851c52b6 100644 (file)
@@ -42,12 +42,12 @@ protected:
   virtual void initialize ();
   virtual void finalize ();
 
-  DECLARE_TRANSLATOR_LISTENER (break);
-  DECLARE_TRANSLATOR_LISTENER (label);
+  void listen_break (Stream_event *);
+  void listen_label (Stream_event *);
 
-  DECLARE_ACKNOWLEDGER (item);
-  DECLARE_ACKNOWLEDGER (note_spacing);
-  DECLARE_ACKNOWLEDGER (staff_spacing);
+  void acknowledge_item (Grob_info);
+  void acknowledge_note_spacing (Grob_info);
+  void acknowledge_staff_spacing (Grob_info);
 
   System *system_;
   vector<Stream_event *> break_events_;
index 8683b4c6d10dd5f04531e40691c3bad00228890f..cd1a5e2c92fb4ffb34a0581f85398750c1276d28 100644 (file)
@@ -33,7 +33,6 @@
 class Paper_outputter : public Smob<Paper_outputter>
 {
 public:
-  static const char * const type_p_name_; // = 0
   SCM mark_smob () const;
   virtual ~Paper_outputter ();
 private:
index daade82e81994b5e06ca2d2103fbe58cc4bd1d04..dad2bc1246727c5fc4f5dc016b78c7f2c788347b 100644 (file)
@@ -38,7 +38,7 @@ public:
   static SCM equal_p (SCM, SCM);
   int print_smob (SCM, scm_print_state *) const;
   SCM mark_smob () const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
 private:
   int octave_;
   int notename_;
index cb850555fb414983ff0024c502fd66a0da920336..a9a485b5502642924d8610e352ec7b2967b3d2d6 100644 (file)
@@ -38,7 +38,7 @@ public:
   int print_smob (SCM, scm_print_state *) const;
   SCM mark_smob () const;
   static SCM equal_p (SCM, SCM);
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   virtual ~Prob ();
 private:
   DECLARE_CLASSNAME (Prob);
index 48a26b15c995a4d948a5c4974dd9da02f414cb71..0115cb9f9ff6e2d388dd2fc714ec5639cdcc180c 100644 (file)
@@ -46,13 +46,14 @@ class Protected_scm
   static SCM list_;
   static SCM last_;
   Protected_scm (Protected_scm const &);
+  void protectify (SCM);
 public:
   Protected_scm ();
   Protected_scm (SCM);
-  ~Protected_scm ();
   Protected_scm &operator = (SCM);
   Protected_scm &operator = (Protected_scm const &);
-  operator SCM () const;
+  operator const SCM & () const;
+  operator SCM & ();
 };
 
 #endif /* PROTECTED_SCM_HH */
index 7c990e503419ce7db183489fae7ce90c0074d092..19cd175c797fd7d9e63a5ac79dbb8c73696c1fa0 100644 (file)
@@ -26,7 +26,6 @@
 
 struct Scale : public Smob<Scale>
 {
-  static const char * const type_p_name_; // = 0
   virtual ~Scale ();
   Scale (vector<Rational> const &);
   Scale (Scale const &);
index 7ec28c4c9a6972249c703e4e3a23ad8ebf1c8b9a..59cab571fbe4058a9f6b8b33dc663c5d464438ba 100644 (file)
@@ -41,13 +41,10 @@ protected:
   virtual bool must_be_last () const;
 
 private:
-  virtual SCM get_acknowledger (SCM sym)
+  virtual SCM get_acknowledger (SCM sym, Direction start_end)
   {
-    return generic_get_acknowledger (sym, interface_acknowledger_hash_);
-  }
-  virtual SCM get_end_acknowledger (SCM sym)
-  {
-    return generic_get_acknowledger (sym, interface_end_acknowledger_hash_);
+    return generic_get_acknowledger
+      (sym, interface_acknowledger_hash_[start_end]);
   }
 
   SCM init_acknowledgers (SCM alist);
@@ -62,8 +59,7 @@ private:
   SCM precomputable_methods_ [TRANSLATOR_METHOD_PRECOMPUTE_COUNT];
 
   // hashq table of interface-symbol -> scheme-function
-  SCM interface_acknowledger_hash_;
-  SCM interface_end_acknowledger_hash_;
+  Drul_array<SCM> interface_acknowledger_hash_;
 
   // Alist of listened-symbol . scheme-function
   SCM per_instance_listeners_;
index 241f316c4ec3dd622ed493936a5dcf63b36f3447..3453904f7152cf3c8cfe60b652fca9892803637a 100644 (file)
@@ -46,7 +46,6 @@
 class Scheme_hash_table : public Smob1<Scheme_hash_table>
 {
 public:
-  static const char * const type_p_name_; // = 0
   int print_smob (SCM, scm_print_state *) const;
   bool try_retrieve (SCM key, SCM *val);
   bool contains (SCM key) const;
index b3ece8960a813245139822c999120a85d668899a..a5918242f14d6bf534508461801c0dc3e4134d85 100644 (file)
@@ -31,7 +31,7 @@ class Score : public Smob<Score>
 {
 public:
   SCM mark_smob () const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   virtual ~Score ();
 private:
   SCM music_;
index 6d7cea0ac248d917091bea19bb05cba6d0abf72c..f7946c1851d50123979a6dd2623e62b90609ae32 100644 (file)
@@ -25,7 +25,7 @@
 class Skyline_pair : public Simple_smob<Skyline_pair>
 {
 public:
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
 private:
   Drul_array<Skyline> skylines_;
 
index 21693420c88419fd0fc8834eb3e7e749d4fafb6d..43feb407615ebff249454d8b3a132296f2e07d99 100644 (file)
@@ -51,7 +51,7 @@ struct Building
 class Skyline : public Simple_smob<Skyline>
 {
 public:
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
 private:
   list<Building> buildings_;
   Direction sky_;
index 4ffeb6007f0b860d2a5250c29791884bd3fd7eb7..97ed1a6637bbf78877020d18678a7169a988cde6 100644 (file)
@@ -54,17 +54,6 @@ protected:
   const char* event_name_;
   virtual SCM event_symbol () = 0;
 
-  DECLARE_ACKNOWLEDGER (inline_accidental);
-  DECLARE_ACKNOWLEDGER (fingering);
-  DECLARE_ACKNOWLEDGER (note_column);
-  DECLARE_ACKNOWLEDGER (script);
-  DECLARE_ACKNOWLEDGER (dots);
-  DECLARE_ACKNOWLEDGER (text_script);
-  DECLARE_END_ACKNOWLEDGER (tie);
-  DECLARE_ACKNOWLEDGER (tuplet_number);
-
-  void listen_note (Stream_event *ev);
-  void listen_slur (Stream_event *ev, Stream_event *note = 0);
   void acknowledge_extra_object (Grob_info);
   void stop_translation_timestep ();
   void process_music ();
@@ -78,6 +67,19 @@ protected:
   virtual void derived_mark () const;
 
 public:
+  void acknowledge_inline_accidental (Grob_info);
+  void acknowledge_fingering (Grob_info);
+  void acknowledge_note_column (Grob_info);
+  void acknowledge_script (Grob_info);
+  void acknowledge_dots (Grob_info);
+  void acknowledge_text_script (Grob_info);
+  void acknowledge_end_tie (Grob_info);
+  void acknowledge_tuplet_number (Grob_info);
+  void listen_note (Stream_event *ev);
+  void listen_slur (Stream_event *ev, Stream_event *note);
+  // You'd think the following is the same as defaulting `note' to 0,
+  // but template resolution for trampolines disagrees.  Huh.
+  void listen_slur (Stream_event *ev) { listen_slur (ev, 0); }
   // no TRANSLATOR_DECLARATIONS (Slur_proto_engraver) needed since this
   // class is abstract
   DECLARE_TRANSLATOR_CALLBACKS (Slur_proto_engraver);
index 889d86a8cab3a342b374593a7a6afa1879d98f9f..7ef46b23e41106eb444907d665cd1a6aecac80c8 100644 (file)
     debugging purposes.  If the class does not define this function,
     the output will be #<Classname> when printing.
 
-  - a static const type_p_name_[] string set to something like
+  - a static const * const type_p_name_ string set to something like
     "ly:grob?".  When provided, an accordingly named function for
     checking for the given smob type will be available in Scheme.
 
@@ -177,6 +177,7 @@ private:
   // Most default functions are do-nothings.  void init() will
   // recognize their address when not overriden and will then refrain
   // altogether from passing the the respective callbacks to GUILE.
+
   SCM mark_smob (void) const;
   static SCM mark_trampoline (SCM); // Used for calling mark_smob
   static size_t free_smob (SCM obj);
@@ -185,11 +186,10 @@ private:
   static int print_trampoline (SCM, SCM, scm_print_state *);
   static void smob_proc_init (scm_t_bits) { };
 
-  // type_p_name_ has to be defined in the Super class, either with a
-  // static const char [] string or as a null pointer of type const
-  // char *.  We used to provide a default here for convenience, but
-  // battling the various conflicting C++ standards was too much of a
-  // hassle.
+  // Define type_p_name_ in the Super class as a const char * const.
+  // Without such definition it defaults to 0, producing no predicate.
+
+  static const char * const type_p_name_; // = 0
 
   // LY_DECLARE_SMOB_PROC is used in the Super class definition for
   // making a smob callable like a function.  Its first argument is a
index b8dfc1f67fdb6027b897fa78b2dbb19964eb3312..818c0900a56bac154476b49282eae6bf529241b8 100644 (file)
@@ -113,6 +113,9 @@ Scm_init Smob_base<Super>::scm_init_ (init);
 template <class Super>
 string Smob_base<Super>::smob_name_;
 
+template <class Super>
+const char * const Smob_base<Super>::type_p_name_ = 0;
+
 template <class Super>
 void Smob_base<Super>::init ()
 {
index 6686389289e3cc04909d7aff588a38a719115cc7..fc5bf2f54111c83b1bcf35aa8f9c7d5bd3526549 100644 (file)
@@ -40,7 +40,7 @@ class Source_file : public Smob<Source_file>
 public:
   int print_smob (SCM, scm_print_state *) const;
   SCM mark_smob () const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   virtual ~Source_file ();
 private:
   vector<char const *> newline_locations_;
index fd01ca048cf7bc0ce53506c8b058dae13b244702..d4ebee23cd05f3680b9bfcfe3bb036061a6af92a 100644 (file)
@@ -27,7 +27,7 @@ class Spring : public Simple_smob<Spring>
 {
 public:
   static SCM equal_p (SCM, SCM);
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
 private:
   Real distance_;
   Real min_distance_;
index 6ccb9252bb18a224f5a38ff36b53bda6c30cd94b..8af67c0f766f039184e6ba00500d43044a58a0e7 100644 (file)
@@ -59,7 +59,7 @@ class Stencil : public Simple_smob<Stencil>
 {
 public:
   SCM mark_smob () const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
 private:
   Box dim_;
   SCM expr_;
index eb74e74cd69e2091d2e0714bd89c013852f2cf45..b6124572fc53d6f694fb7fae2a32cbbe0b83d248 100644 (file)
@@ -30,7 +30,6 @@ class Engraver_dispatch_list : public Simple_smob<Engraver_dispatch_list>
 {
   vector<Method_instance> dispatch_entries_;
 public:
-  static const char * const type_p_name_; // = 0
   void apply (Grob_info);
   SCM static create (SCM trans_list,
                      SCM iface_list, Direction);
index 4ba2fe6523d493e8b43b77cde05abfa6afb5bfe1..d4500ef2b4e170a4312b35746fc01a47d4d8429f 100644 (file)
@@ -29,7 +29,7 @@ class Translator_group : public Smob<Translator_group>
 public:
   SCM mark_smob () const;
   int print_smob (SCM, scm_print_state *) const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   virtual ~Translator_group ();
 private:
   void precompute_method_bindings ();
index 3769b0e4b837c220d7f3e6078ee5e646eb556a25..dd0659bf50866ec4a9e03e86565deffc0299f7dd 100644 (file)
   VIRTUAL_COPY_CONSTRUCTOR (Translator, NAME);                          \
   virtual void fetch_precomputable_methods (SCM methods[]);             \
   DECLARE_TRANSLATOR_CALLBACKS (NAME);                                  \
-  TRANSLATOR_INHERIT (Translator)                                       \
+  TRANSLATOR_INHERIT (Translator);                                      \
   /* end #define */
 
 #define TRANSLATOR_INHERIT(BASE)                                        \
-  using BASE::method_finder;                                            \
-  using BASE::ack_finder;
+  using BASE::method_finder
 
 #define DECLARE_TRANSLATOR_CALLBACKS(NAME)                              \
   template <void (NAME::*mf)()>                                         \
   static SCM method_finder () { return method_find_base<NAME, mf> (); } \
-  template <void (NAME::*callback)(Grob_info)>                          \
-  static SCM ack_finder () { return ack_find_base<NAME, callback> (); } \
   /* end #define */
 
 /*
   static Drul_array<Protected_scm> acknowledge_static_array_drul_;      \
   static SCM static_description_;                                       \
   static Protected_scm listener_list_;                                  \
-  static SCM static_get_acknowledger (SCM sym);                         \
-  static SCM static_get_end_acknowledger(SCM);                          \
-  virtual SCM get_acknowledger (SCM sym)                                \
+  static SCM static_get_acknowledger (SCM sym, Direction start_end);    \
+  virtual SCM get_acknowledger (SCM sym, Direction start_end)           \
   {                                                                     \
-    return static_get_acknowledger (sym);                               \
-  }                                                                     \
-  virtual SCM get_end_acknowledger (SCM sym)                            \
-  {                                                                     \
-    return static_get_end_acknowledger (sym);                           \
+    return static_get_acknowledger (sym, start_end);                    \
   }                                                                     \
 public:                                                                 \
   NAME ();                                                              \
+  static void boot ();                                                  \
   virtual SCM static_translator_description () const;                   \
   virtual SCM translator_description () const;                          \
   virtual SCM get_listener_list () const                                \
@@ -81,15 +74,6 @@ public:                                                                 \
   }                                                                     \
   /* end #define */
 
-#define DECLARE_TRANSLATOR_LISTENER(m)                  \
-public:                                                 \
-inline void listen_ ## m (Stream_event *);              \
-/* Should be private */                                 \
-static void _internal_declare_ ## m ();
-
-#define DECLARE_ACKNOWLEDGER(x) public : void acknowledge_ ## x (Grob_info); protected:
-#define DECLARE_END_ACKNOWLEDGER(x) public : void acknowledge_end_ ## x (Grob_info); protected:
-
 enum Translator_precompute_index
 {
   START_TRANSLATION_TIMESTEP,
@@ -107,7 +91,7 @@ class Translator : public Smob<Translator>
 public:
   int print_smob (SCM, scm_print_state *) const;
   SCM mark_smob () const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
   virtual ~Translator ();
 private:
   void init ();
@@ -144,8 +128,7 @@ public:
   virtual void fetch_precomputable_methods (SCM methods[]) = 0;
   virtual SCM get_listener_list () const = 0;
   virtual SCM translator_description () const = 0;
-  virtual SCM get_acknowledger (SCM sym) = 0;
-  virtual SCM get_end_acknowledger (SCM sym) = 0;
+  virtual SCM get_acknowledger (SCM sym, Direction start_end) = 0;
 
 protected:                      // should be private.
   Context *daddy_context_;
@@ -173,15 +156,6 @@ protected:                      // should be private.
   static SCM
   method_finder () { return SCM_UNDEFINED; }
 
-  // Overriden in Engraver.
-  template <class T, void (T::*callback)(Grob_info)>
-  static SCM
-  ack_find_base () { return SCM_UNDEFINED; }
-
-  template <void (Translator::*)(Grob_info)>
-  static SCM
-  ack_finder () { return SCM_UNDEFINED; }
-
   virtual void derived_mark () const;
   static SCM event_class_symbol (const char *ev_class);
   SCM static_translator_description (const char *grobs,
index 867c61b43e6abbe0aa9a6314cd450148ef9db41c..b649a1a197884aa7a86ce51d616eff51e3640675 100644 (file)
@@ -35,6 +35,7 @@
   SCM T::static_description_ = SCM_EOL;                                 \
   static void _ ## T ## _adder ()                                       \
   {                                                                     \
+    T::boot ();                                                         \
     T *t = new T;                                                       \
     T::static_description_ =                                            \
       scm_permanent_object (t->static_translator_description ());       \
   {                                                                     \
     return static_description_;                                         \
   }                                                                     \
-  ADD_GLOBAL_CTOR (_ ## T ## _adder); \
+  ADD_GLOBAL_CTOR (_ ## T ## _adder);                                   \
   /* end define */
 
 #define DEFINE_TRANSLATOR_LISTENER_LIST(T) \
-  Protected_scm T::listener_list_ (SCM_EOL);    \
-  /* end define */
+  Protected_scm T::listener_list_ (SCM_EOL)
 
 #define DEFINE_ACKNOWLEDGERS(classname) \
   Drul_array<Protected_scm> classname::acknowledge_static_array_drul_;  \
   SCM                                                                   \
-  classname::static_get_acknowledger (SCM sym)                          \
+  classname::static_get_acknowledger (SCM sym, Direction start_end)     \
   {                                                                     \
-    return generic_get_acknowledger (sym, acknowledge_static_array_drul_[START]);      \
-  }                                                                     \
-  SCM                                                                   \
-  classname::static_get_end_acknowledger (SCM sym)                      \
-  {                                                                     \
-    return generic_get_acknowledger (sym, acknowledge_static_array_drul_[STOP]);       \
+    return generic_get_acknowledger                                     \
+      (sym, acknowledge_static_array_drul_[start_end]);                 \
   }                                                                     \
   /* end define */
 
@@ -76,8 +72,8 @@
   IMPLEMENT_FETCH_PRECOMPUTABLE_METHODS (classname);                    \
   DEFINE_ACKNOWLEDGERS(classname);                                      \
   ADD_THIS_TRANSLATOR (classname);                                      \
-  DEFINE_TRANSLATOR_DOC(classname, desc, grobs, read, write)            \
-  DEFINE_TRANSLATOR_LISTENER_LIST(classname)                            \
+  DEFINE_TRANSLATOR_DOC(classname, desc, grobs, read, write);           \
+  DEFINE_TRANSLATOR_LISTENER_LIST(classname);
 
 #define IMPLEMENT_FETCH_PRECOMPUTABLE_METHODS(T)                        \
   void                                                                  \
 
 void add_acknowledger (SCM ptr,
                        char const *func_name,
-                       Protected_scm &ack_hash);
+                       SCM &ack_hash);
 
 #define ADD_ACKNOWLEDGER(CLASS, NAME)                                   \
-  void CLASS ## NAME ## _ack_adder ()                                   \
-  {                                                                     \
-    add_acknowledger (CLASS::ack_finder<&CLASS::acknowledge_ ## NAME> (), \
-                      #NAME, CLASS::acknowledge_static_array_drul_[START]); \
-  }                                                                     \
-  ADD_SCM_INIT_FUNC (CLASS ## NAME ## _ack_adder_initclass, CLASS ## NAME ## _ack_adder);
+  add_acknowledger (Callback2_wrapper::make_smob                        \
+                    <ack_trampoline<CLASS, &CLASS::acknowledge_ ## NAME> > (), \
+                    #NAME, acknowledge_static_array_drul_[START])
 
 #define ADD_END_ACKNOWLEDGER(CLASS, NAME)                               \
-  void CLASS ## NAME ## _end_ack_adder ()                               \
-  {                                                                     \
-    add_acknowledger (CLASS::ack_finder<&CLASS::acknowledge_end_ ## NAME> (), \
-                      #NAME, CLASS::acknowledge_static_array_drul_[STOP]); \
-  }                                                                     \
-  ADD_SCM_INIT_FUNC (CLASS ## NAME ## _end_ack_adder_initclass, CLASS ## NAME ## _end_ack_adder);
+  add_acknowledger (Callback2_wrapper::make_smob                        \
+                    <ack_trampoline<CLASS, &CLASS::acknowledge_end_ ## NAME> > (), \
+                    #NAME, acknowledge_static_array_drul_[STOP])
 
 /*
   Implement the method cl::listen_##m, and make it listen to stream
   events of class m.
  */
-#define IMPLEMENT_TRANSLATOR_LISTENER(cl, m)            \
-void                                                    \
-cl :: _internal_declare_ ## m ()                        \
-{                                                       \
+#define ADD_LISTENER(cl, m)                                             \
   listener_list_ = scm_acons                                            \
     (event_class_symbol (#m),                                           \
      Callback_wrapper::make_smob                                        \
-     <trampoline <cl, &cl::listen_ ## m> > (), listener_list_);         \
-}                                                                       \
-                                                                        \
-ADD_SCM_INIT_FUNC (cl ## _declare_event_ ## m, cl::_internal_declare_ ## m);
+     <trampoline <cl, &cl::listen_ ## m> > (), listener_list_)
 
 #endif /* TRANSLATOR_ICC */
index 92974fe8f069d6e5e199916db70f50f166cb1bfd..7accff9a8843fcdb788595a8d7821fd86d80cd85 100644 (file)
@@ -26,7 +26,7 @@
 class Unpure_pure_container : public Smob2<Unpure_pure_container>
 {
 public:
-  static const char type_p_name_ [];
+  static const char * const type_p_name_;
   SCM unpure_part () const { return scm1 (); }
   // A container that has the same callback for both 'pure' and 'unpure' lookups
   // and which ignores the 'start' and 'end' columnns.
index f9de264277307556a0eec0c3ea296a030f5aa0e9..6f5fc18a54fb116a58dc2c1db13cf227c472704c 100644 (file)
@@ -25,7 +25,7 @@
 /* Dummy input location for use if real one is missing.  */
 Input dummy_input_global;
 
-const char Input::type_p_name_[] = "ly:input-location?";
+const char * const Input::type_p_name_ = "ly:input-location?";
 
 SCM
 Input::mark_smob () const
index d339fbce612e94c19638c33ed0da5c532b07f89b..ec37d6bcbffc2b18d638e76cf1ead798526e8e47 100644 (file)
@@ -43,7 +43,7 @@ protected:
   vector<Grob *> backup_axis_groups_;
 
   virtual void finalize ();
-  DECLARE_ACKNOWLEDGER (axis_group);
+  void acknowledge_axis_group (Grob_info);
   void process_music ();
   void start_spanner ();
   void consider_start_spanner ();
@@ -173,7 +173,12 @@ Instrument_name_engraver::stop_spanner ()
   text_spanner_ = 0;
 }
 
-ADD_ACKNOWLEDGER (Instrument_name_engraver, axis_group);
+
+void
+Instrument_name_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Instrument_name_engraver, axis_group);
+}
 
 ADD_TRANSLATOR (Instrument_name_engraver,
                 /* doc */
index 67a58c7e6fca4ebec53bc57ec8f61b409fa12769..59cbb4f13cd4102eee7d9cc00af1844f55eb70b1 100644 (file)
@@ -75,6 +75,12 @@ Instrument_switch_engraver::stop_translation_time_step ()
   text_ = 0;
 }
 
+void
+Instrument_switch_engraver::boot ()
+{
+
+}
+
 ADD_TRANSLATOR (Instrument_switch_engraver,
                 /* doc */
                 "Create a cue text for taking instrument.",
index 79fedc96df05e2976660b766605ae4d28271bad5..9b1cbe4a23a412b95cb8797e6f7dd8fdc7656704 100644 (file)
@@ -31,7 +31,7 @@ class Keep_alive_together_engraver: public Engraver
 
 public:
   TRANSLATOR_DECLARATIONS (Keep_alive_together_engraver);
-  DECLARE_ACKNOWLEDGER (hara_kiri_group_spanner);
+  void acknowledge_hara_kiri_group_spanner (Grob_info);
 
   virtual void finalize ();
 };
@@ -88,7 +88,12 @@ Keep_alive_together_engraver::finalize ()
     }
 }
 
-ADD_ACKNOWLEDGER (Keep_alive_together_engraver, hara_kiri_group_spanner);
+
+void
+Keep_alive_together_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Keep_alive_together_engraver, hara_kiri_group_spanner);
+}
 
 ADD_TRANSLATOR (Keep_alive_together_engraver,
                 /* doc */
index 971f55317295e8a56387a6f508dc8a41f20cd96a..8c907dc7cccb0a4da9ed48ceaf6093a68916278c 100644 (file)
@@ -46,9 +46,9 @@ protected:
   void stop_translation_timestep ();
   void process_music ();
 
-  DECLARE_TRANSLATOR_LISTENER (key_change);
-  DECLARE_ACKNOWLEDGER (clef);
-  DECLARE_ACKNOWLEDGER (bar_line);
+  void listen_key_change (Stream_event *);
+  void acknowledge_clef (Grob_info);
+  void acknowledge_bar_line (Grob_info);
 };
 
 void
@@ -120,7 +120,6 @@ Key_engraver::create_key (bool is_default)
     }
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Key_engraver, key_change);
 void
 Key_engraver::listen_key_change (Stream_event *ev)
 {
@@ -212,8 +211,14 @@ Key_engraver::initialize ()
   context ()->set_property ("tonic", p.smobbed_copy ());
 }
 
-ADD_ACKNOWLEDGER (Key_engraver, clef);
-ADD_ACKNOWLEDGER (Key_engraver, bar_line);
+
+void
+Key_engraver::boot ()
+{
+  ADD_LISTENER (Key_engraver, key_change);
+  ADD_ACKNOWLEDGER (Key_engraver, clef);
+  ADD_ACKNOWLEDGER (Key_engraver, bar_line);
+}
 
 ADD_TRANSLATOR (Key_engraver,
                 /* doc */
index 06666ac53257083095af1323b62df7ec531d0dfa..219454115a04dc673f2ce903d04d2be68afded22 100644 (file)
@@ -36,7 +36,7 @@ protected:
   void process_music ();
   void stop_translation_timestep ();
 
-  DECLARE_TRANSLATOR_LISTENER (key_change);
+  void listen_key_change (Stream_event *);
 private:
   Stream_event *key_ev_;
   Audio_key *audio_;
@@ -98,7 +98,6 @@ Key_performer::stop_translation_timestep ()
     }
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Key_performer, key_change);
 void
 Key_performer::listen_key_change (Stream_event *ev)
 {
@@ -106,6 +105,12 @@ Key_performer::listen_key_change (Stream_event *ev)
     key_ev_ = ev;
 }
 
+void
+Key_performer::boot ()
+{
+  ADD_LISTENER (Key_performer, key_change);
+}
+
 ADD_TRANSLATOR (Key_performer,
                 /* doc */
                 "",
index 791f0b1f1c956abd53ed93c84259bb98bb0dd0de..cdb51de3adb49e3a9e521a0ca9ac9315b6cb8b10 100644 (file)
@@ -36,23 +36,15 @@ protected:
   virtual Spanner *create_ligature_spanner ();
   virtual void build_ligature (Spanner *ligature,
                                vector<Grob_info> const &primitives);
-  DECLARE_TRANSLATOR_LISTENER (ligature);
 
 public:
   TRANSLATOR_DECLARATIONS (Kievan_ligature_engraver);
-  TRANSLATOR_INHERIT (Coherent_ligature_engraver)
+  TRANSLATOR_INHERIT (Coherent_ligature_engraver);
 
 private:
   void fold_up_primitives (vector<Grob_info> const &primitives, Real padding, Real &min_length);
 };
 
-IMPLEMENT_TRANSLATOR_LISTENER (Kievan_ligature_engraver, ligature);
-void
-Kievan_ligature_engraver::listen_ligature (Stream_event *ev)
-{
-  Ligature_engraver::listen_ligature (ev);
-}
-
 Kievan_ligature_engraver::Kievan_ligature_engraver ()
 {
 
@@ -136,8 +128,14 @@ Kievan_ligature_engraver::build_ligature (Spanner *ligature,
 
 }
 
-ADD_ACKNOWLEDGER (Kievan_ligature_engraver, rest);
-ADD_ACKNOWLEDGER (Kievan_ligature_engraver, ligature_head);
+
+void
+Kievan_ligature_engraver::boot ()
+{
+  ADD_LISTENER (Ligature_engraver, ligature);
+  ADD_ACKNOWLEDGER (Ligature_engraver, rest);
+  ADD_ACKNOWLEDGER (Ligature_engraver, ligature_head);
+}
 
 ADD_TRANSLATOR (Kievan_ligature_engraver,
                 /* doc */
index 6e57a7e9df6b92e7cb7fec9b30daea722a460a75..e84ea36bca7b72cbbe263b3361afdd0813a6f642 100644 (file)
@@ -32,9 +32,9 @@ class Laissez_vibrer_engraver : public Engraver
   vector<Grob *> lv_ties_;
 
   void stop_translation_timestep ();
-  DECLARE_ACKNOWLEDGER (note_head);
+  void acknowledge_note_head (Grob_info);
 protected:
-  DECLARE_TRANSLATOR_LISTENER (laissez_vibrer);
+  void listen_laissez_vibrer (Stream_event *);
 public:
   TRANSLATOR_DECLARATIONS (Laissez_vibrer_engraver);
 };
@@ -53,7 +53,6 @@ Laissez_vibrer_engraver::stop_translation_timestep ()
   lv_ties_.clear ();
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Laissez_vibrer_engraver, laissez_vibrer);
 void
 Laissez_vibrer_engraver::listen_laissez_vibrer (Stream_event *ev)
 {
@@ -104,7 +103,13 @@ Laissez_vibrer_engraver::acknowledge_note_head (Grob_info inf)
   lv_ties_.push_back (lv_tie);
 }
 
-ADD_ACKNOWLEDGER (Laissez_vibrer_engraver, note_head);
+void
+Laissez_vibrer_engraver::boot ()
+{
+  ADD_LISTENER (Laissez_vibrer_engraver, laissez_vibrer);
+  ADD_ACKNOWLEDGER (Laissez_vibrer_engraver, note_head);
+}
+
 ADD_TRANSLATOR (Laissez_vibrer_engraver,
                 /* doc */
                 "Create laissez vibrer items.",
index 8e871c1abf868c5ee53f34ffb82eaa5a4f2e6039..869720cca4f8811a835c7ec00af5dd717348c706 100644 (file)
@@ -36,8 +36,8 @@ protected:
   virtual void finalize ();
   void process_music ();
 
-  DECLARE_ACKNOWLEDGER (ledgered);
-  DECLARE_ACKNOWLEDGER (staff_symbol);
+  void acknowledge_ledgered (Grob_info);
+  void acknowledge_staff_symbol (Grob_info);
 
   void start_spanner ();
   void stop_spanner ();
@@ -120,8 +120,13 @@ Ledger_line_engraver::acknowledge_ledgered (Grob_info s)
   ledgered_grobs_.push_back (s.grob ());
 }
 
-ADD_ACKNOWLEDGER (Ledger_line_engraver, ledgered);
-ADD_ACKNOWLEDGER (Ledger_line_engraver, staff_symbol);
+void
+Ledger_line_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Ledger_line_engraver, ledgered);
+  ADD_ACKNOWLEDGER (Ledger_line_engraver, staff_symbol);
+}
+
 ADD_TRANSLATOR (Ledger_line_engraver,
                 /* doc */
                 "Create the spanner to draw ledger lines, and notices"
index bc3d379c22e01c83197afb6d41d1e998b1c6a625..4919071d97b92a05c01bdc960f8cc7a3e8d2002e 100644 (file)
@@ -33,9 +33,9 @@ class Ligature_bracket_engraver : public Engraver
 protected:
   virtual void process_music ();
   virtual void stop_translation_timestep ();
-  DECLARE_ACKNOWLEDGER (rest);
-  DECLARE_ACKNOWLEDGER (note_column);
-  DECLARE_TRANSLATOR_LISTENER (ligature);
+  void acknowledge_rest (Grob_info);
+  void acknowledge_note_column (Grob_info);
+  void listen_ligature (Stream_event *);
 public:
   TRANSLATOR_DECLARATIONS (Ligature_bracket_engraver);
 
@@ -46,7 +46,6 @@ private:
   Stream_event *previous_start_event_;
 };
 
-IMPLEMENT_TRANSLATOR_LISTENER (Ligature_bracket_engraver, ligature);
 void
 Ligature_bracket_engraver::listen_ligature (Stream_event *ev)
 {
@@ -116,8 +115,14 @@ Ligature_bracket_engraver::stop_translation_timestep ()
   finished_ligature_ = 0;
 }
 
-ADD_ACKNOWLEDGER (Ligature_bracket_engraver, rest);
-ADD_ACKNOWLEDGER (Ligature_bracket_engraver, note_column);
+
+void
+Ligature_bracket_engraver::boot ()
+{
+  ADD_LISTENER (Ligature_bracket_engraver, ligature);
+  ADD_ACKNOWLEDGER (Ligature_bracket_engraver, rest);
+  ADD_ACKNOWLEDGER (Ligature_bracket_engraver, note_column);
+}
 
 ADD_TRANSLATOR (Ligature_bracket_engraver,
                 /* doc */
index adc9124fb7dc948c613515dff9c2a585a9350987..62e58b603c1ff36e8c150fbf920c9e6bae711965 100644 (file)
@@ -52,8 +52,10 @@ namespace Lily {
   Variable beat_structure ("beat-structure");
   Variable calc_repeat_slash_count ("calc-repeat-slash-count");
   Variable car_less ("car<");
+  Variable chordmodifiers ("chordmodifiers");
   Variable construct_chord_elements ("construct-chord-elements");
   Variable default_time_signature_settings ("default-time-signature-settings");
+  Variable drum_pitch_names ("drumPitchNames");
   Variable grob_compose_function ("grob::compose-function");
   Variable grob_offset_function ("grob::offset-function");
   Variable hash_table_to_alist ("hash-table->alist");
@@ -85,6 +87,7 @@ namespace Lily {
 #endif
   Variable f_parser ("%parser");
   Variable percussion_p ("percussion?");
+  Variable pitchnames ("pitchnames");
   Variable pure_chain_offset_callback ("pure-chain-offset-callback");
   Variable remove_stencil_warnings ("remove-stencil-warnings");
   Variable scale_layout ("scale-layout");
index 221d048cc00aa9a0f67f2f963b5932a43475328d..6db0e653e5480d224427df3488bd12ae5c1a3bb5 100644 (file)
@@ -369,7 +369,7 @@ Lily_lexer::add_lexed_char (int count)
 }
 
 
-const char Lily_lexer::type_p_name_[] = "ly:lily-lexer?";
+const char * const Lily_lexer::type_p_name_ = "ly:lily-lexer?";
 
 SCM
 Lily_lexer::mark_smob () const
index 31889742843cd750355ad2d4d64131233db438e4..d2499d4c4134c1453cc0a9b1a8618282df26da33 100644 (file)
@@ -200,7 +200,7 @@ Lily_parser::parser_error (Input const &i, const string &s)
   error_level_ = 1;
 }
 
-const char Lily_parser::type_p_name_[] = "ly:lily-parser?";
+const char * const Lily_parser::type_p_name_ = "ly:lily-parser?";
 
 /****************************************************************
   OUTPUT-DEF
index 2a8d28d8cbb6daa0d287eeccded86624f75fbb9d..836f8cdc6f1b450829ff7337befa4bbc3763db33 100644 (file)
@@ -19,4 +19,4 @@
 
 #include "listener.hh"
 
-const char Listener::type_p_name_[] = "ly:listener?";
+const char * const Listener::type_p_name_ = "ly:listener?";
index cdee61517e333f4c6a554c973b27c11555d8835c..08c9306693a303f83ed31dc1c51c62c013d08422 100644 (file)
@@ -36,7 +36,7 @@ class Lyric_engraver : public Engraver
 protected:
   void stop_translation_timestep ();
   void process_music ();
-  DECLARE_TRANSLATOR_LISTENER (lyric);
+  void listen_lyric (Stream_event *);
 
 public:
   TRANSLATOR_DECLARATIONS (Lyric_engraver);
@@ -56,7 +56,6 @@ Lyric_engraver::Lyric_engraver ()
   event_ = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Lyric_engraver, lyric);
 void
 Lyric_engraver::listen_lyric (Stream_event *ev)
 {
@@ -194,6 +193,12 @@ Lyric_engraver::stop_translation_timestep ()
   event_ = 0;
 }
 
+void
+Lyric_engraver::boot ()
+{
+  ADD_LISTENER (Lyric_engraver, lyric);
+}
+
 ADD_TRANSLATOR (Lyric_engraver,
                 /* doc */
                 "Engrave text for lyrics.",
index 0ad69ae0536b2efa17d95663dc2f4e0c818704d7..6a25d62a3f99e44fd8fbff912e20b0e2e70e61d0 100644 (file)
@@ -30,7 +30,7 @@ protected:
 
   void stop_translation_timestep ();
   void process_music ();
-  DECLARE_TRANSLATOR_LISTENER (lyric);
+  void listen_lyric (Stream_event *);
 private:
   vector<Stream_event *> events_;
   Audio_text *audio_;
@@ -67,13 +67,18 @@ Lyric_performer::stop_translation_timestep ()
   events_.clear ();
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Lyric_performer, lyric);
 void
 Lyric_performer::listen_lyric (Stream_event *event)
 {
   events_.push_back (event);
 }
 
+void
+Lyric_performer::boot ()
+{
+  ADD_LISTENER (Lyric_performer, lyric);
+}
+
 ADD_TRANSLATOR (Lyric_performer,
                 /* doc */
                 "",
index 7db0a781cc8d993807ac51af519218ef0b48d42d..a849ec11ce0dddd77f57c586efc0db2c8a68a3f7 100644 (file)
@@ -54,8 +54,8 @@ protected:
   void stop_translation_timestep ();
   virtual void finalize ();
 
-  DECLARE_TRANSLATOR_LISTENER (mark);
-  DECLARE_ACKNOWLEDGER (break_alignment);
+  void listen_mark (Stream_event *);
+  void acknowledge_break_alignment (Grob_info);
 };
 
 Mark_engraver::Mark_engraver ()
@@ -111,7 +111,6 @@ Mark_engraver::create_items (Stream_event *ev)
   text_ = make_item ("RehearsalMark", ev->self_scm ());
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Mark_engraver, mark);
 void
 Mark_engraver::listen_mark (Stream_event *ev)
 {
@@ -157,7 +156,13 @@ Mark_engraver::process_music ()
     }
 }
 
-ADD_ACKNOWLEDGER (Mark_engraver, break_alignment);
+
+void
+Mark_engraver::boot ()
+{
+  ADD_LISTENER (Mark_engraver, mark);
+  ADD_ACKNOWLEDGER (Mark_engraver, break_alignment);
+}
 
 ADD_TRANSLATOR (Mark_engraver,
                 /* doc */
index e7fc3c6726cb874513b016b23c874976bfa03bfb..2ab7a7bcc6092d8aa4fb5fc7ab6c029f652924eb 100644 (file)
@@ -36,7 +36,7 @@ protected:
 
   void process_music ();
   virtual void finalize ();
-  DECLARE_ACKNOWLEDGER (note_column);
+  void acknowledge_note_column (Grob_info);
 };
 
 void
@@ -119,7 +119,12 @@ Measure_grouping_engraver::Measure_grouping_engraver ()
   grouping_ = 0;
 }
 
-ADD_ACKNOWLEDGER (Measure_grouping_engraver, note_column);
+void
+Measure_grouping_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Measure_grouping_engraver, note_column);
+}
+
 ADD_TRANSLATOR (Measure_grouping_engraver,
                 /* doc */
                 "Create @code{MeasureGrouping} to indicate beat subdivision.",
index 2d982056d33d22f438fdb30a800e081bf6f8150f..a97d13755f08e777948a70394ebbd15f7c2e437b 100644 (file)
@@ -29,8 +29,8 @@ class Melody_engraver : public Engraver
   Grob *stem_;
 protected:
 
-  DECLARE_ACKNOWLEDGER (stem);
-  DECLARE_ACKNOWLEDGER (slur);
+  void acknowledge_stem (Grob_info);
+  void acknowledge_slur (Grob_info);
   TRANSLATOR_DECLARATIONS (Melody_engraver);
   void stop_translation_timestep ();
   void process_acknowledged ();
@@ -93,8 +93,13 @@ Melody_engraver::acknowledge_stem (Grob_info info)
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Melody_engraver, stem);
-ADD_ACKNOWLEDGER (Melody_engraver, slur);
+
+void
+Melody_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Melody_engraver, stem);
+  ADD_ACKNOWLEDGER (Melody_engraver, slur);
+}
 
 ADD_TRANSLATOR (Melody_engraver,
                 /* doc */
index bfa30550e58efd99ff0605572d0f0f0db22101fd..41652a1006775c65227a29917b502ab578f02684 100644 (file)
@@ -59,7 +59,6 @@ protected:
   virtual Spanner *create_ligature_spanner ();
   virtual void build_ligature (Spanner *ligature,
                                vector<Grob_info> const &primitives);
-  DECLARE_TRANSLATOR_LISTENER (ligature);
 
 public:
   TRANSLATOR_DECLARATIONS (Mensural_ligature_engraver);
@@ -74,13 +73,6 @@ private:
                            Real &min_length);
 };
 
-IMPLEMENT_TRANSLATOR_LISTENER (Mensural_ligature_engraver, ligature);
-void
-Mensural_ligature_engraver::listen_ligature (Stream_event *ev)
-{
-  Ligature_engraver::listen_ligature (ev);
-}
-
 Mensural_ligature_engraver::Mensural_ligature_engraver ()
 {
   brew_ligature_primitive_proc
@@ -496,8 +488,14 @@ Mensural_ligature_engraver::build_ligature (Spanner *ligature,
     ligature->set_property ("minimum-length", scm_from_double (min_length));
 }
 
-ADD_ACKNOWLEDGER (Mensural_ligature_engraver, rest);
-ADD_ACKNOWLEDGER (Mensural_ligature_engraver, ligature_head);
+
+void
+Mensural_ligature_engraver::boot ()
+{
+  ADD_LISTENER (Ligature_engraver, ligature);
+  ADD_ACKNOWLEDGER (Ligature_engraver, rest);
+  ADD_ACKNOWLEDGER (Ligature_engraver, ligature_head);
+}
 
 ADD_TRANSLATOR (Mensural_ligature_engraver,
                 /* doc */
index e1de3e23e0f48692e536060357856741152f65ee..241a2da44aa0a7b990504dadc2765b97b59825c3 100644 (file)
@@ -46,11 +46,11 @@ protected:
   void stop_translation_timestep ();
   void process_music ();
 
-  DECLARE_ACKNOWLEDGER (break_aligned);
-  DECLARE_ACKNOWLEDGER (break_alignment);
-  DECLARE_ACKNOWLEDGER (grob);
+  void acknowledge_break_aligned (Grob_info);
+  void acknowledge_break_alignment (Grob_info);
+  void acknowledge_grob (Grob_info);
 
-  DECLARE_TRANSLATOR_LISTENER (tempo_change);
+  void listen_tempo_change (Stream_event *);
 };
 
 Metronome_mark_engraver::Metronome_mark_engraver ()
@@ -61,7 +61,6 @@ Metronome_mark_engraver::Metronome_mark_engraver ()
   tempo_ev_ = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Metronome_mark_engraver, tempo_change);
 void
 Metronome_mark_engraver::listen_tempo_change (Stream_event *ev)
 {
@@ -168,9 +167,15 @@ Metronome_mark_engraver::process_music ()
     }
 }
 
-ADD_ACKNOWLEDGER (Metronome_mark_engraver, break_aligned);
-ADD_ACKNOWLEDGER (Metronome_mark_engraver, break_alignment);
-ADD_ACKNOWLEDGER (Metronome_mark_engraver, grob);
+
+void
+Metronome_mark_engraver::boot ()
+{
+  ADD_LISTENER (Metronome_mark_engraver, tempo_change);
+  ADD_ACKNOWLEDGER (Metronome_mark_engraver, break_aligned);
+  ADD_ACKNOWLEDGER (Metronome_mark_engraver, break_alignment);
+  ADD_ACKNOWLEDGER (Metronome_mark_engraver, grob);
+}
 
 ADD_TRANSLATOR (Metronome_mark_engraver,
                 /* doc */
index 90ea063f736d1c3af3a884ba7cc5858506d1ff7e..a112e6bceffb7daaaf54d9340a265dab20dbbb87 100644 (file)
@@ -113,6 +113,12 @@ Midi_control_function_performer::announce_function_value_change (SCM sev)
     }
 }
 
+void
+Midi_control_function_performer::boot ()
+{
+
+}
+
 ADD_TRANSLATOR (Midi_control_function_performer,
                 /* doc */
                 "",
index 81ab30e3aebebfe5bde60d265e31f94d257efdf7..20c1f58a0b51cdef2e0c5e42e16c4dced7014e7d 100644 (file)
@@ -44,7 +44,7 @@ Moment::Moment (Rational m)
 }
 
 
-const char Moment::type_p_name_[] = "ly:moment?";
+const char * const Moment::type_p_name_ = "ly:moment?";
 
 
 int
index 274746b84597d35ab272cd8048dbb6e0c37b3be4..04ef91fc881a5744ae84615bdf2aadfe042738c5 100644 (file)
@@ -40,8 +40,8 @@ public:
 protected:
   void process_music ();
   void start_translation_timestep ();
-  DECLARE_TRANSLATOR_LISTENER (multi_measure_rest);
-  DECLARE_TRANSLATOR_LISTENER (multi_measure_text);
+  void listen_multi_measure_rest (Stream_event *);
+  void listen_multi_measure_text (Stream_event *);
 
 private:
   void add_bound_item_to_grobs (Item *);
@@ -74,7 +74,6 @@ Multi_measure_rest_engraver::Multi_measure_rest_engraver ()
 {
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Multi_measure_rest_engraver, multi_measure_rest);
 void
 Multi_measure_rest_engraver::listen_multi_measure_rest (Stream_event *ev)
 {
@@ -91,7 +90,6 @@ Multi_measure_rest_engraver::listen_multi_measure_rest (Stream_event *ev)
   clear_lapsed_events (now);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Multi_measure_rest_engraver, multi_measure_text);
 void
 Multi_measure_rest_engraver::listen_multi_measure_text (Stream_event *ev)
 {
@@ -245,6 +243,13 @@ Multi_measure_rest_engraver::start_translation_timestep ()
   clear_lapsed_events (now_mom ());
 }
 
+void
+Multi_measure_rest_engraver::boot ()
+{
+  ADD_LISTENER (Multi_measure_rest_engraver, multi_measure_rest);
+  ADD_LISTENER (Multi_measure_rest_engraver, multi_measure_text);
+}
+
 ADD_TRANSLATOR (Multi_measure_rest_engraver,
                 /* doc */
                 "Engrave multi-measure rests that are produced with"
index 969d5ff7b538cb6abf82a3c2d750072d9bd3c83b..c252291736cae35e659efc07ea6659742f2e0947 100644 (file)
@@ -24,7 +24,7 @@
 #include "fluid.hh"
 #include "lily-imports.hh"
 
-const char Music_function::type_p_name_[] = "ly:music-function?";
+const char * const Music_function::type_p_name_ = "ly:music-function?";
 
 /* Print a textual represenation of the smob to a given port.  */
 int
index b89e92c28ec968f2f13bfbfff070a440d891ce7f..a7a06ff0d82a1ba88ac1f1a67a4346f2fc00ceb0 100644 (file)
@@ -190,7 +190,7 @@ Music_iterator::get_music () const
 
 /****************************************************************/
 
-const char Music_iterator::type_p_name_[] = "ly:iterator?";
+const char * const Music_iterator::type_p_name_ = "ly:iterator?";
 
 SCM
 Music_iterator::mark_smob () const
index 7b89b853f6c29c332aad8292c3f828912db3ff1d..9e8cc9ff9a5bcf3353588f0996afabdf73ded7ee 100644 (file)
@@ -39,7 +39,7 @@ Music_output::derived_mark () const
 {
 }
 
-const char Music_output::type_p_name_[] = "ly:music-output?";
+const char * const Music_output::type_p_name_ = "ly:music-output?";
 
 SCM
 Music_output::mark_smob () const
index 3ecad3a89e3d10cefca9de2fd65ffe161ee3842e..75eccf69fc2cb44edb69d4cc63861332f6d8f578 100644 (file)
@@ -71,9 +71,9 @@ public:
   TRANSLATOR_DECLARATIONS (New_fingering_engraver);
 protected:
   void stop_translation_timestep ();
-  DECLARE_ACKNOWLEDGER (rhythmic_head);
-  DECLARE_ACKNOWLEDGER (inline_accidental);
-  DECLARE_ACKNOWLEDGER (stem);
+  void acknowledge_rhythmic_head (Grob_info);
+  void acknowledge_inline_accidental (Grob_info);
+  void acknowledge_stem (Grob_info);
   void add_fingering (Grob *, SCM,
                       vector<Finger_tuple> *,
                       Stream_event *, Stream_event *);
@@ -371,9 +371,14 @@ New_fingering_engraver::New_fingering_engraver ()
   stem_ = 0;
 }
 
-ADD_ACKNOWLEDGER (New_fingering_engraver, rhythmic_head);
-ADD_ACKNOWLEDGER (New_fingering_engraver, inline_accidental);
-ADD_ACKNOWLEDGER (New_fingering_engraver, stem);
+
+void
+New_fingering_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (New_fingering_engraver, rhythmic_head);
+  ADD_ACKNOWLEDGER (New_fingering_engraver, inline_accidental);
+  ADD_ACKNOWLEDGER (New_fingering_engraver, stem);
+}
 
 ADD_TRANSLATOR (New_fingering_engraver,
                 /* doc */
index 4b21bb27673a5bf62fee58851947c79e3ebe5024..b09fe6636139ebe3a658decf524086b04437057c 100644 (file)
@@ -39,7 +39,7 @@ public:
   TRANSLATOR_DECLARATIONS (Note_head_line_engraver);
 
 protected:
-  DECLARE_ACKNOWLEDGER (rhythmic_head);
+  void acknowledge_rhythmic_head (Grob_info);
   void process_acknowledged ();
   void stop_translation_timestep ();
 
@@ -106,7 +106,12 @@ Note_head_line_engraver::stop_translation_timestep ()
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Note_head_line_engraver, rhythmic_head);
+void
+Note_head_line_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Note_head_line_engraver, rhythmic_head);
+}
+
 ADD_TRANSLATOR (Note_head_line_engraver,
                 /* doc */
                 "Engrave a line between two note heads in a staff"
index 6322dfa2b9f7ed72b5a8bdfd9af6109fa62fa9b5..5839a827eb3129045c9e5330d41dacf203ab0d67 100644 (file)
@@ -41,7 +41,7 @@ public:
   TRANSLATOR_DECLARATIONS (Note_heads_engraver);
 
 protected:
-  DECLARE_TRANSLATOR_LISTENER (note);
+  void listen_note (Stream_event *);
   void process_music ();
   void stop_translation_timestep ();
 };
@@ -50,7 +50,6 @@ Note_heads_engraver::Note_heads_engraver ()
 {
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Note_heads_engraver, note);
 void
 Note_heads_engraver::listen_note (Stream_event *ev)
 {
@@ -121,6 +120,12 @@ Note_heads_engraver::stop_translation_timestep ()
   note_evs_.clear ();
 }
 
+void
+Note_heads_engraver::boot ()
+{
+  ADD_LISTENER (Note_heads_engraver, note);
+}
+
 ADD_TRANSLATOR (Note_heads_engraver,
                 /* doc */
                 "Generate note heads.",
index 3ae9840e0d4090e2e30c6287bda48d5f982008d1..2b8fa87000c8331f6c6a02e137a176e95fb83636 100644 (file)
@@ -30,12 +30,11 @@ public:
   TRANSLATOR_DECLARATIONS (Note_name_engraver);
 
   vector<Stream_event *> events_;
-  DECLARE_TRANSLATOR_LISTENER (note);
+  void listen_note (Stream_event *);
   void process_music ();
   void stop_translation_timestep ();
 };
 
-IMPLEMENT_TRANSLATOR_LISTENER (Note_name_engraver, note);
 void
 Note_name_engraver::listen_note (Stream_event *ev)
 {
@@ -74,6 +73,12 @@ Note_name_engraver::Note_name_engraver ()
 {
 }
 
+void
+Note_name_engraver::boot ()
+{
+  ADD_LISTENER (Note_name_engraver, note);
+}
+
 ADD_TRANSLATOR (Note_name_engraver,
                 /* doc */
                 "Print pitches as words.",
index aa46440006c21140b3f12828b3e97c5ef6ba2ae0..468210d20d0852f26a7d576dfc483defe42a277f 100644 (file)
@@ -35,15 +35,16 @@ protected:
   void stop_translation_timestep ();
   void process_music ();
 
-  DECLARE_TRANSLATOR_LISTENER (note);
-  DECLARE_TRANSLATOR_LISTENER (breathing);
+  void listen_note (Stream_event *);
+  void listen_breathing (Stream_event *);
+  void listen_tie (Stream_event *);
+  void listen_articulation (Stream_event *);
 private:
-  vector<Stream_event *> note_evs_;
+  vector<Stream_event *> note_evs_, script_evs_;
   vector<Audio_note *> notes_;
 
   vector<Audio_note *> last_notes_;
   Moment last_start_;
-
 };
 
 void
@@ -68,6 +69,10 @@ Note_performer::process_music ()
           Stream_event *tie_event = 0;
           Moment len = get_event_length (n, now_mom ());
           int velocity = 0;
+
+          for (vsize j = script_evs_.size (); j--;)
+            articulations = scm_cons (script_evs_[j]->self_scm (), articulations);
+
           for (SCM s = articulations; scm_is_pair (s); s = scm_cdr (s))
             {
               Stream_event *ev = unsmob<Stream_event> (scm_car (s));
@@ -124,16 +129,27 @@ Note_performer::stop_translation_timestep ()
 
   notes_.clear ();
   note_evs_.clear ();
+  script_evs_.clear ();
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Note_performer, note)
 void
 Note_performer::listen_note (Stream_event *ev)
 {
   note_evs_.push_back (ev);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Note_performer, breathing)
+void
+Note_performer::listen_tie (Stream_event *ev)
+{
+  script_evs_.push_back (ev);
+}
+
+void
+Note_performer::listen_articulation (Stream_event *ev)
+{
+  script_evs_.push_back (ev);
+}
+
 void
 Note_performer::listen_breathing (Stream_event *ev)
 {
@@ -157,6 +173,15 @@ Note_performer::listen_breathing (Stream_event *ev)
       }
 }
 
+void
+Note_performer::boot ()
+{
+  ADD_LISTENER (Note_performer, note);
+  ADD_LISTENER (Note_performer, breathing);
+  ADD_LISTENER (Note_performer, tie);
+  ADD_LISTENER (Note_performer, articulation);
+}
+
 ADD_TRANSLATOR (Note_performer,
                 /* doc */
                 "",
index f0bca862d98585972abaf03ade23d336de06243f..414e1ee7610cee80c76e1ead38768c21e9fbd5cb 100644 (file)
@@ -40,8 +40,8 @@ class Note_spacing_engraver : public Engraver
   TRANSLATOR_DECLARATIONS (Note_spacing_engraver);
 protected:
 
-  DECLARE_ACKNOWLEDGER (rhythmic_grob);
-  DECLARE_ACKNOWLEDGER (note_column);
+  void acknowledge_rhythmic_grob (Grob_info);
+  void acknowledge_note_column (Grob_info);
   void stop_translation_timestep ();
   virtual void finalize ();
   virtual void derived_mark () const;
@@ -135,8 +135,13 @@ Note_spacing_engraver::stop_translation_timestep ()
 
 }
 
-ADD_ACKNOWLEDGER (Note_spacing_engraver, note_column);
-ADD_ACKNOWLEDGER (Note_spacing_engraver, rhythmic_grob);
+
+void
+Note_spacing_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Note_spacing_engraver, note_column);
+  ADD_ACKNOWLEDGER (Note_spacing_engraver, rhythmic_grob);
+}
 
 ADD_TRANSLATOR (Note_spacing_engraver,
                 /* doc */
index 79370fa698dffa4b3eeea8d997c53163ee7ffe4f..365ccb1a630f83756980b2d9fc9f2a40eba96008 100644 (file)
   along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include "international.hh"
 #include "modified-font-metric.hh"
 #include "open-type-font.hh"
+#include "freetype.hh"
+
+#ifdef FT_FONT_FORMATS_H
+/* FreeType 2.6+ */
+#include FT_FONT_FORMATS_H
+#else
+/* FreeType 2.5.5 and earlier */
+#include FT_XFREE86_H
+#define FT_Get_Font_Format FT_Get_X11_Font_Format
+#endif
 
 LY_DEFINE (ly_font_sub_fonts, "ly:font-sub-fonts", 1, 0, 0,
            (SCM font),
@@ -115,3 +126,49 @@ LY_DEFINE (ly_otf_glyph_list, "ly:otf-glyph-list", 1, 0, 0,
 
   return otf->glyph_list ();
 }
+
+LY_DEFINE (ly_get_font_format, "ly:get-font-format",
+           1, 1, 0, (SCM font_file_name, SCM idx),
+           "Get the font format for @var{font_file_name},"
+           " returning it as a symbol.  The optional"
+           " @var{idx} argument is useful for TrueType Collections (TTC) and"
+           " OpenType/CFF collections (OTC) only;"
+           " it specifies the font index within the TTC/OTC."
+           " The default value of @var{idx} is@tie{}0.")
+{
+  LY_ASSERT_TYPE (scm_is_string, font_file_name, 1);
+
+  int i = 0;
+  if (!SCM_UNBNDP (idx))
+    {
+      LY_ASSERT_TYPE (scm_is_integer, idx, 2);
+      i = scm_to_int (idx);
+      if (i < 0)
+        {
+          warning (_ ("font index must be non-negative, using index 0"));
+          i = 0;
+        }
+    }
+
+  string file_name = ly_scm2string (font_file_name);
+
+  FT_Face face;
+  /* check whether font index is valid */
+  if (i > 0)
+    {
+      face = open_ft_face (file_name, -1);
+      if (i >= face->num_faces)
+        {
+          warning (_f ("font index %d too large for font `%s', using index 0",
+                       i, file_name.c_str ()));
+          i = 0;
+        }
+      FT_Done_Face (face);
+    }
+
+  face = open_ft_face (file_name, i);
+  SCM asscm = scm_from_ascii_symbol (FT_Get_Font_Format (face));
+  FT_Done_Face (face);
+
+  return asscm;
+}
index d236ed779d28439768480e21fedaa41af7efb490..e681e73af6b65a661454712f47a4b535a72f6328 100644 (file)
@@ -32,7 +32,7 @@ public:
 protected:
   virtual void finalize ();
 
-  DECLARE_ACKNOWLEDGER (note_column);
+  void acknowledge_note_column (Grob_info);
 
   void process_music ();
   void stop_translation_timestep ();
@@ -136,7 +136,12 @@ Ottava_spanner_engraver::finalize ()
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Ottava_spanner_engraver, note_column);
+
+void
+Ottava_spanner_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Ottava_spanner_engraver, note_column);
+}
 
 ADD_TRANSLATOR (Ottava_spanner_engraver,
                 /* doc */
index 921f3dfcd5f9523ccbdbf20f6ffda170bb4152ed..65673c8a9ec71a6238104e70621f1313b224f810 100644 (file)
@@ -132,7 +132,7 @@ LY_DEFINE (ly_output_find_context_def, "ly:output-find-context-def",
 }
 
 const char
-Output_def::type_p_name_[] = "ly:output-def?";
+* const Output_def::type_p_name_ = "ly:output-def?";
 
 LY_DEFINE (ly_paper_outputscale, "ly:paper-outputscale",
           1, 0, 0, (SCM def),
index c14a6ee563b11c3e1f09cd6210ed7f7fa8eb1255..7a0fa2d3c3389484cb94f03c6f798f0a1e6b866c 100644 (file)
@@ -31,13 +31,12 @@ class Output_property_engraver : public Engraver
 protected:
   vector<Stream_event*> props_;
   
-  DECLARE_ACKNOWLEDGER (grob);
-  DECLARE_TRANSLATOR_LISTENER (apply_output);
+  void acknowledge_grob (Grob_info);
+  void listen_apply_output (Stream_event *);
 
   void stop_translation_timestep ();
 };
 
-IMPLEMENT_TRANSLATOR_LISTENER (Output_property_engraver, apply_output);
 void
 Output_property_engraver::listen_apply_output (Stream_event *ev)
 {
@@ -78,7 +77,13 @@ Output_property_engraver::Output_property_engraver ()
 {
 }
 
-ADD_ACKNOWLEDGER (Output_property_engraver, grob);
+void
+Output_property_engraver::boot ()
+{
+  ADD_LISTENER (Output_property_engraver, apply_output);
+  ADD_ACKNOWLEDGER (Output_property_engraver, grob);
+}
+
 ADD_TRANSLATOR (Output_property_engraver,
                /* doc */
                "Apply a procedure to any grob acknowledged.",
index 02b9c4ad19e82c6a00b2a970ea5d098881820ed5..af62bdc95e27409ce44c14eea4bd4740ffe5f956 100644 (file)
@@ -40,7 +40,7 @@ Page_marker::~Page_marker ()
 {
 }
 
-const char Page_marker::type_p_name_[] = "ly:page-marker?";
+const char * const Page_marker::type_p_name_ = "ly:page-marker?";
 
 SCM
 Page_marker::mark_smob () const
index dd90ba71cf196afea1691f7d348f9c550ce129d3..c77dc9b2a5de516ad7cf827c7793c8e310dc3cb2 100644 (file)
@@ -97,8 +97,8 @@ class Page_turn_engraver : public Engraver
   Grob *breakable_column (Page_turn_event const &);
 
 protected:
-  DECLARE_TRANSLATOR_LISTENER (break);
-  DECLARE_ACKNOWLEDGER (note_head);
+  void listen_break (Stream_event *);
+  void acknowledge_note_head (Grob_info);
 
 public:
   TRANSLATOR_DECLARATIONS (Page_turn_engraver);
@@ -168,7 +168,6 @@ Page_turn_engraver::acknowledge_note_head (Grob_info gi)
   note_end_ = now_mom () + dur_ptr->get_length ();
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Page_turn_engraver, break);
 void
 Page_turn_engraver::listen_break (Stream_event *ev)
 {
@@ -342,7 +341,13 @@ Page_turn_engraver::finalize ()
     }
 }
 
-ADD_ACKNOWLEDGER (Page_turn_engraver, note_head);
+
+void
+Page_turn_engraver::boot ()
+{
+  ADD_LISTENER (Page_turn_engraver, break);
+  ADD_ACKNOWLEDGER (Page_turn_engraver, note_head);
+}
 
 ADD_TRANSLATOR (Page_turn_engraver,
                 /* doc */
index e23ef527772cbe2dc61d192ab2485673e8d0f7ab..3a672198b538df5a880c19b1032db80adb1af946 100644 (file)
@@ -53,7 +53,7 @@ Paper_book::~Paper_book ()
 {
 }
 
-const char Paper_book::type_p_name_[] = "ly:paper-book?";
+const char * const Paper_book::type_p_name_ = "ly:paper-book?";
 
 SCM
 Paper_book::mark_smob () const
index 7c44f173d70226f540b266bd24c7c28dfc8d8a76..8cb99ecbb6f1f259fc047677014db523f240ecb5 100644 (file)
@@ -142,14 +142,12 @@ Paper_column_engraver::set_columns (Paper_column *new_command,
   system_->add_column (musical_column_);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Paper_column_engraver, break);
 void
 Paper_column_engraver::listen_break (Stream_event *ev)
 {
   break_events_.push_back (ev);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Paper_column_engraver, label);
 void
 Paper_column_engraver::listen_label (Stream_event *ev)
 {
@@ -301,9 +299,16 @@ Paper_column_engraver::start_translation_timestep ()
     }
 }
 
-ADD_ACKNOWLEDGER (Paper_column_engraver, item);
-ADD_ACKNOWLEDGER (Paper_column_engraver, note_spacing);
-ADD_ACKNOWLEDGER (Paper_column_engraver, staff_spacing);
+
+void
+Paper_column_engraver::boot ()
+{
+  ADD_LISTENER (Paper_column_engraver, break);
+  ADD_LISTENER (Paper_column_engraver, label);
+  ADD_ACKNOWLEDGER (Paper_column_engraver, item);
+  ADD_ACKNOWLEDGER (Paper_column_engraver, note_spacing);
+  ADD_ACKNOWLEDGER (Paper_column_engraver, staff_spacing);
+}
 
 ADD_TRANSLATOR (Paper_column_engraver,
                 /* doc */
index 471a36a41a4572eb1941eb83ad4a27b244cb3c26..a72ea59ccdef770d8f70c32f942a42ee4fe8a6d9 100644 (file)
@@ -40,8 +40,6 @@ using namespace std;
 #include "lily-imports.hh"
 
 
-const char * const Paper_outputter::type_p_name_ = 0;
-
 Paper_outputter::Paper_outputter (SCM port, const string &format)
 {
   file_ = port;
index 1479aa4c0be887d711ae4d2b46c3b1e1cdb78f8c..dcbd506a4a5326ec6fd8524f13fd5298ac07a453 100644 (file)
@@ -32,7 +32,7 @@ class Parenthesis_engraver : public Engraver
   TRANSLATOR_DECLARATIONS (Parenthesis_engraver);
 
 protected:
-  DECLARE_ACKNOWLEDGER (grob);
+  void acknowledge_grob (Grob_info);
 };
 
 Parenthesis_engraver::Parenthesis_engraver ()
@@ -72,7 +72,12 @@ Parenthesis_engraver::acknowledge_grob (Grob_info info)
     }
 }
 
-ADD_ACKNOWLEDGER (Parenthesis_engraver, grob);
+void
+Parenthesis_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Parenthesis_engraver, grob);
+}
+
 ADD_TRANSLATOR (Parenthesis_engraver,
                 /* doc */
                 "Parenthesize objects whose music cause has the"
index b8849e8f4acaa79447fe0a81daa4d6e0d8a218d3..1695aea6259d838f12655f412692210e251eeb4e 100644 (file)
@@ -387,8 +387,7 @@ prec levels in different prods */
 start_symbol:
        lilypond
        | EMBEDDED_LILY {
-               SCM nn = parser->lexer_->lookup_identifier ("pitchnames");
-               parser->lexer_->push_note_state (nn);
+               parser->lexer_->push_note_state (Lily::pitchnames);
        } embedded_lilypond {
                parser->lexer_->pop_state ();
                 *retval = $3;
@@ -824,8 +823,7 @@ context_mod_arg:
        embedded_scm
        |
        {
-               SCM nn = parser->lexer_->lookup_identifier ("pitchnames");
-               parser->lexer_->push_note_state (nn);
+               parser->lexer_->push_note_state (Lily::pitchnames);
        }
        composite_music
        {
@@ -1282,8 +1280,7 @@ output_def_body:
        {
                if (scm_is_pair ($1))
                        $1 = scm_car ($1);
-               SCM nn = parser->lexer_->lookup_identifier ("pitchnames");
-               parser->lexer_->push_note_state (nn);
+               parser->lexer_->push_note_state (Lily::pitchnames);
        } music_or_context_def
        {
                parser->lexer_->pop_state ();
@@ -1455,8 +1452,7 @@ simple_music:
 context_modification:
         WITH
        {
-               SCM nn = parser->lexer_->lookup_identifier ("pitchnames");
-               parser->lexer_->push_note_state (nn);
+               parser->lexer_->push_note_state (Lily::pitchnames);
        } '{' context_mod_list '}'
         {
                 parser->lexer_->pop_state ();
@@ -2530,15 +2526,13 @@ mode_changed_music:
 
 mode_changing_head:
        NOTEMODE {
-               SCM nn = parser->lexer_->lookup_identifier ("pitchnames");
-               parser->lexer_->push_note_state (nn);
+               parser->lexer_->push_note_state (Lily::pitchnames);
 
                $$ = ly_symbol2scm ("notes");
        }
        | DRUMMODE
                {
-               SCM nn = parser->lexer_->lookup_identifier ("drumPitchNames");
-               parser->lexer_->push_note_state (nn);
+               parser->lexer_->push_note_state (Lily::drum_pitch_names);
 
                $$ = ly_symbol2scm ("drums");
        }
@@ -2548,10 +2542,9 @@ mode_changing_head:
                $$ = ly_symbol2scm ("figures");
        }
        | CHORDMODE {
-               SCM nn = parser->lexer_->lookup_identifier ("chordmodifiers");
-               parser->lexer_->chordmodifier_tab_ = alist_to_hashq (nn);
-               nn = parser->lexer_->lookup_identifier ("pitchnames");
-               parser->lexer_->push_chord_state (nn);
+               parser->lexer_->chordmodifier_tab_ =
+                       alist_to_hashq (Lily::chordmodifiers);
+               parser->lexer_->push_chord_state (Lily::pitchnames);
                $$ = ly_symbol2scm ("chords");
 
        }
@@ -2563,8 +2556,7 @@ mode_changing_head:
 
 mode_changing_head_with_context:
        DRUMS {
-               SCM nn = parser->lexer_->lookup_identifier ("drumPitchNames");
-               parser->lexer_->push_note_state (nn);
+               parser->lexer_->push_note_state (Lily::drum_pitch_names);
 
                $$ = ly_symbol2scm ("DrumStaff");
        }
@@ -2574,10 +2566,9 @@ mode_changing_head_with_context:
                $$ = ly_symbol2scm ("FiguredBass");
        }
        | CHORDS {
-               SCM nn = parser->lexer_->lookup_identifier ("chordmodifiers");
-               parser->lexer_->chordmodifier_tab_ = alist_to_hashq (nn);
-               nn = parser->lexer_->lookup_identifier ("pitchnames");
-               parser->lexer_->push_chord_state (nn);
+               parser->lexer_->chordmodifier_tab_ =
+                       alist_to_hashq (Lily::chordmodifiers);
+               parser->lexer_->push_chord_state (Lily::pitchnames);
                $$ = ly_symbol2scm ("ChordNames");
        }
        | LYRICS
@@ -3861,8 +3852,7 @@ markup_uncomposed_list:
                $$ = $2;
        }
        | SCORELINES {
-               SCM nn = parser->lexer_->lookup_identifier ("pitchnames");
-               parser->lexer_->push_note_state (nn);
+               parser->lexer_->push_note_state (Lily::pitchnames);
        } '{' score_body '}' {
                Score *sc = unsmob<Score> ($4);
                sc->origin ()->set_spot (@$);
@@ -3975,8 +3965,7 @@ simple_markup:
                $$ = make_simple_markup ($1);
        }
        | SCORE {
-               SCM nn = parser->lexer_->lookup_identifier ("pitchnames");
-               parser->lexer_->push_note_state (nn);
+               parser->lexer_->push_note_state (Lily::pitchnames);
        } '{' score_body '}' {
                Score *sc = unsmob<Score> ($4);
                sc->origin ()->set_spot (@$);
index eaae218c1b17a1700a10a394960b1000c1abffac..33c10f59660cb77ff2a674656168ae7d1d19a951 100644 (file)
@@ -34,11 +34,11 @@ class Part_combine_engraver : public Engraver
   TRANSLATOR_DECLARATIONS (Part_combine_engraver);
 
 protected:
-  DECLARE_ACKNOWLEDGER (note_head);
-  DECLARE_ACKNOWLEDGER (stem);
+  void acknowledge_note_head (Grob_info);
+  void acknowledge_stem (Grob_info);
 
-  DECLARE_TRANSLATOR_LISTENER (part_combine);
-  DECLARE_TRANSLATOR_LISTENER (note);
+  void listen_part_combine (Stream_event *);
+  void listen_note (Stream_event *);
   void process_music ();
   void stop_translation_timestep ();
   void create_item (Stream_event *ev);
@@ -51,7 +51,6 @@ private:
   Stream_event *waiting_event_;
 };
 
-IMPLEMENT_TRANSLATOR_LISTENER (Part_combine_engraver, part_combine);
 void
 Part_combine_engraver::listen_part_combine (Stream_event *ev)
 {
@@ -61,7 +60,6 @@ Part_combine_engraver::listen_part_combine (Stream_event *ev)
   waiting_event_ = new_event_;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Part_combine_engraver, note);
 void
 Part_combine_engraver::listen_note (Stream_event *)
 {
@@ -137,8 +135,15 @@ Part_combine_engraver::stop_translation_timestep ()
   note_found_ = false;
 }
 
-ADD_ACKNOWLEDGER (Part_combine_engraver, note_head);
-ADD_ACKNOWLEDGER (Part_combine_engraver, stem);
+void
+Part_combine_engraver::boot ()
+{
+  ADD_LISTENER (Part_combine_engraver, part_combine);
+  ADD_LISTENER (Part_combine_engraver, note);
+  ADD_ACKNOWLEDGER (Part_combine_engraver, note_head);
+  ADD_ACKNOWLEDGER (Part_combine_engraver, stem);
+}
+
 ADD_TRANSLATOR (Part_combine_engraver,
                 /* doc */
                 "Part combine engraver for orchestral scores: Print markings"
index 895e06981ec6483c1cfcdb7f1b460f41a625c52e..b620cdccb561d49fc684917d58116b3be5a1c534 100644 (file)
@@ -50,7 +50,7 @@ protected:
   Moment command_moment_;
 
   virtual void finalize ();
-  DECLARE_TRANSLATOR_LISTENER (percent);
+  void listen_percent (Stream_event *);
 
   void start_translation_timestep ();
   void stop_translation_timestep ();
@@ -85,7 +85,6 @@ Percent_repeat_engraver::start_translation_timestep ()
     }
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Percent_repeat_engraver, percent);
 void
 Percent_repeat_engraver::listen_percent (Stream_event *ev)
 {
@@ -169,6 +168,12 @@ Percent_repeat_engraver::stop_translation_timestep ()
 {
 }
 
+void
+Percent_repeat_engraver::boot ()
+{
+  ADD_LISTENER (Percent_repeat_engraver, percent);
+}
+
 ADD_TRANSLATOR (Percent_repeat_engraver,
                 /* doc */
                 "Make whole measure repeats.",
index 4a1351547230abd68d06c72ad882778c09be4f88..f708c098a09329511805f27a1d6f8db4a1409112 100644 (file)
@@ -1,4 +1,5 @@
 
+#include "international.hh"
 #include "program-option.hh"
 #include "source-file.hh"
 #include "memory-stream.hh"
@@ -29,20 +30,50 @@ LY_DEFINE (ly_pfb_2_pfa, "ly:pfb->pfa",
 }
 
 LY_DEFINE (ly_otf_2_cff, "ly:otf->cff",
-           1, 0, 0, (SCM otf_file_name),
+           1, 1, 0, (SCM otf_file_name, SCM idx),
            "Convert the contents of an OTF file to a CFF file,"
-           " returning it as a string.")
+           " returning it as a string.  The optional"
+           " @var{idx} argument is useful for OpenType/CFF collections (OTC)"
+           " only; it specifies the font index within the OTC.  The default"
+           " value of @var{idx} is@tie{}0.")
 {
   LY_ASSERT_TYPE (scm_is_string, otf_file_name, 1);
 
+  int i = 0;
+  if (!SCM_UNBNDP (idx))
+    {
+      LY_ASSERT_TYPE (scm_is_integer, idx, 2);
+      i = scm_to_int (idx);
+      if (i < 0)
+        {
+          warning (_ ("font index must be non-negative, using index 0"));
+          i = 0;
+        }
+    }
+
   string file_name = ly_scm2string (otf_file_name);
   debug_output ("[" + file_name); // start message on a new line
 
-  FT_Face face = open_ft_face (file_name, 0 /* index */);
+  FT_Face face;
+  /* check whether font index is valid */
+  if (i > 0)
+    {
+      face = open_ft_face (file_name, -1);
+      if (i >= face->num_faces)
+        {
+          warning (_f ("font index %d too large for font `%s', using index 0",
+                       i, file_name.c_str ()));
+          i = 0;
+        }
+      FT_Done_Face (face);
+    }
+
+  face = open_ft_face (file_name, i);
   string table = get_otf_table (face, "CFF ");
 
   SCM asscm = scm_from_latin1_stringn ((char *) table.data (),
                                        table.length ());
+  FT_Done_Face (face);
 
   debug_output ("]", false);
 
index b1a2f23ea02aefc38018583b64c72a8bfab2d885..ee7a96a2d773e492c8172f0ef77bd5ba67373cab 100644 (file)
@@ -34,9 +34,8 @@
 class Phrasing_slur_engraver : public Slur_proto_engraver
 {
 protected:
-  DECLARE_TRANSLATOR_LISTENER (phrasing_slur);
-  DECLARE_TRANSLATOR_LISTENER (note);
-  DECLARE_ACKNOWLEDGER (slur);
+  void listen_phrasing_slur (Stream_event *);
+  void acknowledge_slur (Grob_info);
 
 public:
   SCM event_symbol ();
@@ -56,36 +55,35 @@ Phrasing_slur_engraver::event_symbol ()
   return ly_symbol2scm ("phrasing-slur-event");
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Phrasing_slur_engraver, phrasing_slur);
 void
 Phrasing_slur_engraver::listen_phrasing_slur (Stream_event *ev)
 {
   Slur_proto_engraver::listen_slur (ev);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Phrasing_slur_engraver, note);
 void
-Phrasing_slur_engraver::listen_note (Stream_event *ev)
+Phrasing_slur_engraver::acknowledge_slur (Grob_info info)
 {
-  Slur_proto_engraver::listen_note (ev);
+  acknowledge_extra_object (info);
 }
 
+
 void
-Phrasing_slur_engraver::acknowledge_slur (Grob_info info)
+Phrasing_slur_engraver::boot ()
 {
-  acknowledge_extra_object (info);
+  ADD_LISTENER (Phrasing_slur_engraver, phrasing_slur);
+  ADD_LISTENER (Slur_proto_engraver, note);
+  ADD_ACKNOWLEDGER (Slur_proto_engraver, inline_accidental);
+  ADD_ACKNOWLEDGER (Slur_proto_engraver, fingering);
+  ADD_ACKNOWLEDGER (Slur_proto_engraver, note_column);
+  ADD_ACKNOWLEDGER (Phrasing_slur_engraver, slur);
+  ADD_ACKNOWLEDGER (Slur_proto_engraver, script);
+  ADD_ACKNOWLEDGER (Slur_proto_engraver, dots);
+  ADD_ACKNOWLEDGER (Slur_proto_engraver, text_script);
+  ADD_END_ACKNOWLEDGER (Slur_proto_engraver, tie);
+  ADD_ACKNOWLEDGER (Slur_proto_engraver, tuplet_number);
 }
 
-ADD_ACKNOWLEDGER (Phrasing_slur_engraver, inline_accidental);
-ADD_ACKNOWLEDGER (Phrasing_slur_engraver, fingering)
-ADD_ACKNOWLEDGER (Phrasing_slur_engraver, note_column);
-ADD_ACKNOWLEDGER (Phrasing_slur_engraver, slur);
-ADD_ACKNOWLEDGER (Phrasing_slur_engraver, script);
-ADD_ACKNOWLEDGER (Phrasing_slur_engraver, dots);
-ADD_ACKNOWLEDGER (Phrasing_slur_engraver, text_script);
-ADD_END_ACKNOWLEDGER (Phrasing_slur_engraver, tie);
-ADD_ACKNOWLEDGER (Phrasing_slur_engraver, tuplet_number);
-
 ADD_TRANSLATOR (Phrasing_slur_engraver,
                 /* doc */
                 "Print phrasing slurs.  Similar to @ref{Slur_engraver}.",
index 7134a6cfc7797d895491db906a751d502bfc3295..7c120a1bc19f861cea5c14a7603326d629a5469b 100644 (file)
@@ -76,11 +76,11 @@ public:
 protected:
   virtual void finalize ();
 
-  DECLARE_ACKNOWLEDGER (piano_pedal_script);
-  DECLARE_ACKNOWLEDGER (piano_pedal_bracket);
-  DECLARE_ACKNOWLEDGER (note_column);
+  void acknowledge_piano_pedal_script (Grob_info);
+  void acknowledge_piano_pedal_bracket (Grob_info);
+  void acknowledge_note_column (Grob_info);
 
-  DECLARE_END_ACKNOWLEDGER (piano_pedal_bracket);
+  void acknowledge_end_piano_pedal_bracket (Grob_info);
 
   void stop_translation_timestep ();
   void start_translation_timestep ();
@@ -248,11 +248,16 @@ Piano_pedal_align_engraver::finalize ()
     }
 }
 
-ADD_ACKNOWLEDGER (Piano_pedal_align_engraver, note_column);
-ADD_ACKNOWLEDGER (Piano_pedal_align_engraver, piano_pedal_bracket);
-ADD_ACKNOWLEDGER (Piano_pedal_align_engraver, piano_pedal_script);
 
-ADD_END_ACKNOWLEDGER (Piano_pedal_align_engraver, piano_pedal_bracket);
+
+void
+Piano_pedal_align_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Piano_pedal_align_engraver, note_column);
+  ADD_ACKNOWLEDGER (Piano_pedal_align_engraver, piano_pedal_bracket);
+  ADD_ACKNOWLEDGER (Piano_pedal_align_engraver, piano_pedal_script);
+  ADD_END_ACKNOWLEDGER (Piano_pedal_align_engraver, piano_pedal_bracket);
+}
 
 ADD_TRANSLATOR (Piano_pedal_align_engraver,
                 /* doc */
index 2fb99407d50c7c9a7061fb832d89d662ce38b27d..cbdf5244d11e223d3c8aea157ac0d8acee5daf8d 100644 (file)
@@ -123,9 +123,9 @@ public:
 protected:
   virtual void initialize ();
   virtual void finalize ();
-  DECLARE_TRANSLATOR_LISTENER (sustain);
-  DECLARE_TRANSLATOR_LISTENER (una_corda);
-  DECLARE_TRANSLATOR_LISTENER (sostenuto);
+  void listen_sustain (Stream_event *);
+  void listen_una_corda (Stream_event *);
+  void listen_sostenuto (Stream_event *);
   void stop_translation_timestep ();
   void process_music ();
 
@@ -205,7 +205,6 @@ Piano_pedal_engraver::initialize ()
   info_list_[NUM_PEDAL_TYPES].type_ = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Piano_pedal_engraver, sostenuto);
 void
 Piano_pedal_engraver::listen_sostenuto (Stream_event *ev)
 {
@@ -213,7 +212,6 @@ Piano_pedal_engraver::listen_sostenuto (Stream_event *ev)
   ASSIGN_EVENT_ONCE (info_list_[SOSTENUTO].event_drul_[d], ev);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Piano_pedal_engraver, sustain);
 void
 Piano_pedal_engraver::listen_sustain (Stream_event *ev)
 {
@@ -221,7 +219,6 @@ Piano_pedal_engraver::listen_sustain (Stream_event *ev)
   ASSIGN_EVENT_ONCE (info_list_[SUSTAIN].event_drul_[d], ev);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Piano_pedal_engraver, una_corda);
 void
 Piano_pedal_engraver::listen_una_corda (Stream_event *ev)
 {
@@ -479,6 +476,14 @@ Piano_pedal_engraver::typeset_all (Pedal_info *p)
     }
 }
 
+void
+Piano_pedal_engraver::boot ()
+{
+  ADD_LISTENER (Piano_pedal_engraver, sostenuto);
+  ADD_LISTENER (Piano_pedal_engraver, sustain);
+  ADD_LISTENER (Piano_pedal_engraver, una_corda);
+}
+
 ADD_TRANSLATOR (Piano_pedal_engraver,
                 /* doc */
                 "Engrave piano pedal symbols and brackets.",
index 49ec0dd7feb042ea052de8a6b01069b59366187b..a8273980e924d61ca558444ec949475102b6c536 100644 (file)
@@ -48,9 +48,9 @@ protected:
   void process_music ();
   void stop_translation_timestep ();
   void start_translation_timestep ();
-  DECLARE_TRANSLATOR_LISTENER (sustain);
-  DECLARE_TRANSLATOR_LISTENER (una_corda);
-  DECLARE_TRANSLATOR_LISTENER (sostenuto);
+  void listen_sustain (Stream_event *);
+  void listen_una_corda (Stream_event *);
+  void listen_sostenuto (Stream_event *);
 private:
   vector<Audio_piano_pedal *> audios_;
   Pedal_info info_alist_[NUM_PEDAL_TYPES];
@@ -146,7 +146,6 @@ Piano_pedal_performer::start_translation_timestep ()
     }
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Piano_pedal_performer, sostenuto);
 void
 Piano_pedal_performer::listen_sostenuto (Stream_event *r)
 {
@@ -154,7 +153,6 @@ Piano_pedal_performer::listen_sostenuto (Stream_event *r)
   info_alist_[SOSTENUTO].event_drul_[d] = r;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Piano_pedal_performer, sustain);
 void
 Piano_pedal_performer::listen_sustain (Stream_event *r)
 {
@@ -162,7 +160,6 @@ Piano_pedal_performer::listen_sustain (Stream_event *r)
   info_alist_[SUSTAIN].event_drul_[d] = r;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Piano_pedal_performer, una_corda);
 void
 Piano_pedal_performer::listen_una_corda (Stream_event *r)
 {
@@ -170,6 +167,14 @@ Piano_pedal_performer::listen_una_corda (Stream_event *r)
   info_alist_[UNA_CORDA].event_drul_[d] = r;
 }
 
+void
+Piano_pedal_performer::boot ()
+{
+  ADD_LISTENER (Piano_pedal_performer, sostenuto);
+  ADD_LISTENER (Piano_pedal_performer, sustain);
+  ADD_LISTENER (Piano_pedal_performer, una_corda);
+}
+
 ADD_TRANSLATOR (Piano_pedal_performer,
                 /* doc */
                 "",
index d9796ff0e0789feb3c5d842228b8c4be968282da..0750c594950e7dd7ce5f9bcea9166345a1b9875f 100644 (file)
@@ -28,7 +28,7 @@ class Pitch_squash_engraver : public Engraver
 {
 public:
   TRANSLATOR_DECLARATIONS (Pitch_squash_engraver);
-  DECLARE_ACKNOWLEDGER (note_head);
+  void acknowledge_note_head (Grob_info);
 };
 
 void
@@ -44,7 +44,12 @@ Pitch_squash_engraver::Pitch_squash_engraver ()
 }
 
 #include "translator.icc"
-ADD_ACKNOWLEDGER (Pitch_squash_engraver, note_head);
+void
+Pitch_squash_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Pitch_squash_engraver, note_head);
+}
+
 ADD_TRANSLATOR (Pitch_squash_engraver,
                 /* doc */
                 "Set the vertical position of note heads to"
index e34562fecc5571fe83ab21b5c3b5df677ffb36d9..9e46bba70e6ff1d2360a66292427f312b4b5f5c8 100644 (file)
@@ -218,7 +218,7 @@ Pitch::down_to (int notename)
   notename_ = notename;
 }
 
-const char Pitch::type_p_name_[] = "ly:pitch?";
+const char * const Pitch::type_p_name_ = "ly:pitch?";
 
 SCM
 Pitch::mark_smob () const
index 30d734346e53df7565c419817a9637ad1524afc0..1ec4da9aebdd26c07c31725230d8f20d650937b0 100644 (file)
@@ -38,11 +38,11 @@ public:
   TRANSLATOR_DECLARATIONS (Pitched_trill_engraver);
 
 protected:
-  DECLARE_ACKNOWLEDGER (note_head);
-  DECLARE_ACKNOWLEDGER (dots);
-  DECLARE_ACKNOWLEDGER (stem);
-  DECLARE_ACKNOWLEDGER (flag);
-  DECLARE_ACKNOWLEDGER (trill_spanner);
+  void acknowledge_note_head (Grob_info);
+  void acknowledge_dots (Grob_info);
+  void acknowledge_stem (Grob_info);
+  void acknowledge_flag (Grob_info);
+  void acknowledge_trill_spanner (Grob_info);
   void stop_translation_timestep ();
 
 private:
@@ -169,11 +169,16 @@ Pitched_trill_engraver::stop_translation_timestep ()
   trill_accidental_ = 0;
 }
 
-ADD_ACKNOWLEDGER (Pitched_trill_engraver, note_head);
-ADD_ACKNOWLEDGER (Pitched_trill_engraver, dots);
-ADD_ACKNOWLEDGER (Pitched_trill_engraver, stem);
-ADD_ACKNOWLEDGER (Pitched_trill_engraver, flag);
-ADD_ACKNOWLEDGER (Pitched_trill_engraver, trill_spanner);
+
+void
+Pitched_trill_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Pitched_trill_engraver, note_head);
+  ADD_ACKNOWLEDGER (Pitched_trill_engraver, dots);
+  ADD_ACKNOWLEDGER (Pitched_trill_engraver, stem);
+  ADD_ACKNOWLEDGER (Pitched_trill_engraver, flag);
+  ADD_ACKNOWLEDGER (Pitched_trill_engraver, trill_spanner);
+}
 
 ADD_TRANSLATOR (Pitched_trill_engraver,
                 /* doc */
index 938f10686164e33d98460e5d1d2bc682b341e90e..d05a33e4f3aa60387ad40a612deaf01a6d952a54 100644 (file)
@@ -24,7 +24,7 @@
 #include "profile.hh"
 
 
-const char Prob::type_p_name_[] = "ly:prob?";
+const char * const Prob::type_p_name_ = "ly:prob?";
 
 SCM
 Prob::equal_p (SCM sa, SCM sb)
index 225c64dc60fc220bf03910f25575a539a3ecbdfd..75091e19015ce3d78e87dd208be3fae1cf2b9f73 100644 (file)
@@ -37,18 +37,20 @@ Protected_scm::Protected_scm (SCM s)
   assert (SCM_IMP (s));
 }
 
-// For static objects, this will be called at program exit.  With the
-// state of the memory system unknown, we refrain from any cleanup
-// actions outside of the object memory itself.
+SCM Protected_scm::list_ = SCM_EOL;
+SCM Protected_scm::last_ = SCM_EOL;
 
-Protected_scm::~Protected_scm ()
+void
+Protected_scm::protectify (SCM s)
 {
-  object_ = SCM_UNDEFINED;
+  s = scm_list_1 (s);
+  if (SCM_CONSP (last_))
+    SCM_SETCDR (last_, s);
+  else
+    list_ = scm_permanent_object (s);
+  last_ = object_ = s;
 }
 
-SCM Protected_scm::list_ = SCM_EOL;
-SCM Protected_scm::last_ = SCM_EOL;
-
 Protected_scm &
 Protected_scm::operator = (SCM s)
 {
@@ -57,14 +59,7 @@ Protected_scm::operator = (SCM s)
   else if (SCM_IMP (s))
     object_ = s;
   else
-    {
-      s = scm_list_1 (s);
-      if (SCM_CONSP (last_))
-        SCM_SETCDR (last_, s);
-      else
-        list_ = scm_permanent_object (s);
-      last_ = object_ = s;
-    }
+    protectify (s);
 
   return *this;
 }
@@ -75,7 +70,17 @@ Protected_scm::operator = (Protected_scm const &s)
   return *this = (SCM) s;
 }
 
-Protected_scm::operator SCM () const
+Protected_scm::operator SCM const & () const
 {
-  return SCM_CONSP (object_) ? SCM_CAR (object_) : object_;
+  return SCM_CONSP (object_) ? *SCM_CARLOC (object_) : object_;
+}
+
+Protected_scm::operator SCM & ()
+{
+  // The reference may be used to overwrite an immediate value with a
+  // non-immediate one, so we _have_ to create full protection.
+  if (!SCM_CONSP (object_))
+    protectify (object_);
+
+  return *SCM_CARLOC (object_);
 }
index e147f53ccadb3a5da4663b83cf59616d518911f4..3bd0fa1091482d4e12a9f32707492c0630e9823b 100644 (file)
@@ -36,8 +36,8 @@ class Pure_from_neighbor_engraver : public Engraver
 public:
   TRANSLATOR_DECLARATIONS (Pure_from_neighbor_engraver);
 protected:
-  DECLARE_ACKNOWLEDGER (pure_from_neighbor);
-  DECLARE_ACKNOWLEDGER (item);
+  void acknowledge_pure_from_neighbor (Grob_info);
+  void acknowledge_item (Grob_info);
   void finalize ();
 };
 
@@ -136,8 +136,13 @@ Pure_from_neighbor_engraver::finalize ()
   pure_relevants_.clear ();
 }
 
-ADD_ACKNOWLEDGER (Pure_from_neighbor_engraver, item);
-ADD_ACKNOWLEDGER (Pure_from_neighbor_engraver, pure_from_neighbor);
+void
+Pure_from_neighbor_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Pure_from_neighbor_engraver, item);
+  ADD_ACKNOWLEDGER (Pure_from_neighbor_engraver, pure_from_neighbor);
+}
+
 ADD_TRANSLATOR (Pure_from_neighbor_engraver,
                 /* doc */
                 "Coordinates items that get their pure heights from their neighbors.",
index 67477b1f01df6cd589a7d24559132d1e12f64466..d11b633fd5cb4b92ffb32af56f83c340056892bd 100644 (file)
@@ -135,6 +135,12 @@ Repeat_acknowledge_engraver::process_music ()
     }
 }
 
+void
+Repeat_acknowledge_engraver::boot ()
+{
+
+}
+
 ADD_TRANSLATOR (Repeat_acknowledge_engraver,
                 /* doc */
                 "Acknowledge repeated music, and convert the contents of"
index 4eea8e5800ae271fe103da8241a225a1790386c0..fb2c8bb58465ca0c80ebc3d6f0de9cfa13652dcf 100644 (file)
@@ -32,8 +32,8 @@ class Repeat_tie_engraver : public Engraver
   vector<Grob *> semi_ties_;
 
   void stop_translation_timestep ();
-  DECLARE_ACKNOWLEDGER (note_head);
-  DECLARE_TRANSLATOR_LISTENER (repeat_tie);
+  void acknowledge_note_head (Grob_info);
+  void listen_repeat_tie (Stream_event *);
 
 public:
   TRANSLATOR_DECLARATIONS (Repeat_tie_engraver);
@@ -53,7 +53,6 @@ Repeat_tie_engraver::stop_translation_timestep ()
   semi_ties_.clear ();
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Repeat_tie_engraver, repeat_tie);
 void
 Repeat_tie_engraver::listen_repeat_tie (Stream_event *ev)
 {
@@ -88,7 +87,13 @@ Repeat_tie_engraver::acknowledge_note_head (Grob_info inf)
 
 }
 
-ADD_ACKNOWLEDGER (Repeat_tie_engraver, note_head);
+void
+Repeat_tie_engraver::boot ()
+{
+  ADD_LISTENER (Repeat_tie_engraver, repeat_tie);
+  ADD_ACKNOWLEDGER (Repeat_tie_engraver, note_head);
+}
+
 ADD_TRANSLATOR (Repeat_tie_engraver,
                 /* doc */
                 "Create repeat ties.",
index a70641cfd05e522d3f67e7bc3c8addb4d06d18bb..56a6783fbfa34d338eac0366b6ecf5e9a90d864d 100644 (file)
@@ -94,6 +94,12 @@ Rest_collision_engraver::stop_translation_timestep ()
   rest_collision_ = 0;
 }
 
+void
+Rest_collision_engraver::boot ()
+{
+
+}
+
 ADD_TRANSLATOR (Rest_collision_engraver,
                 /* doc */
                 "Handle collisions of rests.",
index b40aeee8a3738e0b43c7080d60e2f715d932b662..d691c2e98c7f9e2001706845c9ca3cf15b590df1 100644 (file)
@@ -37,7 +37,7 @@ class Rest_engraver : public Engraver
 protected:
   void start_translation_timestep ();
   void process_music ();
-  DECLARE_TRANSLATOR_LISTENER (rest);
+  void listen_rest (Stream_event *);
 public:
   TRANSLATOR_DECLARATIONS (Rest_engraver);
 };
@@ -80,13 +80,18 @@ Rest_engraver::process_music ()
     }
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Rest_engraver, rest);
 void
 Rest_engraver::listen_rest (Stream_event *ev)
 {
   ASSIGN_EVENT_ONCE (rest_event_, ev);
 }
 
+void
+Rest_engraver::boot ()
+{
+  ADD_LISTENER (Rest_engraver, rest);
+}
+
 ADD_TRANSLATOR (Rest_engraver,
                 /* doc */
                 "Engrave rests.",
index 28a06f79b0672dfa88e341c65fad3682448b8ce9..04281231d52825410a3606900a52f36147b31d5b 100644 (file)
@@ -61,9 +61,9 @@ class Rhythmic_column_engraver : public Engraver
   TRANSLATOR_DECLARATIONS (Rhythmic_column_engraver);
 protected:
 
-  DECLARE_ACKNOWLEDGER (stem);
-  DECLARE_ACKNOWLEDGER (flag);
-  DECLARE_ACKNOWLEDGER (rhythmic_head);
+  void acknowledge_stem (Grob_info);
+  void acknowledge_flag (Grob_info);
+  void acknowledge_rhythmic_head (Grob_info);
   void process_acknowledged ();
   void stop_translation_timestep ();
 };
@@ -134,9 +134,14 @@ Rhythmic_column_engraver::stop_translation_timestep ()
   flag_ = 0;
 }
 
-ADD_ACKNOWLEDGER (Rhythmic_column_engraver, stem);
-ADD_ACKNOWLEDGER (Rhythmic_column_engraver, flag);
-ADD_ACKNOWLEDGER (Rhythmic_column_engraver, rhythmic_head);
+
+void
+Rhythmic_column_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Rhythmic_column_engraver, stem);
+  ADD_ACKNOWLEDGER (Rhythmic_column_engraver, flag);
+  ADD_ACKNOWLEDGER (Rhythmic_column_engraver, rhythmic_head);
+}
 
 ADD_TRANSLATOR (Rhythmic_column_engraver,
                 /* doc */
index d6f566b9ed57517d28ae1ef2859d25438deff275..02c1dc5f8e2daca09b480ac977049c66e70d68e3 100644 (file)
@@ -90,8 +90,6 @@ LY_DEFINE (ly_set_default_scale, "ly:set-default-scale",
   return SCM_UNSPECIFIED;
 }
 
-const char * const Scale::type_p_name_ = 0;
-
 int
 Scale::step_count () const
 {
index fc51d439c0e90eed08dbaf4b89c06d1c2f04ca16..c322a6d25515239cea12fd1545a596145612f113 100644 (file)
@@ -32,8 +32,7 @@ Scheme_engraver::Scheme_engraver (SCM definition)
   initialize_function_ = SCM_EOL;
   finalize_function_ = SCM_EOL;
 
-  interface_acknowledger_hash_ = SCM_EOL;
-  interface_end_acknowledger_hash_ = SCM_EOL;
+  interface_acknowledger_hash_.set (SCM_EOL, SCM_EOL);
 
   must_be_last_ = false;
   per_instance_listeners_ = SCM_EOL;
@@ -111,8 +110,7 @@ Scheme_engraver::init_from_scheme (SCM definition)
                                       definition, SCM_EOL));
 
   per_instance_listeners_ = listeners;
-  interface_acknowledger_hash_ = hash1;
-  interface_end_acknowledger_hash_ = hash2;
+  interface_acknowledger_hash_.set (hash1, hash2);
 
   // It's not defined whether Scheme_engraver::derived_mark is already
   // active while the construction is underway, so we make sure we
@@ -172,6 +170,6 @@ Scheme_engraver::derived_mark () const
   scm_gc_mark (initialize_function_);
   scm_gc_mark (finalize_function_);
   scm_gc_mark (per_instance_listeners_);
-  scm_gc_mark (interface_acknowledger_hash_);
-  scm_gc_mark (interface_end_acknowledger_hash_);
+  scm_gc_mark (interface_acknowledger_hash_[START]);
+  scm_gc_mark (interface_acknowledger_hash_[STOP]);
 }
index 97af8f6cd5f97ab742aafc029d7a87785d4fd18b..0b1e0b4e2532a7cc481ba4a794270aa3caa44799 100644 (file)
@@ -21,8 +21,6 @@
 
 #include <cassert>
 
-const char * const Scheme_hash_table::type_p_name_ = 0;
-
 SCM
 Scheme_hash_table::make_smob ()
 {
index da48e8f1031c3a5230f2c073b9bd2b0ff4166442..d10023dd8506b5103bed7a09ef673a074cff8574 100644 (file)
@@ -59,7 +59,7 @@ Score::~Score ()
 {
 }
 
-const char Score::type_p_name_[] = "ly:score?";
+const char * const Score::type_p_name_ = "ly:score?";
 
 SCM
 Score::mark_smob () const
index dc34098664d19f6d8ae59ea7d460813d508775de..6310f3b5403e5b56a98d984f3b3e735bb0c42cc4 100644 (file)
@@ -35,7 +35,7 @@ class Script_column_engraver : public Engraver
 public:
   TRANSLATOR_DECLARATIONS (Script_column_engraver);
 protected:
-  DECLARE_ACKNOWLEDGER (side_position);
+  void acknowledge_side_position (Grob_info);
   void process_acknowledged ();
   void stop_translation_timestep ();
 };
@@ -77,7 +77,12 @@ Script_column_engraver::process_acknowledged ()
     script_column_ = make_item ("ScriptColumn", SCM_EOL);
 }
 
-ADD_ACKNOWLEDGER (Script_column_engraver, side_position);
+void
+Script_column_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Script_column_engraver, side_position);
+}
+
 ADD_TRANSLATOR (Script_column_engraver,
                 /* doc */
                 "Find potentially colliding scripts and put them into a"
index 62c3de482cd359256d824135fd0420d29455bd91..8a7b122f1fb0c0be00bab174937f95d627f0206a 100644 (file)
@@ -54,14 +54,14 @@ protected:
   void stop_translation_timestep ();
   void process_music ();
 
-  DECLARE_TRANSLATOR_LISTENER (articulation);
-  DECLARE_ACKNOWLEDGER (rhythmic_head);
-  DECLARE_ACKNOWLEDGER (stem);
-  DECLARE_ACKNOWLEDGER (stem_tremolo);
-  DECLARE_ACKNOWLEDGER (tie);
-  DECLARE_END_ACKNOWLEDGER (tie);
-  DECLARE_ACKNOWLEDGER (note_column);
-  DECLARE_ACKNOWLEDGER (inline_accidental);
+  void listen_articulation (Stream_event *);
+  void acknowledge_rhythmic_head (Grob_info);
+  void acknowledge_stem (Grob_info);
+  void acknowledge_stem_tremolo (Grob_info);
+  void acknowledge_tie (Grob_info);
+  void acknowledge_end_tie (Grob_info);
+  void acknowledge_note_column (Grob_info);
+  void acknowledge_inline_accidental (Grob_info);
 
 public:
   TRANSLATOR_DECLARATIONS (Script_engraver);
@@ -71,7 +71,6 @@ Script_engraver::Script_engraver ()
 {
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Script_engraver, articulation);
 void
 Script_engraver::listen_articulation (Stream_event *ev)
 {
@@ -275,13 +274,19 @@ Script_engraver::stop_translation_timestep ()
   scripts_.clear ();
 }
 
-ADD_ACKNOWLEDGER (Script_engraver, rhythmic_head);
-ADD_ACKNOWLEDGER (Script_engraver, stem);
-ADD_ACKNOWLEDGER (Script_engraver, tie);
-ADD_END_ACKNOWLEDGER (Script_engraver, tie);
-ADD_ACKNOWLEDGER (Script_engraver, note_column);
-ADD_ACKNOWLEDGER (Script_engraver, stem_tremolo);
-ADD_ACKNOWLEDGER (Script_engraver, inline_accidental);
+
+void
+Script_engraver::boot ()
+{
+  ADD_LISTENER (Script_engraver, articulation);
+  ADD_ACKNOWLEDGER (Script_engraver, rhythmic_head);
+  ADD_ACKNOWLEDGER (Script_engraver, stem);
+  ADD_ACKNOWLEDGER (Script_engraver, tie);
+  ADD_END_ACKNOWLEDGER (Script_engraver, tie);
+  ADD_ACKNOWLEDGER (Script_engraver, note_column);
+  ADD_ACKNOWLEDGER (Script_engraver, stem_tremolo);
+  ADD_ACKNOWLEDGER (Script_engraver, inline_accidental);
+}
 
 ADD_TRANSLATOR (Script_engraver,
                 /* doc */
index 35b5038020f34431faa1819ff09b36611868ce16..20af8d1cbb20326dd041db1461b2facaf4dc89ce 100644 (file)
@@ -39,8 +39,8 @@ class Script_row_engraver : public Engraver
 public:
   TRANSLATOR_DECLARATIONS (Script_row_engraver);
 protected:
-  DECLARE_ACKNOWLEDGER (accidental_placement);
-  DECLARE_ACKNOWLEDGER (side_position);
+  void acknowledge_accidental_placement (Grob_info);
+  void acknowledge_side_position (Grob_info);
   void process_acknowledged ();
   void stop_translation_timestep ();
 };
@@ -89,8 +89,13 @@ Script_row_engraver::process_acknowledged ()
     script_row_ = make_item ("ScriptRow", SCM_EOL);
 }
 
-ADD_ACKNOWLEDGER (Script_row_engraver, accidental_placement);
-ADD_ACKNOWLEDGER (Script_row_engraver, side_position);
+void
+Script_row_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Script_row_engraver, accidental_placement);
+  ADD_ACKNOWLEDGER (Script_row_engraver, side_position);
+}
+
 ADD_TRANSLATOR (Script_row_engraver,
                 /* doc */
                 "Determine order in horizontal side position elements.",
index 08069afda8858634692b5d73ea8d99d92e025371..5eb1407a31787a4babd78271edffd528570f9dc4 100644 (file)
@@ -59,8 +59,8 @@ protected:
   Spacings current_spacings_;
   Spacings last_spacings_;
 
-  DECLARE_ACKNOWLEDGER (item);
-  DECLARE_ACKNOWLEDGER (break_aligned);
+  void acknowledge_item (Grob_info);
+  void acknowledge_break_aligned (Grob_info);
   void stop_translation_timestep ();
   void start_translation_timestep ();
 
@@ -153,8 +153,13 @@ Separating_line_group_engraver::stop_translation_timestep ()
   break_aligned_.clear ();
 }
 
-ADD_ACKNOWLEDGER (Separating_line_group_engraver, item);
-ADD_ACKNOWLEDGER (Separating_line_group_engraver, break_aligned);
+
+void
+Separating_line_group_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Separating_line_group_engraver, item);
+  ADD_ACKNOWLEDGER (Separating_line_group_engraver, break_aligned);
+}
 
 ADD_TRANSLATOR (Separating_line_group_engraver,
                 /* doc */
index b3c2b96df4ad9d4e34eb4641a8eef63a91a58db8..bab43494a6c68564cbae3886b64a543749a72c5f 100644 (file)
@@ -120,7 +120,7 @@ Skyline_pair::operator [] (Direction d) const
   return skylines_[d];
 }
 
-const char Skyline_pair::type_p_name_[] = "ly:skyline-pair?";
+const char * const Skyline_pair::type_p_name_ = "ly:skyline-pair?";
 
 
 MAKE_SCHEME_CALLBACK (Skyline_pair, skyline, 2);
index f46b2f3e84c401437e6136fbb7808b63a51c398d..6ef2069c39b50b0acb7273c06928c3e509cf4729 100644 (file)
@@ -802,7 +802,7 @@ Skyline::clear ()
 
 /****************************************************************/
 
-const char Skyline::type_p_name_[] = "ly:skyline?";
+const char * const Skyline::type_p_name_ = "ly:skyline?";
 
 MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Skyline, get_touching_point, 3, 1, "")
 SCM
index f9f0bfb76a0adbe3ea3b926da899b895b31d8500..b1bdf9c0dac4746b26634d7bb4da9690073a98f9 100644 (file)
@@ -35,7 +35,7 @@ public:
 protected:
   Stream_event *slash_;
 protected:
-  DECLARE_TRANSLATOR_LISTENER (repeat_slash);
+  void listen_repeat_slash (Stream_event *);
   void process_music ();
 };
 
@@ -44,7 +44,6 @@ Slash_repeat_engraver::Slash_repeat_engraver ()
   slash_ = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Slash_repeat_engraver, repeat_slash);
 void
 Slash_repeat_engraver::listen_repeat_slash (Stream_event *ev)
 {
@@ -65,6 +64,12 @@ Slash_repeat_engraver::process_music ()
     }
 }
 
+void
+Slash_repeat_engraver::boot ()
+{
+  ADD_LISTENER (Slash_repeat_engraver, repeat_slash);
+}
+
 ADD_TRANSLATOR (Slash_repeat_engraver,
                 /* doc */
                 "Make beat repeats.",
index 31621844a9c568ce840bc0dcc3fe35edfd18720b..2ea4595fc1b0b2544219aac915c1e4e647ed0a58 100644 (file)
@@ -35,10 +35,6 @@ class Slur_engraver : public Slur_proto_engraver
 {
   virtual void set_melisma (bool);
 
-protected:
-  DECLARE_TRANSLATOR_LISTENER (slur);
-  DECLARE_TRANSLATOR_LISTENER (note);
-
 public:
   SCM event_symbol ();
   TRANSLATOR_DECLARATIONS (Slur_engraver);
@@ -57,34 +53,27 @@ Slur_engraver::event_symbol ()
   return ly_symbol2scm ("slur-event");
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Slur_engraver, slur);
-void
-Slur_engraver::listen_slur (Stream_event *ev)
-{
-  Slur_proto_engraver::listen_slur (ev);
-}
-
-IMPLEMENT_TRANSLATOR_LISTENER (Slur_engraver, note);
 void
-Slur_engraver::listen_note (Stream_event *ev)
+Slur_engraver::set_melisma (bool m)
 {
-  Slur_proto_engraver::listen_note (ev);
+  context ()->set_property ("slurMelismaBusy", ly_bool2scm (m));
 }
 
 void
-Slur_engraver::set_melisma (bool m)
+Slur_engraver::boot ()
 {
-  context ()->set_property ("slurMelismaBusy", ly_bool2scm (m));
+  ADD_LISTENER (Slur_proto_engraver, slur);
+  ADD_LISTENER (Slur_proto_engraver, note);
+  ADD_ACKNOWLEDGER (Slur_proto_engraver, inline_accidental);
+  ADD_ACKNOWLEDGER (Slur_proto_engraver, fingering);
+  ADD_ACKNOWLEDGER (Slur_proto_engraver, note_column);
+  ADD_ACKNOWLEDGER (Slur_proto_engraver, script);
+  ADD_ACKNOWLEDGER (Slur_proto_engraver, text_script);
+  ADD_ACKNOWLEDGER (Slur_proto_engraver, dots);
+  ADD_END_ACKNOWLEDGER (Slur_proto_engraver, tie);
+  ADD_ACKNOWLEDGER (Slur_proto_engraver, tuplet_number);
 }
 
-ADD_ACKNOWLEDGER (Slur_engraver, inline_accidental);
-ADD_ACKNOWLEDGER (Slur_engraver, fingering);
-ADD_ACKNOWLEDGER (Slur_engraver, note_column);
-ADD_ACKNOWLEDGER (Slur_engraver, script);
-ADD_ACKNOWLEDGER (Slur_engraver, text_script);
-ADD_ACKNOWLEDGER (Slur_engraver, dots);
-ADD_END_ACKNOWLEDGER (Slur_engraver, tie);
-ADD_ACKNOWLEDGER (Slur_engraver, tuplet_number);
 ADD_TRANSLATOR (Slur_engraver,
                 /* doc */
                 "Build slur grobs from slur events.",
index 222a9d75faa7eb487802e17cef96c96ac36ce466..47fed784fe6c64335b1b926f033a372599405cbf 100644 (file)
@@ -40,7 +40,7 @@ protected:
   void process_music ();
   void set_melisma (bool);
 
-  DECLARE_TRANSLATOR_LISTENER (slur);
+  void listen_slur (Stream_event *);
 private:
   Stream_event *start_ev_;
   Stream_event *now_stop_ev_;
@@ -83,7 +83,6 @@ Slur_performer::start_translation_timestep ()
   now_stop_ev_ = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Slur_performer, slur);
 void
 Slur_performer::listen_slur (Stream_event *ev)
 {
@@ -95,6 +94,12 @@ Slur_performer::listen_slur (Stream_event *ev)
     now_stop_ev_ = ev;
 }
 
+void
+Slur_performer::boot ()
+{
+  ADD_LISTENER (Slur_performer, slur);
+}
+
 ADD_TRANSLATOR (Slur_performer,
                 /* doc */
                 "",
index 5a94927a7ffb549977f5b284f5fda18f3bdf91a6..14fdf2beb3b6ef4c10ff835c60deeca2a5811157 100644 (file)
@@ -362,7 +362,7 @@ Source_file::get_port () const
 /****************************************************************/
 
 
-const char Source_file::type_p_name_[] = "ly:source-file?";
+const char * const Source_file::type_p_name_ = "ly:source-file?";
 
 SCM
 Source_file::mark_smob () const
index cc5b1e31d1c2f6c92365933702744c385bfcf0c0..d77a55b757af67725ac237d49eeffdcb129fb793 100644 (file)
@@ -76,11 +76,11 @@ class Spacing_engraver : public Engraver
   TRANSLATOR_DECLARATIONS (Spacing_engraver);
 
 protected:
-  DECLARE_ACKNOWLEDGER (staff_spacing);
-  DECLARE_ACKNOWLEDGER (note_spacing);
-  DECLARE_ACKNOWLEDGER (rhythmic_head);
-  DECLARE_ACKNOWLEDGER (rhythmic_grob);
-  DECLARE_TRANSLATOR_LISTENER (spacing_section);
+  void acknowledge_staff_spacing (Grob_info);
+  void acknowledge_note_spacing (Grob_info);
+  void acknowledge_rhythmic_head (Grob_info);
+  void acknowledge_rhythmic_grob (Grob_info);
+  void listen_spacing_section (Stream_event *);
 
   void start_translation_timestep ();
   void stop_translation_timestep ();
@@ -99,7 +99,6 @@ Spacing_engraver::Spacing_engraver ()
   start_section_ = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Spacing_engraver, spacing_section);
 void
 Spacing_engraver::listen_spacing_section (Stream_event *ev)
 {
@@ -261,10 +260,16 @@ Spacing_engraver::start_translation_timestep ()
     stopped_durations_.push_back (playing_durations_.get ());
 }
 
-ADD_ACKNOWLEDGER (Spacing_engraver, staff_spacing);
-ADD_ACKNOWLEDGER (Spacing_engraver, note_spacing);
-ADD_ACKNOWLEDGER (Spacing_engraver, rhythmic_head);
-ADD_ACKNOWLEDGER (Spacing_engraver, rhythmic_grob);
+
+void
+Spacing_engraver::boot ()
+{
+  ADD_LISTENER (Spacing_engraver, spacing_section);
+  ADD_ACKNOWLEDGER (Spacing_engraver, staff_spacing);
+  ADD_ACKNOWLEDGER (Spacing_engraver, note_spacing);
+  ADD_ACKNOWLEDGER (Spacing_engraver, rhythmic_head);
+  ADD_ACKNOWLEDGER (Spacing_engraver, rhythmic_grob);
+}
 
 ADD_TRANSLATOR (Spacing_engraver,
                 /* doc */
index f66c8770b52333c9bbc23c19d9d3c01bbeb510a8..9cece4a6fe336bd26d050168fa974f4c8db67737 100644 (file)
@@ -37,8 +37,8 @@ class Span_arpeggio_engraver : public Engraver
 {
 public:
   TRANSLATOR_DECLARATIONS (Span_arpeggio_engraver);
-  DECLARE_ACKNOWLEDGER (arpeggio);
-  DECLARE_ACKNOWLEDGER (note_column);
+  void acknowledge_arpeggio (Grob_info);
+  void acknowledge_note_column (Grob_info);
 
 protected:
   void process_acknowledged ();
@@ -125,8 +125,13 @@ Span_arpeggio_engraver::stop_translation_timestep ()
   note_columns_.clear ();
 }
 
-ADD_ACKNOWLEDGER (Span_arpeggio_engraver, arpeggio);
-ADD_ACKNOWLEDGER (Span_arpeggio_engraver, note_column);
+void
+Span_arpeggio_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Span_arpeggio_engraver, arpeggio);
+  ADD_ACKNOWLEDGER (Span_arpeggio_engraver, note_column);
+}
+
 ADD_TRANSLATOR (Span_arpeggio_engraver,
                 /* doc */
                 "Make arpeggios that span multiple staves.",
index 63c245e70cbcb32f4620b4e8ecd4fd9a9ae4b8c7..e74528535bfa0f2dd48dd8b0834e38bace2fd6b1 100644 (file)
@@ -41,7 +41,7 @@ class Span_bar_engraver : public Engraver
 public:
   TRANSLATOR_DECLARATIONS (Span_bar_engraver);
 protected:
-  DECLARE_ACKNOWLEDGER (bar_line);
+  void acknowledge_bar_line (Grob_info);
   void stop_translation_timestep ();
   void process_acknowledged ();
 };
@@ -94,7 +94,12 @@ Span_bar_engraver::stop_translation_timestep ()
   bars_.resize (0);
 }
 
-ADD_ACKNOWLEDGER (Span_bar_engraver, bar_line);
+void
+Span_bar_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Span_bar_engraver, bar_line);
+}
+
 ADD_TRANSLATOR (Span_bar_engraver,
                 /* doc */
                 "Make cross-staff bar lines: It catches all normal bar lines"
index 304564398f0841c7832aa8d5412f6b8e04a30459..a0c10f8594ae1165cbe74fcdd3b077ad94c0cd86 100644 (file)
@@ -55,8 +55,8 @@ class Span_bar_stub_engraver : public Engraver
 public:
   TRANSLATOR_DECLARATIONS (Span_bar_stub_engraver);
 protected:
-  DECLARE_ACKNOWLEDGER (span_bar);
-  DECLARE_ACKNOWLEDGER (hara_kiri_group_spanner);
+  void acknowledge_span_bar (Grob_info);
+  void acknowledge_hara_kiri_group_spanner (Grob_info);
   void process_acknowledged ();
   void stop_translation_timestep ();
   virtual void derived_mark () const;
@@ -175,8 +175,13 @@ Span_bar_stub_engraver::stop_translation_timestep ()
   axis_groups_ = axis_groups;
 }
 
-ADD_ACKNOWLEDGER (Span_bar_stub_engraver, span_bar);
-ADD_ACKNOWLEDGER (Span_bar_stub_engraver, hara_kiri_group_spanner);
+void
+Span_bar_stub_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Span_bar_stub_engraver, span_bar);
+  ADD_ACKNOWLEDGER (Span_bar_stub_engraver, hara_kiri_group_spanner);
+}
+
 ADD_TRANSLATOR (Span_bar_stub_engraver,
                 /* doc */
                 "Make stubs for span bars in all contexts that the span bars cross.",
index 4a47aade98c241b060165500b24d66340bfd9123..8d64b40ce8134672fcc1e53dfa28daedbfcfab4a 100644 (file)
@@ -31,8 +31,8 @@ class Spanner_break_forbid_engraver : public Engraver
   TRANSLATOR_DECLARATIONS (Spanner_break_forbid_engraver);
   vector<Spanner *> running_spanners_;
 protected:
-  DECLARE_ACKNOWLEDGER (unbreakable_spanner);
-  DECLARE_END_ACKNOWLEDGER (unbreakable_spanner);
+  void acknowledge_unbreakable_spanner (Grob_info);
+  void acknowledge_end_unbreakable_spanner (Grob_info);
 
   void process_music ();
 };
@@ -66,8 +66,13 @@ Spanner_break_forbid_engraver::Spanner_break_forbid_engraver ()
 {
 }
 
-ADD_END_ACKNOWLEDGER (Spanner_break_forbid_engraver, unbreakable_spanner);
-ADD_ACKNOWLEDGER (Spanner_break_forbid_engraver, unbreakable_spanner);
+void
+Spanner_break_forbid_engraver::boot ()
+{
+  ADD_END_ACKNOWLEDGER (Spanner_break_forbid_engraver, unbreakable_spanner);
+  ADD_ACKNOWLEDGER (Spanner_break_forbid_engraver, unbreakable_spanner);
+}
+
 ADD_TRANSLATOR (Spanner_break_forbid_engraver,
                 /* doc */
                 "Forbid breaks in certain spanners.",
index 77b01bb158d56152e6c8dd027a788ba7788c7636..a389df2efdb5921a60b56814a7a2c2f210bb495f 100644 (file)
@@ -66,4 +66,4 @@ LY_DEFINE (ly_spring_set_inverse_stretch_strength_x, "ly:spring-set-inverse-stre
   return s->smobbed_copy ();
 }
 
-const char Spring::type_p_name_[] = "ly:spring?";
+const char * const Spring::type_p_name_ = "ly:spring?";
index 2ff2b79cafcb68b1f9c4a6cf19bb7aab9792bd9f..88680943d3d0937139645d0a6a8cf075f1e24bce 100644 (file)
@@ -26,8 +26,8 @@ class Staff_collecting_engraver : public Engraver
 {
 public:
   TRANSLATOR_DECLARATIONS (Staff_collecting_engraver);
-  DECLARE_ACKNOWLEDGER (staff_symbol);
-  DECLARE_END_ACKNOWLEDGER (staff_symbol);
+  void acknowledge_staff_symbol (Grob_info);
+  void acknowledge_end_staff_symbol (Grob_info);
 };
 
 Staff_collecting_engraver::Staff_collecting_engraver ()
@@ -54,8 +54,13 @@ Staff_collecting_engraver::acknowledge_end_staff_symbol (Grob_info gi)
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Staff_collecting_engraver, staff_symbol);
-ADD_END_ACKNOWLEDGER (Staff_collecting_engraver, staff_symbol);
+
+void
+Staff_collecting_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Staff_collecting_engraver, staff_symbol);
+  ADD_END_ACKNOWLEDGER (Staff_collecting_engraver, staff_symbol);
+}
 
 ADD_TRANSLATOR (Staff_collecting_engraver,
                 /* doc */
index 26781f0dcd5b53529d6f1ba986b011cdfc73a09a..3a05cbd0e25213673aa5577c55c7eb7d3fe5feaf 100644 (file)
@@ -79,6 +79,12 @@ map<string, int> Staff_performer::static_channel_map_;
 int Staff_performer::channel_count_ = 0;
 int Staff_performer::staff_performer_count_ = 0;
 
+void
+Staff_performer::boot ()
+{
+
+}
+
 ADD_TRANSLATOR (Staff_performer,
                 /* doc */
                 "",
index cad91e76c3e958d318ff50305432b536549a41dc..c8f528f0f541c6d6536bbff52e6a0474e2d4966b 100644 (file)
@@ -42,8 +42,8 @@ protected:
 
   void stop_translation_timestep ();
   virtual ~Staff_symbol_engraver ();
-  DECLARE_ACKNOWLEDGER (grob);
-  DECLARE_TRANSLATOR_LISTENER (staff_span);
+  void acknowledge_grob (Grob_info);
+  void listen_staff_span (Stream_event *);
   virtual void finalize ();
   void process_music ();
   virtual void derived_mark () const;
@@ -76,7 +76,6 @@ Staff_symbol_engraver::Staff_symbol_engraver ()
   span_events_.set (0, 0);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Staff_symbol_engraver, staff_span);
 void
 Staff_symbol_engraver::listen_staff_span (Stream_event *ev)
 {
@@ -163,7 +162,13 @@ Staff_symbol_engraver::acknowledge_grob (Grob_info s)
     }
 }
 
-ADD_ACKNOWLEDGER (Staff_symbol_engraver, grob);
+
+void
+Staff_symbol_engraver::boot ()
+{
+  ADD_LISTENER (Staff_symbol_engraver, staff_span);
+  ADD_ACKNOWLEDGER (Staff_symbol_engraver, grob);
+}
 
 ADD_TRANSLATOR (Staff_symbol_engraver,
                 /* doc */
index c32653abe07adaa01f471255c0c2e7b2dcaa18ca..39eae99831fb5c5c4f1ae353691523cd9e7aadd5 100644 (file)
@@ -35,8 +35,8 @@ protected:
   vector<Grob *> lyrics_;
   vector<Grob *> stanza_numbers_;
 
-  DECLARE_ACKNOWLEDGER (lyric_syllable);
-  DECLARE_ACKNOWLEDGER (stanza_number);
+  void acknowledge_lyric_syllable (Grob_info);
+  void acknowledge_stanza_number (Grob_info);
   void stop_translation_timestep ();
 };
 
@@ -69,8 +69,13 @@ Stanza_number_align_engraver::stop_translation_timestep ()
   lyrics_.clear ();
 }
 
-ADD_ACKNOWLEDGER (Stanza_number_align_engraver, lyric_syllable);
-ADD_ACKNOWLEDGER (Stanza_number_align_engraver, stanza_number);
+
+void
+Stanza_number_align_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Stanza_number_align_engraver, lyric_syllable);
+  ADD_ACKNOWLEDGER (Stanza_number_align_engraver, stanza_number);
+}
 
 ADD_TRANSLATOR (Stanza_number_align_engraver,
                 /* doc */
index 892bae633c35b4845abe4a439a0dad83fc9dbdfe..0a4539e8f1679059ee81676ca5e8d08797473152 100644 (file)
@@ -32,7 +32,7 @@ public:
   void process_music ();
   virtual void derived_mark () const;
   void stop_translation_timestep ();
-  DECLARE_ACKNOWLEDGER (lyric_syllable);
+  void acknowledge_lyric_syllable (Grob_info);
 };
 
 void
@@ -83,7 +83,12 @@ Stanza_number_engraver::stop_translation_timestep ()
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Stanza_number_engraver, lyric_syllable);
+void
+Stanza_number_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Stanza_number_engraver, lyric_syllable);
+}
+
 ADD_TRANSLATOR (Stanza_number_engraver,
                 /* doc */
                 "Engrave stanza numbers.",
index 2f2eaf82daedf380d0b53cd1505be4ff1ca9016f..8907c34bc3bcfd68b1e5375fa86d950f7d6d9eb1 100644 (file)
@@ -48,9 +48,9 @@ class Stem_engraver : public Engraver
 protected:
   void make_stem (Grob_info, bool);
 
-  DECLARE_TRANSLATOR_LISTENER (tremolo);
-  DECLARE_TRANSLATOR_LISTENER (tuplet_span);
-  DECLARE_ACKNOWLEDGER (rhythmic_head);
+  void listen_tremolo (Stream_event *);
+  void listen_tuplet_span (Stream_event *);
+  void acknowledge_rhythmic_head (Grob_info);
   void stop_translation_timestep ();
   void finalize ();
   void kill_unused_flags ();
@@ -212,7 +212,6 @@ Stem_engraver::stop_translation_timestep ()
   tremolo_ev_ = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Stem_engraver, tuplet_span);
 void
 Stem_engraver::listen_tuplet_span (Stream_event *ev)
 {
@@ -226,14 +225,20 @@ Stem_engraver::listen_tuplet_span (Stream_event *ev)
     }
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Stem_engraver, tremolo);
 void
 Stem_engraver::listen_tremolo (Stream_event *ev)
 {
   ASSIGN_EVENT_ONCE (tremolo_ev_, ev);
 }
 
-ADD_ACKNOWLEDGER (Stem_engraver, rhythmic_head);
+
+void
+Stem_engraver::boot ()
+{
+  ADD_LISTENER (Stem_engraver, tuplet_span);
+  ADD_LISTENER (Stem_engraver, tremolo);
+  ADD_ACKNOWLEDGER (Stem_engraver, rhythmic_head);
+}
 
 ADD_TRANSLATOR (Stem_engraver,
                 /* doc */
index 3da186954132a5cfc3940471e116671bac07faf0..0cf49296f0b460f444eaad29b7941b2ab99d248e 100644 (file)
@@ -44,7 +44,7 @@ Stencil::mark_smob () const
   return expr_;
 }
 
-const char Stencil::type_p_name_[] = "ly:stencil?";
+const char * const Stencil::type_p_name_ = "ly:stencil?";
 
 Interval
 Stencil::extent (Axis a) const
index 7eadbb0eec3ca70d0cfec80e8685b888f33f5273..2979e11a1918ed653e06108490ee190dab613cd3 100644 (file)
@@ -169,8 +169,8 @@ public:
 protected:
   Bracket_nesting_group *nesting_;
 
-  DECLARE_ACKNOWLEDGER (system_start_delimiter);
-  DECLARE_ACKNOWLEDGER (staff_symbol);
+  void acknowledge_system_start_delimiter (Grob_info);
+  void acknowledge_staff_symbol (Grob_info);
 
   void process_music ();
   virtual void finalize ();
@@ -229,8 +229,13 @@ System_start_delimiter_engraver::acknowledge_system_start_delimiter (Grob_info i
   nesting_->add_support (inf.grob ());
 }
 
-ADD_ACKNOWLEDGER (System_start_delimiter_engraver, staff_symbol);
-ADD_ACKNOWLEDGER (System_start_delimiter_engraver, system_start_delimiter);
+
+void
+System_start_delimiter_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (System_start_delimiter_engraver, staff_symbol);
+  ADD_ACKNOWLEDGER (System_start_delimiter_engraver, system_start_delimiter);
+}
 
 ADD_TRANSLATOR (System_start_delimiter_engraver,
                 /* doc */
index 4d47d77982a33d4ae34dff062a2862f0e11ed395..4294a2e5fe5279ff19a4df3e2031d8a77598de93 100644 (file)
@@ -49,9 +49,9 @@ public:
   TRANSLATOR_DECLARATIONS (Tab_note_heads_engraver);
 
 protected:
-  DECLARE_TRANSLATOR_LISTENER (note);
-  DECLARE_TRANSLATOR_LISTENER (string_number);
-  DECLARE_TRANSLATOR_LISTENER (fingering);
+  void listen_note (Stream_event *);
+  void listen_string_number (Stream_event *);
+  void listen_fingering (Stream_event *);
   void process_music ();
 
   void stop_translation_timestep ();
@@ -61,21 +61,18 @@ Tab_note_heads_engraver::Tab_note_heads_engraver ()
 {
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Tab_note_heads_engraver, note);
 void
 Tab_note_heads_engraver::listen_note (Stream_event *ev)
 {
   note_events_.push_back (ev);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Tab_note_heads_engraver, string_number);
 void
 Tab_note_heads_engraver::listen_string_number (Stream_event *ev)
 {
   tabstring_events_.push_back (ev);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Tab_note_heads_engraver, fingering);
 void
 Tab_note_heads_engraver::listen_fingering (Stream_event *ev)
 {
@@ -142,6 +139,14 @@ Tab_note_heads_engraver::stop_translation_timestep ()
   fingering_events_.clear ();
 }
 
+void
+Tab_note_heads_engraver::boot ()
+{
+  ADD_LISTENER (Tab_note_heads_engraver, note);
+  ADD_LISTENER (Tab_note_heads_engraver, string_number);
+  ADD_LISTENER (Tab_note_heads_engraver, fingering);
+}
+
 ADD_TRANSLATOR (Tab_note_heads_engraver,
                 /* doc */
                 "Generate one or more tablature note heads from event of type"
index be0b343de38d674cfcde27c148a29d4e95cff73f..cde9e82bbb20373d6edc10427a38ffa8f4716802 100644 (file)
@@ -25,7 +25,7 @@ class Tab_staff_symbol_engraver : public Engraver
 public:
   TRANSLATOR_DECLARATIONS (Tab_staff_symbol_engraver);
 protected:
-  DECLARE_ACKNOWLEDGER (staff_symbol);
+  void acknowledge_staff_symbol (Grob_info);
 };
 
 void
@@ -42,7 +42,12 @@ Tab_staff_symbol_engraver::Tab_staff_symbol_engraver ()
 
 #include "translator.icc"
 
-ADD_ACKNOWLEDGER (Tab_staff_symbol_engraver, staff_symbol);
+void
+Tab_staff_symbol_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Tab_staff_symbol_engraver, staff_symbol);
+}
+
 ADD_TRANSLATOR (Tab_staff_symbol_engraver,
                 /* doc */
                 "Create a tablature staff symbol, but look at"
index b26bf0f6f6a9a45f52d30e8c9927c6f0750fdcc0..58c5203ef089a41ccb413a8c3040db0fbe50690b 100644 (file)
@@ -44,9 +44,9 @@ public:
   TRANSLATOR_DECLARATIONS (Tab_tie_follow_engraver);
 
 protected:
-  DECLARE_ACKNOWLEDGER (glissando);
-  DECLARE_ACKNOWLEDGER (slur);
-  DECLARE_ACKNOWLEDGER (tab_note_head);
+  void acknowledge_glissando (Grob_info);
+  void acknowledge_slur (Grob_info);
+  void acknowledge_tab_note_head (Grob_info);
 
   void stop_translation_timestep ();
 };
@@ -110,9 +110,14 @@ Tab_tie_follow_engraver::stop_translation_timestep ()
   note_heads_.clear ();
 }
 
-ADD_ACKNOWLEDGER (Tab_tie_follow_engraver, slur);
-ADD_ACKNOWLEDGER (Tab_tie_follow_engraver, glissando);
-ADD_ACKNOWLEDGER (Tab_tie_follow_engraver, tab_note_head);
+
+void
+Tab_tie_follow_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Tab_tie_follow_engraver, slur);
+  ADD_ACKNOWLEDGER (Tab_tie_follow_engraver, glissando);
+  ADD_ACKNOWLEDGER (Tab_tie_follow_engraver, tab_note_head);
+}
 
 ADD_TRANSLATOR (Tab_tie_follow_engraver,
                 /* doc */
index b17e9202cbab8097392ec1a53cb5b440315f35ac..683f133d6466c28ae3774448777f9e397f3fe4b4 100644 (file)
@@ -85,6 +85,12 @@ Tempo_performer::stop_translation_timestep ()
     }
 }
 
+void
+Tempo_performer::boot ()
+{
+
+}
+
 ADD_TRANSLATOR (Tempo_performer,
                 /* doc */
                 "",
index 2a12e75a7aa90937235ab1577574daffe11141f6..982b61a287461559c024b87911696bdf69b1870c 100644 (file)
@@ -42,11 +42,10 @@ protected:
   void stop_translation_timestep ();
   void process_music ();
 
-  DECLARE_ACKNOWLEDGER (note_column);
-  DECLARE_TRANSLATOR_LISTENER (text_script);
+  void acknowledge_note_column (Grob_info);
+  void listen_text_script (Stream_event *);
 };
 
-IMPLEMENT_TRANSLATOR_LISTENER (Text_engraver, text_script);
 void
 Text_engraver::listen_text_script (Stream_event *ev)
 {
@@ -110,7 +109,13 @@ Text_engraver::Text_engraver ()
 {
 }
 
-ADD_ACKNOWLEDGER (Text_engraver, note_column);
+
+void
+Text_engraver::boot ()
+{
+  ADD_LISTENER (Text_engraver, text_script);
+  ADD_ACKNOWLEDGER (Text_engraver, note_column);
+}
 
 ADD_TRANSLATOR (Text_engraver,
                 /* doc */
index 249fdce04a30820016bee93d980236bee636ef00..f63e19a0593083f9fbb1d869d24ea05696d30823 100644 (file)
@@ -34,8 +34,8 @@ public:
   TRANSLATOR_DECLARATIONS (Text_spanner_engraver);
 protected:
   virtual void finalize ();
-  DECLARE_TRANSLATOR_LISTENER (text_span);
-  DECLARE_ACKNOWLEDGER (note_column);
+  void listen_text_span (Stream_event *);
+  void acknowledge_note_column (Grob_info);
   void stop_translation_timestep ();
   void process_music ();
 
@@ -55,7 +55,6 @@ Text_spanner_engraver::Text_spanner_engraver ()
   event_drul_.set (0, 0);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Text_spanner_engraver, text_span);
 void
 Text_spanner_engraver::listen_text_span (Stream_event *ev)
 {
@@ -156,7 +155,13 @@ Text_spanner_engraver::acknowledge_note_column (Grob_info info)
     }
 }
 
-ADD_ACKNOWLEDGER (Text_spanner_engraver, note_column);
+
+void
+Text_spanner_engraver::boot ()
+{
+  ADD_LISTENER (Text_spanner_engraver, text_span);
+  ADD_ACKNOWLEDGER (Text_spanner_engraver, note_column);
+}
 
 ADD_TRANSLATOR (Text_spanner_engraver,
                 /* doc */
index 56fb4a337ddce22c9653c16d74635e25501e277a..2a016b31be8a08317422b17faa22b39cd5d84684 100644 (file)
@@ -84,8 +84,8 @@ protected:
   void process_acknowledged ();
   void stop_translation_timestep ();
   void start_translation_timestep ();
-  DECLARE_ACKNOWLEDGER (note_head);
-  DECLARE_TRANSLATOR_LISTENER (tie);
+  void acknowledge_note_head (Grob_info);
+  void listen_tie (Stream_event *);
   void process_music ();
   void typeset_tie (Spanner *);
   void report_unterminated_tie (Head_event_tuple const &);
@@ -101,7 +101,6 @@ Tie_engraver::Tie_engraver ()
   event_processed_ = false;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Tie_engraver, tie);
 void
 Tie_engraver::listen_tie (Stream_event *ev)
 {
@@ -385,7 +384,13 @@ Tie_engraver::typeset_tie (Spanner *her)
   her->set_bound (RIGHT, right_head);
 }
 
-ADD_ACKNOWLEDGER (Tie_engraver, note_head);
+void
+Tie_engraver::boot ()
+{
+  ADD_LISTENER (Tie_engraver, tie);
+  ADD_ACKNOWLEDGER (Tie_engraver, note_head);
+}
+
 ADD_TRANSLATOR (Tie_engraver,
                 /* doc */
                 "Generate ties between note heads of equal pitch.",
index b1aa15ffeb645451287259cbbf0dc41ad29568e2..e93b3e6b0c6047fea2c2de8d33705b9a3098e0c4 100644 (file)
@@ -51,7 +51,7 @@ protected:
   void start_translation_timestep ();
   virtual void acknowledge_audio_element (Audio_element_info);
   void process_music ();
-  DECLARE_TRANSLATOR_LISTENER (tie);
+  void listen_tie (Stream_event *);
 public:
   TRANSLATOR_DECLARATIONS (Tie_performer);
 };
@@ -61,7 +61,6 @@ Tie_performer::Tie_performer ()
   event_ = 0;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Tie_performer, tie);
 void
 Tie_performer::listen_tie (Stream_event *ev)
 {
@@ -184,6 +183,12 @@ Tie_performer::stop_translation_timestep ()
   now_tied_heads_.clear ();
 }
 
+void
+Tie_performer::boot ()
+{
+  ADD_LISTENER (Tie_performer, tie);
+}
+
 ADD_TRANSLATOR (Tie_performer,
                 /* doc */
                 "Generate ties between note heads of equal pitch.",
index df6ae6dd1bb70521736f5dd5f56e68f5ed219660..d57b35bf6eae9bb95c04d2d0d1dde3d85c9f6764 100644 (file)
@@ -43,7 +43,7 @@ protected:
   void process_music ();
 public:
   TRANSLATOR_DECLARATIONS (Time_signature_engraver);
-  DECLARE_TRANSLATOR_LISTENER (time_signature);
+  void listen_time_signature (Stream_event *);
 };
 
 void
@@ -60,7 +60,6 @@ Time_signature_engraver::Time_signature_engraver ()
   last_time_fraction_ = SCM_BOOL_F;
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Time_signature_engraver, time_signature);
 void
 Time_signature_engraver::listen_time_signature (Stream_event *ev)
 {
@@ -116,6 +115,12 @@ Time_signature_engraver::stop_translation_timestep ()
   time_cause_ = SCM_EOL;
 }
 
+void
+Time_signature_engraver::boot ()
+{
+  ADD_LISTENER (Time_signature_engraver, time_signature);
+}
+
 ADD_TRANSLATOR (Time_signature_engraver,
                 /* doc */
                 "Create a @ref{TimeSignature} whenever"
index d9c25554fd7c637e8ecdd793047de78b1c81a6d1..3a3bbd2ca328de3c563bdc5314483c0bcea50d90 100644 (file)
@@ -81,6 +81,12 @@ Time_signature_performer::stop_translation_timestep ()
 
 #include "translator.icc"
 
+void
+Time_signature_performer::boot ()
+{
+
+}
+
 ADD_TRANSLATOR (Time_signature_performer,
                 /* doc */
                 "",
index 9bd7e758d8aed170fdba587b1955a792d08ef59d..4716eceb24c489d05ff30feb19a304a449f80f2f 100644 (file)
@@ -223,6 +223,12 @@ Timing_translator::start_translation_timestep ()
 
 #include "translator.icc"
 
+void
+Timing_translator::boot ()
+{
+
+}
+
 ADD_TRANSLATOR (Timing_translator,
                 /* doc */
                 "This engraver adds the alias @code{Timing} to its containing"
index 208d8a501c661ed7e7196b06c28b8475421bf461..eeee8d24831c1417b844919ccc282818864b1b9e 100644 (file)
@@ -21,8 +21,6 @@
 #include "engraver.hh"
 
 
-const char * const Engraver_dispatch_list::type_p_name_ = 0;
-
 void
 Engraver_dispatch_list::apply (Grob_info gi)
 {
@@ -54,10 +52,7 @@ Engraver_dispatch_list::create (SCM trans_list,
 
       for (SCM i = iface_list; scm_is_pair (i); i = scm_cdr (i))
         {
-          SCM ptr
-            = (start_end == START)
-            ? eng->get_acknowledger (scm_car (i))
-            : eng->get_end_acknowledger (scm_car (i));
+          SCM ptr = eng->get_acknowledger (scm_car (i), start_end);
 
           if (!SCM_UNBNDP (ptr))
             list->dispatch_entries_.push_back (Method_instance (ptr, eng));
index 972a487bf4861428734b8d483ab13a835bfae472..a9f1690f62998712b5bfe0a7470c437f838025f1 100644 (file)
@@ -324,7 +324,7 @@ Translator_group::~Translator_group ()
 }
 
 
-const char Translator_group::type_p_name_[] = "ly:translator-group?";
+const char * const Translator_group::type_p_name_ = "ly:translator-group?";
 
 int
 Translator_group::print_smob (SCM port, scm_print_state *) const
index 4a234e28172f48b4c55ceee0a0c07a82bb6cc05b..bdc55f0f05467a4d4cb5fd56b548deb9995329c2 100644 (file)
@@ -207,7 +207,7 @@ Translator::get_score_context () const
   return daddy_context_->get_score_context ();
 }
 
-const char Translator::type_p_name_[] = "ly:translator?";
+const char * const Translator::type_p_name_ = "ly:translator?";
 
 bool
 Translator::must_be_last () const
@@ -232,9 +232,9 @@ Translator::print_smob (SCM port, scm_print_state *) const
 void
 add_acknowledger (SCM ptr,
                   char const *func_name,
-                  Protected_scm &ack_hash)
+                  SCM &ack_hash)
 {
-  if (SCM_UNBNDP (SCM (ack_hash)))
+  if (SCM_UNBNDP (ack_hash))
     ack_hash = Scheme_hash_table::make_smob ();
 
   string interface_name (func_name);
index eb36aff7e6d465c6040f0ad9f2fea6f1fd8a1004..6634b5ea43be9cee202f9772cdeb79f00f6f765a 100644 (file)
@@ -41,8 +41,8 @@ public:
   TRANSLATOR_DECLARATIONS (Trill_spanner_engraver);
 protected:
   virtual void finalize ();
-  DECLARE_TRANSLATOR_LISTENER (trill_span);
-  DECLARE_ACKNOWLEDGER (note_column);
+  void listen_trill_span (Stream_event *);
+  void acknowledge_note_column (Grob_info);
 
   void stop_translation_timestep ();
   void process_music ();
@@ -63,7 +63,6 @@ Trill_spanner_engraver::Trill_spanner_engraver ()
   event_drul_.set (0, 0);
 }
 
-IMPLEMENT_TRANSLATOR_LISTENER (Trill_spanner_engraver, trill_span);
 void
 Trill_spanner_engraver::listen_trill_span (Stream_event *ev)
 {
@@ -152,7 +151,13 @@ Trill_spanner_engraver::finalize ()
     }
 }
 
-ADD_ACKNOWLEDGER (Trill_spanner_engraver, note_column);
+
+void
+Trill_spanner_engraver::boot ()
+{
+  ADD_LISTENER (Trill_spanner_engraver, trill_span);
+  ADD_ACKNOWLEDGER (Trill_spanner_engraver, note_column);
+}
 
 ADD_TRANSLATOR (Trill_spanner_engraver,
                 /* doc */
index 369389200fe95e4e8dd97dea1b1c44dc2f273430..92e018aeceae7ed2f9475c0e7e20c226c806ca0d 100644 (file)
@@ -63,17 +63,16 @@ protected:
   vector<Tuplet_description> stopped_tuplets_;
   vector<Spanner *> last_tuplets_;
 
-  DECLARE_ACKNOWLEDGER (note_column);
-  DECLARE_ACKNOWLEDGER (script);
-  DECLARE_ACKNOWLEDGER (finger);
-  DECLARE_ACKNOWLEDGER (string_number);
-  DECLARE_TRANSLATOR_LISTENER (tuplet_span);
+  void acknowledge_note_column (Grob_info);
+  void acknowledge_script (Grob_info);
+  void acknowledge_finger (Grob_info);
+  void acknowledge_string_number (Grob_info);
+  void listen_tuplet_span (Stream_event *);
   virtual void finalize ();
   void start_translation_timestep ();
   void process_music ();
 };
 
-IMPLEMENT_TRANSLATOR_LISTENER (Tuplet_engraver, tuplet_span);
 void
 Tuplet_engraver::listen_tuplet_span (Stream_event *ev)
 {
@@ -272,10 +271,16 @@ Tuplet_engraver::Tuplet_engraver ()
 {
 }
 
-ADD_ACKNOWLEDGER (Tuplet_engraver, note_column);
-ADD_ACKNOWLEDGER (Tuplet_engraver, script);
-ADD_ACKNOWLEDGER (Tuplet_engraver, finger);
-ADD_ACKNOWLEDGER (Tuplet_engraver, string_number);
+void
+Tuplet_engraver::boot ()
+{
+  ADD_LISTENER (Tuplet_engraver, tuplet_span);
+  ADD_ACKNOWLEDGER (Tuplet_engraver, note_column);
+  ADD_ACKNOWLEDGER (Tuplet_engraver, script);
+  ADD_ACKNOWLEDGER (Tuplet_engraver, finger);
+  ADD_ACKNOWLEDGER (Tuplet_engraver, string_number);
+}
+
 ADD_TRANSLATOR (Tuplet_engraver,
                 /* doc */
                 "Catch tuplet events and generate appropriate bracket.",
index 81138b3670ebd749b84f360b06ca99ac5eb13195..5f97b1e4cbdb11a84bfb469f864e31a01f2b8d0c 100644 (file)
@@ -29,7 +29,7 @@ class Tweak_engraver : public Engraver
   TRANSLATOR_DECLARATIONS (Tweak_engraver);
 
 protected:
-  DECLARE_ACKNOWLEDGER (grob);
+  void acknowledge_grob (Grob_info);
 };
 
 Tweak_engraver::Tweak_engraver ()
@@ -81,7 +81,12 @@ Tweak_engraver::acknowledge_grob (Grob_info info)
     }
 }
 
-ADD_ACKNOWLEDGER (Tweak_engraver, grob);
+void
+Tweak_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Tweak_engraver, grob);
+}
+
 ADD_TRANSLATOR (Tweak_engraver,
                 /* doc */
                 "Read the @code{tweaks} property from the originating event,"
index a328c66cafd0e6e376da5b4a7a4765752ea2a759..4aed7a60237f12b21d35e7f0eb5fb4aa122dc939 100644 (file)
@@ -24,7 +24,7 @@ class Undead : public Simple_smob<Undead>
 public:
   int print_smob (SCM, scm_print_state *) const;
   SCM mark_smob () const;
-  static const char type_p_name_[];
+  static const char * const type_p_name_;
 private:
   SCM object_;
 public:
@@ -51,7 +51,7 @@ Undead::print_smob (SCM port, scm_print_state *) const
   return 1;
 }
 
-const char Undead::type_p_name_[] = "ly:undead?";
+const char * const Undead::type_p_name_ = "ly:undead?";
 
 LY_DEFINE (ly_make_undead, "ly:make-undead",
            1, 0, 0, (SCM object),
index 7a7d6d48d16d3c139aca38ad9f0f38f307b5debb..143b2fd47de4c118e4b1818e94a9bc8c4779e01a 100644 (file)
@@ -25,7 +25,6 @@
 class Unpure_pure_call : public Smob1<Unpure_pure_call>
 {
 public:
-  static const char * const type_p_name_; // = 0
   // Smob procedures unfortunately can only take at most 3 SCM
   // arguments.  Otherwise we could use a "3, 0, 1" call signature and
   // not require an argument count check of our own.
@@ -38,8 +37,6 @@ public:
   }
 };
 
-const char * const Unpure_pure_call::type_p_name_ = 0;
-
 SCM
 Unpure_pure_container::pure_part () const
 {
@@ -48,7 +45,7 @@ Unpure_pure_container::pure_part () const
     : scm2 ();
 }
 
-const char Unpure_pure_container::type_p_name_[] = "ly:unpure-pure-container?";
+const char * const Unpure_pure_container::type_p_name_ = "ly:unpure-pure-container?";
 
 LY_DEFINE (ly_make_unpure_pure_container, "ly:make-unpure-pure-container",
            1, 1, 0, (SCM unpure, SCM pure),
index a98471369cb7baa3f77aa5f7a6c4995a7e5b1807..ddd138687270d377305013ca6a80ece7ffdd5a21 100644 (file)
@@ -77,29 +77,13 @@ private:
 
 public:
   TRANSLATOR_DECLARATIONS (Vaticana_ligature_engraver);
-  TRANSLATOR_INHERIT (Gregorian_ligature_engraver)
+  TRANSLATOR_INHERIT (Gregorian_ligature_engraver);
 protected:
   virtual Spanner *create_ligature_spanner ();
   virtual void transform_heads (Spanner *ligature,
                                 vector<Grob_info> const &primitives);
-  DECLARE_TRANSLATOR_LISTENER (pes_or_flexa);
-  DECLARE_TRANSLATOR_LISTENER (ligature);
 };
 
-IMPLEMENT_TRANSLATOR_LISTENER (Vaticana_ligature_engraver, pes_or_flexa);
-void
-Vaticana_ligature_engraver::listen_pes_or_flexa (Stream_event *ev)
-{
-  Gregorian_ligature_engraver::listen_pes_or_flexa (ev);
-}
-
-IMPLEMENT_TRANSLATOR_LISTENER (Vaticana_ligature_engraver, ligature);
-void
-Vaticana_ligature_engraver::listen_ligature (Stream_event *ev)
-{
-  Ligature_engraver::listen_ligature (ev);
-}
-
 Vaticana_ligature_engraver::Vaticana_ligature_engraver ()
 {
   brew_ligature_primitive_proc
@@ -741,8 +725,15 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
 #endif
 }
 
-ADD_ACKNOWLEDGER (Vaticana_ligature_engraver, rest);
-ADD_ACKNOWLEDGER (Vaticana_ligature_engraver, ligature_head);
+void
+Vaticana_ligature_engraver::boot ()
+{
+  ADD_LISTENER (Gregorian_ligature_engraver, pes_or_flexa);
+  ADD_LISTENER (Ligature_engraver, ligature);
+  ADD_ACKNOWLEDGER (Ligature_engraver, rest);
+  ADD_ACKNOWLEDGER (Ligature_engraver, ligature_head);
+}
+
 ADD_TRANSLATOR (Vaticana_ligature_engraver,
                 /* doc */
                 "Handle ligatures by glueing special ligature heads"
index 6a47809fd728d64fe33f03020bae8440cfb79d30..0226173a2e115ec81d153212a5c3317cee6755c2 100644 (file)
@@ -37,7 +37,7 @@ class Vertical_align_engraver : public Engraver
 
 public:
   TRANSLATOR_DECLARATIONS (Vertical_align_engraver);
-  DECLARE_ACKNOWLEDGER (axis_group);
+  void acknowledge_axis_group (Grob_info);
 
 protected:
   virtual void derived_mark () const;
@@ -48,7 +48,12 @@ protected:
   bool top_level_;
 };
 
-ADD_ACKNOWLEDGER (Vertical_align_engraver, axis_group);
+void
+Vertical_align_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Vertical_align_engraver, axis_group);
+}
+
 ADD_TRANSLATOR (Vertical_align_engraver,
                 /* doc */
                 "Catch groups (staves, lyrics lines, etc.) and stack them"
index bd198cbb67faad5c395bd1567133d6413019c938..2f95ac7ac11b861216e75a77d7d63857f6373fab 100644 (file)
@@ -43,7 +43,7 @@ public:
   TRANSLATOR_DECLARATIONS (Volta_engraver);
 protected:
 
-  DECLARE_ACKNOWLEDGER (bar_line);
+  void acknowledge_bar_line (Grob_info);
 
   virtual void derived_mark () const;
   void stop_translation_timestep ();
@@ -189,7 +189,12 @@ Volta_engraver::stop_translation_timestep ()
 /*
   TODO: should attach volta to paper-column if no bar is found.
 */
-ADD_ACKNOWLEDGER (Volta_engraver, bar_line);
+void
+Volta_engraver::boot ()
+{
+  ADD_ACKNOWLEDGER (Volta_engraver, bar_line);
+}
+
 ADD_TRANSLATOR (Volta_engraver,
                 /* doc */
                 "Make volta brackets.",
index 92f4fa73c807242b613952944b1e69cce2fea6e5..972b6abd4ae68498697a324dc0d4878e7a598da2 100644 (file)
@@ -23,7 +23,7 @@ That's it.  For more information, visit http://lilypond.org .
 
 %}
 
-\version "2.19.42"  % necessary for upgrading to future LilyPond versions.
+\version "2.19.43"  % necessary for upgrading to future LilyPond versions.
 
 \header{
   title = "A scale in LilyPond"
index 6d65df2be75b6141f6ac51e2bd8e3cf9fee24bfe..8f3351a7051f042de990fa9828519bf179bd1789 100644 (file)
@@ -32,7 +32,7 @@ Good luck with LilyPond!  Happy engraving.
 
 %}
 
-\version "2.19.42"  % necessary for upgrading to future LilyPond versions.
+\version "2.19.43"  % necessary for upgrading to future LilyPond versions.
 
 \header{
   title = "A scale in LilyPond"
index 83f8b5376e3575a2f3af4cb451cde4e467ee8791..0831bf062cabf6d3547f6d592691d7b21d5773a7 100644 (file)
     </rejectfont>
   </selectfont>
 
+  <!--
+      LilyPond cannot handle OpenType/CFF Collection (OTC) fonts
+      (NotoSansCJK.ttc and SourceHanSans.ttc etc.).
+      This settings is a workaround that ignores some major OTC fonts
+      for avoiding errors.
+      TODO: Add OTC fonts support and remove this settings
+  -->
+
+  <selectfont>
+    <rejectfont>
+      <!--
+         Noto Sans CJK
+         https://www.google.com/get/noto/help/cjk/
+
+         `CJK OTF fonts with different default language' and
+         `Region specific OTF subsets' can be used.
+         Their file names are `NotoSans*.otf'.
+      -->
+      <glob>*/NotoSansCJK*.ttc</glob>
+
+      <!--
+         Source Han Sans
+         https://github.com/adobe-fonts/source-han-sans
+
+         `Language-specific OTFs' and
+         `Region-specific Subset OTFs' can be used.
+         Their file names are `SourceHanSans*.otf'.
+      -->
+      <glob>*/SourceHanSans*.ttc</glob>
+
+      <!--
+         Source Han Code JP
+         https://github.com/adobe-fonts/source-han-code-jp
+
+         `OTF' can be used.
+         Their file names are `SourceHanCodeJP-*.otf'.
+      -->
+      <glob>*/SourceHanCodeJP.ttc</glob>
+    </rejectfont>
+  </selectfont>
+
 </fontconfig>
index 451975ed915ee0c7aa7355e5014d8207ad7949a1..d10065e32df2bebc3c2d27922e1f8b63af2c7d09 100644 (file)
@@ -6,10 +6,10 @@
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: lilypond 2.19.42\n"
+"Project-Id-Version: lilypond 2.19.43\n"
 "Report-Msgid-Bugs-To: http://post.gmane.org/post.php?group=gmane.comp.gnu."
 "lilypond.bugs\n"
-"POT-Creation-Date: 2016-05-15 12:16+0100\n"
+"POT-Creation-Date: 2016-06-08 13:09+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -889,7 +889,7 @@ msgstr ""
 msgid "Unable to find instrument for ID=%s\n"
 msgstr ""
 
-#: abc2ly.py:1389 convert-ly.py:85 lilypond-book.py:122 midi2ly.py:1044
+#: abc2ly.py:1389 convert-ly.py:85 lilypond-book.py:122 midi2ly.py:1046
 #, python-format
 msgid "%s [OPTION]... FILE"
 msgstr ""
@@ -902,16 +902,16 @@ msgid ""
 msgstr ""
 
 #: abc2ly.py:1398 convert-ly.py:92 etf2ly.py:1208 lilypond-book.py:231
-#: midi2ly.py:1095 musicxml2ly.py:2590 main.cc:184
+#: midi2ly.py:1097 musicxml2ly.py:2590 main.cc:184
 msgid "show version number and exit"
 msgstr ""
 
 #: abc2ly.py:1401 convert-ly.py:96 etf2ly.py:1204 lilypond-book.py:140
-#: midi2ly.py:1062 musicxml2ly.py:2572 main.cc:163
+#: midi2ly.py:1064 musicxml2ly.py:2572 main.cc:163
 msgid "show this help and exit"
 msgstr ""
 
-#: abc2ly.py:1404 etf2ly.py:1209 midi2ly.py:1071
+#: abc2ly.py:1404 etf2ly.py:1209 midi2ly.py:1073
 msgid "write output to FILE"
 msgstr ""
 
@@ -932,7 +932,7 @@ msgstr ""
 #. or if there is a LilyPond users list or forum in your language
 #. "Report bugs in English via %s or in YOUR_LANG via URI"
 #: abc2ly.py:1416 convert-ly.py:157 etf2ly.py:1218 lilypond-book.py:258
-#: midi2ly.py:1107 musicxml2ly.py:2674 main.cc:318
+#: midi2ly.py:1109 musicxml2ly.py:2674 main.cc:318
 #, c-format, python-format
 msgid "Report bugs via %s"
 msgstr ""
@@ -951,16 +951,16 @@ msgstr ""
 msgid "Examples:"
 msgstr ""
 
-#: convert-ly.py:79 etf2ly.py:1191 lilypond-book.py:115 midi2ly.py:81
+#: convert-ly.py:79 etf2ly.py:1191 lilypond-book.py:115 midi2ly.py:80
 #, python-format
 msgid "Copyright (c) %s by"
 msgstr ""
 
-#: convert-ly.py:81 etf2ly.py:1193 lilypond-book.py:117 midi2ly.py:83
+#: convert-ly.py:81 etf2ly.py:1193 lilypond-book.py:117 midi2ly.py:82
 msgid "Distributed under terms of the GNU General Public License."
 msgstr ""
 
-#: convert-ly.py:82 etf2ly.py:1194 lilypond-book.py:118 midi2ly.py:84
+#: convert-ly.py:82 etf2ly.py:1194 lilypond-book.py:118 midi2ly.py:83
 msgid "It comes with NO WARRANTY."
 msgstr ""
 
@@ -1014,7 +1014,7 @@ msgstr ""
 msgid "make a numbered backup [default: filename.ext~]"
 msgstr ""
 
-#: convert-ly.py:152 etf2ly.py:1212 lilypond-book.py:234 midi2ly.py:1096
+#: convert-ly.py:152 etf2ly.py:1212 lilypond-book.py:234 midi2ly.py:1098
 #: main.cc:186
 msgid "show warranty and copyright"
 msgstr ""
@@ -1073,7 +1073,7 @@ msgid ""
 "file.\n"
 msgstr ""
 
-#: etf2ly.py:1210 midi2ly.py:1067 midi2ly.py:1072 musicxml2ly.py:2659
+#: etf2ly.py:1210 midi2ly.py:1069 midi2ly.py:1074 musicxml2ly.py:2659
 #: main.cc:169 main.cc:181
 msgid "FILE"
 msgstr ""
@@ -1180,7 +1180,7 @@ msgstr ""
 msgid "write snippet output files with the same base name as their source file"
 msgstr ""
 
-#: lilypond-book.py:223 midi2ly.py:1090 musicxml2ly.py:2596
+#: lilypond-book.py:223 midi2ly.py:1092 musicxml2ly.py:2596
 msgid "be verbose"
 msgstr ""
 
@@ -1278,97 +1278,97 @@ msgid ""
 "Setting LilyPond's output to --verbose, implied by lilypond-book's setting"
 msgstr ""
 
-#: midi2ly.py:90
+#: midi2ly.py:89
 msgid "warning: "
 msgstr ""
 
-#: midi2ly.py:93 midi2ly.py:1124
+#: midi2ly.py:92 midi2ly.py:1126
 msgid "error: "
 msgstr ""
 
-#: midi2ly.py:94
+#: midi2ly.py:93
 msgid "Exiting... "
 msgstr ""
 
-#: midi2ly.py:835
+#: midi2ly.py:834
 msgid "found more than 5 voices on a staff, expect bad output"
 msgstr ""
 
-#: midi2ly.py:1032
+#: midi2ly.py:1034
 #, python-format
 msgid "%s output to `%s'..."
 msgstr ""
 
-#: midi2ly.py:1045
+#: midi2ly.py:1047
 #, python-format
 msgid "Convert %s to LilyPond input.\n"
 msgstr ""
 
-#: midi2ly.py:1050
+#: midi2ly.py:1052
 msgid "print absolute pitches"
 msgstr ""
 
-#: midi2ly.py:1052 midi2ly.py:1080
+#: midi2ly.py:1054 midi2ly.py:1082
 msgid "DUR"
 msgstr ""
 
-#: midi2ly.py:1053
+#: midi2ly.py:1055
 msgid "quantise note durations on DUR"
 msgstr ""
 
-#: midi2ly.py:1056
+#: midi2ly.py:1058
 msgid "debug printing"
 msgstr ""
 
-#: midi2ly.py:1059
+#: midi2ly.py:1061
 msgid "print explicit durations"
 msgstr ""
 
-#: midi2ly.py:1064
+#: midi2ly.py:1066
 msgid "prepend FILE to output"
 msgstr ""
 
-#: midi2ly.py:1068
+#: midi2ly.py:1070
 msgid "set key: ALT=+sharps|-flats; MINOR=1"
 msgstr ""
 
-#: midi2ly.py:1069
+#: midi2ly.py:1071
 msgid "ALT[:MINOR]"
 msgstr ""
 
-#: midi2ly.py:1074
+#: midi2ly.py:1076
 msgid "preview of first 4 bars"
 msgstr ""
 
-#: midi2ly.py:1078
+#: midi2ly.py:1080
 msgid "suppress progress messages and warnings about excess voices"
 msgstr ""
 
-#: midi2ly.py:1079
+#: midi2ly.py:1081
 msgid "quantise note starts on DUR"
 msgstr ""
 
-#: midi2ly.py:1083
+#: midi2ly.py:1085
 msgid "use s instead of r for rests"
 msgstr ""
 
-#: midi2ly.py:1085
+#: midi2ly.py:1087
 msgid "DUR*NUM/DEN"
 msgstr ""
 
-#: midi2ly.py:1088
+#: midi2ly.py:1090
 msgid "allow tuplet durations DUR*NUM/DEN"
 msgstr ""
 
-#: midi2ly.py:1098
+#: midi2ly.py:1100
 msgid "treat every text as a lyric"
 msgstr ""
 
-#: midi2ly.py:1101
+#: midi2ly.py:1103
 msgid "Examples"
 msgstr ""
 
-#: midi2ly.py:1125
+#: midi2ly.py:1127
 msgid "no files specified on command line."
 msgstr ""
 
@@ -1721,23 +1721,23 @@ msgstr ""
 msgid "barcheck failed at: %s"
 msgstr ""
 
-#: beam-engraver.cc:148
+#: beam-engraver.cc:147
 msgid "already have a beam"
 msgstr ""
 
-#: beam-engraver.cc:235
+#: beam-engraver.cc:234
 msgid "unterminated beam"
 msgstr ""
 
-#: beam-engraver.cc:282 chord-tremolo-engraver.cc:149
+#: beam-engraver.cc:281 chord-tremolo-engraver.cc:148
 msgid "stem must have Rhythmic structure"
 msgstr ""
 
-#: beam-engraver.cc:293
+#: beam-engraver.cc:292
 msgid "stem does not fit in beam"
 msgstr ""
 
-#: beam-engraver.cc:294
+#: beam-engraver.cc:293
 msgid "beam was started here"
 msgstr ""
 
@@ -1777,11 +1777,11 @@ msgstr ""
 msgid "none of these in my family"
 msgstr ""
 
-#: chord-tremolo-engraver.cc:88
+#: chord-tremolo-engraver.cc:87
 msgid "No tremolo to end"
 msgstr ""
 
-#: chord-tremolo-engraver.cc:109
+#: chord-tremolo-engraver.cc:108
 msgid "unterminated chord tremolo"
 msgstr ""
 
@@ -1859,14 +1859,14 @@ msgstr ""
 msgid "dot `%s' not found"
 msgstr ""
 
-#: dynamic-engraver.cc:169
+#: dynamic-engraver.cc:166
 #, c-format
 msgid ""
 "unknown crescendo style: %s\n"
 "defaulting to hairpin."
 msgstr ""
 
-#: dynamic-engraver.cc:234 slur-proto-engraver.cc:159
+#: dynamic-engraver.cc:231 slur-proto-engraver.cc:159
 #, c-format
 msgid "unterminated %s"
 msgstr ""
@@ -1878,19 +1878,19 @@ msgstr ""
 msgid "(De)crescendo with unspecified starting volume in MIDI."
 msgstr ""
 
-#: episema-engraver.cc:75
+#: episema-engraver.cc:74
 msgid "already have an episema"
 msgstr ""
 
-#: episema-engraver.cc:88
+#: episema-engraver.cc:87
 msgid "cannot find start of episema"
 msgstr ""
 
-#: episema-engraver.cc:137
+#: episema-engraver.cc:136
 msgid "unterminated episema"
 msgstr ""
 
-#: extender-engraver.cc:169 extender-engraver.cc:178
+#: extender-engraver.cc:167 extender-engraver.cc:176
 msgid "unterminated extender"
 msgstr ""
 
@@ -1955,7 +1955,7 @@ msgstr ""
 msgid "Found infinity or nan in output.  Substituting 0.0"
 msgstr ""
 
-#: glissando-engraver.cc:158
+#: glissando-engraver.cc:157
 msgid "unterminated glissando"
 msgstr ""
 
@@ -2020,19 +2020,19 @@ msgstr ""
 msgid "decrescendo too small"
 msgstr ""
 
-#: horizontal-bracket-engraver.cc:62
+#: horizontal-bracket-engraver.cc:61
 msgid "do not have that many brackets"
 msgstr ""
 
-#: horizontal-bracket-engraver.cc:71
+#: horizontal-bracket-engraver.cc:70
 msgid "conflicting note group events"
 msgstr ""
 
-#: hyphen-engraver.cc:104
+#: hyphen-engraver.cc:103
 msgid "removing unterminated hyphen"
 msgstr ""
 
-#: hyphen-engraver.cc:118
+#: hyphen-engraver.cc:117
 msgid "unterminated hyphen; removing"
 msgstr ""
 
@@ -2050,7 +2050,7 @@ msgstr ""
 msgid "position unknown"
 msgstr ""
 
-#: key-engraver.cc:197
+#: key-engraver.cc:196
 msgid "Incomplete keyAlterationOrder for key signature"
 msgstr ""
 
@@ -2063,11 +2063,11 @@ msgstr ""
 msgid "alteration not found"
 msgstr ""
 
-#: ligature-bracket-engraver.cc:72 ligature-engraver.cc:109
+#: ligature-bracket-engraver.cc:71 ligature-engraver.cc:109
 msgid "cannot find start of ligature"
 msgstr ""
 
-#: ligature-bracket-engraver.cc:85 ligature-engraver.cc:136
+#: ligature-bracket-engraver.cc:84 ligature-engraver.cc:136
 msgid "already have a ligature"
 msgstr ""
 
@@ -2394,45 +2394,45 @@ msgid "exception caught: %s"
 msgstr ""
 
 #. FIXME: constant error message.
-#: mark-engraver.cc:150
+#: mark-engraver.cc:149
 msgid "rehearsalMark must have integer value"
 msgstr ""
 
-#: mark-engraver.cc:156
+#: mark-engraver.cc:155
 msgid "mark label must be a markup object"
 msgstr ""
 
-#: mensural-ligature-engraver.cc:101
+#: mensural-ligature-engraver.cc:93
 msgid "ligature with less than 2 heads -> skipping"
 msgstr ""
 
-#: mensural-ligature-engraver.cc:128
+#: mensural-ligature-engraver.cc:120
 msgid "cannot determine pitch of ligature primitive -> skipping"
 msgstr ""
 
-#: mensural-ligature-engraver.cc:142
+#: mensural-ligature-engraver.cc:134
 msgid "single note ligature - skipping"
 msgstr ""
 
-#: mensural-ligature-engraver.cc:153
+#: mensural-ligature-engraver.cc:145
 msgid "prime interval within ligature -> skipping"
 msgstr ""
 
-#: mensural-ligature-engraver.cc:164
+#: mensural-ligature-engraver.cc:156
 msgid "mensural ligature: duration none of Mx, L, B, S -> skipping"
 msgstr ""
 
-#: mensural-ligature-engraver.cc:207
+#: mensural-ligature-engraver.cc:199
 msgid "semibrevis must be followed by another one -> skipping"
 msgstr ""
 
-#: mensural-ligature-engraver.cc:217
+#: mensural-ligature-engraver.cc:209
 msgid ""
 "semibreves can only appear at the beginning of a ligature,\n"
 "and there may be only zero or two of them"
 msgstr ""
 
-#: mensural-ligature-engraver.cc:237
+#: mensural-ligature-engraver.cc:229
 msgid ""
 "invalid ligatura ending:\n"
 "when the last note is a descending brevis,\n"
@@ -2440,11 +2440,11 @@ msgid ""
 "or the ligatura must be LB or SSB"
 msgstr ""
 
-#: mensural-ligature-engraver.cc:397
+#: mensural-ligature-engraver.cc:389
 msgid "unexpected case fall-through"
 msgstr ""
 
-#: midi-control-function-performer.cc:107 staff-performer.cc:153
+#: midi-control-function-performer.cc:107 staff-performer.cc:159
 #, c-format
 msgid "ignoring out-of-range value change for MIDI property `%s'"
 msgstr ""
@@ -2511,7 +2511,7 @@ msgstr ""
 msgid "none of note heads `%s' or `%s' found"
 msgstr ""
 
-#: note-heads-engraver.cc:76
+#: note-heads-engraver.cc:75
 msgid "NoteEvent without pitch"
 msgstr ""
 
@@ -2707,7 +2707,7 @@ msgstr ""
 msgid "program option -dpreview not supported by backend `%s'"
 msgstr ""
 
-#: paper-column-engraver.cc:263
+#: paper-column-engraver.cc:261
 msgid ""
 "forced break was overridden by some other event, should you be using bar "
 "checks?"
@@ -2736,7 +2736,7 @@ msgstr ""
 msgid "Conversion of string `%s' to UTF-16be failed: %s"
 msgstr ""
 
-#: percent-repeat-engraver.cc:148
+#: percent-repeat-engraver.cc:147
 msgid "unterminated percent repeat"
 msgstr ""
 
@@ -2749,18 +2749,27 @@ msgstr ""
 msgid "MIDI output to `%s'..."
 msgstr ""
 
-#: piano-pedal-engraver.cc:279
+#: pfb-scheme.cc:49 ttf.cc:512 ttf.cc:562
+msgid "font index must be non-negative, using index 0"
+msgstr ""
+
+#: pfb-scheme.cc:64 ttf.cc:480 ttf.cc:528
+#, c-format
+msgid "font index %d too large for font `%s', using index 0"
+msgstr ""
+
+#: piano-pedal-engraver.cc:276
 #, c-format
 msgid "expect 3 strings for piano pedals, found: %ld"
 msgstr ""
 
-#: piano-pedal-engraver.cc:294 piano-pedal-engraver.cc:305
+#: piano-pedal-engraver.cc:291 piano-pedal-engraver.cc:302
 #: piano-pedal-performer.cc:104
 #, c-format
 msgid "cannot find start of piano pedal: `%s'"
 msgstr ""
 
-#: piano-pedal-engraver.cc:340
+#: piano-pedal-engraver.cc:337
 #, c-format
 msgid "cannot find start of piano pedal bracket: `%s'"
 msgstr ""
@@ -2897,11 +2906,11 @@ msgid "errors found, ignoring music expression"
 msgstr ""
 
 #. FIXME:
-#: script-engraver.cc:115
+#: script-engraver.cc:114
 msgid "do not know how to interpret articulation:"
 msgstr ""
 
-#: script-engraver.cc:116
+#: script-engraver.cc:115
 msgid " scheme encoding: "
 msgstr ""
 
@@ -2941,11 +2950,11 @@ msgstr ""
 msgid "expected to read %d characters, got %d"
 msgstr ""
 
-#: staff-performer.cc:301
+#: staff-performer.cc:307
 msgid "MIDI channel wrapped around"
 msgstr ""
 
-#: staff-performer.cc:302
+#: staff-performer.cc:308
 msgid "remapping modulo 16"
 msgstr ""
 
@@ -2982,23 +2991,23 @@ msgstr ""
 msgid "Markup depth exceeds maximal value of %d; Markup: %s"
 msgstr ""
 
-#: text-spanner-engraver.cc:72
+#: text-spanner-engraver.cc:71
 msgid "cannot find start of text spanner"
 msgstr ""
 
-#: text-spanner-engraver.cc:85
+#: text-spanner-engraver.cc:84
 msgid "already have a text spanner"
 msgstr ""
 
-#: text-spanner-engraver.cc:132
+#: text-spanner-engraver.cc:131
 msgid "unterminated text spanner"
 msgstr ""
 
-#: tie-engraver.cc:121
+#: tie-engraver.cc:120
 msgid "unterminated tie"
 msgstr ""
 
-#: tie-engraver.cc:377
+#: tie-engraver.cc:376
 msgid "lonely tie"
 msgstr ""
 
@@ -3007,7 +3016,7 @@ msgstr ""
 #.
 #. OTOH, Tristan Keuris writes 8/20 in his Intermezzi.
 #.
-#: time-signature-engraver.cc:95
+#: time-signature-engraver.cc:94
 #, c-format
 msgid "strange time signature found: %d/%d"
 msgstr ""
@@ -3037,39 +3046,30 @@ msgstr ""
 msgid "Previous %s event here"
 msgstr ""
 
-#: ttf.cc:480 ttf.cc:528
-#, c-format
-msgid "font index %d too large for font `%s', using index 0"
-msgstr ""
-
-#: ttf.cc:512 ttf.cc:562
-msgid "font index must be non-negative, using index 0"
-msgstr ""
-
-#: tuplet-engraver.cc:110
+#: tuplet-engraver.cc:109
 msgid "No tuplet to end"
 msgstr ""
 
-#: vaticana-ligature-engraver.cc:400
+#: vaticana-ligature-engraver.cc:384
 #, c-format
 msgid ""
 "ignored prefix(es) `%s' of this head according to restrictions of the "
 "selected ligature style"
 msgstr ""
 
-#: vaticana-ligature-engraver.cc:466
+#: vaticana-ligature-engraver.cc:450
 msgid ""
 "Ambiguous use of dots in ligature: there are multiple dotted notes with the "
 "same pitch.  The ligature should be split."
 msgstr ""
 
-#: vaticana-ligature-engraver.cc:524
+#: vaticana-ligature-engraver.cc:508
 msgid ""
 "This ligature has a dotted head followed by a non-dotted head.  The ligature "
 "should be split after the last dotted head before this head."
 msgstr ""
 
-#: vaticana-ligature-engraver.cc:736
+#: vaticana-ligature-engraver.cc:720
 #, c-format
 msgid "Vaticana_ligature_engraver: setting `spacing-increment = %f': ptr =%ul"
 msgstr ""
@@ -3082,7 +3082,7 @@ msgstr ""
 msgid "ascending vaticana style flexa"
 msgstr ""
 
-#: vertical-align-engraver.cc:95
+#: vertical-align-engraver.cc:100
 msgid "Ignoring Vertical_align_engraver in VerticalAxisGroup"
 msgstr ""
 
@@ -3526,17 +3526,17 @@ msgstr ""
 msgid "cannot extract file matching ~a from ~a"
 msgstr ""
 
-#: framework-ps.scm:347
+#: framework-ps.scm:353
 #, scheme-format
 msgid "do not know how to embed ~S=~S"
 msgstr ""
 
-#: framework-ps.scm:372
+#: framework-ps.scm:378
 #, scheme-format
 msgid "do not know how to embed font ~s ~s ~s"
 msgstr ""
 
-#: framework-ps.scm:754
+#: framework-ps.scm:760
 msgid ""
 "\n"
 "The PostScript backend does not support the\n"
@@ -3602,58 +3602,62 @@ msgstr ""
 msgid "no \\version statement found, please add~afor future compatibility"
 msgstr ""
 
-#: lily.scm:93
+#: lily.scm:94
 msgid "call-after-session used after session start"
 msgstr ""
 
-#: lily.scm:111
+#: lily.scm:112
 msgid "define-session used after session start"
 msgstr ""
 
-#: lily.scm:420
+#: lily.scm:122
+msgid "define-session-public used after session start"
+msgstr ""
+
+#: lily.scm:434
 msgid "Using (ice-9 curried-definitions) module\n"
 msgstr ""
 
-#: lily.scm:423
+#: lily.scm:437
 msgid "Guile 1.8\n"
 msgstr ""
 
-#: lily.scm:480
+#: lily.scm:494
 #, scheme-format
 msgid "cannot find: ~A"
 msgstr ""
 
-#: lily.scm:910
+#: lily.scm:924
 msgid "Success: compilation successfully completed"
 msgstr ""
 
-#: lily.scm:911
+#: lily.scm:925
 msgid "Compilation completed with warnings or errors"
 msgstr ""
 
-#: lily.scm:972
+#: lily.scm:986
 #, scheme-format
 msgid "job ~a terminated with signal: ~a"
 msgstr ""
 
-#: lily.scm:975
+#: lily.scm:989
 #, scheme-format
 msgid ""
 "logfile ~a (exit ~a):\n"
 "~a"
 msgstr ""
 
-#: lily.scm:997 lily.scm:1086
+#: lily.scm:1011 lily.scm:1100
 #, scheme-format
 msgid "failed files: ~S"
 msgstr ""
 
-#: lily.scm:1077
+#: lily.scm:1091
 #, scheme-format
 msgid "Redirecting output to ~a..."
 msgstr ""
 
-#: lily.scm:1096
+#: lily.scm:1110
 #, scheme-format
 msgid "Invoking `~a'...\n"
 msgstr ""
@@ -3782,12 +3786,12 @@ msgstr ""
 msgid "conflicting tag group ~a"
 msgstr ""
 
-#: output-ps.scm:286 output-svg.scm:535
+#: output-ps.scm:290 output-svg.scm:539
 #, scheme-format
 msgid "unknown line-cap-style: ~S"
 msgstr ""
 
-#: output-ps.scm:291 output-svg.scm:541
+#: output-ps.scm:295 output-svg.scm:545
 #, scheme-format
 msgid "unknown line-join-style: ~S"
 msgstr ""
index 1d41c973e80330876afc9de25d5e090e4bc223ef..23601a8deaba4e54a3014c0b2fcdc8dd9c324dd1 100644 (file)
@@ -18,6 +18,8 @@
 ;; for define-safe-public when byte-compiling using Guile V2
 (use-modules (scm safe-utility-defs) (ice-9 receive))
 
+(define-session-public chordmodifiers '())
+
 (define-public (construct-chord-elements root duration modifications)
   "Build a chord on root using modifiers in @var{modifications}.
 @code{NoteEvents} have duration @var{duration}.
index 3ee68e5e6a5ebceba368c151b01e13effddc64aa..75f1807e61818507374bfc420aa654c381a37257 100644 (file)
@@ -28,7 +28,7 @@
 
 
   (if (not (equal? #f (object-property symbol 'translation-doc)))
-      (ly:error (_ "symbol ~S redefined" symbol)))
+      (ly:error (_ "symbol ~S redefined") symbol))
 
   (set-object-property! symbol 'translation-type? type?)
   (set-object-property! symbol 'translation-doc description)
index 4eebdfac0ee7627aec9cdc616fbafe7e58bcb2b1..8695bc5b78874801405a36288a8c5757e0679bfd 100644 (file)
@@ -107,7 +107,7 @@ previously defined event class."
      ((ly:make-event-class class)
       (ly:error (_ "Cannot redefine event class `~S'") class))
      ((not parentclass)
-      (ly:error (_ "Undefined parent event class `~S'" parentclass)))
+      (ly:error (_ "Undefined parent event class `~S'") parentclass))
      (else
       (hashq-set! ancestor-lookup
                   class
index 10aecbd1db6794f29b3ee54f9cb99bdef23e47b4..42637cd16c0c5548b44395186893e0d96cdedd05 100644 (file)
@@ -89,8 +89,7 @@ expression."
   (define (pitch= pitch1 pitch2)
     (and (= (ly:pitch-notename pitch1) (ly:pitch-notename pitch2))
          (= (ly:pitch-alteration pitch1) (ly:pitch-alteration pitch2))))
-  (let* ((pitches (ly:parser-lookup 'pitchnames))
-         (result (rassoc ly-pitch pitches pitch=)))
+  (let* ((result (rassoc ly-pitch pitchnames pitch=)))
     (and result (car result))))
 
 (define-public (octave->lily-string pitch)
@@ -860,7 +859,11 @@ Otherwise, return #f."
                 num den
                 (new-line->lily-string))
         (format #f
-                "\\time #'~a ~a/~a~a"
+                ;; This is silly but the latter will also work for #f
+                ;; and other
+                (if (key-list? structure)
+                    "\\time ~{~a~^,~} ~a/~a~a"
+                    "\\time #'~a ~a/~a~a")
                 structure num den
                 (new-line->lily-string)))))
 
index 5825967428d9a3e14036480acd83b32d3d7ba627..e7d208a5119c6230372d0981ea780af70c4cb562 100644 (file)
 
 
 ;;; Variable declaration
-(define-public pitchnames '())
-(define-public default-language "")
-(define-public previous-pitchnames #f)
+(define-session-public pitchnames '())
+(define-session-public default-language "")
+(define-session-public previous-pitchnames #f)
 
-(define-public language-pitch-names
+;;; A bit out of place, but we don't have a good place elsewhere in
+;;; scm since it is only filled in ly/drumpitch-init.ly and we need it
+;;; in (scm lily) in order to access it in ly/parser.yy.
+(define-session-public drumPitchNames '())
+
+(define-session-public language-pitch-names
   `(
     ;; Language: Nederlands --------------------------------------------;
     ;;  Dutch note names -- LilyPond's default language.
index ca3372ca92557b2d32129ea705f692f2e8977be0..a781055f5077d152520e7d7c4643341a9fc5ea0f 100644 (file)
        ((and file-name (string-endswith downcase-file-name ".ttf"))
         (ly:ttf->pfa file-name))
        ((and file-name (string-endswith downcase-file-name ".ttc"))
-        (ly:ttf->pfa file-name font-index))
+        ;; TODO: distinguish files which have extension `*.ttc'
+        ;; whether TrueType Collection (TTC) fonts
+        ;; or OpenType/CFF Collection (OTC) fonts.
+        (ly:ttf->pfa file-name font-index)) ;; TTC fonts
        ((and file-name (string-endswith downcase-file-name ".otf"))
         (ps-embed-cff (ly:otf->cff file-name) name 0))
+       ((and file-name (string-endswith downcase-file-name ".otc"))
+        ;; The files which have the extension `*.otc' are OTC fonts.
+        (ps-embed-cff (ly:otf->cff file-name font-index) name 0)) ;; OTC fonts
        (else
         (ly:warning (_ "do not know how to embed ~S=~S") name file-name)
         ""))))
index 5ead4e6c9cf9da25e8f12bcf08cdfa145692f613..d1248cdd92d6c0e1a23e0ecfebfc9e877d25dc5a 100644 (file)
@@ -86,6 +86,7 @@
 ;;
 
 (define lilypond-declarations '())
+(define lilypond-exports '())
 (define after-session-hook (make-hook))
 
 (define-public (call-after-session thunk)
       (ly:error (_ "call-after-session used after session start")))
   (add-hook! after-session-hook thunk #t))
 
-(defmacro-public define-session (name value)
+(define (make-session-variable name value)
+  (if (ly:undead? lilypond-declarations)
+      (ly:error (_ "define-session used after session start")))
+  (let ((var (module-make-local-var! (current-module) name)))
+    (if (variable-bound? var)
+        (ly:error (_ "symbol ~S redefined") name))
+    (variable-set! var value)
+    var))
+
+(defmacro define-session (name value)
   "This defines a variable @var{name} with the starting value
 @var{value} that is reinitialized at the start of each session.
 A@tie{}session basically corresponds to one LilyPond file on the
@@ -107,17 +117,22 @@ to their front or replacing them altogether, not by modifying parts of
 them.  It is an error to call @code{define-session} after the first
 session has started."
   (define (add-session-variable name value)
-    (if (ly:undead? lilypond-declarations)
-        (ly:error (_ "define-session used after session start")))
-    (let ((var (make-variable value)))
-      (module-add! (current-module) name var)
-      (set! lilypond-declarations (cons var lilypond-declarations))))
+    (set! lilypond-declarations
+          (cons (make-session-variable name value) lilypond-declarations)))
   `(,add-session-variable ',name ,value))
 
-(defmacro-public define-session-public (name value)
-  "Like @code{define-session}, but also exports @var{name}."
+(defmacro define-session-public (name value)
+  "Like @code{define-session}, but also exports @var{name} into parser modules."
+  (define (add-session-variable name value)
+    (set! lilypond-exports
+          (acons name (make-session-variable name value) lilypond-exports)))
   `(begin
-     (define-session ,name ,value)
+     ;; this is a bit icky: we place the variable right into every
+     ;; parser module so that both set! and define will affect the
+     ;; original variable in the (lily) module.  However, we _also_
+     ;; export it normally from (lily) for the sake of other modules
+     ;; not sharing the name space of the parser.
+     (,add-session-variable ',name ,value)
      (export ,name)))
 
 (define (session-terminate)
@@ -158,7 +173,16 @@ variables to their value after the initial call of @var{thunk}."
                  (module-add! (current-module) (car p) var))))
          (ly:get-undead lilypond-declarations)))
       (begin
+        ;; import all public session variables natively into parser
+        ;; module.  That makes them behave identically under define/set!
+        (for-each (lambda (v)
+                    (module-add! (current-module) (car v) (cdr v)))
+                  lilypond-exports)
+        ;; Initialize first session
         (thunk)
+        ;; lilypond-exports is no longer needed since we will grab its
+        ;; values from (current-module).
+        (set! lilypond-exports #f)
         (set! lilypond-interfaces
               (filter (lambda (m) (eq? 'interface (module-kind m)))
                       (module-uses (current-module))))
index 69f277203934985a01979476b56df1803c5a1bae..70b13848e4aa6ad898bac04f79d33c80dfdaf838 100644 (file)
                                 (ly:in-event-class? cause t))
                               point-and-click))))
             (let* ((location (ly:input-file-line-char-column music-origin))
+                   (raw-file (car location))
+                   (file (if (is-absolute? raw-file)
+                             raw-file
+                             (string-append (ly-getcwd) "/" raw-file)))
                    (x-ext (ly:grob-extent grob grob X))
                    (y-ext (ly:grob-extent grob grob Y)))
 
                              ;; Backslashes are not valid
                              ;; file URI path separators.
                              (ly:string-percent-encode
-                              (ly:string-substitute "\\" "/" (car location)))
+                              (ly:string-substitute "\\" "/" file))
 
                              (cadr location)
                              (caddr location)
index ca086318d7810d1f4769d59e6d2e88d4fc28668d..78bda3c35b8c88f376fadc6f9d471597ca1ba482 100644 (file)
                     (else (any (lambda (t)
                                  (ly:in-event-class? cause t))
                                point-and-click)))
-              (let* ((location (ly:input-file-line-char-column music-origin)))
-
+              (let* ((location (ly:input-file-line-char-column music-origin))
+                     (raw-file (car location))
+                     (file (if (is-absolute? raw-file)
+                               raw-file
+                               (string-append (ly-getcwd) "/" raw-file))))
+                
                 (ly:format "<a style=\"color:inherit;\" xlink:href=\"textedit://~a:~a:~a:~a\">\n"
                            ;; Backslashes are not valid
                            ;; file URI path separators.
                            (ly:string-percent-encode
-                            (ly:string-substitute "\\" "/" (car location)))
-
+                            (ly:string-substitute "\\" "/" file))
+                           
                            (cadr location)
                            (caddr location)
                            (1+ (cadddr location))))))))
index e529ca7327cdd5a6a4ff2a36a861bd7a413a3b7b..e631c27fd8b43a5e7c75792be202237fadfb9d3d 100644 (file)
@@ -554,7 +554,7 @@ def make_regtest_links(name, version, lang):
         getTrans("PDF of lilypond-book regtests for ", lang)+version)
 
 def make_doctarball_links(name, version, lang):
-    url = depth + "download/binaries/documentation/lilypond-"
+    url = depth + "downloads/binaries/documentation/lilypond-"
     # ugly FIXME, but proper build number support isn't Critical.
     url += version + "-1"
     url += ".documentation.tar.bz2"
index f4a47fb79ab963c889a9d372b9952e89ac3cdbd9..5358fc46984ad6e8a49e363c2aaf622f816c18b9 100644 (file)
@@ -32,7 +32,6 @@ import sys
 @relocate-preamble@
 """
 
-import midi
 import lilylib as ly
 global _;_=ly._
 
@@ -923,6 +922,9 @@ class Staff:
         return dump_track (self.voices, i)
 
 def convert_midi (in_file, out_file):
+    global midi
+    import midi
+
     global clocks_per_1, clocks_per_4, key
     global start_quant_clocks
     global duration_quant_clocks
index 785be9ef6f4ee1e1ba84e1db581facab63aef0d8..daf2d8659d1b90c966349c6b167fa4b6103f3697 100644 (file)
@@ -10,4 +10,4 @@ $(O_FILES): $(outdir)/config.hh
 
 $(EXECUTABLE): $(O_FILES) $(outdir)/version.hh $(MODULE_LIBS:%=%/$(outdir)/library.a)
        $(foreach a, $(MODULE_LIBS), $(MAKE) -C $(a) && ) true
-       $(LD) -o $@ $(O_FILES) $(LOADLIBES) $(ALL_LDFLAGS)
+       $(CXX) -o $@ $(O_FILES) $(LOADLIBES) $(ALL_LDFLAGS)
index e10e83c7d8fbdee9b4bc110de4d961d7bdd9caf6..7fbb413c78e12b5e1633a8d2d155a52f5742cc70 100644 (file)
@@ -8,4 +8,4 @@ $(foreach a, $(MODULE_LIBS), $(eval $(call MODULE_LIB_template,$(a))))
 
 $(TEST_EXECUTABLE): $(TEST_O_FILES) $(TEST_MODULE_LIBS:%=%/$(outdir)/library.a)
        $(foreach a, $(TEST_MODULE_LIBS), $(MAKE) -C $(a) && ) true
-       $(LD) -o $@ $(TEST_O_FILES) $(TEST_LOADLIBES) $(ALL_LDFLAGS)
+       $(CXX) -o $@ $(TEST_O_FILES) $(TEST_LOADLIBES) $(ALL_LDFLAGS)
index d164d451b89075c9d7670202182e788aa5659f40..d7e6b1f6b802a1b82e7eaaad11697ebee30b7eb8 100644 (file)
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2016-03-29.15}
+\def\texinfoversion{2016-05-26.20}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
 \everyjob{\message{[Texinfo version \texinfoversion]}%
   \catcode`+=\active \catcode`\_=\active}
 
+% LaTeX's \typeout.  This ensures that the messages it is used for
+% are identical in format to the corresponding ones from latex/pdflatex.
+\def\typeout{\immediate\write17}%
+
 \chardef\other=12
 
 % We never want plain's \outer definition of \+ in Texinfo.
@@ -1534,7 +1538,6 @@ output) for that.)}
   %
   % PDF outline support
   %
-  \pdfmakepagedesttrue \relax
   % Emulate the primitive of pdfTeX
   \def\pdfdest name#1 xyz{%
     \special{pdf:dest (name#1) [@thispage /XYZ @xpos @ypos]}%
@@ -3270,8 +3273,8 @@ end
 % @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
 % Unless we're in typewriter, use \ecfont because the CM text fonts do
 % not have braces, and we don't want to switch into math.
-\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
-\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
+\def\mylbrace{{\ifmonospace\char123\else\ensuremath\lbrace\fi}}
+\def\myrbrace{{\ifmonospace\char125\else\ensuremath\rbrace\fi}}
 \let\{=\mylbrace \let\lbracechar=\{
 \let\}=\myrbrace \let\rbracechar=\}
 \begingroup
@@ -4603,6 +4606,19 @@ end
   \fi
 }
 
+% Like \expandablevalue, but completely expandable (the \message in the
+% definition above operates at the execution level of TeX).  Used when
+% writing to auxiliary files, due to the expansion that \write does.
+%
+% NB flag names containing - or _ may not work here.
+\def\dummyvalue#1{%
+  \expandafter\ifx\csname SET#1\endcsname\relax
+    [No value for ``#1'']%
+  \else
+    \csname SET#1\endcsname
+  \fi
+}
+
 % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
 % with @set.
 % 
@@ -4753,7 +4769,7 @@ end
 \def\docodeindex#1{\edef\indexname{#1}\parsearg\docodeindexxxx}
 \def\docodeindexxxx #1{\doind{\indexname}{\code{#1}}}
 
-% Used when writing an index entry out to an index file, to prevent
+% Used when writing an index entry out to an index file to prevent
 % expansion of Texinfo commands that can appear in an index entry.
 %
 \def\indexdummies{%
@@ -4889,12 +4905,9 @@ end
   %
   % We want to disable all macros so that they are not expanded by \write.
   \macrolist
+  \let\value\dummyvalue
   %
   \normalturnoffactive
-  %
-  % Handle some cases of @value -- where it does not contain any
-  % (non-fully-expandable) commands.
-  \makevalueexpandable
 }
 
 % \commondummiesnofonts: common to \commondummies and \indexnofonts.
@@ -5159,9 +5172,10 @@ end
   \ifx\suffix\indexisfl\def\suffix{f1}\fi
   % Open the file
   \immediate\openout\csname#1indfile\endcsname \jobname.\suffix
-  % Using \immediate here prevents an object entering into the current box,
-  % which could confound checks such as those in \safewhatsit for preceding
-  % skips.
+  % Using \immediate above here prevents an object entering into the current 
+  % box, which could confound checks such as those in \safewhatsit for
+  % preceding skips.
+  \typeout{Writing index file \jobname.\suffix}%
 \fi}
 \def\indexisfl{fl}
 
@@ -5369,9 +5383,9 @@ end
     % index.  The easiest way to prevent this problem is to make sure
     % there is some text.
     \putwordIndexNonexistent
+    \typeout{No file \jobname.\indexname s.}%
   \else
     \catcode`\\ = 0
-    \escapechar = `\\
     %
     % If the index file exists but is empty, then \openin leaves \ifeof
     % false.  We have to make TeX try to read something from the file, so
@@ -6683,7 +6697,14 @@ end
   % 1 and 2 (the page numbers aren't printed), and so are the first
   % two pages of the document.  Thus, we'd have two destinations named
   % `1', and two named `2'.
-  \ifpdf \global\pdfmakepagedesttrue \fi
+  \ifpdf
+    \global\pdfmakepagedesttrue
+  \else
+    \ifx\XeTeXrevision\thisisundefined
+    \else
+      \global\pdfmakepagedesttrue
+    \fi
+  \fi
 }
 
 
@@ -6943,7 +6964,6 @@ end
   \catcode `\>=\other
   \catcode `\`=\other
   \catcode `\'=\other
-  \escapechar=`\\
   %
   % ' is active in math mode (mathcode"8000).  So reset it, and all our
   % other math active characters (just in case), to plain's definitions.
@@ -7921,14 +7941,28 @@ end
 % alias because \c means cedilla in @tex or @math
 \let\texinfoc=\c
 
+\newcount\savedcatcodeone
+\newcount\savedcatcodetwo
+
 % Used at the time of macro expansion.
 % Argument is macro body with arguments substituted
 \def\scanmacro#1{%
   \newlinechar`\^^M
   \def\xeatspaces{\eatspaces}%
   %
+  % Temporarily undo catcode changes of \printindex.  Set catcode of @ to
+  % 0 so that @-commands in macro expansions aren't printed literally when 
+  % formatting an index file, where \ is used as the escape character.
+  \savedcatcodeone=\catcode`\@
+  \savedcatcodetwo=\catcode`\\
+  \catcode`\@=0
+  \catcode`\\=\active
+  %
   % Process the macro body under the current catcode regime.
-  \scantokens{#1\texinfoc}\aftermacro%
+  \scantokens{#1@texinfoc}\aftermacro%
+  %
+  \catcode`\@=\savedcatcodeone
+  \catcode`\\=\savedcatcodetwo
   %
   % The \texinfoc is to remove the \newlinechar added by \scantokens, and
   % can be noticed by \parsearg.
@@ -8686,6 +8720,8 @@ end
     {%
       \requireauxfile
       \atdummies  % preserve commands, but don't expand them
+      % match definition in \xrdef, \refx, \xrefX.
+      \def\value##1{##1}%
       \edef\writexrdef##1##2{%
        \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
          ##1}{##2}}% these are parameters of \writexrdef
@@ -8850,6 +8886,7 @@ end
     % include an _ in the xref name, etc.
     \indexnofonts
     \turnoffactive
+    \def\value##1{##1}%
     \expandafter\global\expandafter\let\expandafter\Xthisreftitle
       \csname XR#1-title\endcsname
   }%
@@ -8990,14 +9027,14 @@ end
   \fi\fi\fi
 }
 
-% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
-% If its value is nonempty, SUFFIX is output afterward.
-%
+% \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME.  SUFFIX 
+% is output afterwards if non-empty.
 \def\refx#1#2{%
   \requireauxfile
   {%
     \indexnofonts
     \otherbackslash
+    \def\value##1{##1}%
     \expandafter\global\expandafter\let\expandafter\thisrefX
       \csname XR#1\endcsname
   }%
@@ -9022,16 +9059,18 @@ end
   #2% Output the suffix in any case.
 }
 
-% This is the macro invoked by entries in the aux file.  Usually it's
-% just a \def (we prepend XR to the control sequence name to avoid
-% collisions).  But if this is a float type, we have more work to do.
+% This is the macro invoked by entries in the aux file.  Define a control 
+% sequence for a cross-reference target (we prepend XR to the control sequence 
+% name to avoid collisions).  The value is the page number.  If this is a float 
+% type, we have more work to do.
 %
 \def\xrdef#1#2{%
-  {% The node name might contain 8-bit characters, which in our current
-   % implementation are changed to commands like @'e.  Don't let these
-   % mess up the control sequence name.
+  {% Expand the node or anchor name to remove control sequences.
+   % \turnoffactive stops 8-bit characters being changed to commands
+   % like @'e.  \refx does the same to retrieve the value in the definition.
     \indexnofonts
     \turnoffactive
+    \def\value##1{##1}%
     \xdef\safexrefname{#1}%
   }%
   %