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.
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.
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
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
--- /dev/null
+%% 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 {}
+}
--- /dev/null
+%% 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
+}
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
}
words = \lyricmode {
- Great is Thy faith- ful- ness,
+ Great is Thy faith -- ful -- ness,
}
\score {
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
}
\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 { }
}
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
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
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
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
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
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
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
--- /dev/null
+%% 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
+>>
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
@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
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
* 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}
@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}
@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}
@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}
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
@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:
Translation contributors:
-Jean-Charles Malahieude, Till Paala, Yoshiki Sawada
+Jean-Charles Malahieude, Till Paala, Yoshiki Sawada
@newsEnd
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
STEPMAKE_OPTIONAL_REQUIRED(CXX, c++, $1)
CXXFLAGS="$CXXFLAGS $OPTIMIZE"
- LD='$(CXX)'
AC_SUBST(CXX)
AC_SUBST(CXXFLAGS)
- AC_SUBST(LD)
])
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 */
#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,
public:
TRANSLATOR_DECLARATIONS (Ambitus_engraver);
protected:
- DECLARE_ACKNOWLEDGER (note_head);
+ void acknowledge_note_head (Grob_info);
void process_music ();
void stop_translation_timestep ();
}
}
-ADD_ACKNOWLEDGER (Ambitus_engraver, note_head);
+void
+Ambitus_engraver::boot ()
+{
+ ADD_ACKNOWLEDGER (Ambitus_engraver, note_head);
+}
+
ADD_TRANSLATOR (Ambitus_engraver,
/* doc */
"Create an ambitus.",
protected:
void process_music ();
void stop_translation_timestep ();
- DECLARE_TRANSLATOR_LISTENER (arpeggio);
+ void listen_arpeggio (Stream_event *);
private:
Item *arpeggio_;
Stream_event *arpeggio_event_;
arpeggio_event_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Arpeggio_engraver, arpeggio);
void Arpeggio_engraver::listen_arpeggio (Stream_event *ev)
{
ASSIGN_EVENT_ONCE (arpeggio_event_, ev);
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 */
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);
beam_settings_ = SCM_EOL;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Auto_beam_engraver, beam_forbid);
void
Auto_beam_engraver::listen_beam_forbid (Stream_event *ev)
{
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"
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
// 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)
{
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. "
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 *);
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 */
{
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 ();
void balloonify (Grob *, Stream_event *);
};
-IMPLEMENT_TRANSLATOR_LISTENER (Balloon_engraver, annotate_output);
void
Balloon_engraver::listen_annotate_output (Stream_event *ev)
{
}
}
-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 */
void stop_translation_timestep ();
void process_acknowledged ();
- DECLARE_END_ACKNOWLEDGER (spanner);
+ void acknowledge_end_spanner (Grob_info);
private:
void create_bar ();
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 */
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)
{
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 */
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 ();
#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 */
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_;
virtual bool valid_start_point ();
virtual bool valid_end_point ();
- DECLARE_TRANSLATOR_LISTENER (beam);
+ void listen_beam (Stream_event *);
public:
TRANSLATOR_DECLARATIONS (Beam_engraver);
};
prev_start_ev_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Beam_engraver, beam);
void
Beam_engraver::listen_beam (Stream_event *ev)
{
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 */
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 ();
/*
Ugh, C&P code.
*/
-IMPLEMENT_TRANSLATOR_LISTENER (Grace_beam_engraver, beam);
void
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 */
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_;
now_stop_ev_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Beam_performer, beam);
void
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 */
"",
{
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 ();
fall_event_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Bend_engraver, bend_after);
void
Bend_engraver::listen_bend_after (Stream_event *ev)
{
}
}
-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 */
}
-const char Book::type_p_name_[] = "ly:book?";
+const char * const Book::type_p_name_ = "ly:book?";
/****************************************************************/
-const char Box::type_p_name_[] = "ly:box?";
+const char * const Box::type_p_name_ = "ly:box?";
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
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}"
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_;
breathing_sign_event_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Breathing_sign_engraver, breathing);
void
Breathing_sign_engraver::listen_breathing (Stream_event *ev)
{
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.",
+++ /dev/null
-/*
- 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;
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_;
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)
{
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.",
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 ()
previous_stem_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Chord_tremolo_engraver, tremolo_span);
void
Chord_tremolo_engraver::listen_tremolo_span (Stream_event *ev)
{
}
}
-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.",
protected:
void stop_translation_timestep ();
void process_music ();
- DECLARE_ACKNOWLEDGER (bar_line);
+ void acknowledge_bar_line (Grob_info);
virtual void derived_mark () const;
private:
}
}
-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.",
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 ();
beacon_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Cluster_spanner_engraver, cluster_note);
void
Cluster_spanner_engraver::listen_cluster_note (Stream_event *ev)
{
}
}
-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.",
vector<Grob *> note_columns_;
protected:
- DECLARE_ACKNOWLEDGER (note_column);
+ void acknowledge_note_column (Grob_info);
void process_acknowledged ();
void stop_translation_timestep ();
public:
col_ = 0;
}
-ADD_ACKNOWLEDGER (Collision_engraver, note_column);
+
+void
+Collision_engraver::boot ()
+{
+ ADD_ACKNOWLEDGER (Collision_engraver, note_column);
+}
ADD_TRANSLATOR (Collision_engraver,
/* doc */
void start_translation_timestep ();
void process_music ();
void stop_translation_timestep ();
- DECLARE_TRANSLATOR_LISTENER (note);
+ void listen_note (Stream_event *);
};
void
is_first_ = false;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Completion_heads_engraver, note);
void
Completion_heads_engraver::listen_note (Stream_event *ev)
{
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"
void start_translation_timestep ();
void process_music ();
void stop_translation_timestep ();
- DECLARE_TRANSLATOR_LISTENER (rest);
+ void listen_rest (Stream_event *);
};
void
is_first_ = false;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Completion_rest_engraver, rest);
void
Completion_rest_engraver::listen_rest (Stream_event *ev)
{
{
}
+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"
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 ();
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 */
{
}
-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
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
{
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);
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
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
add_text (Audio_text::TEXT, id_string);
}
+void
+Control_track_performer::boot ()
+{
+
+}
+
ADD_TRANSLATOR (Control_track_performer,
/* doc */
"",
protected:
void stop_translation_timestep ();
void process_music ();
- DECLARE_ACKNOWLEDGER (bar_line);
+ void acknowledge_bar_line (Grob_info);
virtual void derived_mark () const;
private:
}
}
-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.",
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 ();
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 */
#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"
#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 ()
{
protected:
- DECLARE_ACKNOWLEDGER (rhythmic_head);
+ void acknowledge_rhythmic_head (Grob_info);
void stop_translation_timestep ();
};
}
}
-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"
class Dots_engraver : public Engraver
{
- DECLARE_ACKNOWLEDGER (rhythmic_head);
+ void acknowledge_rhythmic_head (Grob_info);
TRANSLATOR_DECLARATIONS (Dots_engraver);
};
}
}
-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"
// moment (global time) where percent started
Moment start_mom_;
- DECLARE_TRANSLATOR_LISTENER (double_percent);
+ void listen_double_percent (Stream_event *);
void process_music ();
};
percent_event_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Double_percent_repeat_engraver, double_percent);
void
Double_percent_repeat_engraver::listen_double_percent (Stream_event *ev)
{
}
}
+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.",
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 ();
};
{
}
-IMPLEMENT_TRANSLATOR_LISTENER (Drum_notes_engraver, note);
void
Drum_notes_engraver::listen_note (Stream_event *ev)
{
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 */
protected:
void stop_translation_timestep ();
void process_music ();
- DECLARE_TRANSLATOR_LISTENER (note);
+ void listen_note (Stream_event *);
private:
vector<Stream_event *> note_evs_;
};
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.",
return s;
}
-const char Duration::type_p_name_[] = "ly:duration?";
+const char * const Duration::type_p_name_ = "ly:duration?";
int
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 ();
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)
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.",
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 ();
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)
{
ASSIGN_EVENT_ONCE (accepted_spanevents_drul_[d], ev);
}
-IMPLEMENT_TRANSLATOR_LISTENER (Dynamic_engraver, break_span);
void
Dynamic_engraver::listen_break_span (Stream_event *event)
{
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.",
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_;
= span_events_[RIGHT] = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Dynamic_performer, decrescendo);
void
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)
{
grow_dir_[d] = BIGGER;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Dynamic_performer, absolute_dynamic);
void
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 */
"",
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 ();
event_drul_.set (0, 0);
}
-IMPLEMENT_TRANSLATOR_LISTENER (Episema_engraver, episema);
void
Episema_engraver::listen_episema (Stream_event *ev)
{
}
}
-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 */
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 ();
ev_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Extender_engraver, extender);
void
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 */)
{
}
}
-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.",
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;
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)
{
}
}
+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.",
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 ();
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 */
public:
TRANSLATOR_DECLARATIONS (Fingering_column_engraver);
protected:
- DECLARE_ACKNOWLEDGER (finger);
+ void acknowledge_finger (Grob_info);
void process_acknowledged ();
void stop_translation_timestep ();
};
}
}
-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"
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)
{
{
}
-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 */
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
TRANSLATOR_DECLARATIONS (Font_size_engraver);
protected:
- DECLARE_ACKNOWLEDGER (font);
+ void acknowledge_font (Grob_info);
void process_music ();
Real size;
private:
#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.",
{
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_;
}
}
-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 */
}
}
+void
+Forbid_line_break_engraver::boot ()
+{
+
+}
+
ADD_TRANSLATOR (Forbid_line_break_engraver,
/* doc */
"Forbid line breaks when note heads are still playing at some"
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_;
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)
{
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"
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 ();
stop_glissandi_ = false;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Glissando_engraver, glissando);
void
Glissando_engraver::listen_glissando (Stream_event *ev)
{
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.",
Engraver::derived_mark ();
}
+void
+Grace_engraver::boot ()
+{
+
+}
+
ADD_TRANSLATOR (Grace_engraver,
/* doc */
"Set font size and other properties for grace notes.",
grace_spacing_ = 0;
}
+void
+Grace_spacing_engraver::boot ()
+{
+
+}
+
ADD_TRANSLATOR (Grace_spacing_engraver,
"Bookkeeping of shortest starting and playing notes in grace"
" note runs.",
public:
TRANSLATOR_DECLARATIONS (Grid_line_span_engraver);
protected:
- DECLARE_ACKNOWLEDGER (grid_point);
+ void acknowledge_grid_point (Grob_info);
void 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"
{
}
+void
+Grid_point_engraver::boot ()
+{
+
+}
+
ADD_TRANSLATOR (Grid_point_engraver,
/* doc */
"Generate grid points.",
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
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 ();
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"
#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
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 ()
push_count_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Horizontal_bracket_engraver, note_grouping);
void
Horizontal_bracket_engraver::listen_note_grouping (Stream_event *ev)
{
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"
protected:
- DECLARE_ACKNOWLEDGER (lyric_syllable);
- DECLARE_TRANSLATOR_LISTENER (hyphen);
+ void acknowledge_lyric_syllable (Grob_info);
+ void listen_hyphen (Stream_event *);
virtual void finalize ();
finished_hyphen_->set_bound (RIGHT, item);
}
-IMPLEMENT_TRANSLATOR_LISTENER (Hyphen_engraver, hyphen);
void
Hyphen_engraver::listen_hyphen (Stream_event *ev)
{
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 */
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,
{
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_;
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:
: 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)
{
: 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)
{
: 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)
{
{
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)
{
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:
{
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:
/*
{
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:
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;
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. */
{
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);
(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
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);
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,
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_;
#define INTERFACE_HH
#include "lily-guile.hh"
+#include "protected-scm.hh"
class Grob;
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 */
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);
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;
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,
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);
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;
#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;
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&);
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_;
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) { }
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);
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 (); }
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_;
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);
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);
{
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 */
{
public:
SCM mark_smob () const;
- static const char type_p_name_[];
+ static const char * const type_p_name_;
virtual ~Paper_book ();
private:
SCM systems_;
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_;
class Paper_outputter : public Smob<Paper_outputter>
{
public:
- static const char * const type_p_name_; // = 0
SCM mark_smob () const;
virtual ~Paper_outputter ();
private:
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_;
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);
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 */
struct Scale : public Smob<Scale>
{
- static const char * const type_p_name_; // = 0
virtual ~Scale ();
Scale (vector<Rational> const &);
Scale (Scale const &);
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);
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_;
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;
{
public:
SCM mark_smob () const;
- static const char type_p_name_[];
+ static const char * const type_p_name_;
virtual ~Score ();
private:
SCM music_;
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_;
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_;
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 ();
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);
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.
// 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);
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
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 ()
{
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_;
{
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_;
{
public:
SCM mark_smob () const;
- static const char type_p_name_[];
+ static const char * const type_p_name_;
private:
Box dim_;
SCM expr_;
{
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);
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 ();
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 \
} \
/* 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,
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 ();
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_;
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,
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 */
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 */
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.
/* 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
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 ();
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 */
text_ = 0;
}
+void
+Instrument_switch_engraver::boot ()
+{
+
+}
+
ADD_TRANSLATOR (Instrument_switch_engraver,
/* doc */
"Create a cue text for taking instrument.",
public:
TRANSLATOR_DECLARATIONS (Keep_alive_together_engraver);
- DECLARE_ACKNOWLEDGER (hara_kiri_group_spanner);
+ void acknowledge_hara_kiri_group_spanner (Grob_info);
virtual void 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 */
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
}
}
-IMPLEMENT_TRANSLATOR_LISTENER (Key_engraver, key_change);
void
Key_engraver::listen_key_change (Stream_event *ev)
{
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 */
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_;
}
}
-IMPLEMENT_TRANSLATOR_LISTENER (Key_performer, key_change);
void
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 */
"",
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 ()
{
}
-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 */
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);
};
lv_ties_.clear ();
}
-IMPLEMENT_TRANSLATOR_LISTENER (Laissez_vibrer_engraver, laissez_vibrer);
void
Laissez_vibrer_engraver::listen_laissez_vibrer (Stream_event *ev)
{
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.",
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 ();
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"
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);
Stream_event *previous_start_event_;
};
-IMPLEMENT_TRANSLATOR_LISTENER (Ligature_bracket_engraver, ligature);
void
Ligature_bracket_engraver::listen_ligature (Stream_event *ev)
{
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 */
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");
#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");
}
-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
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
#include "listener.hh"
-const char Listener::type_p_name_[] = "ly:listener?";
+const char * const Listener::type_p_name_ = "ly:listener?";
protected:
void stop_translation_timestep ();
void process_music ();
- DECLARE_TRANSLATOR_LISTENER (lyric);
+ void listen_lyric (Stream_event *);
public:
TRANSLATOR_DECLARATIONS (Lyric_engraver);
event_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Lyric_engraver, lyric);
void
Lyric_engraver::listen_lyric (Stream_event *ev)
{
event_ = 0;
}
+void
+Lyric_engraver::boot ()
+{
+ ADD_LISTENER (Lyric_engraver, lyric);
+}
+
ADD_TRANSLATOR (Lyric_engraver,
/* doc */
"Engrave text for lyrics.",
void stop_translation_timestep ();
void process_music ();
- DECLARE_TRANSLATOR_LISTENER (lyric);
+ void listen_lyric (Stream_event *);
private:
vector<Stream_event *> events_;
Audio_text *audio_;
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 */
"",
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 ()
text_ = make_item ("RehearsalMark", ev->self_scm ());
}
-IMPLEMENT_TRANSLATOR_LISTENER (Mark_engraver, mark);
void
Mark_engraver::listen_mark (Stream_event *ev)
{
}
}
-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 */
void process_music ();
virtual void finalize ();
- DECLARE_ACKNOWLEDGER (note_column);
+ void acknowledge_note_column (Grob_info);
};
void
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.",
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 ();
#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 */
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);
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
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 */
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 ()
tempo_ev_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Metronome_mark_engraver, tempo_change);
void
Metronome_mark_engraver::listen_tempo_change (Stream_event *ev)
{
}
}
-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 */
}
}
+void
+Midi_control_function_performer::boot ()
+{
+
+}
+
ADD_TRANSLATOR (Midi_control_function_performer,
/* doc */
"",
}
-const char Moment::type_p_name_[] = "ly:moment?";
+const char * const Moment::type_p_name_ = "ly:moment?";
int
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 *);
{
}
-IMPLEMENT_TRANSLATOR_LISTENER (Multi_measure_rest_engraver, multi_measure_rest);
void
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)
{
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"
#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
/****************************************************************/
-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
{
}
-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
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 *);
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 */
TRANSLATOR_DECLARATIONS (Note_head_line_engraver);
protected:
- DECLARE_ACKNOWLEDGER (rhythmic_head);
+ void acknowledge_rhythmic_head (Grob_info);
void process_acknowledged ();
void 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"
TRANSLATOR_DECLARATIONS (Note_heads_engraver);
protected:
- DECLARE_TRANSLATOR_LISTENER (note);
+ void listen_note (Stream_event *);
void process_music ();
void stop_translation_timestep ();
};
{
}
-IMPLEMENT_TRANSLATOR_LISTENER (Note_heads_engraver, note);
void
Note_heads_engraver::listen_note (Stream_event *ev)
{
note_evs_.clear ();
}
+void
+Note_heads_engraver::boot ()
+{
+ ADD_LISTENER (Note_heads_engraver, note);
+}
+
ADD_TRANSLATOR (Note_heads_engraver,
/* doc */
"Generate note heads.",
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)
{
{
}
+void
+Note_name_engraver::boot ()
+{
+ ADD_LISTENER (Note_name_engraver, note);
+}
+
ADD_TRANSLATOR (Note_name_engraver,
/* doc */
"Print pitches as words.",
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
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));
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)
{
}
}
+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 */
"",
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;
}
-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 */
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),
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;
+}
protected:
virtual void finalize ();
- DECLARE_ACKNOWLEDGER (note_column);
+ void acknowledge_note_column (Grob_info);
void process_music ();
void stop_translation_timestep ();
#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 */
}
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),
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)
{
{
}
-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.",
{
}
-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
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);
note_end_ = now_mom () + dur_ptr->get_length ();
}
-IMPLEMENT_TRANSLATOR_LISTENER (Page_turn_engraver, break);
void
Page_turn_engraver::listen_break (Stream_event *ev)
{
}
}
-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 */
{
}
-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
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)
{
}
}
-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 */
#include "lily-imports.hh"
-const char * const Paper_outputter::type_p_name_ = 0;
-
Paper_outputter::Paper_outputter (SCM port, const string &format)
{
file_ = port;
TRANSLATOR_DECLARATIONS (Parenthesis_engraver);
protected:
- DECLARE_ACKNOWLEDGER (grob);
+ void acknowledge_grob (Grob_info);
};
Parenthesis_engraver::Parenthesis_engraver ()
}
}
-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"
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;
embedded_scm
|
{
- SCM nn = parser->lexer_->lookup_identifier ("pitchnames");
- parser->lexer_->push_note_state (nn);
+ parser->lexer_->push_note_state (Lily::pitchnames);
}
composite_music
{
{
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 ();
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 ();
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");
}
$$ = 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");
}
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");
}
$$ = 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
$$ = $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 (@$);
$$ = 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 (@$);
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);
Stream_event *waiting_event_;
};
-IMPLEMENT_TRANSLATOR_LISTENER (Part_combine_engraver, part_combine);
void
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 *)
{
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"
Moment command_moment_;
virtual void finalize ();
- DECLARE_TRANSLATOR_LISTENER (percent);
+ void listen_percent (Stream_event *);
void start_translation_timestep ();
void stop_translation_timestep ();
}
}
-IMPLEMENT_TRANSLATOR_LISTENER (Percent_repeat_engraver, percent);
void
Percent_repeat_engraver::listen_percent (Stream_event *ev)
{
{
}
+void
+Percent_repeat_engraver::boot ()
+{
+ ADD_LISTENER (Percent_repeat_engraver, percent);
+}
+
ADD_TRANSLATOR (Percent_repeat_engraver,
/* doc */
"Make whole measure repeats.",
+#include "international.hh"
#include "program-option.hh"
#include "source-file.hh"
#include "memory-stream.hh"
}
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);
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 ();
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}.",
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 ();
}
}
-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 */
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 ();
info_list_[NUM_PEDAL_TYPES].type_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Piano_pedal_engraver, sostenuto);
void
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)
{
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)
{
}
}
+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.",
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];
}
}
-IMPLEMENT_TRANSLATOR_LISTENER (Piano_pedal_performer, sostenuto);
void
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)
{
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)
{
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 */
"",
{
public:
TRANSLATOR_DECLARATIONS (Pitch_squash_engraver);
- DECLARE_ACKNOWLEDGER (note_head);
+ void acknowledge_note_head (Grob_info);
};
void
}
#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"
notename_ = notename;
}
-const char Pitch::type_p_name_[] = "ly:pitch?";
+const char * const Pitch::type_p_name_ = "ly:pitch?";
SCM
Pitch::mark_smob () const
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:
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 */
#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)
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)
{
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;
}
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_);
}
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 ();
};
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.",
}
}
+void
+Repeat_acknowledge_engraver::boot ()
+{
+
+}
+
ADD_TRANSLATOR (Repeat_acknowledge_engraver,
/* doc */
"Acknowledge repeated music, and convert the contents of"
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);
semi_ties_.clear ();
}
-IMPLEMENT_TRANSLATOR_LISTENER (Repeat_tie_engraver, repeat_tie);
void
Repeat_tie_engraver::listen_repeat_tie (Stream_event *ev)
{
}
-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.",
rest_collision_ = 0;
}
+void
+Rest_collision_engraver::boot ()
+{
+
+}
+
ADD_TRANSLATOR (Rest_collision_engraver,
/* doc */
"Handle collisions of rests.",
protected:
void start_translation_timestep ();
void process_music ();
- DECLARE_TRANSLATOR_LISTENER (rest);
+ void listen_rest (Stream_event *);
public:
TRANSLATOR_DECLARATIONS (Rest_engraver);
};
}
}
-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.",
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 ();
};
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 */
return SCM_UNSPECIFIED;
}
-const char * const Scale::type_p_name_ = 0;
-
int
Scale::step_count () const
{
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;
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
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]);
}
#include <cassert>
-const char * const Scheme_hash_table::type_p_name_ = 0;
-
SCM
Scheme_hash_table::make_smob ()
{
{
}
-const char Score::type_p_name_[] = "ly:score?";
+const char * const Score::type_p_name_ = "ly:score?";
SCM
Score::mark_smob () const
public:
TRANSLATOR_DECLARATIONS (Script_column_engraver);
protected:
- DECLARE_ACKNOWLEDGER (side_position);
+ void acknowledge_side_position (Grob_info);
void process_acknowledged ();
void stop_translation_timestep ();
};
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"
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);
{
}
-IMPLEMENT_TRANSLATOR_LISTENER (Script_engraver, articulation);
void
Script_engraver::listen_articulation (Stream_event *ev)
{
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 */
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 ();
};
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.",
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 ();
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 */
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);
/****************************************************************/
-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
protected:
Stream_event *slash_;
protected:
- DECLARE_TRANSLATOR_LISTENER (repeat_slash);
+ void listen_repeat_slash (Stream_event *);
void process_music ();
};
slash_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Slash_repeat_engraver, repeat_slash);
void
Slash_repeat_engraver::listen_repeat_slash (Stream_event *ev)
{
}
}
+void
+Slash_repeat_engraver::boot ()
+{
+ ADD_LISTENER (Slash_repeat_engraver, repeat_slash);
+}
+
ADD_TRANSLATOR (Slash_repeat_engraver,
/* doc */
"Make beat repeats.",
{
virtual void set_melisma (bool);
-protected:
- DECLARE_TRANSLATOR_LISTENER (slur);
- DECLARE_TRANSLATOR_LISTENER (note);
-
public:
SCM event_symbol ();
TRANSLATOR_DECLARATIONS (Slur_engraver);
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.",
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_;
now_stop_ev_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Slur_performer, slur);
void
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 */
"",
/****************************************************************/
-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
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 ();
start_section_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Spacing_engraver, spacing_section);
void
Spacing_engraver::listen_spacing_section (Stream_event *ev)
{
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 */
{
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 ();
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.",
public:
TRANSLATOR_DECLARATIONS (Span_bar_engraver);
protected:
- DECLARE_ACKNOWLEDGER (bar_line);
+ void acknowledge_bar_line (Grob_info);
void stop_translation_timestep ();
void process_acknowledged ();
};
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"
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;
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.",
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 ();
};
{
}
-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.",
return s->smobbed_copy ();
}
-const char Spring::type_p_name_[] = "ly:spring?";
+const char * const Spring::type_p_name_ = "ly:spring?";
{
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 ()
#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 */
int Staff_performer::channel_count_ = 0;
int Staff_performer::staff_performer_count_ = 0;
+void
+Staff_performer::boot ()
+{
+
+}
+
ADD_TRANSLATOR (Staff_performer,
/* doc */
"",
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;
span_events_.set (0, 0);
}
-IMPLEMENT_TRANSLATOR_LISTENER (Staff_symbol_engraver, staff_span);
void
Staff_symbol_engraver::listen_staff_span (Stream_event *ev)
{
}
}
-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 */
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 ();
};
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 */
void process_music ();
virtual void derived_mark () const;
void stop_translation_timestep ();
- DECLARE_ACKNOWLEDGER (lyric_syllable);
+ void acknowledge_lyric_syllable (Grob_info);
};
void
#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.",
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 ();
tremolo_ev_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Stem_engraver, tuplet_span);
void
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 */
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
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 ();
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 */
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 ();
{
}
-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)
{
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"
public:
TRANSLATOR_DECLARATIONS (Tab_staff_symbol_engraver);
protected:
- DECLARE_ACKNOWLEDGER (staff_symbol);
+ void acknowledge_staff_symbol (Grob_info);
};
void
#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"
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 ();
};
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 */
}
}
+void
+Tempo_performer::boot ()
+{
+
+}
+
ADD_TRANSLATOR (Tempo_performer,
/* doc */
"",
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)
{
{
}
-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 */
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 ();
event_drul_.set (0, 0);
}
-IMPLEMENT_TRANSLATOR_LISTENER (Text_spanner_engraver, text_span);
void
Text_spanner_engraver::listen_text_span (Stream_event *ev)
{
}
}
-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 */
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 &);
event_processed_ = false;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Tie_engraver, tie);
void
Tie_engraver::listen_tie (Stream_event *ev)
{
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.",
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);
};
event_ = 0;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Tie_performer, tie);
void
Tie_performer::listen_tie (Stream_event *ev)
{
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.",
void process_music ();
public:
TRANSLATOR_DECLARATIONS (Time_signature_engraver);
- DECLARE_TRANSLATOR_LISTENER (time_signature);
+ void listen_time_signature (Stream_event *);
};
void
last_time_fraction_ = SCM_BOOL_F;
}
-IMPLEMENT_TRANSLATOR_LISTENER (Time_signature_engraver, time_signature);
void
Time_signature_engraver::listen_time_signature (Stream_event *ev)
{
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"
#include "translator.icc"
+void
+Time_signature_performer::boot ()
+{
+
+}
+
ADD_TRANSLATOR (Time_signature_performer,
/* doc */
"",
#include "translator.icc"
+void
+Timing_translator::boot ()
+{
+
+}
+
ADD_TRANSLATOR (Timing_translator,
/* doc */
"This engraver adds the alias @code{Timing} to its containing"
#include "engraver.hh"
-const char * const Engraver_dispatch_list::type_p_name_ = 0;
-
void
Engraver_dispatch_list::apply (Grob_info gi)
{
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));
}
-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
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
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);
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 ();
event_drul_.set (0, 0);
}
-IMPLEMENT_TRANSLATOR_LISTENER (Trill_spanner_engraver, trill_span);
void
Trill_spanner_engraver::listen_trill_span (Stream_event *ev)
{
}
}
-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 */
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)
{
{
}
-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.",
TRANSLATOR_DECLARATIONS (Tweak_engraver);
protected:
- DECLARE_ACKNOWLEDGER (grob);
+ void acknowledge_grob (Grob_info);
};
Tweak_engraver::Tweak_engraver ()
}
}
-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,"
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:
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),
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.
}
};
-const char * const Unpure_pure_call::type_p_name_ = 0;
-
SCM
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),
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
#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"
public:
TRANSLATOR_DECLARATIONS (Vertical_align_engraver);
- DECLARE_ACKNOWLEDGER (axis_group);
+ void acknowledge_axis_group (Grob_info);
protected:
virtual void derived_mark () const;
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"
TRANSLATOR_DECLARATIONS (Volta_engraver);
protected:
- DECLARE_ACKNOWLEDGER (bar_line);
+ void acknowledge_bar_line (Grob_info);
virtual void derived_mark () const;
void 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.",
%}
-\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"
%}
-\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"
</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>
#, 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"
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 ""
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 ""
#. 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 ""
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 ""
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 ""
"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 ""
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 ""
"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 ""
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 ""
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 ""
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 ""
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 ""
msgid "Found infinity or nan in output. Substituting 0.0"
msgstr ""
-#: glissando-engraver.cc:158
+#: glissando-engraver.cc:157
msgid "unterminated glissando"
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 ""
msgid "position unknown"
msgstr ""
-#: key-engraver.cc:197
+#: key-engraver.cc:196
msgid "Incomplete keyAlterationOrder for key signature"
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 ""
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"
"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 ""
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 ""
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?"
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 ""
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 ""
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 ""
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 ""
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 ""
#.
#. 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 ""
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 ""
msgid "ascending vaticana style flexa"
msgstr ""
-#: vertical-align-engraver.cc:95
+#: vertical-align-engraver.cc:100
msgid "Ignoring Vertical_align_engraver in VerticalAxisGroup"
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"
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 ""
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 ""
;; 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}.
(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)
((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
(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)
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)))))
;;; 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.
((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)
""))))
;;
(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
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)
(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))))
(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)
(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))))))))
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"
@relocate-preamble@
"""
-import midi
import lilylib as ly
global _;_=ly._
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
$(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)
$(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)
% 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.
%
% PDF outline support
%
- \pdfmakepagedesttrue \relax
% Emulate the primitive of pdfTeX
\def\pdfdest name#1 xyz{%
\special{pdf:dest (name#1) [@thispage /XYZ @xpos @ypos]}%
% @{ @} @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
\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.
%
\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{%
%
% 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.
\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}
% 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
% 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
}
\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.
% 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.
{%
\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
% include an _ in the xref name, etc.
\indexnofonts
\turnoffactive
+ \def\value##1{##1}%
\expandafter\global\expandafter\let\expandafter\Xthisreftitle
\csname XR#1-title\endcsname
}%
\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
}%
#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}%
}%
%