]> git.donarmstrong.com Git - lilypond.git/commitdiff
This commit was manufactured by cvs2svn to create branch 'lilypond_2_2'.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 20 Jun 2004 19:53:35 +0000 (19:53 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 20 Jun 2004 19:53:35 +0000 (19:53 +0000)
982 files changed:
.cvsignore
ChangeLog
Documentation/bibliography/computer-notation.bib
Documentation/index.html.in
Documentation/topdocs/NEWS.texi
Documentation/user/GNUmakefile
Documentation/user/changing-defaults.itely
Documentation/user/cheatsheet.itely
Documentation/user/dedication.itely
Documentation/user/introduction.itely
Documentation/user/invoking.itexi
Documentation/user/lilypond-book.itely
Documentation/user/lilypond.tely
Documentation/user/macros.itexi
Documentation/user/music-glossary.tely
Documentation/user/notation.itely
Documentation/user/preface.itely
Documentation/user/programming-interface.itely
Documentation/user/tutorial.itely
THANKS
VERSION
autogen.sh
buildscripts/guile-gnome.sh [deleted file]
buildscripts/lilypond-profile.sh
buildscripts/lilypond-words.py
buildscripts/mf-to-table.py
buildscripts/mutopia-index.py
config.hh.in
config.make.in
configure.in
cygwin/lily-wins.py
cygwin/mknetrel
elisp/lilypond-font-lock.el
elisp/lilypond-mode.el
flower/axis.cc
flower/file-name.cc [deleted file]
flower/file-path.cc
flower/include/axes.hh
flower/include/file-name.hh [deleted file]
flower/include/file-path.hh
flower/include/flower-proto.hh
flower/include/offset.hh
flower/include/string.hh
flower/include/virtual-methods.hh
flower/include/warn.hh
flower/offset.cc
flower/parse-afm.cc
flower/warn.cc
input/GNUmakefile
input/example-1.ly
input/example-2.ly
input/example-3.ly
input/les-nereides.ly
input/mutopia-header.ly
input/mutopia/E.Satie/petite-ouverture-a-danser.ly
input/mutopia/F.Schubert/morgenlied.ly
input/mutopia/F.Schubert/standchen.ly
input/mutopia/J.S.Bach/baerenreiter-sarabande.ly
input/mutopia/J.S.Bach/bwv940.ly
input/mutopia/J.S.Bach/wtk1-fugue2.ly
input/mutopia/R.Schumann/romanze-op28-2.ly
input/mutopia/W.A.Mozart/mozart-hrn-3.ly
input/mutopia/W.A.Mozart/mozart-hrn3-allegro.ly
input/mutopia/W.A.Mozart/mozart-hrn3-defs.ly
input/mutopia/W.A.Mozart/mozart-hrn3-romanze.ly
input/mutopia/W.A.Mozart/mozart-hrn3-rondo.ly
input/no-notation/midi-volume-equaliser.ly
input/no-notation/recording.ly
input/puer-fragment.ly
input/regression/+.ly
input/regression/accidental-cautionary.ly
input/regression/accidental-double.ly
input/regression/accidental-ledger.ly
input/regression/accidental-octave.ly
input/regression/accidental-placement.ly
input/regression/accidental-quarter.ly
input/regression/accidental-single-double.ly
input/regression/accidental-tie.ly
input/regression/accidental-unbroken-tie-spacing.ly
input/regression/accidental-voice.ly
input/regression/accidental.ly
input/regression/accidentals.ly
input/regression/ambitus.ly
input/regression/apply-context.ly
input/regression/apply-output.ly
input/regression/arpeggio-bracket.ly
input/regression/arpeggio-collision.ly
input/regression/arpeggio.ly
input/regression/auto-beam-bar.ly
input/regression/auto-beam-no-beam.ly
input/regression/auto-beam-triplet.ly
input/regression/auto-beam-tuplets.ly
input/regression/auto-beam.ly
input/regression/auto-change.ly
input/regression/balloon.ly
input/regression/bar-check-redefine.ly [deleted file]
input/regression/bar-number.ly
input/regression/bar-scripts.ly
input/regression/beam-auto-knee.ly
input/regression/beam-break.ly
input/regression/beam-center-slope.ly
input/regression/beam-concave.ly
input/regression/beam-cross-staff-auto-knee.ly
input/regression/beam-cross-staff-slope.ly
input/regression/beam-cross-staff.ly
input/regression/beam-damp.ly
input/regression/beam-default-lengths.ly
input/regression/beam-extreme.ly
input/regression/beam-french.ly
input/regression/beam-funky-beamlet.ly
input/regression/beam-funky.ly
input/regression/beam-knee-symmetry.ly
input/regression/beam-length.ly
input/regression/beam-manual-beaming.ly
input/regression/beam-multiple-cross-staff.ly
input/regression/beam-over-barline.ly
input/regression/beam-position.ly
input/regression/beam-postfix-notation.ly
input/regression/beam-quanting-32nd.ly
input/regression/beam-quanting-horizontal.ly
input/regression/beam-quarter.ly
input/regression/beam-rest.ly
input/regression/beam-second.ly
input/regression/beam-shortened-lengths.ly
input/regression/beamed-chord.ly
input/regression/beaming-ternary-metrum.ly
input/regression/beaming.ly
input/regression/beams.ly
input/regression/between-systems.ly [new file with mode: 0644]
input/regression/break.ly
input/regression/breathing-sign-ancient.ly
input/regression/breathing-sign.ly
input/regression/chord-changes.ly
input/regression/chord-name-entry-11.ly
input/regression/chord-name-entry.ly
input/regression/chord-name-exceptions.ly
input/regression/chord-name-major7.ly
input/regression/chord-names-bass.ly
input/regression/chord-scripts.ly
input/regression/chord-tremolo-short.ly
input/regression/chord-tremolo.ly
input/regression/chords-funky-ignatzek.ly
input/regression/clef-oct.ly
input/regression/clefs.ly
input/regression/cluster-cross-staff.ly
input/regression/cluster.ly
input/regression/collision-2.ly
input/regression/collision-dots-invert.ly
input/regression/collision-dots-move.ly
input/regression/collision-dots.ly
input/regression/collision-head-chords.ly
input/regression/collision-heads.ly
input/regression/collision-merge-differently-dotted.ly
input/regression/collision-merge-dots.ly
input/regression/collision-mesh.ly
input/regression/collisions.ly
input/regression/completion-heads-polyphony.ly
input/regression/completion-heads.ly
input/regression/custos.ly
input/regression/dot-flag-collision.ly
input/regression/dots.ly
input/regression/drums.ly
input/regression/dynamics-broken-hairpin.ly
input/regression/dynamics-glyphs.ly
input/regression/dynamics-line.ly
input/regression/dynamics-unbound-hairpin.ly
input/regression/easy-notation.ly
input/regression/figured-bass.ly
input/regression/finger-chords.ly
input/regression/fingering.ly
input/regression/follow-voice-break.ly
input/regression/font-magnification.ly
input/regression/font-name.ly
input/regression/generic-output-property.ly
input/regression/glissando.ly
input/regression/grace-auto-beam.ly
input/regression/grace-bar-line.ly
input/regression/grace-bar-number.ly
input/regression/grace-beam.ly
input/regression/grace-end.ly
input/regression/grace-nest.ly
input/regression/grace-nest1.ly
input/regression/grace-nest2.ly
input/regression/grace-nest3.ly
input/regression/grace-nest4.ly
input/regression/grace-nest5.ly
input/regression/grace-part-combine.ly
input/regression/grace-staff-length.ly
input/regression/grace-start.ly
input/regression/grace-stems.ly
input/regression/grace-sync.ly
input/regression/grace-types.ly
input/regression/grace-unfold-repeat.ly
input/regression/grace-volta-repeat-2.ly
input/regression/grace-volta-repeat.ly
input/regression/grace.ly
input/regression/hairpin-dashed.ly
input/regression/hairpin-ending.ly
input/regression/hara-kiri-pianostaff.ly
input/regression/instrument-name-markup.ly
input/regression/instrument-name-partial.ly
input/regression/instrument-name.ly
input/regression/key-clefs.ly
input/regression/key-signature-scordatura.ly
input/regression/keys.ly
input/regression/lily-in-scheme.ly [deleted file]
input/regression/lyric-combine-new.ly
input/regression/lyric-combine-polyphonic.ly
input/regression/lyric-combine.ly
input/regression/lyric-extender-broken.ly
input/regression/lyric-extender.ly
input/regression/lyric-hyphen-break.ly
input/regression/lyric-hyphen.ly
input/regression/lyric-phrasing.ly
input/regression/lyrics-bar.ly
input/regression/lyrics-melisma-beam.ly
input/regression/markup-note.ly
input/regression/markup-stack.ly
input/regression/markup-user.ly
input/regression/measure-grouping.ly
input/regression/mensural.ly
input/regression/metronome-marking.ly
input/regression/mm-rests2.ly
input/regression/molecule-hacking.ly
input/regression/multi-measure-rest-center.ly
input/regression/multi-measure-rest-grace.ly
input/regression/multi-measure-rest-instr-name.ly
input/regression/multi-measure-rest-multi-staff-center.ly
input/regression/multi-measure-rest-spacing.ly
input/regression/multi-measure-rest-text.ly
input/regression/multi-measure-rest.ly
input/regression/music-function.ly [deleted file]
input/regression/music-map.ly
input/regression/new-markup-scheme.ly
input/regression/new-markup-syntax.ly
input/regression/newaddlyrics.ly [deleted file]
input/regression/non-empty-text.ly
input/regression/note-group-bracket.ly
input/regression/note-head-chord.ly
input/regression/note-head-harmonic.ly
input/regression/note-head-style.ly
input/regression/note-line.ly
input/regression/number-staff-lines.ly
input/regression/ottava-broken.ly
input/regression/ottava.ly
input/regression/part-combine-a2.ly
input/regression/part-combine-cross.ly
input/regression/part-combine-global.ly
input/regression/part-combine-solo-end.ly [deleted file]
input/regression/part-combine-solo-global.ly
input/regression/part-combine-solo.ly
input/regression/part-combine-text.ly
input/regression/part-combine.ly
input/regression/pedal-bracket.ly
input/regression/pedal-end.ly
input/regression/pedal-ped.ly
input/regression/phrasing-slur.ly
input/regression/prefatory-empty-spacing.ly
input/regression/prefatory-spacing-matter.ly
input/regression/property-grace-polyphony.ly
input/regression/property-once.ly
input/regression/quote-transposition.ly
input/regression/quote.ly
input/regression/rehearsal-mark-letter.ly
input/regression/rehearsal-mark-number.ly
input/regression/repeat-fold.ly
input/regression/repeat-line-break.ly
input/regression/repeat-percent-skipbars.ly
input/regression/repeat-percent.ly
input/regression/repeat-slash.ly
input/regression/repeat-unfold-all.ly
input/regression/repeat-unfold-tremolo.ly
input/regression/repeat-unfold.ly
input/regression/repeat-volta-skip-alternatives.ly
input/regression/repeat-volta.ly
input/regression/rest-collision-beam.ly
input/regression/rest-collision.ly
input/regression/rest-ledger.ly
input/regression/rest-pitch.ly
input/regression/rest-polyphonic.ly
input/regression/rest.ly
input/regression/rhythmic-staff.ly
input/regression/script-collision.ly
input/regression/script-stack-order.ly
input/regression/script-stacked.ly
input/regression/size11.ly
input/regression/size13.ly
input/regression/size16.ly
input/regression/size20.ly
input/regression/size23.ly
input/regression/size26.ly
input/regression/slur-area.ly
input/regression/slur-attachment.ly
input/regression/slur-broken-trend.ly
input/regression/slur-cross-staff.ly
input/regression/slur-dots.ly
input/regression/slur-nice.ly
input/regression/slur-rest.ly
input/regression/slur-staccato.ly
input/regression/slur-stem-broken.ly
input/regression/slur-symmetry-1.ly
input/regression/slur-symmetry.ly
input/regression/spacing-accidental-staffs.ly
input/regression/spacing-accidental-stretch.ly
input/regression/spacing-accidental.ly
input/regression/spacing-bar-stem.ly
input/regression/spacing-clef-first-note.ly
input/regression/spacing-end-of-line.ly
input/regression/spacing-ended-voice.ly
input/regression/spacing-folded-clef.ly
input/regression/spacing-folded-clef2.ly
input/regression/spacing-grace-duration.ly
input/regression/spacing-grace.ly
input/regression/spacing-knee.ly
input/regression/spacing-multi-tuplet.ly
input/regression/spacing-note-flags.ly
input/regression/spacing-ragged-last.ly
input/regression/spacing-rest.ly
input/regression/spacing-short-notes.ly
input/regression/spacing-stem-bar.ly
input/regression/spacing-stem-direction.ly
input/regression/spacing-stem-same-direction.ly
input/regression/spacing-to-grace.ly
input/regression/spacing-very-tight.ly
input/regression/span-bar-break.ly [deleted file]
input/regression/span-bar.ly
input/regression/staccato-pos.ly
input/regression/staff-halfway.ly
input/regression/staff-mixed-size.ly
input/regression/staff-tweak.ly
input/regression/stanza-number.ly
input/regression/stem-direction.ly
input/regression/stem-shorten.ly
input/regression/stem-spacing.ly
input/regression/stem-tremolo.ly
input/regression/system-extents.ly
input/regression/system-start-bracket.ly
input/regression/tablature-string-tunings.ly
input/regression/tablature.ly
input/regression/tag-filter.ly
input/regression/text-spanner.ly
input/regression/tie-busy-grobs.ly
input/regression/tie-chord.ly
input/regression/tie-dots.ly
input/regression/tie-grace.ly
input/regression/tie.ly
input/regression/tuplet-beam.ly
input/regression/tuplet-gap.ly
input/regression/tuplet-nest.ly
input/regression/tuplet-properties.ly
input/regression/tuplet-rest.ly
input/regression/tuplet-slope.ly
input/regression/tuplet-staffline-collision.ly
input/regression/tuplets.ly
input/regression/voice-follower.ly
input/regression/volta-broken-left-edge.ly
input/regression/volta-multi-staff.ly
input/screech-boink.ly
input/simple-song.ly [deleted file]
input/simple.ly [deleted file]
input/template/gregorian-transcription.ly
input/template/header.ly
input/template/jazz-combo.ly
input/template/melody-chords.ly
input/template/melody-lyrics-chords.ly
input/template/melody-lyrics.ly
input/template/melody.ly
input/template/piano-4-voices.ly
input/template/piano-dynamics.ly
input/template/piano-lyrics.ly
input/template/piano-melody-lyrics.ly
input/template/piano.ly
input/template/satb.ly
input/test/+.ly
input/test/add-staccato.ly
input/test/add-text-script.ly
input/test/ambitus-mixed.ly
input/test/ancient-accidentals.ly
input/test/ancient-font.ly
input/test/ancient-time.ly
input/test/bagpipe.ly
input/test/bar-always.ly
input/test/bar-lines-lyric-only.ly
input/test/bar-lines.ly
input/test/bar-number-every-five-reset.ly
input/test/bar-number-regular-interval.ly
input/test/bar-number-show-all.ly
input/test/beam-alternate.ly
input/test/beam-auto-4-8.ly
input/test/beam-auto-override.ly
input/test/beam-auto.ly
input/test/beam-control.ly
input/test/beam-count.ly
input/test/beam-dir-functions.ly
input/test/beam-isknee.ly
input/test/beam-neutral-direction.ly
input/test/beam-rest.ly
input/test/blank-notes.ly
input/test/blank-paper-tab.ly
input/test/blank-paper.ly
input/test/boxed-molecule.ly [new file with mode: 0644]
input/test/boxed-stencil.ly [deleted file]
input/test/cadenza-skip.ly
input/test/caps.ly
input/test/cautionaries.ly
input/test/chord-names-german.ly
input/test/chord-names-jazz.ly
input/test/chord-names-no-inversions.ly
input/test/chords-without-melody.ly
input/test/clef-8-syntax.ly
input/test/clef-end-of-line.ly
input/test/clef-manual-control.ly
input/test/coriolan-margin.ly
input/test/count-systems.ly
input/test/crescendi.ly
input/test/cue-notes.ly
input/test/divisiones.ly
input/test/drarn-slurs.ly
input/test/drarn.ly
input/test/dynamic-absolute-volume.ly
input/test/dynamic-extra.ly
input/test/embedded-postscript.ly
input/test/embedded-scm.ly
input/test/embedded-tex.ly
input/test/engraver-contexts.ly
input/test/engraver-one-by-one.ly
input/test/extra-staff.ly
input/test/feathered-beam.ly [deleted file]
input/test/figured-bass-alternate.ly
input/test/fill-a4.ly [new file with mode: 0644]
input/test/follow-voice.ly
input/test/force-hshift.ly
input/test/fret-diagram.ly [deleted file]
input/test/gourlay.ly
input/test/gregorian-scripts.ly
input/test/harmonic.ly
input/test/header-ifelse.ly
input/test/hshift.ly
input/test/hymn.ly
input/test/improv.ly
input/test/incipit.ly
input/test/instrument-name-grandstaff.ly
input/test/ligature-vaticana.ly
input/test/lilypond-testpage.ly
input/test/lyric-hyphen-retain.ly
input/test/lyrics-skip-notes.ly
input/test/markup-score.ly [deleted file]
input/test/mensural-ligatures.ly
input/test/mensural-note-heads.ly
input/test/midi-scales.ly
input/test/move-accidentals.ly
input/test/move-specific-text.ly
input/test/music-box.ly
input/test/music-creation.ly
input/test/no-bar-lines.ly
input/test/no-staff.ly
input/test/ossia.ly
input/test/page-breaks.ly
input/test/part-combine.ly
input/test/partial-blank.ly
input/test/phrasing-slur-height.ly
input/test/piano-staff-distance.ly
input/test/polymetric-differing-notes.ly
input/test/polymetric.ly
input/test/preset-extent.ly
input/test/repeat-manual.ly
input/test/repeat-shorter-bracket.ly
input/test/repeat.ly
input/test/rest-dot-positions.ly
input/test/rests.ly
input/test/reverse-music.ly
input/test/rhythm-excercise.ly
input/test/scales-greek.ly
input/test/scheme-interactions.ly
input/test/script-abbreviations.ly
input/test/script-chart.ly
input/test/script-priority.ly
input/test/script-stack.ly
input/test/separate-staccato.ly
input/test/slur-attachment-override.ly
input/test/slur-beautiful.ly
input/test/slur-dash.ly
input/test/slur-manual.ly
input/test/slur-minimum-length.ly
input/test/slur-ugly.ly
input/test/smart-transpose.ly
input/test/spacing-2.ly
input/test/spanner-after-break-tweak.ly
input/test/staff-bracket.ly
input/test/staff-container.ly
input/test/staff-lines.ly
input/test/staff-size.ly
input/test/staff-space.ly
input/test/stem-cross-staff.ly
input/test/stem-extend.ly
input/test/stem-length.ly
input/test/tablature-hammer.ly
input/test/tablature.ly
input/test/temporary-stave.ly
input/test/text-rotate.ly
input/test/text-spanner.ly
input/test/textscript.ly
input/test/tie-cross-voice.ly
input/test/time-signature-double.ly
input/test/time.ly
input/test/timing.ly
input/test/title-markup.ly
input/test/title.ly
input/test/to-xml.ly
input/test/transposition.ly
input/test/trill.ly
input/test/trills.ly
input/test/unfold-all-repeats.ly
input/test/version-output.ly
input/test/vertical-extent.ly
input/twinkle-pop.ly
input/wilhelmus.ly
lily/accidental-engraver.cc
lily/accidental-placement.cc
lily/accidental.cc
lily/afm.cc
lily/align-interface.cc
lily/all-font-metrics.cc
lily/ambitus-engraver.cc
lily/ambitus.cc
lily/apply-context-iterator.cc
lily/arpeggio-engraver.cc
lily/arpeggio.cc
lily/audio-column.cc
lily/audio-element-info.cc
lily/auto-beam-engraver.cc
lily/auto-change-iterator.cc
lily/axis-group-engraver.cc
lily/axis-group-interface.cc
lily/balloon.cc
lily/bar-engraver.cc
lily/bar-line.cc
lily/bar-number-engraver.cc
lily/beam-engraver.cc
lily/beam-performer.cc
lily/beam-quanting.cc
lily/beam.cc
lily/beaming-info.cc
lily/bezier-bow.cc
lily/book-paper-def.cc [deleted file]
lily/book.cc [deleted file]
lily/box.cc
lily/break-algorithm.cc
lily/break-align-engraver.cc
lily/break-align-interface.cc
lily/break-substitution.cc
lily/breathing-sign-engraver.cc
lily/breathing-sign.cc
lily/change-iterator.cc
lily/chord-name-engraver.cc
lily/chord-name.cc
lily/chord-tremolo-engraver.cc
lily/clef-engraver.cc
lily/clef.cc
lily/cluster-engraver.cc
lily/cluster.cc
lily/coherent-ligature-engraver.cc
lily/collision-engraver.cc
lily/completion-note-heads-engraver.cc
lily/context-def.cc
lily/context-scheme.cc
lily/context-specced-music-iterator.cc
lily/context.cc
lily/custos-engraver.cc
lily/custos.cc
lily/directional-element-interface.cc
lily/dot-column-engraver.cc
lily/dot-column.cc
lily/dots.cc
lily/drum-note-engraver.cc
lily/drum-note-performer.cc
lily/duration.cc
lily/dynamic-engraver.cc
lily/dynamic-performer.cc
lily/engraver-group-engraver.cc
lily/engraver.cc
lily/event-chord-iterator.cc
lily/event.cc
lily/extender-engraver.cc
lily/figured-bass-engraver.cc
lily/fingering-engraver.cc
lily/font-interface.cc
lily/font-metric.cc
lily/font-select.cc
lily/font-size-engraver.cc
lily/forbid-break-engraver.cc
lily/function-documentation.cc
lily/glissando-engraver.cc
lily/global-context.cc
lily/gourlay-breaking.cc
lily/grace-iterator.cc
lily/gregorian-ligature-engraver.cc
lily/gregorian-ligature.cc
lily/grob-info.cc
lily/grob-interface.cc
lily/grob-pq-engraver.cc
lily/grob-property.cc
lily/grob-scheme.cc
lily/grob.cc
lily/hairpin.cc
lily/hara-kiri-group-spanner.cc
lily/horizontal-bracket-engraver.cc
lily/horizontal-bracket.cc
lily/hyphen-engraver.cc
lily/identifier-smob.cc
lily/includable-lexer.cc
lily/include/afm.hh
lily/include/align-interface.hh
lily/include/all-font-metrics.hh
lily/include/audio-column.hh
lily/include/bezier.hh
lily/include/book-paper-def.hh [deleted file]
lily/include/book.hh [deleted file]
lily/include/box.hh
lily/include/coherent-ligature-engraver.hh
lily/include/context-def.hh
lily/include/context.hh
lily/include/dimensions.hh
lily/include/engraver.hh
lily/include/font-metric.hh
lily/include/global-context.hh
lily/include/grob.hh
lily/include/group-interface.hh
lily/include/input-file-results.hh [new file with mode: 0644]
lily/include/lily-guile.hh
lily/include/lily-proto.hh
lily/include/line-group-group-engraver.hh
lily/include/ly-module.hh
lily/include/ly-smobs.icc
lily/include/main.hh
lily/include/midi-def.hh [new file with mode: 0644]
lily/include/music-function.hh [deleted file]
lily/include/music-output-def.hh [new file with mode: 0644]
lily/include/music.hh
lily/include/my-lily-lexer.hh
lily/include/my-lily-parser.hh
lily/include/output-def.hh [deleted file]
lily/include/pangofc-afm-decoder.hh [deleted file]
lily/include/paper-book.hh
lily/include/paper-def.hh
lily/include/paper-line.hh [new file with mode: 0644]
lily/include/paper-outputter.hh
lily/include/paper-score.hh
lily/include/paper-system.hh [deleted file]
lily/include/parse-scm.hh
lily/include/performance.hh
lily/include/scaled-font-metric.hh
lily/include/score-engraver.hh
lily/include/score.hh
lily/include/smobs.hh
lily/include/source-file.hh
lily/include/source.hh
lily/include/stencil.hh
lily/include/text-item.hh
lily/include/tfm-reader.hh
lily/include/tfm.hh
lily/include/translator.hh
lily/include/virtual-font-metric.hh
lily/input-file-results.cc [new file with mode: 0644]
lily/input-smob.cc
lily/instrument-name-engraver.cc
lily/item.cc
lily/key-engraver.cc
lily/key-performer.cc
lily/key-signature-interface.cc
lily/kpath.cc
lily/lexer.ll
lily/ligature-bracket-engraver.cc
lily/ligature-engraver.cc
lily/lily-guile.cc
lily/line-interface.cc
lily/line-spanner.cc
lily/lookup.cc
lily/ly-module.cc
lily/lyric-combine-music-iterator.cc
lily/lyric-combine-music.cc
lily/lyric-engraver.cc
lily/lyric-extender.cc
lily/lyric-hyphen.cc
lily/lyric-performer.cc
lily/main.cc
lily/mark-engraver.cc
lily/measure-grouping-engraver.cc
lily/measure-grouping-spanner.cc
lily/melisma-translator.cc
lily/mensural-ligature-engraver.cc
lily/mensural-ligature.cc
lily/metronome-engraver.cc
lily/midi-def.cc
lily/midi-item.cc
lily/modified-font-metric.cc [deleted file]
lily/moment.cc
lily/multi-measure-rest-engraver.cc
lily/multi-measure-rest.cc
lily/music-function.cc [deleted file]
lily/music-iterator.cc
lily/music-output-def.cc [new file with mode: 0644]
lily/music-sequence.cc
lily/music-wrapper.cc
lily/music.cc
lily/my-lily-lexer.cc
lily/my-lily-parser.cc
lily/new-fingering-engraver.cc
lily/new-lyric-combine-music-iterator.cc
lily/note-collision.cc
lily/note-column.cc
lily/note-head-line-engraver.cc
lily/note-head.cc
lily/note-heads-engraver.cc
lily/note-name-engraver.cc
lily/note-spacing.cc
lily/ottava-bracket.cc
lily/ottava-engraver.cc
lily/output-def.cc [deleted file]
lily/output-property-engraver.cc
lily/pangofc-afm-decoder.cc [deleted file]
lily/paper-book.cc
lily/paper-column.cc
lily/paper-def.cc [new file with mode: 0644]
lily/paper-line.cc [new file with mode: 0644]
lily/paper-outputter.cc
lily/paper-score.cc
lily/paper-system.cc [deleted file]
lily/parse-scm.cc
lily/parser.yy
lily/part-combine-engraver.cc
lily/part-combine-iterator.cc
lily/percent-repeat-engraver.cc
lily/performance.cc
lily/performer-group-performer.cc
lily/phrasing-slur-engraver.cc
lily/piano-pedal-engraver.cc
lily/piano-pedal-performer.cc
lily/pitch-squash-engraver.cc
lily/pitch.cc
lily/property-iterator.cc
lily/protected-scm.cc
lily/quote-iterator.cc
lily/recording-group-engraver.cc
lily/relative-octave-music.cc
lily/repeat-acknowledge-engraver.cc
lily/repeated-music.cc
lily/rest-collision-engraver.cc
lily/rest-collision.cc
lily/rest-engraver.cc
lily/rest.cc
lily/rhythmic-column-engraver.cc
lily/rhythmic-head.cc
lily/scaled-font-metric.cc [new file with mode: 0644]
lily/scm-hash.cc
lily/scm-option.cc
lily/score-context.cc
lily/score-engraver.cc
lily/score-performer.cc
lily/score.cc
lily/script-column-engraver.cc
lily/script-column.cc
lily/script-engraver.cc
lily/script.cc
lily/self-aligment-interface.cc
lily/separating-group-spanner.cc
lily/separating-line-group-engraver.cc
lily/separation-item.cc
lily/sequential-iterator.cc
lily/side-position-interface.cc
lily/simple-spacer.cc
lily/simultaneous-music-iterator.cc
lily/slash-repeat-engraver.cc
lily/slur-bezier-bow.cc
lily/slur-engraver.cc
lily/slur-performer.cc
lily/slur.cc
lily/source-file.cc
lily/source.cc
lily/spaceable-grob.cc
lily/spacing-engraver.cc
lily/spacing-spanner.cc
lily/span-arpeggio-engraver.cc
lily/span-bar-engraver.cc
lily/span-bar.cc
lily/spring-smob.cc
lily/staff-collecting-engraver.cc
lily/staff-performer.cc
lily/staff-spacing.cc
lily/staff-symbol-engraver.cc
lily/staff-symbol-referencer.cc
lily/staff-symbol.cc
lily/stanza-number-engraver.cc
lily/stem-engraver.cc
lily/stem-tremolo.cc
lily/stem.cc
lily/stencil-scheme.cc
lily/stencil.cc
lily/sustain-pedal.cc
lily/system-start-delimiter-engraver.cc
lily/system-start-delimiter.cc
lily/system.cc
lily/tab-note-heads-engraver.cc
lily/tempo-performer.cc
lily/text-engraver.cc
lily/text-item.cc
lily/text-spanner-engraver.cc
lily/text-spanner.cc
lily/tfm-reader.cc
lily/tfm.cc
lily/tie-column.cc
lily/tie-engraver.cc
lily/tie-performer.cc
lily/tie.cc
lily/time-signature-engraver.cc
lily/time-signature-performer.cc
lily/time-signature.cc
lily/timing-engraver.cc
lily/timing-translator.cc
lily/translator-ctors.cc
lily/translator-group.cc
lily/translator-property.cc
lily/translator.cc
lily/tuplet-bracket.cc
lily/tuplet-engraver.cc
lily/unfolded-repeat-iterator.cc
lily/vaticana-ligature-engraver.cc
lily/vaticana-ligature.cc
lily/vertical-align-engraver.cc
lily/virtual-font-metric.cc
lily/volta-bracket.cc
lily/volta-engraver.cc
lily/warn.cc [new file with mode: 0644]
ly/a3-init.ly
ly/a4-init.ly
ly/accordion-defs-init.ly
ly/book-init-init.ly
ly/book-paper-defaults.ly [deleted file]
ly/catalan.ly
ly/center-init.ly
ly/chord-modifiers-init.ly
ly/declarations-init.ly
ly/deutsch.ly
ly/drumpitch-init.ly
ly/dynamic-scripts-init.ly
ly/english.ly
ly/engraver-init.ly
ly/espanol.ly
ly/generate-documentation.ly
ly/generate-interface-doc-init.ly
ly/grace-init.ly
ly/gregorian-init.ly
ly/init.ly
ly/italiano.ly
ly/legal-init.ly
ly/letter-init.ly
ly/midi-init.ly
ly/music-functions-init.ly [deleted file]
ly/nederlands.ly
ly/norsk.ly
ly/params-init.ly
ly/part-paper-init.ly
ly/performer-init.ly
ly/portugues.ly [deleted file]
ly/property-init.ly
ly/scale-definitions-init.ly
ly/script-init.ly
ly/spanners-init.ly
ly/suomi.ly
ly/svenska.ly
ly/tabloid-init.ly
ly/vlaams.ly [deleted file]
make/lilypond-vars.make
make/lilypond.redhat.spec.in
make/ly-vars.make
make/mutopia-rules.make
mf/GNUmakefile
mf/cmr.enc [deleted file]
mf/ecb.mf [deleted file]
mf/ecb10.mf [deleted file]
mf/feta-autometric.mf
mf/feta-beugel.mf
mf/feta-bolletjes.mf
mf/feta-braces-a.mf [deleted file]
mf/feta-braces-b.mf [deleted file]
mf/feta-braces-c.mf [deleted file]
mf/feta-braces-d.mf [deleted file]
mf/feta-braces-e.mf [deleted file]
mf/feta-braces-f.mf [deleted file]
mf/feta-braces-g.mf [deleted file]
mf/feta-braces-h.mf [deleted file]
mf/feta-braces-i.mf [deleted file]
mf/feta-braces00.mf [new file with mode: 0644]
mf/feta-braces10.mf [new file with mode: 0644]
mf/feta-braces20.mf [new file with mode: 0644]
mf/feta-braces30.mf [new file with mode: 0644]
mf/feta-braces40.mf [new file with mode: 0644]
mf/feta-braces50.mf [new file with mode: 0644]
mf/feta-braces60.mf [new file with mode: 0644]
mf/feta-braces70.mf [new file with mode: 0644]
mf/feta-braces80.mf [new file with mode: 0644]
mf/feta-din.mf
mf/feta-generic.mf
mf/feta-klef.mf
mf/feta-nummer-code.mf
mf/feta-nummer.mf
mf/feta-test11.mf
mf/feta-test13.mf
mf/feta-test16.mf
mf/feta-test20.mf
mf/feta-test23.mf
mf/feta-test26.mf
mf/feta11.mf
mf/feta13.mf
mf/feta14.mf
mf/feta16.mf
mf/feta18.mf
mf/feta20.mf
mf/feta23.mf
mf/feta26.mf
mf/parmesan-generic.mf
mf/parmesan11.mf
mf/parmesan13.mf
mf/parmesan14.mf
mf/parmesan16.mf
mf/parmesan18.mf
mf/parmesan20.mf
mf/parmesan23.mf
mf/parmesan26.mf
po/de.po
po/fi.po
po/fr.po
po/lilypond.pot
po/nl.po
ps/lilyponddefs.ps
ps/music-drawing-routines.ps
python/lilylib.py
python/midi.c
scm/bass-figure.scm
scm/define-grob-properties.scm
scm/define-grobs.scm
scm/define-markup-commands.scm
scm/define-music-properties.scm
scm/define-music-types.scm
scm/document-functions.scm
scm/document-markup.scm
scm/document-translation.scm
scm/encoding.scm [deleted file]
scm/font.scm
scm/framework-gnome.scm [deleted file]
scm/framework-ps.scm [deleted file]
scm/framework-tex.scm [deleted file]
scm/fret-diagrams.scm [deleted file]
scm/lily.scm
scm/ly-from-scheme.scm [deleted file]
scm/music-functions.scm
scm/new-markup.scm
scm/output-gnome.scm [deleted file]
scm/output-lib.scm
scm/output-pdf.scm
scm/output-pdftex.scm
scm/output-ps.scm
scm/output-sketch.scm
scm/output-sodipodi.scm
scm/output-tex.scm
scm/page-layout.scm
scm/paper.scm
scm/part-combiner.scm
scm/safe-lily.scm [deleted file]
scm/stencil.scm
scm/titling.scm [deleted file]
scripts/abc2ly.py
scripts/convert-ly.py
scripts/lilypond-book.py
scripts/lilypond.py
scripts/mup2ly.py
scripts/old-lilypond-book.py [new file with mode: 0644]
stepmake/aclocal.m4
stepmake/autogen.sh
stepmake/stepmake/generic-vars.make
tex/lily-ps-defs.tex
tex/lilyponddefs.tex

index a156e7d3ff33320f28c7b0ac1b9500974eb75885..88afe09074aad3e74478e260e0fd4b23ced21b23 100644 (file)
@@ -1,5 +1,4 @@
 #*
-*.abc
 *.aux
 *.dvi
 *.eps
@@ -33,7 +32,7 @@ fonts
 lib
 log
 ls-R
-lilypond.dir
+ly2dvi.dir
 out
 out-www
 share
index a64a4a6536515e47477dbf2d988717aa7a793a1d..5ee6d7f2c279cc3340d620c82120979133d3d128 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
-2004-06-20  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * configure.in (PKG_CONFIG_PATH): add --enable-gui flag, and
-       encapsulate gtk/pango tests.
-       * po/tr.po: Turkish translation.
-
-2004-06-20  Nicolas Sceaux  <nicolas.sceaux@free.fr>
-
-       * input/regression/lily-in-scheme.ly: regression test for #{
-       ... #} syntax
-
-       * scm/ly-from-scheme.scm (read-lily-expression): #$( ... )
-       was causing an error.
-
-       * Documentation/user/programming-interface.itely (Using LilyPond
-       syntax inside Scheme): documentation for #{ ... #} syntax.
-
-2004-06-19  Heikki Junes  <hjunes@cc.hut.fi> 
-
-        * Documentation/index.html.in: use black thin <hr>.
-
-       * buildscripts/mutopia-index.py: use thin black <hr>.
-
-2004-06-19  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scm/fret-diagrams.scm: Use UNIX style line endings.
-       (fret-diagram-verbose): A couple of @{VAR} and an closing itemize
-       typo.  Fixes compile.
-
-       * scm/output-ps.scm (white-dot): Remove second incarnation.
-
-       * scm/lily.scm (ly:all-stencil-expressions): Add white-dot.
-
 2004-06-19  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
-       * scripts/lilypond.py (ic_p.make_include_option): set error_p for
-       single file error.
-
-       * lily/bar-line.cc (compound_barline): add support for unbroken ||:
-
-2004-06-17  Carl Sorensen (carl_sorensen@byu.edu)
-
-       * scm/fret-diagrams.scm: added fret-diagram-terse interface;
-       remove size as argument to fret-diagram interface;
-       improved white-circle dots for fret;
-       improved top-fret thick line/
-
-       * scm/output-ps.scm: added white-dot function
-
-       * scm/output-tex.scm: added white-dot function
-
-       * tex/music-drawing-routines.ps: added draw_white_dot function
-
-       * ps/music-drawing-routines.ps: added draw_white_dot function
-
-       * input/test/fret-diagram.ly: examples to show multiple
-       functions and multiple interfaces
-
-2004-06-18  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * lily/pangofc-afm-decoder.cc (pango_fc_afm_get_glyph) 
-       (pango_fc_afm_get_charset): Update iaw Pango CVS update.
-
-       * buildscripts/guile-gnome.sh: Add pango to recipe.  Resolve
-       conflict.  Have I told you lately how much I love autotools?
-
-2004-06-17  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * lily/lily-guile.cc: 
-       * lily/pangofc-afm-decoder.cc:
-       * lily/include/pangofc-afm-decoder.hh: Use #if HAVE_* iso #ifdef.
-       Fixes build without Pango CVS.  Use "pangofc-afm-decoder.hh".
-
-       * Documentation/topdocs/NEWS.texi (Top): Mention GNOME backend for
-       developers.
-
-       * lily/paper-outputter.cc (file): New method.
-       (dump_string): Use it.
-
-       * scm/output-gnome.scm: Update with pango CVS info, lilylib
-       musing.
-       
-       * lily/accidental-engraver.cc: Bugfix: (do not sort lines if one
-       of them has a comma :-).
-
-       * scm/framework-gnome.scm: Add pango decoders.
-
-       * lily/include/pangofc-afm-decoder.hh: 
-       * lily/pangofc-afm-decoder.cc: New file.
-
-       * lily/lily-guile.cc (ly:pango-add-afm-decoder): New function.
-
-       * configure.in: Check for pango.
-
-       * stepmake/aclocal.m4 (PKG_CHECK_MODULES): New function (from
-       autoconf).
-       (STEPMAKE_GTK2, STEPMAKE_PANGO): New function.
-
-       * config.make.in (USER_CFLAGS, USER_LDLAGS): Update.
-
-2004-06-17  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * Documentation/user/tutorial.itely (Integrating text and music):
-       fix grammar & punctuation.
-
-2004-06-16  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * lily/: Stray janitorial cleanups.
-
-       * scm/lily.scm (ly:all-stencil-expressions):
-       * scm/lily.scm (ly:all-output-backend-commands): New function.
-
-       * scm/safe-lily.scm (safe-objects): Add them.
-
-       * scm/framework-gnome.scm (<gnome-outputter>): New class.
-
-       * scm/output-gnome.scm: Move non-stencil evaluators to framework.
-
-2004-06-15  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * buildscripts/guile-gnome.sh: Pick-up user-installed pango.
-
-2004-06-15  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * scm/page-layout.scm (default-page-make-stencil): add
-       raggedbottom, raggedlastbottom.
-
-       * Documentation/user/changing-defaults.itely (Page layout): add doc.
-
-       * scm/framework-tex.scm (define-fonts): fix export of
-       papersize.
-
-       * lily/paper-book.cc (classic_output): strip suffixes from
-       framework functions.
-
-       * lily/tuplet-bracket.cc (before_line_breaking): do not return
-       SCM_UNDEFINED to Scheme.
-
-2004-06-14  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/book.cc: remove Book::to_stencil().
-       (process): whoops. Score::book_rendering returns vector, not list.
-
-       * scripts/convert-ly.py (conv): remove \notes.
-       apply to input examples.
-       
-       * lily/paper-outputter.cc (output_stencil): don't use
-       smobify_self() but self_scm()
-
-       * lily/include/ly-smobs.icc (IMPLEMENT_SMOBS): don't return SCM
-       from smobify_self().
-
-       * lily/paper-book.cc (output): load framework module
-       scm_c_resolve_module().
-
-       * python/lilylib.py (exit): exit with argument i.
-
-2004-06-14  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scm/framework-gnome.scm (output-framework-gnome): Try loading
-       gnome modules from non-toplevel.
-
-       * lily/ly-module.cc (ly:import-module): Export to ly:.
+       * scripts/lilypond.py (make_include_option): set lilypond_error_p.
 
-       * lily/paper-score.cc (process): Do not show progress newline.
-
-       * lily/paper-book.cc (output, classic_output): Show progess
-       newline after score.
-
-2004-06-14  Heikki Junes <hjunes@cc.hut.fi>
-
-       * buildscripts/lilypond-words.py: add ly/vlaams.ly
-
-2004-06-14  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * lily/score.cc (ly:run-translator): Do not crash on empty music
-       list.
-
-       * lily/book.cc (process): Do not render score when systems is empty.
-
-       * input/simple-song.ly: Down one octave.
-
-       * scm/output-gnome.scm: Remove script again; re-add modules fix
-       (CVS conflict resolve?)
-
-       * lily/stencil.cc (ly:interpret-stencil): Was:
-       interpret_stencil_expression.
-
-2004-06-13  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * buildscripts/guile-gnome.sh: New file.
-
-       * scm/output-gnome.scm: White background, better window size, sane
-       canvas size.  Cleanups.
-
-2004-06-13  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * VERSION: release 2.3.4
-
-       * Documentation/user/invoking.itexi (Invoking the lilypond
-       binary): document --safe.
-
-       * scm/output-gnome.scm: set PATH in script.
-
-       * scm/page-layout.scm (default-page-make-stencil): don't stretch
-       if there is too few systems on a page.
-
-       * lily/parser.yy (relative_music): start at middle C without pitch
-       argument.
-
-       * Documentation/user/changing-defaults.itely (Page layout): new node.
-       (Paper size): rename node
-       (Page breaking): new node.
-       (Titling): move from invoking.
-       (File structure): new node.
-
-       * lily/parser.yy (score_body): allow \header and music anywhere in
-       \score body.
-
-2004-06-13  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scm/lily.scm (ly:load): Remove page-breaking.scm.
-
-2004-06-13  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/include/paper-system.hh: move cc/hh file from paper-line.*
-
-       * lily/include/paper-line.hh: rename to Paper_system.
-
-       * lily/include/paper-book.hh: doc class.
-
-       * lily/paper-book.cc (c_ragged_page_breaks): remove functions. 
-
-       * scm/page-layout.scm (plain-footer): add tagline/copyright. 
-       (plain-header): add instrument-name.
-       (default-page-make-stencil): bugfixes.
-
-       * lily/parser.yy (book_body): allow \header anywhere in \book{}
-
-       * lily/paper-book.cc: remove copyright & tagline. Remove
-       interactions with Page
-
-       * scm/page-layout.scm (ly:optimal-page-breaks): move back breaking
-       here, 
-       (default-page-make-stencil): new function
-       (default-page-music-height): new function
-       (page-headfoot): new function
-       (ly:optimal-page-breaks): generate stencils directly from here
-
-       * scm/titling.scm: new file, group titling functions
-
-2004-06-13  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scm/output-gnome.scm: Handle multiple pages.
-
-       * scm/framework-gnome.scm: Do not load output-gnome.
-       (framework-gnome): Invoke output-gnome::header and
-       output-gnome::end-output as faked stencils.  Fixes experimental
-       gnome output.
-
-2004-06-13  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * input/mutopia/W.A.Mozart/mozart-hrn3-rondo.ly (rondo):
-       octavation compatibility fixes. Backportme. 
-
-       * scm/page-breaking.scm (ly:optimal-page-breaks): allow overfull
-       pages.
-       (ly:optimal-page-breaks): combine-penalties: no shortcut for
-       negative. Now we handle negative penalties (ie. \pageBreak)
-       correctly.
-
-       * lily/system.cc (get_line): extract page-penalty from the left
-       bound.
-
-       * scm/fret-diagrams.scm (fret-diagram): use @table for documentation
+       * lily/bar-line.cc (compound_barline): backport ||: fix.
 
 2004-06-12  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
-       * scm/framework-ps.scm: don't load output-XXX from framework-XXX
-
-2004-06-12  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scm/output-gnome.scm: Update script.  Move development to
-       lilypond_2_3_2 branch for now.
-
-2004-06-11  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * scm/page-breaking.scm (ly:optimal-page-breaks): don't do
-       negative penalties.
-       cleanups.
-
-       * Documentation/user/changing-defaults.itely (Creating contexts):
-       index entries
-
-       * scm/page-breaking.scm (ly:optimal-page-breaks): new
-       file. Rewrite function. 
-
-       * lily/paper-book.cc (pages): new interface: page-breaking returns
-       list of line-list.
-
-       * lily/page.cc (Page): take lines argument.
-
-       * scm/document-translation.scm (all-engravers-doc): link to user man
-
-       * scm/page-layout.scm (ly:optimal-page-breaks): use penalty iso. score.
-
-       * Documentation/user/notation.itely (Relative octaves): typo.
-
-       * lily/paper-book.cc (LY_DEFINE): ly:output-formats. New function.
-
-2004-06-11  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scm/output-gnome.scm: Update build script.
-
-2004-06-10  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scm/output-gnome.scm: Add font scaling.  Attempt to resurrect
-       gnome backend.
-
-       * scm/framework-gnome.scm: New file.
-
-       * scm/lily.scm: Use it.
-
-       * lily/paper-outputter.cc: Janitorial cleanups.
-       (ly:outputter-dump-string): Remove unreachable statement.
-
-       * scm/framework-ps.scm: Add header.  Janitorial cleanups.
-       (ice-9): Bugfix: Add srfi-1.
-
-       * scm/framework-tex.scm: Add header.  Janitorial cleanups.
-
-2004-06-08  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/new-lyric-combine-music-iterator.cc (do_quit): put warning
-       in do_quit()
-       
-2004-06-07  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * ly/book-paper-defaults.ly: set optimal-page-breaks as default
-
-2004-06-06  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
        * ly/engraver-init.ly (AncientRemoveEmptyStaffContext): remove
-       override of Beam::position-callbacks. Why would grace beams not be
-       quantized? Fixes: weird-stem-size-grace. 
+       override for Beam::position-callbacks in grace.  Fixes:
+       weird-stem-size-grace
 
-       * lily/new-lyric-combine-music-iterator.cc (find_voice): issue
-       warning only once. Backportme.
+2004-06-11  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
        * lily/accidental-engraver.cc (number_accidentals_from_sig):
-       bugfix, 2nd try. Backportme.
+       backport additional fixes.
+
+2004-06-07  Mats Bengtsson  <mabe@drongo.s3.kth.se>
 
-       * ly/vlaams.ly: new file. (Thanks Hendrik Maryns)
+       * scripts/lilypond-book.py (latex_filter_cmd): Use a temporary
+       file since 'latex "\\nonstopmode \input /dev/stdin"' doesn't work
+       in Cygwin. Warning: ugly hard coded file name used.
 
 2004-06-04  Mats Bengtsson  <mabe@drongo.s3.kth.se>
 
        * Documentation/user/notation.itely (Instrument transpositions):
        Correct the name of the instrumentTransposition property.
 
-2004-06-04  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * scm/output-ps.scm (ps-font-command): fix parmesan coding too.
-
-2004-06-04  Mats Bengtsson  <mabe@drongo.s3.kth.se>
+2004-06-03  Mats Bengtsson  <mabe@drongo.s3.kth.se>
 
        * scripts/lilypond-book.py (output): Bug fix so preLilyPondExample
        and postLilyPondExample are called when defined.
 
-2004-06-03  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * ly/nederlands.ly (pitchnames): use ly:parser-set-note-names.
-       This fixes setting notenames with `\include "nederlands.ly" '
-
-       * lily/my-lily-parser.cc (LY_DEFINE): ly:parser-set-note-names:
-       new function.
-
 2004-06-01  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
-       * scm/page-layout.scm: don't do piece, it should be in score-title
-       only.
+       * lily/accidental-engraver.cc (update_local_key_signature): fold
+       repetitive code.
+       (number_accidentals_from_sig): backport code from 2.3. Fixes:
+       custom-key-signatures.ly
 
-       * lily/lexer.ll: lex \score separately.
-
-       * lily/paper-book.cc: junk stencil2line.
-
-       * lily/paper-line.cc (Paper_line): construct from Stencil
-       directly. No futzing with the dimensions.
-
-       * lily/include/paper-line.hh (class Paper_line): 
-
-       * lily/stencil.cc (interpret_stencil_expression): combine-stencil
-       takes arbitrary number of arguments.
-
-       * input/test/markup-score.ly (tuning): simplify example. 
-
-2004-05-31  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/score.cc (LY_DEFINE): ly:score-embedded-format, new function. 
-
-       * scm/define-markup-commands.scm (score): define score-markup
-
-       * lily/parser.yy (markup): use score-markup.
-
-       * lily/score.cc: add ly:score? 
-
-2004-05-30  Carl Sorensen <carl_sorensen@byu.edu>
-
-       * scm/fret-diagrams.scm: add fret-diagram-verbose markup; modified
-       fret-parse-string so it prepares for calls to fret-diagram-verbose
-       Changed display constants to props so they are available for
-       \override.
-       
 2004-05-31  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
-       * VERSION: release 2.3.3
-
-       * stepmake/stepmake/generic-vars.make: unset LANG.
-
-       * input/regression/tuplet-nest.ly: bugfix.
+       * VERSION: 2.2.2
 
        * lily/tie-performer.cc (stop_translation_timestep): reset
-       ties_created_. Fixes: midi-tie.ly, midi-lyrics-barcheck.ly
-
-       * lily/chord-tremolo-engraver.cc (stop_translation_timestep):
-       clear repeat_ directly after setting stem_tremolo_. Fixes:
-       tremolo-repeat.ly
-
-       * input/regression/span-bar-break.ly: new file.
-
-       * scm/define-grobs.scm (all-grob-descriptions): remove
-       break-visibility from SpanBar. Fixes: piano-repeat.ly
-
-2004-05-30  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * python/lilylib.py (make_ps_images): only compute bbox when needed.
-
-       * scripts/lilypond-book.py (process_snippets): use lily -f ps
-       files for generating pngs. (failed experiment)
-
-       * scm/framework-ps.scm (output-classic-framework-ps): dump EPS
-       file with PFA fonts included.
-
-       * lily/score.cc (default_rendering): put header in too.
-
-       * lily/paper-line.cc (LY_DEFINE): change function to
-       ly:paper-line-extent
-
-       * scm/page-layout.scm (default-book-title): only add lines for
-       non-nil fields.
-       (default-score-title): idem.
-
-       * lily/my-lily-parser.cc (parse_string): delete lexer after use.
-
-       * lily/my-lily-lexer.cc (My_lily_lexer): copy keytable.
-
-       * lily/include/paper-book.hh (class Paper_book): remove height_
-       member.
-
-       * input/test/coriolan-margin.ly (texidoc): remove latex macros.
-
-       * lily/ly-module.cc (LY_DEFINE): bugfix.
-
-       * lily/paper-book.cc (book_title): separate function for the book
-       title.
-
-       * scm/page-layout.scm (default-book-title): only account for
-       markup fields.
-
-       * scm/framework-ps.scm: new file. Move high level interface from
-       output-ps.scm
-
-       * scm/music-functions.scm (def-grace-function): move macros from
-       ly/music-functions-init.ly
-
-       * lily/paper-outputter.cc (Paper_outputter): move scheme_calls to
-       framework-tex.scm
-
-       * scm/framework-tex.scm (dump-line): new file. High level
-       interface for output (pages, systems, header). 
-
-       * lily/include/page.hh (class Page): add is_last_ field.
-
-       * lily/paper-outputter.cc (print_smob): smobify Paper_outputter.
-
-       * lily/paper-book.cc (split_string): new function
-       (output): output multiple formats, i.e. --format=ps,tex
-
-       * scm/output-ps.scm (output-scopes): dump variables directly.
-       (define-fonts): rewrite for new interface
-
-       * ps/lilyponddefs.ps: remove lilypondpaper redefinitions.
-
-       * lily/paper-outputter.cc (Paper_outputter): take format argument.
-
-       * lily/main.cc (parse_argv): don't set extension for output.
-
-       * lily/clef-engraver.cc (create_clef): remove
-       Staff_symbol_referencer::set_position() call. 
-
-2004-05-30  Nicolas Sceaux  <nicolas.sceaux@free.fr>
-
-       * ly/music-functions-init.ly (addlyrics): set the 'origin property
-       with the location argument in music function definitions.
-
-2004-05-29  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/staff-symbol-engraver.cc (acknowledge_grob): remove item ->
-       staffsymbol dependency.
-
-       * lily/include/grob.hh (class Grob): live () -> is_live (). Small
-       cleanups.
-
-       * lily/book.cc (process): return Paper_book
-       (to_stencil): use Book::process().
-
-       * lily/include/my-lily-parser.hh (class My_lily_parser): remove
-       header_ field. Store in $globalheader
-
-       * lily/parser.yy (book_body): book header is initted to
-       $globalheader.
+       ties_created_. Fixes bugs/midi-tie.ly,
+       bugs/midi-lyrics-barcheck.ly
        
+       * scm/define-grobs.scm (all-grob-descriptions): remove
+       break-visibility. Should fix: bugs/piano-repeat.ly
 
-2004-05-28  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * input/test/fill-a4.ly: removed.
-
-       * lily/parser.yy (output_def): push scope of parent_ Output_def
-       too.
-
-2004-05-28  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scm/output-gnome.scm: Update info.
-
-2004-05-28  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/book-paper-def.cc: collapse Book_output_def to Output_def.
-
-       * scm/lily.scm (ly:modules-lookup): handle empty list, and more
-       than 1 module.
-
-       * lily/include/ly-module.hh (ly_use_module): rename is_module to
-       ly_c_module_p.
-
-       * scm/page-layout.scm (default-book-title): move Scheme titling
-       functions to here.
-
-       * lily/parser.yy (book_paper_block): remove scope too.
-
-       * ly/engraver-init.ly (EasyNotation): remove OrchestralScoreContext
-
-       * lily/rest.cc: add direction to rest properties.
-
-       * lily/include/output-def.hh: new file, move from
-       music-output-def.hh
-
-2004-05-27  Jan Nieuwenhuizen  <janneke@gnu.org>
+       * lily/chord-tremolo-engraver.cc (stop_translation_timestep):
+       reset repeat_ after setting stem tremolo. Should fix:
+       bugs/tremolo-repeat.ly
 
-       * scm/output-gnome.scm: Describe feta-cork hack.
+       * lily/accidental-engraver.cc (set_property_on_children): copy key
+       signature setting. Backport. Should fix:
+       bugs/custom-key-signatures.ly
 
 2004-05-27  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
-       * lily/include/book-paper-def.hh: derive from Output_def 
-
-       * lily/include/paper-def.hh: move all functionality out of class.
-       Junk header.
-
-       * lily/include/music-output-def.hh: rename Music_output_def to
-       Output_def.
-
-       * input/wilhelmus.ly: only set space for Paper formatting. 
-
-       * lily/include/midi-def.hh: remove file, remove class.
-       Move functions to Music-output-def.
-
-       * lily/music-output-def.cc (Music_output_def): remove separate
-       translator table. Lookup translators in scope directly. This
-       obviates Context suffix for context identifiers, i.e.
-
-       \context {
-         \Staff
-         .. 
-         }
-
-
-       will work.
-       
-
-       * Documentation/user/notation.itely (Chords mode): typo: 13 -> 3.
-
-       * Documentation/user/changing-defaults.itely (Horizontal spacing):
-       document spacing override hack.
-
-2004-05-27  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scm/output-gnome.scm: Add C-q, C-w keybindings.  Update
-       installation info.  Support point-and-click.  Add +/- zoom
-       keybindings.
-
-2004-05-26  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * VERSION: 2.3.2 released
-       
-       * lily/parser.yy (book_body): set default bookpaper.
-
-       * scm/output-tex.scm (header): kludge: hard code linewidth. 
-
-       * lily/my-lily-parser.cc (My_lily_parser): don't delete lexer.
-
-2004-05-25  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/score.cc (default_rendering): scale outputdef before
-       starting.
-
-2004-05-25  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scm/fret-diagrams.scm: Add header.
-
-       * scm/output-gnome.scm: Hello world :-)
-
-2004-05-25  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+       * lily/context-def.cc (filter_engravers): backport.  Fixes:
+       crash-bar-number.ly
 
-       * scripts/lilypond.py (run_dvips): only add papersize if present.
-
-       * lily/accidental-engraver.cc (update_local_key_signature): new
-       function, fold code from initialize() and process_music().
-       (update_local_key_signature): use deep copy. This fixes one
-       problem from custom-key-signatures.ly.
-       (number_accidentals_from_sig): tighter check for
-       accidental-too-old.
-
-       * ly/engraver-init.ly: remove localKeySignature
-       definition from ChoirStaff, StaffGroup, Score.
-       
-       * lily/percent-repeat-engraver.cc (try_music): add moments for
-       barlines too. Fixes: skipbars-percent-repeat.ly.
-
-2004-05-24  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/context-def.cc (filter_performers): don't go to cdrloc if
-       skipping last pair. Fixes: crash-bar-number.
-
-       * scm/fret-diagrams.scm (nil): fret-diagrams (courtesy Carl
-       D. Sorensen)
-
-       * input/test/fret-diagram.ly: new file.
-
-       * scm/paper.scm (paper-set-staff-size): scale linewidth too.
-       (scale-paper): divide by scale.
+       * lily/percent-repeat-engraver.cc (try_music): backport. Fixes:
+       skipbars-percent-repeat.ly
 
 2004-05-19  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
-       * lily/rest-collision.cc (do_shift): also do nothing for the (0,2)
-       case.
+       * lily/rest-collision.cc (do_shift): handle (0-down, 2-up) case
+       too.
 
-2004-05-18  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+2004-05-04  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
-       * scm/stencil.scm (fontify-text): reinstate function
+       * lily/ottava-bracket.cc (print): fix ottava on rests.
 
-       * tex/lily-ps-defs.tex: remove lilypondblotdiam def.
+2004-05-03  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
-       * lily/book-paper-def.cc (Book_paper_def): add copy ctor.
+       * VERSION: release 2.2.1
+       
+       * scm/music-functions.scm (set-accidental-style): use GrandStaff
+       iso. PianoStaff.
 
-       * lily/parser.yy (book_paper_head): \bookpaper {} 
+2004-05-02  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
-       * python/midi.c: remove config.h
+       * Documentation/user/lilypond.tely (Top): update version number.
 
-2004-05-18  Jan Nieuwenhuizen  <janneke@gnu.org>
+       * lily/lyric-engraver.cc (get_voice_to_lyrics): go higher when
+       finding Voice context. 
 
-       * scm/output-gnome.scm: Update.
+       * Documentation/user/music-glossary.tely (Top): replace table strong
+       with table samp.
 
-2004-05-17  Jan Nieuwenhuizen  <janneke@gnu.org>
+       * lily/stem.cc (get_default_stem_end_position): handle dir==0
+       case. This fixes a bugs/tremolo-repeat
 
-       * scm/output-gnome.scm: New file.
+       * Documentation/user/introduction.itely (About this manual): fix
+       URLS.
 
-       * lily/include/book-paper-def.hh: Add.  Janitorial fixes.
+2004-04-20  Jan Nieuwenhuizen  <janneke@gnu.org>
 
-2004-05-17  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/book-paper-def.cc (ly_bookpaper_fonts): move from Paperdef
-       (find_scaled_font): move from Paper_def
-
-2004-05-16  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/my-lily-parser.cc (LY_DEFINE): new function ly_parser_lookup
-       (LY_DEFINE): add SCM_ASSERT_TYPE everywhere.
-
-       * po/fr.po: update po.
-
-       * lily/include/book-paper-def.hh (class Book_paper_def): new file.
-
-       * lily/book-paper-def.cc (print_smob): new file.
-
-2004-05-16  Heikki Junes <hjunes@cc.hut.fi>
-
-       * buildscripts/lilypond-words.py: search words also from
-       music-functions-init.ly.
-
-2004-05-15  Nicolas Sceaux  <nicolas.sceaux@free.fr>
-
-       * ly/music-functions-init.ly (def-music-function): new helper
-       macro for defining music functions. \addlyrics \appoggiatura
-       \acciaccatura \grace \partcombine \autochange \applycontext
-       \applyoutput and \breathe are now defined here thanks to it.
-
-       * lily/parser.yy: 
-       * lily/my-lily-lexer.cc: \addlyrics \appoggiatura \acciaccatura
-       \grace \partcombine \autochange \applycontext \applyoutput and
-       \breathe keywords removed from the parser.
-
-       * lily/parser.yy: 
-       * lily/music-function.cc (ly_make_music_function): 
-       * lily/lexer.ll (music_function_type): added a case for 0-arg
-       music functions.
-
-2004-05-14  Nicolas Sceaux  <nicolas.sceaux@free.fr>
-
-       * scm/ly-from-scheme.scm (read-lily-expression):  A variable
-       refering to a music expression can be used in lily-inside-scheme:
-       #{ $music #}
-
-       * lily/my-lily-parser.cc (LY_DEFINE): introduce ly:clone-parser
-       and ly:parser-define, and change ly:parser-parse-string in order
-       to make #{ $music #} work.
-
-       * scm/new-markup.scm (compile-markup-expression): when an argument
-       is a string, use `make-simple-markup'.
-
-2004-05-14  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/parser.yy (My_lily_lexer): bugfix; op should be tag.  
-
-2004-05-10  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * scripts/convert-ly.py (FatalConversionError.func): handle + in
-       font-size. (backportme)
-
-2004-05-09  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/paper-outputter.cc (output_stencil): dump font definitions
-       before each stencil.
-
-       * lily/include/paper-book.hh (struct Score_lines): new
-       struct. Collect info per Paper-score.
-
-       * lily/include/page.hh (class Page): to_stencil() returns Stencil
-       everywhere.
-
-       * lily/stencil.cc (find_expression_fonts): new function
-
-       * lily/paper-outputter.cc (output_stencil): use
-       interpret_stencil_expr
-
-       * lily/stencil.cc (LY_DEFINE): ly_stencil_fonts: new function.
-       (interpret_stencil_expr): new function. Generic stencil
-       interpretation.
-
-       * lily/paper-def.cc (find_scaled_font): divide lookup
-       magnification by outpuscale for non-virtual fontmetrics. This
-       fixes ludicrously long font definitions for text
-       fonts. (backportme)
-
-       * lily/score-engraver.cc: remove
-       {Engraver,Score_engraver}::typeset_grob(), remove all calls.
-
-2004-05-09  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * input/test/markup-score.ly: Remove \notes.
-
-       * lily/parser.yy (book_body): Grok Composite_music and \header.
-       (markup): Push NOTES mode before score_block.
-
-       * VERSION: release 2.3.1
-       
-       * mf/feta-klef.mf: 
-       * mf/feta-bolletjes.mf: Oops.  Comment-out canvast test code.
-
-       * Documentation/user/programming-interface.itely: Use @emph (was: @em).
-
-       * Documentation/user/out/tutorial.texi: Untrigger lilypond-book error.
-
-2004-05-09  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * scm/output-tex.scm (output-tex-string): tighten safe security.
-
-       * lily/scm-option.cc (LY_DEFINE): add 'safe to ly:get-option
-
-       * scm/safe-lily.scm (make-safe-lilypond-module): new file. Define
-       allowed ly functions.
-
-       * lily/ly-module.cc (ly_module_define): only define variable if
-       bound.
-       (ly_make_anonymous_module): take safe option.
-
-2004-05-08  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * scripts/lilypond-book.py (compose_ly): remove FRAGMENT_LY.
-
-2004-05-08  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * input/regression/newaddlyrics.ly: Fix.
-
-       * Documentation/user/tutorial.itely: Use \newlyrics, remove most
-       \score \notes.
-
-2004-05-08  Heikki Junes <hjunes@cc.hut.fi>
-
-        * Documentation/user/music-glossary.tely ([k-z]): last fixes.
-
-2004-05-08  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * input/mutopia/R.Schumann/romanze-op28-2.ly (d): use #(define .. )
-
-       * lily/paper-line.cc (Paper_line): don't store list of stencils,
-       but convert to single Stencil immediately.
-
-       * lily/paper-book.cc (title): don't return Stencil* but Stencil.
-
-2004-05-07  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scm/output-sodipodi.scm: Resurrect sodipodi output.
-
-2004-05-07  Kristof Bastiaensen  <kristof.bastiaensen@vleeuwen.org>
-
-       * elisp/lilypond-mode.el: Changed the way defaults are created for
-       LilyPond-command-master.  LilyPond-mode will now check the
-       timestamps of the files to see which command has to run next.
-
-2004-05-07  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * scm/bass-figure.scm (format-bass-figure): don't set
-       number-markup for strings. This fixes string in bass
-       figure. (backportme)
-
-       * lily/parser.yy (bass_number): insert number-markup into figure
-       definition.
-
-       * scm/define-music-properties.scm (all-music-properties): make
-       'figure a markup.
-
-       * scripts/convert-ly.py (conv): \apply -> \applymusic
-
-2004-05-06  Kristof Bastiaensen  <kristof.bastiaensen@vleeuwen.org>
-
-       * elisp/lilypond-mode.el: changed the order of some commands
-       ("Midi" after "2Midi"), use the user-defined
-       LilyPond-command-default as default instead of "LilyPond"
-
-       * elisp/lilypond-mode.el: added a LilyPond-master-file variable,
-       to set the master file for the next command.
-
-       * elisp/lilypond-font-lock.el: replaced font-lock-warning-face
-       with font-lock-reference-face.
-
-2004-05-07  Heikki Junes <hjunes@cc.hut.fi>
-
-        * Documentation/user/music-glossary.tely ([ab]*): small fixes.
-
-        * Documentation/user/music-glossary.tely ([c-l]*): more fixes.
-
-2004-05-06  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * ly/music-functions-init.ly (TODO): new file.
-
-       * lily/parser.yy (Generic_prefix_music_scm): add more
-       music_function symbols.
-       (Prefix_composite_music): change \apply to music-function   
-
-       * lily/include/music-function.hh: rename to music-function
-
-2004-05-05  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/music-head.cc (LY_DEFINE): change order of args.
-
-       * input/regression/music-head.ly (texidoc): new file.
-
-       * lily/parser.yy (Generic_prefix_music): allow generic
-       music-transformation functions. 
-
-       * lily/include/music-head.hh (is_music_head): new file.
-
-       * lily/music-head.cc (get_music_head_transform): new file.
-
-2004-05-04  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/ottava-bracket.cc (print): use coordinate, not (0,0) for
-       empty extent. This fixes ottava brackets on rests. (backportme)
-
-       * make/lilypond.redhat.spec.in (Group): ln png files for info.
-
-       * lily/piano-pedal-engraver.cc (create_text_grobs): core dump fix.
-
-       * cygwin/lily-wins.py: update for the lily-wins.py script.
-
-2004-05-03  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/score-engraver.cc (typeset_all): switch off unbound spanner
-       code. This will obviate typeset_grob () in the future.  The effect
-       of this is that improperly written spanner handling will result in
-       invalid spanner bounds.
-       (announce_grob): add to elems_ from here
-       (typeset_grob): comment out.  
-
-       * lily/include/engraver.hh (make_spanner): new calling interface
-       for make_{item,spanner}. This obviates most calls to
-       announce_grob().
-               
-       * scm/music-functions.scm (set-accidental-style): use GrandStaff
-       iso. PianoStaff for piano styles.
-
-2004-05-03  Heikki Junes <hjunes@cc.hut.fi>
-
-       * Documentation/user/music-glossary.tely: add segno after d.s.
-
-2004-05-02  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/include/audio-column.hh: remove unused variables.
-       (patch by Michael Welsh Duggan)
-
-       * flower/include/axes.hh (other_axis): inline Axes function
-       (thanks to David Brandon).
-
-2004-05-02  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * cygwin/mknetrel: Install image links (backportme).
-
-       * Documentation/user/GNUmakefile (local-install-info): Activate
-       actual installing of image links (backportme).
-
-2004-04-30  Mats Bengtsson  <mabe@drongo.s3.kth.se>
-
-       * Documentation/user/notation.itely (Measure repeats): Removed
-       unnecessary (and confusing) \context Voice{.
-
-2004-04-29  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * Documentation/topdocs/NEWS.texi: Mention use of \score as markup.
-
-       * lily/page.cc (Page): Do not use ly_scheme_function for
-       volatile/configurable variables (FIXME: better name).
-
-       * lily/music-output-def.cc (c_lookup_variable): Rename (WAS:
-       get_scmvar).
-
-2004-04-29  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * scripts/convert-ly.py (FatalConversionError.subst): use
-       \transposition.
-
-2004-04-29  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * lily/include/page.hh (class Page): Declare left_margin ().
-
-       * lily/page.cc: Remove paper var caching.
-
-2004-04-28  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * Documentation/user/music-glossary.tely: Add name to @top node.
-       Remove comment from @table definitions (workaround for makinfo
-       bug).
-
-       * lily/stencil-scheme.cc (ly:stencil-expr): Rename (was:
-       ly:stencil-get-expr).  Update callers.
-       (ly:stencil-align-to!):  Return stencil too.
-
-       * lily/paper-outputter.cc (output_page): Bugfix.  Use page
-       stencil.  Remove looped line-based page output.
-       (output_line): Use line stencil.  Remove looped stencil-based line
-       output.
-
-       * lily/page.cc (ly:page-paper-lines): New function.
-
-       * input/test/markup-score.ly: New file.
-
-       * scm/define-markup-commands.scm (stencil): New markup.
-
-       * lily/book.cc (to_stencil): New method.
-
-       * lily/parser.yy (markup): Use it to grok \score.
-
-2004-04-27  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * lily/stencil.cc (expr): Rename (was: get_expr).  Update callers.
-
-       * lily/paper-book.cc (pages): Change signature.  Update callers.
-
-       * lily/include/page.hh:
-       * lily/page.cc: New file.
-
-       * lily/paper-line.cc (to_stencil): New method.
-       
-       * lily/paper-outputter.cc (output_stencil): New method.
-
-       * lily/paper-outputter.cc (output_line): Use them.
-
-       * lily/warn.cc: Remove.
-
-       * lily/my-lily-parser.cc (distill_inname): Remove.
-
-       * flower/include/file-name.hh: 
-       * flower/file-name.cc: New file.  Update users.
-
-       * flower/file-path.cc [CYGWIN]: Junk testing code.  Remove Path.
-       (find): New method of same name.
-
-       * lily/my-lily-parser.cc (ly:parse-file): Use it.
-
-       * lily/scm-option.cc (ly:set-option, ly:get-option): Bugfix:
-       constant error message.
-
-2004-04-27  Heikki Junes <hjunes@cc.hut.fi>
-
-       * input/test/{blank-notes.ly,staff-container.ly}: typos.
-
-2004-04-26  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * Documentation/user/music-glossary.tely: @table @strong' replaced
-       by `@table @samp @c @strong'.  This fixes invalid makeinfo output
-       (backportme).
-
-2004-04-25  Nicolas Sceaux  <nicolas.sceaux@free.fr>
-
-       * scm/lily.scm (ly:load): Add ly-from-scheme.scm loading.
-
-       * scm/ly-from-scheme.scm: New file. Introduce a new syntax:
-       #{ lily music expression #} that returns an equivalent scheme
-       music expression by parsing the string.
-
-2004-04-25  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * lily/my-lily-parser.cc:
-       * lily/my-lily-lexer.cc: Another step towards parsing ly code from
-       SCM string (foo.ly/toto.scm support).
-
-2004-04-24  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * lily/my-lily-parser.cc (ly:parser-parse-string): New function.
-
-2004-04-21  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * input/regression/newaddlyrics.ly: Remove lilypond-book kludge.
-
-       * scripts/lilypond-book.py: LY code that includes \header is
-       not assumed to be a fragment.
-
-2004-04-20  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * lily/stem-tremolo.cc (print): If stem direction == CENTER, move
-       tremolo beams up.
-
-       * lily/stem.cc (chord_start_y): Return 0 if no heads.
-       (get_default_stem_end_position): No tremolo head juggling if no
-       heads.  Fixes tremolo crash on rests (backportme).
-
-       * scripts/abc2ly.py: Oops use [\]proper[ty] 2.2 syntax.
-
-2004-04-19  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scripts/abc2ly.py: ABC beams preserve support (courtesy Guy
-       Gascoigne-Piggford).  Also: TAB and whitespace fixes.
-
-       * lily/lexer.ll: Allow \encoding in NOTES mode.
-
-       * buildscripts/mf-to-table.py (write_fontlist): Use \lyrics
-       for lyrics, not for commands.
-
-       * lily/parser.yy (scalar): Bugfix: accept LYRICS_STRING.
-       FIXME: Replace some `Music's with Grouped_music_list; fixes make web.
-
-       * input/regression/newaddlyrics.ly: New file.
-
-       * Documentation/topdocs/NEWS.texi: Update.
-
-       * lily/parser.yy (new_lyrics): Return SCM list of lyric musics.
-       (Music_list): Allow embedded scm.
-
-       * lily/score.cc (ly:score-bookify): New function.
-
-       * lily/music.cc (ly:music-scorify): Idem.
-
-       * lily/my-lily-parser.cc (ly:parser-print-book): Idem.
-       (ly:parser-print-score): Idem.
-
-       * scm/lily.scm (default-toplevel-book-handler): Idem.
-       (default-toplevel-music-handler): Idem.
-       (default-toplevel-score-handler): Idem.
-
-       * ly/declarations-init.ly: Set default toplevel handlers.
-
-       * lily/parser.yy (book_block, score_block, toplevel_music): Use them.
-
-       * scripts/lilypond-book.py (PREAMBLE_LY): Select classic score
-       printer for score at toplevel.
-
-2004-04-18  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * lily/parser.yy (NEWLYRICS): Switch to LYRICS mode for lyrics.
-       Fix for simple case: input/simple-song.ly, more complex stuff
-       does not work yet.
-
-2004-04-18  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/parser.yy (Prefix_composite_music): split Composite_music
-       in Prefix_composite_music and Grouped_music_list.
-       (re_rhythmed_music): use Grouped_music_list for NEWLYRICS.
-
-2004-04-18  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scm/lily.scm (toplevel-expression): New define.
-
-       * lily/my-lily-parser.cc (ly:parser-add-book-and-score): New function.
-
-       * lily/parser.yy (toplevel_expression): Use it.
-
-       * lily/include/my-lily-parser.hh: Smobbify.
-
-       * lily/my-lily-parser.cc (parse_string): New method.
-       
-       * lily/my-lily-parser.cc (ly:parse-string): New function.
-
-       * Documentation/user/lilypond.tely: Add comment and workaround for
-       gs-8.01 crash.  Fixes make web.
-
-       Simplification of toplevel music.
-       
-       * lily/lexer.ll, lily/parser.yy:
-
-       * In LYRICS mode, return LYRICS_STRING.  This fixes one
-       shift/reduce problem.
-
-       * Use NOTES mode at start of maininput.
-
-       * Grok toplevel composite music expression, put in score and book.
-
-       * Grok \relative COMPOSITE_MUSIC, make relative on middleC.
-
-       * \newlyrics is a shortcut for \context Lyrics \lyricsto "" \lyrics
-
-       * input/simple.ly: New file.
-       
-       * input/simple-song.ly: Idem.
-
-2004-04-16  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/parser.yy: rename NEWADDLYRICS to LYRICSTO. Thanks to Erik
-       Sandberg.
-
-2004-04-17  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scm/font.scm (add-cmr-fonts): Narrow bold is ecrb.
-
-2004-04-17  Heikki Junes <hjunes@cc.hut.fi>
-
-       * input/regression/accidental-octave.ly: doc automatic showing
-       of note names.
-
-2004-04-16  Heikki Junes <janneke@gnu.org>
-
-       * po/fi.po: do "make po && make -C po po-update" at top-level,
-       then "cp po/out/fi.po po/fi.po" and update fields.
-
-       * po/fi.po: remove all designations of `fuzzy'; shows those elements.
-
-2004-04-15  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * Documentation/user/introduction.itely (About this manual): Fix
-       templates and regression urls (backportme).
-
-2004-04-14  Mats Bengtsson  <mabe@drongo.s3.kth.se>
-
-       * ly/engraver-init.ly (Score:graceSettings): Increase
-       beamed-lengths, especially for 32nd notes.
-
-       * Documentation/user/notation.itely (Grace notes): Correct the
-       syntax for add-grace-property example.
-
-2004-04-13  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * flower/parse-afm.cc [METATYPE1_BUG]: Grok Metatype1's global
-       `Generated' tag.
-
-       * scm/font.scm (add-cmr-fonts): Use super-cm/lmodern fonts.  NOT.
-       Severely broken (the Debian package, at least).
-
-2004-04-13  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/context.cc (find_create_context): assign to lvalue.
-
-2004-04-12  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/include/translator.hh (class Translator): rename
-       get_parent_context() to context () to avoid confusion.
-
-       * lily/include/lily-guile.hh: is_x -> ly_c_X_p naming.
-
-       * lily/lexer.ll: change is_string -> ly_c_string_p 
-
-       * input/mutopia/J.S.Bach/wtk1-fugue2.ly (bassdux): use \book.
-
-       * input/mutopia/W.A.Mozart/mozart-hrn-3.ly: use \book.
-
-       * VERSION: release 2.3.0
-
-       * mf/feta-nummer-code.mf: use ascii names for number glyphs.
-
-       * buildscripts/mf-to-table.py (parse_logfile): only prepend group-
-       if nonempty.
-
-       * lily/include/context.hh (class Context): make members protected.
-       (children_contexts): new accessor function.
-
-       * lily/include/translator.hh (class Translator): make
-       daddy_context_ protected.
-       (class Translator): clean up. 
-
-       * lily/include/context.hh (class Context): make daddy_context_
-       private.
-
-       * lily/lyric-engraver.cc (get_voice_to_lyrics): recursively go
-       higher for finding Voice. (backportme)  
-
-       * lily/include/context.hh (class Context): remove
-       find_context_below() as a method.
-
-       * Documentation/user/notation.itely (The Lyrics context): add note
-       about manual durations
-
-       * ly/chord-modifiers-init.ly (blackTriangleMarkup): use TeX-math
-       encoding.
-
-       * scm/output-tex.scm (text): dump \inputencoding{} for text.
-
-2004-04-11  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * scripts/lilypond.py (global_latex_preamble): remove latin1 from
-       \usepackage{inputenc}
-
-       * lily/paper-book.cc (classic_output): don't advance Offset for
-       TeX output.
-
-       * make/mutopia-rules.make ($(outdir)-$(PAPERSIZE)/%.dvi): include
-       ec-sauter.map in rules
-
-       * mf/ecb.mf (font_identifier): new file, based on ecbx
-
-       * mf/ecb10.mf (gensize): new file.
-
-       * Documentation/topdocs/NEWS.texi (Top): document some more new
-       features.
-
-       * ly/declarations-init.ly: run convert-ly
-
-       * lily/my-lily-parser.cc (LY_DEFINE): move parse-file function
-       from input-file-results. Remove input-file-results.* 
-
-2004-04-11  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scm/output-ps.scm (font-command): Fix, again.
-
-       * input/test/title-markup.ly: Add \noPagebreak test.
-
-       * lily/score-engraver.cc (try_music): Bugfix.
-
-2004-04-11  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/main.cc (main_with_guile): excise dependency options -M and
-       --dep-prefix
-
-       * lily/input-file-results.cc: excise Makefile dependency code
-
-       * Documentation/user/invoking.itexi (Invoking the lilypond
-       binary): remove dep doco
-       
-       * lily/main.cc (main_with_guile): call lilypond-main
-       
-       * scm/lily.scm (lilypond-main): new function: handle multiple files.
-
-       * lily/input-file-results.cc (LY_DEFINE): throw ly-file-failed
-       exception.
-
-       * lily/my-lily-parser.cc: remove paper_description function
-
-       * lily/music-output-def.cc (LY_DEFINE): ly:output-description
-       new function.
-
-       * lily/main.cc: remove global_score_count.
-
-       * lily/book.cc (process): don't take header from global_input_file.
-
-       * buildscripts/lilypond-profile.sh (Error): set GS_FONTPATH
-
-       * lily/parser.yy (My_lily_lexer): remove current_parser global var.
-
-       * lily/music-output-def.cc (LY_DEFINE): new function
-       ly_output_description. This function does the bulk for  setting,
-       parsing and breaking down of an input file.
-
-       * lily/ly-module.cc (ly_make_anonymous_module): don't protect
-       anonymous modules globally. Let's hope they get GCd
-
-       * scripts/lilypond.py (run_dvips): add sauter-mftrace.map 
-
-2004-04-11  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scm/output-ps.scm (header): Papersize from paper.
-
-       * scripts/lilypond.py (global_latex_preamble): Oldish behaviour
-       for classic output.
-
-       * tex/lilyponddefs.tex (interscoreline): Oldish behaviour if
-       lilypondclassic is defined.
-       (lilypondstart): Oldish behaviour if lilypondclassic is defined.
-
-       * input/regression/between-systems.ly: Remove.
-
-       * python/lilylib.py (get_bbox): Fix regular expression
-       for bounding box.
-
-       * tex/lilyponddefs.tex (lilypondpagebreak): New overridable macro.
-
-       * scm/output-tex.scm (stop-page): Use it.
-
-       * scm/output-ps.scm (define-fonts): Bugfix.
-
-       * lily/grob.cc: Add penalty to interface.
-
-       * lily/include/paper-line.hh (class Paper_line): New member
-       var penalty_.
-
-       * lily/system.cc (get_line): Initialise Paper_line with
-       page-penalty's from original grobs.
-
-       * scm/define-music-properties.scm (all-music-properties): Add
-       page-penalty.
-
-       * scm/define-grob-properties.scm (all-grob-descriptions): Idem.
-
-       * lily/score-engraver.cc (try_music): Handle page-penalty.
-
-       * ly/declarations-init.ly (pagebreak, noPagebreak): New command.
-
-2004-04-11  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * ly/declarations-init.ly (melismaEnd): typo
-
-       * scm/font.scm (add-cmr-fonts): caps is eccc, ecsc is slanted caps.
-
-       * scm/output-ps.scm (text): split string into spaces, use moveto
-       for setting space. 
-       
-2004-04-10  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * po/nl.po: Update.
-
-       * scm/font.scm (add-cmr-fonts): Typo.
-
-2004-04-10  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * scm/font.scm (add-cmr-fonts): add sauter fonts under latin1
-       font-encoding.
-
-       * scm/define-grobs.scm (all-grob-descriptions): idem.
-
-       * lily/time-signature.cc (numbered_time_signature): idem.
-
-       * scm/font.scm (add-cmr-fonts): use real encoding names for
-       font-encoding.
-
-2004-04-10  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * lily/paper-book.cc (classic_output): 
-       * tex/lilyponddefs.tex (lybox): Add height, and proper raising.
-       Fixes classic output.
-       (lilypondstart):
-       * scripts/lilypond.py (global_latex_preamble): Remove topmargin
-       kludge.
-
-       * scripts/old-lilypond-book.py: Remove.
-
-       Page layout for SCOREs enclosed in a BOOK:
-
-       * scripts/lilypond.py: Remove LaTeX titling kludge.  Remove page
-       layout tweaking.
-
-       * input/les-nereides.ly (theScore): Add \book.
-       
-       * input/test/title-markup.ly: Add \book.
-
-       * scm/page-layout.scm (ly:optimal-page-breaks): Debugging output
-       only if 'verbose.
-
-       * lily/include/paper-book.hh (PAGE_LAYOUT): Remove.
-
-       * lily/paper-outputter.cc (output_line): Remove PAGE_LAYOUT check.
-
-       * tex/lilyponddefs.tex (lilypondstart, lybox, lyitem):
-       * scm/output-tex.scm (start-system): Update for page layout by
-       LilyPond.
-
-       * scm/output-ps.scm (start-system): Previously (new-start-system).
-
-       * lily/paper-outputter.cc (output_header): Uniquify list of fonts
-       passed to define-fonts.
-
-       * lily/paper-column.cc: 
-       * lily/system.cc (get_line):
-       * ly/property-init.ly (newpage): 
-       * scm/define-grob-properties.scm:
-       * scm/output-ps.scm: 
-       * scm/output-tex.scm: Remove between-system-string kludge.
-
-       * scm/output-ps.scm (define-fonts, font-command,
-       font-load-encoding): Handle ENCODING = #f.
-
-       * scm/output-tex.scm (output-scopes): Check if variable is bound.
-
-       * scm/define-markup-commands.scm (fill-line): Use
-       make-simple-markup (WAS: unexisting make-word-markup).
-
-       * lily/text-item.cc (interpret_markup): Bugfix, transpose
-       ENCODING, MARKUP parameters for interpret_string.
-
-       * lily/input-file-results.cc (do_one_file): Remove Paper_book hack.
-
-       * lily/score.cc (book_rendering): New method.
-       (default_rendering): Create Paper_book helper locally, dump
-       output.
-
-       * lily/my-lily-lexer.cc (the_key_tab): Add book.
-
-       * lily/parser.yy: Handle \book.
-
-       * lily/include/book.hh: 
-       * lily/book.cc: New file.
-
-2004-04-10  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/text-item.cc (interpret_string): new file, select font with
-       encoding.
-
-       * lily/include/lily-guile.hh: ly_XXX_p -> is_XXX. Changes throughout.
-
-       * scm/define-markup-commands.scm (encoded-simple): new markup command.
-
-       * lily/parser.yy (markup): take encoding from lexer.
-
-2004-04-09  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * lily/kpath.cc (kpathsea_find_tfm): Do not trigger TFM generation.
-
-       * scm/output-ps.scm: Remove some cruft.
-
-2004-04-09  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/kpath.cc (kpathsea_find_tfm): don't make unfound TFMs/AFMs.
-
-       * Documentation/user/lilypond.tely (Top): manual for v2.3 (backportme)
-
-2004-04-09  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scm/font.scm (add-century-schoolbook-fonts):
-       (make-century-schoolbook-tree): New function.
-
-       * input/test/title-markup.ly: Use Century Schoolbook font.
+       * scripts/lilypond.py: Handle --set=fontencoding=FONTENC (default:
+       unset) and --set=inputencoding=INPUTENC (default: latin1).
 
 2004-04-09  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
-       * scripts/convert-ly.py: limited old-style markup convert. (Thanks
-       to Erik Sandberg) 
-
-       * lily/font-metric.cc (LY_DEFINE): new function, return fontName.
-
-       * scm/output-ps.scm (define-fonts): remove hack for feta/parmesan.
-
-       * lily/font-metric.cc (LY_DEFINE): change to ly:font-filename
-
-       * scm/encoding.scm (coding-alist): add AdobeStandardEncoding
-
-2004-04-08  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * scm/part-combiner.scm (determine-split-list): bugfix: if no
-       solo-state (at end of solo), we can set the solo status
-       too. (backportme.)
-
-       * input/regression/part-combine-solo-end.ly: new file.
-
-2004-04-08  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scripts/abc2ly.py (parse_file): Strip \r from lines.  Fixes DOS
-       flavour abc files.  Really ignore unknown keys (backportme).
-
-2004-04-08  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/scaled-font-metric.cc (text_dimension): only multiply with
-       magnification_ when looking up in orig_.
-
-       * scm/output-tex.scm (text): switch off char-mapping.
-
-       * lily/tfm.cc (coding_scheme): replace ' ' in encoding with '-',
-       because AFM's encoding field cannot have spaces.
-
-2004-04-08  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scm/output-ps.scm (define-fonts): More re/encoding tweaking.
-
-2004-04-08  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/paper-def.cc (find_scaled_font): change to inputencoding.
-
-       * mf/cmr.enc: new file, without hi-bit ascii info. 
-
-       * lily/bezier-bow.cc (slur_shape): make indent dependent on
-       width. This removes the 'hook' at the end of a long slur.
-
-       * buildscripts/mf-to-table.py (parse_logfile): don't append
-       encoding to fontname.
-
-2004-04-07  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scm/output-ps.scm (define-fonts): Load .enc only once.
-
-       * mf/GNUmakefile (INSTALLATION_OUT_SUFFIXES): Install .enc files
-       too.
-
-2004-04-07  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * buildscripts/mf-to-table.py (parse_logfile): remove spaces from
-       encoding field.
-
-       * lily/stencil-scheme.cc: remove ly:fontify-atom 
-
-       * ly/portuges.ly (pitchnames): new file.
-
-       * lily/include/lily-guile.hh: many new ly_ functions.  Thanks to
-       Michael Welsh Duggan
-
-       * lily/*.cc: deprecate gh_ interface. Thanks to Michael Welsh Duggan
-
-       * ly/nederlands.ly: add comment about digits.
-
-       * lily/scaled-font-metric.cc (derived_mark): idem.
-
-       * scm/encoding.scm (make-encoding-mapping): change permutation to
-       mapping.
-
-       * lily/scaled-font-metric.cc (derived_mark): is a const method.
-       (Modified_font_metric): make alist for coding_description_
-       (LY_DEFINE): remove coding-name.
-
-       * scm/output-tex.scm (text): remove debugging code.
-
-       * lily/scaled-font-metric.cc (ly_font_encoding): return vector
-
-       * buildscripts/mf-to-table.py (parse_logfile): read EncodingScheme
-       from infile.
-
-       * mf/feta-generic.mf: move fet_beginfont into generic code.
-       use fetaMusic (without space) as encoding
-
-       * mf/feta-autometric.mf: take encoding argument
-
-       * lily/afm.cc (read_afm_file): bugfix, read global info too. 
-
-       * lily/my-lily-lexer.cc (set_identifier): remove gh_scm2newstr
-       use.
-
-       * scm/encoding.scm (read-encoding-file): use symbol for glyph
-       name.
-
-2004-04-07  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * input/test/title-markup.ly: Set inputencoding.
-
-       * scm/output-ps.scm (define-fonts): Handle font re-encoding.
-
-       * lily/scaled-font-metric.cc (ly:font-coding-name): New function.
-
-       * scm/encoding.scm (get-coding-filename, get-coding-command): New
-       function.
-       (coding-alist): Also hold filename, command.
-       (read-encoding-file): Return symbols.
-
-2004-04-06  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * scm/output-tex.scm: remove fontify; text and char take a font
-       argument.
-
-       * lily/tfm.cc (name_to_index): new function, use encoding_table_.
-
-       * lily/scaled-font-metric.cc (text_dimension): init
-       coding_{permutation,table}_ too 
-       (LY_DEFINE): ly:font-encoding, new function return
-
-       * lily/paper-def.cc (find_scaled_font): take input coding from
-       inputcoding paper var.
-
-       * lily/performance.cc (output): remap modulo 16.
-
-       * lily/text-item.cc (interpret_markup): whoops, variable
-       shadowing fixed.
-
-2004-04-06  Michael Welsh Duggan  <mwd@sei.cmu.edu>
-
-       * lily/piano-pedal-performer.cc (try_music): Compare symbols to
-       symbols, not symbols to strings.
-       
-       * lily/piano-pedal-engraver.cc (try_music): Compare symbols to
-       symbols, not symbols to strings.
-
-2004-04-06  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * lily/kpath.cc (kpathsea_gulp_file_to_string): 
-       (ly:kpathsea-gulp-file): New function.
-
-       * scm/encoding.scm (read-encoding-file): Use it.
-
-2004-04-06  Werner Lemberg  <wl@gnu.org>
-
-       * scm/encoding.scm (coding-alist): Fix typo.
-
-2004-04-06  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/scaled-font-metric.cc (text_dimension): move function from
-       Font_metric
-       (make_scaled_font_metric): init coding_scheme_ to TeX
-       (text_dimension): use get-coding-vector for non TeX coding_scheme_
-
-       * lily/include/scaled-font-metric.hh (struct
-       Modified_font_metric): rename from Scaled_font_metric
-
-       * scm/encoding.scm (read-encoding-file): split up large function,
-       leave caching to (delay)
-
-       * lily/lily-guile.cc (LY_DEFINE): typecheck argument.
-
-2004-04-05  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * lily/my-lily-lexer.cc (set_encoding): New method.
-
-       * lily/lexer.ll: Grok \encoding.
-
-       * lily/font-metric.cc (get_encoded_index): New function.
-
-       * lily/include/font-metric.hh (coding_scheme): New method.
-
-       * scm/encoding.scm: New file.
-
-       * mf/feta-beugel.mf: Better error message (WAS: `foobar').
-
-2004-04-05  Werner Lemberg  <wl@gnu.org>
-
-       * Documentation/user/tutorial.itely: Revised (finished).
-
-       * Documentation/user/macros.itexi (@separate): Removed.
-
-2004-04-05  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * scm/output-ps.scm (define-fonts): fix scaling.
-
-       * lily/scaled-font-metric.cc (design_size): add function.
-
-       * lily/font-metric.cc (LY_DEFINE): opps ly:font-design-size is only
-       partial cut&paste of ly:font-magnification.
-
-2004-04-05  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * scm/output-ps.scm (define-fonts):
-       (fontify): Update.
-
-2004-04-04  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * po/fr.po: update. (backportme).
-
-       * po/nl.po: update. (backportme). 
-
-       * mf/feta-beugel.mf: document why design size is not fixed.
-
-       * mf/feta-braces-a.mf: rename to stress that it's not design size.
-
-2004-04-04  Werner Lemberg  <wl@gnu.org>
-
-       * Documentation/user/tutorial.itely: Revised (continued).
-
-2004-04-03  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * po/nl.po: Update (backportme).
-
-2004-04-03  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * po/de.po: update. (backportme).
-
-       * scm/output-tex.scm (font-command): use ly: functions to
-       construct name.
-       (define-fonts): don't use alist, just dump \font definitions.
-       (font-load-command): calculate proper scaling by taking
-       outputscale from paper argument.
-
-       * lily/stencil-scheme.cc (fontify_atom): insert Font_metric into
-       expression.
-
-       * lily/paper-outputter.cc (output_header): pass paper arg to
-       define-fonts
-
-       * lily/paper-def.cc (font_descriptions): dump list of
-       Scaled_font_metrics
-       (find_scaled_font): take Font_metric argument, store
-       Scaled_font_metrics in hash-table containing (size ->
-       Scaled_font_metrics) alist.
-       (get_dimension): rename from get_realvar
-
-       * lily/font-metric.cc (LY_DEFINE): ly:font-design-size,
-       ly:font-magnification, ly:font-name: new functions
-
-2004-04-03  Werner Lemberg  <wl@gnu.org>
-
-       * Documentation/user/dedication.itely,
-       Documentation/user/preface.itely,
-       Documentation/user/introduction.itely,
-       Documentation/user/tutorial.itely: Revised.
-       Removing leading spaces which distorts output if info files are read
-       with stand-alone info.
-       Removing superfluous inter-word spaces which also distorts output
-       for stand-alone info.
-       Using ` and ' instead of `` and '' everywhere to improve
-       legilibility with stand-alone info
-       Using @samp for single-letter input items and data which contains
-       spaces, @code for other things.
-
-       * lily/grob-interface.cc: Adding copyright.
-       (check_interfaces_for_property): Improve format of warning message.
-
-2004-04-03  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * lily/include/font-metric.hh (struct Font_metric): add
-       design_size () method.
-
-       * buildscripts/mf-to-table.py (base): add DesignSize comment.
-
-       * lily/afm.cc (read_afm_file): read design size.
-
-       * input/regression/repeat-unfold-tremolo.ly: add dotted case.
-
-       * scm/music-functions.scm (unfold-repeats): handle dots too.
-
-2004-04-02  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * mf/GNUmakefile ($(outdir)/$(redhat-package)): fix URL.
-       (backportme)
-
-2004-04-02  Jan Nieuwenhuizen  <janneke@gnu.org>
-
-       * input/wilhelmus.ly: Use raggedright.  Hack `Een prin -- ce'
-       lyric indent.  Revert melismaBusyProperties using \unset.
-
-2004-04-02  Han-Wen Nienhuys   <hanwen@xs4all.nl>
-
-       * input/regression/bar-check-redefine.ly (pipeSymbol): new file.
-
-       * lily/parser.yy (command_element): allow redefinition of |
-       meaning.
-
-       * lily/break-align-engraver.cc (acknowledge_grob): construct
-       LeftEdge where the first cause for alignment is coming from.
-       This makes \override Staff.LeftEdge work as expected.
-
-       
-       * lily/slur-performer.cc (Slur_performer): add inits
-
-       * lily/beam-performer.cc (Beam_performer): add inits
+       * scripts/convert-ly.py: backport of #'(markup).
 
 2004-04-01  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
index 3f4f7565cc9dead9e43a62a4aa36633a76042b27..ec4b3fdc934563e4740e07b5f005b4d810bc6108 100644 (file)
@@ -699,7 +699,7 @@ basically say: "You can embed a NIFF or MIDI file")}
   note = {Describes a system called MusicEase, and explains that it
   uses "constraints" (which go unexplained) to automatically position
   various elements. },
-  html={http://mesastate.edu/~grader/ieeeme.pdf}, 
+
   year =  {1996},
   title = {Creating Printed Music Automatically},
   author = {Gary M. Rader},
index 8641b6616af99b21fb317b6ec8f9555f975b56b6..fe64c9136eaab5ad9040e10fe544e22e20b8382a 100644 (file)
@@ -15,7 +15,6 @@
       ul li { margin-top: 0.2em; }
       td.left-column { padding-right: 1em; }
       td.right-column { padding-left: 1em; }
-      hr { border:0; height:1; color: #000000; background-color: #000000; }
     </style>
   </head>
   <body>
index 22858430803b145fc5df4318b45a7c030c537e00..2b7aeff48f580ff78412f54ca1afbad1f086a533 100644 (file)
@@ -4,173 +4,6 @@
 
 @node Top, , , 
 @top
-@unnumbered New features in 2.3 since 2.2
-
-@itemize @bullet
-
-@item A experimental GNOME output backend is available for developers.
-It depends on several unreleased softwares such as gnome-guile TLA and
-Pango CVS.  The output interface coverage is sparse, but it already
-does support point-and-click on the GNOME Canvas.  See also
-@file{scm/output-gnome.scm}.
-
-@item Context definitions are now stored in identifiers that match the
-context name, in other words, to modify a @code{Staff} context, the
-following code may be used.
-
-@example
-\context @{
-  \Staff
-  .. 
-@}
-@end example
-
-@item A new block, @code{\bookpaper} has been introduced to
-hold settings for paper size and output scaling.
-
-@item Support for fret diagrams  has been contributed by Carl
-D. Sorensen. @file{input/test/fret-diagram.ly} contains an example.
-@item The @code{--safe-mode} has been revisited: GUILE evaluation
-is done in the R5RS safe module, with only the basic @code{ly:}
-interface available and malicious @TeX{} code is stopped.  However, to
-be reasonably safe, you are advised to use the PostScript backend
-rather than the @TeX{} backend anyway; and if possible use an UML
-sandbox to run gs or latex.
-
-@item Music syntax can now be extended seamlessly. As an example,
-here is the new implementation @code{\applymusic},
-
-@example
-  applymusic = #(ly:make-music-function
-     (list procedure? ly:music?) ; signature
-     (lambda (where func music)  ; the function
-       (func music)))
-@end example
-
-@item @code{\apply} has been renamed to @code{\applymusic}.
-
-@item Music can be used as a markup.
-When inserting a @code{score} block as part of a @code{\markup}, it
-produces a rendered markup of the music.  An example is in
-@file{input/test/markup-score.ly}.
-
-@item LilyPond expressions can be embedded into Scheme. The syntax for
-this is @code{#@{ ... #@}}. Within such a block, Scheme forms can be
-introduced using a @code{$} character (@code{$$} results in a single
-`$' character).  These forms are then inserted in the pattern.
-
-@example
-#(define (textoffset dx dy)
-   (ly:export
-     #@{ \override Voice.TextScript #'extra-offset = #(cons $dx $dy) #@}))
-
-@{
-  c'^"normal text"
-  %% The following embedded scheme call is the same as
-  %% \override Voice.TextScript #'extra-offset = #(cons 2 -3)
-  #(textoffset 2 -3)
-  c'^"text with offset" 
-@}
-@end example
-
-@item A music list at toplevel is interpreted as implicit @code{\score}
-a @code{\score} block at toplevel is interpreted as an implicit
-@code{\book} and @code{\notes} mode is the default lexer mode.  The
-result is that
-
-@example
-\header @{ title = "The Title" @}
-@{ a b c @}
-@end example
-
-is interpreted as
-
-@example
-\header @{ title = "The Title" @}
-\book @{
-  \score @{
-    \notes @{ a b c @}
-  @}
-@}    
-@end example
-
-This is handled by the function defined in
-@code{toplevel-music-handler}.  Similarly, @code{\score} and
-@code{\book} are handled by @code{toplevel-score-handler} and a
-@code{toplevel-book-handler}.  By changing these variables, different
-results can be obtained.
-
-
-@item Start pitch for @code{relative} music is optional for music lists.
-The default value is middle C.
-
-@c update-me?  formal definition of newaddlyrics, once it works
-@item Combining lyrics with music can be done with @code{\newlyrics}
-
-@example
-    \relative @{
-       \clef bass
-       d2 d c4 bes a2 \break
-    @}
-    \newlyrics @{
-       My first Li -- ly song,
-    @}
-    \newlyrics @{
-       Not much can go wrong!
-    @}
-@end example
-
-Syntactically, @code{\newlyrics} acts like an infix operator.
-
-@item The parser is encapsulated in a Scheme function
-@code{ly:parse-file}, so the following fragment processes two files
-
-@verbatim
-#(ly:parse-file "another.ly")
-\score { \notes { c4 }}
-@end verbatim
-
-@item The @code{font-encoding} property can now be used to select
-differently encoded fonts. The previous default setting
-@code{TeX-text} has been replaced by latin1. LilyPond requires the
-@uref{http://www.lilypond.org/download/fonts/,ec-fonts-mftraced}
-package installed to function properly.
-
-@item The encoding of a file can be switched with
-@code{\encoding}. The strings for markup texts are translated
-automatically.
-
-@item The toplevel block @code{\book} introduces page layout.
-A @code{\book} groups @code{\score} blocks into one page layout
-entity. For example, two scores are combined in one book with   
-
-@example
-\book @{
-     \score @{ ... @}
-     \score @{ ... @}
-@}
-@end example
-
-Titling and page breaks are handled by LilyPond.  For automatic page
-breaking, two algorithms are available, the classic ragged pages (the
-default), and optimal page breaking.  
-Page  breaks may be inserted manually with
-@example
-  \pageBreak
-@end example
-
-@item
-The @code{lilypond} program does not generate La@TeX{} titles or page
-layout.  If you need La@TeX{} titles, you can use the
-@code{lilypond-book} program.
-
-@item There is now less of a noticeable ``hook'' at the end of a long slur.
-
-@item The meaning of the @code{|} in the input can be redefined, by
- assigning a music expression to @code{pipeSymbol}.
-@end itemize
 
 @unnumbered New features in 2.2 since 2.0
 
@@ -553,7 +386,7 @@ The placement of accidentals on chords and ledgered notes is improved.
 @end itemize
 
 
-@unnumbered New features in 2.0 since 1.8
+@chapter New features in 2.0 since 1.8
 
 @itemize
 
@@ -820,7 +653,7 @@ for chords, and
 for simultaneous music.
 
 To convert your files from <PITCHES> to <<PITCHES>>, use the script
-included in @file{buildscripts/convert-new-chords.py}.
+included in buildscripts/convert-new-chords.py
 
 This change was introduced for the following reasons
 
index 7b220f89be17629e4e1652a25976839aab701fcf..0b818d9638b614dd22a7eedcb8da5a0486bb7522 100644 (file)
@@ -43,10 +43,8 @@ ifeq ($(out),www)
 # Viewawble with a recent Emacs, doing: M-x info out-www/lilypond.info
 
 #info: $(INFO_FILES)
-
-# Cancel the special, non-image info generation rule that skips images:
-$(outdir)/%.info: $(outdir)/%.nexi
-
+    # Cancel the special, non-image info generation rule that skips images:
+    $(outdir)/%.info: $(outdir)/%.nexi
 local-install-info: install-info info
        -$(INSTALL) -d $(DESTDIR)$(package_infodir)
 ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
@@ -55,11 +53,11 @@ ifneq ($(patsubst %/local,%,$(DESTDIR)$(prefix)),/usr)
 ## builder or packager.
        @echo "***"
        @echo "For images in the INFO docs to work, do: "
-       @echo "    (cd $(package_infodir) && ln -sf ../../doc/lilypond/Documentation/user/out-www/*png .)"
+       @echo "    (cd $(package_infodir) && ln -sf ../../doc/lilypond/$(TOPLEVEL_VERSION)/Documentation/user/out-www/*png .)"
        @echo "or add something like that to the postinstall script."
        @echo "***"
 else
-       (cd $(package_infodir) && ln -sf $(local_package_docdir)/Documentation/user/out-www/*png .)
+       @echo "    (cd $(package_infodir) && ln -sf $(local_package_docdir)/Documentation/user/out-www/*png .)"
 endif
 
 local-uninstall-WWW:
@@ -154,8 +152,8 @@ local-clean:
 $(builddir)/mf/$(outconfbase)/feta16list.ly:
        $(MAKE) -C $(topdir)/mf
 
-$(outdir)/lilypond.texi: $(ITELY_FILES) $(ITEXI_FILES) 
-$(outdir)/lilypond.nexi: $(ITELY_FILES) $(ITEXI_FILES)
+$(outdir)/lilypond.texi: $(ITELY_FILES) macros.itexi 
+$(outdir)/lilypond.nexi: $(ITELY_FILES) macros.itexi 
 
 # Rules for the automatically generated documentation
 # When cross-compiling, we don't have lilypond, so we fake
@@ -190,9 +188,5 @@ endif
 local-clean: local-delete
 
 local-delete:
-       -for i in $$(seq 0 9); do \
-               for j in dvi eps eps.bbox eps.trans log png tex; do \
-                       rm -f $(outdir)/lily-$$i*$$j; \
-               done; \
-       done
+       -rm -f $(outdir)/lily-1*
        -rm -f $(outdir)/*
index 6c1d9b417f3a4bfa58b493d1269d42fa0f9228a5..4ccff1418232ca0e1be79c40a8df8f510467244f 100644 (file)
@@ -45,12 +45,12 @@ entering numbers, lists, strings and symbols in Scheme.
 
 @menu
 * Scheme tutorial::             
-* File structure::              
 * Interpretation contexts::     
 * Tuning output::               
 * Fonts::                       
 * Text markup::                 
 * Global layout::               
+* Output details::              
 @end menu
 
 @node Scheme tutorial
@@ -228,80 +228,7 @@ respectively,
   #'((1) (2))
 @end example
 
-@node File structure
-@section File structure
 
-The following items may be present in a @file{.ly} file at toplevel
-
-@itemize @bullet
-@item An output definition, such as @code{\bookpaper}, @code{\midi}
-and @code{\paper}. Such a definition at toplevel changes the default
-settings for the block entered.
-
-@item An @code{\header} block. This sets the global header block. This
-is the block containing the definitions for book-wide settings, like
-composer, title, etc. 
-
-@item An @code{\addquote} statement. See @ref{Quoting other voices}
-for more information.
-
-@item A @code{\score} block. This score will be formatted as a book
-containing a single movement.
-
-This behavior can be changed by setting the variable
-@code{toplevel-score-handler} at toplevel.  The default handler is
-defined in the init file @file{scm/lily.scm}.
-
-
-@item A @code{\book} block formats the block
-
-This behavior can be changed by setting the variable
-@code{toplevel-book-handler} at toplevel.  The default handler is
-defined in the init file @file{scm/lily.scm}.
-
-
-@item A compound music expression, such as
-@example
-  @{ c'4 d' e'2 @}
-@end example
-
- This will format the piece as a book with a single movement.
-
-This behavior can be changed by setting the variable
-@code{toplevel-music-handler} at toplevel. The default handler is
-defined in the init file @file{scm/lily.scm}.
-@end itemize
-
-The following example shows three things which may be entered at
-toplevel
-@verbatim
-   \paper  {
-     % movements are non-justified by default    
-     raggedright = ##t
-   }
-
-   \header {
-      title = "Do-re-mi"
-   }
-   
-   { c'4 d' e2 }
-@end verbatim
-
-
-At any point in a file, any of the following lexical instructions can
-be entered:
-
-@itemize @bullet
-@item @code{\version}
-@item @code{\include}
-@item @code{\encoding}
-@item @code{\renameinput}
-@end itemize 
-
-
 @node Interpretation contexts
 @section Interpretation contexts
 
@@ -358,7 +285,7 @@ Translation @arrow{} Context.
 
 @menu
 * Creating contexts::           
-* Changing context properties on the fly::  
+* Changing context properties on the fly ::  
 * Modifying context plug-ins::  
 * Layout tunings within contexts::  
 * Changing context default settings::  
@@ -374,11 +301,7 @@ created automatically. For more complex scores, it is necessary to
 create them by hand.  There are three commands which do this.
 
 The easiest command is @code{\new}, and it also the quickest to type.
-It is prepended to a music expression, for example
-
-@cindex @code{\new}
-@cindex new contexts
-@cindex Context, creating
+It is prepended to a  music expression, for example
 
 @example
   \new @var{type} @var{music expression}
@@ -399,8 +322,6 @@ staves. Each part that should be on its own staff, is preceded with
   >>
 @end lilypond
 
-@cindex @code{\context}
-
 Like @code{\new}, the @code{\context} command also directs a music
 expression to a context object, but gives the context an extra name. The
 syntax is
@@ -447,14 +368,13 @@ They are combined by sending both to the same @context{Voice} context,
 music = \notes { c4 c4 }
 arts = \notes  { s4-. s4-> }
 \score {
-  \notes \relative c''  << \new Staff \context Voice = "A" \music
+       \notes \relative c''  << \new Staff \context Voice = "A" \music
      \context Voice = "A" \arts
   >>
 } 
 @end lilypond
 
-@cindex @code{\context}
-@cindex creating contexts
+
 
 The third command for creating contexts is
 @example
@@ -487,10 +407,6 @@ these forms
 @node Changing context properties on the fly
 @subsection Changing context properties on the fly
 
-@cindex properties
-@cindex @code{\set}
-@cindex changing properties
-
 Each context can have different @emph{properties}, variables contained
 in that context. They can be changed during the interpretation step.
 This is achieved by inserting the @code{\set} command in the music,
@@ -530,8 +446,6 @@ example @context{Staff}, then the change would also apply to all
 `on-the-fly', during the music, so that the setting only affects the
 second group of eighth notes.
 
-@cindex @code{\unset} 
-
 There is also an @code{\unset} command,
 @quotation
   @code{\set }@var{context}@code{.}@var{prop}
@@ -779,7 +693,7 @@ from the music, in the @code{\paper} block,
   \paper @{
      @dots{}
      \context @{
-        \Staff
+        \StaffContext
 
         \set fontSize = #-2
         \override Stem #'thickness
@@ -790,12 +704,13 @@ from the music, in the @code{\paper} block,
 
 Here
 @example
-  \Staff
+  \StaffContext
 @end example
 
 @noindent
 takes the existing definition @context{Staff} from the identifier
-@code{Staff}. This works analogously to other contexts.
+@code{StaffContext}. This works analogously to other contexts, so that
+the existing definition  of @code{Voice} is in @code{\VoiceContext}.
 
 The statements
 @example
@@ -849,7 +764,7 @@ to indicate improvisation in Jazz pieces,
     \override Stem #'transparent = ##t
     \alias Voice
   }
-  \context { \Staff
+  \context { \StaffContext
     \accepts "ImproVoice"
   }}
   \score { \notes \relative c'' {
@@ -950,7 +865,7 @@ which is sometimes when reusing existing context definitions. }
 
 @verbatim
   \context {
-    \Staff
+    \StaffContext
     \accepts ImproVoice    
   }
 @end verbatim 
@@ -964,7 +879,7 @@ Putting both into a @code{\paper} block, like
       @dots{}
     @}
   \context @{
-    \Staff
+    \StaffContext
     \accepts "ImproVoice"
   @}
 @}
@@ -1341,7 +1256,7 @@ them are not user-serviceable (``Internal properties''), but others
 are.
 
 We have been talking of `the' @code{Fingering} object, but actually it
-does not amount to much. The initialization file
+does  not amount to much. The initialization file
 @file{scm/define-grobs.scm} shows the soul of the `object',
 
 @verbatim
@@ -1480,7 +1395,6 @@ One of the uses of @code{fontSize} is to get smaller symbols for cue
 notes. An elaborate example of those is in
 @inputfileref{input/test,cue-notes.ly}.
 
-@cindex cue notes
 @cindex @code{font-style}
 
 @refcommands
@@ -1696,11 +1610,9 @@ Globally spoken, this procedure happens in three steps: first,
 flexible distances (``springs'') are chosen, based on durations. All
 possible line breaking combination are tried, and the one with the
 best results --- a layout that has uniform density and requires as
-little stretching or cramping as possible --- is chosen.
-
-After spacing and linebreaking, the systems are distributed across
-pages, taking into account the size of the page, and the size of the
-titles.
+little stretching or cramping as possible --- is chosen. When the score
+is processed by @TeX{}, each page is filled with systems, and page breaks
+are chosen whenever the page gets full.
 
 
 
@@ -1709,10 +1621,6 @@ titles.
 * Vertical spacing::            
 * Horizontal spacing::          
 * Line breaking::               
-* Line length and line breaking::  
-* Titling::                     
-* Page breaking::               
-* Paper size::                  
 * Page layout::                 
 @end menu
 
@@ -1845,7 +1753,7 @@ override this, use a @code{\context} block as follows:
 @example
   \paper @{
     \context @{
-      \PianoStaff
+      \PianoStaffContext
       \override VerticalAlignment #'forced-distance = #9
     @}
     @dots{}
@@ -1947,7 +1855,7 @@ from the @code{\paper} block, since the @internalsref{SpacingSpanner} is
 created before any property commands are interpreted.
 @example
 \paper @{ \context  @{
-  \Score
+  \ScoreContext
   \override SpacingSpanner #'spacing-increment = #3.0
 @} @}
 @end example
@@ -1966,13 +1874,8 @@ changes its character (measured in durations) halfway during the
 score, the part containing the longer durations will be spaced too
 widely.
 
-There is no convenient mechanism to manually override spacing.  The
-following work-around may be used to insert extra space into a score.
-@example
- \once \override Score.SeparationItem #'padding = #1
-@end example
+There is no convenient mechanism to manually override spacing.
 
-No work-around exists for decreasing the amount of space.
 
 
 @menu
@@ -2026,8 +1929,9 @@ This makes the following 28 measures (assuming 4/4 time) be broken every
 
 Internals: @internalsref{BreakEvent}.
 
-@node Line length and line breaking
-@subsection Line length and line breaking
+
+@node Page layout
+@subsection Page layout
 
 @cindex page breaks
 @cindex breaking pages
@@ -2053,192 +1957,130 @@ only affects the last line of the piece. No restrictions are put on
 that line. The result is similar to formatting paragraphs. In a
 paragraph, the last line simply takes its natural length.
 
+The page layout process happens outside the LilyPond formatting
+engine: variables controlling page layout are passed to the output,
+and are further interpreted by @code{lilypond} wrapper program. It
+responds to the following variables in the @code{\paper} block.  The
+spacing between systems is controlled with @code{interscoreline}, its
+default is 16pt.  The distance between the score lines will stretch in
+order to fill the full page @code{interscorelinefill} is set to a
+positive number.  In that case @code{interscoreline} specifies the
+minimum spacing.
+
+@cindex @code{textheight}
+@cindex @code{interscoreline}
+@cindex @code{interscorelinefill}
+
+If the variable @code{lastpagefill} is defined,
+@c fixme: this should only be done if lastpagefill= #t 
+systems are evenly distributed vertically on the last page.  This
+might produce ugly results in case there are not enough systems on the
+last page.  The @command{lilypond-book} command ignores
+@code{lastpagefill}.  See @ref{lilypond-book manual} for more
+information.
+
+@cindex @code{lastpagefill}
+
+Page breaks are normally computed by @TeX{}, so they are not under
+direct control of LilyPond.  However, you can insert commands into
+the @file{.tex} output to instruct @TeX{} where to break pages.  This
+is done by setting the @code{between-systems-strings} on the
+@internalsref{NonMusicalPaperColumn} where the system is broken.
+An example is shown in @inputfileref{input/regression,between-systems.ly}.
+The predefined command @code{\newpage} also does this.
 
-@node Titling
-@subsection Titling
-
-Titles are created for each @code{\score} block, and over a
-@code{\book}.
+@cindex paper size
+@cindex page size
+@cindex @code{papersize}
 
-The contents of the titles are taken from the @code{\header} blocks.
-The header block for a book supports the following 
-@table @code
-@item title
-    The title of the music. Centered on top of the first page.
-@item subtitle
-    Subtitle, centered below the title.
-@item poet
-    Name of the poet, left flushed below the subtitle.
-@item composer
-    Name of the composer, right flushed below the subtitle.
-@item meter
-    Meter string, left flushed below the poet.
-@item opus
-    Name of the opus, right flushed below the composer.
-@item arranger
-    Name of the arranger, right flushed below the opus.
-@item instrument
-    Name of the instrument, centered below the arranger.
-@item dedication            
-    To whom the piece is dedicated.
-@item piece
-    Name of the piece, left flushed below the instrument.
-@end table
+To change the paper size, there are two commands,
+@example
+        #(set-default-paper-size "a4")
+        \paper@{
+           #(set-paper-size "a4")
+        @}
+@end example
+The second one sets the size of the @code{\paper} block that it's in.
 
-This is a demonstration of the fields available, 
-
-@lilypond[verbatim]
-\book {
-  \header {
-    title = "Title"
-    subtitle = "(and (the) subtitle)"
-    subsubtitle = "Sub sub title"
-    poet = "Poet"
-    composer = "Composer"
-    texttranslator = "Text Translator"
-    meter = "Meter"
-    arranger = "Arranger"
-    instrument = "Instrument"
-    piece = "Piece"
-  }
+@refcommands
 
-  \score {
-    \header {
-      piece = "piece1"
-      opus = "opus1" 
-    }
-    { c'1 }
-  }
-  \score {
-    \header {
-      piece = "piece2"
-      opus = "opus2" 
-    }
-    { c'1 }
-  }
-}
-@end lilypond
+@cindex @code{\newpage}
+@code{\newpage}. 
 
-Different fonts may be selected for each element, by using a
-@code{\markup}, e.g.
 
-@verbatim
-  \header {
-    title = \markup { \italic { The italic title } }
-  }
-@end verbatim
+@seealso
 
-A more advanced option is to change the Scheme functions
-@code{make-book-title} and @code{make-score-title} functions, defined
-in the @code{\bookpaper} of the @code{\book} block. These functions
-create a block of titling, given the information in the
-@code{\header}. The init file @file{ly/titling.scm} shows how the
-default format is created, and it may be used as a template for
-different styles.
+In this manual: @ref{Invoking lilypond}.
 
+Examples: @inputfileref{input/regression,between-systems.ly}.
 
-@cindex header
-@cindex footer
-@cindex page layout
-@cindex titles
+Internals: @internalsref{NonMusicalPaperColumn}.
 
+@refbugs
 
+LilyPond has no concept of page layout, which makes it difficult to
+reliably choose page breaks in longer pieces.
 
 
-@node Page breaking
-@subsection Page breaking
 
-The default page breaking may be overriden by inserting
-@code{\pageBreak} or @code{\noPageBreak} commands. These commands are
-analogous to @code{\break} and @code{\noBreak}. They should be
-inserted with a bar line. These commands force and forbid a page-break
-from happening. 
 
-Page breaks are computed by the @code{page-breaking} function in the
-@code{\bookpaper} block. 
+@node Output details
+@section Output details
 
-@refcommands
+The default output format is La@TeX{}, which should be run
+through La@TeX{}.  Using the option @option{-f}
+(or @option{--format}) other output formats can be selected also, but
+ none of them work reliably.
 
-@cindex @code{\pageBreak}
-@code{\pageBreak}
-@cindex  @code{\noPageBreak} 
-@code{\noPageBreak} 
+Now the music is output system by system (a `system' is a single line
+from the score, consisting of staves belonging together).  From
+@TeX{}'s point of view, a system is an @code{\hbox} which contains a
+lowered @code{\vbox} so that it is centered vertically on the baseline
+of the text.  Between systems, @code{\interscoreline} is inserted
+vertically to have stretchable space.  The horizontal dimension of the
+@code{\hbox} is given by the @code{linewidth} parameter from
+LilyPond's @code{\paper} block.
 
-@node Paper size
-@subsection Paper size
+After the last system LilyPond emits a stronger variant of
+@code{\interscoreline} only if the macro
+@code{\lilypondpaperlastpagefill} is not defined (flushing the systems
+to the top of the page).  You can avoid that by setting the variable
+@code{lastpagefill} in LilyPond's @code{\paper} block.
 
-@cindex paper size
-@cindex page size
-@cindex @code{papersize}
+It is possible to fine-tune the vertical offset further by defining the
+macro @code{\lilypondscoreshift}:
 
-To change the paper size, there are two commands,
 @example
-        #(set-default-paper-size "a4")
-        \paper@{
-           #(set-paper-size "a4")
-        @}
+\def\lilypondscoreshift@{0.25\baselineskip@}
 @end example
-The second one sets the size of the @code{\paper} block that it is in.
-
-
-@node Page layout
-@subsection Page layout
-
-@cindex page layout
-@cindex margins
-@cindex header, page
-@cindex footer, page
-
-LilyPond will do page layout, setting margins and adding headers and
-footers to each page.
 
-The default layout responds to the following settings in the
-@code{\bookpaper} block
-
-@table @code
-@item hsize
- The width of the page
-@item vsize
- The height of the page
-@item top-margin
- Margin between header and top of the page
-@item bottom-margin
- Margin between footer and bottom of the page
-@item head-sep
- Distance between top-most music system and the page header
-@item foot-sep
- Distance between bottom-most music system and the page footer
-@item raggedbottom
- If set to true, systems will not be spread across the page.  
-@item raggedlastbottom
- If set to true, systems will not be spread to fill the last page.
-@end table
-
-The default page header puts the page number and the @code{instrument}
-field from the @code{\header} block on a line.
-
-@cindex copyright
-@cindex tagline
-
-The default footer is empty, except for the first page, where it the
-@code{copyright} field from @code{\header} is inserted, and the last
-page, where @code{tagline} from @code{\header} is added. The default
-tagline is ``Engraved by LilyPond (@var{version})''.
+@noindent
+where @code{\baselineskip} is the distance from one text line to the next.
 
-The header and footer are created by the functions @code{make-footer}
-and @code{make-header}, defined in @code{\bookpaper}. The default
-implementations are in @file{scm/page-layout.scm}.
+Here an example how to embed a small LilyPond file @code{foo.ly} into
+running La@TeX{} text without using the @code{lilypond-book} script
+(@pxref{lilypond-book manual}):
 
-The page layout itself is done by two functions:
-@code{page-music-height} and @code{page-make-stencil}. The former
-tells the line-breaking algorithm how much space can be spent on a
-page, the latter creates the actual page given the system to put on it. 
+@example
+\documentclass@{article@}
 
+\def\lilypondpaperlastpagefill@{@}
+\lineskip 5pt
+\def\lilypondscoreshift@{0.25\baselineskip@}
 
-@seealso
+\begin@{document@}
+This is running text which includes an example music file
+\input@{foo.tex@}
+right here.
+\end@{document@}
+@end example
 
-Examples: @inputfileref{input/test/,page-breaks.ly}
+The file @file{foo.tex} has been simply produced with
 
+@example
+  lilypond-bin foo.ly
+@end example
 
+The call to @code{\lineskip} assures that there is enough vertical space
+between the LilyPond box and the surrounding text lines.
 
index 272fb8be51ed72e8c321e0179402a7e6d688a2e8..f97a38c262193bae149a17e177938998b231908b 100644 (file)
@@ -201,8 +201,8 @@ a\> a a\!
 @tab upstep
 @tab
 @lilypond[fragment,relative=2]
-\partial 8
-f8 c2 d e
+  \partial 8
+  f8 c2 d e
 @end lilypond
 
 
@@ -210,7 +210,7 @@ f8 c2 d e
 @tab triplets
 @tab
 @lilypond[relative=1,fragment]
-\times 2/3 { f8 g a }
+  \times 2/3 { f8 g a }
 @end lilypond
 
 
@@ -218,7 +218,7 @@ f8 c2 d e
 @tab grace notes
 @tab
 @lilypond[relative=2,fragment]
-\context Voice { \grace b16 c4 }
+\context Voice {  \grace b16 c4 }
 @end lilypond
 
 @item @code{\lyrics @{ twinkle @}}
@@ -231,31 +231,30 @@ f8 c2 d e
 @tab
 twinkle
 @lilypond[fragment]
-\new Lyrics \lyrics { twinkle }
+\lyrics \new Lyrics { twinkle }
 @end lilypond
 
 @item @code{twin -- kle}
 @tab lyric hyphen 
 @tab
 @lilypond[fragment,relative=2]
-<<
-  \notes { g'4 g }
-  \lyricsto "" \new Lyrics \lyrics { twin -- kle }
->> 
+ << \notes { g'4 g }
+    \lyricsto "" \new Lyrics \lyrics {  twin -- kle }
+    >> 
 @end lilypond
 
 @item @code{\chords @{ c:dim f:maj7 @}}
 @tab chords 
 @tab
 @lilypond[fragment,relative=2]
-\chords { c:dim f:maj7 }
+  \chords { c:dim f:maj7 }
 @end lilypond
 
 @item @code{\context ChordNames}
 @tab printing chord names 
 @tab
 @lilypond[fragment,relative=2]
-\context ChordNames \chords { c:dim f:maj7 }
+  \context ChordNames \chords { c:dim f:maj7 }
 @end lilypond
 
 @item @code{<<@{e f@} \\@{c d@}>>}
index cc5b1fc081a51db2fe56175e974663628c1ac38c..53779bb9a8be3d48e717c017f1a809e21594c39b 100644 (file)
@@ -1,7 +1,7 @@
 
-@quotation
-We want to dedicate this program to all the friends that we
-met through music.
+@quotation 
+        We would like to dedicate this program to all the friends that we
+        met through music.
 
-Han-Wen and Jan
+        Han-Wen and Jan
 @end quotation
index 6e3fcd8cbadf69e499b0686469bf450ad145960d..cc7615d8e2ac755986bff685b282928ba20b0a7f 100644 (file)
@@ -47,8 +47,8 @@ to play from.
 The images below illustrate the difference between traditional
 engraving and typical computer output, and the third picture shows how
 LilyPond mimics the traditional look.  The left picture shows a scan
-of a flat symbol from a Henle edition published in 2000.  The center
-depicts a symbol from a hand-engraved B@"{a}renreiter edition of the
+of a flat symbol from a Henle edition published in 2000.  In the
+center show symbol from a hand engraved B@"{a}renreiter edition of the
 same music.  The left scan illustrates typical flaws of computer
 print: the staff lines are thin, the weight of the flat symbol matches
 the light lines and it has a straight layout with sharp corners.  By
@@ -106,7 +106,7 @@ LilyPond Feta font (2003)
 @c introduce illustrating aspects of engraving, spacing...
 In spacing, the distribution of space should reflect the durations
 between notes.  However, many modern scores adhere to the durations
-with mathematical precision, which leads to poor results.  In the
+with mathematical precision, which leads to a poor result.  In the
 next example a motive is printed twice.  It is printed once using
 exact mathematical spacing, and once with corrections.  Can you
 spot which fragment is which?
@@ -162,7 +162,7 @@ result minimizes the number of page turns, which is a great advantage.
 This is a common characteristic of typography.  Layout should be
 pretty, not only for its own sake, but especially because it helps the
 reader in his task.  For performance material like sheet music, this is
-of double importance: musicians have a limited amount of attention.  The
+doubly important: musicians have a limited amount of attention.  The
 less attention they need for reading, the more they can focus on
 playing itself.  In other words, better typography translates to better
 performances.
@@ -195,26 +195,27 @@ of years, the software can be refined to do more and more
 automatically, so manual overrides are less and less necessary.
 
 When we started we wrote the LilyPond program entirely in the C++
-programming language; the program's functionality was set in stone by
+programming language, the program's functionality was set in stone by
 the developers.  That proved to be unsatisfactory for a number of
 reasons:
 
 @itemize @bullet
 @item When LilyPond makes mistakes,
-users need to override formatting decisions.  Therefore, the user must
-have access to the formatting engine.  Hence, rules and settings cannot
-be fixed by us at compile time but must be accessible for users at
-run-time.
+ users need to override formatting decisions.  Therefore, the user
+must access to the formatting engine.  Hence, rules and settings cannot
+be fixed by us at compile time, but they must be accessible for users
+at run-time.
 
 @item Engraving is a matter of visual judgment, and therefore a matter of
 taste.  As knowledgeable as we are, users can disagree with our
 personal decisions.  Therefore, the definitions of typographical style
 must also be accessible to the user.
 
-@item Finally, we continually refine the formatting algorithms, so we
+@item  Finally, we continually refine the formatting algorithms, so we
 need a flexible approach to rules.  The C++ language forces a certain
 method of grouping rules that do not match well with how music
 notation works.
+
 @end itemize
 
 These problems have been addressed by integrating the GUILE
@@ -248,7 +249,7 @@ variables of graphical objects.
 
 Some variables have a preset value.  For example, the thickness of many
 lines---a characteristic of typographical style---are preset
-variables.  Changing them gives a different typographical impression.
+variables.  Changing them gives a different typographical impression
 
 @lilypond[quote,raggedright]
 fragment = \notes {
@@ -271,10 +272,10 @@ fragment = \notes {
 @end lilypond
 
 Formatting rules are also preset variables: each object has variables
-containing procedures.  These procedures perform the actual formatting,
+containing procedures.  These procedure perform the actual formatting,
 and by substituting different ones, we can change behavior.  In the
-following example, the rule which note head objects use to produce
-their symbol is changed during the music fragment.
+following example, the rule that note head objects use to produce
+their symbol is changed during the music fragment
 
 @lilypond[quote,raggedright]
 #(define (mc-squared grob orig current)
@@ -329,7 +330,7 @@ symbols should be printed, in other words what notation to use.
 
 Common music notation is a system of recording music that has evolved
 over the past 1000 years.  The form that is now in common use, dates
-from the early renaissance.  Although the basic form (i.e., note heads on a
+from the early renaissance.  Although, the basic form (i.e.  note heads on a
 5-line staff) has not changed, the details still change to express the
 innovations of contemporary notation.  Hence, it encompasses some 500
 years of music.  Its applications range from monophonic melodies to
@@ -337,11 +338,11 @@ monstrous counterpoint for large orchestras.
 
 How can we get a grip on such a many-headed beast, and force it into
 the confines of a computer program?  We have broken up the problem of
-notation (as opposed to engraving, i.e., typography) into digestible
+notation (as opposed to engraving, i.e.  typography) into digestible
 and programmable chunks: every type of symbol is handled by a separate
 module, a so-called plug-in.  Each plug-in is completely modular and
 independent, so each can be developed and improved separately.  People
-who translate musical ideas to graphic symbols are called copyists or
+that translate musical ideas to graphic symbols are called copyists or
 engravers, so by analogy, each plug-in is called @code{engraver}.
 
 In the following example, we see how we start out with a plug-in for
@@ -354,7 +355,7 @@ note heads, the @code{Note_heads_engraver}.
   \topVoice
   \paper {
     \context {
-      \Voice
+      \VoiceContext
       \remove "Stem_engraver"
       \remove "Phrasing_slur_engraver"
       \remove "Slur_engraver"
@@ -363,7 +364,7 @@ note heads, the @code{Note_heads_engraver}.
       \remove "Auto_beam_engraver"
     }
     \context {
-      \Staff
+      \StaffContext
       \remove "Accidental_engraver"
       \remove "Key_engraver"
       \remove "Clef_engraver"
@@ -386,7 +387,7 @@ Then a @code{Staff_symbol_engraver} adds the staff
   \topVoice
   \paper {
     \context {
-      \Voice
+      \VoiceContext
       \remove "Stem_engraver"
       \remove "Phrasing_slur_engraver"
       \remove "Slur_engraver"
@@ -395,7 +396,7 @@ Then a @code{Staff_symbol_engraver} adds the staff
       \remove "Auto_beam_engraver"
     }
     \context {
-      \Staff
+      \StaffContext
       \remove "Accidental_engraver"
       \remove "Key_engraver"
       \remove "Clef_engraver"
@@ -408,7 +409,7 @@ Then a @code{Staff_symbol_engraver} adds the staff
 @end lilypond
 
 @noindent
-the @code{Clef_engraver} defines a reference point for the staff
+The @code{Clef_engraver} defines a reference point for the staff
 
 @lilypond[quote,raggedright]
 \include "engraver-example.lyinc"
@@ -417,7 +418,7 @@ the @code{Clef_engraver} defines a reference point for the staff
   \topVoice
   \paper {
     \context {
-      \Voice
+      \VoiceContext
       \remove "Stem_engraver"
       \remove "Phrasing_slur_engraver"
       \remove "Slur_engraver"
@@ -426,7 +427,7 @@ the @code{Clef_engraver} defines a reference point for the staff
       \remove "Auto_beam_engraver"
     }
     \context {
-      \Staff
+      \StaffContext
       \remove "Accidental_engraver"
       \remove "Key_engraver"
       \remove "Bar_engraver"
@@ -437,7 +438,7 @@ the @code{Clef_engraver} defines a reference point for the staff
 @end lilypond
 
 @noindent
-and the @code{Stem_engraver} adds stems.
+And the @code{Stem_engraver} adds stems
 
 @lilypond[quote,raggedright]
 \include "engraver-example.lyinc"
@@ -446,7 +447,7 @@ and the @code{Stem_engraver} adds stems.
   \topVoice
   \paper {
     \context {
-      \Voice
+      \VoiceContext
       \remove "Phrasing_slur_engraver"
       \remove "Slur_engraver"
       \remove "Script_engraver"
@@ -454,7 +455,7 @@ and the @code{Stem_engraver} adds stems.
       \remove "Auto_beam_engraver"
     }
     \context {
-      \Staff
+      \StaffContext
       \remove "Accidental_engraver"
       \remove "Key_engraver"
       \remove "Bar_engraver"
@@ -485,13 +486,13 @@ polyphony?  In polyphonic notation, many voices can share a staff.
 @end lilypond
 
 In this situation, the accidentals and staff are shared, but the
-stems, slurs, beams, etc., are private to each voice.  Hence, engravers
-should be grouped.  The engravers for note heads, stems, slurs, etc., go
-into a group called `Voice context,' while the engravers for key,
-accidental, bar, etc., go into a group called `Staff context.'  In the
+stems, slurs, beams, etc.  are private to each voice.  Hence, engravers
+should be grouped.  The engravers for note heads, stems, slurs, etc.  go
+into a group called ``Voice context,'' while the engravers for key,
+accidental, bar, etc.  go into a group called ``Staff context.'' In the
 case of polyphony, a single Staff context contains more than one Voice
 context.  In polyphonic notation, many voices can share a staff.
-Similarly, more Staff contexts can be put into a single Score context.
+Similarly, more Staff contexts can be put into a single Score context
 
 @lilypond[quote,raggedright]
 \include "engraver-example.lyinc"
@@ -518,14 +519,10 @@ document.
 
 The syntax is also the user-interface for LilyPond, hence it is easy
 to type
-
 @example
 c'4 d'8
 @end example
-
-@noindent
-a quarter note C1 (middle C) and an eighth note D1 (D above middle C)
-
+a quarter note C1 (middle C) and eighth note D1 (D above middle C)
 @lilypond[quote,fragment]
 c'4 d'8
 @end lilypond
@@ -540,41 +537,37 @@ into larger ones, more complex music can be expressed.  For example
 c4
 @end lilypond
 
-@noindent
-Chords can be constructed with < and > enclosing the notes
+Combine this simultaneously with two other notes by enclosing in << and >>
 
 @example
-<c d e>4
+<<c4 d4 e4>>
 @end example
-
 @lilypond[quote,fragment,relative=1]
-\new Voice { <c d e>4 }
+\new Voice { <<c4 d4 e4>> }
 @end lilypond
 
-@noindent
 This expression is put in sequence by enclosing it in curly braces
-@code{@{@tie{}@dots{}@tie{}@}}
+@code{@{ @dots{} @}}
 
 @example
-@{ <c d e>4 f4 @}
+@{ <<c4 d4 e4>> f4 @}
 @end example
 
 @lilypond[quote,relative=1]
-\new Voice { <c d e>4 f4 }
+\new Voice { <<c4 d4 e4>> f4 }
 @end lilypond
-
-@noindent      
-The above is an expression also, and thus it may be combined again with
-another simultaneous expression (a half note) using <<, @code{\\}, and >>
+       
+The above is another expression, and therefore, it many combined again
+with a simultaneous expression; in this case, a half note
 
 @example
-<< g2 \\ @{ <c d e>4 f4 @} >>
+<< @{ <<c4 d4 e4>> f4 @} g2 >>
 @end example
-
 @lilypond[quote,fragment,relative=2]
 \new Voice { << g2 \\ { <c d e>4 f4 } >> }
 @end lilypond
        
+
 Such recursive structures can be specified neatly and formally in a
 context-free grammar.  The parsing code is also generated from this
 grammar.  In other words, the syntax of LilyPond is clearly and
@@ -596,14 +589,14 @@ and representation take up less than 10% of the code.
 We have written LilyPond as an experiment of how to condense the art
 of music engraving into a computer program.  Thanks to all that hard
 work, the program can now be used to perform useful tasks.  The
-simplest application is printing notes.
+simplest application is printing notes
 
 @lilypond[quote,relative=1]
 \time 2/4 c4 c g'4 g a4 a g2
 @end lilypond
 
 @noindent
-By adding chord names and lyrics we obtain a lead sheet.
+By adding chord names and lyrics we obtain a lead sheet
 
 @lilypond[quote,raggedright]
 \score {
@@ -615,8 +608,9 @@ By adding chord names and lyrics we obtain a lead sheet.
 }
 @end lilypond
 
+
 Polyphonic notation and piano music can also be printed.  The following
-example combines some more exotic constructs.
+example combines some more exotic constructs
 
 @lilypondfile[quote,raggedright]{screech-boink.ly}
 
@@ -629,7 +623,7 @@ presentations.
 
 This manual also shows an application: the input format is text, and
 can therefore be easily embedded in other text-based formats such as
-La@TeX{}, HTML, or in the case of this manual, Texinfo.  By means of a
+La@TeX{}, HTML or in the case of this manual, Texinfo.  By means of a
 special program, the input fragments can be replaced by music images
 in the resulting PostScript or HTML output files.  This makes it easy
 to mix music and text in documents.
@@ -664,7 +658,6 @@ The
 @end ifhtml
 @emph{@ref{Changing defaults}}
 explains how to fine tune layout.
-
 @item
 @ifhtml
 The chapter
@@ -695,8 +688,9 @@ how to upgrade input files from previous versions of LilyPond.
 The
 @end ifhtml
 @emph{@ref{Literature list}}
-contains a set of useful reference books, for those who wish to know
-more  on notation and engraving.
+ contains a set of useful reference books, for those who wish to know
+ more  on notation and engraving.
+
 @end itemize
 
 Once you are an experienced user, you can use the manual as reference:
@@ -746,13 +740,13 @@ Program reference
 @end ifhtml
 
 The program reference is a set of heavily cross linked HTML pages,
-which document the nit-gritty details of each and every LilyPond
-class, object, and function.  It is produced directly from the
+which documents the nit-gritty details of each and every LilyPond
+class, object and function.  It is produced directly from the
 formatting definitions used.
 
 Almost all formatting functionality that is used internally, is
 available directly to the user.  For example, all variables that
-control thickness values, distances, etc., can be changed in input
+control thicknesses, distances, etc, can be changed in input
 files.  There are a huge number of formatting options, and all of them
 are described in the generated documentation.  Each section of the
 notation manual has a @b{See also} subsection, which refers to the
@@ -760,7 +754,7 @@ the generated documentation.  In the HTML document, these subsections
 have clickable links.
 
 @item
-Templates
+  Templates
 @ifhtml
 (available @uref{../../../../input/template/out-www/collated-files.html,here})
 @end ifhtml
@@ -768,11 +762,12 @@ Templates
 After you have gone through the tutorial, you should be able to write
 input files.  In practice, writing files from scratch turns out to be
 intimidating.  To give you a head start, we have collected a number of
-often-used formats in example files; simply copy the template and add
-notes in the appropriate places.
+often-used formats in example files.  These files can be used as a
+start; simply copy the template and add notes in the appropriate
+places.
 
 @item
-Various input examples
+  Various input examples
 @ifhtml
 (available @uref{../../../../input/test/out-www/collated-files.html,here})
 @end ifhtml
@@ -783,7 +778,7 @@ available as a big HTML document, with pictures and explanatory texts
 included.
 
 @item
-The regression tests
+  The regression tests
 @ifhtml
 (available @uref{../../../../input/regression/out-www/collated-files.html,here})
 @end ifhtml
@@ -792,6 +787,7 @@ This collection of files tests each notation and engraving feature of
 LilyPond in one file.  The collection is primarily there to help us
 debug problems, but it can be instructive to see how we exercise the
 program.  The format is similar to the the tips and tricks document.
+
 @end itemize
 
 
index 30eab3aa9e41e3495dea73353d000afc28d5e4db..4d1033e0a8d90b8d8c7d339a244a502f401bffe6 100644 (file)
@@ -30,12 +30,12 @@ format.
 To have @code{lilypond} read from stdin, use a dash @code{-} for
 @var{file}.  The program supports the following options.
 
-@cindex stdin, reading
-
 @table @code
 @item -k,--keep
     Keep the temporary directory with all output
 files. The temporary directory is created in the current directory as @code{@code{lilypond}.dir}.
+@item -d,--dependencies
+    Write @code{Makefile} dependencies for every input file.
 @item -h,--help
     Print usage help.
 @item -I,--include=@var{dir}
@@ -72,7 +72,7 @@ files. The temporary directory is created in the current directory as @code{@cod
     Add @var{key}= @var{val} to the settings, overriding those specified
 in the files. Possible keys: @code{language}, @code{latexheaders},
 @code{latexpackages}, @code{latexoptions}, @code{papersize},
-@code{linewidth}, @code{orientation},
+@code{pagenumber}, @code{linewidth}, @code{orientation},
 @code{textheight}.
 @item -v,--version
 Show version information.
@@ -86,6 +86,55 @@ Show the warranty with which GNU LilyPond comes. (It comes with
 @strong{NO WARRANTY}!)
 @end table
 
+@subsection Titling layout
+
+@code{lilypond} extracts the following header fields from the LY files
+to generate titling; an example demonstrating all these fields is in
+@inputfileref{input/test,lilypond-testpage.ly}:
+
+@table @code
+@item title
+    The title of the music. Centered on top of the first page.
+@item subtitle
+    Subtitle, centered below the title.
+@item poet
+    Name of the poet, left flushed below the subtitle.
+@item composer
+    Name of the composer, right flushed below the subtitle.
+@item meter
+    Meter string, left flushed below the poet.
+@item opus
+    Name of the opus, right flushed below the composer.
+@item arranger
+    Name of the arranger, right flushed below the opus.
+@item instrument
+    Name of the instrument, centered below the arranger.
+@item dedication            
+    To whom the piece is dedicated.
+@item piece
+    Name of the piece, left flushed below the instrument.
+@item head
+    A text to print in the header of all pages. It is not called
+@code{header}, because @code{\header} is a reserved word in LilyPond.
+@item copyright
+    A text to print in the footer of the first page. Default is to 
+    print the standard footer also on the first page. Note that if the
+    score consists of only a single page, the first page is also the
+    last page, and in this case, the tagline is printed instead of the
+    copyright.
+@item footer
+    A text to print in the footer of all but the last page.
+@item tagline
+    Line to print at the bottom of last page. The default text is ``Engraved
+by LilyPond @var{version-number}''.
+@end table
+
+
+@cindex header
+@cindex footer
+@cindex page layout
+@cindex titles
+
 
 
 @subsection Additional parameters
@@ -103,7 +152,7 @@ included.  Default: unset.
 
 @item latexheaders
     Specify additional La@TeX{} headers file.
-<
+
         Normally read from the @code{\header} block. Default value: empty.
 
 @item latexpackages
@@ -134,8 +183,13 @@ block.
 @item papersize
    The paper size (as a name, e.g. @code{a4}). It is normally read from
 the @code{\paper} block.
+
+@item pagenumber
+   If set to @code{no}, no page numbers will be printed.  If set to a
+positive integer, start with this value as the first page number.
+
   
-@item fontenc
+  @item fontenc
      The font encoding, should be set identical to the @code{font-encoding}
      property in the score.
 @end table
@@ -172,8 +226,22 @@ output).  If @file{filename.ly} contains more than one @code{\score}
 block, then the rest of the scores will be output in numbered files,
 starting with @file{filename-1.tex}.  Several files can be specified;
 they will each be processed independently.  @footnote{The status of
-GUILE is not reset across invocations, so be careful not to change any
-system defaults from within Scheme.}
+  GUILE is not reset across invocations, so be careful not to change any
+  system defaults from within Scheme.}
+
+We strongly advise against making LilyPond formatting available
+through a web server. That is, processing input from untrusted users,
+and returning the resulting PDF file. LilyPond is a big and complex
+program. It was not written with security in mind. Making it available
+to the outside world is a huge risk; consider the security
+implications of
+
+@verbatim
+  #(system "rm -rf /")
+  \score {
+    c4^#(ly:export (ly:gulp-file "/etc/passwd"))
+  }
+@end verbatim
 
 
 @section Command line options
@@ -192,14 +260,20 @@ information.
 @item -f,--format=@var{format}
 @c
 @c
-A comma separated list of output formats.  Choices are @code{tex} (for
-@TeX{} output, to be processed with La@TeX{}, and @code{ps} for
-PostScript.
+Output format for sheet music. Choices are @code{tex} (for @TeX{}
+output, to be processed with plain @TeX{}, or through @code{lilypond}),
+@code{pdftex} for PDF@TeX{} input, @code{ps} (for PostScript),
+@code{scm} (for a Scheme dump), @code{sk} (for Sketch) and @code{as}
+(for ASCII-art).
 
-Other output options are intended for developers. 
+@strong{This option is only for developers}. Only the @TeX{} output of
+these is usable for real work.
 
 
 @cindex output format, setting
+@cindex Sketch output
+@cindex ASCII-art output
+@cindex PDFTeX output
 @cindex PostScript output
 @cindex Scheme dump
 
@@ -215,32 +289,20 @@ Set init file to @var{file} (default: @file{init.ly}).
 @cindex MIDI
 Disable @TeX{} output. If you have a @code{\midi} definition MIDI output
 will be generated.
+@item -M,--dependencies
+Output rules to be included in Makefile.
 @item -o,--output=@var{FILE}
 Set the default output file to @var{FILE}.
 
+@ignore
 @item -s,--safe
-Do not trust the @code{.ly} input. 
+Disallow untrusted @code{\include} directives, in-line
+Scheme evaluation, backslashes in @TeX{}, code.
 
-When LilyPond formatting available through a web server, the
-@code{--safe} @b{MUST} be passed.  This will prevent code like
-
-@verbatim
-  #(system "rm -rf /")
-  \score {
-    c4^#(ly:export (ly:gulp-file "/etc/passwd"))
-  }
-@end verbatim
-
-The @code{--safe} option works by evaluating in-line Scheme
-expressions in a special safe module. This safe module is derived from
-GUILE @file{safe-r5rs} module, but adds a number of functions of the
-LilyPond API. These functions are listed in @file{safe-lily.scm}.
-
-In addition, @code{--safe} disallows @code{\include} directives and
-disables the use of backslashes in @TeX{} strings.
-
-In @code{--safe} mode, it is not possible to import LilyPond variables
-into Scheme. 
+@strong{WARNING}: the @code{--safe} option has not been reviewed for a
+long time. Do not rely on it for automatic invocation (e.g. over the
+web). Volunteers are welcome to do a new audit.
+@end ignore
 
 @item -v,--version
 Show version information.
@@ -377,12 +439,6 @@ intended to help the programmers and debuggers. Usually, they can be
 ignored. Sometimes, they come in such big quantities that they obscure
 other output. In this case, file a bug-report.
 
-@item Aborted (core dumped)
-This signals a serious programming error that caused the program to
-crash. Such errors are considered critical. If you stumble on one,
-send a bugreport.
-
-
 @end table
 
 @cindex errors, message format
index 3d458eb7f18ff18bad0c6686d6d82e4602bc312c..42a7263c604321a45763356f0f22eb5fc3b20880 100644 (file)
@@ -165,8 +165,16 @@ and the
 are also interpreted.
 
 @cindex titling and lilypond-book
+@cindex lilypond-book and titling
 @cindex @code{\header} in La@TeX{} documents
 
+The titling from the @code{\header} section of the fragments can be
+imported by adding the following to the top of the La@TeX{} file:
+
+@example
+\input titledefs.tex
+\def\preLilyPondExample@{\def\mustmakelilypondtitle@{@}@}
+@end example
 
 The music will be surrounded by @code{\preLilyPondExample} and
 @code{\postLilyPondExample}, which are defined to be empty by default.
index 2be8e61d8a4d30f71a0481295586837537c4815c..fd51d5d70edd0642c2fde15f37ba921283c010d1 100644 (file)
@@ -42,8 +42,6 @@ Distributions will want to install lilypond.info in postinstall, doing:
 
 HINTS FOR STYLE
 
-* Do not forget to create @cindex entries for new sections of text.
-
 * Try not to use punctuation between introductocing sentence and
 display material (verbatim, music, example code).
 
@@ -104,8 +102,7 @@ Copyright @copyright{} 1999--2004 by the authors
 
 @vskip 20pt
 
-%% Not yet debugged or reported.  This crashes gs-8.01:
-%% compiling gs-8.01 right now... -- jcn
+  
 @lilypond[raggedright]
 \score {
     \context Lyrics \notes {
@@ -120,6 +117,7 @@ Copyright @copyright{} 1999--2004 by the authors
      }
 }
 @end lilypond
+  
 
 @end titlepage
 
@@ -144,7 +142,7 @@ Copyright 1999--2004 by the authors
 @top GNU LilyPond --- The music typesetter
 @c HJJ: Info needs `@top', which is a synonym for `@unnumbered' in TeX.
 
-This is the user manual for GNU LilyPond 2.3.x series.
+This is the user manual for GNU LilyPond 2.2 series.
 @ifhtml
 (See the bottom of this page for the exact version number).
 @end ifhtml
index 4e7f0bac026061ebe5e0e89eff278b354decaf72..9c81c089789b27aba4346485be40ce7fa7cd6ead 100644 (file)
@@ -65,6 +65,36 @@ b
 
 
 
+
+@iftex
+@macro separate 
+@c I want some space over here,  not silly characters.
+@tex
+@end tex
+@end macro
+@end iftex
+
+@c \heartsf was supposed to be filled?
+
+@c center*** is broken?
+
+@ifinfo
+@macro separate
+
+@quotation
+@end quotation
+@end macro
+@end ifinfo
+
+@ifhtml
+@macro separate
+@html
+<p></p><br><br>
+@end html
+@end macro
+@end ifhtml
+
+
 @c dup?
 @ifhtml
 @macro internalsref{NAME}
index dc7185a6486d2df7cdbe85c1ac6e46bc656c7788..05bae1e6752fa1e4fbf929e716fd55d790e88cd4 100644 (file)
@@ -1,4 +1,4 @@
-                   \input texinfo  @c -*-texinfo-*-
+\input texinfo  @c -*-texinfo-*-
 @settitle Music Glossary
 @setfilename music-glosssary.info
 
@@ -52,14 +52,14 @@ Copyright @copyright{} 1999--2004 by the authors
 
 @ifnottex
 @node Top
-@top Music Glossary
+@top
 @chapter Music Glossary
 @menu
 @end menu
 @end ifnottex
 
 @ifnottex
-@table @samp
+@table @code
 @item Adrian Mariano
 Italian glossary,
 @item Bjoern Jacke
@@ -159,8 +159,7 @@ they look too intrusive (says Han-Wen).
 This is an example reference, that points you to the @aref{accent}
 entry.
 
-@c All `@table @strong' replaced by `@table @samp'
-@c @strong{note xxx} breaks for info with makeinfo CVS <= 2004-04-26
+ @c @strong 
 @table @samp
 
 @aitem{A}
@@ -298,7 +297,7 @@ S: ambitus,
 FI: ambitus, @"a@"aniala, soitinala.
 
 The term ambit (from latin: ambitus, plural: ambitus) denotes a range
-of pitches for a given voice in a part of music. It may also denote
+of pitches for a given voice in a part of music. It also may denote
 the pitch range that a musical instrument is capable of playing.
 
 @aitem{ancient minor scale}
@@ -310,8 +309,6 @@ DK: ren mol,
 S: ren mollskala,
 FI: luonnollinen molliasteikko.
 
-@aref{diatonic scale} (ancient minor).
-
 @lilypond[notime]
 \set Score.automaticBars = ##f
 \notes\relative c'' {
@@ -341,7 +338,7 @@ S: f@"orslag,
 FI: appoggiatura, etuhele.
 
 Ornamental note, usually a second, that is melodically connected with the main
-note following it.  In music before the 19th century a. were usually
+note that follows it.  In music before the 19th century a. were usually
 performed on the beat, after that mostly before the beat.  While the short
 a. is performed as a short note regardless of the duration of the main note
 the duration of the long a. is proportional to that of the main note.
@@ -451,7 +448,7 @@ FI: k@"asinkirjoitettu nuotti.
 
 1. A manuscript in the composer's own hand.
 2. Music prepared for photoreproduction by freehand drawing,
-with the aid of a straightedge ruler and T-square only,
+with only the aid of a straightedge ruler and T-square,
 which attempts to emulate engraving.
 This required more skill than did engraving.
 
@@ -921,8 +918,7 @@ DK: trinvis bev@ae{}gelse,
 S: stegvis r@"orelse,
 FI: asteittainen liike.
 
-Progressing melodically by intervals of a second.  Opposite of @aref{disjunct movement}.
-
+Melody moving in the narrow steps of the scale.
 
 @lilypond
 \key g \major \time 4/4
@@ -1084,7 +1080,7 @@ of the 20th century
     }
     \paper {
        \context {
-           \Staff
+           \StaffContext
            \consists Custos_engraver
        }
        raggedright = ##t
@@ -1123,7 +1119,7 @@ D: dal segno,
 NL: dal segno,
 DK: dal segno,
 S: dal segno,
-FI: dal segno, lähtien merkistä.
+FI: dal segno, merkkiin asti.
 
 Abbreviated ``d.s.''.  Repetition, not from the beginning, but from
 another place frequently near the beginning marked by a sign:
@@ -1132,7 +1128,7 @@ another place frequently near the beginning marked by a sign:
 %\override TextScript   #'font-style = #'large
 \override TextScript   #'font-shape = #'italic
 \key g \major \time 4/4
-\notes\relative c'' { d1 | g,4^\segno  a b c | b a g2_\markup{ \line < "d.s. " \small \raise #1 \musicglyph #"scripts-segno" > } \bar "|." }
+\notes\relative c'' { d1 | g,4^\segno  a b c | b a g2_"d.s." \bar "|." }
 @end lilypond
 
 @aitem{decrescendo}
@@ -1180,7 +1176,7 @@ A scale consisting of 5@w{ }@aref{whole tone}s and
 2@w{ }@aref{semitone}s (S).  Scales played on the white keys
 of a piano keybord are diatonic.
 
-The church modes are used in gregorial chant and in pre baroque early music but
+The church modes are used in gregorial chant and pre baroque early music but
 also to some extent in newer jazz music.
 
 @lilypond[notime,linewidth=110\mm]
@@ -1371,8 +1367,8 @@ DK: springende bev@ae{}gelse,
 S: hoppande r@"orelse,
 FI: melodian hyppiv@"a liike.
 
-Progressing melodically by intervals larger than a major second.  
-Opposite of @aref{conjunct movement}.
+Melody moving in steps greater than those of the
+scale.  Opposite of @aref{conjunct movement}.
 
 @lilypond
 \key a \major
@@ -1785,7 +1781,7 @@ FI: sormitus.
 
 The methodical use of fingers in the playing of instruments.
 
-@aitemii{flag,pennant}
+@aitem{flag,pennant}
 ES: corchete,
 I: coda (uncinata), bandiera,
 F: crochet,
@@ -1952,7 +1948,7 @@ FI: glissando, liukuen.
 Letting the pitch slide fluently from one note to the other.
 
 @aitem{grace notes}
-ES: ?,
+SP: ?,
 I: abbellimenti,
 F: fioriture,
 D: Verzierungen, Vorschl@"age, Vorschlagsnoten,
@@ -2003,7 +1999,7 @@ FI: puolinuotti.
 @aref{note value}.
 
 @aitem{half rest}
-ES: ?,
+SP: ?,
 I: pausa di minima,
 F: demi-pause,
 UK: minim rest,
@@ -2152,7 +2148,7 @@ of such two forms an octave.
   < g c >^"perfect" s
   < g cis >^"augm"  s
   < g d' >^"perfect"  s
-  < g des' > ^"dimin" s
+  < g des' > ^"dim" s
   < gis es' >^"dimin"  s
   < g! es' >^"minor"  s
   < g e'! >^"major"  s
@@ -2300,8 +2296,8 @@ DK: legato,
 S: legato,
 FI: legato, sitoen.
 
-To be performed (a) without any perceptible interruption between the notes, 
-unlike (b) @emph{leggiero} or @emph{non-legato}, (c) @emph{portato}, and
+To be performed (a) without any perceptible interruption between the notes 
+unlike (b) @emph{leggiero} or @emph{non-legato}, (c) @emph{portato} and
 (d) @aref{staccato}.
 
 @lilypond[notime]
@@ -2404,7 +2400,7 @@ D: .,
 NL: liedtekst,
 DK: .,
 S: .,
-FI, sanoitus.
+FI, sanoitus,
 
 @aitem{major interval}
 ES: intervalo mayor,
@@ -2444,7 +2440,7 @@ by 16@w{ }@aref{cent}s.  Due to the non-circular character of this
 @aref{temperament} only a limited set of keys are playable.
 Used for tuning keyboard instruments for performance of pre-1650 music.
 
-@aitemii{measure,bar}
+@aitem{measure, bar}
 ES: comp@'as,
 I: misura, battuta,
 F: mesure,
@@ -2486,7 +2482,7 @@ syllable in plainsong
 @aitem{melodic cadence}
 @aref{cadenza}.
 
-@aitemii{meter,time}
+@aitem{meter, time}
 ES: comp@'as,
 I: tempo, metro,
 F: indication de m@'esure,
@@ -2891,7 +2887,7 @@ the upper note is played first.
 >>
 @end lilypond
 
-Other frequently used ornaments are the @emph{turn}, the @emph{mordent}, and the
+Other frequently used ornaments are the @emph{turn}, the @emph{mordent} and the
 @emph{prall} (inverted mordent).
 
 @lilypond
@@ -3003,7 +2999,7 @@ D: piano, leise,
 NL: piano,
 DK: piano,
 S: piano,
-FI, piano, hiljaa.
+FI, piano, hiljaa,
 
 @emph{piano} (@b{p}) soft, @emph{pianissimo} (@b{pp}) very soft,
 @emph{mezzopiano} (@b{mp}) medium soft.
@@ -3056,7 +3052,7 @@ DK: presto,
 S: presto,
 FI: presto, hyvin nopeasti.
 
-Very quick, i.e. quicker than @aref{allegro};  @emph{prestissimo}
+Very quick, i.e. quicker than @aref{allegro}.  @emph{prestissimo}
 denotes the highest possible degree of speed.
 
 @aitem{Pythagorean comma}
@@ -3071,7 +3067,7 @@ FI: pytagorinen komma.
 
 A sequence of fifths starting on@w{ }C eventually circles back to@w{ }C,
 but this@w{ }C, obtained by adding 12@w{ }fifths, is
-24 @aref{cent}s higher than the@w{ }C obtained by adding
+24@c{ }@aref{cent}s higher than the@w{ }C obtained by adding
 7@w{ }octaves.  The difference between those two pitches is called the
 Pythagorean comma.
 
@@ -3133,7 +3129,7 @@ D: rallentando, langsamer werden,
 NL: rallentando,
 DK: rallentando,
 S: rallentando,
-FI. rallerdando, hidastuen.
+FI. rallerdando, hidastuen,
 
 Abbreviation "rall.".  @aref{ritardando}.
 
@@ -3297,7 +3293,7 @@ DK: partitur,
 S: partitur,
 FI: partituuri.
 
-A copy of orchestral, choral, or chamber music showing what each instrument is
+A copy of orchestral, choral or chamber music showing what each instrument is
 to play, each voice to sing, having each part arranged one underneath the
 other on different staves @aref{staff}.
 
@@ -3540,7 +3536,7 @@ note head.
 }
 @end lilypond
 
-@aitemii{staff,pl. staves}
+@aitem{staff}
 ES: pentagrama,
 I: pentagramma, rigo (musicale),
 F: port@'ee,
@@ -3550,7 +3546,7 @@ DK: nodesystem,
 S: notsystem,
 FI: nuottiviivasto.
 
-A series of (normally@w{ }5) horizontal lines upon and between
+pl. staves.  A series of (normally@w{ }5) horizontal lines upon and between
 which the musical notes are written, thus indicating (in connection
 with a @aref{clef}) their pitch.  Staves for
 @aref{percussion} instruments may have fewer lines.
@@ -3712,7 +3708,7 @@ D: syntonisches Komma,
 NL: syntonische komma,
 DK: syntonisk komma,
 S: syntoniskt komma,
-FI: syntoninen komma, terssien taajuusero luonnollisessa ja Pytagorisessa viritysj@"arjestelm@"ass@"a.
+FI: syntoninen komma, terssin taajuusero luonnollisessa ja Pytagorisessa viritysj@"arjestelm@"ass@"a.
 
 Difference between the natural third and the third obtained by Pythagorean
 tuning (@aref{Pythagorean comma}), equal to 22@w{ }cents.
@@ -4074,7 +4070,7 @@ DK: dobbeltslag,
 S: dubbelslag,
 FI: korukuvio.
 
-@aref{ornament}.
+???
 
 @aitem{unison}
 ES: un@'{@dotless{i}}sono,
@@ -4195,7 +4191,7 @@ symphony orchestra are flute, oboe, clarinet, saxophone, and bassoon.
 @end table
 
 @page
-
+ @c @strong
 @table @samp
 @item DURATION NAMES, NOTES AND RESTS
 @end table
@@ -4259,6 +4255,7 @@ sextio@-fj@"arde@-del @tab kuudeskymmenesnelj@"asosa- @tab
 
 @page
 
+ @c strong
 @table @samp
 @item PITCH NAMES
 @end table
@@ -4324,7 +4321,7 @@ ais @tab ais @tab ais
 @end multitable
 
 @
-
+ @c strong
 @table @samp
 
 @item ---------------------
@@ -4340,8 +4337,6 @@ Hugo Riemanns Musiklexicon, Berlin 1929.
 Polyglottes W@"orterbuch der musikalischen Terminologie, Kassel 1980
 Oxford Advanced Learner's Dictionary of Current English, Third Edition 1974.
 
-Webster's Revised Unabridged Dictionary, Springfield 1913.
-
 @end table
 
 @bye
index 5ccb40a1bfb300c43d72159f3b0cf608ab889bd9..2c62c0a89e29baad023c70f4b18e9e0f3d811dc2 100644 (file)
@@ -233,8 +233,6 @@ note with the @code{\rest} keyword appended. This makes manual
 formatting in polyphonic music easier.  Rest collision testing will
 leave these rests alone
 
-@cindex @code{\rest}
 @lilypond[quote,raggedright,verbatim]
 a'4\rest d'4\rest
 @end lilypond
@@ -294,9 +292,6 @@ Program reference: @internalsref{SkipEvent}, @internalsref{SkipMusic}.
 
 
 @cindex duration
-@cindex @code{\longa}
-@cindex @code{\breve}
-@cindex @code{\maxima}
 
 
 In Note, Chord, and Lyrics mode, durations are designated by numbers
@@ -323,7 +318,7 @@ r1 r2 r4 r8 r16 r32 r64 r64
   \paper {
     raggedright = ##t
     \context {
-      \Staff
+      \StaffContext
         \remove "Clef_engraver"
         \override StaffSymbol #'transparent = ##t 
         \override TimeSignature #'transparent = ##t
@@ -516,10 +511,6 @@ instead.
 
 @seealso
 
-User manual: @ref{Changing context properties on the fly} for the
-@code{\set} command.
-
-
 Program reference: @internalsref{TupletBracket}, and @internalsref{TimeScaledMusic}.
 
 Examples: @inputfileref{input/regression,tuplet-nest.ly}.
@@ -612,7 +603,7 @@ to determine the first note of the next chord
 @cindex @code{\notes}
 
 The pitch after the @code{\relative} contains a note name.  To parse
-the note name as a pitch, it must be surrounded by @code{\notes}
+the note name as a pitch, it must surrounded by @code{\notes}
 
 The relative conversion will not affect @code{\transpose},
 @code{\chords} or @code{\relative} sections in its argument.  If you
@@ -638,14 +629,13 @@ following notes.
 
 
 
-There is also a syntax that is separate from the notes. The syntax
-
+There is also a syntax that is separate from the notes.
 @example
 \octave @var{pitch}
 @end example
 
-This checks that @var{pitch} (without quotes) yields @var{pitch} (with
-quotes) in \relative mode. If not, a warning is printed, and the
+This checks that @var{pitch} (without octave) yields @var{pitch} (with
+octave) in \relative mode. If not, a warning is printed, and the
 octave is corrected, for example, the first check is passed
 successfully.  The second check fails with an error message.  The
 octave is adjusted so the following notes are in the correct octave
@@ -708,18 +698,6 @@ score by scanning for failed bar checks and incorrect durations.  To
 speed up this process, you can use @code{skipTypesetting}, described
 in the next section.
 
-It is also possible to redefine the meaning of @code{|}. This is done
-by assigning a music expression to @code{pipeSymbol},
-
-@lilypond
-pipeSymbol = \bar "||"
-
-\score {
-    \notes  { c'2 c'2 | c'2 c'2 | }
-}
-@end lilypond 
-
-
 @node Skipping corrected music
 @subsection Skipping corrected music
 
@@ -1044,7 +1022,7 @@ measure is subdivided in 2, 2, 2 and 3. This is passed to
   }
   \paper {
     \context {
-      \Staff
+      \StaffContext
       \consists "Measure_grouping_engraver"
     }
   }
@@ -1091,8 +1069,6 @@ indicating how much of the measure has passed at this point.
 @node Unmetered music
 @subsection Unmetered music
 
-@cindex @code{\bar}
-
 Bar lines and bar numbers are calculated automatically. For unmetered
 music (e.g. cadenzas), this is not desirable.  By setting
 @code{Score.timing} to false, this automatic timing can be switched
@@ -1106,6 +1082,7 @@ off. Empty bar lines,
 indicate where line breaks can occur.
 
 
+
 @refcommands
 
 @cindex @code{\cadenzaOn}
@@ -1217,8 +1194,6 @@ The easiest way to enter fragments with more than one voice on a staff
 is to split chords using the separator @code{\\}.  You can use it for
 small, short-lived voices or for single chords
 
-@cindex @code{\\}
-
 @lilypond[quote,verbatim,fragment]
 \context Staff \relative c'' {
   c4 << { f d e  } \\ { b c2 } >>
@@ -1276,8 +1251,8 @@ Similarly, you can merge half note heads with eighth notes, by setting
 c8 c4. } \\ { c2 c2 } >>
 @end lilypond
 
-LilyPond also vertically shifts rests that are opposite of a stem,
-for example
+LilyPond also vertically shifts rests that are opposite of a stem
+
 
 @lilypond[quote,raggedright,fragment,verbatim]
 \context Voice << c''4 \\  r4 >>
@@ -1441,11 +1416,6 @@ behavior can be changed by setting @code{allowBeamBreak}.
 @cindex auto-knee-gap
 
 
-@seealso
-
-User manual: @ref{Changing context properties on the fly} for the
-@code{\set} command
-
 
 @refbugs
 
@@ -1454,8 +1424,6 @@ User manual: @ref{Changing context properties on the fly} for the
 Automatically kneed cross-staff beams cannot be used together with
 hidden staves.
 
-Beams do not avoid collisions with symbols around the notes, such as
-texts and accidentals.
 
 
 
@@ -1961,7 +1929,7 @@ To use this, add the @internalsref{Horizontal_bracket_engraver} to
   }
   \paper {
     \context {
-      \Staff \consists "Horizontal_bracket_engraver"
+      \StaffContext \consists "Horizontal_bracket_engraver"
 }}}
 @end lilypond
 
@@ -2273,7 +2241,7 @@ direction for this grace, so stems do not always point up.
 
 @example
 \new Staff @{
-   #(add-grace-property 'Voice 'Stem 'direction '())
+   #(add-grace-property "Voice" Stem direction '())
    @dots{}
 @}
 @end example
@@ -2694,8 +2662,9 @@ Patterns of a one and two measures are replaced by percent-like signs,
 patterns that divide the measure length are replaced by slashes
 
 @lilypond[quote,verbatim,raggedright]
-\repeat  "percent" 4  { c'4 }
-\repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
+\context Voice { \repeat  "percent" 4  { c'4 }
+  \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
+}
 @end lilypond
 
 @seealso
@@ -2753,7 +2722,8 @@ an abbreviated name, and both be used in input files
   hihat hh bassdrum bd
 @end example
 @lilypond[quote,raggedright]
-\new DrumStaff \drums { hihat hh bassdrum bd }
+        \new DrumStaff \drums {   hihat hh bassdrum bd
+ }
 @end lilypond
 
 The complete list of drum names is in the init file
@@ -2794,10 +2764,10 @@ polyphonic notation, described in @ref{Polyphony}, can also be used if
 the @internalsref{DrumVoices} are instantiated by hand first. For example, 
 
 @lilypond[quote,fragment,verbatim] 
-\new DrumStaff <<
+\drums \new DrumStaff <<
   \context DrumVoice = "1" {  s1 *2 }
   \context DrumVoice = "2" {  s1 *2 }
-  \drums {
+  {
     bd4 sn4 bd4 sn4
     <<
       { \repeat unfold 16 hh16 }
@@ -2835,7 +2805,7 @@ mus = \drums  { cymc cyms cymr hh | hhc hho hhho hhp | \break cb hc
     \paper {
     %% need to do this, because of indented @itemize
     linewidth= 9 \cm 
-    \context { \Score
+    \context { \ScoreContext
     \override LyricText #'font-family = #'typewriter
     \override BarNumber #'transparent =##T
 }}}
@@ -3305,42 +3275,9 @@ The associated object is @internalsref{VoiceFollower}.
 @node Vocal music
 @section Vocal music
 
-
-The easiest way to add lyrics to a melody, is by appending
-
-
-@cindex \newlyrics
-@example
-  \newlyrics @{ @var{the lyrics} @} 
-@end example
-
-to a melody. Here is an example,
-
-@lilypond[raggedright,verbatim]
-  \relative { \time 3/4 c2 e4 g2. }
-  \newlyrics { play the game } 
-@end lilypond
-
-More stanzas can be added by adding more
-@code{\newlyrics} sections 
-
-@lilypond[raggedright,verbatim]
-  \relative { \time 3/4 c2 e4 g2. }
-  \newlyrics { play the game } 
-  \newlyrics { speel het spel } 
-  \newlyrics { joue le jeu } 
-@end lilypond
-
-The @code{\newlyrics} keyword has three functions: it interprets the
-following words as texts instead of notes, it sets up a context for
-printing texts (the @code{Lyrics} context), and it couples the melody
-with the lyrics, so the durations of both are aligned.
-
-These three functions can be controlled separately, and that is what
-the following sections are about.
+This section discusses how to enter and print lyrics.
 
 @menu
-* Easy lyrics entry
 * Entering lyrics::             
 * The Lyrics context::          
 * More stanzas::                
@@ -3356,9 +3293,9 @@ the following sections are about.
 @cindex punctuation
 
 Lyrics are entered in a special input mode. This mode is is introduced
-by the keyword @code{\lyrics}.  In this mode you can enter lyrics,
-with punctuation and accents without any hassle.  Syllables are
-entered like notes, but with pitches replaced by text.  For example,
+by the keyword @code{\lyrics}.  In this mode you can enter lyrics, with
+punctuation and accents without any hassle.  Syllables are entered like
+notes, but with pitches replaced by text.  For example,
 @example
   \lyrics @{ Twin-4 kle4 twin- kle litt- le star2 @}
 @end example
@@ -3393,18 +3330,16 @@ property commands
 Any @code{_} character which appears in an unquoted word is converted
 to a space.  This provides a mechanism for introducing spaces into words
 without using quotes.  Quoted words can also be used in Lyrics mode to
-specify words that cannot be written with the above rules. The
-following example incorporates double quotes
+specify words that cannot be written with the above rules
 
 @example
   \lyrics @{ He said: "\"Let" my peo ple "go\"" @}
 @end example
-
-This example is slightly academic, since it gives better looking
-results to use matched single quotes, @code{``} and @code{''}
+However, at least for english texts, you should use 
 @example
   \lyrics @{ He said: ``Let my peo ple go'' @}
 @end example
+to get the correct shape of the starting and ending quote.
 
 @cindex hyphens
 
@@ -3438,9 +3373,6 @@ The definition of lyrics mode is too complex.
 @node The Lyrics context
 @subsection  The Lyrics context
 
-
-@c TODO: document \newlyrics
-
 Lyrics are printed by interpreting them in a @internalsref{Lyrics} context
 @example
  \context Lyrics \lyrics @dots{}
@@ -3456,7 +3388,7 @@ automatically.  In this case, it is no longer necessary to enter the
 correct duration for each syllable.  This is achieved by combining the
 melody and the lyrics with the @code{\lyricsto} expression
 @example
-\lyricsto @var{name} \new Lyrics \lyrics @dots{} 
+\lyricsto @var{name} \new Lyrics @dots{} 
 @end example
 
 This aligns the lyrics to the
@@ -3522,37 +3454,6 @@ be tuned with the property @code{melismaBusyProperties}. See
 @internalsref{Melisma_translator} in the program reference for more
 information.
 
-Lyrics can also be entered without @code{\lyricsto}. In this case the
-durations of each syllable must be entered explicitly, for example,
-
-@verbatim
-  play2 the4 game2.
-  sink2 or4 swim2.  
-@end verbatim
-
-Alignment to a melody can be specified with the @code{associatedVoice}
-property,
-
-@verbatim
-  \set associatedVoice = #"melody"
-@end verbatim 
-
-Here is an example demonstrating manual lyric durations,
-
-@lilypond[relative=1,verbatim,fragment]
-<< \context Voice = melody {
-     \time 3/4
-     c2 e4 g2.
-  } 
-  \new Lyrics \lyrics {
-    \set associatedVoice = #"melody"
-    play2 the4 game2.
-  }  >>
-@end lilypond
-
-
-
-
 When multiple stanzas are put on the same melody, it can happen that
 two stanzas have melismata in different locations. This can be
 remedied by switching off melismata for one
@@ -3593,8 +3494,6 @@ linked. This can be achieved either by using @code{\lyricsto} or by
 setting corresponding names for both contexts. The latter is explained
 in @ref{More stanzas}.
 
-@c TODO: document \new Staff << Voice \lyricsto >> bug
-
 @node More stanzas
 @subsection More stanzas
 
@@ -3631,11 +3530,11 @@ The complete example is shown here
     \notes \relative c'' \context Voice = duet {
       \time 3/4
        g2 e4 a2 f4 g2. }
-    <<
-      \lyricsto "duet" \new Lyrics \lyrics {
+    \lyrics <<
+      \lyricsto "duet" \new Lyrics {
         \set vocalName = "Bert"
         Hi, my name is Bert. }
-      \lyricsto "duet" \new Lyrics \lyrics {
+      \lyricsto "duet" \new Lyrics {
         \set vocalName = "Ernie"
         Ooooo, ch\'e -- ri, je t'aime. }
     >>
@@ -3653,7 +3552,7 @@ Stanza numbers can be added by setting @code{stanza}, e.g.
 <<
   \context Voice = duet {
     \time 3/4 g2 e4 a2 f4 g2. }
-    \lyricsto "duet" \new Lyrics \lyrics {
+   \lyrics \lyricsto "duet" \new Lyrics {
      \set stanza = "1. "
      Hi, my name is Bert. }
 >>
@@ -3711,7 +3610,7 @@ for example,
 @example
   \paper @{
     \context @{
-      \Voice
+      \VoiceContext
       \consists Ambitus_engraver
     @}
   @}
@@ -3732,7 +3631,7 @@ This results in the following output
   >>
   \paper {
     \context {
-      \Staff
+      \StaffContext
       \consists Ambitus_engraver
     }
   }
@@ -3979,7 +3878,7 @@ Modifiers can be mixed with additions
 @cindex @code{m}
 
 Since an unaltered 11 does not sound good when combined with an
-unaltered 3, the 11 is removed in this case (unless it is added
+unaltered 13, the 11 is removed in this case (unless it is added
 explicitly)
 @c
 @lilypond[quote,fragment,verbatim]
@@ -4718,8 +4617,8 @@ filtered. For example,
 @example
 \simultaneous @{
   @var{the music}
-  \applymusic #(remove-tag 'score) @var{the music}
-  \applymusic #(remove-tag 'part) @var{the music}
+  \apply #(remove-tag 'score) @var{the music}
+  \apply #(remove-tag 'part) @var{the music}
 @}
 @end example
 would yield
@@ -4948,11 +4847,11 @@ select ancient accidentals.   Supported styles are
         raggedright = ##t 
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context{
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \remove "Time_signature_engraver"
@@ -5315,7 +5214,7 @@ following table
        indent = 0.0
        raggedright = ##t
        \context {
-           \Staff
+           \StaffContext
            \remove Staff_symbol_engraver
            \remove Clef_engraver
            \remove Time_signature_engraver
@@ -5387,7 +5286,7 @@ as shown in the following example
 @example
 \paper @{
   \context @{
-     \Staff
+     \StaffContext
      \consists Custos_engraver
      Custos \override #'style = #'mensural
   @}
@@ -5406,7 +5305,7 @@ The result looks like this
     }
     \paper {
        \context {
-           \Staff
+           \StaffContext
            \consists Custos_engraver
        }
     }
@@ -5559,7 +5458,7 @@ To engrave white mensural ligatures, in the paper block the
 @example
     \paper @{
         \context @{
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Mensural_ligature_engraver
         @}
@@ -5600,7 +5499,7 @@ For example,
     }
     \paper {
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Mensural_ligature_engraver
         }
@@ -5688,11 +5587,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -5701,7 +5600,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -5730,11 +5629,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -5743,7 +5642,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -5764,11 +5663,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -5777,7 +5676,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -5801,11 +5700,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -5814,7 +5713,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -5840,11 +5739,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -5853,7 +5752,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -5874,11 +5773,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -5887,7 +5786,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -5912,11 +5811,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -5925,7 +5824,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -5951,11 +5850,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -5964,7 +5863,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -5989,11 +5888,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6002,7 +5901,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6023,11 +5922,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6036,7 +5935,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6060,11 +5959,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6073,7 +5972,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6098,11 +5997,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6111,7 +6010,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6132,11 +6031,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6145,7 +6044,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6169,11 +6068,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6182,7 +6081,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6203,11 +6102,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6216,7 +6115,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6241,11 +6140,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6254,7 +6153,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6275,11 +6174,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6288,7 +6187,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6313,11 +6212,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6326,7 +6225,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6347,11 +6246,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6360,7 +6259,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6385,11 +6284,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6398,7 +6297,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6419,11 +6318,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6432,7 +6331,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6453,11 +6352,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6466,7 +6365,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6490,11 +6389,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6503,7 +6402,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6524,11 +6423,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6537,7 +6436,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6558,11 +6457,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6571,7 +6470,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6595,11 +6494,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6608,7 +6507,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6629,11 +6528,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6642,7 +6541,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6663,11 +6562,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6676,7 +6575,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6700,11 +6599,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6713,7 +6612,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6734,11 +6633,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6747,7 +6646,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6768,11 +6667,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6781,7 +6680,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6805,11 +6704,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6818,7 +6717,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6839,11 +6738,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6852,7 +6751,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6873,11 +6772,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6886,7 +6785,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6910,11 +6809,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6923,7 +6822,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6944,11 +6843,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
     \paper {
         interscoreline = 1
         \context {
-            \Score
+            \ScoreContext
             \remove "Bar_number_engraver"
         }
         \context {
-            \Staff
+            \StaffContext
             \remove "Clef_engraver"
             \remove "Key_engraver"
             \override StaffSymbol #'transparent = ##t
@@ -6957,7 +6856,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
             minimumVerticalExtent = ##f
         }
         \context {
-            \Voice
+            \VoiceContext
             \remove Ligature_bracket_engraver
             \consists Vaticana_ligature_engraver
             \override NoteHead #'style = #'vaticana_punctum
@@ -6982,11 +6881,11 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
   \paper {
     interscoreline = 1
     \context {
-      \Score
+      \ScoreContext
       \remove "Bar_number_engraver"
     }
     \context {
-      \Staff
+      \StaffContext
       \remove "Clef_engraver"
       \remove "Key_engraver"
       \override StaffSymbol #'transparent = ##t
@@ -6995,7 +6894,7 @@ volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
       minimumVerticalExtent = ##f
     }
     \context {
-      \Voice
+      \VoiceContext
       \remove Ligature_bracket_engraver
       \consists Vaticana_ligature_engraver
       \override NoteHead #'style = #'vaticana_punctum
@@ -7424,7 +7323,7 @@ applying the function @code{notes-to-clusters} to a sequence of
 chords, e.g.
 @c
 @lilypond[quote,relative=2,verbatim]
-\applymusic #notes-to-clusters {  <c e > <b f'>  }
+\apply #notes-to-clusters {  <c e > <b f'>  }
 @end lilypond
 
 The following example (from
index 7329a445bcb6556f652e536e2cf42329ca5e7dcc..749231594ecdb79d7d22295fd21f60152726313e 100644 (file)
@@ -26,7 +26,7 @@ playing becomes a part of your life.  Some days it comes naturally, and
 it is wonderful, and on some days it just does not work, but you keep
 playing, day after day.
 
-Like making music, working on LilyPond can be dull work, and on
+Like making music, working on LilyPond is can be dull work, and on
 some days it feels like plodding through a morass of bugs.
 Nevertheless, it has become a part of our life, and we keep doing it.
 Probably the most important motivation is that our program actually
index a29c1f2e5debec9d3ab3e876ccdacdf5b81afc14..1f840e55c719cb98cf8ea0024440192bc9105fd6 100644 (file)
@@ -1,4 +1,3 @@
-@c -*-texinfo-*-
 @node Interfaces for programmers
 @appendix Interfaces for programmers
 
@@ -6,19 +5,17 @@
 
 @menu
 * Programmer interfaces for input ::  
-* Markup programmer interface::  
-* Contexts for programmers::    
+* Markup programmer interface::         
+* Contexts for programmers::   
 @end menu
 
 @node Programmer interfaces for input 
 @appendixsec Programmer interfaces for input 
 
 @menu
-* Input variables and Scheme::  
+* Input variables and Scheme:: 
 * Internal music representation::  
-* Extending music syntax::      
-* Manipulating music expressions:: 
-* Using LilyPond syntax inside Scheme::   
+* Manipulating music expressions::  
 @end menu
 
 @node Input variables and Scheme
@@ -86,9 +83,6 @@ written as
   \score @{ #(ly:export (make-sequential-music newLa)) @}
 @end example
 
-@refbugs
-
-Mixing Scheme and lily identifiers is not possible with @code{--safe}.
 
 @node Internal music representation
 @appendixsubsec Internal music representation
@@ -139,85 +133,14 @@ and @internalsref{GraceMusic} has its single argument in
 @code{element}. The body of a repeat is in @code{element} property of
 @internalsref{RepeatedMusic}, and the alternatives in @code{elements}.
 
-
-
-
-@node Extending music syntax
-@appendixsubsec Extending music syntax
-
-The syntax of composite music expressions, like
-@code{\repeat}, @code{\transpose} and @code{\context}
-follows the general form of
-
-@example
-  \@code{keyword} @var{non-music-arguments} @var{music-arguments}
-@end example
-
-Such syntax can also be defined as user code. To do this, it is
-necessary to create a @emph{music function}. This is a specially marked
-Scheme function. For example, the music function @code{\applymusic} applies
-a user-defined function to a music expression.  Its syntax is
-
-@example
-\applymusic #@var{func} @var{music}
-@end example
-
-A music function is created with @code{ly:make-music-function},
-
-@example
-  (ly:make-music-function
-@end example
-
-@code{\applymusic} takes a Scheme function and a Music expression as
-argument. This is encoded in its first argument,
-
-@example
-   (list procedure? ly:music?)
-@end example
-
-The function itself takes another argument, an Input location
-object. That object is used to provide error messages with file names
-and line numbers.  The definition is the second argument of
-@code{ly:make-music-function}. The body is function simply calls the
-function
-
-@example
-  (lambda (where func music)
-   (func music))
-@end example
-
-The above Scheme code only defines the functionality. The tag
-@code{\applymusic} is selected by defining
-
-@example
-  applymusic = #(ly:make-music-function
-                  (list procedure? ly:music?)
-                  (lambda (location func music)
-                    (func music)))
-@end example
-
-A @code{def-music-function} macro is introduced on top of
-@code{ly:make-music-function} to ease the definition of music
-functions:
-
-@example
-  applymusic = #(def-music-function (location func music) (procedure? ly:music?)
-                  (func music))
-@end example
-
-Examples of the use of @code{\applymusic} are in the next section.
-
-@seealso
-@file{ly/music-functions-init.ly}.
-
 @node Manipulating music expressions
 @appendixsubsec Manipulating music expressions
 
 Music objects and their properties can be accessed and manipulated
-directly, through the @code{\applymusic} mechanism.
-The syntax for @code{\applymusic} is
+directly, through the @code{\apply} mechanism.
+The syntax for @code{\apply} is
 @example
-\applymusic #@var{func} @var{music}
+\apply #@var{func} @var{music}
 @end example
 
 @noindent
@@ -234,7 +157,7 @@ its argument:
      (ly:music-set-property! m 'elements (reverse
        (ly:music-property m 'elements)))
      m)
-  \score { \notes \applymusic #rev-music-1 { c4 d4 } }
+  \score { \notes \apply #rev-music-1 { c4 d4 } }
 @end lilypond
 
 The use of such a function is very limited. The effect of this
@@ -242,13 +165,13 @@ function is void when applied to an argument which is does not have
 multiple children.  The following function application has no effect:
 
 @example
-  \applymusic #rev-music-1 \grace @{ c4 d4 @}
+  \apply #rev-music-1 \grace @{ c4 d4 @}
 @end example
 
 @noindent
 In this case, @code{\grace} is stored as @internalsref{GraceMusic}, which has no
 @code{elements}, only a single @code{element}. Every generally
-applicable function for @code{\applymusic} must -- like music expressions
+applicable function for @code{\apply} must -- like music expressions
 themselves -- be recursive.
 
 The following example is such a recursive function: It first extracts
@@ -288,7 +211,7 @@ above by the internal equivalent of
     \context Voice = "2" @{ \voiceTwo b @} >>
 @end example
 
-Other applications of @code{\applymusic} are writing out repeats
+Other applications of @code{\apply} are writing out repeats
 automatically (@inputfileref{input/test,unfold-all-repeats.ly}),
 saving keystrokes (@inputfileref{input/test,music-box.ly}) and
 exporting
@@ -302,112 +225,6 @@ LilyPond input to other formats  (@inputfileref{input/test,to-xml.ly})
 @inputfileref{input/test,music-box.ly}.
 
 
-@node Using LilyPond syntax inside Scheme
-@appendixsubsec Using LilyPond syntax inside Scheme
-
-Creating music expressions in scheme can be tedious, as they are
-heavily nested and the resulting scheme code is large. For some
-simple tasks, this can be avoided, using LilyPond usual syntax inside
-scheme, with the dedicated @code{#@{ ... #@}} syntax.
-
-The following two expressions give equivalent music expressions:
-@example
-  mynotes = @{ \override Stem #'thickness = #4
-              \notes @{ c'8 d' @} @}
-  
-  #(define mynotes #@{ \override Stem #'thickness = #4
-                      \notes @{ c'8 d' @} #@})
-@end example
-
-The content of @code{#@{ ... #@}} is enclosed in an implicit @code{@{
-... @}} block, which is parsed. The resulting music expression, a
-@code{SequentialMusic} music object, is then returned and usable in scheme.
-
-Arbitrary scheme forms, including variables, can be used in @code{#@{ ... #@}}
-expressions with the @code{$} character (@code{$$} can be used to
-produce a single $ character). This makes the creation of simple
-functions straightforward. In the following example, a function
-setting the TextScript's padding is defined:
-
-@lilypond[verbatim,raggedright]
-  #(use-modules (ice-9 optargs))
-  #(define* (textpad padding #:optional once?)
-    (ly:export   ; this is necessary for using the expression
-                 ; directly inside a \notes block
-      (if once?
-          #{ \once \override TextScript #'padding = #$padding #}
-          #{ \override TextScript #'padding = #$padding #})))
-  
-  \score {
-      \notes {
-          c'^"1"
-          #(textpad 3.0 #t) % only once
-          c'^"2"
-          c'^"3"
-          #(textpad 5.0)
-          c'^"4"
-          c'^"5"
-          
-      }
-  }
-@end lilypond
-
-Here, the variable @code{padding} is a number; music expression
-variables may also be used in a similar fashion, as in the following
-example:
-
-@lilypond[verbatim,raggedright]
-  #(define (with-padding padding)
-     (lambda (music)
-       #{ \override TextScript #'padding = #$padding
-          $music
-          \revert TextScript #'padding #}))
-  
-  \score {
-      \notes {
-          c'^"1"
-          \applymusic #(with-padding 3)
-            { c'^"2" c'^"3"}
-          c'^"4"
-      }
-  }
-@end lilypond
-
-The function created by @code{(with-padding 3)} adds @code{\override} and
-@code{\revert} statements around the music given as an argument, and returns
-this new expression. Thus, this example is equivalent to:
-
-@example
-  \score @{
-      \notes @{
-          c'^"1"
-          @{ \override TextScript #'padding = #3
-            @{ c'^"2" c'^"3"@}
-            \revert TextScript #'padding
-          @}
-          c'^"4"
-      @}
-  @}
-@end example
-
-This function may also be defined as a music function:
-
-@lilypond[verbatim,raggedright]
-  withPadding = #(def-music-function (location padding music) (number? ly:music?)
-                   #{ \override TextScript #'padding = #$padding
-                      $music 
-                      \revert TextScript #'padding #})
-  
-  \score {
-      \notes {
-          c'^"1"
-          \withPadding #3
-            { c'^"2" c'^"3"}
-          c'^"4"
-      }
-  }
-@end lilypond
-
 
 @node Markup programmer interface
 @appendixsec Markup programmer interface
@@ -415,7 +232,7 @@ This function may also be defined as a music function:
 
 @menu
 * Markup construction in scheme::  
-* Markup command definition::   
+* Markup command definition::  
 @end menu
 
 @node Markup construction in scheme
@@ -638,16 +455,13 @@ to the @code{interpret-markup} function, with the @code{paper} and
 
 
 @menu
-* Context evaluation::          
+* Context evaluation::         
 * Running a function on all layout objects::  
 @end menu
 
 @node Context evaluation
 @appendixsubsec Context evaluation
 
-@cindex calling code during interpreting
-@cindex @code{\applycontext}
-
 Contexts can be modified during interpretation with Scheme code. The
 syntax for this is
 @example
@@ -670,11 +484,6 @@ current bar number on the standard output during the compile:
 @node Running a function on all layout objects
 @appendixsubsec Running a function on all layout objects
 
-
-@cindex calling code on layout objects
-@cindex @code{\applyoutput}
-
-
 The most versatile way of tuning an object is @code{\applyoutput}. Its
 syntax is
 @example
index 83c9e80c529f42c888d3116fa5f7d1a7f29118db..057de017e2ba899bdfb8a1388609152f306c7d1a 100644 (file)
@@ -4,7 +4,7 @@
 @c TODO:
 @c   * more details about running lilypond; error messages,
 @c     compiling/viewing (emacs?)
-@c   * where to go from First steps+More basics?
+@c   * where to go from  First steps+More basics?
 
 @c Your first LilyPond score in 10 minutes?
 
@@ -22,9 +22,8 @@ program.  This is also possible with LilyPond.  If you click on a
 picture in the HTML version of this manual, you will see the exact
 LilyPond input that was used to generate that image.
 Try it on this image
-
 @lilypond[quote,raggedright,relative=2]
-c-\markup { \bold \huge { Click here.  } }
+  c-\markup { \bold \huge { Click here.  } }
 @end lilypond
 @end ifhtml
 
@@ -53,7 +52,7 @@ reference.
 * Printing lyrics::             
 * A lead sheet::                
 * Listening to output::         
-* Adding titles::               
+* Titling::                     
 * Single staff polyphony::      
 * Piano staves::                
 * Organizing larger pieces::    
@@ -88,38 +87,42 @@ The duration of a note is specified by a number after the note name.
 a1 a2 a4 a16 a32
 @end example
 
-@c FIXME: have NOTIME also remove Score.timing?
-@lilypond[quote,notime,relative=1]
+@lilypond[quote,notime]
 \set Score.timing = ##f
 \set Staff.autoBeaming = ##f
-{ a1 a2 a4 a16 a32 s16_" " }
+\transpose c c' { a1 a2 a4 a16 a32 s16_" " }
 @end lilypond
 
 If you do not specify a @rglos{duration}, the duration last entered is
-used for the next notes.  The duration of the first note in input
-defaults to a quarter
+used; the duration of the first note defaults to a quarter
+@c FIXME: let's omit the first note rule?
+@c  The first note will be a quarter
 
 @example
 a a8 a a2 a
 @end example
 
-@lilypond[quote,notime,relative=1]
+@lilypond[quote,notime]
 \set Score.timing = ##f
-{ a a8 a a2 a s16_" " }
+\transpose c c' { a a8 a a2 a s16_" " }
 @end lilypond
 
 
-Rests are entered just like notes, but with the name @samp{r}
+Rests are entered just like notes, but with the name ``@code{r}''
 
 @cindex rests
 @example
 r2 r4 r8 r16
 @end example
 
-@lilypond[quote,notime]
+@lilypond[quote,fragment]
 \set Score.timing = ##f
-r2 r4 r8 r16 s16_" "
+\set Staff.Clef = \turnOff
+\set Staff.TimeSignature = \turnOff
+r2 r4 r8 r16
+s16_" "
 @end lilypond
+@separate
 
 Add a dot @samp{.} after the duration to get a @rglos{dotted note}
 
@@ -127,9 +130,9 @@ Add a dot @samp{.} after the duration to get a @rglos{dotted note}
 a2. a4 a8. a16
 @end example
 
-@lilypond[quote,notime,relative=1]
+@lilypond[quote,notime]
 \set Score.timing = ##f
-{ a2. a4 a8. a16 s16_" " }
+\transpose c c' { a2. a4 a8. a16 s16_" " }
 @end lilypond
 
 The @rglos{meter} (or @rglos{time signature}) can be set with the
@@ -176,15 +179,14 @@ s4_" "
 s16_" "
 @end lilypond
 
-@ignore
-To recognize names like @samp{c} and @samp{d} as pitches, they have to
+To recognize names like @code{c} and @code{d} as pitches, they have to
 be entered inside a so-called @code{\notes} block.  This block is
 formed by enclosing notes and commands are enclosed in curly braces
-@code{@{@tie{}@dots{}@tie{}@}} and adding the keyword @code{\notes} before
-the opening brace
+@code{@{ @dots{} @}} and adding the keyword @code{\notes} before the
+opening brace
 
 @example
-@{
+\notes @{
   \time 3/4
   \clef bass
   c2 e4 g2.
@@ -206,37 +208,39 @@ the @code{\notes} block in a @code{\score} block
 @}
 @end example
 
-@noindent
 and the music will be converted to printable output.
-@end ignore
 
-Remember to enclose the notes and commands in curly braces
-@code{@{@tie{}@dots{}@tie{}@}} to convert it to printable output.
-
-@lilypond[quote,noindent,linewidth=55\staffspace]
-{
-  \time 3/4
-  \clef bass
-  c2 e4 g2.
-  f4 e d c2 r4
+@lilypond[quote,noindent]
+\score {
+  \notes {
+     \time 3/4
+     \clef bass
+     c2 e4 g2.
+     f4 e d c2 r4
+  }
+  \paper {
+    linewidth = 55 * \staffspace
+  }
 }
 @end lilypond
 
+In many examples in this manual, both @code{\score} and @code{\notes}
+and accompanying braces are left out for brevity.  However, they must
+be present when feeding the file to LilyPond.
+
 For more elaborate information on
 
-@quotation
 @table @asis
-@item Entering pitches and durations
+@item  Entering pitches and durations
 see 
-@ref{Pitches}, and @ref{Durations}.
+@ref{Pitches} and @ref{Durations}.
 @item Clefs
-see @ref{Clef}.
+see @ref{Clef}
 @item Rests
 see @ref{Rests}.  
 @item Time signatures and other timing commands
-see @ref{Time signature}.
-@end table
-@end quotation
+see  @ref{Time signature}.
+@end table 
 
 
 @node Running LilyPond
@@ -247,7 +251,7 @@ see @ref{Time signature}.
 @c commands to type?
 
 @c
-@c We don't have enough space to explain either VIM
+@c We don't have enough space to explain  either VIM
 @c or Emacs non-advanced users, and I fear that both editors will only
 @c confuse newbies. I vote for keeping the material in footnotes.
 @c 
@@ -263,20 +267,23 @@ Windows are given at the end of this section.
 
 Begin by opening a terminal window and starting a text editor.  For
 example, you could open an xterm and execute
-@code{joe}.@footnote{There are macro files for VIM addicts, and there
+@code{joe}@footnote{There are macro files for VIM addicts, and there
 is a @code{LilyPond-mode} for Emacs addicts.  If it has not been
 installed already, refer to
 @c FIXME lousy reference.
-the file @file{INSTALL.txt}.}  In your text editor, enter the following
+the file @file{INSTALL.txt}}. In your text editor, enter the following
 input and save the file as @file{test.ly}
 
 @example
-@{ c'4 e' g' @}
+\score @{
+  \notes @{ c'4 e' g' @}
+@} 
 @end example
 
 @noindent
 To process @file{test.ly}, proceed as follows
 
+@noindent
 @example
 lilypond test.ly
 @end example
@@ -285,20 +292,18 @@ lilypond test.ly
 You will see something resembling
 
 @example
-lilypond (GNU LilyPond) 2.2.0
-Running lilypond-bin...
-Now processing `/home/fred/ly/test.ly'
+GNU LilyPond 1.8.0
+Now processing: `/home/fred/ly/test.ly'
 Parsing...
 Interpreting music...[1]
-@emph{... more interesting stuff ... }
-DVI output to `test.dvi'...
+ @emph{ ...  more interesting stuff ...  }
 PDF output to `test.pdf'...
-PS output to `test.ps'...
+DVI output to `test.dvi'...
 @end example
-
 @cindex DVI file
 @cindex Viewing music
 @cindex xdvi
+
 @noindent
 The result is the file @file{test.pdf}@footnote{For @TeX{}
 aficionados: there is also a @file{test.dvi} file.  It can be viewed
@@ -317,10 +322,12 @@ viewing and printing PDF and PostScript files.}
 
 On Windows, start up a text-editor@footnote{Any simple or
 programmer-oriented editor will do, for example Notepad.  Do not use a
-word processor, its formatting codes will confuse LilyPond.} and enter
+word processor, its formatting codes will confuse LilyPond} and enter
 
 @example
-@{ c'4 e' g' @}
+\score @{
+  \notes @{ c'4 e' g' @}
+@} 
 @end example
 
 Save it on the desktop as @file{test.ly} and make sure that it is not
@@ -334,7 +341,7 @@ the file and show the resulting PDF file.
 A @rglos{sharp} (@texisharp{}) pitch is made by adding @samp{is} to
 the name, a @rglos{flat} (@texiflat{}) pitch by adding @samp{es}.  As
 you might expect, a @rglos{double sharp} or @rglos{double flat} is
-made by adding @samp{isis} or @samp{eses}@footnote{This syntax
+made by adding @samp{isis} or @samp{eses}:@footnote{This syntax
 derived from note naming conventions in Nordic and Germanic languages,
 like German and Dutch.}
 
@@ -348,9 +355,8 @@ cis1 ees fisis aeses
 @end lilypond
 
 @cindex key signature, setting
-The key signature is set with the command @code{\key}, followed by
+The key signature is set with the command ``@code{\key}'', followed by
 a pitch and @code{\major} or @code{\minor}
-
 @example
 \key d \major
 g1
@@ -358,24 +364,25 @@ g1
 g
 @end example
 
-@lilypond[quote,notime,fragment]
+@lilypond[quote,fragment]
+\set Staff.TimeSignature = \turnOff
 \key d \major
 g'1
 \key c \minor
 g'
 @end lilypond
 
-@noindent
+
 Key signatures together with the pitches (including alterations) are
-used to determine when to print accidentals.  This is a
+used together to determine when to print accidentals.  This is a
 feature that often causes confusion to newcomers, so let us explain it
-in more detail.
+in more detail
 
 
 LilyPond makes a sharp distinction between musical content and
 layout.  The alteration (flat, natural or sharp) of a note is part of
 the pitch, and is therefore musical content.  Whether an accidental (a
-flat, natural or sharp @emph{sign}) is printed in front of the
+flat, natural or sharp @emph{sign}) is printed in front of the
 corresponding note is a question of layout.  Layout is something that
 follows rules, so accidentals are printed automatically according to
 those rules.  The pitches in your music are works of art, so they will
@@ -383,25 +390,26 @@ not be added automatically, and you must enter what you want to hear.
 
 In this example
 
-@lilypond[quote,notime,fragment]
+@lilypond[quote,fragment]
+\set Staff.TimeSignature = \turnOff
 \key d \major
 d' cis' fis'
 @end lilypond
 
 @noindent
-no note gets an explicit accidental, but you still must enter
+no note gets an explicit accidental, but still you enter
 
 @example
 \key d \major
 d cis fis
 @end example
 
-@noindent
-The code @samp{d} does not mean `print a black dot just below the
-staff.'  Rather, it means: `a note with pitch D-natural.'  In the key
+The code @code{d} does not mean ``print a black dot just below the
+staff.'' Rather, it means: ``a note with pitch D-natural.'' In the key
 of A-flat, it does get an accidental
 
-@lilypond[quote,notime,fragment]
+@lilypond[quote,fragment]
+\set Staff.TimeSignature = \turnOff
 \key as \major
 d'
 @end lilypond
@@ -414,34 +422,33 @@ d
 Adding all alterations explicitly might require a little more effort
 when typing, but the advantage is that transposing is easier, and
 music can be printed according to different conventions.  See
-@ref{Accidentals}, for some examples how accidentals can be printed
+@ref{Accidentals} for some examples how accidentals can be printed
 according to different rules.
 
 
 For more information on
-
-@quotation
 @table @asis
 @item Accidentals
-see @ref{Accidentals}.
+see @ref{Accidentals}
 
 @item Key signature
-see @ref{Key signature}.
+see @ref{Key signature}
 @end table
-@end quotation
 
 @node Entering ties
 @section Entering ties
 
 @cindex tie
-A tie is created by appending a tilde @samp{~} to the first note
+A tie is created by adding a tilde ``@code{~}'' to the first note
 being tied
-
-@lilypond[quote,notime,fragment,verbatim,relative=3]
+@lilypond[quote,fragment,verbatim,relative=3]
 g4~ g a2~ a4
 @end lilypond
+@separate
+
 
-For more information on Ties see @ref{Ties}.
+For more information on Ties, see @ref{Ties}.
 
 
 
@@ -454,15 +461,16 @@ Beams are drawn automatically
 @lilypond[quote,fragment,relative=2,verbatim]
 a8 ais d es r d
 @end lilypond
+@separate
 
-@noindent
 If you do not like where beams are put, they can be entered by
-hand.  Mark the first note to be beamed with @samp{[} and the last one
-with @samp{]}.
+hand.  Mark the first note to be beamed with @code{[} and the last one
+with @code{]}.
 
 @lilypond[quote,fragment,relative=2,verbatim]
 a8[ ais] d[ es r d]
 @end lilypond
+@separate
 
 For more information on beams, see @ref{Beaming}.
 
@@ -470,40 +478,34 @@ For more information on beams, see @ref{Beaming}.
 Here are key signatures, accidentals and ties in action
 
 @example
-@{
-  \time 4/4
-  \key g \minor
-  \clef violin
-  r4 r8 a8 gis4 b
-  a8 d4.~ d e8
-  fis4 fis8 fis8 eis4 a8 gis~
-  gis2 r2
+\score @{
+  \notes @{
+    \time 4/4
+    \key g \minor
+    \clef violin
+    r4 r8 a8 gis4 b
+    g8 d4.~ d e8
+    fis4 fis8 fis8 eis4  a8 gis~
+    gis2 r2
+  @}
 @}
 @end example
-
-@ignore
-FIXME
-ugr: removing the ignore block, leaving the comment line below
-@c TODO: use relative mode, verbatim, junk \transpose and above @example
-@end ignore
-
-
-@lilypond[quote,noindent,linewidth=50\staffspace]
-\transpose c c' {
-  \time 4/4
-  \key g \minor
-  \clef violin
-  r4 r8 a8 gis4 b
-  a8 d4.~ d e8
-  fis4 fis8 fis8 eis4 a8 gis~
-  gis2 r2
+@lilypond[quote]
+\score {
+  \notes \transpose c c' { 
+    \time 4/4
+    \key g \minor
+    \clef violin
+    r4 r8 a8 gis4 b
+    a8 d4.~ d e8
+    fis4 fis8 fis8 eis4  a8 gis~
+    gis2 r2
+  }
+  \paper { linewidth = #(* 50 staffspace) }
 }
 @end lilypond
-
 @cindex accidentals
 
-
-@noindent
 There are some interesting points to note in this example.  Bar lines
 and beams are drawn automatically.  Line breaks are calculated
 automatically; it does not matter where the line breaks are in the
@@ -524,19 +526,21 @@ according to standard notation conventions.
 @c better to have this just before the `octaves are bad' snipped
 @c but we'd need to remove the ', from \key and tie 
 To raise a note by an octave, add a high quote @code{'} (apostrophe) to
-the note name, to lower a note one octave, add a `low quote' @code{,}
+the note name, to lower a note one octave, add a ``low quote'' @code{,}
 (a comma).  Middle C is @code{c'}
 
 @example
 c'4 c'' c''' \clef bass c c,
 @end example
 
-@lilypond[quote,notime,fragment]
+@lilypond[quote,fragment]
+\set Score.timing = ##f
+\set Staff.TimeSignature = \turnOff
 c'4 c'' c''' \clef bass c c,
 @end lilypond
+@separate
 
 An example of the use of quotes is in the following Mozart fragment
-
 @lilypond[quote,raggedright,fragment,verbatim]
 \key a \major
 \time 6/8
@@ -544,38 +548,41 @@ cis''8. d''16 cis''8 e''4 e''8
 b'8. cis''16 b'8 d''4 d''8 
 @end lilypond
 
-@noindent
-The last example shows that music in a high register needs lots of quotes.
+This example shows that music in a high register needs lots of quotes.
 This makes the input less readable, and it is a source of errors.  The
-solution is to use `relative octave' mode.  In practice, this is the
+solution is to use ``relative octave'' mode.  In practice, this is the
 most convenient way to copy existing music.  To use relative mode, add
-@code{\relative} before the piece of music.
-@ignore
-FIXME: move to notation manual?
- You must also give a note
-from which relative mode starts, in this case @code{c''}.
-@end ignore
-If you do not
-use octavation quotes (i.e., do not add @code{'} or @code{,} after a
+@code{\relative} before the piece of music.  You must also give a note
+from which relative starts, in this case @code{c''}.  If you do not
+use octavation quotes (i.e.  do not add @code{'} or @code{,} after a
 note), relative mode chooses the note that is closest to the previous
-one.  For example, @samp{c f} goes up while @samp{c g} goes down
+one.  For example, @code{c f} goes up while @code{c g} goes down
+
+@example
+\relative c'' @{
+  c f c g c
+@}
+@end example
 
-@lilypond[quote,notime,fragment,verbatim]
-\relative {
-  c' f c g c
+@lilypond[quote,fragment]
+\set Score.timing = ##f
+\set Staff.TimeSignature = \turnOff
+\relative c'' {
+  c f c g c
 }
 @end lilypond
+@separate
 
 
 Since most music has small intervals, pieces can be written almost
 without octavation quotes in relative mode.  The previous example is
 entered as
-
+@c
 @lilypond[quote,raggedright,fragment,verbatim]
-\relative {
+\relative c'' {
   \key a \major
   \time 6/8
-  cis''8. d16 cis8 e4 e8
+  cis8. d16 cis8 e4 e8
   b8. cis16 b8 d4 d8
 }
 @end lilypond
@@ -585,19 +592,27 @@ entered as
 @c grappig: Pa vond het heel logies, en slim toen-i eenmaal begreep.
 @c in eerste instantie drong het `relative' niet door zonder extra uitleg.
 Larger intervals are made by adding octavation quotes.
+@example
+\relative c'' @{
+  c f, f c' c g' c,
+@}
+@end example
 
-@lilypond[quote,notime,verbatim,fragment]
-\relative c {
-  c'' f, f c' c g' c,
+@lilypond[quote,fragment]
+\set Score.timing = ##f
+\set Staff.TimeSignature = \turnOff
+\relative c'' {
+  c f, f c' c g' c,
 }
 @end lilypond
+@separate
 
-In summary, quotes or commas no longer determine the absolute height
-of a note in @code{\relative} mode.  Rather, the height of a note is
-relative to the previous one, and changing the octave of a single note
-shifts all following notes an octave up or down.
+In @code{\relative} mode, quotes or commas no longer determine the
+absolute height of a note.  Rather, the height of a note is relative to
+the previous one, and changing the octave of a single note shifts all
+following notes an octave up or down.
 
-For more information on Relative octaves see @ref{Relative octaves},
+For more information on Relative octaves see @ref{Relative octaves}
 and @ref{Octave check}.
 
 
@@ -615,7 +630,7 @@ a4
 
 Enclosing group of notes in braces creates a new music
 expression
-
 @lilypond[quote,verbatim,relative=3]
 { a4 g4 }
 @end lilypond
@@ -633,11 +648,11 @@ notes
 This technique is useful for non-monophonic music.  To enter music
 with more voices or more staves, we also combine expressions in
 parallel.  Two voices that should play at the same time, are entered
-as a simultaneous combination of two sequences.  A `simultaneous'
+as a simultaneous combination of two sequences.  A ``simultaneous''
 music expression is formed by enclosing expressions in @code{<<} and
 @code{>>}.  In the following example, three sequences (all containing
 two notes) are combined simultaneously
-
 @lilypond[quote,verbatim,relative=3]
 <<
    { a4 g }
@@ -655,24 +670,20 @@ you can make arbitrarily complex and large expressions.  For example,
 1
 
 1 + 2
-
+  
 (1 + 2) * 3
-
+  
 ((1 + 2) * 3) / (4 * 5)
 @end example
-
 @cindex expression
 @cindex music expression
 This example shows a sequence of expressions, where each expression is
 contained in the next one.  The simplest expressions are numbers and
-operators (like @samp{+}, @samp{*} and @samp{/}).  Parentheses are used
-to group expressions.
+operators (like +, * and /).  Parentheses are used to group
+expressions.
 
 Like mathematical expressions, music expressions can be nested
-arbitrarily deep@footnote{The reason for getting three staves in the
-previous example but just a single staff in current one will be explained
-later.}
-
+arbitrarily deep, e.g.
 @lilypond[quote,verbatim,relative=2] 
 {
   c <<c e>>
@@ -684,36 +695,33 @@ later.}
 @cindex indent
 When spreading expressions over multiple lines, it is customary to use
 an indent that indicates the nesting level.  Formatting music like this
-eases reading, and helps you insert the right number of closing
+eases reading, and helps you  insert the right number of closing
 braces at the end of an expression.  For example,
 
 @example
-\book @{
-  \score @{
-    <<
-      @{
-        @dots{}
-      @}
-      @{
-        @dots{}
-      @}
-      \paper @{
-        @dots{}
-      @}
-    >>
-  @}
-@}  
+\score @{
+  \notes <<
+    @{
+      @dots{}
+    @}
+    @{
+      @dots{}
+    @}
+  >>
+@}
 @end example
 
 Some editors have special support for entering LilyPond, and can help
-indenting source files.  See @ref{Editor support}, for more information.
+indenting source files.  See @ref{Editor support} for more information.
+
+
 
 @node More staves
 @section More staves
 
 To print more than one staff, each piece of music that makes up a
 staff is marked by adding @code{\new Staff} before it.  These
-@code{Staff} elements are then combined parallel with @code{<<} and
+@code{Staff}'s are then combined parallel with @code{<<} and
 @code{>>}, as demonstrated here
 
 @lilypond[quote,fragment,verbatim]
@@ -724,7 +732,7 @@ staff is marked by adding @code{\new Staff} before it.  These
 @end lilypond
 
 
-The command @code{\new} introduces a `notation context.'  A notation
+The command @code{\new} introduces a ``notation context.'' A notation
 context is an environment in which musical events (like notes or
 @code{\clef} commands) are interpreted.  For simple pieces, such
 notation contexts are created implicitly.  For more complex pieces, it
@@ -732,35 +740,37 @@ is best to mark contexts explicitly.  This ensures that each fragment
 gets its own stave.
 
 There are several types of contexts: @code{Staff}, @code{Voice} and
-@code{Score} handle normal music notation.  Other contexts are also
+@code{Score} handle normal music notation.  Other staves are also
 @code{Lyrics} (for setting lyric texts) and @code{ChordNames} (for
 printing chord names).
 
 
 In terms of syntax, prepending @code{\new} to a music expression
 creates a bigger music expression.  In this way it resembles the minus
-sign in mathematics.  The formula @math{(4+5)} is an expression, so
-@math{-(4+5)} is a bigger expression.
+sign in mathematics.  The formula (4+5) is an expression, so -(4+5) is a bigger
+expression.
 
 We can now typeset a melody with two staves
 
 @c TODO: (c) status of this Paul McCartney (?) song (let's all stand together)
 
 @lilypond[quote,verbatim,raggedright]
-<<
-  \new Staff {
-    \time 3/4
-    \clef violin
-    \relative {
-      e''2 d4 c2 b4 a8[ a]
-      b[ b] g[ g] a2. }  
-  }
-  \new Staff {
-     \clef bass
-     c2 e4 g2.
-     f4 e d c2.
-  }
->>
+\score {
+  \notes <<
+    \new Staff {
+      \time 3/4
+      \clef violin
+      \relative c'' {
+        e2 d4 c2 b4 a8[ a]
+        b[ b] g[ g] a2. }  
+    }
+    \new Staff {
+       \clef bass
+       c2 e4  g2.
+       f4 e d c2.
+    }
+  >>
+}
 @end lilypond
 
 For more information on context see the description in
@@ -775,28 +785,28 @@ For more information on context see the description in
 @cindex accents
 @cindex staccato
 
-Common accents can be added to a note using a dash (@samp{-}) and a
+Common accents can be added to a note using a dash (`@code{-}') and a
 single character
-
 @lilypond[quote,verbatim,relative=2]
 c-.  c-- c-> c-^ c-+ c-_
 @end lilypond
+@separate
 
 @cindex fingering
 Similarly, fingering indications can be added to a note using a dash
-(@samp{-}) and the digit to be printed
-
+(`@code{-}') and the digit to be printed
+@c
 @lilypond[quote,verbatim,relative=2]
-c-3 e-5 b-2 a-1
+  c-3 e-5 b-2 a-1
 @end lilypond
 
 
 Dynamic signs are made by adding the markings (with a backslash) to
 the note
-
 @lilypond[quote,verbatim,relative=2]
 c\ff c\mf
 @end lilypond
+@separate
 
 @cindex dynamics
 @cindex decrescendo
@@ -805,23 +815,23 @@ c\ff c\mf
 Crescendi and decrescendi are started with the commands @code{\<} and
 @code{\>}.  An ending dynamic, for example @code{\f}, will finish the
 crescendo, or the command @code{\!} can be used
-
 @lilypond[quote,verbatim,relative=2]
-c2\< c2\ff\> c2 c2\!
+c2\<  c2\ff\>  c2  c2\!
 @end lilypond
+@separate
 
 
 
 @cindex slur
 
 A slur is a curve drawn across many notes, and indicates legato
-articulation.  The starting note and ending note are marked with
-@samp{(} and @samp{)}, respectively
+articulation.  The starting note and ending note are marked with a
+``@code{(}'' and a ``@code{)}'' respectively
 
 @lilypond[quote,fragment,relative=2,verbatim]
 d4( c16)( cis d e c cis d e)( d4)
 @end lilypond
-
+@separate
 @cindex slurs versus ties
 A slur looks like a tie, but it has a different meaning.  A tie simply
 makes the first note sound longer, and can only be used on pairs of
@@ -832,68 +842,64 @@ nested in practice
 @lilypond[quote,fragment,relative=2]
 c2~( c8 fis fis4 ~ fis2 g2)
 @end lilypond
-
 @cindex phrasing slurs
 Slurs to indicate phrasing can be entered with @code{\(} and
 @code{\)}, so you can have both legato slurs and phrasing slurs at the
 same time.
 
 @lilypond[quote,fragment,relative=2,verbatim]
-a8(\( ais b c) cis2 b'2 a4 cis, c\)
+a8(\( ais b  c) cis2 b'2 a4 cis,  c\)
 @end lilypond
 
 
 For more information on
-
-@quotation
 @table @asis
 @item Fingering
-see @ref{Fingering instructions}.
+  see @ref{Fingering instructions}
 @item Articulations
-see @ref{Articulations}.
+  see @ref{Articulations}
 @item Slurs
-see @ref{Slurs}.
+  see @ref{Slurs}
 @item Phrasing slurs
-see @ref{Phrasing slurs}.
+  see  @ref{Phrasing slurs}
 @item Dynamics
-see @ref{Dynamics}.
+  see  @ref{Dynamics}
+@item Fingering
 @end table
-@end quotation
-
 
 @node Combining notes into chords
 @section Combining notes into chords
 
 @cindex chords
-Chords can be made by surrounding pitches with angle brackets.
-Angle brackets are the symbols @samp{<} and @samp{>}.
+Chords can be made by surrounding pitches with angled brackets.
+Angled brackets are the symbols @code{<} and @code{>}.
 
 @lilypond[quote,relative=1,fragment,verbatim]
 r4 <c e g>4 <c f a>8
 @end lilypond
+@separate
 
 
 You can combine markings like beams and ties with chords.  They must
 be placed outside the angled brackets
-
 @lilypond[quote,relative=1,fragment,verbatim]
 r4 <c e g>8[ <c f a>]~ <c f a>
 @end lilypond
 
 @example
-r4 <c e g>8\>( <c e g> <c e g> <c f a>8\!)
+r4 <c e g>8\>( <c e g> <c e g>  <c f a>8\!)
 @end example
-
 @lilypond[quote,relative=1,fragment]
 \slurUp
-r4 <c e g>8\>( <c e g> <c e g> <c f a>8\!)
+r4 <c e g>8\>( <c e g> <c e g>  <c f a>8\!)
 @end lilypond
+@separate
 
 
 
 
 @node Basic rhythmical commands
-@section Basic rhythmical commands
+@section  Basic rhythmical commands
 
 @cindex pickup
 @cindex anacruse
@@ -901,31 +907,28 @@ r4 <c e g>8\>( <c e g> <c e g> <c f a>8\!)
 A pickup is entered with the keyword @code{\partial}.  It
 is followed by a duration: @code{\partial 4} is a quarter note upstep
 and @code{\partial 8} an eighth note
-
 @lilypond[quote,relative=2,verbatim,fragment]
 \partial 8
 f8 c2 d e
 @end lilypond
-
 @cindex tuplets
 @cindex triplets
 Tuplets are made with the @code{\times} keyword.  It takes two
 arguments: a fraction and a piece of music.  The duration of the piece
 of music is multiplied by the fraction.  Triplets make notes occupy
-2/3 of their notated duration, so a triplet has 2/3 as its fraction
-
+2/3 of their notated duration, so  a triplet has  2/3 as its fraction
+@c
 @lilypond[quote,relative=1,verbatim,fragment]
 \times 2/3 { f8 g a }
 \times 2/3 { c r c }
 @end lilypond
-
 @cindex grace notes
 @cindex accacciatura
 Grace notes are also made by prefixing a music expression with the
 keyword @code{\appoggiatura} or @code{\acciaccatura}
 @cindex appoggiatura
 @cindex acciaccatura
-
+      
 @lilypond[quote,relative=2,verbatim,fragment]
 c4 \appoggiatura b16 c4
 c4 \acciaccatura b16 c4
@@ -934,17 +937,15 @@ c4 \acciaccatura b16 c4
 @noindent
 
 For more information on
-
-@quotation
 @table @asis
-@item Grace notes
+@item  Grace notes
 see @ref{Grace notes},
 @item Tuplets
 see @ref{Tuplets},
 @item Pickups
 see @ref{Partial measures}.
 @end table
-@end quotation
+
 
 
 @node Commenting input files
@@ -953,18 +954,18 @@ see @ref{Partial measures}.
 @cindex comments
 @cindex line comment
 @cindex block comment
-A comment is a remark for the human reader of the music input; it is
+A comment is a remark for the human reader of the music input, it is
 ignored and has no effect on the printed output.  There are two types
-of comments.  The percent symbol @samp{%} introduces a line comment;
+of comments.  The percent symbol @code{%} introduces a line comment;
 the rest of the line is ignored.  A block comments marks a whole
-section of music input---anything that is enclosed in @code{%@{} and
+section of music inputanything that is enclosed in @code{%@{} and
 @code{%@}} is ignored.  The following fragment shows possible uses for
 comments
 
 @example
 % notes for twinkle twinkle follow
-c4 c g' g a a
-
+c4 c  g' g  a a
 %@{
     This line, and the notes below
     are ignored, since they are in a
@@ -974,15 +975,14 @@ c4 c g' g a a
 %@}
 @end example
 
-There is a special statement that really is a kind of comment.  The
+There is a special statement that really is a kind of comment. The
 version statement marks for which version of LilyPond the file was
-written.  To mark a file for version 2.1.17, use
+written. To mark a file for version 2.1.17, use
 
 @example
 \version "2.1.17"
 @end example
 
-@noindent
 These annotations make future upgrades of LilyPond go more
 smoothly. Changes in the syntax are handled with a special program,
 @file{convert-ly} (see @ref{Invoking convert-ly}), and it uses
@@ -997,110 +997,104 @@ smoothly. Changes in the syntax are handled with a special program,
 
 @cindex Lyrics
 @cindex Songs
-Lyrics are entered by separating each syllable with a space
+Lyrics are entered by separating each syllable with a space,
 
 @example
-I want to break free
+  I want to break free
 @end example
 
-Consider the melody
+To prevent certain words (for example ``as'') as being read as a
+pitch, the input-mode must be switched.  This is done with
+@code{\lyrics}.  In @code{\lyrics} mode, all words are read as lyric
+syllables.
+@example
+  \lyrics @{ I want to break free @}
+@end example
 
-@lilypond[quote,verbatim,fragment,raggedright]
-\relative {
-    r4 c \times 2/3 { f g g }
-    \times 2/3 { g4( a2) }
-}
+@noindent
+Again, the braces @code{@{@}} signify that the syllables are sung in
+sequence.
+
+By default, music expressions are interpreted in @code{Staff} context.  For
+lyrics, this is obviously not desirable, so it is necessary
+to explicitly specify a @code{Lyrics} context,
+
+@example
+\new Lyrics  \lyrics @{ I want to break free @}
+@end example
+
+The melody for this song is as follows
+
+@lilypond[quote,fragment,relative=2]
+c4
+\times 2/3 { f4 g g } \times 2/3 { g4( a2) }
 @end lilypond
 
-@c FIXME: when/how/to what rename newlyrics?
 The lyrics can be set to these notes, combining both with the
-@code{\newlyrics} keyword
+@code{\lyricsto} keyword
+@example
+  \lyricsto "@var{name}" \new Lyrics @dots{}
+@end example
+where @var{name} identifies to which melody the lyrics should be
+aligned.  In this case, there is only one melody, so we can leave it
+empty.
 
+The final result is 
 @lilypond[quote,verbatim,fragment,raggedright]
-<<
-  \relative {
-    r4 c \times 2/3 { f g g }
-    \times 2/3 { g4( a2) }
-  }
-  \newlyrics { I want to break free }
->>
+\score  {
+ \notes <<
+   \partial 4
+   \relative c' {
+      c4
+      \times 2/3 { f g g } \times 2/3 { g4( a2) }
+   }
+   \lyricsto "" \new Lyrics \lyrics { I want to break free }
+ >>
+}
 @end lilypond
 
 @cindex melisma
 @cindex extender line
 @c synonyms?
-This melody ends on a @rglos{melisma}, a single syllable (`free')
+This melody ends on a @rglos{melisma}, a single syllable (``free'')
 sung to more than one note.  This is indicated with an @emph{extender
-line}.  It is entered as two underscores, i.e.,
-
+line}.  It is entered as two underscores, i.e.
 @example
-@{ I want to break free __ @}
+\lyrics @{ I want to break free __ @}
 @end example 
-
 @lilypond[quote,raggedright]
-<<
-  \relative {
-    r4 c \times 2/3 { f g g }
-    \times 2/3 { g4( a2) }
-  }
-  \newlyrics { I want to break free __ }
->>
+\score {
+  <<
+    \notes \relative c' \new Voice {
+      \partial 8
+      c8
+      \times 2/3 { f g g } \times 2/3 { g4( a2) }
+    }
+    \lyricsto "" \new Lyrics \lyrics { I want to break free __ }
+   >>
+}
 @end lilypond
 
 Similarly, hyphens between words can be entered as two dashes,
 resulting in a centered hyphen between two syllables
-
 @example
 Twin -- kle twin -- kle
 @end example
-
 @lilypond[quote,raggedright]
-<<
-  \relative {
-     \time 2/4
-     f4 f c' c
-   }
-   \newlyrics { Twin -- kle twin -- kle }
->>
+\score {
+  <<
+    \notes \relative f' \context Voice = bla {
+      \time 2/4
+      f4 f c' c'
+    }
+    \new Lyrics \lyrics \lyricsto "bla" { Twin -- kle twin -- kle }
+  >>
+}
 @end lilypond
 
 More options, like putting multiple lines of lyrics below a melody are
 discussed in @ref{Vocal music}.
 
-@c FIXME: too geeky, for notation manual?
-@c or introduce using foo = \lyrics { a b c } ?
-
-When using variables for a piece of lyrics
-To prevent certain words (for example `as') as being read as a
-pitch, the input-mode must be switched.  This is done with
-@code{\lyrics}.  In @code{\lyrics} mode, all words are read as lyric
-syllables.
-
-@example
-myText = \lyrics @{ I want to break free @}
-@end example
-
-@noindent
-The braces @code{@{@}} signify that the syllables are sung in
-sequence.
-
-@ignore
-By default, music expressions are interpreted in @code{Staff} context.  For
-lyrics, this is obviously not desirable, so it is necessary
-to explicitly specify a @code{Lyrics} context,
-
-@example
-\lyrics @{ I want to break free @}
-@end example
-
-The melody for this song is as follows
-
-@lilypond[quote,fragment,relative=2]
-r4 c \times 2/3 { f4 g g }
-\times 2/3 { g4( a2) }
-@end lilypond
-
-@end ignore
 
 
 @node A lead sheet
@@ -1109,9 +1103,9 @@ r4 c \times 2/3 { f4 g g }
 @cindex Lead sheets
 @cindex chords
 @cindex chord names
-
-In popular music, it is common to denote accompaniment as chord names.
-Such chords can be entered like notes,
+In popular music, it is common to denote accompaniment as chord-names.
+Such chords can  be entered like notes,
 
 @example
 c2 f4. g8
@@ -1122,12 +1116,14 @@ but now, each pitch is read as the root of a chord instead of a note.
 This mode is switched on with @code{\chords}
 
 @lilypond[quote,verbatim,raggedright]
-\chords { c2 f4. g8 }
+\score {
+  \chords { c2 f4. g8 }
+}
 @end lilypond
 
 Other chords can be created by adding modifiers after a colon.  The
 following example shows a few common modifiers
-
+@c
 @lilypond[quote,verbatim]
 \chords { c2 f4:m g4:maj7 gis1:dim7 }
 @end lilypond
@@ -1138,37 +1134,41 @@ line of themselves.  Hence, we have to override the context with
 context
 
 @lilypond[quote,verbatim]
-\new ChordNames \chords { c2 f4.:m g4.:maj7 gis8:dim7 }
+ \new ChordNames \chords { c2 f4.:m g4.:maj7 gis8:dim7 }
 @end lilypond
 
 @cindex lead sheet
-When put together, chord names, lyrics and a melody form
+@separate
+When put together,  chord names, lyrics and a melody form
 a lead sheet, for example,
 
 @example
-<<
-  \new ChordNames \chords @{ @emph{chords} @}
-  @emph{the melody}
-  \newlyrics @{ @emph{the text} @}
->>
+\score @{
+  <<
+    \new ChordNames \chords @{ @emph{chords} @}
+    \notes @emph{the melody}
+    \lyricsto "" \new Lyrics \lyrics @{ @emph{the text} @}
+  >>
 @}
 @end example
-
 @lilypond[quote,raggedright]
-<<
-  \new ChordNames \chords { r2 c:sus4 f } 
-  \notes \relative {
-    r4 c' \times 2/3 { f g g }
-    \times 2/3 { g4( a2) }
-  }
- \newlyrics { I want to break free __ }
->>
+\score {
+  <<
+    \partial 4
+    \new ChordNames \chords { r8 c2:sus4 f } 
+    \notes \relative c' {
+      c4
+      \times 2/3 { f g g } \times 2/3 { g4( a2) }
+    }
+   \new Lyrics \lyricsto "" \lyrics { I want to break free __ }
+  >>
+}
 @end lilypond
 
+
 A complete list of modifiers and other options for layout can be found
 in @ref{Chords}.
 
-@c FIXME: we talk about \midi before mentioning \paper (or \layout?)
 @node Listening to output
 @section Listening to output
 
@@ -1179,49 +1179,45 @@ MIDI (Musical Instrument Digital Interface) is a standard for
 connecting and controlling digital instruments.  A MIDI file is like a
 tape recording of a MIDI instrument.
 
-To create a MIDI from a music piece of music, add a @code{\midi}
-block. This causes LilyPond to create a MIDI file, so you can listen
-to what you just entered.  It is great for checking the music.
-Octaves that are off or accidentals that were mistyped stand out very
-much when listening to the musical transcription.
+To create a MIDI from a music  piece of music, add a 
+@code{\midi} block causes LilyPond to create a MIDI file, so you
+can listen to the music you entered.  It is great for checking the
+music: octaves that are off or accidentals that were mistyped stand
+out very much when listening to the musical transcription.
 
 The @code{\midi} block is added to @code{\score}, for example,
-
 @example 
 \score @{
-    @var{...music...}
-    \midi @{ \tempo 4=72 @}
+    @var{..music..}
+    \midi  @{ \tempo 4=72 @}
 @}
 @end example 
 
 Here, the tempo is specified using the @code{\tempo} command.  In this
 case the tempo of quarter notes is set to 72 beats per minute.  More
-information on auditory output in the notation manual can be found in
-@ref{Sound}.
+information on auditory output in the notation manual, @ref{Sound}.
 
 If there is a @code{\midi} command in a @code{\score}, only MIDI will
 be produced.  If notation is needed too, a @code{\paper} block must be
-added
+added too
 
 @example 
 \score @{
-    @var{...music...}
-    \midi @{ \tempo 4=72 @}
+    @var{..music..}
+    \midi  @{ \tempo 4=72 @}
     \paper @{ @}
 @}
 @end example 
-@cindex paper block
 
+@cindex paper block
 
-@node Adding titles
-@section Adding titles
+@node Titling
+@section Titling
 
 Bibliographic information is entered in a separate block, the
-@code{\header} block.  The name of the piece, its composer, etc., are
-entered as an assignment, within @code{\header
-@{@tie{}@dots{}@tie{}@}}.  The @code{\header} block is usually put at
-the top of the file.  For example,
-
+@code{\header} block.  The name of the piece, its composer, etc.  are
+entered as an assignment, within @code{\header @{ @dots{} @}}.  For
+example,
 @example 
 \header @{
   title = "Eight miniatures" 
@@ -1229,7 +1225,7 @@ the top of the file.  For example,
   tagline = "small is beautiful"
 @}
 
-@{ @dots{} @}
+\score @{ @dots{} @}
 @end example
 
 @cindex bibliographic information
@@ -1239,44 +1235,17 @@ the top of the file.  For example,
 
 When the file is processed the title and composer are printed above
 the music.  The `tagline' is a short line printed at bottom of the last
-page which normally says `Engraved by LilyPond, version @dots{}'.  In
-the example above it is replaced by the line `small is
-beautiful.'@footnote{Nicely printed parts are good PR for us, so
+page which normally says ``Engraved by LilyPond, version @dots{}''.  In
+the example above it is replaced by the line ``small is
+beautiful.''@footnote{Nicely printed parts are good PR for us, so
 please leave the tagline if you can.}
 
+Normally, the @code{\header} is put at the top of the file.  However,
+for a document that contains multiple pieces (e.g.  an etude book, or
+an orchestral part with multiple movements), the header can be
+put in the @code{\score} block as follows; in this case, the name of
+each piece will be printed before each movement
 
-The @code{\header} block is usually put at the top of the file.
-
-A document may contains multiple pieces of music, examples are an
-etude book, or an orchestral part with multiple movements.
-@c FIXME: ugh.  \header can only live at toplevel, or inside \score.
-@c If we allow it also to live inside \book, we do not need \score here?
-The @code{\book} block is used to group the individual @code{\score}
-blocks.
-
-The header for each piece of music can be put inside the @code{\score}
-block.  The @code{piece} name from the header will be printed before
-each movement.
-
-@ignore
-
-FIXME: introduce \BOOK
-
-FIXME: Using "Adagio" as a name is confusing, it's more common to be
-a plain tempo indication.
-
-Since today (CVS-1.211) we also allow headers and composite music
-inside book:
-
-  \header { ... }
-  \book {
-    \header { ... }
-    { ... }
-    \header { ... }
-    { ... }
-  }
-
-@end ignore
 
 @cindex Engraved by LilyPond
 @cindex signature line
@@ -1289,15 +1258,11 @@ inside book:
   tagline = "small is beautiful"
 @}
 
-\book @{
-  \score @{
-    @dots{}
-    \header @{ piece = "Adagio" @}
-  @}
-  \score @{
-    @dots{}
-    \header @{ piece = "Menuetto" @}
-  @}
+\score @{ @dots{}
+  \header @{ piece = "Adagio" @}
+@}
+\score @{ @dots{}
+  \header @{ piece = "Menuetto" @}
 @}
 @end example
 
@@ -1310,50 +1275,48 @@ More information on titling can be found in @ref{Invoking lilypond}.
 @cindex polyphony
 @cindex multiple voices
 @cindex voices, more -- on a staff
+
 When different melodic lines are combined on a single staff they are
-printed as polyphonic voices; each voice has its own stems, slurs and
+printed as polyphonic voices: each voice has its own stems, slurs and
 beams, and the top voice has the stems up, while the bottom voice has
 them down.
 
 Entering such parts is done by entering each voice as a sequence (with
-@code{@{...@}}), and combining those simultaneously, separating the
+@code{@{ ..  @}}), and combining those simultaneously, separating the
 voices with @code{\\}
 
 @lilypond[quote,verbatim,relative=3]
 << { a4 g2 f4~ f4 } \\
-   { r4 g4 f2 f4 } >>
+   { r4 g4 f2  f4 } >>
 @end lilypond
 
-For polyphonic music typesetting, spacer rests can also be convenient; these
+For polyphonic music typesetting, spacer rests can also be convenient: these
 are rests that do not print.  It is useful for filling up voices that
 temporarily do not play.  Here is the same example with a spacer rest
-instead of a normal rest---just use @samp{s} instead of @samp{r}
-
-@lilypond[quote,verbatim,relative=3]
+instead of a normal rest
+@lilypond[quote,relative=3]
 << { a4 g2 f4~ f4 } \\
-   { s4 g4 f2 f4 } >>
+   { s4 g4 f2  f4 } >>
 @end lilypond
 
-@noindent
 Again, these expressions can be nested arbitrarily
 
-@lilypond[quote,fragment,verbatim,relative=3]
+@lilypond[quote,fragment,relative=3]
 <<
   \new Staff <<
     { a4 g2 f4~ f4 } \\
-    { s4 g4 f2 f4 }
+    { s4 g4 f2  f4 }
   >>
   \new Staff <<
     \clef bass
     { <c, g>1 ~ <c g>4 } \\
-    { f4 d e2 ~ e4}
+    { f4 d e2  ~ e4}
   >>
 >>
 @end lilypond
 
-More features of polyphonic typesetting in the notation manual are
-described in @ref{Polyphony}.
-
+More features of polyphonic typesetting in the notation manual
+in @ref{Polyphony}.
 
 @node Piano staves
 @section Piano staves
@@ -1361,34 +1324,30 @@ described in @ref{Polyphony}.
 @cindex staff switch, manual
 @cindex cross staff voice, manual
 @cindex @code{\context}
-Piano music is typeset in two staves connected by a brace.  Printing
-such a staff is similar to the polyphonic example in @ref{More staves},
 
+Piano music is typeset in two staves connected by a brace.  Printing
+such a staff is similar to the polyphonic example in @ref{More staves}
 @example
 << \new Staff @{ @dots{} @}
    \new Staff @{ @dots{} @} >>
 @end example
-
-@noindent
 but now this entire expression must be interpreted as a
 @code{PianoStaff}
-
 @example
-\new PianoStaff << \new Staff @dots{} >>
+ \new PianoStaff << \new Staff @dots{} >>
 @end example
 
 Here is a full-fledged example
 
-@lilypond[quote,verbatim,relative=1,fragment]
+@lilypond[quote,relative=1,fragment]
 \new PianoStaff <<
-  \new Staff { \time 2/4 c4 c g' g }
+  \new Staff { \time 2/4 c4 c g' g  }
   \new Staff { \clef bass c,, c' e c }
 >>
 @end lilypond
 
 More information on formatting piano music is in @ref{Piano music}.  
 
-
 @node Organizing larger pieces
 @section Organizing larger pieces
 
@@ -1399,22 +1358,23 @@ more deeply nested.  Such large expressions can become unwieldy.
 
 By using variables, also known as identifiers, it is possible to break
 up complex music expressions.  An identifier is assigned as follows
-
+@c
 @example
-namedMusic = \notes @{ @dots{} @}
+namedMusic = \notes @{ @dots{}
 @end example
 
-@noindent
 The contents of the music expression @code{namedMusic}, can be used
-later by preceding the name with a backslash, i.e., @code{\namedMusic}.
-In the next example, a two-note motive is repeated two times by using
+later by preceding the name with a backslash, i.e.  @code{\namedMusic}.
+In the next example, a two note motive is repeated two times by using
 variable substitution
 
-@lilypond[quote,raggedright,verbatim,nofragment]
+@lilypond[quote,raggedright,verbatim]
 seufzer = \notes {
   e'4( dis'4)
 }
-{ \seufzer \seufzer }
+\score {
+  \new Staff { \seufzer \seufzer }
+}
 @end lilypond
 
 The name of an identifier should have alphabetic characters only;
@@ -1423,16 +1383,13 @@ the @code{\score} block.
 
 It is possible to use variables for many other types of objects in the
 input.  For example,
-
 @example
 width = 4.5\cm
 name = "Wendy"
 aFivePaper = \paper @{ paperheight = 21.0 \cm @}
 @end example
-
 Depending on its contents, the identifier can be used in different
 places.  The following example uses the above variables
-
 @example
 \score @{
   \notes @{ c4^\name @}
@@ -1450,16 +1407,15 @@ technical manual, in TODO.
 @node An orchestral part
 @section An orchestral part
 
-In orchestral music, all notes are printed twice; in a part for
+In orchestral music, all notes are printed twice: both in a part for
 the musicians, and in a full score for the conductor.  Identifiers can
-be used to avoid double work. The music is entered once, and stored in
+be used to avoid double work: the music is entered once, and stored in
 a variable.  The contents of that variable is then used to generate
 both the part and the score.
 
-It is convenient to define the notes in a special file.  For example,
-suppose that the file @file{horn-music.ly} contains the following part
-of a horn/bassoon duo
-
+It is convenient  to define the notes in a  special file, for example,
+suppose that the @file{horn-music.ly} contains the following part of a
+horn/bassoon duo,
 @example
 hornNotes = \notes \relative c @{
   \time 2/4
@@ -1467,7 +1423,6 @@ hornNotes = \notes \relative c @{
 @}
 @end example
 
-@noindent
 Then, an individual part is made by putting the following in a file
 
 @example
@@ -1483,17 +1438,17 @@ Then, an individual part is made by putting the following in a file
 The line
 
 @example
-\include "horn-music.ly"
+  \include "horn-music.ly"
 @end example
 
 @noindent
 substitutes the contents of @file{horn-music.ly} at this position in
 the file, so @code{hornNotes} is defined afterwards.  The command
-@code{\transpose f@tie{}c'} indicates that the argument, being
-@code{\hornNotes}, should be transposed by a fifth downwards. Sounding
-@samp{f} is denoted by notated @code{c'}, which corresponds with
-tuning of a normal French Horn in@tie{}F.  The transposition can be seen
-in the following output
+@code{\transpose f c'} indicates that the argument, being
+@code{\hornNotes}, should be transposed by a fifth downwards: sounding
+@code{f} is denoted by notated @code{c'}, which corresponds with
+tuning of a normal French Horn in F.  The transposition can be seen in
+the following output
 
 @lilypond[quote,raggedright]
 \score {
@@ -1506,24 +1461,22 @@ in the following output
 
 In ensemble pieces, one of the voices often does not play for many
 measures.  This is denoted by a special rest, the multi-measure
-rest.  It is entered with a capital @samp{R} followed by a duration
-(1@tie{}for a whole note, 2@tie{}for a half note, etc.).  By multiplying the
+rest.  It is entered with a capital @code{R} followed by a duration (1
+for a whole note, 2 for a half note, etc.) By multiplying the
 duration, longer rests can be constructed.  For example, this rest
-takes 3@tie{}measures in 2/4 time
-
+takes 3 measures in 2/4 time
 @example
 R2*3
 @end example
 
 When printing the part, multi-rests
 must be condensed.  This is done by setting a run-time variable
-
 @example
 \set Score.skipBars = ##t
 @end example
 
-@noindent
-This command sets the property @code{skipBars} in the
+
+This commands sets the property @code{skipBars} property in the
 @code{Score} context to true (@code{##t}).  Prepending the rest and
 this option to the music above, leads to the following result
 
@@ -1555,7 +1508,6 @@ file @file{bassoon-music.ly}, a score is made with
 @}
 @end example
 
-@noindent
 leading to 
 
 @lilypond[quote,raggedright]
@@ -1567,18 +1519,17 @@ leading to
     }
     \new Staff {
       \clef bass
-      r4 d,8 f | gis4 c | b bes |
-      a8 e f4 | g d | gis f
+      r4 d,8 f | gis4 c |  b bes |
+      a8 e f4 |  g d | gis f
     }
   }
 }
 @end lilypond
 
-More in-depth information on preparing parts and scores can be found
-in the notation manual; see @ref{Orchestral music}.
-
-Setting run-time variables (`properties') is discussed in ref-TODO.
+More in-depth information on preparing parts and scores in the
+notation manual, in @ref{Orchestral music}.
 
+Setting run-time variables (``properties'') is discussed in ref-TODO.
 
 @node Integrating text and music
 @section Integrating text and music
@@ -1586,11 +1537,12 @@ Setting run-time variables (`properties') is discussed in ref-TODO.
 @cindex La@TeX{}, music in
 @cindex HTML, music in
 @cindex Texinfo, music in
+
 Some texts include music examples.  Examples are musicological
 treatises, songbooks or manuals like this.  Such texts can be made by
 hand, simply by importing a PostScript figure into the word processor.
 However, there is an automated procedure to reduce the amount of work
-involved HTML, La@TeX{}, and Texinfo documents.
+involved  HTML, La@TeX{}, and Texinfo documents.
 
 A script called @code{lilypond-book} will extract the music fragments,
 run format them, and put back the resulting notation.  This program is
@@ -1614,31 +1566,30 @@ example,
 If there is no \verb+\score+ block in the fragment,
 \texttt@{lilypond-book@} will supply one
 
-\begin[quote]@{lilypond@}
+\begin@{lilypond@}
   c'4
 \end@{lilypond@}
 
-\noindent
-In this example two things happened. A
+In this example two things happened: a
 \verb+\score+ block was added, and the line width was set to natural
 length.
 
 Options are put in brackets.
 
-\begin[quote,staffsize=26,verbatim]@{lilypond@}
+\begin[staffsize=26,verbatim]@{lilypond@}
   c'4 f16
 \end@{lilypond@}
 
+
 Larger examples can be put in a separate file, and introduced with
 \verb+\lilypondfile+.
 
-\lilypondfile[quote,noindent]@{screech-boink.ly@}
+\lilypondfile@{screech-boink.ly@}
 
 \end@{document@}
 @end example
 
 Under Unix, you can view the results as follows
-
 @example
 $ cd input/tutorial
 $ mkdir -p out/
@@ -1656,42 +1607,40 @@ $ xdvi lilybook
 
 To convert the file into a nice PDF document, run the following
 commands
-
 @example
 $ dvips -Ppdf -u +lilypond lilybook
 $ ps2pdf lilybook.ps
 @end example
 
+
 Running lilypond-book and running latex creates a lot of temporary
 files, which would clutter up the working directory.  To remedy this,
-use the @code{--output=@var{dir}} option.  It will create the files in
-a separate subdirectory @file{dir}.
+use the @code{output} option.  It will create the files in a separate
+subdirectory @file{out}.
 
-Finally the result of the La@TeX{} example shown above.@footnote{Note
-that in this tutorial the example is processed with Texinfo.  This gives
-slightly different results in layout.}  This finishes the tutorial
-section.
+The result looks more or less like 
 
-@page
+@separate
 
 Documents for lilypond-book may freely mix music and text.  For
-example,
+example
 
-@lilypond
-\score { \notes \relative c' {
-  c2 g'2 \times 2/3 { f8 e d } c'2 g4
-} }
+@lilypond[quote,raggedright]
+\score {
+  \notes \relative c' {
+    c2 g'2 \times 2/3 { f8 e d } c'2 g4
+  }
+}
 @end lilypond
 
-If there is no @code{\score} block in the fragment,
+If you have no @code{\score} block in the fragment,
 @code{lilypond-book} will supply one
 
 @lilypond[quote]
 c'4
 @end lilypond
 
-@noindent
-In this example two things happened. A
+In this example two things happened: a
 @code{score} block was added, and the line width was set to natural
 length.
 
diff --git a/THANKS b/THANKS
index 696cdc2c6f78480e0d2ca99734353d4372c47b29..a08635f2f3a39e2647a523eb4812d6646ae496ba 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -1,37 +1,4 @@
-
-Release 2.3
-***********
-
-HEAD HACKERS
-
-Han-Wen Nienhuys
-Jan Nieuwenhuizen
-
-
-CONTRIBUTORS
-
-Peter Lutek
-Carl Sorensen
-Michael Welsh Duggan
-Pedro Kroger
-Erik Sandberg
-Guy Gascoigne-Piggford
-Hendrik Maryns
-
-BUG HUNTERS/SUGGESTIONS
-
-David Bobroff
-David Brandon
-Peter Rosenbeck
-Stephen Pollei
-Bertalan Fodor
-Thomas Scharlowski
-Yuval Harel
-Martin Norbäck
-Kristof Bastiaensen
-
-
-Release 2.2
+Release 2.1
 ***********
 
 HEAD HACKERS
diff --git a/VERSION b/VERSION
index 2749ae442aec808b962fffab56a9d6317524aa87..452e5ce935172cf47c4b6eb8edc8684c75fffe2e 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
-MINOR_VERSION=3
-PATCH_LEVEL=5
+MINOR_VERSION=2
+PATCH_LEVEL=2
 MY_PATCH_LEVEL=
 
index 6678367b65a4f46648ecb5b9b2db2aacd61a60a2..ef2afec2d7bc561455fa1dbc2675aec486c3a472 100755 (executable)
@@ -3,9 +3,6 @@
 
 srcdir=`dirname $0`
 
-case $1 in
-    --noconf*) NOCONFIGURE=true;;
-esac
 
 if [ ! -f aclocal.m4 -o stepmake/aclocal.m4 -nt aclocal.m4 ]; then
     echo "stepmake/aclocal.m4 is newer. Copying file." 
diff --git a/buildscripts/guile-gnome.sh b/buildscripts/guile-gnome.sh
deleted file mode 100644 (file)
index 7280607..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-#!@BASH@
-# guile-gnome.sh -- download, compile, install g-wrap, guile-gnome TLA and
-# pango CVS
-
-# LilyPond has an experimental gnome canvas output backend -- hackers
-# only.  This depends on unreleased version of guile-gnome, which
-# depends on an unreleased, forked version of g-wrap.  We also need
-# pango CVS > 2004-06-12
-
-# Note: this install information is volatile, you'll probably want to
-# pull all from from guile-gnome-devel@gnu.org--2004 soon.
-
-set -ex
-
-# Where user built stuff will be installed
-OPT=$HOME/usr/pkg
-
-if [ -x /usr/bin/gcc34 ] ;then
-    export GCC=gcc34
-fi
-
-if [ -x /usr/bin/gcc-3.4 ] ;then
-    export GCC=gcc-3.4
-fi
-
-export AUTOMAKE=automake-1.8
-export ACLOCAL=aclocal-1.8
-export AUTOCONF=$(which autoconf2.50)
-export AUTOHEADER=$(which autoheader2.50)
-
-MY_LIBTOOL=$(dpkg -l libtool | tail -1 | awk '{ print $3 }')
-PANGO_LIBTOOL=1.5.6-1
-
-# Please state your love for the autotools today
-if [ -z "$I_LOVE_AUTOTOOLS" ]; then
-    I_LOVE_AUTOTOOLS=no
-else
-    I_LOVE_AUTOTOOLS=yes
-fi
-
-if [ -z "$AUTOCONF" ]; then
-    unset AUTOCONF
-fi
-if [ -z "$AUTOHEADER" ]; then
-    unset AUTOHEADER
-fi
-
-
-# test: the name of our download and build directory
-rm -rf test
-mkdir test
-cd test
-
-## 1.  install gnome-devel
-##     - Debian/unstable: apt-get install gnome-devel
-##     - ...
-
-## 2.  get pango CVS
-
-
-mkdir -p gnome/CVS
-cd gnome
-echo ":pserver:anonymous@anoncvs.gnome.org:/cvs/gnome" > CVS/Root
-echo "." > CVS/Repository
-cvs -z3 checkout -P pango
-cd pango
-rm -rf $OPT/pango
-if [ "$I_LOVE_AUTOTOOLS" = "no" ]; then
-    sudo apt-get --yes --force-yes install libtool=$PANGO_LIBTOOL
-fi    
-./autogen.sh --help
-./configure --prefix=$OPT/pango --enable-maintainer-mode --enable-gtk-doc
-make XFT_LIBS="-L/usr/lib -lXft -L/usr/X11R6/lib -lfreetype -lz -lXrender -lX11 -lfontconfig" install
-if [ "$I_LOVE_AUTOTOOLS" = "no" ]; then
-    sudo apt-get --yes --force-yes install libtool=$MY_LIBTOOL
-fi    
-
-cd ../..
-
-export PKG_CONFIG_PATH=$OPT/pango/lib/pkgconfig:$PKG_CONFIG_PATH
-
-
-## 3.  *** NOTE: use guile-1.6 for g-wrap and guile-gnome ***
-## using GUILE CVS g-wrap/guile-gnome is experimental (read: segfaults)
-## Assuming that system has guile-1.6 installed in /usr/bin 
-PATH=/usr/bin:$PATH
-
-if [ -d $OPT/libffi/ ]; then
-    export LDFLAGS=-L$OPT/libffi/lib
-    export CPPFLAGS=-I$OPT/libffi/include
-fi
-
-## 4.  get g-wrap 2.0
-tla register-archive a.rottmann@gmx.at--2004-main \
-    http://people.debian.org/~rotty/arch/a.rottmann@gmx.at/2004-main || true
-
-rm -rf g-wrap
-if true; then
-    ## pull latest g-wrap from janneke -- this step is probably no longer
-    ## necessary when you read this
-    tla register-archive janneke@gnu.org--2004-gnome \
-       http://lilypond.org/~janneke/{arch}/2004-gnome || true
-    tla get janneke@gnu.org--2004-gnome/g-wrap--janneke g-wrap
-else
-    ## tla get a.rottmann@gmx.at--2004-main/g-wrap--tng g-wrap
-    tla get a.rottmann@gmx.at--2004-main/g-wrap--mainline--1.9.0 g-wrap
-fi
-cd g-wrap
-
-rm -rf $OPT/g-wrap
-sh autogen.sh --noconfigure
-mkdir =build
-cd =build
-../configure --prefix=$OPT/g-wrap
-make install
-
-# not a good idea
-## cp srfi-34.scm from CVS head ?  --hwn
-#(cd $OPT/g-wrap/share/guile/site
-# mv srfi-34.scm srfi-34.scm-g-wrap
-# cp $OPT/guile/share/guile-1.7/srfi/srfi-34.scm .)
-
-cd ../..
-
-## 5.  get guile-gnome
-tla register-archive guile-gnome-devel@gnu.org--2004 \
-    http://people.debian.org/~rotty/arch/guile-gnome-devel@gnu.org/2004/ || true
-rm -rf guile-gnome
-tla get guile-gnome-devel@gnu.org--2004/dists--dev guile-gnome
-cd guile-gnome
-tla build-config -r configs/gnu.org/dev
-cd src
-
-## 6.  get the gnome canvas module
-tla get guile-gnome-devel@gnu.org--2004/libgnomecanvas--dev libgnomecanvas
-
-rm -rf $OPT/guile-gnome
-if false; then
-    libtoolize --copy --force
-    $AUTOHEADER
-    $ACLOCAL
-    $AUTOMAKE --copy --force
-    $AUTOCONF
-fi
-sh autogen.sh --noconfigure
-mkdir ../=build
-cd ../=build
-
-export GUILE_LOAD_PATH=$OPT/g-wrap/share/guile/site:$GUILE_LOAD_PATH
-export LD_LIBRARY_PATH=$OPT/g-wrap/lib:$LD_LIBRARY_PATH
-PKG_CONFIG_PATH=$OPT/g-wrap/lib/pkgconfig:$PKG_CONFIG_PATH
-
-../src/configure --prefix=$OPT/guile-gnome
-
-# Using libtool < 1.6.0 together with gcc-3.4 may trigger this problem:
-#
-#    If a tag has not been given, and we're using a compiler which is
-#    not one of the ones with which libtool was built, attempt to
-#    infer the compiler from the first word of the command line passed
-#    to libtool.
-#
-# Use gcc-3.3 or libtool-1.6.0
-make install CC=$GCC G_WRAP_MODULE_DIR=$OPT/g-wrap/share/guile/site
-
-GUILE_LOAD_PATH=$OPT/guile-gnome/share/guile:$GUILE_LOAD_PATH
-LD_LIBRARY_PATH=$OPT/guile-gnome/lib:$LD_LIBRARY_PATH
-
-# simple test
-guile -s ../src/libgnomecanvas/examples/canvas.scm
index 16afdaba978ef86cbe19c9dedee0b80e26bd18fc..d8ea2d3e6766d1b23a07de49c12397d6ee311f7f 100644 (file)
@@ -80,13 +80,12 @@ else
 
 
        # For direct ps output: ps/lilyponddefs.ps
-       GS_LIB="$datadir/ps:"${GS_LIB:=""}
-       export GS_LIB
+       ## GS_LIB="$datadir/ps:"${GS_LIB:=""}
+       ## export GS_LIB
 
        # For direct ps output fonts. Add all available TeX Type1 fonts
-       tmppfadir=`kpsewhich ecrm10.pfa`
-       GS_FONTPATH=$datadir/pfa:`dirname $tmppfadir`:${GS_FONTPATH:=""}
-       export GS_FONTPATH
+       ## GS_FONTPATH=`kpsewhich -expand-path=\\$T1FONTS`:${GS_FONTPATH:=""}
+       ## export GS_FONTPATH
 
 fi # remove for zsh
        
index c37901d052e9441f0a7f3688f36af7ae1edf1ddf..6c3e4293cf5cda052e27c0e770f165fa6f17367f 100755 (executable)
@@ -39,7 +39,6 @@ for name in [
 'ly/engraver-init.ly',
 'ly/grace-init.ly',
 'ly/gregorian-init.ly',
-'ly/music-functions-init.ly',
 'ly/performer-init.ly',
 'ly/property-init.ly',
 'ly/scale-definitions-init.ly',
@@ -56,7 +55,6 @@ for name in [
 # more identifiers
 for name in [
 'ly/declarations-init.ly',
-'ly/declarations-init.ly',
 'ly/params-init.ly',
 ]:
     F = open(name, 'r')
@@ -78,7 +76,6 @@ for name in [
 'ly/norsk.ly',
 'ly/suomi.ly',
 'ly/svenska.ly',
-'ly/vlaams.ly',
 ]:
     F = open(name, 'r')
     for line in F.readlines():
index 972cbdd81a5d368bdfcddf56d35b6c5cf068faa7..b78ed88b6b5da617f08d18b5ccfb7b278f066326 100644 (file)
@@ -69,15 +69,10 @@ def parse_logfile (fn):
                tags = string.split(l, '@:')
                if tags[0] == 'group':
                        group = tags[1]
-               elif tags[0] == 'puorg':
-                       group = ''
                elif tags[0] == 'char':
-                       name = tags[9]
-                       if group:
-                               name = group + '-' + name
                        m = {
                                'description':  tags[1],
-                               'name': name, 
+                               'name': group + '-' + tags[9],
                                'tex': tags[10],
                                'code': string.atoi (tags[2]),
                                'breapth':string.atof (tags[3]),
@@ -96,12 +91,7 @@ def parse_logfile (fn):
                        #urg
                        if 0: #testing
                                tags.append ('Regular')
-
-                       
-                       encoding = re.sub (' ','-', tags[5])
-                       tags = tags[:-1]
                        name = tags[1:]
-                       global_info['DesignSize'] = string.atof (tags[4])
                        global_info['FontName'] = string.join (name,'-')
                        global_info['FullName'] = string.join (name,' ')
                        global_info['FamilyName'] = string.join (name[1:-1],
@@ -110,11 +100,10 @@ def parse_logfile (fn):
                                global_info['Weight'] = tags[4]
                        else: #testing
                                global_info['Weight'] = tags[-1]
-                               
                        global_info['FontBBox'] = '0 0 1000 1000'
                        global_info['Ascender'] = '0'
                        global_info['Descender'] = '0'
-                       global_info['EncodingScheme'] = encoding
+                       global_info['EncodingScheme'] = 'FontSpecific'
        
        return (global_info, charmetrics, deps)
 
@@ -171,7 +160,7 @@ def write_fontlist (file, global_info, charmetrics):
        file.write (r"""
 %% LilyPond file to list all font symbols and the corresponding names
 %% Automatically generated by mf-to-table.py
-\score{ \new Lyrics \lyrics { \time %d/8
+\score{ \lyrics \new Lyrics { \time %d/8
 """ % (2*per_line+1))
 
        count = 0
@@ -198,12 +187,12 @@ def write_fontlist (file, global_info, charmetrics):
     interscoreline = 1.0
     indent = 0.0 \cm
     \context {
-      \Lyrics
+      \LyricsContext
       \override SeparationItem #'padding = #2
       minimumVerticalExtent = ##f
     }
     \context {
-       \Score
+       \ScoreContext
        \remove "Bar_number_engraver"
        }
        }
@@ -286,10 +275,6 @@ for filenm in files:
 
        write_afm_header (afm)
        afm.write ("Comment TfmCheckSum %d\n" % cs)
-       afm.write ("Comment DesignSize %.2f\n" % g['DesignSize'])
-
-       del g['DesignSize']
-       
        write_afm_metric (afm, g, m)
        
        write_tex_defs (open (texfile_nm, 'w'), g, m)
index 947e4ea316969fe1d6ebe7e0edbbcd4f14dcbe59..1e0d594394192edd99f64dc0058e41eff081cb5a 100644 (file)
@@ -123,11 +123,7 @@ def gen_list(inputs, filename):
                list = open(filename, 'w')
        else:
                list = sys.stdout
-       list.write ('<html><head><title>Rendered Examples</title>\n')
-       list.write ('<style type="text/css">\n')
-       list.write ('hr { border:0; height:1; color: #000000; background-color: #000000; }\n')
-       list.write ('</style></head>\n')
-
+       list.write ('<html><title>Rendered Examples</title>\n')
        list.write ('<body bgcolor=white>\n')
        
        if inputs:
index 2f8ec4b0074e7d8855f4d934e94f02a2ed26f8e9..96ede6ebae7c71b378f322af4602b17a3f7db688 100644 (file)
@@ -91,9 +91,3 @@
 #define GUILE_PATCH_LEVEL 0
 #endif
 #endif
-
-/* define if you have pango CVS */
-#define HAVE_PANGO_CVS 0
-
-/* define if you have pango_fc_font_map_add_decoder_find_func */
-#define HAVE_PANGO_FC_FONT_MAP_ADD_DECODER_FIND_FUNC 0
index 55ff72debc02ca391d033f8cd6a31043ea07e436..1724a5fad53a8bbfe9a7422bac295bc04f9c3f32 100644 (file)
@@ -7,10 +7,10 @@ MISSING_REQUIRED = @REQUIRED@
 
 package-depth = @package_depth@
 
-USER_CFLAGS = @CFLAGS@ @CPPFLAGS@ @GUILE_CFLAGS@ @PANGO_CFLAGS@
-USER_CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@ @GUILE_CFLAGS@ @PANGO_CFLAGS@
+USER_CFLAGS = @CFLAGS@ @CPPFLAGS@ @GUILE_CFLAGS@
+USER_CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@ @GUILE_CFLAGS@
 USER_LDFLAGS = @LDFLAGS@ @GUILE_LDFLAGS@
-EXTRA_LIBES = @EXTRA_LIBES@ @LIBS@ @PANGO_LIBS@
+EXTRA_LIBES = @EXTRA_LIBES@ @LIBS@
 
 PACKAGE = @PACKAGE@
 package = @package@
index ccf37a2e7d719cce143a26bd1d9fac71ad72ad63..5da07aee6ef179602fc9d7e2e5d311702edd22af 100644 (file)
@@ -23,12 +23,6 @@ AC_CONFIG_HEADER([$CONFIGFILE.h:config.hh.in])
 
 # Uncomment the configuration options your package needs.
 
-
-gui_b=no
-AC_ARG_ENABLE(gui,
-    [  --enable-gui            compile with debugging info.  Default: off],
-    [gui_b=$enableval])
-
 # must come before any header checks
 STEPMAKE_COMPILE
 
@@ -64,19 +58,6 @@ AC_FUNC_VPRINTF
 AC_CHECK_FUNCS([gettext isinf memmem snprintf vsnprintf gettext])
 
 
-# This is developer only anyway, help pkgconfig a bit
-export PKG_CONFIG_PATH
-PKG_CONFIG_PATH=/usr/lib/pkgconfig:$PKG_CONFIG_PATH
-PKG_CONFIG_PATH=/opt/gnome/lib/pkgconfig:$PKG_CONFIG_PATH
-PKG_CONFIG_PATH=$HOME/usr/pkg/gnome/lib/pkgconfig:$PKG_CONFIG_PATH
-PKG_CONFIG_PATH=$HOME/usr/pkg/pango/lib/pkgconfig:$PKG_CONFIG_PATH
-
-#STEPMAKE_FREETYPE2
-if test "$gui_b" = "yes"; then
-  STEPMAKE_GTK2
-  STEPMAKE_PANGO
-fi
-
 ## Optional tools for building documentation, website, extra fonts.
 
 # guile executable for some scripts
@@ -113,4 +94,5 @@ Type:
     make$mc install   to install LilyPond
     make$mc help      to see all possible targets
 
+Do not worry if ./Documentation should not build.
 EOF
index 06d22595e54c277e53bf101dac4f405bfe1f104b..299cfe46f8674fea421f259bf0eda3bd9cac3d21 100644 (file)
@@ -1,21 +1,16 @@
 #!@PYTHON@
 # lily-wins.py -- LilyPond command for .ly on Windows
 
-import getopt
 import os
 import re
 import sys
-import time
-
-do_debug = 0
 
 def usage ():
        print 'Usage [-h,--help] lily-wins LY-FILE'
 
 # print debugging stuff for now
 def debug (s):
-       if do_debug:
-               print s
+       print s
 
 def read_pipe (command):
        debug ('command:' + command)
@@ -38,36 +33,16 @@ def escape_shell (x):
        return re.sub ("(\s|[`'\"\\\\])", r'\\\1',x)
 #      return re.sub (r'''([^\\])([`'"\\\s])''', r'\1\\\2', x)
         # help emacs'" broken python mode
-
-def usage ():
-       print '''lily-wins [options] file
-
-Options supported:
-
-  -h, --help      this help screen
-  -d, --debug     print debugging information
-  
-'''
        
 debug (`sys.argv`)
 
-########
-# main
-(opts, files)=getopt.getopt (sys.argv[1:],'dh', ['help', 'debug'])
-
-for (o,a) in opts:
-       if o == '-d' or o == '--debug':
-               do_debug = 1
-       elif o == '-h' or o  == '--help':
-               usage ()
-               sys.exit (0)
-
-if files == []:
+if len (sys.argv) != 2 \
+   or sys.argv[1] == '-h' or sys.argv[1] == '--help':
        usage ()
-       sys.exit (1)
+       sys.exit (0)
+       
+native_file = sys.argv[1]
        
-native_file = files[0]
-print 'Processing %s ...' % native_file
 file = read_pipe ('/usr/bin/cygpath -au %s' % escape_shell (native_file))
 if not file:
        file = native_file
@@ -79,7 +54,7 @@ if not dir:
        dir = '.'
 base = os.path.basename (file)
 stem = strip_extension (base, '.ly')
-debug ( `vars ()`)
+print `vars ()`
 
 native_base = '%(dir)s/%(stem)s' % vars ()
 native_base = read_pipe ('/usr/bin/cygpath -aw %s' % escape_shell (native_base))
@@ -103,28 +78,14 @@ if not pdfview:
        pdfview = 'xpdf'
 
 os.chdir (dir)
-pdffile = '%(stem)s.pdf' % vars ()
-if os.path.exists (pdffile):
-       os.unlink (pdffile)
-
-
-script = '/usr/bin/lilypond'
-
 if os.path.exists ('/usr/bin/ly2dvi'):
-       script = '/usr/bin/ly2dvi'
-
-stat = system ('%s -p %s > %s.log 2>&1' % (script, escape_shell (base),
-                                   escape_shell (stem)))
-
-if not os.path.exists (pdffile):
+       system ('/usr/bin/ly2dvi -p %s > %s.log 2>&1' % (escape_shell (base),
+                                                        escape_shell (stem)))
+else:
+       system ('/usr/bin/lilypond %s > %s.log 2>&1' % (escape_shell (base),
+                                                       escape_shell (stem)))
+if not os.path.exists ('%(stem)s.pdf' % vars ()):
        # message box?
-       sys.stderr.write ('PDF output not found. Error log: \n')
+       sys.stderr.write ('pdf output not found\n')
 
-       map (sys.stderr.write, open (stem + '.log').readlines ()[-20:])
-       sys.stderr.write ('A full log is in the file %s.log\n' % stem)
-       sys.stderr.write ('\n\nPress enter to close window\n')
-       sys.stdin.readline ()
-else:
-       
-       # run even if failed, to make sure that error 
-       system ('%s %s.pdf' % (escape_shell (pdfview), escape_shell (native_base)))
+system ('%s %s.pdf' % (escape_shell (pdfview), escape_shell (native_base)))
index a782c521a8198cc11fe7448c3d163228f04c8c47..49954d4f5f73bbfd5eff1c47e85e18a8d3a8f3e5 100644 (file)
@@ -166,7 +166,4 @@ postinstall () {
 
     #cd $inst-doc/$packagedocdir &&
     #ln -s $(find html/Documentation -name '*.ps.gz') .
-
-    install -d -m755 $inst-doc/$infodir/lilypond
-    cd $inst-doc/$infodir/lilypond && ln -sf ../../doc/$base-$ver/Documentation/user/out-www/*png .
 }
index 9e71ad6f0297264bfc4e6413477909f1ae540dd7..87e218638ccdb0499760734fd5defb9f2f4caded 100644 (file)
@@ -93,7 +93,7 @@
 ;;               - brackets '{[]}'
 ;;               - ties '~'
 ;;               - ligatures \[, \]
-      '("\\(-?[][~}{]\\|\\\\[][]\\)" 0 font-lock-reference-face t)
+      '("\\(-?[][~}{]\\|\\\\[][]\\)" 0 font-lock-warning-face t)
 
 ;; "on top", ... vertical grouping:
 ;;               - '<>'-chord brackets with '\\'-voice sep., not marcato '->'
index 17bca7a5992cd84a68cc5b1a8076a85697f91958..0087f59636f883bf7cafa3b4c929dade41c683de 100644 (file)
 (defvar LilyPond-region-file-prefix "emacs-lily"
   "File prefix for commands on buffer or region.")
 
-(defvar LilyPond-master-file nil
-  "Master file that Lilypond will be run on.")
-
 ;; FIXME: find ``\score'' in buffers / make settable?
-(defun LilyPond-get-master-file ()
-  (or LilyPond-master-file
-      (buffer-file-name)))
+(defun LilyPond-master-file ()
+  ;; duh
+  (buffer-file-name))
 
 (defvar LilyPond-kick-xdvi nil
   "If true, no simultaneous xdvi's are started, but reload signal is sent.")
@@ -289,7 +286,7 @@ in LilyPond-include-path."
   (interactive)
   (if (buffer-modified-p)
       (progn (save-buffer)
-            (setq LilyPond-command-next LilyPond-command-default))))
+            (setq LilyPond-command-default "LilyPond"))))
 
 ;;; return (dir base ext)
 (defun split-file-name (name)
@@ -312,8 +309,6 @@ in LilyPond-include-path."
   :type 'string)
 ;;;(make-variable-buffer-local 'LilyPond-command-last)
 
-(defvar LilyPond-command-next LilyPond-command-default)
-
 (defvar LilyPond-command-current 'LilyPond-command-master)
 ;;;(make-variable-buffer-local 'LilyPond-command-master)
 
@@ -349,12 +344,12 @@ in LilyPond-include-path."
 (defun LilyPond-command-current-midi ()
   "Play midi corresponding to the current document."
   (interactive)
-  (LilyPond-command (LilyPond-command-menu "Midi") 'LilyPond-get-master-file))
+  (LilyPond-command (LilyPond-command-menu "Midi") 'LilyPond-master-file))
 
 (defun LilyPond-command-all-midi ()
   "Play midi corresponding to the current document."
   (interactive)
-  (LilyPond-command (LilyPond-command-menu "MidiAll") 'LilyPond-get-master-file))
+  (LilyPond-command (LilyPond-command-menu "MidiAll") 'LilyPond-master-file))
 
 (defun count-rexp (start end rexp)
   "Print number of found regular expressions in the region."
@@ -380,7 +375,7 @@ in LilyPond-include-path."
 (defun LilyPond-string-current-midi ()
   "Check the midi file of the following midi-score in the current document."
   (let ((fnameprefix (if (eq LilyPond-command-current 'LilyPond-command-master)
-                        (substring (LilyPond-get-master-file) 0 -3); suppose ".ly"
+                        (substring (LilyPond-master-file) 0 -3); suppose ".ly"
                       LilyPond-region-file-prefix))
        (allcount (string-to-number (substring (count-midi-words) 0 -12)))
        (count (string-to-number (substring (count-midi-words-backwards) 0 -12))))
@@ -394,7 +389,7 @@ in LilyPond-include-path."
 (defun LilyPond-string-all-midi ()
   "Return the midi files of the current document in ascending order."
   (let ((fnameprefix (if (eq LilyPond-command-current 'LilyPond-command-master)
-                        (substring (LilyPond-get-master-file) 0 -3); suppose ".ly"
+                        (substring (LilyPond-master-file) 0 -3); suppose ".ly"
                       LilyPond-region-file-prefix))
        (allcount (string-to-number (substring (count-midi-words) 0 -12))))
     (concat (if (> allcount 0)  ; at least one midi-score
@@ -411,28 +406,28 @@ in LilyPond-include-path."
   ;; Should expand this to include possible keyboard shortcuts which
   ;; could then be mapped to define-key and menu.
   `(
-    ("LilyPond" . ("lilypond-bin %s" "%s" "%l" "LaTeX"))
-    ("TeX" . ("tex '\\nonstopmode\\input %t'" "%t" "%d" "View"))
+    ("LilyPond" . ("lilypond-bin %s" . "LaTeX"))
+    ("TeX" . ("tex '\\nonstopmode\\input %t'" . "View"))
 
-    ("2Dvi" . ("lilypond %s" "%s" "%d" "View"))
-    ("2PS" . ("lilypond -P %s" "%s" "%p" "ViewPS"))
-    ("2Midi" . ("lilypond -m %s" "%s" "%m" "Midi"))
+    ("2Dvi" . ("lilypond %s" . "View"))
+    ("2PS" . ("lilypond -P %s" . "ViewPS"))
+    ("2Midi" . ("lilypond -m %s" . "View"))
 
-    ("Book" . ("lilypond-book %x" "%x" "%l" "LaTeX"))
-    ("LaTeX" . ("latex '\\nonstopmode\\input %l'" "%l" "%d" "View"))
+    ("Book" . ("lilypond-book %x" . "LaTeX"))
+    ("LaTeX" . ("latex '\\nonstopmode\\input %l'" . "View"))
 
     ;; point-n-click (arg: exits upop USR1)
-    ("SmartView" . ("xdvi %d"))
+    ("SmartView" . ("xdvi %d" . "LilyPond"))
 
     ;; refreshes when kicked USR1
-    ("View" . (,(concat LilyPond-xdvi-command " %d")))
-    ("ViewPS" . (,(concat LilyPond-gv-command " %p")))
+    ("View" . (,(concat LilyPond-xdvi-command " %d") . "LilyPond"))
+    ("ViewPS" . (,(concat LilyPond-gv-command " %p") . "LilyPond"))
 
     ;; The following are refreshed in LilyPond-command:
     ;; - current-midi depends on cursor position and
-    ("Midi" . (,(concat LilyPond-midi-command " " (LilyPond-string-current-midi)))) ; 
+    ("Midi" . (,(concat LilyPond-midi-command " " (LilyPond-string-current-midi)) . "LilyPond" )) ; 
     ;; - all-midi depends on number of midi-score.
-    ("MidiAll" . (,(concat LilyPond-all-midi-command " " (LilyPond-string-all-midi))))
+    ("MidiAll" . (,(concat LilyPond-all-midi-command " " (LilyPond-string-all-midi)) . "LilyPond"))
     )
 
   "AList of commands to execute on the current document.
@@ -487,39 +482,39 @@ Must be the car of an entry in `LilyPond-command-alist'."
   :group 'LilyPond
   :type 'string)
 
-(defun LilyPond-find-required-command (command file)
-  "Find the first command in the chain that is needed to run
- (input file is newer than the output file)"
-  (let* ((entry (cdr (assoc command LilyPond-command-alist)))
-       (next-command (nth 3 entry)))
-    (if (null next-command)
-       command
-      (let* ((src-string (nth 1 entry))
-           (input (LilyPond-command-expand src-string file))
-           (output (LilyPond-command-expand (nth 2 entry) file)))
-       (if (or (file-newer-than-file-p input output)
-               (and (equal "%s" src-string)
-                    (not (equal (buffer-name) file))
-                    (file-newer-than-file-p (buffer-name)
-                                            output)))
-           command
-         (LilyPond-find-required-command next-command file))))))
+(defun xLilyPond-compile-sentinel (process msg)
+  (if (and process
+          (= 0 (process-exit-status process)))
+      (setq LilyPond-command-default
+             (cddr (assoc LilyPond-command-default LilyPond-command-alist)))))
+
+;; FIXME: shouldn't do this for stray View/xdvi
+(defun LilyPond-compile-sentinel (buffer msg)
+  (if (string-match "^finished" msg)
+      (setq LilyPond-command-default
+           (cddr (assoc LilyPond-command-default LilyPond-command-alist)))))
+
+;;(make-variable-buffer-local 'compilation-finish-function)
+(setq compilation-finish-function 'LilyPond-compile-sentinel)
 
 (defun LilyPond-command-query (name)
   "Query the user for what LilyPond command to use."
-  (cond ((string-equal name LilyPond-region-file-prefix)
-        (LilyPond-check-files (concat name ".tex")
-                              (list name)
-                              (list LilyPond-file-extension)))
-       ((verify-visited-file-modtime (current-buffer))
-        (and (buffer-modified-p)
-             (y-or-n-p "Save buffer before next command? ")
-             (LilyPond-save-buffer)))
-       ((y-or-n-p "The command will be invoked to an already saved buffer. Revert it? ")
-        (revert-buffer t t)))
-    
-  (let* ((default (LilyPond-find-required-command LilyPond-command-next name))
-        (completion-ignore-case t)
+  (let* ((default (cond ((if (string-equal name LilyPond-region-file-prefix)
+                            (LilyPond-check-files (concat name ".tex")
+                                                  (list name)
+                                                  (list LilyPond-file-extension))
+                          (if (verify-visited-file-modtime (current-buffer))
+                              (if (buffer-modified-p)
+                                  (if (y-or-n-p "Save buffer before next command? ")
+                                      (LilyPond-save-buffer)))
+                            (if (y-or-n-p "The command will be invoked to an already saved buffer. Revert it? ")
+                                (revert-buffer t t)))
+                          ;;"LilyPond"
+                          LilyPond-command-default))
+                       (t LilyPond-command-default)))
+
+         (completion-ignore-case t)
+        
         (answer (or LilyPond-command-force
                     (completing-read
                      (concat "Command: (default " default ") ")
@@ -536,49 +531,49 @@ Must be the car of an entry in `LilyPond-command-alist'."
   "Run command on the current document."
   (interactive)
   (LilyPond-command-select-master)
-  (LilyPond-command (LilyPond-command-query (LilyPond-get-master-file))
-                   'LilyPond-get-master-file))
+  (LilyPond-command (LilyPond-command-query (LilyPond-master-file))
+                   'LilyPond-master-file))
 
 (defun LilyPond-command-lilypond ()
   "Run lilypond for the current document."
   (interactive)
-  (LilyPond-command (LilyPond-command-menu "LilyPond") 'LilyPond-get-master-file)
+  (LilyPond-command (LilyPond-command-menu "LilyPond") 'LilyPond-master-file)
 )
 
 (defun LilyPond-command-formatdvi ()
   "Format the dvi output of the current document."
   (interactive)
-  (LilyPond-command (LilyPond-command-menu "2Dvi") 'LilyPond-get-master-file)
+  (LilyPond-command (LilyPond-command-menu "2Dvi") 'LilyPond-master-file)
 )
 
 (defun LilyPond-command-formatps ()
   "Format the ps output of the current document."
   (interactive)
-  (LilyPond-command (LilyPond-command-menu "2PS") 'LilyPond-get-master-file)
+  (LilyPond-command (LilyPond-command-menu "2PS") 'LilyPond-master-file)
 )
 
 (defun LilyPond-command-formatmidi ()
   "Format the midi output of the current document."
   (interactive)
-  (LilyPond-command (LilyPond-command-menu "2Midi") 'LilyPond-get-master-file)
+  (LilyPond-command (LilyPond-command-menu "2Midi") 'LilyPond-master-file)
 )
 
 (defun LilyPond-command-smartview ()
   "View the dvi output of current document."
   (interactive)
-  (LilyPond-command (LilyPond-command-menu "SmartView") 'LilyPond-get-master-file)
+  (LilyPond-command (LilyPond-command-menu "SmartView") 'LilyPond-master-file)
 )
 
 (defun LilyPond-command-view ()
   "View the dvi output of current document."
   (interactive)
-  (LilyPond-command (LilyPond-command-menu "View") 'LilyPond-get-master-file)
+  (LilyPond-command (LilyPond-command-menu "View") 'LilyPond-master-file)
 )
 
 (defun LilyPond-command-viewps ()
   "View the ps output of current document."
   (interactive)
-  (LilyPond-command (LilyPond-command-menu "ViewPS") 'LilyPond-get-master-file)
+  (LilyPond-command (LilyPond-command-menu "ViewPS") 'LilyPond-master-file)
 )
 
 ;; FIXME, this is broken
@@ -675,8 +670,8 @@ command."
                    (LilyPond-kill-midi))) ; stop and start playing
              (if (and (member name (list "Midi" "MidiAll")) job-string)
                  (if (file-newer-than-file-p
-                      (LilyPond-get-master-file)
-                      (concat (substring (LilyPond-get-master-file) 0 -3) ".midi"))
+                      (LilyPond-master-file)
+                      (concat (substring (LilyPond-master-file) 0 -3) ".midi"))
                      (if (y-or-n-p "Midi older than source. Reformat midi?")
                          (progn
                            (LilyPond-command-formatmidi)
@@ -699,12 +694,7 @@ command."
                                (sit-for 0 100)))
                          (setq job-string nil)))))
 
-             (setq LilyPond-command-next
-                   (let* ((entry (assoc name LilyPond-command-alist))
-                          (next-command (nth 3 (cdr entry))))
-                     (or next-command
-                         LilyPond-command-default)))
-             
+             (setq LilyPond-command-default name)
              (if (string-equal job-string "no jobs")
                  (LilyPond-compile-file command name))))))))
          
@@ -958,12 +948,12 @@ command."
 ;;; Some kind of mapping which includes :keys might be more elegant
 ;;; Put keys to LilyPond-command-alist and fetch them from there somehow.
          '([ "LilyPond" LilyPond-command-lilypond t])
-         '([ "TeX" (LilyPond-command (LilyPond-command-menu "TeX") 'LilyPond-get-master-file) ])
+         '([ "TeX" (LilyPond-command (LilyPond-command-menu "TeX") 'LilyPond-master-file) ])
          '([ "2Dvi" LilyPond-command-formatdvi t])
          '([ "2PS" LilyPond-command-formatps t])
          '([ "2Midi" LilyPond-command-formatmidi t])
-         '([ "Book" (LilyPond-command (LilyPond-command-menu "Book") 'LilyPond-get-master-file) ])
-         '([ "LaTeX" (LilyPond-command (LilyPond-command-menu "LaTeX") 'LilyPond-get-master-file) ])
+         '([ "Book" (LilyPond-command (LilyPond-command-menu "Book") 'LilyPond-master-file) ])
+         '([ "LaTeX" (LilyPond-command (LilyPond-command-menu "LaTeX") 'LilyPond-master-file) ])
          '([ "Kill jobs" LilyPond-kill-jobs t])
          '("-----")
          '([ "SmartView" LilyPond-command-smartview t])
@@ -1178,7 +1168,7 @@ LilyPond-xdvi-command\t\tcommand to display dvi files -- bit superfluous"
   (interactive)
   (require 'ilisp)
   (guile "lilyguile" (LilyPond-command-expand (cadr (assoc "2Dvi" LilyPond-command-alist))
-                                              (funcall 'LilyPond-get-master-file)))
+                                              (funcall 'LilyPond-master-file)))
   (comint-default-send (ilisp-process) "(define-module (*anonymous-ly-1*))")
   (comint-default-send (ilisp-process) "(set! %load-path (cons \"/usr/share/ilisp/\" %load-path))")
   (comint-default-send (ilisp-process) "(use-modules (guile-user) (guile-ilisp))")
index d28657aabe0175e75649e48d813dbd0b68a4035b..7b264c2da905c4156e408d619b1da1b3799f4263 100644 (file)
@@ -16,3 +16,30 @@ axis_name_string (Axis a)
   return to_string (char (a + 'x'));
 }
 
+
+Axis
+other_axis (Axis a)
+{
+  return a ==  Y_AXIS ? X_AXIS : Y_AXIS;
+}
+
+/*
+  TODO inline these.
+ */
+Axis
+post_incr (Axis &a)
+{
+  assert (a < NO_AXES);
+  Axis b= a;
+  a = Axis (int (a) + 1);
+  return b;
+}
+
+Axis
+incr (Axis &a)
+{
+  assert (a < NO_AXES);
+  a = Axis (int (a) + 1);
+  return a;
+}
+
diff --git a/flower/file-name.cc b/flower/file-name.cc
deleted file mode 100644 (file)
index c265626..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
-  file-name.cc - implement File_name
-   
-  source file of the Flower Library
-  
-  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-                 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#include "config.h"
-#include <stdio.h>
-#include <errno.h>
-#include <limits.h>
-
-#if HAVE_SYS_STAT_H 
-#include <sys/stat.h>
-#endif
-
-#ifdef __CYGWIN__
-#include <sys/cygwin.h>
-#endif
-
-#include "file-name.hh"
-
-/* We don't have multiple roots, set this to '\0'? */
-#ifndef ROOTSEP
-#define ROOTSEP ':'
-#endif
-
-#ifndef DIRSEP
-#define DIRSEP '/'
-#endif
-
-#ifndef EXTSEP
-#define EXTSEP '.'
-#endif
-
-#ifdef __CYGWIN__
-static String
-dos_to_posix (String file_name)
-{
-  char buf[PATH_MAX];
-  char *s = file_name.get_copy_str0 ();
-  /* urg, wtf? char const* argument gets modified! */
-  cygwin_conv_to_posix_path (s, buf);
-  delete s;
-  return buf;
-}
-#endif /* __CYGWIN__ */
-
-/* Join components to full file_name. */
-String
-File_name::to_string () const
-{
-  String s;
-  if (!root_.is_empty ())
-    s = root_ + ::to_string (ROOTSEP);
-  if (!dir_.is_empty ())
-    s += dir_ + ::to_string (DIRSEP);
-  s += base_;
-  if (!ext_.is_empty ())
-    s += ::to_string (EXTSEP) + ext_;
-  return s;
-}
-
-char const*
-File_name::to_str0 () const
-{
-  return to_string ().to_str0 ();
-}
-
-File_name::File_name (String file_name)
-{
-#ifdef __CYGWIN__
-  /* All system functions would work, even if we don't convert to
-     posix file_name, but we'd think that \foe\bar\baz.ly is in the cwd.
-     On by default.  */
-  file_name = dos_to_posix (file_name);
-#endif
-
-  int i = file_name.index (ROOTSEP);
-  if (i >= 0)
-    {
-      root_ = file_name.left_string (i);
-      file_name = file_name.right_string (file_name.length () - i - 1);
-    }
-
-  i = file_name.index_last (DIRSEP);
-  if (i >= 0)
-    {
-      dir_ = file_name.left_string (i);
-      file_name = file_name.right_string (file_name.length () - i - 1);
-    }
-
-  i = file_name.index_last ('.');
-  if (i >= 0)
-    {
-      base_ = file_name.left_string (i);
-      ext_ = file_name.right_string (file_name.length () - i - 1);
-    }
-  else
-    base_ = file_name;
-}
index c6bd1248aa2dd9be6dd92182148974bbc897ca18..c59d218cd1f2dce2f4f071cb647005bea0527d7d 100644 (file)
@@ -1,10 +1,5 @@
 /*
-  file-path.cc - implement File_path
-   
-  source file of the Flower Library
-  
-  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-                 Jan Nieuwenhuizen <janneke@gnu.org>
+   path.cc - manipulation of paths and filenames.
 */
 
 #include "config.h"
 
 #ifdef __CYGWIN__
 #include <sys/cygwin.h>
+
+// URGURG
+#include "../lily/include/scm-option.hh"
 #endif
 
-#include "file-name.hh"
 #include "file-path.hh"
 
+
 #ifndef PATHSEP
 #define PATHSEP ':'
 #endif
 
+/* We don't have multiple roots, set this to '\0'? */
+#ifndef ROOTSEP
+#define ROOTSEP ':'
+#endif
+
+#ifndef DIRSEP
+#define DIRSEP '/'
+#endif
+
+#ifndef EXTSEP
+#define EXTSEP '.'
+#endif
+
+
+
+#ifdef __CYGWIN__
+static String
+dos_to_posix (String path)
+{
+  char buf[PATH_MAX];
+  char *filename = path.get_copy_str0 ();
+  /* urg, wtf? char const* argument gets modified! */
+  cygwin_conv_to_posix_path (filename, buf);
+  delete filename;
+  return buf;
+}
+
+static String
+dos_to_posix_list (String path)
+{
+  char *filename = path.get_copy_str0 ();
+  int len = cygwin_win32_to_posix_path_list_buf_size (filename);
+  if (len < PATH_MAX)
+    len = PATH_MAX;
+  char *buf = new char[len];
+  /* urg, wtf? char const* argument gets modified! */
+  cygwin_win32_to_posix_path_list (filename, buf);
+  delete filename;
+  
+  String ret = buf;
+  delete buf;
+  return ret;
+}
+#endif /* __CYGWIN__ */
+
+/* Join components to full path. */
+String
+Path::to_string () const
+{
+  String s;
+  if (!root.is_empty ())
+    s = root + ::to_string (ROOTSEP);
+  if (!dir.is_empty ())
+    s += dir + ::to_string (DIRSEP);
+  s += base;
+  if (!ext.is_empty ())
+    s += ::to_string (EXTSEP) + ext;
+  return s;
+}
+
+/**
+   @param path the original full filename
+   @return 4 components of the path. They can be empty
+*/
+Path
+split_path (String path)
+{
+#ifdef __CYGWIN__
+  /* All system functions would work, even if we don't convert to
+     posix path, but we'd think that \foe\bar\baz.ly is in the cwd.
+     On by default.  */
+  if (!(testing_level_global & 1))
+    path = dos_to_posix (path);
+#endif
+
+  Path p;
+  int i = path.index (ROOTSEP);
+  if (i >= 0)
+    {
+      p.root = path.left_string (i);
+      path = path.right_string (path.length () - i - 1);
+    }
+
+  i = path.index_last (DIRSEP);
+  if (i >= 0)
+    {
+      p.dir = path.left_string (i);
+      path = path.right_string (path.length () - i - 1);
+    }
+
+  i = path.index_last ('.');
+  if (i >= 0)
+    {
+      p.base = path.left_string (i);
+      p.ext = path.right_string (path.length () - i - 1);
+    }
+  else
+    p.base = path;
+  return p;
+}
+
 void
 File_path::parse_path (String p)
 {
-  int len;
-  while ((len = p.length ()) )
+#ifdef __CYGWIN__
+  if (testing_level_global & 4)
+    p = dos_to_posix_list (p);
+#endif
+
+  int l;
+  
+  while ((l = p.length ()) )
     {
       int i = p.index (PATHSEP);
       if (i <0) 
-       i = len;
-      append (p.left_string (i));
-      p = p.right_string (len - i - 1);
+       i = l;
+      add (p.left_string (i));
+      p = p.right_string (l- i - 1);
     }
 }
 
+
+
+
 /** Find a file.
-    
-  Seach in the current dir (DUH! FIXME?), in the construction-arg
-  (what's that?, and in any other appended directory, in this order.
+  It will search in the current dir, in the construction-arg, and
+  in any other added path, in this order.
 
   @return
-  The file name if found, or empty string if not found. */
-
+  The full path if found, or empty string if not found
+  */
 String
-File_path::find (String name) const
+File_path::find (String nm) const
 {
-  if (!name.length () || (name == "-") )
-    return name;
-  int n = size ();
-  for (int i = 0; i < n; i++)
+  if (!nm.length () || (nm == "-") )
+    return nm;
+  for (int i=0; i < size (); i++)
     {
-      String file_name = elem (i);
+      String path  = elem (i);
       String sep = ::to_string (DIRSEP);
-      String right (file_name.right_string (1));
-      if (file_name.length () && right != sep)
-       file_name += ::to_string (DIRSEP);
+      String right (path.right_string (1));
+      if (path.length () && right != sep)
+       path += ::to_string (DIRSEP);
+
+      path += nm;
 
-      file_name += name;
 
-#if 0 /* Check if directory. TODO: encapsulate for autoconf */
+#if 0
+      /*
+       Check if directory. TODO: encapsulate for autoconf
+       */
       struct stat sbuf;
-      if (stat (file_name.to_str0 (), &sbuf) != 0)
+      if (stat (path.to_str0 (), &sbuf) != 0)
        continue;
       
       if (! (sbuf.st_mode & __S_IFREG))
@@ -76,82 +186,59 @@ File_path::find (String name) const
 #if !STAT_MACROS_BROKEN
       
       struct stat sbuf;
-      if (stat (file_name.to_str0 (), &sbuf) != 0)
+      if (stat (path.to_str0 (), &sbuf) != 0)
        continue;
 
       if (S_ISDIR (sbuf.st_mode))
        continue;
 #endif
 
-      /* ugh */
-      FILE *f = fopen (file_name.to_str0 (), "r");
+      FILE *f = fopen (path.to_str0 (), "r"); // ugh!
       if (f)
        {
          fclose (f);
-         return file_name;
+         return path;
        }
     }
   return "";
 }
 
-/** Find a file.
-    
-  Seach in the current dir (DUH! FIXME?), in the construction-arg
-  (what's that?, and in any other appended directory, in this order.
-
-  Search for NAME, or name without extension, or name with any of
-  EXTENSIONS, in that order.
-
-  @return
-  The file name if found, or empty string if not found. */
-String
-File_path::find (String name, char const *extensions[])
-{
-  File_name file_name (name);
-  if (name.is_empty () || name == "-")
-    file_name.base_ = "-";
-  else
-    {
-      String orig_ext = file_name.ext_;
-      for (int i = 0; extensions[i]; i++)
-       {
-         file_name.ext_ = orig_ext;
-         if (*extensions[i] && !file_name.ext_.is_empty ())
-           file_name.ext_ += ".";
-         file_name.ext_ += extensions[i];
-         if (!find (file_name.to_string ()).is_empty ())
-           break;
-       }
-      /* Reshuffle extension */
-      file_name = File_name (file_name.to_string ());
-    }
-  return file_name.to_string ();
-}
-
-/** Append a directory, return false if failed.  */
+/**
+   Add a directory, return false if failed
+ */
 bool
-File_path::try_append (String s)
+File_path::try_add (String s)
 {
   if (s == "")
     s =  ".";
-  if (FILE *f = fopen (s.to_str0 (), "r"))
-    {
-      fclose (f);
-      append (s);
-      return true;
-    }
-  return false;
+  FILE  * f = fopen (s.to_str0 (), "r");
+  if (!f)
+    return false;
+  fclose (f);
+    
+  add (s);
+  return true;
+}
+
+void
+File_path::add (String s)
+{
+#ifdef __CYGWIN__
+  if (testing_level_global & 2)
+    s = dos_to_posix (s);
+#endif
+
+  push (s);
 }
 
 String
 File_path::to_string () const
 {
   String s;
-  int n = size ();
-  for (int i = 0; i < n; i++)
+  for (int i=0; i< size (); i++)
     {
       s = s + elem (i);
-      if (i < n - 1)
+      if (i < size () -1 )
        s += ":";
     }
   return s;
index d2d57e0fbf6cfcb0c37f6d37225c7fce0fd4d789..b01ef9915fcb452bfeb23f03691aaddc0ed0d7d4 100644 (file)
 #ifndef AXES_HH
 #define AXES_HH
 
-#include <assert.h>
-
 enum Axis {
     X_AXIS =0,
     Y_AXIS =1,
     NO_AXES=2,
 };
 
-static inline
-Axis
-incr (Axis &a)
-{
-  assert (a < NO_AXES);
-  a = Axis (int (a) + 1);
-  return a;
-}
-
-static inline
-Axis
-other_axis (Axis a)
-{
-  return a ==  Y_AXIS ? X_AXIS : Y_AXIS;
-}
+
+class String;
+
+String axis_name_string (Axis);
+
+
+/**
+  the operator ++ for Axis. 
+ */
+Axis other_axis (Axis); 
+Axis post_incr (Axis &);
+Axis incr (Axis &);
+//Axis operator++ (Axis);
+
+
 
 #endif // AXES_HH
diff --git a/flower/include/file-name.hh b/flower/include/file-name.hh
deleted file mode 100644 (file)
index f05ec44..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-  file-name.hh -- declare File_name
-
-  source file of the Flower Library
-
-  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#ifndef FILE_NAME_HH
-#define FILE_NAME_HH
-
-#include "array.hh"
-#include "string.hh"
-
-class File_name
-{
-public:
-  String root_;
-  String dir_;
-  String base_;
-  String ext_;
-
-  File_name (String);
-    
-  String to_string () const;
-  char const *to_str0 () const;
-};
-
-#endif /* FILE_NAME */
index 7cd81496f3ea8f1d8b847d8c9259371f67ef95ff..40579d00feae289fa0a280b739f9a6016c45b45c 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  file-path.hh -- declare File_name and File_path
+  file-path.hh -- declare Path and File_path
 
   source file of the Flower Library
 
@@ -9,8 +9,9 @@
 #ifndef FILE_PATH_HH
 #define FILE_PATH_HH
 
-#include "array.hh"
 #include "string.hh"
+#include "array.hh"
+
 
 /**    
   search in directories for a file.
    TODO: add a unix style PATH interface 
 */
 
-class File_path : private Array<String>
+class Path
 {
 public:
-  String find (String name) const;
-  String find (String name, char const *extensions[]);
+  String root;
+  String dir;
+  String base;
+  String ext;
+
   String to_string () const;
-  bool try_append (String str);
-  void append (String str) { Array<String>::push (str); }
-  void parse_path (String);
+};
+
+class File_path : private Array<String>
+{
+public:
+  String find (String nm) const;
+
+  Array<String>::push;
   void prepend (String str) { Array<String>::insert (str, 0); }
+  String to_string ()const;
+  bool try_add (String str);
+  void add (String);
+  void parse_path (String);
 };
 
+Path split_path (String path);
+
 #endif /* FILE_PATH */
index e75cdba670100b54ed99c5514bdea4df5fb0f10a..84b628052145dfed7d8783f05d0137b04a3c9d1a 100644 (file)
@@ -28,8 +28,7 @@ typedef Interval_t<int> Slice;        // junkme.
 struct Offset;
 struct Long_option_init;
 struct Rational;
-class File_name;
-class File_path;
+struct File_path;
 struct Getopt_long;
 struct String_data;
 struct String_handle;
index 3622c7be41384178ca6ecaec3ec30bcac82f873e..a59b354526a50628ec5360bf3172f06d461bdaae 100644 (file)
@@ -7,11 +7,11 @@
 #ifndef OFFSET_HH
 #define OFFSET_HH
 
-#include "flower-proto.hh"
 #include "real.hh"
 #include "axes.hh"
 #include "arithmetic-operator.hh"
-#include "string.hh"
+
+struct Offset;
 
 Offset complex_multiply (Offset, Offset);
 Offset complex_divide (Offset, Offset);
@@ -19,90 +19,67 @@ Offset complex_exp (Offset);
 
 
 /** 2d vector
-    should change to Complex -- how is vector == complex?
-
-    ughr wat een beerput
+    should change to Complex
 */
-class Offset 
-{
+struct Offset {
 public:
   Real coordinate_a_[NO_AXES];
     
-  Real &operator[] (Axis i) 
-  {
+  Real &operator[] (Axis i) {
     return coordinate_a_[i];
   }
-
-  Real operator[] (Axis i) const
-  {
+  Real operator[] (Axis i) const{
     return coordinate_a_[i];
   }
     
-  Offset& operator+= (Offset o) 
-  {
-    (*this)[X_AXIS] += o[X_AXIS];
-    (*this)[Y_AXIS] += o[Y_AXIS];
+  Offset& operator+= (Offset o) {
+ (*this)[X_AXIS] += o[X_AXIS];
+ (*this)[Y_AXIS] += o[Y_AXIS];
     return *this;
   }
-
-  Offset operator - () const 
-  {
+  Offset operator - () const {
     Offset o = *this;
     
     o[X_AXIS]  = - o[X_AXIS];
     o[Y_AXIS]  = - o[Y_AXIS];
     return o;
   }
-
-  Offset& operator-= (Offset o) 
-  {
-    (*this)[X_AXIS] -= o[X_AXIS];
-    (*this)[Y_AXIS] -= o[Y_AXIS];
+  Offset& operator-= (Offset o) {
+ (*this)[X_AXIS] -= o[X_AXIS];
+ (*this)[Y_AXIS] -= o[Y_AXIS];
 
     return *this;
   }
   
-  Offset &scale (Offset o) 
-  {
-    (*this)[X_AXIS] *= o[X_AXIS];
-    (*this)[Y_AXIS] *= o[Y_AXIS];
+  Offset &scale (Offset o) {
+ (*this)[X_AXIS] *= o[X_AXIS];
+ (*this)[Y_AXIS] *= o[Y_AXIS];
 
     return *this;
   }
-
-  Offset &operator *= (Real a) 
-  {
-    (*this)[X_AXIS] *= a;
-    (*this)[Y_AXIS] *= a;
+  Offset &operator *= (Real a) {
+ (*this)[X_AXIS] *= a;
+ (*this)[Y_AXIS] *= a;
 
     return *this;
   }
       
-  Offset (Real ix , Real iy) 
-  {
+  Offset (Real ix , Real iy) {
     coordinate_a_[X_AXIS] =ix;
     coordinate_a_[Y_AXIS] =iy;    
   }
-
-  Offset () 
-  {
-    coordinate_a_[X_AXIS] = coordinate_a_[Y_AXIS]= 0.0;
+  Offset () {
+    coordinate_a_[X_AXIS]=
+      coordinate_a_[Y_AXIS]=
+      0.0;
   }
 
   String to_string () const;
 
-  Offset& mirror (Axis a)
-  {
-    coordinate_a_[a] = - coordinate_a_[a];
-    return *this;
-  }
-  
+  void mirror (Axis);
   Real  arg () const;
   Real length () const;
-
-  //wtf, How is Offset a Complex? is this used?
-  Offset operator *= (Offset z2) 
-  {
+  Offset operator *= (Offset z2) {
     *this = complex_multiply (*this,z2);
     return *this;
   }
@@ -127,14 +104,7 @@ operator* (Offset o1, Real o2)
   return o1;
 }
 
-inline Offset
-mirror (Offset o, Axis a)
-{
-  o.mirror (a);
-  return o;
-}
-
 
-#endif /* OFFSET_HH */
+#endif // OFFSET_HH
 
 
index 4e06820c042f9a4835646764d2aa3010a8dd7906..bee1cf986ac95558336b8af935a93753b532bb47 100644 (file)
@@ -172,7 +172,7 @@ inline String to_string (String s) { return s; }
 /// "cccc"
 String to_string (char c, int n = 1);
 String to_string (int i, char const* format = 0);
-String to_string (double f, char const* format = 0);
+String to_string (double f , char const* format = 0);
 String to_string (long  b);
 String to_string (bool b);
 String to_string (char const* format, ... );
index 05642bee82c6bfbd7a9bfc79e6ec687549bb2410..d466eee89f3c782d624ef8306e8a07223e9478a2 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <typeinfo>
 
-#define classname(class_ptr) demangle_classname (typeid (*(class_ptr)))
+#define classname(class_ptr)   demangle_classname (typeid (* (class_ptr)))
 
 const char *
 demangle_classname (std::type_info const &);
index e58ed4887af021154f04383ea6a9986a5289860d..f56757f00cb1e1808b0fa7e2fc301b7cce329ce2 100644 (file)
@@ -6,17 +6,14 @@
   (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
+
 #ifndef WARN_HH
 #define WARN_HH
 
 #include "string.hh"
 
-void error (String message_string);
-void message (String s);
-void non_fatal_error (String);
 void programming_error (String s);
 void warning (String message_string);
-
-#define progress_indication message
-
-#endif /* WARN_HH */
+void error (String message_string);
+void non_fatal_error (String);
+#endif // WARN_HH
index 41eb841c244b925e5679cad9cb43390afb6643cb..dd205661fc87aae4295286ced62bf8741322695e 100644 (file)
@@ -91,3 +91,8 @@ Offset::length () const
 {
   return sqrt (sqr (coordinate_a_[X_AXIS]) + sqr (coordinate_a_[Y_AXIS]));
 }
+void
+Offset::mirror (Axis a)
+{
+  coordinate_a_[a] = - coordinate_a_[a];
+}
index 874371a42bd8c7f5e50a35cf0972657df25d4765..2634ab1e20c5393cec7417550c52deacb38613b5 100644 (file)
@@ -77,9 +77,6 @@ Morten Welinder <terra@diku.dk> September 1999.
 #include "parse-afm.hh"
 #include "warn.hh"
 
-#define METATYPE1_BUG   /* Parse Metatype1's (version unknown)
-                          'Generated' global tag as comment. */
-
 #define lineterm EOL   /* line terminating character */
 #define lineterm_alt '\r' /* alternative line terminating character */
 #define normalEOF 1    /* return code from parsing routines used only */
@@ -117,11 +114,7 @@ enum parseKey {
   ASCENDER, CHARBBOX, CODE, COMPCHAR, CAPHEIGHT, COMMENT, 
   DESCENDER, ENCODINGSCHEME, ENDCHARMETRICS, ENDCOMPOSITES, 
   ENDFONTMETRICS, ENDKERNDATA, ENDKERNPAIRS, ENDTRACKKERN, 
-  FAMILYNAME, FONTBBOX, FONTNAME, FULLNAME,
-#ifdef METATYPE1_BUG 
-  GENERATED,
-#endif
-  ISFIXEDPITCH, 
+  FAMILYNAME, FONTBBOX, FONTNAME, FULLNAME, ISFIXEDPITCH, 
   ITALICANGLE, KERNPAIR, KERNPAIRXAMT, LIGATURE, CHARNAME, 
   NOTICE, COMPCHARPIECE, STARTCHARMETRICS, STARTCOMPOSITES, 
   STARTFONTMETRICS, STARTKERNDATA, STARTKERNPAIRS, 
@@ -146,11 +139,7 @@ static char *keyStrings[] = {
   "Ascender", "B", "C", "CC", "CapHeight", "Comment",
   "Descender", "EncodingScheme", "EndCharMetrics", "EndComposites", 
   "EndFontMetrics", "EndKernData", "EndKernPairs", "EndTrackKern", 
-  "FamilyName", "FontBBox", "FontName", "FullName",
-#ifdef METATYPE1_BUG
-  "Generated",
-#endif  
-  "IsFixedPitch", 
+  "FamilyName", "FontBBox", "FontName", "FullName", "IsFixedPitch", 
   "ItalicAngle", "KP", "KPX", "L", "N", 
   "Notice", "PCC", "StartCharMetrics", "StartComposites", 
   "StartFontMetrics", "StartKernData", "StartKernPairs", 
@@ -168,8 +157,7 @@ static char *keyStrings[] = {
  *  reads all tokens until the next end-of-line.
  */
  
-static char*
-token (FILE *stream)
+static char *token (FILE *stream)
 {
   int ch, idx;
 
@@ -204,8 +192,7 @@ token (FILE *stream)
  *  more than one word (like Comment lines and FullName).
  */
 
-static char*
-linetoken (FILE *stream)
+static char *linetoken (FILE *stream)
 {
   int ch, idx;
 
@@ -237,8 +224,7 @@ linetoken (FILE *stream)
  *  The algorithm is a standard Knuth binary search.
  */
 
-static enum parseKey
-recognize (register char *ident)
+static enum parseKey recognize (  register char *ident)
 {
   int lower = 0,
     upper = (int) NOPE,
@@ -249,23 +235,17 @@ recognize (register char *ident)
   while ((upper >= lower) && !found)
     {
       midpoint = (lower + upper)/2;
-      if (keyStrings[midpoint] == NULL)
-       break;
+      if (keyStrings[midpoint] == NULL) break;
       cmpvalue = strncmp (ident, keyStrings[midpoint], MAX_NAME);
-      if (cmpvalue == 0)
-       found = TRUE;
-      else
-       if (cmpvalue < 0)
-         upper = midpoint - 1;
-      else
-       lower = midpoint + 1;
-    }
+      if (cmpvalue == 0) found = TRUE;
+      else if (cmpvalue < 0) upper = midpoint - 1;
+      else lower = midpoint + 1;
+    } /* while */
 
-  if (found)
-    return (enum parseKey) midpoint;
-  else
-    return NOPE;
-}
+  if (found) return (enum parseKey) midpoint;
+  else return NOPE;
+    
+} /* recognize */
 
 
 /************************* parseGlobals *****************************/
@@ -289,8 +269,7 @@ recognize (register char *ident)
  *  parseFile to determine if there is more file to parse.
  */
  
-static BOOL
-parseGlobals (FILE *fp, register AFM_GlobalFontInfo *gfi)
+static BOOL parseGlobals (FILE *fp, register AFM_GlobalFontInfo *gfi)
 {  
   BOOL cont = TRUE, save = (gfi != NULL);
   int error = AFM_ok;
@@ -333,9 +312,6 @@ parseGlobals (FILE *fp, register AFM_GlobalFontInfo *gfi)
            strcpy (gfi->afmVersion, keyword);
            break;
          case COMMENT:
-#ifdef METATYPE1_BUG       
-         case GENERATED:
-#endif     
            keyword = linetoken (fp);
            break;
          case FONTNAME:
@@ -439,7 +415,7 @@ parseGlobals (FILE *fp, register AFM_GlobalFontInfo *gfi)
 } /* parseGlobals */    
 
 
-#if 0
+
 /************************* initializeArray ************************/
 
 /*  Unmapped character codes are (at Adobe Systems) assigned the
@@ -458,8 +434,7 @@ parseGlobals (FILE *fp, register AFM_GlobalFontInfo *gfi)
  *  file is reset to be where it was upon entering this function.
  */
  
-static int
-initializeArray (FILE *fp, register int *cwi)
+static int initializeArray (FILE *fp, register int *cwi)
 {  
   BOOL cont = TRUE, found = FALSE;
   long opos = ftell (fp);
@@ -518,7 +493,7 @@ initializeArray (FILE *fp, register int *cwi)
   return (error);
         
 } /* initializeArray */    
-#endif 
+
 
 /************************* parseCharWidths **************************/
 
@@ -540,8 +515,7 @@ initializeArray (FILE *fp, register int *cwi)
  *  parseFile to determine if there is more file to parse.
  */
  
-static int
-parseCharWidths (FILE *fp, register int *cwi)
+static int parseCharWidths (FILE *fp, register int *cwi)
 {  
   BOOL cont = TRUE, save = (cwi != NULL);
   int pos = 0, error = AFM_ok;
@@ -640,8 +614,7 @@ parseCharWidths (FILE *fp, register int *cwi)
  *  parseFile to determine if there is more file to parse.
  */
  
-static int
-parseCharMetrics (FILE *fp, register AFM_Font_info *fi)
+static int parseCharMetrics (FILE *fp, register AFM_Font_info *fi)
 {  
   BOOL cont = TRUE, firstTime = TRUE;
   int error = AFM_ok, count = 0;
@@ -760,8 +733,7 @@ parseCharMetrics (FILE *fp, register AFM_Font_info *fi)
  *  parseFile to determine if there is more file to parse.
  */
  
-static int
-parseAFM_TrackKernData (FILE *fp, register AFM_Font_info *fi)
+static int parseAFM_TrackKernData (FILE *fp, register AFM_Font_info *fi)
 {  
   BOOL cont = TRUE, save = (fi->tkd != NULL);
   int pos = 0, error = AFM_ok, tcount = 0;
@@ -798,9 +770,6 @@ parseAFM_TrackKernData (FILE *fp, register AFM_Font_info *fi)
        switch (recognize (keyword))
          {
          case COMMENT:
-#ifdef METATYPE1_BUG       
-         case GENERATED:
-#endif     
            keyword = linetoken (fp);
            break;
          case TRACKKERN:
@@ -866,8 +835,7 @@ parseAFM_TrackKernData (FILE *fp, register AFM_Font_info *fi)
  *  parseFile to determine if there is more file to parse.
  */
  
-static int
-parseAFM_PairKernData (FILE *fp, register AFM_Font_info *fi)
+static int parseAFM_PairKernData (FILE *fp, register AFM_Font_info *fi)
 {  
   BOOL cont = TRUE, save = (fi->pkd != NULL);
   int pos = 0, error = AFM_ok, pcount = 0;
@@ -991,8 +959,7 @@ parseAFM_PairKernData (FILE *fp, register AFM_Font_info *fi)
  *  parseFile to determine if there is more file to parse.
  */
  
-static int
-parseAFM_CompCharData (FILE *fp, register AFM_Font_info *fi)
+static int parseAFM_CompCharData (FILE *fp, register AFM_Font_info *fi)
 {  
   BOOL cont = TRUE, firstTime = TRUE, save = (fi->ccd != NULL);
   int pos = 0, j = 0, error = AFM_ok, ccount = 0, pcount = 0;
@@ -1186,8 +1153,7 @@ AFM_free (AFM_Font_info *fi)
  *  pointer upon return of this function is undefined.
  */
 
-int
-AFM_parseFile (FILE *fp, AFM_Font_info **fi, int flags)
+extern int AFM_parseFile (FILE *fp, AFM_Font_info **fi, int flags)
 {
     
   int code = AFM_ok;   /* return code from each of the parsing routines */
@@ -1199,28 +1165,15 @@ AFM_parseFile (FILE *fp, AFM_Font_info **fi, int flags)
   /* storage data for the global variable ident */                           
   if (!ident)
     ident = (char *) calloc (MAX_NAME, sizeof (char)); 
-  if (ident == NULL)
-    {
-      error = AFM_storageProblem;
-      return error;
-    }
-
+  if (ident == NULL) {error = AFM_storageProblem; return (error);}      
+  
   (*fi) = (AFM_Font_info *) calloc (1, sizeof (AFM_Font_info));
-  if ((*fi) == NULL)
-    {
-      error = AFM_storageProblem;
-      return error;
-    }      
+  if ((*fi) == NULL) {error = AFM_storageProblem; return (error);}      
   
   if (flags & P_G) 
     {
-      (*fi)->gfi = (AFM_GlobalFontInfo *) calloc (1,
-                                                 sizeof (AFM_GlobalFontInfo));
-      if ((*fi)->gfi == NULL)
-       {
-         error = AFM_storageProblem;
-         return error;
-       }      
+      (*fi)->gfi = (AFM_GlobalFontInfo *) calloc (1, sizeof (AFM_GlobalFontInfo));
+      if ((*fi)->gfi == NULL) {error = AFM_storageProblem; return (error);}      
     }
     
   /* The AFM File begins with Global Font Information. This section */
@@ -1245,11 +1198,11 @@ AFM_parseFile (FILE *fp, AFM_Font_info **fi, int flags)
         {
          (*fi)->cmi = (AFM_CharMetricInfo *) 
            calloc ((*fi)->numOfChars, sizeof (AFM_CharMetricInfo));
-         if ((*fi)->cmi == NULL)
-           {
-             error = AFM_storageProblem;
-             return error;
-           }
+         if ((*fi)->cmi == NULL) {
+           error = AFM_storageProblem;
+           return (error);
+
+         }
          code = parseCharMetrics (fp, *fi);             
         }
       else
index 98769fc241f2f5676b1746d395aac3a53eba1824..8bd71328cbb8907a6233a9eb2fb8b41f71631f04 100644 (file)
@@ -11,6 +11,7 @@
 
 #include "warn.hh"
 
+
 void
 message (String s)
 {
index 60b44ff8b73a950d4df0260602fd480f28d62af7..f928659815b36f278060c5156585aad1e4ef268d 100644 (file)
@@ -1,8 +1,8 @@
 depth = ..
 
-SUBDIRS = test regression tutorial no-notation template mutopia 
+SUBDIRS=test regression tutorial no-notation template mutopia 
 
-examples = simple simple-song les-nereides puer-fragment wilhelmus paddy
+examples= les-nereides puer-fragment wilhelmus
 
 LOCALSTEPMAKE_TEMPLATES=ly mutopia
 EXTRA_DIST_FILES=paddy.abc
index 2b0d81953c32c2dd446857b93d91ad4cb52c7104..544b3a96d9de91e804967ca8e00a8cb7ac5b3aba 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 % A simple scale in LilyPond
 %
@@ -14,7 +14,7 @@
 %% 
 
 \score { 
-  \context Voice \relative c {
+  \context Voice \notes\relative c {
     c' d e f g a b c
   }
   \paper {  }  
index 223b70b958a2a923f40d944071abb68ed7fe6c35..47008042318080f5c9919886f0294dcbaa406919 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 % Some beamed and slurred notes of different taste in LilyPond
 %
 % Type:
@@ -13,7 +13,7 @@
 %% 
 
 \score { 
-  \context Voice \relative c {
+  \context Voice \notes\relative c {
     a''2 ~ a4( e8[ )e] a,16[ a a a]
   }
   \paper {  }  
index 436457e3883e96eaad98c20498271cd83225d59f..7dd92ae7bc088e3d59933fa6bc896ba6c9da747b 100644 (file)
@@ -1,11 +1,11 @@
 #(ly:set-option 'old-relative)
-\version "2.3.4"
+\version "2.2.0"
 
-one = \relative c{
+one = \notes\relative c{
        c'' d e f
 }
 
-two = \relative c{
+two = \notes\relative c{
        \clef "bass"
        c'2 g2
 }
index d8ee23019ea9748ae83a6b87554b6c5207aee9a6..6c2dbe6bdbae89cd130160c52fb5dafab6452887 100644 (file)
@@ -1,6 +1,6 @@
 #(ly:set-option 'old-relative)
-\version "2.3.4"
-\encoding "latin1"
+\version "2.2.0"
+
 \header {
     composer = "ARTHUR GRAY"
     title = "LES NÉRÉIDES"
@@ -32,7 +32,7 @@ possibly more impressive to render without tweaks?
   (lambda (elt) (equal? text (ly:get-grob-property elt 'text))))
 
 
-treble = \new Voice \relative c''{
+treble = \new Voice \notes\relative c''{
     \key a \major
     r2
     | %2
@@ -97,7 +97,7 @@ treble = \new Voice \relative c''{
     \bar "||"
 }
 
-trebleTwo = \new Voice \relative c''{
+trebleTwo = \new Voice \notes\relative c''{
     \stemDown
     \slurDown
     % \fingerDown
@@ -122,7 +122,7 @@ trebleTwo = \new Voice \relative c''{
     <a cis,>)]
 }
 
-bass = \new Voice \relative c{
+bass = \new Voice \notes\relative c{
     \partial 2
     \key a \major
     
@@ -223,7 +223,7 @@ bass = \new Voice \relative c{
     a)]
 }
 
-bassTwo = \new Voice \relative c{
+bassTwo = \new Voice \notes\relative c{
     \skip 2
     \skip 1*2
     \skip 2
@@ -234,7 +234,7 @@ bassTwo = \new Voice \relative c{
     cis'4( bis)
 }
 
-middleDynamics = {
+middleDynamics = \notes{
     \override Dynamics.TextScript  #'padding = #-1 %tweak
     s2
     s1*2
@@ -262,7 +262,8 @@ middleDynamics = {
     s8\!
 }
 
-theScore = \score{
+
+\score{
     \context PianoStaff <<
         \context Staff=treble <<
            \treble
@@ -279,7 +280,7 @@ theScore = \score{
     >>
     \paper {
        \context {
-           \Score
+           \ScoreContext
            pedalSustainStrings = #'("Ped." "*Ped." "*")
            \remove Bar_number_engraver
         }
@@ -302,17 +303,13 @@ theScore = \score{
        }
 
        \context {
-           \PianoStaff
+           \PianoStaffContext
            \accepts Dynamics
            \override VerticalAlignment #'forced-distance = #7
         }
     }
 }
-                          
-\book{
-    \score { \theScore }
-}
-    
+
 %%% Local variables:
 %%% LilyPond-indent-level:4
 %%% End:
index 43b9945db96da93432770f05b0afd316c8ff3e9e..a680b952c93845f084b93d14d42873ece844d5ed 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
   title =      "Title"
   subtitle =   "Subtitle"
index 440503a804926ca6641576302b67654422601f0d..fc0087025d900216b4e9d708cb1a75e42ace29c8 100644 (file)
@@ -7,11 +7,11 @@
   copyright = "Public Domain"
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
 \include "nederlands.ly"
 
-global =  {
+global = \notes {
   \key a \minor
   \time 2/4
   s2*10
@@ -32,7 +32,7 @@ global =  {
   \bar "|."
 }
   
-i = \context Staff \relative c''{
+i = \context Staff \notes\relative c''{
   \context Voice=i
   \voiceOne
 
@@ -60,7 +60,7 @@ i = \context Staff \relative c''{
   
 }
 
-ii = \context Staff \relative c'{
+ii = \context Staff \notes\relative c'{
   \context Voice=ii
   \voiceTwo
 
@@ -98,7 +98,7 @@ ii = \context Staff \relative c'{
  
 }
 
-lower = \context Staff  \relative c{
+lower = \context Staff \notes \relative c{
   \context Voice=iii
 
   <as as'>4 <es es'> | r <as as'> | <des, des'> <f f'> | <c c'> r |
@@ -146,7 +146,7 @@ lower = \context Staff  \relative c{
 
   \paper {
     \context{
-           \Voice
+           \VoiceContext
     }
   }
   \midi {
index 098897324fda759d4411739555d3ee8698a7e273..0f6401914f6654251f2139c5b222d7839188cb64 100644 (file)
@@ -27,15 +27,13 @@ been lowered
 
 }
 
-\version "2.3.4"
+\version "2.2.0"
 manuscriptBreak = { \break }
 
 
 
-#(set-global-staff-size (/ (* 5.8 72.27) 25.4))
-
-\bookpaper  {
-%#(set-global-staff-size (* 5.8 mm))
+\paper  {
+    #(paper-set-staff-size (* 5.8 mm))
     linewidth = #(* mm 160)
     indent = 8\mm
     interscoreline = 2.\mm
@@ -48,7 +46,7 @@ modernAccidentals = {
 }
 
 
-melody =    \relative c'' \repeat volta 2 \context Voice = singer {
+melody = \notes   \relative c'' \repeat volta 2 \context Voice = singer {
     \time 6/8
     \autoBeamOff
     s1*0^\markup { \bold \large\bigger\bigger { \hspace #-3.0 Lieblich, etwas geschwind } }
@@ -104,7 +102,7 @@ secondVerse = \lyrics {
     zieht mich him -- mel -- wärts, Sehn -- sucht zieht mich him -- mel -- wärts.
     }
 
-pianoRH =  \relative c''' \repeat volta 2 {
+pianoRH = \notes \relative c''' \repeat volta 2 {
     #(set-accidental-style 'modern)
     g16(_\p fis a g fis g f e d c b a ) | 
     <g e>8( <es fis a> <d f b> <c e c'>) r8 r | 
@@ -125,7 +123,7 @@ pianoRH =  \relative c''' \repeat volta 2 {
     <c c'>8 r r <c, g e>8 r r\fermata |  
 }
 
-pianoLH =  \relative c'' \repeat volta 2 {
+pianoLH = \notes \relative c'' \repeat volta 2 {
     #(set-accidental-style 'modern)
     g16( fis a g fis g f e d c b a) | 
     \clef bass g4.( c,8) r r
@@ -148,7 +146,7 @@ pianoLH =  \relative c'' \repeat volta 2 {
     <c g e c>8 <c e g> <c e g>     <c e g> <c e g> <c e g> |
     <c e g> r r <c, c,>8 r r\fermata \clef treble
     }
-\book {
+
 \score {
 
     << \time 6/8
@@ -168,27 +166,25 @@ pianoLH =  \relative c'' \repeat volta 2 {
 
     \paper {
        \context {
-           \Lyrics
+           \LyricsContext
            minimumVerticalExtent = #'(-1.0 . 0)
        }
        \context {
-           \Score
+           \ScoreContext
            \override Beam #'thickness = #0.55
            \override SpacingSpanner #'spacing-increment = #1.0
            \override Slur #'height-limit = #1.5
        }
        \context {
-           \PianoStaff
+           \PianoStaffContext
            \override VerticalAlignment #'forced-distance = #10
        }
        \context {
-           \Staff
+           \StaffContext
            minimumVerticalExtent = #'(-3. . 6)
        }
-       inputencoding = #"latin1"
     }
     \midi {
        \tempo 4 = 70
        }
 }
-}
index 774fe7bbdde2fd2e7920ceb8c2866373c7ea47d5..95084af35d4a089b4d0d1f4e5f6897ff3e9b2db2 100644 (file)
@@ -42,14 +42,14 @@ instrument = "Piano"
  footer = "Mutopia-2001/04/27-xx"
 } 
 
-\version "2.3.4"
+\version "2.2.0"
 
 dynamicUp = \override DynamicLineSpanner  #'direction = #1
 dynamicRevert = \revert DynamicLineSpanner #'direction
 
 #(set-global-staff-size 16)
 
-vocalVerse = \relative c''{
+vocalVerse = \notes\relative c''{
        \dynamicUp
        \times 2/3 {  g8[(  as)] g } c4. g8 |
        \times 2/3 {  f8[(  g)] f } c'4 f,8 r |
@@ -90,7 +90,7 @@ vocalVerse = \relative c''{
        c!2. |
 }
 
-vocalThrough = \relative c{
+vocalThrough = \notes\relative c{
        \dynamicUp
        g''8. g16 b8. b16 d8. d16 |
        c4 b r |
@@ -155,14 +155,14 @@ lyricThrough = \lyrics{
        be -- glük -- ke mich!
 }
 
-trebleIntro = \relative c{
+trebleIntro = \notes\relative c{
        r8^"\bf Mäßig"\pp <g' c>-. <c es>-. <g c>-. <c es>-. <g c>-. |
        r8 <as c>-. <c es>-. <as c>-. <c es>-. <as c>-. |
        r8 <as c>-. <c d>-. <as c>-. <c d>-. <as c>-. |
        r8 <g b>-. <b d>-. <g b>-. <b d>-. <g b>-. |
 }
 
-trebleVerseOne = \relative c{
+trebleVerseOne = \notes\relative c{
        %5
        r8 <g' c> <c es> <g c> <c es> <g c> |
        r8 <f c'> <c' d> <f, c'> <c' d> <f, c'> |
@@ -210,7 +210,7 @@ trebleVerseOne = \relative c{
        <a a'>4.-> <f f'>8)  |
 }
 
-trebleEentje =  \relative c' \context Voice {
+trebleEentje = \notes \relative c' \context Voice {
        \stemBoth
        <e e'>2 r4 |
        <f as!>2\(\mf <as c>8.(-> <f as>16)\) |
@@ -225,7 +225,7 @@ trebleEentje =  \relative c' \context Voice {
        <e g>2 r4 |
 }
 
-trebleThrough =  \relative c'{
+trebleThrough = \notes \relative c'{
        \stemBoth
        <e e'>2. |
        %61
@@ -278,7 +278,7 @@ trebleThrough =  \relative c'{
        <g e' g>2.\fermata |
 }
 
-bassIntro = \relative c{
+bassIntro = \notes\relative c{
        \dynamicUp
 %1
        <c, c'>2 r4 |
@@ -287,7 +287,7 @@ bassIntro = \relative c{
        <g g'>2 r4 |
 }
 
-bassVerseOne = \relative c{
+bassVerseOne = \notes\relative c{
 %      \clef bass
        \dynamicUp
 %5
@@ -319,7 +319,7 @@ bassVerseOne = \relative c{
        c,8 <c' e g>[ <e g c> <c e g> <e g c> <c e g>] |
 }
 
-bassEentje = \relative c{
+bassEentje = \notes\relative c{
        \dynamicUp
        <c, c'>8 <c' f as!>[ <f as c> <c f as> <f as c> <c f as>] |
        c,8 <c' e g>[ <e g c> <c e g> <e g c> <c e g>] |
@@ -331,7 +331,7 @@ bassEentje = \relative c{
        c,8 <e' g>[ <g c> <e g> <g c> <e g>] |
 }
 
-bassThrough = \relative c{
+bassThrough = \notes\relative c{
        \dynamicUp
        %61
        <g, g'>8^"cresc." <g' b d>[ <b d f> <g b d> <as! b d >-> <b d f>] |
@@ -365,7 +365,7 @@ bassThrough = \relative c{
        <c, g' c>2._\fermata |
 }
                
-global = {
+global = \notes{
        \time 3/4 
        \key es \major
        \skip 1 * 3/4 * 4
@@ -388,7 +388,7 @@ allLyrics = {
            \lyricThrough 
 } }
 
-vocals = \context Voice = leise  {
+vocals = \context Voice = leise \notes {
        \clef treble
        % certainly no auto-beaming for vocals
        \autoBeamOff
index 0e42c30e38354d4ccab92a83759a943ce195c957..7eb66e92c79fc3ea74a302de9025bb2cac88dc32 100644 (file)
@@ -1,8 +1,8 @@
-\version "2.3.4"
+\version "2.2.0"
 
 % #(ly:set-point-and-click 'line-column)
 
-forcedLastBreak =  { \break }
+forcedLastBreak = \notes { \break }
 
 %% We want this to perfectly match the Baerenreiter spacing.
 %% If we're not using 6 systems, there's definately a problem.
@@ -46,7 +46,7 @@ half way in measure 13 has been forgotten.
 }
 
 
-sarabandeA =  \context Voice  \relative c {
+sarabandeA =  \context Voice \notes \relative c {
   \override Staff.NoteCollision  #'merge-differently-dotted = ##t
 
   
@@ -128,7 +128,7 @@ sarabandeA =  \context Voice  \relative c {
 }
 
 
-sarabandeCelloGlobal = {
+sarabandeCelloGlobal = \notes{
   \time 3/4
   \key f \major
   \clef bass
@@ -139,7 +139,7 @@ sarabandeCelloGlobal = {
   }
 }
 
-sarabandeCelloScripts = {
+sarabandeCelloScripts = \notes{
 }
 
 sarabandeCelloStaff = \context Staff <<
@@ -150,11 +150,11 @@ sarabandeCelloStaff = \context Staff <<
 
 % size perversions
 smallerPaper = \paper {
-    \context { \Staff
+    \context { \StaffContext
                  fontSize = #-1
                  \override StaffSymbol  #'staff-space = #0.8
                  }
-    \context { \Score
+    \context { \ScoreContext
                   \override SpacingSpanner #'spacing-increment = #0.96
                }
        
@@ -165,16 +165,14 @@ smallerPaper = \paper {
 baerPaper = \paper {
     indent = 7. \mm
     linewidth =183.5 \mm
-%    interscoreline=4.0\mm
+    interscoreline=4.0\mm
     \context {
-            \Score
+            \ScoreContext
 %           \override System #'print-function = #box-grob-stencil
     }
 }
 
-\bookpaper {
-  raggedbottom = ##t
-}
+
 \score{
   \sarabandeCelloStaff
   \paper{
index 3d1a92a43a31df227a0503d273de3f19e861b31d..9c4f05e41748dc9b088e92c188f3b5bae9e22189 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.3.4"
+\version "2.2.0"
 
 %{
  Header for Petites Preludes.
@@ -41,7 +41,7 @@
  footer = "Mutopia-2003/08/22-nr"
 }
 
-one = \relative c{
+one = \notes\relative c{
        \skip 1 |
        \stemUp
        r4 d''2 cis4 |
@@ -62,7 +62,7 @@ one = \relative c{
        \bar "|."
 }
 
-two = \relative c{
+two = \notes\relative c{
        r16 d'' c bes  a bes f g 
        a8.\mordent bes16  g8.\prall f16 |
        \stemDown
@@ -81,7 +81,7 @@ two = \relative c{
        fis1
 }
 
-three = \relative c{
+three = \notes\relative c{
        \stemUp
        f2 e |
        \stemBoth
@@ -104,7 +104,7 @@ three = \relative c{
        \bar "|."
 }
 
-four = \relative c{
+four = \notes\relative c{
        \stemDown 
        d2 cis |
        \skip 1*2 |
@@ -129,7 +129,7 @@ four = \relative c{
             >>
 }
 
-global = {
+global = \notes{
        \time 4/4
        \key f \major
 }
@@ -152,7 +152,7 @@ global = {
        \paper{
                linewidth = 17.0 \cm  
                \context {
-                   \Score
+                   \ScoreContext
                    \override SpacingSpanner #'spacing-increment = #2.0
                }
        }
index 4543041380952b70d6528c091ab035c461fe3aae..53e2c18de464a53dc90e56373ac3cfb2a6e214ff 100644 (file)
   style = "baroque"
   copyright = "Public Domain"
   maintainer = "hanwen@cs.uu.nl"
- %% TODO: handle \footer, \head[er] properly
-  footer = "Mutopia-2002/08/19-6"
-
-  tagline = \markup { \smaller
-      \column <
-          \fill-line < \footer "" >
-          \fill-line < { "This music is part of the Mutopia project, "
-                         \typewriter { "http://sca.uwaterloo.ca/Mutopia/" }
-                         "." } >
-          \fill-line < { "It has been typeset and placed in the public "
-                         "domain by "  \maintainer  "." } >
-          \fill-line < { "Unrestricted modification and redistribution "
-                         "is permitted and encouraged---copy this music "
-                         "and share it!" } >
-          >
-       }
+  mutopiapublicdomain = "\\parbox{\\hsize}{\\thefooter\\quad\\small
+    \\\\This music is part of the Mutopia project,
+    \\texttt{http://www.mutopiaproject.org/}\\\\It has been typeset
+    and placed in the public domain by " + \maintainer +
+    ".\\\\Unrestricted modification and redistribution is permitted
+    and encouraged---copy this music and share it.}"
+  tagline = \mutopiapublicdomain
   lastupdated = "2002/August/19"
+  footer = "Mutopia-2002/08/19-6"
 }
 
 
 %}
 
 
-\version "2.3.4"
+\version "2.2.0"
 
 
 
 
-dux = \context Voice=two  \relative c''{
+dux = \context Voice=two \notes \relative c''{
   \voiceTwo
   \clef violin
 
@@ -111,7 +103,7 @@ dux = \context Voice=two  \relative c''{
 }
 
 
-comes = \context Voice=one  \relative c'' {
+comes = \context Voice=one \notes \relative c'' {
   \voiceOne
   \override MultiMeasureRest  #'staff-position = #6 
   R1 |
@@ -153,7 +145,7 @@ comes = \context Voice=one  \relative c'' {
   f,16 g as4 g16 f e2 |
 }
 
-bassdux = \context Voice=three  \relative c' {
+bassdux = \context Voice=three \notes \relative c' {
   \clef bass
   R1 |
   R |
@@ -197,10 +189,9 @@ bassdux = \context Voice=three  \relative c' {
   >> 
 }
 
-
-\book {
 \score {
-     \context PianoStaff << 
+    \notes \context PianoStaff << 
         \override Score.TimeSignature  #'style = #'C
        \context Staff = treble <<
            \key c \minor
@@ -216,7 +207,7 @@ bassdux = \context Voice=three  \relative c' {
 
     \paper {
         linewidth = 18.0 \cm
-       \context { \Score
+       \context { \ScoreContext
        \override SpacingSpanner #'spacing-increment = #1.0
        \override SpacingSpanner #'shortest-duration-space = #1.9       
        }
@@ -230,4 +221,4 @@ bassdux = \context Voice=three  \relative c' {
     }
 }
 
-}
+
index 4caf07f3734fd496a3a5bbd62e9b9573c61b51fc..c211aa5c16b38f9a7cb6f61d51afc380895f40ff 100644 (file)
@@ -4,8 +4,7 @@
 \include "deutsch.ly"
 
 #(set-global-staff-size 16)
-
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
   title = "Romanzen"
 
 u = { \change Staff = up  \stemDown }
 m = { \change Staff = mid  \stemUp  }
-
-%
-% d = .. complains about note names.
-% 
-#(define d  #{ \change Staff = down  \stemUp #})
+d = { \change Staff = down  \stemUp }
 
 forcedBreak = \break
 
-global =  { \key fis \major \time 6/8
+global = \notes { \key fis \major \time 6/8
   \set Score.beatLength =  #(ly:make-moment 3 8)
   \repeat volta 2 { s2.*8 } s2.*26 \bar "|."
 }
 
-righta =  \transpose c cis' {
+righta = \notes \transpose c cis' {
  % \stemUp \slurUp \tieUp
  \stemUp
  \override Slur   #'attachment = #'(stem . stem)
@@ -92,7 +87,7 @@ righta =  \transpose c cis' {
 
 }
 
-rightb =  \transpose c cis' {
+rightb = \notes \transpose c cis' {
  \relative c { \stemDown \slurDown
   \repeat volta 2 {
    a4^1( g8^1 b4^1 a8^1 |
@@ -150,7 +145,7 @@ rightb =  \transpose c cis' {
  }
 }
 
-lefta =  \transpose c cis {
+lefta = \notes \transpose c cis {
  \stemUp \slurUp \tieUp
  \repeat volta 2 {
   f4^1( e8^1 g4^1 f8^1 |
@@ -203,7 +198,7 @@ lefta =  \transpose c cis {
  f~ f\fermata |
 }
 
-leftb =  \transpose c cis {
+leftb = \notes \transpose c cis {
  \stemDown \slurDown \tieDown
  \repeat volta 2 {
   f16^\p c f, c e c-3 g c-2 f, c f c |
@@ -241,7 +236,7 @@ leftb =  \transpose c cis {
  c c8 c c16 r4_\fermata r8 \bar "|." |
 }
 
-\score { 
+\score { \notes
   \context PianoStaff <<
     #(set-accidental-style 'piano-cautionary)
     \override PianoStaff.NoteCollision   #'merge-differently-dotted = ##t
@@ -283,11 +278,11 @@ leftb =  \transpose c cis {
       \RemoveEmptyStaffContext
     }
     \context {
-      \Score
+      \ScoreContext
       \override SpacingSpanner #'common-shortest-duration = #(ly:make-moment 1 8)
     }
     \context {
-      \PianoStaff
+      \PianoStaffContext
       \override VerticalAlignment #'forced-distance = #13.0
     }
   }
index f179d79adc713c8e418f62a0569280b8eeed0474..434b07ed7510368f28a00df6a70b0bb0954da90b 100644 (file)
@@ -44,7 +44,7 @@ virtuoso that taught in Geneva.
 
 %}
 
-\version "2.3.4"
+\version "2.2.0"
 
 \include "mozart-hrn3-defs.ly"
 \include "mozart-hrn3-allegro.ly"
@@ -53,33 +53,3 @@ virtuoso that taught in Geneva.
 
 
 
-
-\book {
-\score
-{
-        { \transpose c' bes \allegro }
-       \paper{ }
-       \header { piece = "allegro" opus = "" } 
-       \midi{ \tempo 4=90 }
-}
-
-
-\score
-{
-     { \transpose c' bes \romanze }
-       \header { piece = "romanze" opus = "" } 
-       \midi{ \tempo 4 = 70  }
-       \paper{}
-}
-
-
-\score
-{
-     { \transpose c' bes       \rondo }
-       \header { piece = "rondo" opus = "" }
-       \midi{ \tempo 4 = 100 }
-       \paper { }
-}
-
-
-}
index a1dbdcfd5c4bb179c4428e972687f7c74f07eb8b..06bd8ccab723f8728c4827e5bf78448818f642f9 100644 (file)
@@ -1,8 +1,9 @@
-\version "2.3.4"
+#(ly:set-option 'old-relative)
+\version "2.2.0"
 \include  "mozart-hrn3-defs.ly"
 
 allegro =
-       
+       \notes
        \relative c'
 {
        \time 4/4
@@ -193,3 +194,12 @@ allegro =
        
 }
 
+
+\score
+{
+       \notes { \transpose c' bes \allegro }
+       \paper{ }
+       \header { piece = "allegro" opus = "" } 
+       \midi{ \tempo 4=90 }
+}
+
index d33e8cb95163437dbc03d680bcf551e3f8a8b58f..74d1fad4e84b73566fbc3cb8f8a0f34a997d9422 100644 (file)
@@ -4,9 +4,9 @@ longgrace = \override Stem  #'stroke-style = #'()
 endlonggrace = \revert Stem #'stroke-style
 ritenuto = \markup { \italic  "rit." }
 
-\version "2.3.4"
+\version "2.2.0"
   
-cresc =  {
+cresc = \notes {
     #(ly:export (make-event-chord (list (make-span-event 'CrescendoEvent START)))) 
     \set crescendoText =  \markup { \italic \bold "cresc." }
     \set crescendoSpanner =  #'dashed-line
@@ -31,7 +31,7 @@ stopGraceMusic= \sequential {
 
 \paper{
     \context {
-        \Score
+        \ScoreContext
         skipBars = ##t
         midiInstrument = #"french horn"
         %% try to mimic Breitkopf
@@ -47,7 +47,7 @@ stopGraceMusic= \sequential {
         \override Slur #'beautiful = #0.3
     }
     \context {
-        \Staff
+        \StaffContext
         minimumVerticalExtent = #'(-4.5 . 4.5)
     }
     % #(define fonts my-sheet)
index 3ef82ba3b40950612e842aaef7052773c1662dcf..66afd7acc9157fecc1a7d9a08ccfb2599aaa156f 100644 (file)
@@ -1,7 +1,9 @@
-\version "2.3.4"
+#(ly:set-option 'old-relative)
+
+\version "2.2.0"
 \include  "mozart-hrn3-defs.ly"
 
-romanze =  \relative c' {
+romanze = \notes \relative c' {
        \key f \major
        \time 2/2
        \set Score.skipBars =  ##t
@@ -86,3 +88,12 @@ romanze =  \relative c' {
 }
 
 
+
+\score
+{
+    \notes { \transpose c' bes \romanze }
+       \header { piece = "romanze" opus = "" } 
+       \midi{ \tempo 4 = 70  }
+       \paper{}
+}
+
index 263cb0caeb28088a6f3ef4470bf14ea79453898b..e0b80bea9609f14b7fa997d49f5bd4e1a16e9a12 100644 (file)
@@ -1,8 +1,9 @@
-\version "2.3.4"
+#(ly:set-option 'old-relative)
+\version "2.2.0"
 
 % \include "mozart-hrn3-defs.ly"
 
-rondotheme =  \relative c' {
+rondotheme = \notes \relative c' {
         c'8[ c c]  c[ c c]
        c4( cis8  d) r g,
         d'8[ d d]  d[ d d]
@@ -13,7 +14,7 @@ rondotheme =  \relative c' {
        e4.( d8) r r |
 }
 
-lipbreaker =  \relative c'
+lipbreaker = \notes \relative c'
 {
        r8  g'[-. g-.]  c[( e) g,-.]
         c[( e) g,-.]  c[( e) g,-.]
@@ -28,7 +29,7 @@ leftsixteenth = { \set stemLeftBeamCount =  2
 bothsixteenth = { \set stemLeftBeamCount =  2
   \set stemRightBeamCount =  2 }
 
-rondo =        \relative c'
+rondo = \notes         \relative c'
 {
        \partial 8
        \time 6/8
@@ -39,7 +40,7 @@ rondo =       \relative c'
        \rondotheme
        
        R2.*13 |
-       r8 r^\fermata d'  d[ e f]
+       r8 r^\fermata d  d[ e f]
         g[ ( e) c-.]  d[( e) d-.]
        c4 c8  d[ e f]
         g[( e) c-.]  d[( e) d-.]
@@ -76,7 +77,7 @@ rondo =       \relative c'
         d[( g)] r r4 r8
        R2.*1
        \lipbreaker
-       c,,4 r8  c'[ d e]
+       c4 r8  c'[ d e]
        d4( g8)  c,[ d e]
        d4 r8 r4 r8
        R2. |
@@ -123,7 +124,7 @@ rondo =     \relative c'
        \mark "E"
        R2.*9  |
        \lipbreaker 
-       c,8[ c' c] c4.~
+       c8[ c' c] c4.~
        c8[ c d]  e[ e fis] 
        g4 r8 r4 r8
        R2.
@@ -193,3 +194,11 @@ rondo =    \relative c'
        c4 r8 r4 r8 \bar "|."           
 }
 
+\score
+{
+    \notes { \transpose c' bes \rondo }
+       \header { piece = "rondo" opus = "" }
+       \midi{ \tempo 4 = 100 }
+       \paper { }
+}
+
index 36e35aa318f679a7ed69be6e442ba5fe36853d6e..b3769b63767f11eea60ecc94ac0b693df281c3cd 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.3.2"
+\version "2.2.0"
 \header {
 texidoc = "@cindex Midi Volume Equaliser
 The full orchestra plays a notes, where groups stop one after
index 79ec1d3ce4389bdf905b9339fa1d6ae8a5ed53eb..388c95e1041f939fb2390535c48e406748db1af7 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.2"
+\version "2.2.0"
 \header {
 
 texidoc = "The @code{Recording_group_engraver} will record events
@@ -15,7 +15,7 @@ theMusic = \context Staff \notes { c4 d8-. }
 
 listener = \paper {
  \context {
-   \Voice
+   \VoiceContext
    \type "Recording_group_engraver"
    recordEventSequence = #notice-the-events
  }
index 21865956cfd644a6ad7fe5f413eeed642f11f8e8..7a09b2942cfa51191be97f0c6363732a28c90db9 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
     title      = "Puer natus est nobis (excerptum)"
     subtitle   = "Antiphona ad introitum VII"
@@ -24,7 +24,7 @@ before the ligature (not demonstrated in this example)."
 %%% but this is intentional for editorial purposes (simplifies some
 %%% global search/replace operations in emacs).
 
-cantus = \context VaticanaVoice = "cantus"  {
+cantus = \context VaticanaVoice = "cantus" \notes {
   \[ g4\melisma %%% Pu-
     \pes
     d'\melismaEnd
@@ -93,7 +93,7 @@ verba = \context Lyrics = "verba" \lyrics {
     raggedright = ##t
     packed = ##t
     \context {
-      \Score
+      \ScoreContext
       \remove Bar_number_engraver
 %     \override SpacingSpanner #'spacing-increment = #0.5
       timing = ##f
index 6a085ac054fb4d49bd977ab91a000ff133445dac..801731a24badf1a7439eef8614a6dbabb492c642 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 %% +.ly: Be the first .ly file for lys-to-tely.py.
 %% Better to make lys-to-tely.py include "introduction.texi" or
 %% other .texi documents too?
index c98bd362b49ec0e0b4d81cf3776916d9ccc500bc..e940f5a9b0cd355d46e2bdafa070016dca2e5ddf 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
 texidoc = "Cautionary accidentals are indicated using either
@@ -9,7 +9,7 @@ parentheses (default) or smaller accidentals.
 }
 
 \score {
-     {
+    \notes {
     c''4
     cis''?4
     \override Staff.Accidental  #'cautionary-style = #'smaller
index 97ad3068a00d7f30f2321b85140a626c0291a02f..211d7801d5a23afb6cb856c999e917e4466d6929 100644 (file)
@@ -1,11 +1,11 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
        texidoc = "If two forced accidentals happen at the same time, only one
        sharp sign is printed."
 }
 
 
-\score {  \transpose c c'
+\score { \notes \transpose c c'
    \context Staff <<
      \key g \major
      \context Voice=va { \stemUp c' fis! }
index 5fe270b3842268640d660bcab5ff07e353f4de6d..8fd0f250096a7c6700862746929718baa8ccee24 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -10,7 +10,7 @@ and only if the accidental is horizontally close to the head.  "
 
 
 \score {
-    
+    \notes
        \relative c {
            disis
            dis
index 5101fc77a4cd143ae9564951e161a4a96618dd07..4716d74bd471d18288f5c481715fe58b7d369a67 100644 (file)
@@ -1,10 +1,10 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 texidoc="
-This shows how accidentals in different octaves are handled. The note names 
-are also automatically printed but the octavation has been dropped out.
+This shows how accidentals in different octaves are handled.
+(DOCME)
 "
 
 
@@ -12,7 +12,7 @@ are also automatically printed but the octavation has been dropped out.
 
 
 
-mel =  \transpose c c' {
+mel = \notes \transpose c c' {
   \time 4/4 \key d \major
   gis4 g' g gis' | gis2 g' | g1 | gis | g | gis' | g |
   fis4 f' f fis' | fis2 f' | f1 | fis | f | fis' | f |
index 4b3728c9b049bc936d69917d5668efe8a96f8c52..5f92ee050196e7d857c84af1ebaa44bea22f8e1c 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -12,7 +12,7 @@ flats in a sixth should be staggered.  "
 
 
 \score {
-     \context Voice \relative c'
+    \notes \context Voice \relative c'
     {
        cis4
        c4
index de1e84278634dc47b6a4e0da74b90f12e2f7144b..888cc09b6c42d20a29142b69edb9b775bbc3a5f2 100644 (file)
@@ -3,10 +3,10 @@
     texidoc = "Quarter tone notation is supported, including
     threequarters flat."
     }
-\version "2.3.4"
+\version "2.2.0"
 
 \score {
-     \relative c'' {
+    \notes \relative c'' {
        \time 12/4 
        ceses4
        ceseh
index 7fa9f88e2e7dad34af5f25b74941acd54dec5d61..6f3d31deaecf7d33ffc352ff851bceff25e67bee 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc="
 A sharp sign after a double sharp sign, as well as a flat sign
@@ -10,7 +10,7 @@ natural sign.
 
 
 
-thenotes =  \relative cis' { \time 4/4
+thenotes = \notes \relative cis' { \time 4/4
 gisis'4 gis gisis ges |
 }
 
index 2bd01ab6600972aac8322ed9fea6ef4d5192aeb6..e11a349addba21d8b010ae078d8e8d06c53c7dd7 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -9,7 +9,7 @@
 
 }
 
-mus =          \relative c' {
+mus = \notes   \relative c' {
     f1~
     f2~f4 % ~ f8
     fis8  gis8 ~
@@ -18,7 +18,7 @@ mus =         \relative c' {
 }
 
 \score {
-     <<
+    \notes <<
        \new NoteNames \mus
        \new Voice { \key g \major \mus }
     >>
index fd65e18a3d018ed776b95c98ddb3d34df54097f8..10b5b1a90ad8b26fd88871abc7d511a4ce711f05 100644 (file)
@@ -4,9 +4,9 @@ texidoc = "Tied accidentaled notes (which cause reminder accidentals) do not
 wreak havoc in the spacing when unbroken."
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
-rechts =  \relative c' {
+rechts = \notes \relative c' {
   \clef treble
   \time 3/4
     c8 b2  <g b des f>8 ~ |
index 24afacd265166cde8d5d87455037efe6cf206821..996e7a712772443be0d8a8e6775146d1869c18f1 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -11,18 +11,18 @@ The last f gets cautionary natural because fis was only in the other voice.
 
 
 
-voicea =  \transpose c c' {
+voicea = \notes \transpose c c' {
     \stemUp
     fis2 a2 f4 fis a2
 }
-voiceb =  \transpose c c' {
+voiceb = \notes \transpose c c' {
     \stemDown
     c2 fis2  f4 c   f2
 }
 
 \score {
     <<
-       
+       \notes
        \new NoteNames {
            \set printOctaveNames = ##f
             \voicea
index 8ab848e6329555e0c81bea5d869d0222da048d2b..b81b46ab30690d79201a13e1a8b9bc228fbe4ac8 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -8,7 +8,7 @@ fourth show forced and courtesy accidentals.
 "
 }
 
-foo = \relative c''   {   \key as \major dis4 dis dis!^"force" dis? }
+foo = \notes\relative c''   {   \key as \major dis4 dis dis!^"force" dis? }
 
 \score {
   << \foo 
index 8136dde6dd854aa1a230ab654799e3b0ec6367ac..e3d980b60b799e3d3e648f0c36ab54902c965239 100644 (file)
@@ -1,16 +1,16 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
 This shows how accidentals are handled.
 "
 }
-mel =  { \key d \major \time 4/4
+mel = \notes { \key d \major \time 4/4
  d4  dis dis8 dis, d4 | d dis disis8 d, dis4 | d des disis8 dis, d4 | dis deses d dis ~ | dis dis ~ dis8 d, dis4 ~ | \break
  dis dis cis c | c cis cisis cis | c ces cisis c | cis ceses c cis ~ | cis cis ~ cis cis \bar "|."  | \break
 }
 
-\score { 
+\score { \notes
  <<
   \context Staff \transpose c c'' \mel
   \context NoteNames{
index f0f56d73c8b35afab6356c89ccdb729eef408938..0c635bc1f4d58dddd7ed85d4c10f7f868de1cc6a 100644 (file)
@@ -24,7 +24,7 @@ paper block:
 
 @example
 \context @{
-  \Score
+  \ScoreContext
 \override BreakAlignment #'break-align-orders = #(make-vector 3 '(
     instrument-name
     left-edge
@@ -43,7 +43,7 @@ paper block:
  
 @example
 \context @{
-  \Voice
+  \VoiceContext
   \consists Ambitus_engraver
   Ambitus \set #'note-head-style = #'noteheads-2mensural
   Ambitus \set #'join-heads = ##f
@@ -52,9 +52,9 @@ paper block:
 
 
  %}
-\version "2.3.4"
+\version "2.2.0"
 
-upper =  \relative c {
+upper = \notes \relative c {
        \clef "treble"
        \key c \minor
        as'' c e bes f cis d e f g f e d f d e
@@ -62,7 +62,7 @@ upper =  \relative c {
        f d e e d f d e e d f d e e d f d e
 }
 
-lower =  \relative c {
+lower = \notes \relative c {
        \clef "treble"
        \key e \major
        e'2 b4 g a c es fis a cis b a g f e d
@@ -77,7 +77,7 @@ lower =  \relative c {
        >> }
        \paper {
               \context {
-                       \Score
+                       \ScoreContext
 \override BreakAlignment #'break-align-orders = #(make-vector 3 '(
                                instrument-name
                                left-edge
@@ -92,7 +92,7 @@ lower =  \relative c {
                        ))
                }
                \context {
-                       \Voice
+                       \VoiceContext
                        \consists Ambitus_engraver
                }
        }
index 7b838a5f1db71974680c8a959463f954b6665bb3..50a6807de6c6b00ca08f4103b59895109881721d 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 
 \header {
@@ -17,7 +17,7 @@ This example prints a bar-number during processing on stdout.
     \paper { raggedright= ##t }
 
 
-\score {  \relative c'' {
+\score { \notes \relative c'' {
     c1 c1
 
     %% todo: should put something interesting in the .tex output.
index ade644945deafb8fee497c8d0a7cc577828493fe..426e64f9f0c56e65edec5c78096c3fde805d6492 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4
+\version "2.2.0
 \header {
 
 texidoc = "The @code{\applyoutput} expression is the most flexible way to
@@ -35,7 +35,7 @@ position.
 
 \score {
 
- \context Voice \relative  c' {
+\notes \context Voice \relative  c' {
                                      \stemUp
                                      \set autoBeaming =  ##f
    { <d f g b>8
index d5070c5fdb067e94174752b5e7f1a2f622aa14a3..88f98b8ec875624958733df22a036d7500856e73 100644 (file)
@@ -1,6 +1,6 @@
 
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc="
 A square bracket on the left indicates that the player should not
@@ -9,7 +9,7 @@ arpeggiate the chord.
 }
 
 \score{
-     \relative c''{
+     \notes\relative c''{
         \arpeggioBracket
         
         <fis,  d a >\arpeggio
index b24a423e00b6c7fe8f9439a84041f7280f606e5e..e5b4a1451ab063915d070daf3d86ffa077bcef47 100644 (file)
@@ -1,11 +1,11 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header  {
 texidoc = "Arpeggio stays clear of accidentals and flipped note heads."
 }
 
 \score{
-     \transpose c c' {
+    \notes \transpose c c' {
        <fis'' g d a>\arpeggio
        <fis, g d a>\arpeggio
        <fis'' g d a>\arpeggio
@@ -13,7 +13,7 @@ texidoc = "Arpeggio stays clear of accidentals and flipped note heads."
     \paper {
         raggedright = ##t
        \context{
-           \Staff
+           \StaffContext
            connectArpeggios = ##t
        }
        }
index 31793723591d4408e5f4f24c7c44a5d1f1741b01..933d9615693edfa86547bf26c77ffd521d68bdc0 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc="
 Arpeggios are supported, both cross-staff and broken single staff.
@@ -9,7 +9,7 @@ Arpeggios are supported, both cross-staff and broken single staff.
 
 
 \score{
-    \context PianoStaff << 
+    \context PianoStaff\notes << 
         \new Staff \relative c''{
             <fis,  d a>\arpeggio
            \override Staff.Arpeggio  #'arpeggio-direction = #1 
index f7de9c2726f001b8b377e45ef4dbd48e2c8cf08a..d873cdb4664bf9f1ec5232513ad69330ee322241 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="No auto beams will be put over (manual) repeat bars."
 }
 
 \score {
-     {
+    \notes {
         \time 3/4
         a'4 b' c''8 \bar ":|:" d''8
     }
index 96c4c89a092000b6cc7cc163be52cebdadd316b5..721eaf858b73de86417778999e4b26ed829de453 100644 (file)
@@ -1,12 +1,12 @@
 \header {
     
     texidoc = "The autobeamer may be switched off for a single note
-    with @code{\\noBeam}."
+    with @code{\noBeam}."
 
 
     }
-\version "2.3.4"
+\version "2.2.0"
 
 \score {
-     { c8 c-\noBeam c c }
+    \notes { c8 c-\noBeam c c }
     }
index 26f548cc486e51e262110e183a15cb66027faad7..2c50be38513c131b932db58939d7d1851f3ae8ff 100644 (file)
@@ -4,10 +4,10 @@
 texidoc = "Automatic beaming is also done on tuplets."
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
 \score{
-       \relative c''{
+       \notes\relative c''{
                c8 c c c
                \times 4/6 { c c c c c c}
        }
index 6d8c392d4726a4503f3a55d5118772815e27e11a..051755937411840ea762fac3dc67e6f579fb9efb 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 texidoc = "Tuplet-spanner should not put (visible) brackets on
 beams even if they're auto generated."
 }
 
-\score {  \relative c' {
+\score { \notes \relative c' {
   \set tupletSpannerDuration = #(ly:make-moment 1 4)
   \override TupletBracket  #'bracket-visibility = #'if-no-beam
   \times 2/3 {
index e5e61b0ea6a28fe70a0fe460062e74cdc31561a2..ae32d9e77b50c1dafa43c67a511acd4f38e30430 100644 (file)
@@ -6,20 +6,20 @@ beam."
 
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
 
 
 \paper  { raggedright = ##t } 
 
 \score {
-   \relative c'' {
+  \notes \relative c'' {
     a\longa a\breve  
     a1 a2 a4 a8 a16 a32 a64 a64 
   }
   \paper {
     \context {
-      \Staff
+      \StaffContext
        \remove "Clef_engraver"
 %%     \remove "Staff_symbol_engraver"
     }
index 50baa2f03a9c74504de1e7722fad26e7851bf69a..61a65547344aa234d6d848886c03256839c65c64 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -12,7 +12,7 @@ note. When central C is reached, staff is not yet switched (by default).
     \paper { raggedright= ##t }
 
 \score {
-        \context PianoStaff <<
+       \notes \context PianoStaff <<
        \context Staff = "up" {
                \autochange  \context Voice = VA << \relative c' { g4 c e d c r4 a g } >>
        }
index 4c16136215a17ee0085309cd0303ecce509aecd4..fd71bbc544d845d22b81579ca6d5a61d763f5b6e 100644 (file)
@@ -3,10 +3,10 @@
     texidoc = "With balloon texts, objects in the output can be marked,
 with lines and explanatory text added."
     }
-\version "2.3.4"
+\version "2.2.0"
 
 \score  {
-  {
\notes {
      
    \relative c'  {
 
diff --git a/input/regression/bar-check-redefine.ly b/input/regression/bar-check-redefine.ly
deleted file mode 100644 (file)
index 24860d3..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-\version "2.3.4"
-\header {
-    texidoc = "The meaning of @code{|} is stored in the
-identifier @code{pipeSymbol}."
-}
-
-pipeSymbol = \bar "||"
-
-\score {
-      { c'2 | c'2 | }
-}
-    
index aea7fae8357e04a68934c67ac10ce5bc94d9c6f3..7e885973af41b8a7868d6913d1f7ca4b43cabb5f 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -13,7 +13,7 @@ be increased.
 }
 
 \score {
-   \relative c'' {
+  \notes \relative c'' {
       \partial 4 c4 
       c1 c c
       \set Score.currentBarNumber = #99999
@@ -23,7 +23,7 @@ be increased.
   \paper {
     raggedright = ##t
     \context {
-       \Score
+       \ScoreContext
        \override BarNumber #'break-visibility = #all-visible
     }
   }
index f4503aad37a50c278a46c13833f00282f38a1dec..dc76a86278f0db91c488540c1c3d3367af0ab624 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc="
 
@@ -8,13 +8,13 @@ Markings can be attached to (invisible) barlines.
 
 \paper { raggedright = ##t }
 
-onestaff = \new Staff\relative c''  {
+onestaff = \new Staff\notes\relative c''  {
        \set Staff.instr = instr
        \set Staff.instrument = instrument \mark "B"
         c1 \mark "A" \break c2  c2 \break
 }
 
-grstaff =  \relative c''
+grstaff = \notes \relative c''
 \context GrandStaff <<
        \new Staff {
 
index c85205e6094fe050ab5c4ff1ed63d56241d9ec0a..8b69c9e799bad10f61f192cdb9f87298e466ab15 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{ texidoc="A knee is made automatically when a horizontal
 beam fits in a gap between note heads that is larger than a predefined
@@ -8,7 +8,7 @@ threshold.
 }
 
 \score {
-  \context Staff \relative c''{ 
+  \context Staff \notes\relative c''{ 
      c'8[ c,,]  c8[ e']
      c,16[ e g c e g c c,,] 
   }
index 97a416583739f709eae69df8c9319222e776baf6..91f552a9833c4a9b571cfbc9805e47f369d49d58 100644 (file)
@@ -4,10 +4,10 @@
 "
 
 }
-\version "2.3.4"
+\version "2.2.0"
 \paper { raggedright= ##t }
 
-\score {  \relative c''  {
+\score { \notes \relative c''  {
     \set Score.allowBeamBreak = ##t
     \time 3/16 c16-[ d e \break f-] 
 }}
index f5850b24b4359e217c0915abb2749024542eab34..9515d68e701705f66390b15b8488a69abb63d317 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
 
     texidoc="Simple beams on middle staffline are allowed to be
@@ -9,7 +9,7 @@
 }
 
 \score{
-    \relative c'{
+    \notes\relative c'{
        %%\override Staff.Stem  #'beamed-lengths = #'(3.50)
        %%  c8[ d]
        %%  d[ c]
index b7c607b40bcb1ad602d95d6385deb92a038dbd87..936a9f6cf0cb0858343e25ccc1171c18dc7eeb85 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
 
 texidoc = "Concave beams should be horizontal. Informally spoken,
@@ -23,7 +23,7 @@ beams this way."
 
 
 \score{
-  \relative c'{
+  \notes\relative c'{
 
 %% This case seems easy: second beam should be horizontal.
     
index c05e7598a3f2aefff3f546f35423ba6c25ec011b..5024f23fd0ed10c3681acc021857bca88d7e9963 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 
@@ -9,8 +9,8 @@ produced with explicit staff switches)."
      }
 
 \score {
-   \context PianoStaff <<
-    \context Staff = "up" \relative c''{
+  \notes \context PianoStaff <<
+    \context Staff = "up" \notes\relative c''{
       b8[ \change Staff="down" d,, ]
       c[ \change Staff="up" c'' ]
       b,[ \change Staff="down" d^"no knee" ]
index fff4b861f6210ba5506e387b747f4f96071dd5b0..a0ec281b84a4c9485e285fa86c46cd975bf42259 100644 (file)
@@ -1,10 +1,10 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "Cross staff  (kneed) beams do not cause extreme slopes."
 }
 
 \score {
-    \context PianoStaff <<
+    \notes\context PianoStaff <<
     \context Staff = up
     \relative c'' <<
         {
index 9e639dbc66bb4df23b14552489f317e958302857..845929e8838a08bf7600f68e886bc9ba24913a2b 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc="
 Beams can be typeset over fixed distance aligned staves, beam
@@ -9,7 +9,7 @@ behave well, wherever the switching point is.
 }
 \score{
        \context PianoStaff <<
-       \context Staff=one \relative c'{
+       \context Staff=one \notes\relative c'{
                \stemUp  c8[ c \change Staff=two \stemUp c c]
                 c[ c c c]
                \change Staff=one
@@ -21,7 +21,7 @@ behave well, wherever the switching point is.
                \stemUp  c8[ c \change Staff=one \stemDown c c]
                r2
        }
-       \context Staff=two \relative c'{
+       \context Staff=two \notes\relative c'{
                \clef bass
                s1
                s1
index 07976170ac9376220c04b8a6954dfdee7cbfac13..b4c634ea929f6ad92c1cbcecfd178a47be2ae9b2 100644 (file)
@@ -1,10 +1,10 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header { texidoc = "@cindex Beam Damp
 Beams are less steep than the notes they encompass. " }
 
 \score{
-       \relative c''{
+       \notes\relative c''{
 %              \stemUp
 %               a16[ b b c]
 %               c[ b b a]
index 152f97ca867448469e2906425f1810b843df065d..7687581471e86ce7a2675c1db42927fba24f55dd 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
     texidoc="Beamed stems have standard lengths if possible. Quantization is switched off in this example."
     }
 
 \score{
-    \relative c'{
+    \notes\relative c'{
        \override Beam  #'position-callbacks =
         #`(,Beam::least_squares
         ,Beam::check_concave
index 69717918a9903117b8e0c7b218f026e4b1ca6c42..5dee280f001f7681d360a6a179730099fc0f708e 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc="
 Beams should behave reasonably well, even under extreme circumstances.
@@ -9,7 +9,7 @@ under normal circumstances, these beams would get knees here
 "
 }
 
-extreme = \relative c'' {
+extreme = \notes\relative c'' {
   \stemBoth
    g8[ c c,]
    c16[ c'' a f]
index b0df3b694b022547d450496130ba42768a3af2dd..ae8b49676479e2992c6e14e87bec5cfa089d0170 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -7,7 +7,7 @@
 
 }
 
-\score { 
+\score { \notes
         \relative c'
         {
             \override Stem  #'french-beaming = ##t
index f2a983626ac58b154ad3469b0e9246b36334eaad..f505ac3588d1e65cf118af7404711c6d9bd811d6 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
 texidoc=" Funky kneed beams with beamlets also work. The beamlets
@@ -10,7 +10,7 @@ should be pointing to the note head.
 
 
 \score {
-  \relative c' {
+  \notes\relative c' {
      c16 c''8 c,,16
      c16 c''8 c16
      c16 c,,8 c16          
index 06e7e2fa29f1fe0b6a9d20539ad192df70f6b229..0c0784face0c699d6972dbc92d08f1bdfe59dd26 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     
     texidoc = "In complex configurations of knee beaming, according to
@@ -9,7 +9,7 @@ beam. This is in disagreement with the current algorithm."
     
 }
 
-\score { 
+\score { \notes
 \relative c'
         {
             \override Beam  #'auto-knee-gap = #7
index 01330e66958dc78fb1921ff334705d59f89fdec3..aa2f0240e7cf14ef5abd9c9a57fc87b7873c07e4 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc = "Point-symmetric beams should receive the same
@@ -8,7 +8,7 @@
 }
 
 \score{
-    \relative c'{
+    \notes\relative c'{
         a8[ b'' a,, b'']
         b8[ a,, b'' a,,]
     }
index 83fc0c0060960560ceca79fab7ba56867365ca82..ee98597ff4565fb20f921975e6822be44cf12c01 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -10,7 +10,7 @@ Beams should look the same.
 
     
 \score { 
-  \context Voice \relative c {
+  \context Voice \notes\relative c {
                         d''8[ d d]  d[ g d]
                        c c
   }
index 4ddc0ce48ccdf4240d7c97874edfa31995d2cad6..ac5e24537b65ddea13c4f67084ee7ad23f63672f 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 
 \header {
@@ -7,7 +7,7 @@
     "Beaming can be overidden for individual stems."
 }
 \score {
-     \relative c'' {
+    \notes \relative c'' {
        c32[ c
 
             %% WARNING: #'beaming is written, so this
index ecc6b0d7096900fadaef2ce7b4e0874e06eb4b0a..e6537462a5b366bfda9a3e7a4be1b5d3029b6e62 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc = "Kneed beams (often happens with cross-staff beams)
@@ -8,7 +8,7 @@ to the last beam.
 "
 }
 
-\score { 
+\score { \notes
         \context PianoStaff \relative c' <<
             \context Staff = SA {
                 \stemDown
index 3c27b0eb53481511995b343bc782818d581b2fd7..6be0ca34aa38e5a3bb68102c4abea53ad0fe0251 100644 (file)
@@ -1,10 +1,10 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "Explicit beams may cross barlines. "
 }
 \score {
- \relative c'' { c2.  c8[ c8 c8 c8] }
+\notes \relative c'' { c2.  c8[ c8 c8 c8] }
 
     \paper { raggedright= ##t }
 
index 60bf2897c8d22605dfee2e14a54ab769c8ad8a42..5eb888c0d8288ea88daac0d7fe8da5040bc06261 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
 
 texidoc=" Beams on ledgered notes should always reach the middle staff
@@ -11,7 +11,7 @@ note beams.  Override with @code{no-stem-extend}.  "
 
 
 \score { 
-  \context Voice \relative c {
+  \context Voice \notes\relative c {
      f8[ f]   f64[ f] 
      \grace { 
        f8[ e8] 
index 5ecbc3435e2a82531220e95e4b0b76ae9b062fca..3ba37df17e907ea9ad78dd836053dcd2568deb78 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
 texidoc = "Beams and ties may be entered in postfix notation, separating the
@@ -11,7 +11,7 @@ texidoc = "Beams and ties may be entered in postfix notation, separating the
 
 \score
 {
- \relative c''
+ \notes\relative c''
    {
        c8[~ c]
    }
index f3f67732c420ddfb34c7fe1c67da5807700ddce1..5fa18b429f5eb3b815e872e79e7b4f332d532410 100644 (file)
@@ -8,10 +8,10 @@ texidoc = "Stem lengths take precedence over beam quants: `forbidden'
 
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
 \score {
-     \relative c''{ 
+    \notes \relative c''{ 
 \time 3/8
 a'16[ b] g[ b]
 a32[ b] g[ b] 
index d1519b10b05580d71debe84ee301721a149063d0..75d53c262024314be40a7adf78152900745631ac 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 
@@ -10,7 +10,7 @@ lengths are between 2 and 1.5."
 }
 
 \score{
-       \relative c' { 
+       \notes\relative c' { 
                 c8[ c]  a''[ a]
                 a,[ a]  c[ c]
                 d,8[ d]  g'[ g]
index d5f894bc29944e93e04f1c5497822a1414a96e63..d8131b86b954571ec65237b624cf797d59d551ee 100644 (file)
@@ -1,11 +1,11 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header
 {
     texidoc= "Quarter notes may be beamed: the beam is halted momentarily."
 }
 
-\score { \relative c'' {
+\score {\notes \relative c'' {
         c8[ c4 c8] % should warn here!
 }
 \paper { raggedright = ##t} 
index 735fd5d77b79348379f293996c19f863c4f24dd7..024abddb087f00a65bdab12b9915ea6d48233fe9 100644 (file)
@@ -3,9 +3,9 @@
  texidoc = "The number of beams does not change on a rest."
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
-\score {  \relative c, {
+\score { \notes \relative c, {
   \clef bass    
    e8[ r16 f d'8 e16 e16]  c8[ c16 r16 bes8 r16 c16] |
  }
index 822fe15b56aaa85e6f5e9ac4b641bbe298ab71e4..1da9d9c64a9e6edf11be798eb6907390969f05d6 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
   texidoc="
 Engraving second intervals is tricky.  We used to have problems with seconds 
@@ -8,7 +8,7 @@ seconds, you'll spot something fishy very quickly.
  
 " }
 \score{
-    \relative c''{
+    \notes\relative c''{
        \stemUp
         b8[ c]
         b16[ c]
index eadac0e3894b9daa091e63fff546475bcf03d4b2..5716c38eecd3ddeefbb07c7816b7f8ebb7427bc1 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
     texidoc="Beams in unnatural direction, have shortened stems, but do not look too short."
     }
 
 \score{
-    \relative c'{
+    \notes\relative c'{
        \override Beam  #'position-callbacks =
         #`(,Beam::least_squares
         ,Beam::check_concave
index a98e54d5bd3203dd8d0b384f4a0188d05bf127aa..34c4afdfaa2a2f1a56ff760ffb8e2766cbac1b0c 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc = "Hairy case for beam, chord, and automatic knees."
@@ -12,7 +12,7 @@ texidoc = "Hairy case for beam, chord, and automatic knees."
 
 
 \score{
-  \relative c'{
+  \notes\relative c'{
     %\stemUp
     \clef alto
     \time 3/4
index 4561952d11e9a019bada5534fa93523a3ffafd5a..fe1bb535ccfc36842888381addefe2bdd24d5262 100644 (file)
@@ -1,11 +1,11 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "Automatic beaming works also in ternary time sigs."
 }
 
 \score {
-    \relative c'' {
+   \notes \relative c'' {
 \time 6/8
  c8.[ c16 c16 c16] 
 }
index 4551ba218947a8da90ed2590c081ea9bfab608a3..bafb081cc64afad9fb5b01d16e3b05728d6f150f 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -9,7 +9,7 @@ hidden just as with breakable bar lines.
 "
 }
 
-\score { \context Staff  \relative c''  {
+\score { \context Staff \notes \relative c''  {
         c8.[ c16]
         c8.[ c16 c8.  c16]
         c16[ c8.] |
index 675ca37520e7117590d11e4de59db412103b8d54..a4df9cd8a032ff9da78b51ebec2197f9380220d5 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "Beaming can be also given explicitly."
 }
 
     \paper { raggedright= ##t }
 
-\score { 
+\score { \notes
 \relative c'
         {
         c16[ c8.]
diff --git a/input/regression/between-systems.ly b/input/regression/between-systems.ly
new file mode 100644 (file)
index 0000000..b091328
--- /dev/null
@@ -0,0 +1,32 @@
+
+\version "2.2.0"
+
+\header{
+texidoc="
+By inserting @TeX{} commands between systems, you can force pagebreaks.
+
+In reality, you'd use the LateX command @code{\\newpage} instead of (pagebreak)
+of course. 
+"
+}
+
+
+#(define (set-page-break grob grob-c context)
+  (let*
+   ((meta (ly:grob-property grob 'meta))
+    (name (cdr (assoc 'name meta))))
+   
+   (if (equal? 'NonMusicalPaperColumn name)
+    (ly:grob-set-property! grob 'between-system-string "(pagebreak)\n\n"))
+))
+
+\score {
+    \notes \relative c' {
+       c1
+       \context Score \applyoutput #set-page-break
+       \break
+       
+       c1
+    }
+}
+
index 7e7c1c7d23e7a09ede8a3c918198a849b9c37271..4107e26789ee0af7e9c8553a682f1541cee609b2 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -9,7 +9,7 @@ Breaks can be encouraged and discouraged using @code{\\break} and
 
 
 \score{
-       \relative c'' \context Voice{
+       \notes\relative c'' \context Voice{
        \emptyText
        c1 \noBreak c1 \noBreak \mark "nobreak" c1 \noBreak
        c1 \break \mark "break" c1 \break \mark "break" c1 
index b47b386289c7d2780b6ca96804f654a3ae083218..4975590aa25edcd574e9d02cd996aaf8deae1b91 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -17,7 +17,7 @@ finalis, the latter three looking similar to bar glyphs.
     % Gregorian notation:
     %
     \context VaticanaStaff {
-       \relative c' {
+      \notes \relative c' {
 
        % we turn bars and bar numbers off for Gregorian stuff
        \override Staff.BarLine  #'transparent = ##t
index 5ed19747cbf11d45220c20048adab02b25518df2..b0de04de7f2b2be7cdc09bbd6f2068bc63353aaa 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc="
 Breathing signs are available in different tastes: commas (default),
@@ -14,7 +14,7 @@ ticks, vees and `railroad tracks' (caesura)."
     % Modern notation:
     %
     \new Staff {
-       \relative c'' {
+      \notes \relative c'' {
        \key es \major \time 3/4
 
        % this bar contains no \breathe
index 33117b4347f3a4a9945f5443c097570480ef9a29..e99a4787a8c1d9d025f9235f85cbe940ca0d7c6d 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="Property chordChanges: display chord names only when
@@ -17,7 +17,7 @@ settings = {
 }
 
 \score {
-   <<
+  \notes <<
     \context ChordNames << \scheme \settings >>
     \context Staff \transpose c c' \scheme
   >>
index a2f4903e8da8712284251bb34e1dec7808681856..cd7d4eb2dbc7882709725b1f7d822f5fd8b3954e 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4
+\version "2.2.0
 
 \header {
 
index efae9f0edc2ac0989900c71098b652511cf68616..44dc003602191651a833865383c1cc01fce7bd73 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 
 \header {
@@ -12,7 +12,7 @@ the suffixes are printed below pitches.
 
 \score
 {
-  { \context Voice \chords {
+\notes  { \context Voice \chords {
 c1_"(nothing)"
 c:7_":7"
 c:m_":m"
index d0d9ac6d39c833b076737df30ddb3b6229b7c3f9..3dd8824fb45fa8cb0fe3a1baa8e29c695e4b0860 100644 (file)
@@ -1,10 +1,10 @@
-\version "2.3.4"
+\version "2.2.0"
 \header { texidoc = "The property @code{chordNameExceptions} can used
     to store a list of special notations for specific chords.
 
 Putting the exceptions list encoded as
 @example
-       \ @{ <c f g bes>1\\markup @{ \\super \"7\" \"wahh\" @} @}
+       \\notes @{ <c f g bes>1\\markup @{ \\super \"7\" \"wahh\" @} @}
 @end example
 into @code{chordNameExceptions} takes a little manoeuvring. The
 following code transforms @code{chExceptionMusic} (which is a
@@ -23,7 +23,7 @@ adds the new exceptions to the default ones, which are defined in
 
 
 % 7sus4 denoted with ^7 wahh
-chExceptionMusic =  {
+chExceptionMusic = \notes {
   <c f g bes>1-\markup { \super "7" "wahh" }}
 
 % add to existing exceptions.
index 93fdaf8fcc7ae31a47f26077e0260c06aae28de8..683a95a9ac2458fd484fcef6d9401395ad7322cc 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "The layout of the major 7 can be tuned with
 @code{majorSevenSymbol}."
index 27e37ac15ffc5eb84d780d18bd90add6e743f66a..aaecb58a41e29e448bc9707bd9683de25fd84eb8 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
index ba2ea192f92c45a64a290647f2dbfd805655a8c7..922e593062bf509d88485dcf8890ee2c70ba8051 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
 texidoc = "Scripts can also be attached to chord elements."
@@ -7,7 +7,7 @@ texidoc = "Scripts can also be attached to chord elements."
 }
 
 \score {
-     \relative c''{
+    \notes \relative c''{
        < c-.  > 4
        < c->  > 4
        < c-. e-. g-. b-. >  
index e6d823c9923d19e969eb3eeb837827e169cb99d4..cb4ef1a438c8c81f8278b7782ea0fc0ab43e362c 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
   texidoc = "
   Tremolo repeats can be constructed for short tremolos (total duration smaller than 1/4) too. Only some of the beams are connected to the stems. 
@@ -6,7 +6,7 @@
 }
 
 \score {
-  \context Staff  \relative c' {
+  \context Staff \notes \relative c' {
     \repeat "tremolo"  2 { c32 e32 }
     \stemDown
     \repeat "tremolo"  2 { c32 e32 }
index fb135a845c8561fff7422a79de83dca7a1ab4ff9..e4d855a0d45a45e14751663379097699c2c3fe37 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -17,7 +17,7 @@ notes as well.)
 }
 
 \score { 
-  \context Voice \relative c' {
+  \context Voice \notes\relative c' {
        \time 4/4
        \repeat "tremolo" 16 { d32 e }
        \repeat "tremolo" 8 { d16 e }
index 55062c45eb06c58443b1baa564adc9f91dcd8aab..84eaac398b095f54f33187bd631ca85848f437eb 100644 (file)
@@ -1,11 +1,11 @@
-\version "2.3.4"
+\version "2.2.0"
 
 
 \header {
 texidoc = "Jazz chords may have unusual combinations."
 }
 
-chs =  
+chs = \notes 
 {
 <c d  f g>1
 <c d  e f g>1
@@ -25,6 +25,6 @@ chs =
 %      #(set-chord-name-style 'ignatzek)
        \chs
     }
-       \context Staff  \transpose c c' { \chs }
+       \context Staff \notes \transpose c c' { \chs }
     >>
 }
index f2e409cc56fd93c40a94a149eb1514049604b85b..36d1c8ae7209dcda2f4f11a44287168f98b3357c 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4" \header {
+\version "2.2.0" \header {
 
     texidoc = "Octavation signs may be added to clefs.  These
 octavation signs may be placed below or above (meaning an octave
@@ -7,7 +7,7 @@ higher or lower), and can take any value, including 15 for two octaves."
 
 }
 
-\score { 
+\score { \notes
 
        \relative c'' {
 
index 0580f35df4002bf21382e944f859b596e7ac810f..12520dc1f8240e9fdd9ef966ddf67b642fdd2dce 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 
@@ -11,7 +11,7 @@ or below the clef respectively."
 
 
 \score {
-       { 
+       \notes
        
          \clef "treble" c'1^"{treble}" \bar "||"
          \clef "french"c'1^"{french}" \bar "||"
index 067b3a0fc64cc82e5af9a8f808a451c084458f07..9cc7ce6e0e1ae18792bbc40268b64c41bef651b1 100644 (file)
@@ -4,15 +4,15 @@
 
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
 \score {
-    \new PianoStaff <<
+\notes    \new PianoStaff <<
     \context Staff = up     {
        s1 *2
        }
        \context Staff = down <<
-           \applymusic #notes-to-clusters \relative c  { <c e>4 <f a> <b e> \change Staff = up <e a>
+           \apply #notes-to-clusters \relative c  { <c e>4 <f a> <b e> \change Staff = up <e a>
                                                     <a d> <d g> }
 
            { \clef bass s1 * 2 }
index c0e27b9ff92584a60cd5c2e3e5df6548c264698d..70633f4214187b811bd40b9870eaca192398cbc1 100644 (file)
@@ -1,19 +1,19 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "Clusters are a device to denote that a complete range of
 notes is to be played."
 }
 
-fragment = \relative c' {
+fragment =\notes \relative c' {
          c4 f4 <e d'>4
          <g a>8 <e a> a4 c2 <d b>4 e4 
          c4 }
 
 \score {
-  <<
\notes <<
      \new Staff \fragment
-     \new Staff \applymusic #notes-to-clusters \fragment
+     \new Staff \apply #notes-to-clusters \fragment
      >>
  \paper { raggedright = ##t }
 }
index 76bd97da8b2cbc7bf76ab08e0c7ea08f57f98a8d..9d6d10dd8080b225abf800f4e9f406f2c6a9b69d 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "Single head notes may collide. "
 }
@@ -6,9 +6,9 @@ texidoc = "Single head notes may collide. "
 
 
 \score {
-    
+    \notes
 
-  \context Staff  \transpose c c' <<  
+  \context Staff \notes \transpose c c' <<  
        {  c4 d e f g2 g4 a | }  \\
        { g4 f e g  g2 g2 } 
   >>
index 6b964bc14e6ea2f7be3b6aa72e9350610b672ee0..c631c2bd7d3a6c7a5592a8822e1c9e702bce269a 100644 (file)
@@ -4,9 +4,9 @@
     dots: notes with dots should go to the right, if there could be
     confusion to which notes the dots belong."
 }
-\version "2.3.4"
+\version "2.2.0"
 \score { 
-   \relative c'' { 
+  \notes \relative c'' { 
     << <a c>2\\ { <b d>4 <b d>4 }   >>
     << { <a c>2 } \\ { <b d>4. <b e>8 } >> 
   }
index 4a6719ffacc61aeecfa77d71425dd937bfa01b4c..64cca530b67c83c9df867550c392dd06904fc1c8 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
     
     texidoc = "If collision resolution finds dotted note head must
@@ -9,7 +9,7 @@
 \paper { raggedright = ##t }
 
 \score {
-   \relative c {
+  \notes \relative c {
     \key d \minor
     \clef bass
     << <cis a' cis>4 \\ { g'8. bes16} >>
index 9e8183d799dde43d4e397fb4a68bdddb3515eda7..3e5b702fe610950c93528ca75fec292fbf19827f 100644 (file)
@@ -5,12 +5,12 @@
   on the right side."
 }
 
-\version "2.3.4"
+\version "2.2.0"
 \paper { raggedright= ##t }
 
 % todo: b2 (up) + b8 down looks strange compared to c2up + b8. (down)
 \score{
-        \context Staff  <<
+        \context Staff \notes <<
                 \clef "bass"
                { b8. c'16 d'4 b8  c'8  d'4 b2 b2  }
                \\
index e5b7b99ecc1b2961c410b965feb7bdf2dd20c18d..3da9f8509e27c6b4fa2d17388df8151118003697 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "Note heads in collisions should be merged if
 they have the same positions in the extreme note heads.  
@@ -8,7 +8,7 @@ they have the same positions in the extreme note heads.
 
 
 \score {
-  \relative c'' {
+\notes  \relative c'' {
 c4 
   << { c4 d4 <c d>8  <c d> <c d> } \\  { c4 c <a b>8 <b c> <c d>8 } >>
 }
index 870213c4a1c5369e0869225bf6f6b8eace5695bc..f3a17595dbdd312bfe4edb642e61908c498d5035 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc =
 
@@ -13,7 +13,7 @@ if the black note heads are from 8th or shorter notes.
 
 
 \score {
-    \context Staff  \relative c'' <<
+    \context Staff \notes \relative c'' <<
        {
            c2 c8 c4.
            
index ee87191d76d4bd454327e4d0969d2737494d9040..227fd8c4464ced06923673e7d7a9a9ab1e8a983e 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
     
     texidoc = "If NoteCollision has merge-differently-dotted = ##t note
@@ -10,7 +10,7 @@ should not disappear when merging similar note heads."
 \paper { raggedright= ##t }
        
 \score {
-    \context Staff \relative c'' <<
+    \context Staff \notes\relative c'' <<
        {
            g8[ g8]
            \override Staff.NoteCollision  #'merge-differently-dotted = ##t
index a19bd5174d44173ac24c9493d2ed39cac23fe527..23937dc753d7401486f6591a01d2ab88dbcb7797 100644 (file)
@@ -2,10 +2,10 @@
 
     texidoc = "When merging heads, the dots are merged too."
     }
-\version "2.3.4"
+\version "2.2.0"
 
 \score {
- {
+\notes {
 \relative c'' \new Staff {
     << { d8. e16 } \\ { d8. b16 } >> 
     }
index 1518ebfafe9d9812d4b116fb480a3b5f6292e111..2aba54b356d18c21d8978ff987b758f44ab4e398 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "Oppositely stemmed chords,  meshing into each other,
 are resolved."
@@ -8,7 +8,7 @@ are resolved."
 
 
 \score {
-  \context Staff  \transpose c c' {
+  \context Staff \notes \transpose c c' {
      \time 3/4
      % Here's what I was trying to do:
      <<          {
index 4be0dae1a00bf081f72227a901f09d1b31a9dc79..50e11d37b9d99dae5c2d69f5d3f3cd5638edea39 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc="
 In addition to normal collision rules, there is support for polyphony, 
@@ -12,12 +12,12 @@ copyright =          "public domain"
 
 
 twovoice =
- \relative c' \context Staff  << 
+\notes \relative c' \context Staff \notes << 
         {  g4 f f e e d d c } 
 \\ {  c4 c  d d e e f f }
 >>
 
-twovoicechords = \context Staff  <<
+twovoicechords = \context Staff \notes <<
  \relative c' {
  e4 d c b a g f
        }\\
@@ -28,13 +28,13 @@ twovoicechords = \context Staff  <<
 >>
 
 
-threevoice = \context Staff  <<
+threevoice = \context Staff \notes <<
         { g4 f e f g a g2 } \\
         {  c4 d e d c d es } \\
         { e4 e e e e e e e  }
 >>
 
-hairyChord = \context Staff  \relative c''
+hairyChord = \context Staff \notes \relative c''
     << e \\
       fis, \\
       cis' \\
@@ -44,7 +44,7 @@ hairyChord = \context Staff  \relative c''
 
 
 \score{
-        { \transpose c c' {
+       \notes { \transpose c c' {
           \twovoice
           \twovoicechords
           \threevoice   }
index a5771122fd8d39b19f85aa97d00825064401f6c7..fc6676614e5858583cec2ca38a5212c560a8debe 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc = "Completion heads are broken across bar lines. This was
@@ -9,14 +9,14 @@ Completion heads are not fooled by polyphony with a different rhythm.
 }
 
 \score{ 
-       \context Staff  \relative c'' << 
+       \context Staff \notes \relative c'' << 
            { c2. c bes2 } \\
            { c2. a8 g4 f4. g4 f  }
        >>
 
        \paper {
                \context{
-                       \Voice
+                       \VoiceContext
                        \remove "Note_heads_engraver"
                        \consists "Completion_heads_engraver"
                }
index d1175b4290a179318e3b7094b2ca2edb7823b476..55f17241305c6bc53834df9f97b2fbfe83021ea3 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -13,14 +13,14 @@ If the @code{Note_heads_engraver} is replaced by the @code{Completion_heads_engr
 
 
 \score{
-  \relative c'{
+  \notes\relative c'{
   \time 2/4
 
   c2. c8 d4 e f g a b c2.. b8 a g16 f4 e d c8. c2 
   }
   \paper{
     \context{
-      \Voice
+      \VoiceContext
       \remove "Note_heads_engraver"
       \consists "Completion_heads_engraver"
     }
index b83116b33efb6330b235fe431205fbe168802433..7a05faddde5c44867a705fcf80a860ebeb38fb71 100644 (file)
@@ -1,10 +1,10 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "Custodes may be engraved in various styles."
 }
 
 \score {
-     {
+    \notes {
        \override Staff.Custos  #'neutral-position = #4
 
        \override Staff.Custos  #'style = #'hufnagel
@@ -25,7 +25,7 @@
     }
     \paper {
        \context {
-           \Staff
+           \StaffContext
            \consists Custos_engraver
        }
        raggedright = ##t
index 16511814e4ad10d74891b93904e4f4db43808dd2..bafb770e11689180eca918fa74d6c1c1e70ecadb 100644 (file)
@@ -1,11 +1,11 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "Dots move to the right when a collision with the (up)flag happens."
 }
 
 \score {
-    \relative c''
+    \notes\relative c''
     {
        \time 8/4
        \set Staff.autoBeaming = ##f
index 14345aba88c03617499b1f65b85e23db0639e56a..42be6834222ddfaa172efa1722afc3c859b5a5bb 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4" \header{
+\version "2.2.0" \header{
 
 
     texidoc=" Noteheads can have dots, and rests too.  
@@ -23,7 +23,7 @@ The priorities to print the dots are (ranked in importance):
 
 
 \score { 
-  \context Voice \relative c'' {
+  \context Voice \notes\relative c'' {
     \time 6/8
        d4. g,,
     \stemDown
index b7ff9ceaf0abff47b0a5e6f13230d11d1dbb7c42..a9f459c6da858a8418dce48310a2636a181d83c2 100644 (file)
@@ -7,15 +7,15 @@
 }
 
 
-\version "2.3.4"
+\version "2.2.0"
 
 drh = \drums { cymc4.^"crash" hhc16^"h.h." hh \repeat "unfold" 5 {hhc8 hho hhc8 hh16 hh} hhc4 r4 r2 }
 drl = \drums {\repeat "unfold" 3 {bd4 sn8 bd bd4 << bd ss >> } bd8 tommh tommh bd toml toml bd tomfh16 tomfh }
-timb = \drums { \repeat "unfold" 2 {timh4 ssh timl8 ssh r timh r4 ssh8 timl r4 cb8 cb} }
+timb = \drums \repeat "unfold" 2 {timh4 ssh timl8 ssh r timh r4 ssh8 timl r4 cb8 cb}
 
 \score {
-    \repeat "volta" 2 {
-       <<
+    \repeat "volta" 2
+    <<
        \new DrumStaff \with {
            drumStyleTable = #timbales-style
            \override StaffSymbol #'line-count = #2
@@ -30,7 +30,6 @@ timb = \drums { \repeat "unfold" 2 {timh4 ssh timl8 ssh r timh r4 ssh8 timl r4 c
            \new DrumVoice {\stemDown \drl }
        >>
     >>
-       }
     \paper {}
 
     %% broken:
index b23885f71c148e4a5cfed1db8edcc98c20f13e41..e9c7a26bf64b24510a07249d8bb0d19827b2579f 100644 (file)
@@ -1,10 +1,10 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc = "Broken crescendi should be open on one side."
 }
 
-\score {  \relative c'' { 
+\score { \notes \relative c'' { 
     c1 \< \break c1\!  \> \break c1\!
   }
   \paper {
index 9f6069259df7b17d4923c960067064d7480f8e5e..a6c5eddc56ddc0ea372d663fb6c5f6069f8c3a0b 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {texidoc = "Dynamic letters are kerned, and their weight
 matches that of the hairpin signs.  The dynamic scripts should be
@@ -9,7 +9,7 @@ closer to the note head (staccato, accent) are reckoned with.
 
 \score {
     
-\relative c'' { c1\ff
+\notes\relative c'' { c1\ff
                      e,-.-> \f
                      e \rfz                  
                      c' \mf
index 43aed0155dcafeca2cfdc95cc5f2096de60f0809..b4c2f9f67ee5382e93bffb1d01d1b81c350568ac 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc=" Dynamics appear below or above the staff.  If multiple
 dynamics are linked with (de)crescendi, they should be on the same
@@ -10,7 +10,7 @@ line. Isolated dynamics may be forced up or down.
 
 
 \score{
-\relative c''{
+\notes\relative c''{
 a1^\sfz
 a1\fff\> c,,\!\pp a'' a\p
 
index a953b878e142e9100923d4517a12e4f7e6b9b3d2..5b6a92d89fc9fc36a2b56c10f4b216161d51635d 100644 (file)
@@ -1,10 +1,10 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 texidoc = "Crescendi may start off-notes, however, they should  not collapse into flat lines."
 }
 
-\score {  { \context  Voice { 
+\score { \notes { \context  Voice { 
   << f''1 { s4 s4 \< s4\! \> s4\! } >>
 }}
 
index e44136eca610ddc37cd7d3a56309791f391973de..bfe14905a58b5544eaf4bc4067fa196bdcc7a65b 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
     texidoc = " Easy-notation (or Ez-notation) prints names in note heads.
@@ -6,7 +6,7 @@ You also get ledger lines, of course."
 }
 
 \score {
-     {
+    \notes {
        \setEasyHeads
        c'2 g'2 | g'1 
        \override NoteHead #'note-names = ##("U" "V" "W" "X" "Y" "Z" "z")
index 4fc5afced06f2effcbd0ad1a2e05dbc27991096a..8d40fcbd5c1f3a26ef411237815087c3e88c7d3b 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "
 Figured bass is created by the FiguredBass context which eats
@@ -6,12 +6,10 @@ figured bass requests and  rest-requests.  You must enter these using
 the special @code{\figures @{ @}} mode, which allows you to type
 numbers, like @code{<4 6+>}.
 
-You can also type letters by entering quoted strings, which is shown in the
-last bass figure.
-
+You can also type letters by entering quoted strings.
 " }
 
-\score {   <<
+\score { \notes  <<
  \context FiguredBass {
    \figures { 
        <3 [5 7]>
@@ -21,8 +19,8 @@ last bass figure.
        <3+ 5- 7!>
        <3 _! 5 _- 7>
        <3 _ 5 _ 7>
+\override FiguredBass.BassFigure  #'font-family = #'roman
        <"V7" ["bla" 6] 7>
-       
     }
  }
 
index d11c8d7299bab4ea724ad76ceb577062b27089ea..f2ba10a7df7182ccc68a5a1c5185811a91a8c124 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
 texidoc = "With the new chord syntax, it is possible to associate
@@ -11,7 +11,7 @@ easier to process."
 
 
 \score {
-     \relative c'{
+    \notes \relative c'{
 
        %% input order is not 1 2 3 , output is.
        <c-1 g'-3 e-2  b'-4 d-5 f-6 a-7 c-8 > 4 
index 33ea305f7169acb7d6c1f53304e9f69b9590e64a..39fc777e2bb70c3786ab2274c11e756280c7926d 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
 texidoc = "Automatic fingering tries to put fingering instructions
@@ -12,7 +12,7 @@ next to noteheads.
 
 \score {
 
- \relative c' {
+ \notes\relative c' {
  c4-4
   <c-1 f-4>
   < c-1 e-2 g-3  b-4 >
index 8ae62b150b64ce137e6476782e948c4c13ff12c2..336b416ad8f7ed7cf71652ff9f159879d495e1f7 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
        texidoc = "
 The line-spanners connects to the Y position of the note  on the next line.
@@ -12,7 +12,7 @@ printed.
 \score{
         \context PianoStaff <<
            \set PianoStaff.followVoice = ##t       
-                \context Staff=one \relative c''{
+                \context Staff=one \notes\relative c''{
                    a1 \break
                    \change Staff=two
                    a,
index fa138eac772cd6eb91c657ea12b867be0e780003..301be653ec3561bcf69da02938da9877a37faee6 100644 (file)
@@ -1,11 +1,11 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header { texidoc = "The magnification can be set for any font. Note
 that this does not change variable symbols such as beams or slurs. 
 " }
 
 \score {
- \relative c'' \context Voice {
+\notes \relative c'' \context Voice {
 \override NoteHead  #'font-magnification = #0.9
 c4
 \override NoteHead  #'font-magnification = #0.8
index 1da5cad7a5ef198649320e3e8d81e5420bfaf4b1..91644304d794c6740412cf81048ef8dee9e2cca5 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -19,7 +19,7 @@ available through (La)TeX.
 %}
 
 \score {
-     {
+    \notes {
        \override Staff.TimeSignature  #'font-name = #"cmr17"
        \set Score.skipBars = ##t
 
index c5dc8a2dd6cbf6eb7a9603250834b389da08aa3b..aac9f00dde4a470222ab52c18cd4563f3b844052 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -9,7 +9,7 @@ setting the @code{extra-offset} of a grob.
 }
 
 \score{
-       \relative c''{
+       \notes\relative c''{
            \context Bottom
              \applyoutput #(outputproperty-compatibility
                           (make-type-checker 'note-head-interface)
index 7c3d8b6a8b39f93302f2324ebfb7b6a41b093842..3b5bed9c9aa8c44cade21523313f38d8ee590762 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 
@@ -13,7 +13,7 @@ The engraver does no time-keeping, so it involves some trickery to get
 }
 
 \score{
-        \context Staff=one \relative c''{
+        \context Staff=one \notes\relative c''{
                     % gliss non gliss and 
             c4 \glissando d e \glissando f \glissando \break
             % consecutive 
@@ -26,7 +26,7 @@ The engraver does no time-keeping, so it involves some trickery to get
     \paper{
         linewidth = 50.\mm indent = 0
        \context{
-              \Staff
+              \StaffContext
               % makes for handier debugging
               % \remove Clef_engraver
        }
index 5688e674e1f38c187f019b9e5ba22c709c9fd58b..54ab64db6eca52c0f88a2bce896e940eeca5873b 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header
 {
     texidoc = "The autobeamer is not confused by grace notes."
 }
 
 \score{
-  \context Voice \relative c''{
+  \notes\context Voice \relative c''{
 
     \grace a8 g16 f e f \grace a8 g16 f e f \grace a8 g16 f e f 
         \grace a8 g16 f e f |
index 9f17fd308df229dcce6d3e14a21f5cf9563d9077..4a1d633809a46ec8829e011581957d9451d5d208 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "Bar line should come before the grace note."
 }
@@ -8,7 +8,7 @@ texidoc = "Bar line should come before the grace note."
 
 
 
-\score  { \relative c' \context Staff  { 
+\score  {\notes \relative c' \context Staff  { 
  f1 \grace {  a'16[ f]  } g1 }
                \paper { raggedright = ##t}
  } 
index 44e208cc0483040a328d31d51e911c9bc5e1b395..d1943c08bc25b13ad00688770de1950206e63d65 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
 texidoc = "Grace notes do tricky things with timing. If a measure
@@ -10,7 +10,7 @@ printed correctly.
 "
 }
 
-\score { \relative c'' { c1 \break
+\score { \notes\relative c'' { c1 \break
 \grace c8
 c1  }
 
index 77a2a08c8551a5f15fc1dff392dab134a704df13..78634043419d8842d0fa3e785d65677aaa479170 100644 (file)
@@ -9,6 +9,6 @@ Unbeamed grace notes are not put into normal beams.
     \paper { raggedright= ##t }
 
 
-\version "2.3.4"
-\score { \relative c'' { c4  d8[ \grace {  e32[  d c d] } e8]  e[  e \grace { f16 } e8 e]   }}
+\version "2.2.0"
+\score { \notes\relative c'' { c4  d8[ \grace {  e32[  d c d] } e8]  e[  e \grace { f16 } e8 e]   }}
 
index d1243af87f378023793b36e1a2b6e6f3fc049547..bfd768efc4bcc342e19c16821141ec42e177ba56 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc="@cindex Grace End
@@ -9,7 +9,7 @@
 }
 
 \score { 
-  \context Voice \relative c' {
+  \context Voice \notes\relative c' {
     
        c4 \grace {  d16[ d16] }
        
index 7d47102865258e6c4fc674d6cbe49e15c216219e..4a5be6db9fc3b60f7450d8b84be77697bc91dff9 100644 (file)
@@ -1,10 +1,10 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "Grace code should not be confused by nested sequential musics, containing grace notes; practically speaking, this means that the end-bar and measure bar coincide in this example." 
 
 }
 \score {
-     {
+    \notes {
        c''2 { \grace  b'16  c''2 }  \bar "|."
     }
     \paper {
index 6632b61ef827387716a17acad4f72dedb03adf7f..19817c4b053ea13d560ff66735647865964336d4 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "Grace code should not be confused by nested sequential musics, containing grace notes; practically speaking, this means that the end-bar and measure bar coincide in this example." 
 
@@ -7,7 +7,7 @@ texidoc = "Grace code should not be confused by nested sequential musics, contai
 
 
 \score{
+\notes 
 
 { c''2 { \grace  b'16  c''2 }  \bar "|." }
   \paper {
index b1a955de191daa9aa7ae93d5120069d39cb7a32c..d942d33d7e829d1d9ad3a14795ca680d244dd089 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "Grace code should not be confused by nested sequential musics, containing grace notes; practically speaking, this means that the end-bar and measure bar coincide in this example." 
 
@@ -6,7 +6,7 @@ texidoc = "Grace code should not be confused by nested sequential musics, contai
 
     \paper { raggedright= ##t }
 
-\score {  \context Voice {
+\score { \notes \context Voice {
         { \grace b'8 c''2 }
        \grace b'16 c''4 c''4 \bar "|."
     }}
index 69998b2f1e34059225a39a02029b9486826bcc8a..5abe644a3b879539d37c7beddecfbdbc53ad1e17 100644 (file)
@@ -1,10 +1,10 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "In nested syntax, graces are still properly handled."
     }
     \paper { raggedright= ##t }
 
-\score {  \relative c'' {
+\score { \notes \relative c'' {
        f1
     \grace e8 f1
         << { \grace { e8 } f1 } >>
index 81de595741ea994c99021043388594c700cd48ce..595d1be571e030c1d21511a1990074349a3c0dee 100644 (file)
@@ -1,9 +1,9 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "Also in the nested syntax here, grace notes appear rightly."
 }
 
-\score {  \context Voice \relative c'' {
+\score { \notes \context Voice \relative c'' {
 
     <<
      { \grace  g32 f4 }
index dcf3602cb939272604ebf9726da6dd6d008515ab..9f988689c522d70b9716b41a5e47293be925929d 100644 (file)
@@ -1,11 +1,11 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "Graces notes may have the same duration as the main note."
     }
 
 \score
-{  \relative c'' {
+{ \notes \relative c'' {
      s2 <f>4
     \grace g e4
 }
index 8837a2b122c4fdcb9f60ecd41fca42a097063d7a..413633ea79243acf7af66e4cdde4f46404bf3c84 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "Grace notes may be put in a @code{partcombine}r."
 }
@@ -9,10 +9,10 @@
 \score {
     \new Staff
            \partcombine 
-             \relative c'' {
+            \notes \relative c'' {
                c4 d e f  \grace f16 g1
            }
-             \relative c' {
+            \notes \relative c' {
                c4 d e2  g1
            }
        
index 26adf5c95bd1af938eeeb6e37a40f314f3ecbc2b..8469b9a776571c8eacc69158c44848459f0afa4c 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc = "Stripped version of trip.ly.  Staves should be of correct length."
 }
@@ -6,7 +6,7 @@ texidoc = "Stripped version of trip.ly.  Staves should be of correct length."
     \paper { raggedright= ##t }
 
 \score{
-  \context PianoStaff  \relative c'' <<
+  \context PianoStaff \notes \relative c'' <<
     \new Staff {
        r1
        r1
index cc25fb2a10c9ff7926d38dc1bac4d0376855e9cb..e560c173e3ae306c8ff75f01372c7beaf367d603 100644 (file)
@@ -1,9 +1,9 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "Pieces may begin with grace notes."
 }
-\score  { \relative c' \context Staff  { 
+\score  {\notes \relative c' \context Staff  { 
  \grace {  a'16[ f]  } g1
  \bar "||"  % test if | and || are synced.
  \grace {  a16[ bes]  }  c1
index d933bfcec0138979eafe4848b8dfb5c903ac786f..61bcb4fff734bd2495b7f5ee59b0341cde3466b7 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc = "Here @code{startGraceMusic} should set @code{no-stem-extend} to 
 true; the two grace beams should be the same here.
@@ -8,7 +8,7 @@ true; the two grace beams should be the same here.
 
 
 \score { 
-  \context Voice \relative c {
+  \context Voice \notes\relative c {
     \grace { 
        f8[ e8] 
       \override Stem  #'no-stem-extend = ##t
index 684941d5103c4cfec168c5845e27fd3a0ac5853f..6f8560c1a2021e92312c91b1d958e2cc4e08a1ff 100644 (file)
@@ -1,9 +1,9 @@
-\version "2.3.4"
+\version "2.2.0"
 \header  {
   texidoc = "Grace notes in different voices/staves are synchronized."
 }
 
-\score  {\relative c'' << \context Staff  { c2
+\score  {\notes\relative c'' << \context Staff  { c2
         \grace  c8
   c4 c4 }
                \new Staff { c2 \clef bass
index dba893ecfd133014d1ed3844ff4ba92fc22a22fc..b71cdf6ad9e81138f826a512ded1e808fffdd440 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "There are three different kinds of grace types: the base 
 grace switches to smaller type, the appoggiatura inserts also a slur, and the
@@ -6,7 +6,7 @@ acciaccatura inserts a slur and slashes the stem."
     }
 
 \score  {
-     \relative c'' { c4 \grace { d8 }  c4
+    \notes \relative c'' { c4 \grace { d8 }  c4
                           \appoggiatura { d8 } c
                           \acciaccatura { d } c
                       }
index 0addd65e57c0c7fe7ff1d6c8bb5e264a437e86a5..72b331dda2a0311a160ad78d4bdbcd8bd33197f4 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "When grace notes are entered with unfolded repeats,
 line breaks take place before  grace  notes.
@@ -7,7 +7,7 @@ line breaks take place before  grace  notes.
     
 
 \score{
-  \context Voice \relative c'{
+  \notes\context Voice \relative c'{
     \repeat unfold  10 {\grace d8 c4 d e f}
 
   }
index 0aaf85c0ce815e38380e1a6390ffbd4802f614c3..b280d1674036f82625ea6edb7f6b31e6598f080e 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -9,7 +9,7 @@
 
     \paper { raggedright= ##t }
 
-\score {\relative c' {
+\score {\notes\relative c' {
 \repeat volta 2 {
         c1 
 }
index 3ccfab883812b0f824164d1e4ae24edc2d09c4d9..5b93e49bedcc7c5e1aa71292da65f7b06d442351 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -8,7 +8,7 @@
 }
 
 \score{
-   \relative c''{\key a \minor \time 2/4
+   \notes\relative c''{\key a \minor \time 2/4
      \repeat "volta" 2 {
      \grace {  a16[ b] }  c4 c4  |
      \grace {  d16[ b] } c4 c4 |
index 72f1a80d7ea37b609abaf7fae60b0aa7407598e3..fcd45c58c2c3efbb5ad446151217550ddb71b2b0 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -18,7 +18,7 @@ not set.  Main note scripts do not end up on the grace note.
 "
 }
 
-\score { \context Voice = VA \relative c'' {
+\score {\notes \context Voice = VA \relative c'' {
        \grace b8 c4\fermata
        \grace {  c32[ cis32] } gis4
        \grace {  cis32[ dis32] } e4
index 06fc70ad8540665f8ce1dcd5706023365a5c698b..ebb8a5b3ef83dc3eeba530752107fc97e0af567a 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 texidoc ="Hairpin crescendi may be dashed. "
@@ -6,7 +6,7 @@ texidoc ="Hairpin crescendi may be dashed. "
 }
 
 \score {
-     \relative c' {
+    \notes \relative c' {
        \override Hairpin  #'dash-fraction = #0.4
        \override Hairpin  #'dash-period = #1
        f2\< g c1 d4\> b a gis\! }     
index 26a66fd6936260ebd731228c4724c817983f1ce1..76640a9f66eace1c024e85c9365512a9ecb3af9e 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -11,7 +11,7 @@ into them."
 
 
 \score {
- \relative c'' { c4 \> c4 c4\! c4_\ff \> c4 c4\!\p }
+\notes \relative c'' { c4 \> c4 c4\! c4_\ff \> c4 c4\!\p }
 \paper { raggedright = ##t} 
 }
 
index 7c01d8136e7f703697ce2218b2dc6b6e22f29364..effb027b195825d6f587ca65589263d3f57c3e52 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc =
 
@@ -21,7 +21,7 @@ alignment; this should not confuse the mechanism.
 \paper { raggedright= ##t }
 
        
-\score {  \transpose c c''
+\score { \notes \transpose c c''
  \context PianoStaff <<
    \new Staff {  c4 c c c \break  s1 \break c4 c c c \break c c c c}
    \new Staff {  d4 d d d s1 s1 s1 s1 }
index 966d8c27087dc36729703a0c7be233e17975da27..f047952af2dd4c0fa8a9c83f5afb9382637414cc 100644 (file)
@@ -7,13 +7,13 @@ including alterations. "
 }
 
 
-\version "2.3.4"
+\version "2.2.0"
 
 
 textFlat = \markup {\smaller \flat}
 
 \score {
-   \new Staff {
+  \notes \new Staff {
     \set Staff.instrument = \markup { \column < "Clarinetti" { "in B" \textFlat } > }
     \set Staff.instr = \markup { \smaller  { "Cl(B" \textFlat ")" } }
 
index 2e2821b0a1040274cec1294ba0d37c0892db5c92..14cfa64d13ffab81df2b82db5f948c3556fa6121 100644 (file)
@@ -1,11 +1,11 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "Instrument names are also printed on  partial starting measures."
 }
 
 \score {
-   \relative c'' { \set Staff.instrument = "foo" \partial 4 c4 c1 }
+  \notes \relative c'' { \set Staff.instrument = "foo" \partial 4 c4 c1 }
   \paper { raggedright = ##t }
 }
 
index c7d8bf7a0105ead0d75277663a98836ec1f225b9..dbef5d15ac264469280bb567e861de2363b4d011 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc="
 Staff margins are also markings attached to barlines.  They should be
@@ -13,7 +13,7 @@ PianoStaff.
 
 \score {
 
-   \context PianoStaff <<
+  \notes \context PianoStaff <<
     \context Staff = treble    {
       \set PianoStaff.instrument = "Piano "
       \set Staff.instrument = "Right " { c''4 }}
index ea4594cdd7c136d33bc4b1960a13a0329ee7cae8..ab0f77f72664bd766f2fee8ceadc32bf632e3e10 100644 (file)
@@ -1,10 +1,8 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header { texidoc = "Each clef have own accidental placing rules. " }
 
-#(set-global-staff-size 16)
-
-\score { 
+\score { \notes
   \relative cis' {
 
 % \clef french % same as octaviated bass
@@ -24,5 +22,7 @@
 \key cis \major cis \key ces \major  ces
 }
 
+       \paper{\paperSixteen}
+
 }
 
index 76a750ac53c5952d609ab1a4b2a306270505ddea..75f7387cbd7f7d6f8b70de9a5155a81f49b02c37 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc = "By setting @code{Staff.keySignature} directly,
 key signatures can be set invidually per pitch.
 "
 
 }
-\score { 
+\score { \notes
 \relative c'
 \context Staff {
   \set Staff.keySignature = #'(((1 .  2) . 1) ((0 . 3) . -1))
index 390d25f9352743081304214b77d217efc0f4f998..bec8f91a26c9760248d111f40fdc12c595960028 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc="
 Key signatures may appear on key changes, even without a barline.  
@@ -12,7 +12,7 @@ are created also on a clef change.
 
 
 \score {
-   \relative c''
+  \notes \relative c''
   {
        \set Staff.createKeyOnClefChange = ##t  
     \key bes \major c2
diff --git a/input/regression/lily-in-scheme.ly b/input/regression/lily-in-scheme.ly
deleted file mode 100644 (file)
index b3fc634..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-\header {
-    texidoc = "LilyPond syntax can be used inside scheme to
-build music expressions, with the @code{#@{ ... #@}} syntax.
-Scheme forms can be introduced inside these blocks by escaping 
-them with a @code{$}, both in a LilyPond context (see the @code{music} variable) or in a Scheme 
-context (see the @code{$padding} and @code{$(* padding 2)} forms.)"
-}
-\version "2.3.4"
-\paper { raggedright = ##t }
-
-withPaddingA = #(def-music-function (location padding music) (number? ly:music?)
-                   #{ \override TextScript #'padding = #$padding
-                      $music 
-                      \revert TextScript #'padding #})
-  
-withPaddingB = #(def-music-function (location padding music) (number? ly:music?)
-                   #{ \override TextScript #'padding = #$(* padding 2)
-                      $music 
-                      \revert TextScript #'padding #})
-  
-withPaddingC = #(def-music-function (location padding music) (number? ly:music?)
-                   #{ \override TextScript #'padding = #(+ 1 $(* padding 2))
-                      $music 
-                      \revert TextScript #'padding #})
-  
-  \score {
-      \notes {
-          c'^"1"
-          \withPaddingA #2
-            { c'^"2" c'^"3"}
-          c'^"4"
-          \withPaddingB #2
-            { c'^"5" c'^"6"}
-          c'^"7"
-          \withPaddingC #2
-            { c'^"8" c'^"9"}
-          c'^"10"
-      }
-  }
index 069a8d07fc263eefabc882eaf045886c7aec63cb..9dfb95e12ba4fc8dfb1ff91f17ce33b902f4f22a 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc = "With the @code{\\lyricsto} mechanism, individual lyric
@@ -9,12 +9,12 @@
 
 \score {
 <<
-     \context Voice = "bla" \relative c'' {
+    \notes \context Voice = "bla" \relative c'' {
        \autoBeamOff
        c2( d4) e8[ c b c] f4
     }
-    \lyricsto "bla" \new Lyrics \lyrics { bla ab blob blob }
-    \lyricsto "bla" \new Lyrics \lyrics {
+    \lyricsto "bla" \lyrics \new Lyrics { bla ab blob blob }
+    \lyricsto "bla" \lyrics \new Lyrics {
        bla 
 
        \set ignoreMelismata = ##t
@@ -28,8 +28,6 @@
        blob
     }
     
-    \lyricsto "bla" \new Lyrics \lyrics {
-       nes ted lyrics voice with more words than no tes
-    }
-    >>
+    \lyricsto "bla" \lyrics \new Lyrics { nes ted lyrics voice with more words than no tes } >>
+
     }
index 53ff8461b919af0e35c39264a8a33992c4c9fbf7..848e52e7f397953b53b19174af989930d0948978 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
 texidoc ="Polyphonic rhythms and rests do not disturb
@@ -7,7 +7,7 @@ texidoc ="Polyphonic rhythms and rests do not disturb
 }
 
 \score {
-     {
+    \notes {
        \clef violin
        \time 8/8
        \key des \major
@@ -21,12 +21,13 @@ texidoc ="Polyphonic rhythms and rests do not disturb
              \voiceTwo
              ees'8 r8 r8 r8 ees' r8 r8 r8 
           }
-          \lyricsto "two" \new Lyrics \lyrics {
-             Do na
+          \lyricsto "two" \lyrics \new Lyrics {
+             Do na
          }
-        \lyricsto "one" \new Lyrics \lyrics {
-            Do mi nus ex
-        }
+        \lyrics  \lyricsto "one" \new Lyrics
+          {
+              Do mi nus ex
+          }
        >>
     }
     \paper { raggedright = ##t}
index ddec9c87f137afc7e656b6a701d886199b83f487..5cd90ed3c69cbe6e3bd57a2436c05925b2837d11 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc= "Lyrics can be set to a melody automatically.  Excess lyrics will be
@@ -17,7 +17,7 @@ to work."
 
 
 
-m =   \relative c'' {
+m = \notes  \relative c'' {
        \autoBeamOff
        g8( a)  r8 \times 2/3 { g'8( f e) } r8 \grace {  d16[ c b] } e4
        \emptyText
@@ -25,13 +25,13 @@ m =   \relative c'' {
        \melismaEnd
        b }
 
-noise = \repeat unfold 6  \relative c'' { g16 g g g }
+noise = \repeat unfold 6 \notes \relative c'' { g16 g g g }
 
  textI = \context Lyrics = "middle-1" \lyrics { la2 __ la -- la __ la la la la la  }
 textII = \context Lyrics = "middle-1" \lyrics { da -- da __ da -- da da da da da  }
 
 \score {
-     << \context Staff = SA \noise
+    \notes << \context Staff = SA \noise
       \context Lyrics = LA { s1 }
       \context Staff = SB { s1 }
       \context Lyrics = LB { s1 }
index 6cf8dc12c171ff06c6de40de8c7997f419c18544..6403934d1d542fb58d6381f7f5e8c9eee2410cc6 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header
 {
 
@@ -10,7 +10,7 @@ of the melisma."
 
 \score {
     << 
-       \context Voice=A  {
+       \context Voice=A \notes {
            a1 ( a1 \break
            a) a2( b) \break
            a2 
index a4fd43c7a80c2ca545becc0a3df4d8fb4f6e18be..2c57dbf0eccc2a7388c38941a2385c279cddb81e 100644 (file)
@@ -1,10 +1,10 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc= "In lyric extenders, a syllable may be extended over several notes. "}
 
 \paper { raggedright= ##t }
 \score{
- \relative c'  <<
+\notes \relative c'    <<
        \context Voice = melody {
            c8[ ( d] )
            r4 f4 }
index eba8af76ac49b9920b6603db5a0d4c27fb4558cc..fb109c5914fc76ac28cb5f6f1b26414f598f7111 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -8,14 +8,14 @@ they go past the first note. "
     }
 
 \score {
-<<     \new Staff \relative c'' { \time 1/4 c16[ c c  c]
+<<    \notes \new Staff \relative c'' { \time 1/4 c16[ c c  c]
 \time 1/4
 c16[ c c c]
 \time 1/4
 r c16[ c c]
 
 }
-     \new Lyrics \lyrics {
+    \lyrics \new Lyrics {
        bla16 -- bla -- bla -- bla --
        bla -- bla -- bla -- bla8 --
               bla16 -- bla -- bla 
@@ -25,7 +25,7 @@ r c16[ c c]
        linewidth = 3.4 \cm
 
        \context {
-           \Staff \remove "Time_signature_engraver"
+           \StaffContext \remove "Time_signature_engraver"
        }
        
     }
index 886796a0d31da4e7b0493f9412cf99aecb2e599b..774fd4624253d0333d48ecbc49070e8e617335f9 100644 (file)
@@ -1,10 +1,10 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "In lyrics, hyphens may be used."
 }
 \score{
        <<
-       \context Staff  { c' (c') c'( c') }
+       \context Staff \notes { c' (c') c'( c') }
        \context Lyrics \lyrics { bla -- alb xxx -- yyy }
        >>
 }
index a6cc56ed3886dab23cf46713b87c37bf0e92df42..dcb2407ef9d5277ddd400b9a9d00ca2234c422fc 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
 texidoc = "
@@ -10,17 +10,16 @@ texidoc = "
 
 
 \score{
-    <<
-        \relative c' \context Voice = "bla" {
+<<     \notes \relative c' \context Voice = "bla" {
            \autoBeamOff
            c4( c16 d c b)  c4
            d16[ e f g]
            
        }
-       \lyricsto "bla" \context Lyrics \lyrics {
+       \lyrics  \lyricsto  "bla" \context Lyrics {
            alllll __ tijd
            izzz
-       }
-    >>
+       } >>
+       
     \paper { raggedright = ##t }
 }
index 581d03afa8b6bf7ede1540b7b70eeb8640417c95..dac707f6f97aca765abb5532ab848b907bbaa88f 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -9,7 +9,7 @@ lyrics do not collide with barlines.
 
 \score {
        \context StaffGroup <<
-        \context Staff {
+       \notes \context Staff {
                b1 \bar "|:" b1 \bar ":|"
        }
        \lyrics <<
@@ -21,16 +21,16 @@ lyrics do not collide with barlines.
                        this4 one has no BarEngraverAddedToContext1
                }
        >>
-        \new Staff { b1 b1 }
+       \notes \new Staff { b1 b1 }
        >>
        \paper {
                raggedright = ##t
                \context {
-                       \Score
+                       \ScoreContext
                        \accepts "LyricsWithBars"
                }
                \context {
-                       \Lyrics
+                       \LyricsContext
                        \consists "Bar_engraver"
                        \name "LyricsWithBars"
                }
index 74a6b33393f2edffccc96dd2251c937b0da87c3d..cb304d9818f3f9e1112af4d421818813037adf6b 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header
 {
     texidoc = "Melismata are triggered by manual beams." 
@@ -8,7 +8,7 @@
 \score {
     <<
        \new Staff
-            \relative c'' {
+           \notes \relative c'' {
                \set Staff.autoBeaming = ##f
                c8 c8[ c8 c8]  c8    }
        
index 4f0c9b445c002b59f2f66f2549bac7f09cb04a0f..24b404bf946f48fd97f1964595712a9ffab4b3c5 100644 (file)
@@ -3,9 +3,9 @@
     texidoc = "The note markup function may be used to make metronome
  markings. It works for a variety of flag, dot and duration settings."
 }
-\version "2.3.4"
+\version "2.2.0"
 
-\score {  { c4^\markup {
+\score { \notes { c4^\markup {
     \note #"1" #1
     \note #"2" #1
     \note #"4" #1
index 688518984dc6f56d72e597857283d624f4d7a153..62e9a9c316b99b3eb5aaff421f5e517d690a44fc 100644 (file)
@@ -1,6 +1,6 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {texidoc="Markup scripts may be stacked."}
 \paper { raggedright = ##t}
-\score {  { c''^\markup { "a" \column < "1" \bold "2"  "3" > } } }
+\score { \notes { c''^\markup { "a" \column < "1" \bold "2"  "3" > } } }
 
 
index 4c27aae3b478c86bd935cad5f1bc52548e4cb73e..1a12d9a059d294d46ff632574dcb77f0f9924702 100644 (file)
@@ -7,14 +7,14 @@
 
       }
 
-\version "2.3.4" % to be updated
+\version "2.2.0" % to be updated
 
 #(def-markup-command (upcase paper props str) (string?)
   "Upcase the string characters. Syntax: \\upcase #\"string\""
    (interpret-markup paper props (make-simple-markup (string-upcase str))))
 
 \score { 
-     { 
+    \notes { 
         c''-\markup \upcase #"hello world"
         % produces a "HELLO WORLD" markup
     }
index 70ff1b85bbe81002de0c137f7f35ee9e7a3b6aa6..920993f431484637b3fca8113cf4fbe3497bc0d7 100644 (file)
@@ -7,11 +7,11 @@ brackets above beats when the beats of a time signature are grouped.  "
 
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
 
 %% TODO: should have 2/4 + 5/8 time sig style.
-\score { 
+\score { \notes
 \context Staff
         \relative c' {
             #(set-time-signature 2 4) 
@@ -25,7 +25,7 @@ brackets above beats when the beats of a time signature are grouped.  "
         }
         \paper  {
             raggedright = ##t
-            \context { \Staff
+            \context { \StaffContext
                           \consists "Measure_grouping_engraver"
                           }
             }
index fa7c65622effbd17436ceddf2c988cdc6d93e44c..f570e135793d20134f236f97592a2a9ffbca06fd 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
     
 texidoc = "There is limited support for mensural notation: note head
@@ -8,7 +8,7 @@ both for up and down stems."
 }
 
 
-\score { { \context Voice { 
+\score {\notes { \context Voice { 
     \override NoteHead  #'style = #'mensural
 \transpose c d'' {  c4 c2 c8  c16 c16  c1 c\breve c\longa }
 \transpose c c' { c4 c2 c8  c16 c16  c1 c\breve c\longa }
index 44b81b4c2a11cf594e008bbc39f312f696dd4e94..9fc39da4e4e579bb68919c9ed83d5bb6f75aad5c 100644 (file)
@@ -9,9 +9,9 @@ The marking is left aligned with the time signature, if there is one.
     
     }
 
-\version "2.3.4"
+\version "2.2.0"
 
-\score {  \relative c'' {   \tempo \breve = 100 c1 c1 \tempo 8.. = 50 c1 }
+\score { \notes \relative c'' {   \tempo \breve = 100 c1 c1 \tempo 8.. = 50 c1 }
 \paper {  raggedright = ##t }
 
      }
index 1732b98c485a59aa099d54ebc17923cc3e539877..330256a6206fd51ece0f69343e828e0e9b775b2e 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -10,7 +10,7 @@ The number of bars will be written above the sign.
 "
 }
 
-thenotes =  \relative cis' {
+thenotes = \notes \relative cis' {
 \set Score.skipBars = ##t
 \time 4/4
 R1 |
index 853479e47a83742b7901a36fbed27475541594a5..a22164dd4452b00bc66d243cb08942049eec4513 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc=" You can write stencil callbacks in Scheme, thus
 providing custom glyphs for notation elements.  A simple example is
@@ -57,7 +57,7 @@ GROB.  The dimensions of the stencil is not affected.
 
 
 \score {
-        \relative c' { c4 e
+       \notes \relative c' { c4 e
 
                    \override NoteHead  #'print-function
                   =
index cf503fe58fcd815291939a9ae6c8701c548d67ad..95e6646e4206b40741b5d43ae634a15771ab9dad 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header
 {
   texidoc = "The multimeasure rest is centered exactly between bar lines."
@@ -6,7 +6,7 @@
 }
 
 \score {
-    
+    \notes
     {
        \set Score.skipBars = ##t
        \override Staff.BarLine  #'hair-thickness = #7.5
index e766b599e6294153260a8c1cdb13fda8a845df05..8bc952e5ceea3c75c0ee876802e6042f7c8585e6 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 
 \header {
@@ -6,7 +6,7 @@ texidoc= "Multi-measure rests are centered also in the case of grace notes."
 }
 
 \score   {
- <<
+\notes <<
        \new Staff { R1 R1 R1*3 }
        \new Staff { \clef bass c1 \grace c8 c2 c2 c1  \grace c16 c2 c2 c1 }
 >>
index a84e2c27a9df1742041e856242567676d090d4a4..a5f42865e32a26533fd5e38c3ed77ed731684bf7 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc = "There are both long and short instrument names.
@@ -11,12 +11,12 @@ multimeasure rests. "
     \context Staff <<
        \set Staff.instrument = "instrument"
        \set Staff.instr = "instr"
-       {c''1 \break R1 }
+       \notes{c''1 \break R1 }
     >>
     \paper {
        raggedright = ##t
        \context {
-           \Staff
+           \StaffContext
            \consists Instrument_name_engraver
 
        }
index d3ad29e042d993992f34b1a1ce95459209d01423..4f6407fc31ed729664a8af36dbc6339ab752c644 100644 (file)
@@ -2,10 +2,10 @@
 independent on prefatory matter in other staves."
 
          }
-\version "2.3.4"
+\version "2.2.0"
 
 \score {
-    << \new Staff  { R1 } 
+\notes    << \new Staff  { R1 } 
      \new Staff { f'1  \clef bass } 
 
     >>
index 7be7c393af5e5a0f583529471215012d3232a117..be92325f28767428ad8503322e732bb4be294adf 100644 (file)
@@ -3,12 +3,12 @@
     texidoc = "By setting texts starting with a multi-measure rest, an 
 extra spacing column is created. This should not cause problems."
     }
-\version "2.3.4"
+\version "2.2.0"
 
 \score {
     <<
        \set Score.skipBars = ##t
-       \context Staff = flute  \new Voice { 
+       \context Staff = flute \notes \new Voice { 
            <<  { R1*40 }  { s1*0^"bla" }>> 
        }
     >>
index bbf9429aa84c9812d6ccd05b17b2dfa6090e859e..2978ab72209104244506938bfcd47308311da133 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header  {
 
@@ -10,7 +10,7 @@ Texts may be added to the multi-measure rests.
 
 }
 
-\score {  {
+\score { \notes {
   \time 3/4
   \set Score.skipBars = ##t
   R2._\markup { \center-align < \musicglyph  #"scripts-dfermata" \roman "Ad lib"  >  }
index 7a9c7614403075af059869f804b8cc5a3be90d4f..3545eb844edcb284ad1df99a994e14faeb7fc475 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header{
 
 texidoc="
@@ -15,7 +15,7 @@ are used then a different symbol is used.
 }
 
 
-\score {  {
+\score { \notes {
     \time 3/4 \key cis \major
     R2.*15
   
@@ -28,7 +28,7 @@ are used then a different symbol is used.
 }
        \paper {
        \context {
-               \Score
+               \ScoreContext
                skipBars = ##t
        }
        raggedright = ##t       
diff --git a/input/regression/music-function.ly b/input/regression/music-function.ly
deleted file mode 100644 (file)
index ade2e15..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-\header
-{
-texidoc = "Music function are generic music transformation functions,
-which can be used to extend music syntax seamlessly."
-
-}
-\version "2.3.4"
-
-#(define myBar
-  (ly:make-music-function
-   (list string?)
-   (lambda (where type)
-    (context-spec-music
-     (context-spec-music (make-property-set 'whichBar type) 'Timing)
-     'Score))
-    
-    ))
-
-\score{
-     {
-       d4 \myBar #"|:" d4
-       
-    }
-}
-
index cdac8f07eb76bf7efded99a38d6f84fbd8cca225..67c5d7852ee58855ce522d8848f0f08a7321e6c7 100644 (file)
@@ -10,7 +10,7 @@ dynamics are left over. These are put onto the 2nd measure."
 
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
 #(define (notes-to-skip m)
 "Convert all stuff with duration (notes, lyrics, bass figures, etc.) to skips.
@@ -29,13 +29,13 @@ Scripts and dynamics are maintained.
 
     \paper { raggedright= ##t }
 
-foobar =  \transpose c c' { c4\>-^ c4-^ c4\!-^ c4-^  } 
+foobar = \notes \transpose c c' { c4\>-^ c4-^ c4\!-^ c4-^  } 
 
 \score {
-   \relative c''  \context Voice {
+  \notes \relative c''  \context Voice {
        \foobar
 
-       << \applymusic #(lambda (x) (music-map notes-to-skip x))
+       << \apply #(lambda (x) (music-map notes-to-skip x))
                \foobar
           { d2 d2 } >> 
 }}
index 4f00cdb6ec4b3738cfb14b9cc10e0c0e8f7c5862..5926fb295641a187757e1f7ab1f84e530fe17b3c 100644 (file)
@@ -5,9 +5,9 @@
     texts using a similar syntax as @code{\\markup}."
 
     }
-\version "2.3.4"
+\version "2.2.0"
 \score {
-     {
+    \notes {
         \fatText
         f'1-\markup {
             foo
@@ -57,7 +57,7 @@
         raggedright = ##t
         indent = #0
         \context {
-            \Staff
+            \StaffContext
             \remove Time_signature_engraver 
         }
     }
index 6c88014b20d20e6332b09850ae88fcc4aee249b1..328eae461a9620eb6180e3f767357e2d22f7a612 100644 (file)
@@ -2,11 +2,11 @@
 texidoc = "With the new markup syntax, text may be written in various manners."
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
 
 \score {
-  
+  \notes
    {
     f'-\markup {
                foo
diff --git a/input/regression/newaddlyrics.ly b/input/regression/newaddlyrics.ly
deleted file mode 100644 (file)
index 6011d3c..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-\header {
-    
-    texidoc = "newlyrics, multiple stanzas, multiple lyric voices."
-    
-}
-
-%% only this works as advertised...
-<<
-    \new Staff \relative {
-       d'2 d c4 bes a2 \break
-       c2 c d4 f g2
-    }
-    \newlyrics {
-       My first Li -- ly song,
-       Not much can go wrong!
-    }
-    \newlyrics {
-       My next Li -- ly verse
-       Not much can go wrong!
-    }
-    \new Staff \relative {
-       \clef bass
-       d2 d c4 bes a2 \break
-       c2 c d4 f g2
-    }
-    \newlyrics {
-       MY FIRST LI -- LY SONG,
-       NOT MUCH CAN GO WRONG!
-    }
-    \newlyrics {
-       MY NEXT LI -- LY VERSE
-       NOT MUCH CAN GO WRONG!
-    }
->>
-
-\version "2.3.4"
index 1eab0692ed2b998b64e18eedb0f2a99df55be014..40f5e1275c24e172dc18559c8ca5034c6494655b 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
     texidoc=" By default, text is set with empty horizontal dimensions.  
@@ -7,7 +7,7 @@ The boolean property @code{no-spacing-rods} in @code{TextScript} is used
 to control the horizontal size of text.  " }
 
 \score{
-    \relative c''{
+    \notes\relative c''{
        %% \emptyText
        %% short for \override TextScript  #'no-spacing-rods = ##t
        c2_"very wide and long text" c | \break
index 703c0fc762f6c45eaf49d40c735f52627812bdf1..ed80134e5c2692df4344d2d9e3ec4a628c724456 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -18,7 +18,7 @@ analysis brackets start and end.
 
 
 \score {
-    \relative c''
+    \notes\relative c''
     {
        c4\startGroup\startGroup\startGroup
        c4\stopGroup
@@ -30,7 +30,7 @@ analysis brackets start and end.
 
     \paper {
        \context {
-           \Staff \consists "Horizontal_bracket_engraver"
+           \StaffContext \consists "Horizontal_bracket_engraver"
        }
        raggedright = ##t
     }
index 306b0ddd1e429620e5ceff33f0a6ab1e4994152b..a7f0efc146d60eae760fc1917dbf5af0f620e24a 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
     texidoc = "Note heads are flipped on the stem to prevent collisions.
@@ -10,7 +10,7 @@ It also works for whole heads that have invisible stems.
 
     \paper { raggedright= ##t }
 
-\score {  \relative c''
+\score { \notes \relative c''
         \context Voice {
             <g a c>4
             <c d g a>
index 2cd98405a6275b0a7315d5576f1e55d99221e2da..7d0645e8f3d4a99e6b6114d7f22b497042c167ee 100644 (file)
@@ -6,10 +6,10 @@
   Harmonic heads do not get  dots. If @code{harmonicAccidentals} is unset, they also don't get accidentals."
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
 \score {
-  {
\notes {
     < c'' f''\harmonic >4
     \stemUp
     < c'' f''\harmonic >4.
index e7059029257c6e2bda05e9979cf6ac437174939b..c8050737441daaf67627728d4d88ca5a0f96fe3a 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc="
 Note head shapes may be set from several choices.  
@@ -11,7 +11,7 @@ dimensions.
 "
 }
 
-pattern =  <<
+pattern = \notes <<
       \new Voice {
         \override Stem  #'direction = #UP
         e'4
@@ -24,7 +24,7 @@ pattern =  <<
     >>
 
 \score {
-   \transpose c c {
+  \notes \transpose c c {
     \clef C
 
     \override Staff.NoteHead  #'style = #'default
index 8c423cb6d3a86c84463d83e5f7e44a25915c7437..d17d69d9227f352cd6e42fa14af7951351721b3b 100644 (file)
@@ -1,16 +1,16 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 texidoc = "Note head lines (e.g. glissando)
 run between centers of the note heads."
 }
 
-su = { \change Staff = up}
-sd = { \change Staff = down}
+su = \notes{ \change Staff = up}
+sd = \notes{ \change Staff = down}
 
 \score {
     \context PianoStaff
-         <<
+        \notes <<
        \context Staff = up   {
             \set PianoStaff.connectArpeggios = ##t
            \showStaffSwitch
index 69a798e1647d093ed4d21596f252b9036b04aa40..73ac03f063d81cc0249989ff53cab041033c047e 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc=" The number of stafflines of a staff can be set.  Ledger
@@ -8,12 +8,12 @@ adjusted accordingly.  "
 }
 
 \score { 
-\context Voice \relative c {
+\context Voice \notes\relative c {
        c' c c c | g' g g g     \bar ":|"
   }
   \paper {
 
-\context { \Staff
+\context { \StaffContext
 \override StaffSymbol #'line-count = #3
 }  }
   \midi { }
index e03b138e123dbfd523969f642df06db0b61f2cd3..ec1667f4ec05d293a9f1b75ea18dc6e5f78c49ed 100644 (file)
@@ -8,12 +8,12 @@ their horizontal line does not stick out."
 
 
 }
-\version "2.3.4"
+\version "2.2.0"
 
 
 \paper { raggedright = ##t} 
 \score {
-  \relative c'''  {
+  \notes\relative c''' \notes {
   a2 b
   #(set-octavation 1)
   a2 b \break c''1 \break
index 3b1a765f8e2381e32b8bc0b687728880a0db823d..40f759fee3bea3c770df1f2129348b0d246a674e 100644 (file)
@@ -10,7 +10,7 @@ string can be tuned with @code{Staff.ottavation}.
 "
 
 }
-\version "2.3.4"
+\version "2.2.0"
 
 % . There must be a minimum distance between the octavation line and the
 %   topmost staff line, taking into account the height of the closing
@@ -34,7 +34,7 @@ string can be tuned with @code{Staff.ottavation}.
 
 \paper { raggedright = ##t} 
 \score {
-  \relative c'''  {
+  \notes\relative c''' \notes {
   a b c a
   #(set-octavation 1)
   a b c a
index 16a8ff4af4b5f0df0c69f2727b8cd4dcf08dbc11..242483b2fc2b6857066159d035e8ddabfbdf2872 100644 (file)
@@ -1,13 +1,13 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc ="The a2 string is printed only on notes (i.e. not on rests),
 and only after chords, solo or polyphony."
     }
 
-vone =  \relative a' { R1*2 g2 r2 g2 r2 a4 r4 g
+vone = \notes \relative a' { R1*2 g2 r2 g2 r2 a4 r4 g
                         }
-vtwo =  \relative a' { R1*2 g2 r2 g2 r2 f4 r4 g }
+vtwo = \notes \relative a' { R1*2 g2 r2 g2 r2 f4 r4 g }
 
 \score {
     << \set Score.skipBars = ##t 
index 6a60f9c34f8e7878b77fae58e4396fe641e34ae4..1d885e938b1f55ef9a0798ef3b58b2045b56ae70 100644 (file)
@@ -4,10 +4,10 @@
 "
     }
 
-\version "2.3.4"
+\version "2.2.0"
 
-vone =  \relative a' { g4 g f f e e d d }
-vtwo =  \relative a' { e4 e f f g g a a }
+vone = \notes \relative a' { g4 g f f e e d d }
+vtwo = \notes \relative a' { e4 e f f g g a a }
 
 \score {
    \partcombine \vone \vtwo
index 655df4d37abcad79691d07d0c159929e09497956..5a1b30259df49338c43c88a6f0a34a6f2e382de2 100644 (file)
@@ -11,9 +11,9 @@ voices.
   
 "
     }
-\version "2.3.4"
+\version "2.2.0"
 
-vone =
+vone =\notes
 
 %%%%%%%%%%%%%%  0   1   2   3  
 \relative c'' {
@@ -22,7 +22,7 @@ vone =
     a8[ a]  a8[ a]
 }
 
-vtwo =
+vtwo =\notes
 \relative c' {
     \time 2/4
     f8[ f]~ f8[ f] |
diff --git a/input/regression/part-combine-solo-end.ly b/input/regression/part-combine-solo-end.ly
deleted file mode 100644 (file)
index 8a5169d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-\header {
-
-    texidoc = "SOLO is printed even if the solo voice ends before the
-    other one."
-
-}
-
-\version "2.3.4"
-
-\score {
-   <<
-     \new Staff
-       \partcombine
-          { R1 * 2 }
-          { c'8\> c'\! r2.  }
-   >>
-}
index f6c655d248a1c189fbd0cc4e8a85d696a3622fe5..8026a15af913620ed79029d1a3075e264d028d60 100644 (file)
@@ -5,15 +5,15 @@
 
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
 \score {
     \new Staff
-    \partcombine  \relative c'' {
+    \partcombine \notes \relative c'' {
        bes2(
         a4)
        }
-     \relative c' {
+    \notes \relative c' {
        r2 cis4
     }
 }
index c9ee486ebc969d255d023ec499b97f33d5f6f8c2..541c37eee8b3cd5d3cea2971b4de2629e2be0d95 100644 (file)
@@ -14,10 +14,10 @@ Solo 1/2 can not be used when a spanner is active, so there is no solo
 "
     }
 
-vone =  \relative a' { d4 r8 d8 d8 r8 d8 r8 d2 ~ d2 ~ d4 }
-vtwo =  \relative g' { g4.   g8 r2          g4 r4 r2  g4 } 
+vone = \notes \relative a' { d4 r8 d8 d8 r8 d8 r8 d2 ~ d2 ~ d4 }
+vtwo = \notes \relative g' { g4.   g8 r2          g4 r4 r2  g4 } 
 
-\version "2.3.4"
+\version "2.2.0"
 
 \score {
     
index 49edf2ad183927ea22c183129970250bd01ef29f..e53bc2c5b249e9572e124b7b38d809ea59a2b1ae 100644 (file)
@@ -9,10 +9,10 @@ texts accordingly.
     }
 
 
-\version "2.3.4"
+\version "2.2.0"
 
-vone =  \relative a' { R1 a2    r4 r a a a a }
-vtwo =  \relative a' { R1 f4 f4 f4 f f f a a  }
+vone = \notes \relative a' { R1 a2    r4 r a a a a }
+vtwo = \notes \relative a' { R1 f4 f4 f4 f f f a a  }
 
 \score {
    \partcombine \vone \vtwo
index de8d45333361b86cb9b828ff9cf344259c9e2036..35703a0177795a93721ef79afd03055da4364f3a 100644 (file)
@@ -9,12 +9,12 @@
 "
     }
 
-\version "2.3.4"
+\version "2.2.0"
 
-vone =  \relative a' { g2 g    g  g4 g f' c c( c) c c  c ~ c
+vone = \notes \relative a' { g2 g    g  g4 g f' c c( c) c c  c ~ c
                             c2. c4   c
                         }
-vtwo =  \relative a' { f2 f4 f f2 g4 g c, f f  f  f f~ f ~ f
+vtwo = \notes \relative a' { f2 f4 f f2 g4 g c, f f  f  f f~ f ~ f
                             f4 f2. ~ f4
 
                         }
index 95dcd65cc9bbad1625a442e5e193b9e220574955..82321ec10296493a1cce56effbf0ea7b6b2bff47 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -9,7 +9,7 @@
 At a line-break, there are no vertical endings.  " }
 
 \score {
-     \relative c'' {
+    \notes \relative c'' {
         \set Staff.pedalSustainStyle = #'bracket
 
         c4 d e \sustainDown b c c, \sustainUp \sustainDown  d8[ c]  e8[ 
index 3921d5d3937ac8525a26751132796e73dea7693d..eca0a71ee3593f62404b5803bade479ed88b9fd1 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc = "Unterminated piano pedal brackets run to the end of the piece. "
@@ -6,7 +6,7 @@
 }
 
 \score {
-     {
+    \notes {
        \set Staff.pedalSustainStyle = #'bracket
        c4 \sustainDown
        \bar "|."
index 19f58e3f8c7ea17b8dc233349a1a3c52524ca885..b9538f83e5593e703f14cb5f22335ef2b6a3cc64 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header
 {
     texidoc = "The standard piano pedals style comes with Ped symbols.
@@ -8,7 +8,7 @@ at the end of the melody."
 }
 
 \score{
-    \context Staff \relative c'{
+    \context Staff \notes\relative c'{
         c4 d e f g
         \sustainDown b c
         c, d16[  c  c c]  e[ e \sustainUp \sustainDown e e ] f4 \sustainUp 
index 77c6a57d32fec0a1fa2e30d774488dfc24775ef1..32837b2d9facfe914c04f37ed33ce2f32b7ae816 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 texidoc="Ordinary slurs should work well with phrasing slur."
 }
 
 \score {
-  \relative c'' {
+  \notes\relative c'' {
     \time 6/4 c\((d e) f(e d)\)
   }
   \paper {
index 9fd3a57f5db59189ab24a17563820ee55d43094f..84022701e2ca2e1c1c42ad75a2ffc7f86979e564 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -10,7 +10,7 @@ the break alignment."
 
 \paper { raggedright= ##t }
 
-\score{  {
+\score{ \notes {
 a a a a \break
 \mark A
 a a a a}}
index 3ccd25a5082031d1c8e0c6ddf062328671da1b94..9648e54100ab9d45aa006cd9810429ea51aafc70 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc = "Distances between prefatory items (e.g. clef, bar,
@@ -10,7 +10,7 @@ bar-line is different from the start of line.
 
 }
 
-\score {  \relative c'' {
+\score { \notes \relative c'' {
        \set Staff.instrument = "fobar"
        \bar "||:"
        \key cis \major
index 46202ef924fe7a3c5be170107fe676bd0e17a578..f1a75db9da50e09337c70aee2f2976dae9d5dba6 100644 (file)
@@ -6,9 +6,9 @@
 
 }
 
-\version "2.3.4"
+\version "2.2.0"
 \score {
-   \relative c'' {
+  \notes \relative c'' {
       <<
          { \grace e8 d2 }
          \\ { a2 } >>
index 233a809603ba78479d2c331f4f079d8dfa4aa97c..d4b1c3eb21c37faed1c84ef8c0136fb897c6642b 100644 (file)
@@ -1,11 +1,11 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "Once properties take effect during a single time step only."
 }
 
 \score {
-       \relative c' {
+      \notes \relative c' {
          c4
          \once \set Stem = #'()
          c4
index d7c2a5cc7af3674a4ac8d88a12f2d7a67badb1b6..e8c624b208f2e9eedef4fcf2b7676e574e20af10 100644 (file)
@@ -6,23 +6,23 @@
 In this example, all instruments play sounding central C, the target is a instrument in F."
 
 }
-\version "2.3.4"
+\version "2.2.0"
 
 
-\addquote clarinet  {
+\addquote clarinet \notes {
     \transposition bes
     d'16 d'16 d'8 
     d'16 d'16 d'8 
     d'16 d'16 d'8 
     d'16 d'16 d'8 
     }
-\addquote sax  {
+\addquote sax \notes {
     \transposition es'
     a8 a a a a a  a a 
     }
 
 \score {
-    {
+    \notes{
        \transposition f  % french horn
        
        g'4
index 6f175b4eb5efe5821d670cc3de84d3daeaf574b6..eb349a88dd14b7006b50f85f8156ead102395b46 100644 (file)
@@ -5,13 +5,13 @@
 music may be quoted. " 
 
 }
-\version "2.3.4"
+\version "2.2.0"
 
-\addquote bla \relative c' {
+\addquote bla \notes\relative c' {
     fis4 g a b }
 
 \score {
-     \relative c'' {
+    \notes \relative c'' {
        c8 d8 \quote bla 2 es8 gis  
     }
 }
index 0105a5f94ca6b84a0eade02e890e8e8c1c3a3a60..f5a72713819824f4d2a8e0e36151a06530033beb 100644 (file)
@@ -5,8 +5,8 @@ and after Z, double letters are used.  The mark may be set
 with @code{\mark NUMBER}, or with @code{Score.rehearsalMark}."
       }
 
-\version "2.3.4"
-\score {   \relative c'' {
+\version "2.2.0"
+\score {  \notes \relative c'' {
   c1  \mark \default
   c1  \mark #7
   c1  \mark \default
index b60cc014e0b89c8722f61e226bd19cf29638686e..42d94eb021df5ff1408198031ccd08711f58ab42 100644 (file)
@@ -5,9 +5,9 @@ By setting @code{markFormatter} we may choose a different style of mark printing
          
       }
 
-\version "2.3.4"
+\version "2.2.0"
 \score {
-   \relative c''{
+  \notes \relative c''{
     \set Score.markFormatter = #format-mark-numbers 
   c1 | \mark \markup { \musicglyph #"scripts-coda" }
   c1 | \mark \default
index e70b21340fa46cec24010a92a8de53ee2d516e9b..f0f2f4d85566f4e231a69aa0901ddbb0e1f4fa73 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -8,7 +8,7 @@ should not be more alternatives than repeats.
 }
 
 \score {
-  \context Staff  \relative c'' {
+  \context Staff \notes \relative c'' {
     \repeat fold 3 { c^"3$\\times$ 0alt" d }
     % less alts than body
     \repeat fold 4 { c^"4$\\times$ 2alt" d } \alternative { e f }
index e58fcc788822fffc1bf7ef1b2ba4681fcde9e22a..7cd23896795e50fd3d459f2affd9e144d04b8071 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -10,7 +10,7 @@ bracket should be equal.
     \paper { raggedright= ##t }
 
 \score  {
-
+\notes
 \context Staff\relative c''  {
        \repeat "volta" 2 { c1 \break } \alternative { d e }
        c1
index 4c0594d3e1b4eb4e49e345217be49d0b56ece39c..a1e559e4299d2f5f62e42cebf460e091ac605749 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 
 \header {
@@ -10,7 +10,7 @@ texidoc = "Percent repeats are not skipped, even when @code{skipBars} is set."
 \score {
      \context Staff <<
        \set Score.skipBars = ##t
-        {
+       \notes {
        \repeat "percent" 2 { g2 a g a }
        }
      >>
index 5abe042ab7d41f22dda4b8ff9429e4e26491776b..23a9e687bf5e07c68c153c02c632d03bf9492596 100644 (file)
@@ -1,9 +1,9 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "Measure repeats may be nested with beat repeats."
 }
        
-\score {  \relative c'' \context Voice { \time 4/4
+\score { \notes \relative c'' \context Voice { \time 4/4
    % riff
    \repeat "percent" 2 { r8. a16 g8. a16 bes8. a16 f8 d |  a c8 ~ c8 d8 ~ d8 r8 r4 }
    
index e212d45384b6fd697f1614ea527a1b613e5ffcc1..0ee7c70faf4504e28d922c37f374d5651b424b9b 100644 (file)
@@ -1,10 +1,10 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "Within a bar, beat repeats denote that a music snippet should be
 played again."
 }
 
-\score {  \relative c'
+\score { \notes \relative c'
         \context Voice { \time 4/4
    \repeat "percent" 2 { c2 }
 
index 821731207e9f9c07d086925bf2d006b99a091917..db3fc7de036d0a480337213b73edc7e21a1f3c3a 100644 (file)
@@ -1,19 +1,19 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc = "Volta repeats may be unfolded through the Scheme
     function @code{unfold-repeats}."
 
 }
 
-nots = \relative c'   {
+nots = \notes\relative c'   {
     c4 \repeat volta 2 c4 \alternative { d e  }
 }
 
 \score {
-     \context Voice {
+    \notes \context Voice {
        \nots
        \bar "||"
-       \applymusic #unfold-repeats \nots
+       \apply #unfold-repeats \nots
     }
     \paper {raggedright = ##t} 
 }
index 6778729e702d460ba3b6bf4ffc10b51e2480d3e0..c1a1bde861bf14963b76608920a8f152333eb241 100644 (file)
@@ -1,27 +1,18 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
-    texidoc = "Unfolding tremolo repeats. All fragments fill one
- measure with 16th notes exactly."
+    texidoc = "Unfolding tremolo repeats. Both fragments fill one 2/4
+ measure with 32nd notes exactly."
 
 }
 
 
 \score{
-    {
+    \notes{
        \time 2/4 
-       \applymusic #unfold-repeats     
-       { \repeat tremolo 4 { c'16 e' } |
-         \repeat tremolo 8 c'16 } |
-
-       \time 3/4 
-       \applymusic #unfold-repeats     
-       { \repeat tremolo 6 { c'16 e' } |
-         \repeat tremolo 12 c'16 } | \bar "|."
-       
-       \bar "|."
-
-       
+       \apply #unfold-repeats  
+       { \repeat tremolo 8 { c'32 e' } |
+         \repeat tremolo 16 c'32 } | \bar "|."
     }
     \paper { raggedright = ##t }  
 }
index 461d05ffe13c0513f86433b8611d12615702826d..b1761ef65efe3c33179847d50b94babad3b95b1a 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -17,7 +17,7 @@ Unfolded behavior:
 
 \score {
 
-  \context Voice \relative c'' {
+  \context Voice \notes\relative c'' {
 \repeat unfold 3 { c^"3x 0a" d }
 % less alts than body
 \repeat unfold 4 { c^"4x 0a" d } \alternative { e f }
index 6956721043817c2bc616020394fb491e7df40f12..9b359bd9b3260f8d2add2d1b8e5fe6056e0b0e38 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc = "When too few alternatives are present, the first
@@ -7,7 +7,7 @@ alternative is repeated, by printing a range for the 1st repeat."
 }
 
 
-\score {   \relative c'' \context Voice {
+\score {  \notes \relative c'' \context Voice {
   \repeat volta 3 c1
     \alternative { d f } e4 } } 
 
index 646d48393e043443f9b287800403b5ab44e90bbc..db76a9ce4dcfb074a4b1a9566fde9081849fdfb2 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -9,7 +9,7 @@ If they don't barlines should still be shown.
 
 %  no alts.
 \score {
-   \context Voice \relative c'' {
+  \notes \context Voice \relative c'' {
     % repeat non aligning with barlines.
     \repeat volta 3 { c^"3$\\times$ 0alt" d e }
     % less alts than body
index 2968667bff9df4976bfa99eb0a327d40a25e887f..2d40194357841a2d4975f4d3d80d4aa08ae8724f 100644 (file)
@@ -2,15 +2,15 @@
     texidoc = "Rests under beams are only moved if necessary."
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
-fig =   \relative c' {
+fig =  \notes \relative c' {
     <a c e>8[ r <c e a> r <e a c> r <a c e>]  r |
 }
 
                         
 \score {
-   \relative c' \new Staff {
+  \notes \relative c' \new Staff {
      \fig 
       \transpose c c,  \fig
       \new Voice { \stemUp \transpose c f  \fig }
index b951be6cecd70ee3e014171957c0bf8770c2cca2..eec4d9e90a5e08406da38e50055e393569d6b72f 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc="
 Rests should not collide with beams, stems and noteheads.  Rests may
@@ -10,30 +10,30 @@ cases.
 "
 }
 
-scale =  \relative c' {
+scale = \notes \relative c' {
   c8 d e f g a b c c d e f g a b c
 
 }
-rests =              {
+rests = \notes             {
   r r r  r r r r r r r r r r r r r
 } 
 different = <<  {
-       \relative c'' {
+      \notes \relative c'' {
         r8 a e4 a e
       }
     }\\ {
       
-       \relative c'' {
+      \notes \relative c'' {
         r1
       }} >>
 
-scales = \context Staff  <<
+scales = \context Staff \notes <<
         {  r1 r2 r2   \scale    c''1 c'2 a'2 \rests  }
         \\
         { a'1 a'2 d'2 \rests r1 r2 r2  \scale }
 >>
 
-restsII = \context Staff  {
+restsII = \context Staff \notes {
        r4 r8
        \context Staff << {  r8 } \\{  r8} >>
        \context Staff << { r8} r8 \\{  r8} >>
@@ -44,7 +44,7 @@ restsII = \context Staff  {
        }
 
 \score{
-        { 
+       \notes { 
                \scales 
                \restsII 
        }
index cb09aa2012113007a9ebfe3ff380eb6d4f564605..8118f096b40e50716aa3a0cce60b189f39ff8a22 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "Whole and half rests moving outside the staff should get
 ledger lines."
@@ -6,7 +6,7 @@ ledger lines."
 
 
 \score {
-  {
+\notes  {
    \override Rest  #'staff-position = #4
   r1 \override Rest  #'staff-position = #5
   r1 \override Rest  #'staff-position = #6
index 1d8f61a84d732c845291c00a9e850700202069b1..80cac1b2f2908bac502d85f94247d2473257129f 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
 texidoc = "Rests can have pitches--these will be affected by
@@ -9,7 +9,7 @@ beam/rest collision resolving will leave it alone."
 
     \paper { raggedright= ##t }
 
-\score { \relative c'' 
+\score { \notes\relative c'' 
         {
             a4\rest b4\rest c4\rest
 
index 1a15c62f17168158d12d049792eee4649bf4d579..5f28e73a9cd678a23790615ef6bc168ff3599561 100644 (file)
@@ -7,10 +7,10 @@ even if there is no opposite note or rest. The amount is two
     }
 
 
-\version "2.3.4"
+\version "2.2.0"
 
 \score {
-  \new Staff  \relative c' {
+  \new Staff \notes \relative c' {
      << { r8 g''4 g8 r g4 g8 } \\
             { d,4    r   d   r   } >>
   }
index 49ed735981faa39d6cc09bc8d26f0eacc663f151..ad8aa8baaa3fa094f27cc7be9c42a7d18e0b1565 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -9,7 +9,7 @@ whole rest are centered on the middle staff line.
 }
 
 
-       \score {  {
+       \score { \notes {
        \time 4/4
 r \longa * 1/4  r\breve * 1/2 
 r1 r2 r4 r8 r16 r32 r64 r128 r128
index 8274163b016d12471c408a55d5fc5e166b29c132..7d264bf25be9f66e605fb7f1869435b69384dd0f 100644 (file)
@@ -1,11 +1,11 @@
-\version "2.3.4"
+\version "2.2.0"
 \header
 {
 
     texidoc = "In rhythmic staves stems should go up, and bar lines have the size for a  5 line staff. The whole note hangs from the rhythmic staff."
 }
 
-\score {  \context RhythmicStaff
+\score { \notes \context RhythmicStaff
   {
             r4 c4. c8 r8 c8 | c2 r2 | r1
   }
index 8ffc85a8ac88ea56522251a2b231c3ba89462518..65680731333afd21a0bec88545a4f09609f09c55 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -7,7 +7,7 @@
 }
 
 \score  {
- \relative c'' {
+\notes \relative c'' {
   c4
   <c d c'>\marcato
   <<  { c4^^ }\\
index 300682ff1e49bca427b74b139e496722484edd88..9e0386a5bbf576ad1ac1dd4610fd33e1190b1b9c 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "Scripts can be stacked. The order is determined by a
 priority field, but when objects have the same priority, the input
@@ -7,7 +7,7 @@ order determines the order. Objects specified first are closest to the note.
 "
 }
 
-\score{ \relative c'' { c4^"inner up"^"outer up"_"inner down"_"outer down" }
+\score{ \notes\relative c'' { c4^"inner up"^"outer up"_"inner down"_"outer down" }
        \paper { raggedright = ##t}
     } 
 
index 5d2558bdce159d0ead5b8930a55269619c31a38e..09718c7a42b6d051f3d4876dc232614e4d14cc33 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \paper { raggedright= ##t }
 
@@ -6,5 +6,5 @@
 texidoc = "Scripts may be stacked."
 }
 
-\score {  { c'''->-. } }
+\score { \notes { c'''->-. } }
 
index 048f3ac48457a5bfece7dfdeddafb1897323e657..629ff083d05b0a1350a89e39d08e7e4e8e29e3ce 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
index 1400035cbb1cae2c4ff5c42141a47a55a1cb46e4..a98b2140dd3e1d8868ef907b6a251447f8b2f29f 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 foollilypondbook = "
 \score
 "
index 0cffa4eb4a59378f90df20c01a3008926ab84470..e515aab9449d3849f067404dde6d5f00a40f6a73 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 foollilypondbook = "
 \score
 "
index 5a28aaeb3daf3d39a66b4e4231424a3a95f8aa92..72ad331c5f5139ca728e29eece68a903cebb4e89 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 foollilypondbook = "
 \score
 "
index 557dc9699d2e238fc08b0cb877e15242c888939b..f0e502866f95464c6cfa8de069a1061de7fe6cc1 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 foollilypondbook = "
 \score
 "
index e4ce8be2a1a1f6f6b3a5144d6052e5cb9004e8fe..1368409e7966ca56a80c6f829c56a72dad0d6912 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 foollilypondbook = "
 \score
 "
index be1b21a7a07fe38136928ea879d1ab201d44e614..4fc342756f9001805f91cedbd20467250462ab5d 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     
     texidoc = "The area underneath an (up) slur is minimised to improve the shape. "
@@ -7,7 +7,7 @@
 }
 
 \score{
-\relative c''{
+\notes\relative c''{
 
 \slurUp
 \stemDown
index 24c1427fedf00dd2b3ac644bf6df2dbe5c46ffb5..77a07df65cce956ad31abcf59e9dfdcc276e02ff 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -8,7 +8,7 @@ with beams.
 "
 }
 \score{
-        \relative c''{
+       \notes \relative c''{
                \override Slur  #'direction = #1
                a8( a a4)
                a4( a8 a)
index 4c435c60cc77cb1273299c32906f13b2a0c6df61..d141ec79f1bfae0c64586d3b9264922efa54fec4 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -10,7 +10,7 @@ in unbroken state.
 "
 }
 \score{
-        \relative c''{
+       \notes \relative c''{
                e1( \break a,)
                \time 2/4
                e'2( \break a,)(\break
index 5d19240984e2cbe34fdac7977110911d1a5d084a..b8dc7a787fb288296e324320a62459f5b16cc492 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc="
 Slurs behave decently when broken across a linebreak.
@@ -9,7 +9,7 @@ Slurs behave decently when broken across a linebreak.
        
 \score{
        \context PianoStaff <<
-       \context Staff=one \relative c'{
+       \context Staff=one \notes\relative c'{
                \stemUp \slurUp
                 c4( c \change Staff=two c  c) |
                \change Staff=one
@@ -39,7 +39,7 @@ Slurs behave decently when broken across a linebreak.
                 c4( \change Staff=one c c \change Staff=two  c)
                r1
        }
-       \context Staff=two \relative c'{
+       \context Staff=two \notes\relative c'{
                \clef bass
                s1 s1 s1 s1 s1 s1 s1 s1 s1 s1
        }
index 2365e8bf18b6c18de82f21b0637519438842bf9e..078e09e09c63bfbb7293137b0d35e0d5c56c32c0 100644 (file)
@@ -1,11 +1,11 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc="Slurs should not get confused by augmentation dots.  With a lot
 of dots, the problems becomes more visible."
 }
 \score {
-  \relative c'' {
+  \notes\relative c'' {
     c4.............( c)
   }
   \paper {
index c2afcda8429a52f5d4ef240d421a342187d9cbd1..9939ddaeb5fe58907b274ca9c8ced711f2933f3d 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc="
 Slurs should look nice and symmetric.  The curvature may increase
@@ -9,7 +9,7 @@ run through noteheads or stems.
 }
 
 \score{
-       \relative c''{
+       \notes\relative c''{
                \time 3/4
                \slurUp
                \stemBoth a ( \stemDown a \stemBoth  a) a( c  a) a( e'  a,) a( g'  a,)
index ace379b5a88ae2c358eec233270c63f58956c1fb..860bf5dac119840e475b90e945eabea488065118 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header
 {
     texidoc ="Slurs may be placed over rest. The slur will avoid colliding with
@@ -7,7 +7,7 @@ the rest.
 
 "
 }
-\score{   { \stemDown c'4 ( r4  c'2)
+\score{ \notes  { \stemDown c'4 ( r4  c'2)
 
                  \relative c'' { 
        % Finish with F if played separately 
index 0841c171b81c5f986dc09c94ed61808bae37f224..71fa204f3fb1ca98d7f84d2eba9ef5780d6e6361 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc="An extra offset may be added between a slur and staccato(s)."
 }
@@ -7,7 +7,7 @@ texidoc="An extra offset may be added between a slur and staccato(s)."
 \paper { raggedright = ##t}
 
 \score {
-  \context Staff \relative c'' {
+  \context Staff \notes\relative c'' {
     \override Slur 
       #'attachment-offset = #'((0 . 1) . (0 . 1))
     a-.( g-.  a)-.
index ace158908ce9272a2f9b2452b886897f1b451508..26969c420c025d4273e54c182cbe4549e4c16e65 100644 (file)
@@ -1,11 +1,11 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc="Trend of broken slur with user-overridden stem attachment should also
 follow the same vertical direction it would have had in unbroken state."
 }
 \score {
-  \relative c' {
+  \notes\relative c' {
     \override Slur  #'attachment = #'(stem . stem)
     f( c' c c \break
     c c c \stemUp  c)
index 9790aea1cf20fb24bca9a0977490761249369ea7..547cec842e961def6e5d404e0a41c0303e02e049 100644 (file)
@@ -1,11 +1,11 @@
-\version "2.3.4"
+\version "2.2.0"
 \header
 {
   texidoc = "Symmetric figures should lead to symmetric slurs."
 }
 
 \score{
-       \relative c''<<
+       \notes\relative c''<<
                \time 4/4
                \context Staff{
                        f8(f f f) f(g g f) f(a a f) f(b b f)
index 8b45739f6c7d703ac4d85d2e84b1936dfa0833f5..626859ec46023630e4ce69a508969c888c8c40f1 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header
 {
     texidoc = "Symmetric figures should lead to symmetric slurs."
@@ -6,7 +6,7 @@
 }
 
 \score{
-       \relative c'<<
+       \notes\relative c'<<
                \time 6/8
                \context Staff{
                        e8(e e) e(d e) e(c e) e(b e)
index 63680cecdf40fb89a29621668ae6cca3cc0fbcf6..4244909a07b600ddab9890b43dd2b720f99a7715 100644 (file)
@@ -1,11 +1,11 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header { 
 texidoc = "Accidentals in different staves do not affect the
 spacing of the quarter notes here."
 }
 
-\score {  \relative c'' << \new Staff { \time 4/4
+\score { \notes \relative c'' << \new Staff { \time 4/4
 
  c8[ c8 cis8 cis8]
  cis8[ cis8 cis8 cis]
index ef5e1230d284e9c4dca056f29973fa0a706f5d96..a8bab93f4e3c9b51b1d7f9ac6a49c879cf81c022 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
     texidoc = "Accidentals do not influence the amount of stretchable space.
@@ -8,7 +8,7 @@ The accidental does add a little non-stretchable space.
 }
 
 \score {
-      \relative c'' \context GrandStaff {
+     \notes \relative c'' \context GrandStaff {
        #(set-accidental-style 'piano-cautionary)
        d16 d d d d d cis d 
        
index 840833fba03e9039318df74af64e7e6db6d49ffb..0ee6aeb1c814e9e6a09936f7d5b3260724ec2414 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 texidoc = "Accidentals sticking out to the left
 of a note will take a little more space, but only if the spacing is tight." 
 }
 
-\score {  \relative c'' {
+\score { \notes \relative c'' {
     \time 8/4
     c2 c2 cis2 cis2 |
     c8 c8 cis8 cis8 cis c c c]
index a9d7fb09c62ca0d77e0bfb351b4ed44dd31b5340..1bd933b6bdffa9098db59ac6d7d6eed5025992c9 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "Downstem notes following a barline are
 printed with some extra space. This is an optical correction similar
@@ -11,7 +11,7 @@ Accidentals after the barline get some space as well.
 
 sd = \override Stem  #'direction = #-1
 su = \override Stem  #'direction = #1
-\score { \relative c''
+\score { \notes\relative c''
 {
 
 %\override Staff.StaffSpacing  #'stem-spacing-correction = #10
index a3812b7c3319be045fb989161e324bd19dc968af..695fdf2954db868673d7c2c9400501cf630fd842 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc = "Clef changes at the start of a line get much more space
@@ -6,7 +6,7 @@ than clef changes halfway the line."
 
 }
 
-\score  {  {
+\score  {\notes  {
     << \new Staff {
        c'2
        \clef bass e16 f a
@@ -17,7 +17,7 @@ than clef changes halfway the line."
       }>>
     }
     \paper { raggedright = ##t
-\context { \Staff
+\context { \StaffContext
              TimeSignature = \turnOff
         }
 
index cc14ecc473ce06b27675a9c97418ffb738cc0cb1..8f5b91c03506e3fbfc93b647cee0a39c156e7a01 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     
     texidoc ="Broken engraving of a bar at the end of a line does not upset 
@@ -7,7 +7,7 @@
 
 \score
 {
- \relative c' {
+\notes \relative c' {
     c2.. r8
     c2.. r8
     \time 3/4 \break
index 016a7c4cd0061aaf54c41976ecc53d8b940146dd..959614c667b56acc6ff2be2fdc408c851c9bac76 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.3.4"
+\version "2.2.0"
 \header { texidoc = "
 A voicelet (a very short voice to get polyphonic chords correct)
 should not confuse the spacing engine."
@@ -7,7 +7,7 @@ should not confuse the spacing engine."
 
 
        \score {
- {  \context Staff \relative c' {
+\notes {  \context Staff \relative c' {
   c4
   <<
       { r4 dis'4 } \\
index bdf5719a2d2a105605df158bfe86b6e828d2eedd..d14e69d7c6945ab122fb15a7a706a11c8bb021f0 100644 (file)
@@ -1,10 +1,10 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "A clef can be folded below notes in a different staff, if
 this does not disrupt the flow of the notes."
 }
 
-\score {  \relative c'' <<
+\score { \notes \relative c'' <<
 \new Staff  { c4  c16[ c c  c] c4 c4 }
        \new Staff { \clef bass c,2 \clef treble  c'2 }
        >>
index 69d125a2faebf2088e61bd852d30e1f6fddac591..5e8c4ca002d5a7e743487856700660185497bf06 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
 texidoc = "A clef can be folded below notes in a different staff, if
@@ -6,14 +6,14 @@ there is space enough. With @code{Paper_column} stencil callbacks we can
 show where columns are in the score."
 }
 
-\score {  \relative c'' <<
+\score { \notes \relative c'' <<
        \new Staff  { c4 c4 c4 \bar "|." }
        \new Staff { \clef bass c,2 \clef treble  c'2 }
        >>
 
        \paper { raggedright = ##t
 
-       \context { \Score
+       \context { \ScoreContext
          \override NonMusicalPaperColumn #'print-function = #Paper_column::print
          \override PaperColumn #'print-function = #Paper_column::print   
          \override NonMusicalPaperColumn #'font-family = #'roman
index 77187702b8d0d229ea225b2d5b9608a6d49c9090..8b645f4bfe6044e77839b48396626a1d3cd7b932 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc = "Spacing uses the duration of the notes, but disregards
@@ -9,7 +9,7 @@
 "
 }
 
-\score {  \relative c''
+\score { \notes \relative c''
         \context Voice 
 {
      c8[  c8]
index 4b63a944ebde19193cb8f6f5dd460dc80dcb0255..3cbe630924af32197a6c3e137fbba2fa67fc5716 100644 (file)
@@ -1,11 +1,11 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
   texidoc = "Grace note spacing. Should it be tuned? "
 }
        
 \score {
-  \context Voice \relative c'' { \grace {  c16[ d] } c4 }
\notes \context Voice \relative c'' { \grace {  c16[ d] } c4 }
   \paper { raggedright = ##t}
 
 }
index 13f4a1399e2e1c02a2809e8a1f4c80af02320d70..3fa0bb9087a8fdf074ee9dc6abce3aa184e61b68 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc = "For knees, the spacing correction is such that the
@@ -6,7 +6,7 @@ stems are put at regular distances. This effect takes into account the
 width of the note heads and the thickness of the stem.
 "
     }
-\score { 
+\score { \notes
 {
  g''8[ g g'' g''] 
 
index 8e7270886a50eff3c73482d0354128d0f36f3c4d..d05dc752a7fc15ce032d88badf99279c304d41f0 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc = "Concurrent tuplets should be equidistant on all staffs.
 
@@ -9,7 +9,7 @@ uneven spacing.
 
 
 
-multipart =  \relative c'{ 
+multipart = \notes \relative c'{ 
     \context StaffGroup << 
                 \new Staff  \context Voice { 
                    \times 2/10 {  c8[ c c c c c c c c c] } 
@@ -23,7 +23,7 @@ multipart =  \relative c'{
        }
     
 \score{
-     { 
+    \notes { 
        \multipart 
     }
 
index b6fef5be214bf0487dfb8f80cf21016018d2cecf..7a000c56b0a5b7b29b31aa0ee52bece8cf9cfc00 100644 (file)
@@ -7,7 +7,7 @@ texidoc = "The flags of 8th notes take some space, but not
 
 }
 
-\score {  \relative c'' \context Staff {
+\score { \notes \relative c'' \context Staff {
     \set autoBeaming = ##f
     a8[ a8 a8 a8]
     a8 a8 a8 a8
@@ -17,5 +17,5 @@ raggedright = ##t
     }
      }
 
-\version "2.3.4"
+\version "2.2.0"
 
index f18898601430ef3437905090637fd9ac33fc4c58..70b258240d2e9efa4b517f7bda8348a9bae4fb30 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -10,7 +10,7 @@
 
 
 \score  {
-     \relative c'' \new Staff { \repeat unfold 20 { c1 } }
+    \notes \relative c'' \new Staff { \repeat unfold 20 { c1 } }
     \paper{
        raggedlast = ##t
     }
index 6c09a547943060e7b6395e2e100ff016c32ef558..559477dbf81fb026019d73eb95b862b3c365f24e 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "Rests get a little less space, since they are narrower.
 However, the quarter rest in feta font is relatively wide, causing this 
 effect to be very small.
 "
     }
-\score {  \relative c'' \context Staff {
+\score { \notes \relative c'' \context Staff {
     \time 12/4
     r4 c4 c4 c4 r4 r4 c4
 }
index a4d95d0ed81c93c68c691ed0eaa352facc82032b..bfba06f52d768dcc9d8b842671dc6c9ff88a2d02 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     
 texidoc = "Notes that are shorter than the common shortest note get a
@@ -10,7 +10,7 @@ eighth note. "
 
 }
 
-\score {  \relative c''
+\score { \notes \relative c''
 {
     \time 2/4 
     c16 c c c c4 c4
index 6688f4f3d0bd40575e817235b39a08c8256c4696..f5cc5b3e887bd860d411788cd2bd3e00de05f3b4 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
 texidoc = "Upstem notes before a barline are printed with some extra
@@ -10,7 +10,7 @@ space. This is an optical correction similar to juxtaposed stems.
 
 sd = \override Stem  #'direction = #-1
 su = \override Stem  #'direction = #1
-\score { \relative e'
+\score { \notes\relative e'
 {
 
 %\override Staff.StaffSpacing  #'stem-spacing-correction = #0.5
index 9b103a12fded3f452018e60cc1ee59f7297a253c..c32e930274d852f982bb3f6e70b4174202de7611 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 
@@ -12,7 +12,7 @@ much to correct."
 }
 
 \score { 
-  \context Voice \relative c {
+  \context Voice \notes\relative c {
   % make sure neutral is down.
     \override Stem  #'neutral-direction = #-1
        \time 16/4  c''4 c c,  c' d, c' e, c' f, c' g c a c b c
index d54797b783ffbdaf29af355a2331fc182e6478b9..4b8f592b8971bbbce553d11a2107f9f3965df11a 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
        texidoc = "For juxtaposed chords with the same direction, a
 slight optical correction is used. It is constant, and works only if
 two chords have no common head-positions range."
 }
 
-\score {  \relative c'' {
+\score { \notes \relative c'' {
 \stemDown
 \time 12/4
   f8[
index 235443eb66c9b89ed497c255678d2b2a17086c15..fb7358ea895339e4b0f945812516f3ac1fe96e18 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc ="Space from a normal note (or barline) to a grace note is
@@ -8,7 +8,7 @@
 }
 
 \score {
-    \context Voice 
+    \context Voice \notes
     { \time 2/4
       \relative c'' {
          e8 e \grace d8 e e \grace f8 e es, d' d
index 7ddca62965a7ee16cf6ef8f5d29e67fc6f6ddb28..f293050badaae2e9a79281f9473eea3de47b0fef 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "
  When tightly spaced, the spaces between elements (hinterfleisch?) 
@@ -14,7 +14,7 @@ texidoc = "
  
  }
 \score {
-        \relative c''{ 
+       \notes \relative c''{ 
                r1 e4 f, e' f,
        }
        \paper { 
diff --git a/input/regression/span-bar-break.ly b/input/regression/span-bar-break.ly
deleted file mode 100644 (file)
index 5498eea..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-\version "2.3.4"
-
-\header {
-
-    texidoc = "At the beginning of a system, the @code{|:} repeat
-barline is drawn between the staves, but the @code{:|} is not."
-
-      }
-
-\score {
- \new PianoStaff <<
-    \context Staff = up {
-       \bar "|:" r1
-       \bar ":|" \break r1
-    }
-    \context Staff=down { r r }
-  >>
-  \paper{ raggedright = ##t }
-}
index d75dee2f1c51b19b2e1e5b4f3752da1f56182265..7fd2cf3f1e39bc65576958c998ba3e1ef3f5fb2e 100644 (file)
@@ -1,16 +1,16 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
   texidoc = "Span bars are drawn only between staff bar lines. By setting 
 bar lines to transparent, they are shown only between systems.
 
-Setting @code{SpanBar} transparent  removes the barlines
+Setting @code{SpanBar} transparent does the removes the barlines
 between systems.
  
 "
 }
 
 \score {
-   \relative c' \new StaffGroup <<
+  \notes \relative c' \new StaffGroup <<
     \new Staff {
       \override Score.BarLine #'transparent = ##t
       a1 a1
@@ -28,7 +28,7 @@ between systems.
   >>
   \paper {
     \context {
-      \Staff
+      \StaffContext
     }
     raggedright =##t 
   }
index 2d84917481f4e90b663c4a13bb9caf6846e7b16d..2e75baa8642b62acf2a3928b59ea9fa19503856f 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 
@@ -11,7 +11,7 @@ to it.  "
 }
 
 \score { 
-    \context Voice \relative c' {
+    \context Voice \notes\relative c' {
        e'4-. f-. g-. d-. c-. b-.
        \stemDown
        e,-. d-. c-. b-. a-. g-.    
index f55c55847ce0bde7fc9ba686e81c7b7ccbf2708d..cbfab0d4ad2568b08f9b867d7714677dfdd0e47f 100644 (file)
@@ -2,10 +2,10 @@
 \header { texidoc = " Staves starting and ending halfway include clefs
     and bar lines.  " }
 
-\version "2.3.4"
+\version "2.2.0"
 
 \score {
-    \new StaffGroup  \relative c''  <<
+    \new StaffGroup \notes \relative c''  <<
        \new Staff { c4  c c c \bar "||" c c c c }
        { \skip 4 \new Staff { c c c } }
     >>
index 0a9ce17428aec6e97318beb2c9337083848b3e34..a34d309c166faaf113c389e9ebf64a86eeaf299b 100644 (file)
@@ -7,7 +7,7 @@ large on smaller staves."
 
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
 \score {
   <<
@@ -15,12 +15,12 @@ large on smaller staves."
       fontSize = #-4
       \override StaffSymbol #'staff-space = #(magstep -4)
     }
-     \relative c' {
+    \notes \relative c' {
 \override DynamicText  #'extra-offset = #'(0 . 3)
       s1-\f c''8[(\< r a g]) e[ r d( <f a>])\! \times 2/3 { d4 d d }
     }
     \new Staff
-     \relative c' {
+    \notes \relative c' {
 \override DynamicText  #'extra-offset = #'(0 . 3)
       s1-\f c''8[(\< r a g]) e[ r d( <f a>])\! \times 2/3 { d4 d d }
     }
index 86b6ef69e6775157107e58fd80296e50622fc0dc..ab3ceff435b58b90e197a8a7a2ab27801d75e56e 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 texidoc = "The staff is a grob (graphical object) which may be adjusted as well, for example, to have 6 thick lines and a slightly large @code{staff-space}.
@@ -7,10 +7,10 @@ However, beams remain correctly quantized."
 }
 
 
-mus =  \relative c' { c4 g' d'8 d d d }
+mus = \notes \relative c' { c4 g' d'8 d d d }
 
 \score {
-   <<
+  \notes <<
     \new Staff {
        \override Staff.StaffSymbol  #'thickness = #2.0
        \override Staff.StaffSymbol  #'line-count = #6
index e2c401aae8a0ebcf77db4aed2cf1c0e422d0d31e..287a811ea2eeed730c692adb2f7815ffd43c55c5 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 texidoc = "Stanza numbers are put left of their lyric. Theyr are aligned in a column."
@@ -6,7 +6,7 @@ texidoc = "Stanza numbers are put left of their lyric. Theyr are aligned in a co
 
 \score {
 <<
-    \context Voice = "A"  \relative c'' { r4 r4 c4  c4 }
+    \context Voice = "A" \notes \relative c'' { r4 r4 c4  c4 }
     \lyricsto A \new Lyrics \lyrics  {
        \skip 2
        \set stanza = "1."
index 0ca5526079d4a0da3f54ac64266df3f4ae752968..65b78db6d89f171838d2a870d5cc49e3e4312a12 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -15,7 +15,7 @@ notes, and up for low notes.
 
 
 \score { 
-  \context Voice \relative c {
+  \context Voice \notes\relative c {
     b''4 ~ b8(b8) e4 e,
        
   }
index 753b6759f2a0344475d07f3e7f60379c8dbce414..6ec6b134da5c7f90bae7f07f074fd20968a3301e 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
     
@@ -10,7 +10,7 @@
 }
 
 \score {
-     \relative c'' {
+    \notes \relative c'' {
        \stemDown d c b a g f e
        \stemBoth
        \stemUp a b c d e f g a
index 69ae2718b48ad1d4d2e427a43cefc5a40f2584ee..3a8d0882972dd5ea33b9037eb997206a029dbf7b 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -10,7 +10,7 @@ In this example, space for opposite pointed stems is adjusted.
 }
 
 \score { 
-  \context Voice \relative c {
+  \context Voice \notes\relative c {
     
        \time 12/4  c''4 c c c  a f' f, a 
        
@@ -21,14 +21,14 @@ In this example, space for opposite pointed stems is adjusted.
 }
 
 \score { 
-  \context Voice \relative c {
+  \context Voice \notes\relative c {
     
        \time 12/4  c''4 c c c  a f' f, a 
        
   }
   \paper {
     raggedright = ##t
-    \context { \Score
+    \context { \ScoreContext
     \override SpacingSpanner #'stem-spacing-correction = #0.0
   }  }
 }
index 5a200f02f3aaa8c9d73406f3b4827f36c676af5c..a37065b2fbc3cad82af034a70527ab34a5e56ad8 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc="
 Stem tremolos or rolls are tremolo signs that look like beam segments
@@ -11,7 +11,7 @@ tremolo must be centered on the note.
 
 
 \score{
-       \context Voice \relative c''{
+       \context Voice\notes \relative c''{
                \override TextScript  #'direction = #1
                \override TextScript  #'padding = #5
                a1:4^":4" a:8^":8" c:16^":16" a:32^":32" a^"x" a:^":"
index 346d7aea63ccf3b099730ef11957f8c226a05cd2..315f942cbae12075d3af1aa716c2a7ec694bd437 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc = "The size of every system is correctly determined; this 
@@ -6,7 +6,7 @@
 
     }
          
-\score { 
+\score { \notes
 \context Voice
 { \unset Staff.minimumVerticalExtent 
     \slurDown c4 ( g4  c''4)
@@ -15,7 +15,7 @@
 
     \paper { 
         \context {
-            \Score
+            \ScoreContext
             \override System #'print-function = #box-grob-stencil
             }
     }
index 7ee7c61335b0d01d120f40fd72e19e62b268a51a..b02641ac217d2c86012e65fa0a8aabae6dac4bde 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc =
 "
@@ -7,7 +7,7 @@ The piano brace should be shifted horizontally if it  is enclosed in a bracket.
 }
 
 
-\score {   {
+\score { \notes  {
     \context StaffGroup <<
        c4
        \context PianoStaff <<
index 8841ae47307b3eca483e7507a73078dd120df244..d2be7f20ea8a08b960980d919ba7f61f2cdea828 100644 (file)
@@ -6,10 +6,10 @@
 
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
 \score  {
-     \new TabStaff {
+    \notes \new TabStaff {
        \set TabStaff.stringTunings = #'(5  10 15 20)
        \relative c''  { c4 d e f }
        }
index e23ccaa854a1832bedfbcdaeb139658820b3b882..8c1044fd6190768249bc23a9f567b96b88037763 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header{ texidoc = "@cindex Tabulature
 A sample tablature, with both normal staff and tab.
@@ -12,7 +12,7 @@ chord articulations (outside a chord)
 "
 }
 
-partition =  {
+partition = \notes {
     \key e \major
     <e\5 dis'\4>
     <e dis'>
index 77af936b3539c1b6cd4ea60bef9e5d2561f68d7a..4f3ff5dcbc3d66704f8688e1164c1f148b890104 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
 texidoc = "The @code{\\tag} command marks music expressions with a
@@ -14,7 +14,7 @@ notes and fingerings, but the score has not."
 \paper { raggedright= ##t }
 
 common =
- \relative c''  {
+\notes \relative c''  {
 
     c1
     \relative c' <<
@@ -31,18 +31,18 @@ common =
 
 
 \score {
-     \simultaneous { 
+    \notes \simultaneous { 
     \new Staff {
        \set Staff.instrument = #"both"
        \common
        }
     \new Staff {
        \set Staff.instrument = #"part"
-       \applymusic #(remove-tag 'score) \common
+       \apply #(remove-tag 'score) \common
        }
     \new Staff {
        \set Staff.instrument = #"score"
-       \applymusic #(remove-tag 'part) \common
+       \apply #(remove-tag 'part) \common
        }
     }
 }
index af435dd6a922dc0efba42c4ea36ffe5f249e9082..3543fea5d5fd6ee119d571008ecf3381849e9b04 100644 (file)
@@ -1,11 +1,11 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc= "Text spanners should not repeat start text when broken."
 }
 
 \score {
-   \relative c'' {
+  \notes \relative c'' {
     \set crescendoText = #"cresc."
     \set crescendoSpanner = #'dashed-line
     c1\< c \break
index f0fb19edbe69ec1f7d159e436349e2662749db4a..3394945306e1db8089867e310b4920bc560c7784 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
 texidoc = "Tie engraver uses @code{busyGrobs} to keep track of
@@ -10,17 +10,13 @@ one may have collisions between ties and beams.
 
 \score
 {
-    \context Staff \relative c'' 
-    <<
-       {  \times 2/3 { c'8~  c8~ c8~ c8~ c8~ c8 } }
-       \\
-       { \voiceTwo \times 2/5 { a,4 ~a4 ~a4~ a4~ a4 }}
-       \\
-       { \voiceThree  { b,8 ~ b8 ~ b8 ~  b8 }}
-    >>
-
-    \paper {
-       raggedright = ##t
-    }
+\notes \context Staff \relative c'' 
+ <<
+ {  \times 2/3 { c'8~  c8~ c8~ c8~ c8~ c8 } }
+ \\
+  { \voiceTwo \times 2/5 { a,4 ~a4 ~a4~ a4~ a4 }}
+ \\
+  { \voiceThree  { b,8 ~ b8 ~ b8 ~  b8 }}
+ >>
 }
 
index 42f3a8759c773dfce56a16311e1cb31d14ebf7e6..d7116afc80b67c7b10aeb6dd440d4382f42acbc7 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
 texidoc="
 When tying chords, the outer slurs point outwards, the inner slurs
@@ -9,10 +9,10 @@ by setting explicitly the @code{direction} of a @code{TieColumn}.
 }
 
 
-t =  \relative c' {   <c e g> ~ <c e g> }
+t = \notes \relative c' {   <c e g> ~ <c e g> }
 
        \score { 
- \context Voice {
+\notes \context Voice {
    \t
    \transpose c g \t
 
index 029d747f03414ad8ad6e427bbf166984c8aeaca7..f62873b2a2c385b3098a97087be8a4122cb15690 100644 (file)
@@ -1,9 +1,9 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "Ties should not collide with dots."
 }
 
-\score{{\time 9/8 \key f \major\clef bass
+\score{\notes{\time 9/8 \key f \major\clef bass
   g4 d8 bes4.  ~    bes4    a8    \bar "|"
   a8    gis8    d8 f4.    gis,4.    \bar "|"
   a,4.   ~    a,4    r8   r4   r8   \bar "|"
index c8d2f2f4fc52d476fd9fa7378334b26057785f33..49205ed924f22d9fa335f90bb5aec1ef51b4ff16 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "Tieing a grace to the to a following grace or main note works."
 }
 
     \paper { raggedright= ##t }
 
-\score {  \context Voice \relative c'' {
+\score { \notes \context Voice \relative c'' {
     c4 \grace { c8 ~ c16 ~ } c4 
   }
 }
index 4142552d81b95d3965770505080f6540a664dc7e..877132d799ea9bf96c6b7353923cb9d39804233d 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="
@@ -8,7 +8,7 @@ The horizontal middle should not overlap with a staffline.
 "
 }
 \score{
-       \relative c''{
+       \notes\relative c''{
                %b2~b4~b8~b16~b32~b64 r64\break
                %a2~a4~a8~a16~a32~a64 r64
                \time 8/4
index bb0341995df9dd1287089f0897ccdd67d530c97e..e88466f627357b07157c484a25977ef1616d574c 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
 texidoc = "In combination with a beam, the bracket of the tuplet
@@ -9,7 +9,7 @@ the bracket."
 }
     \paper { raggedright= ##t }
 
-\score {  \context Voice\relative c'' {
+\score { \notes \context Voice\relative c'' {
 \times 2/3 { r  c8[ c8] }
 \times 2/3 {  c8[ c c] }
 \times 2/3 {  c16[ c16]  c8[ c8] }
index 6ddc3a97b5379807a0e1df1ad85031d3f8148d61..e673f8cc395d44a54fa6813f20b09a73d9939fb7 100644 (file)
@@ -5,7 +5,7 @@
 
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
 \paper {
    indent = 0.0\mm
@@ -13,7 +13,7 @@
 }
 
 \score{
-     \relative c'' {
+    \notes \relative c'' {
        \set tupletNumberFormatFunction = #fraction-tuplet-formatter
        \times  17/12  { c8 c4 c8 c8}
        }
index 74e884cf5b034ad229fe2a7cbb3963bdce3cd32b..73facf8d3d984510cf862d892285797700ae082d 100644 (file)
@@ -1,12 +1,7 @@
 
-\version "2.3.4"
-
-
+\version "2.2.0"
 \header {
-
-    texidoc=" Nested tuplets can be printed, using a manual hack to
-  move the outer bracket up."
-
+  texidoc="By a manual hack for nested tuplets, an outer tuplet can be moved up."
 }
 
 #(define (make-text-checker-once text)
 #(define text-checker-once #t)
 
 \score {
-    \relative c'' {
+  \notes\relative c'' {
 
     \set tupletNumberFormatFunction = #fraction-tuplet-formatter
 
-    \applyoutput #(lambda (gr org cur)
-                  (if (equal? (ly:grob-property gr 'text) "6:4")
-                   (set! (ly:grob-property gr 'extra-offset) '(0 . 1.5))))
-    \times 4/6 {
+    \applyoutput #(outputproperty-compatibility (make-text-checker-once "2:3")
+                  'extra-offset '(0 . 1.5))
+    \times 2/3 {
       \times 2/3 {
         a a a
       }
index eb38718348bd037c3e2d22e3f15730b0b058b46c..05552709843dc0784abd1af7a03834c0902940a8 100644 (file)
@@ -6,11 +6,11 @@ for instance, bracketed (B) and non-bracketed (NB).
 }
  
 
-\version "2.3.4"
+\version "2.2.0"
 
 
 \score { 
-    \context Voice \relative c'' {
+    \context Voice \notes\relative c'' {
 
        \times 2/3 { c'8 c,, c }
        \times 2/3 { c'8 c'' c,, }
index de7568ccaf6f9486e8029797e41c044fc4e8fcaf..02a88275f926347387f0bd7c4e4520b09ea31f14 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc = "Tuplets may contain rests. "
@@ -7,7 +7,7 @@
 }
 
 \score {
-  \context Voice  \relative c'' {
+  \context Voice \notes \relative c'' {
     \time 2/4
     \times 2/3 { r c,,, c''' }
     \times 2/3 { r c c }
index 6489a4bb1d796500f9d7ca483319081a2313c746..dda93975816dc29aaf4581ffa86dbb84cc9f9e66 100644 (file)
@@ -12,10 +12,10 @@ The bracket direction is determined by the dominating stem direction.
 }
 
 
-\version "2.3.4"
+\version "2.2.0"
 
 \score {
-     \relative c' {
+    \notes \relative c' {
        \times 4/5 { a'4 as g fis f }
        \times 4/5 { fis4 e es d des }
        \times 4/5 { fis,4 e es d des }
index 47d86ad35890ad99d99e6a68cc3ce8df8ab87d81..1e786112bb989f01413569ae5587fb7cdd87bc69 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
 texidoc = "Horizontal tuplet brackets are shifted vertically
@@ -9,7 +9,7 @@ to avoid staff line collisions."
 
     \paper { raggedright= ##t }
 
-\score {  \context Voice\relative c'' {
+\score { \notes \context Voice\relative c'' {
 \times 2/3 { b'4 b b }
 \times 2/3 { f4 f f }
 \times 2/3 { g4 g g }
index 6160d80f1909739c90549cbd8e358ee28f87a14f..b17bada1a837e773710b8875b92d26dd8a087641 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
     
 texidoc="
@@ -19,7 +19,7 @@ direction as the bracket. The endings can be adjusted with
 \paper { raggedright= ##t }
 
 \score{
-        \context Voice \relative c'' {
+       \notes \context Voice \relative c'' {
                 \times 2/3 { a8 b c }
                 \times 2/3 { r8  b[ f] }
                 \override TupletBracket  #'bracket-flare = #'(0.5 . 0.5)
index 6c7ce00ecf908026599d0f7d5085560fb33e5098..a5f2b231be8e4600f8d6e59c20765f9b6e1a371f 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 
 \header { texidoc= "
@@ -9,7 +9,7 @@ can be printed automatically. This is enabled if the property
 
       }
 \score {
-     \relative c'
+    \notes \relative c'
     \context PianoStaff <<
        \set PianoStaff.followVoice = ##t
        \context Staff = one \context Voice {
index 18237a7cfdc3bdf2a726ee4647028d7cb79f43eb..32da07c0a5b35b36bba217d4d42b64fdc2ec6560 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 texidoc ="Broken volta spanners behave correctly at their left edge in all cases."
@@ -39,7 +39,7 @@ Bar 23        Perfect
 
 %}
 
-voiceB =  {
+voiceB = \notes {
     \clef bass
      \set Staff.instrument = "Bass"
      \set Staff.instr = "B"
@@ -61,7 +61,7 @@ voiceB =  {
        }
     }
 }
-voiceC =  {
+voiceC = \notes {
     \repeat volta 2
     {
 f f 
@@ -74,7 +74,7 @@ f f
     }
 }
 
-voiceD =  {
+voiceD = \notes {
     \repeat volta 2
     {
 f f 
@@ -88,7 +88,7 @@ f f
         }
     }
 }
-voiceE =  {
+voiceE = \notes {
     \repeat volta 2
     {
 f f\break
@@ -105,7 +105,7 @@ f f\break
     }
 }
 \score{
-         <<
+        \notes <<
 
 
        \new Staff
index a806d8155fcdf62ef48b3ac02a307f7fdad743d7..861aa717c507c14170870ae954aac3bb4bfea7cf 100644 (file)
@@ -4,14 +4,14 @@
     on more staves in a score."
 
 }
-\version "2.3.4"
+\version "2.2.0"
 
 
-vmus =  { \repeat volta 2 c1 \alternative { d e } } 
+vmus = \notes { \repeat volta 2 c1 \alternative { d e } } 
 
 \score  {
 
-     \relative c'' <<
+    \notes \relative c'' <<
        \new StaffGroup <<
            \context Staff \vmus
            \new Staff \vmus
index aa9cba8024f61ed3ce9431d5fc6a38316caa7486..9102972f10a1c972d4528510e632e6f9883ceae9 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
     title = "Screech and boink"
     subtitle = "Random complex notation"
@@ -6,7 +6,7 @@
 }
 
 \score {
-     \context PianoStaff <<
+    \notes \context PianoStaff <<
        \context Staff = up {
            \time 4/8
            \key c \minor
@@ -40,7 +40,7 @@
            \override Beam  #'thickness = #0.3
            \override Stem  #'thickness = #4.0
            g'16[ b16 fis16 g16]
-           << \applymusic #notes-to-clusters { 
+           << \apply #notes-to-clusters { 
                as16 <as b>
                <g b>
                <g cis>
           >>
        }
     >>
-    \midi { \tempo 8 = 60 }
 
     \paper {
        raggedright = ##t 
 
        \context {
-           \Staff
+           \StaffContext
            \consists Horizontal_bracket_engraver
        }
        
     }
+    \midi { \tempo 8 = 60 }
 }
diff --git a/input/simple-song.ly b/input/simple-song.ly
deleted file mode 100644 (file)
index d68971a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-%% A simple song in LilyPond
-<<
-    \relative {
-       \clef bass
-       d,2 d c4 bes a2 \break
-       c2 c d4 f g2
-    }
-    \newlyrics {
-       My first Li -- ly song,
-       Not much can go wrong!
-    }
->>
-
-%% Optional helper for automatic updating by convert-ly.  May be omitted.
-\version "2.3.4"
-    
-%% Optional helper for quick click and edit mode.  May be omitted
-#(ly:set-point-and-click 'line-column)
-
diff --git a/input/simple.ly b/input/simple.ly
deleted file mode 100644 (file)
index edb093d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-%% A simple piece in LilyPond, a scale.
-\relative {
-    c' d e f g a b c
-}
-
-%% Optional helper for automatic updating by convert-ly.  May be omitted.
-\version "2.3.4"
index 9946bd9c7b8344f94a7b3dc6c3c7c85c3f3a184b..e09c682442bd88cc745ab1a8f0e139723e24a8ff 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 
 \header {
@@ -9,15 +9,15 @@ indicating a breath mark."
 }
 
 
-barOne =  { \once \override Staff.BarLine  #'bar-size = #2
+barOne = \notes { \once \override Staff.BarLine  #'bar-size = #2
        \bar "|" }
-barTwo =  { \once \override Staff.BarLine  #'extra-offset = #'(0 . 2)
+barTwo = \notes { \once \override Staff.BarLine  #'extra-offset = #'(0 . 2)
 
                \once \override Staff.BarLine  #'bar-size = #2
        \bar "|" }
 \score {
 
- \relative c' {
+\notes \relative c' {
        \set Score.timing = ##f
        \override Staff.Stem  #'transparent = ##t
        f4 a2 \barTwo g4 a2  f2 \barOne g4( f) f(
index 39da5fa25a1d965c9c80d3c64d31037da5d26cbd..619afc62cbdc7aa249534265e92c9ebd84cd7a29 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
   dedication = "dedication"
   title = "Title"
@@ -21,7 +21,7 @@
 
 % insert a score otherwise lilypond-book gets confused. 
 \score {
-   {
+  \notes {
   c'4
   }
 } 
index 6cded29a394149a56c59b4427276a627f11b203e..836562f1e5c40b6b5240ae1ec3c37d050059f66b 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
         title = "Song"
         subtitle = "(tune)"
@@ -32,20 +32,20 @@ jzchords = { }
 
 %%%%%%%%%%%% Keys'n'thangs %%%%%%%%%%%%%%%%%
 
-global =  {
+global = \notes {
     \time 4/4
 }
 
-Key =  { \key c \major }
+Key = \notes { \key c \major }
 
 % ############ Horns ############
 % ------ Trumpet ------
-trpt =  \transpose c d \relative c'' {
+trpt = \notes \transpose c d \relative c'' {
     \Key
     c1 c c
 }
 
-trpharmony = \transpose c' d { \jzchords }
+trpharmony = \chords \transpose c' d { \jzchords }
 trumpet = {
     \global 
     \set Staff.instrument = #"Trumpet"
@@ -56,12 +56,12 @@ trumpet = {
 }
 
 % ------ Alto Saxophone ------
-alto = \transpose c a \relative c' {
+alto = \notes \transpose c a \relative c' {
        \Key
         c1 c c
 }
 
-altoharmony = \transpose c' a { \jzchords }
+altoharmony = \chords \transpose c' a { \jzchords }
 altosax = {
         \global
         \set Staff.instrument = #"Alto Sax"
@@ -72,12 +72,12 @@ altosax = {
 }
 
 % ------ Baritone Saxophone ------
-bari = \transpose c a' \relative c {
+bari = \notes \transpose c a' \relative c {
        \Key
         c1 c \sl d4^"Solo" d d d \nsl
 }
 
-bariharmony = \transpose c' a \chords { \jzchords s1 s d2:maj e:m7 }
+bariharmony = \chords \transpose c' a { \jzchords s1 s d2:maj e:m7 }
 barisax = {
         \global
         \set Staff.instrument = #"Bari Sax"
@@ -87,7 +87,7 @@ barisax = {
         >>
 }
 % ------ Trombone ------
-tbone =  \relative c {
+tbone = \notes \relative c {
        \Key
         c1 c c
 }
@@ -103,7 +103,7 @@ trombone = {
 }
 % ############ Rhythm Section #############
 % ------ Guitar ------
-gtr =  \relative c'' {
+gtr = \notes \relative c'' {
        \Key
         c1 \sl b4 b b b \nsl c1
 }
@@ -122,25 +122,25 @@ guitar = {
 }
 
 %% ------ Piano ------
-rhUpper =  \relative c'' {
+rhUpper = \notes \relative c'' {
         \voiceOne
        \Key
         c1 c c
 }
 
-rhLower =  \relative c' {
+rhLower = \notes \relative c' {
         \voiceTwo
        \Key
         e1 e e
 }
 
-lhUpper =  \relative c' {
+lhUpper = \notes \relative c' {
         \voiceOne
        \Key
         g1 g g
 }
 
-lhLower =  \relative c {
+lhLower = \notes \relative c {
         \voiceTwo
        \Key
         c1 c c
@@ -175,7 +175,7 @@ piano = {
 }
 
 % ------ Bass Guitar ------
-bass =  \relative c {
+bass = \notes \relative c {
        \Key
         c1 c c
 }
@@ -241,7 +241,7 @@ drumContents = {
                 linewidth = 15.0 \cm
                 \context { \RemoveEmptyStaffContext }
                 \context {
-                        \Score
+                        \ScoreContext
                         \override BarNumber #'padding = #3
                         \override RehearsalMark #'padding = #2
                         skipBars = ##t
@@ -249,3 +249,4 @@ drumContents = {
         }
         \midi { \tempo 4 = 75 }
 }
+
index 040588fe5fbee2f8b88f14b03a8857f9607fc812..6855dd9f0814cd48613661a7c8f219a4f6481efb 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
   texidoc = "Lead sheet format: chords with melody."
@@ -8,12 +8,12 @@ harmonies = \chords {
   c4:m f:min7 g:maj c:aug d2:dim b:sus
 }
 
-melody =  \relative c' {
+melody = \notes \relative c' {
   f4 e8[ c] d4 g | a2 ~ a2
 }
 
 \score {
-   <<
+  \notes <<
     \context ChordNames {
         \set chordChanges = ##t
         \harmonies
index 0f723e27b36b64f96b6d22d3a3df58b2f92bd2f1..2874b5360842bd36900c4eab5a9e7ef6b79b915c 100644 (file)
@@ -1,10 +1,10 @@
-\version "2.3.4"
+\version "2.2.0"
 \header
 {
     texidoc = "Popsong format: chords, melody and lyrics."
 }
 
-melody =  \relative c'
+melody = \notes \relative c'
 {
     a b c d
 }
index 4691f1d1af78cd5038478d36158b32692effcab5..495e8fc0675d9515b4c84767cf2463c8de782565 100644 (file)
@@ -1,10 +1,10 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
   texidoc = "Melody and lyrics."
 }
 
-melody =  \relative c'' {
+melody = \notes \relative c'' {
   a b c d
 }
 
index bbda02ab12b21499f113cc0d3959ccbdca01f943..2e278457caffcf039b97d0a4c4bbeafef89158f9 100644 (file)
@@ -1,10 +1,10 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
   texidoc = "Only a melody."
 }
 
-melody =  \relative c' {
+melody = \notes \relative c' {
   a b c d
 }
 
index 42f778655fd728fcfc76a8697260f59bb3ff3d22..12b1a55459d1251ec2a99bc0d9cfdbc3b8b6a865 100644 (file)
@@ -1,25 +1,25 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
   texidoc ="Polyphonic piano music."
 }
 
-upperOne = \relative c'' {
+upperOne = \notes\relative c'' {
   \voiceOne
   a b c d
 }
 
-upperTwo = \relative c' {
+upperTwo = \notes\relative c' {
   \voiceTwo
   a2 c
 }
 
-lowerOne = \relative c {
+lowerOne = \notes\relative c {
   \voiceOne
   a2 c
 }
 
-lowerTwo = \relative c {
+lowerTwo = \notes\relative c {
   \voiceTwo
   a1
 }
index 7ae094ce57b55700734fb9c68d0176fe643adf16..0be436ca764cb069f47e72515829f05904c25d9e 100644 (file)
@@ -1,24 +1,24 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc ="
   Dynamics on a separate line, neatly centered between staffs.
 "
 }
 
-upper = \relative c'' {
+upper = \notes\relative c'' {
   a b c d
 }
 
-lower = \relative c {
+lower = \notes\relative c {
   a2 c
 }
 
-dynamics =  {
+dynamics = \notes {
   s2\fff\> s4
   s\!\pp
 }
 
-pedal =  {
+pedal = \notes {
  s2\sustainDown s2\sustainUp
 }
 
@@ -58,7 +58,7 @@ pedal =  {
       \consistsend "Axis_group_engraver"
     }
     \context {
-      \PianoStaff
+      \PianoStaffContext
       \accepts Dynamics
       \override VerticalAlignment #'forced-distance = #7
     }
@@ -72,7 +72,7 @@ pedal =  {
       \consists "Dynamic_performer"
     }
     \context {
-      \PianoStaff
+      \PianoStaffContext
       \accepts Dynamics
     }
   }
index 61714faf67851bf614c6b26e73591237f1a1fd54..2ad3bd5204c55e62a0d1ed63dbb0d7646761a316 100644 (file)
@@ -1,14 +1,14 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
   texidoc ="Lyrics between two staffs."
 }
 
-upper = \relative c'' {
+upper = \notes\relative c'' {
   a b c d
 }
 
-lower = \relative c {
+lower = \notes\relative c {
   a2 c
 }
 
@@ -29,12 +29,12 @@ text = \lyrics {
   >>
   \paper {
     \context {
-      \GrandStaff
+      \GrandStaffContext
       \accepts "Lyrics"
     }
     \context {
-      %\Lyrics
-      \Lyrics
+      %\LyricsContext
+      \LyricsContext
       \consists "Bar_engraver"
     }
   }  
index 3f2fa70b581fc09e6fd772d5838fccf173453af3..34b19adb1656bb265c3f192afa07fba166da807c 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
   texidoc ="Classical song format: one staff with melody and lyrics,
 and piano accompaniment."
   
 }
 
-melody =  \relative c'' {
+melody = \notes \relative c'' {
   a b c d
 }
 
@@ -14,11 +14,11 @@ text = \lyrics {
   Aaa Bee Cee Dee
 }
 
-upper = \relative c'' {
+upper = \notes\relative c'' {
   a b c d
 }
 
-lower = \relative c {
+lower = \notes\relative c {
   a2 c
 }
 
index 54ccffa848f62e2fa120978cb7a7f12fef815aff..e3c5ce89dccf1ef59f9f74b67535043e6ba863fe 100644 (file)
@@ -1,14 +1,14 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
   texidoc = "Simple piano music." 
 }
 
-upper = \relative c'' {
+upper = \notes\relative c'' {
   a b c d
 }
 
-lower = \relative c {
+lower = \notes\relative c {
   a2 c
 }
 
index 468c045af82d0487e388f85cecd020be4bc8e0ae..2ba826216f4c2b4e6d5d6af3d8dda41f6745bf34 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc = "
@@ -6,19 +6,19 @@
 " 
 }
 
-sopMusic =   \relative c'' { c4 c c8[( b)] c4 }
+sopMusic = \notes  \relative c'' { c4 c c8[( b)] c4 }
 sopWords = \lyrics { hi4 hi hi hi  }
 
-altoMusic =   \relative c' { e4 f d e }
+altoMusic = \notes  \relative c' { e4 f d e }
 altoWords =\lyrics { ha4 ha ha ha }
 
-tenorMusic =  \relative c' { g4 a f g }
+tenorMusic = \notes \relative c' { g4 a f g }
 tenorWords = \lyrics { hu4 hu hu hu }
 
-bassMusic =  \relative c { c4 c g c }
+bassMusic = \notes \relative c { c4 c g c }
 bassWords = \lyrics { ho4 ho ho ho }
 
-\score { 
+\score { \notes
          \context StaffGroup <<
              \context Lyrics = sopranos { s1 }
              \context Staff = women <<
@@ -45,7 +45,7 @@ bassWords = \lyrics { ho4 ho ho ho }
     \context {
 
        % a little smaller so lyrics can be closer to the staff. 
-       \Staff
+       \StaffContext
        minimumVerticalExtent = #'(-3 . 3) 
     }
   }
index b7016f37ea74f2a1c065039a2c1f1d77ef151a36..404cba5b141c6e291bc5d83ea913a289d44b4f1d 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 %% +.ly: Be the first .ly file for lys-to-tely.py.
 %% Better to make lys-to-tely.py include "introduction.texi" or
 %% other .texi documents too?
index aec219f6263a347d92b22145f0fad8c5dc225dd6..7a0975085b560fd2a9bf95118cc2a4a6463823ac 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -26,8 +26,8 @@ it is not necessary to use scm constructs (see @code{separate-staccato.ly}).
    (add-script m "staccato"))
 
 \score {
-  \relative c'' {
-    a b \applymusic #(lambda (x) (music-map add-staccato x)) { c c } 
+  \notes\relative c'' {
+    a b \apply #(lambda (x) (music-map add-staccato x)) { c c } 
   }
   \paper{ raggedright = ##t }
 }
index 78cabb6d2fb701ece9b84d3dfd6b027e0978218b..2c6ead7bd92276ba1d17bcab853542495523ff21 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 texidoc= "@cindex make-music Fingering
@@ -28,7 +28,7 @@ create, then write a function that will structure the music for you.
    m)
 
 \score {
-  \applymusic #(lambda (x)  (add-text-script x "6") (display-music x) x )  { c'4-3 }
+  \apply #(lambda (x)  (add-text-script x "6") (display-music x) x ) \notes { c'4-3 }
        \paper{ raggedright = ##t }
 }
 
index afe076779c241d18997feb298debe01adf2cf093..d166dacf6c2622dcee8ff3b778726ce9e957ef6c 100644 (file)
@@ -13,7 +13,7 @@ in the same score (not demonstrated in this file).
 "
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
 #(define (kill-ambitus grob grob-context apply-context)
   (if (memq 'ambitus-interface (ly:grob-property grob 'interfaces))
@@ -27,10 +27,10 @@ in the same score (not demonstrated in this file).
 
 
 
-voiceA =  \relative c'' {
+voiceA = \notes \relative c'' {
   c4 a d e f2
 }
-voiceB =  \relative c' {
+voiceB = \notes \relative c' {
   es4 f g as b2 
 }
 \score {
@@ -53,7 +53,7 @@ voiceB =  \relative c' {
     raggedright = ##t
 
     \context {
-       \Voice
+       \VoiceContext
       \consists Ambitus_engraver
     }
     }
index 6ab71450240e0d4b477563ee929bd3c6ab3cf19d..7351d0e5639fb704007715461c620f1ab097f99b 100644 (file)
@@ -6,10 +6,10 @@ are collected here.
 "
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
 \score { 
-  \context Voice \relative c {
+  \context Voice \notes\relative c {
     \time 3/4
        \override Staff.Accidental  #'style = #'default
        cisis''^"Accidental style = \#'default" cisis! cisis? |
index 8ad4cf4ea6a646f03ca87a72222209e9343bb824..354585fa2a52eec6fdb13246bda8a2b8bd12c89f 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 % TODO: split ancient-font into seperate files; possibly in
 % different locations.
 \header {
@@ -16,7 +16,7 @@ upperStaff = \context GregorianStaff = upperStaff <<
 
     \override Staff.StaffSymbol  #'line-count = #4
 
-     \transpose c c {
+    \notes \transpose c c {
        \override Staff.KeySignature  #'style = #'vaticana
        \override Staff.Accidental  #'style = #'vaticana
        \override NoteHead  #'style = #'vaticana_punctum
@@ -119,7 +119,7 @@ lowerStaff = \context MensuralStaff = lowerStaff <<
     % \override Staff.StaffSymbol  #'line-count = #5
     \context Staff \applyoutput #(outputproperty-compatibility (make-type-checker 'staff-symbol-interface) 'line-count 5)
 
-     \transpose c c {
+    \notes \transpose c c {
        \set autoBeaming = ##f
        \override NoteHead  #'style = #'neo_mensural
        \override Rest  #'style = #'neo_mensural
@@ -222,13 +222,13 @@ lowerStaff = \context MensuralStaff = lowerStaff <<
        linethickness = #(/ staffspace 5.0)
        indent = 0.0
        \context {
-           \Score
+           \ScoreContext
            \accepts MensuralStaff
            \accepts GregorianStaff
 %          timing = ##f %%%%%%%% FIXME: this has no effect
        }
        \context {
-           \Voice
+           \VoiceContext
            \name MensuralVoice
            \alias Voice
            \remove Ligature_bracket_engraver
@@ -240,7 +240,7 @@ lowerStaff = \context MensuralStaff = lowerStaff <<
            autoBeaming = ##f
        }
        \context {
-           \Voice
+           \VoiceContext
            \name GregorianVoice
            \alias Voice
            \remove Ligature_bracket_engraver
@@ -249,7 +249,7 @@ lowerStaff = \context MensuralStaff = lowerStaff <<
            autoBeaming = ##f
        }
        \context {
-           \Staff
+           \StaffContext
            \name MensuralStaff
            \alias Staff
            \accepts MensuralVoice
@@ -265,7 +265,7 @@ lowerStaff = \context MensuralStaff = lowerStaff <<
            clefOctavation = #0 
        }
        \context {
-           \Staff
+           \StaffContext
            \name GregorianStaff
            \alias Staff
            \accepts GregorianVoice
index 4548dc0f4f78087224ec393479115d234ba75569..590156202e0eeb4908e0fa7c52ca079fc4ff4e64 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 % TODO: move stuff from ancient-font into here?  See comment
 % for ancient-font.ly
 \header {
@@ -8,7 +8,7 @@ Time signatures may also be engraved in an old style.
 }
 
 \score {
-   { 
+  \notes { 
     \override Staff.TimeSignature  #'style = #'neo_mensural
     s1 
   }
index 5361ae41b734710a325c9fd64d511c1528433199..30d7ebba374d6cb692906f7c13f1dd5cc3d0dbd9 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
     texidoc = "@cindex Bagpipe Music
@@ -10,129 +10,129 @@ Here's an example of bagpipe music.
     linewidth = 14.0 \cm
     indent = 0.0 \cm
     \context {
-       \Staff
+       \StaffContext
        \override TimeSignature #'style = #'C
        \override TimeSignature #'break-visibility = #begin-of-line-visible
     }  
 }
 
-taor =  { \grace {
+taor =  \notes{ \grace {
     g32[ d' g e']
 }
            }
-grip =   {
+grip =  \notes {
     \grace {
        g32[ b g ]
     }
 }
-thrd =   {
+thrd =  \notes {
     \grace {
        g32[ d' c'] 
     }
 }
-birl =   {
+birl =  \notes {
     \grace {
        g32[ a g] 
     }
 }
-gstd =   {
+gstd =  \notes {
     \grace {
        g'32[ d' g] 
     }
 }
-lgg =  {
+lgg = \notes {
     \grace {
        g32 
     }
 }
-lag =  {
+lag = \notes {
     \grace {
        a32 
     }
 }
-fgg =  {
+fgg = \notes {
     \grace {
        f32[ g'32] 
     }
 }
-dblb =   {
+dblb =  \notes {
     \grace {
        g'32[ b d'] 
     }
 }
-dblc =   {
+dblc =  \notes {
     \grace {
        g'32[ c' d'] 
     }
 }
-dble =   {
+dble =  \notes {
     \grace {
        g'32[ e' f'] 
     }
 }
-dblf =   {
+dblf =  \notes {
     \grace {
        g'32[ f' g'] 
     }
 }
-dblg =   {
+dblg =  \notes {
     \grace {
        g'32[ f'] 
     }
 }
-dbla =   {
+dbla =  \notes {
     \grace {
        a'32[ g'] 
     }
 }
-cg   =  {
+cg   = \notes {
     \grace {
        c'32 
     }
 }
-eg   =  {
+eg   = \notes {
     \grace {
        e'32 
     }
 }
-gg   =  {
+gg   = \notes {
     \grace {
        g'32 
     }
 }
-dg   =  {
+dg   = \notes {
     \grace {
        d'32 
     }
 }
-hag  =  {
+hag  = \notes {
     \grace {
        a'32 
     }
 }
-gefg =   {
+gefg =  \notes {
     \grace {
        g'32[ e' f'] 
     }
 }
-efg  =  {
+efg  = \notes {
     \grace {
        e'32[ f'] 
     }
 }
-gdcg =   {
+gdcg =  \notes {
     \grace {
        g'32[ d' c']
     }
 }
-gcdg =   {
+gcdg =  \notes {
     \grace {
        g'32[ c' d']
     }
 }
        
 \score {               
-      {
+    \notes  {
        \time 6/8 \partial 4
        \tieUp
        \slurUp
index 2ae0adb7ec843dcd12c86789a109901d4274f46a..cb7754192673ab43da705657ffd61c65e2db0faf 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc = "@cindex Bars Always
@@ -10,7 +10,7 @@ By setting @code{barAlways} and @code{defaultBarType}, barlines may be inserted
 
 
 \score {
-        \relative c''{
+       \notes \relative c''{
                \set Score.barAlways = ##t
                \set Score.defaultBarType = ":|:"
                c4 c4 c4 c4 }
index 705793bf556f0a647fddc1fdb85ae218697fc917..2a929a1eae9e9eb10b888b6fd995c59f1fb3bd71 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header { texidoc = "@cindex Bar line lyric only
 You can move @code{Bar_engraver} and @code{Span_bar_engraver} to 
 a different engraving context, if you want, for example, bar lines 
@@ -6,7 +6,7 @@ on lyrics. "
 }
 
 \score {
- \relative c' \context ChoirStaff <<
+\notes \relative c' \context ChoirStaff <<
  \new Staff { c1 c1 c1}
  \context Lyrics \lyrics <<
   { bla1 die bla }
@@ -20,21 +20,21 @@ on lyrics. "
 \paper  {
        raggedright = ##t
 \context {
-  \Lyrics
+  \LyricsContext
   \consists Bar_engraver
   % need procedure, since lyrics doesn't have a staff_sym engraver.
   \override BarLine #'bar-size-procedure = #(lambda (x) 3.0)
 }
 \context {
-  \Lyrics
+  \LyricsContext
   \consists "Span_bar_engraver"
 }
 \context{
-  \ChoirStaff
+  \ChoirStaffContext
   \remove "Span_bar_engraver"
 }
 \context {
-  \Staff
+  \StaffContext
   \remove "Bar_engraver"
 }
 }}
index ff13cafa818164f571db4604ae8cbbf01a91d69e..1ee707fdf71efdceb36e0cbe9ccb57ba7e46b99f 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "@cindex Bar Lines
 There a many types of bar lines available.
@@ -7,7 +7,7 @@ There a many types of bar lines available.
 % TODO: dashed "|", HJJ
 \score
 {
- \relative c'' {
+\notes \relative c'' {
 c4
 \bar "|." c
 \bar "|:"c
index 540c8f3ce45e6eedda56583919147cc010847d80..2208f7d6e685c059dbab85c6912cd8cba590984e 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
     texidoc = "@cindex Bar Number Every Fifth Reset
@@ -16,7 +16,7 @@ resetBarnum = \context Score \applycontext
   #(set-bar-number-visibility 4)
 \score {
     <<
-         \transpose c c'' {
+        \notes \transpose c c'' {
            \override Score.BarNumber  #'break-visibility =#end-of-line-invisible
            \override Score.RehearsalMark  #'padding = #2.5
            \mark "A" \resetBarnum
index e014f432ef04ed2288b6472f83c1daa52a1da479..616f0f31ba749ff1710b531bdb0695d10c87c109 100644 (file)
@@ -5,10 +5,10 @@ Bar numbers can also be printed inside boxes.
 
 " }
 
-\version "2.3.4"
+\version "2.2.0"
 
 \score {
-    \context Staff  \transpose  c c' {
+    \context Staff \notes \transpose  c c' {
        \override Score.BarNumber  #'break-visibility = #end-of-line-invisible
        \set Score.barNumberVisibility = #(every-nth-bar-number-visible 4)
        \override Score.BarNumber  #'print-function =
index eeef69e44aa6206b94606eebf43b3264d95a4c73..b0aea06fbffb0960f3c8aad105c505079c31a120 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
     texidoc="@cindex Bar Number Show All
 By default, bar numbers are printed only in the first measure.  This 
@@ -7,7 +7,7 @@ setting can be overridden, so that bar numbers on start of every measure.
 " }
 
 \score{
-    \relative c'{
+    \notes\relative c'{
        c1 c c
        \override Score.BarNumber 
            #'break-visibility = #end-of-line-invisible
index bb06101860d77ceb532cecbfe6775633ddb37018..dc461604af4a745ef5747bf2297e7a6e773d9ac7 100644 (file)
@@ -8,7 +8,7 @@
 
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
 wipeNote = {
     \once \override NoteHead #'transparent = ##t
@@ -17,7 +17,7 @@ wipeNote = {
 
 
 \score {
-     \relative c'' {
+    \notes \relative c'' {
        << {
            c8[~
            \wipeNote
index 276afd786f24657c3f302818534fde046f82aad9..7e942e88139d4ab87bdd4399fc365712e9ce746a 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 % keep for now, although merging into beam-auto-override is a possibility.
 \header {
        texidoc = "@cindex Auto Beaming 4/8
@@ -8,7 +8,7 @@ You can override the automatic beaming settings.
 }
 
 \score{
-   \relative c''{
+   \notes\relative c''{
      \time 4/8
 
 %{
index b9c674606d69f4ffddae1b7634beaac9c52e5583..86a512c5bd684400015fa5f5ee49d5e71bc1a01c 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc = "@cindex Auto Beaming Override
@@ -23,7 +23,7 @@ The @code{autoBeaming} can also be turned off.
 %% TODO: check doc string. -hw
 
 \score{
-     \relative c''{
+    \notes \relative c''{
         #(override-auto-beam-setting '(end * * * *)  1 2)
        \time 2/4
        % one beam per measure
index 8723477dda342545e777ca39890fe3530fbf6fac..f50fba3f2acc7a25cfe56940a8275f3ddb1a1642 100644 (file)
@@ -1,11 +1,11 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
        texidoc = "@cindex Beaming Presets
 There are presets for the @code{auto-beam} engraver in the case of common
 time signatures. " }
 \score{
-     \relative c''{
+    \notes \relative c''{
 
        \time 1/2
        c8 c c c
index 722408ad2cf06cefce246ca1ae3f2568af562d0d..c225ba57c9d496ad4e5929f380c6a2f244cf6805 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
     texidoc="@cindex Beam Position Control
 
@@ -7,7 +7,7 @@ Beam positions may be controlled manually, by overriding the @code{positions} se
 
 " }
 \score { 
-    \context Voice \relative c {
+    \context Voice \notes\relative c {
        %% from upper staffline (position 4) to centre (position 0)
        \override Beam  #'positions = #'(2 . 0)
         c'8[ c] 
index 3ba759919d0922cb98f15e64dfa988ba26de3b9c..0e34ed00f24adc1da942e2c5c8221469e4ab8bb1 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
        texidoc="@cindex Beam Count
 
@@ -8,7 +8,7 @@ two sets of four 32nds are joined, as if they were 8th notes.
 
 " }
 
-fragment =  {
+fragment = \notes {
   #(override-auto-beam-setting '(end * * * *)  1 4)
   f32 g a b b a g f
 
@@ -20,7 +20,7 @@ fragment =  {
 
 
 \score {
-  \relative c \fragment
+  \notes\relative c \fragment
   \paper { raggedright = ##t}  
 }
 
index 6078eae629514a25b09a14d64b020fc32d9d1bdd..db8dd4dce59247fb3bc01af868007d7a7df2aa7f 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
   texidoc = "@cindex Beam Dir Functions
 
@@ -23,7 +23,7 @@ own one.
 
 \paper { raggedright = ##t}
 \score {
-  \relative c'' {\time 3/4
+  \notes\relative c'' {\time 3/4
     \override Beam  #'dir-function = #beam-dir-majority
       c8[ g]
     \override Beam  #'dir-function = #beam-dir-mean
index 6e582b461fd33502eb70522ac62bfdd4054dcaad..81f04c4f234b0f2b669da03aedff25e76403ca2c 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
        texidoc="@cindex Beam Isknee
 
@@ -10,10 +10,10 @@ Beams can be placed across a @code{PianoStaff}.
 }
 \score{
        \context PianoStaff <<
-       \context Staff=one \relative c'{
+       \context Staff=one \notes\relative c'{
                s1
        }
-       \context Staff=two \relative c'{
+       \context Staff=two \notes\relative c'{
                \clef bass
 % no knee
                \stemUp  c8[ \change Staff=one \stemDown g'16 f]
index 5123ffba1120e1f775911ef02322b525a513d790..746df4a81337628ad9af7535368765603ac24f0a 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
        texidoc="@cindex Beam Neutral Direction
 When a beam falls in the middle of the staff, the beams point normally 
 down.  However, this behaviour can be altered, if desired.
 " }
 
-fragment =  {
+fragment = \notes {
    b''8[ b]
   \override Beam  #'neutral-direction = #-1
    b[ b]
@@ -17,7 +17,7 @@ fragment =  {
 \paper { raggedright = ##t} 
 
 \score {
-  \relative c \fragment
+  \notes\relative c \fragment
   \paper {raggedright = ##t }  
 }
 
index 104d6b3254fccc13224aea1cb0a8df3e393f0485..6c1b76bb3e94fad4bdabac449013415d0a57f511 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="@cindex Beam Over Rests
@@ -7,7 +7,7 @@ Beams may be forced to be over rests.
 " }
 
 \score{
-    \relative c''{
+    \notes\relative c''{
          r4  r8[ g a]
           bes8[ r16 f g a]
           bes8[ r16 \set stemLeftBeamCount = #1 f g a]
index e050241d60f9bc2ac294f18d20f829826a32bfbf..47499f823028cb50f534c64562d4f243bf899994 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 % possible rename to invis-notes.ly
 % check if other documents call this "blank notes", though.  I think
 % invisible notes sounds better, but whatever it is, it should be
@@ -7,7 +7,7 @@
 \header {
     texidoc = "@cindex Invisible Notes
 @cindex Blank Notes
-Invisible (or transparent) notes can be useful, when weird tricks are needed; 
+Invisible (or transparent) can be useful, when wierd tricks are needed; 
 especially, a slur cannot be attach to a rest or spacer rest.
 " }
 
@@ -18,7 +18,7 @@ unblanknotes = { \revert NoteHead #'transparent
 
 
 \score {
-     \relative c'' { c4 d4 
+    \notes \relative c'' { c4 d4 
     \blanknotes e4 f4   \unblanknotes
             g4 a 
             }
index fc068ba9633e8f7c3ecb7fae2f0ce7d5ca12dc29..85c1d018a75aa244be3e45617da257025a741fb2 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
     
 texidoc = "@cindex Blank Paper Tab
@@ -6,10 +6,10 @@ A blank music paper can be produced by using spacer rests, and removing
 @code{Bar_number_engraver}. Here is an empty staff with a tablature staff. 
 " }
 
-emptymusic =  { \repeat unfold 4  { s1\break }  \bar "|." }
+emptymusic = \notes { \repeat unfold 4  { s1\break }  \bar "|." }
 
 \score  {
-  <<
+\notes  <<
        \context Staff \emptymusic
        \context TabStaff \emptymusic
        >>
@@ -17,7 +17,7 @@ emptymusic =  { \repeat unfold 4  { s1\break }  \bar "|." }
 
   \paper {
     \context {
-      \Score
+      \ScoreContext
       \remove Bar_number_engraver
     }
   }
index 2b0a2f63c319769b21b2654b3ced744c941ea6f1..f6d9b5b67d2138992cc52ac3b41832f489667160 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
   texidoc="@cindex Blank Paper
 
@@ -6,17 +6,20 @@ A blank music paper can be produced also by using invisible notes, and removing
 @code{Bar_number_engraver}.
 
 " }
-
-
-\new Score \with {
-    \override TimeSignature #'transparent = ##t
-    \override NoteHead #'transparent = ##t
-    defaultBarType = #""
-    \remove Bar_number_engraver
-} {
-    %% \clef treble
+\score {
+  \notes {
+    % \clef violin
     \clef bass 
     \repeat unfold 3 { c1 \break }
+  }
+  \paper {
+    \context {
+      \ScoreContext
+      \override TimeSignature #'transparent = ##t
+      \override NoteHead #'transparent = ##t
+      defaultBarType = #""
+      \remove Bar_number_engraver
+    }
+  }
 }
 
-
diff --git a/input/test/boxed-molecule.ly b/input/test/boxed-molecule.ly
new file mode 100644 (file)
index 0000000..0fb6829
--- /dev/null
@@ -0,0 +1,29 @@
+
+\version "2.2.0"
+\header {
+texidoc = "@cindex Boxed Stencil
+
+The @code{print-function} can be overridden to draw a box around an arbitrary 
+grob. " }
+
+
+ \score { \notes \relative c''  {
+
+ \override TextScript  #'print-function =
+   #(make-stencil-boxer 0.1 0.3 0.2 Text_item::print)
+
+   c'4^"foo"
+
+\override Stem  #'print-function =
+   #(make-stencil-boxer 0.05 0.25 0.25 Stem::print)
+
+\override Score.RehearsalMark  #'print-function =
+   #(make-stencil-boxer 0.15 0.3 0.3 Text_item::print)
+      c8
+\revert Stem #'print-function
+
+      c4. c4 \mark "F" c1 
+   }
+\paper{raggedright = ##t}
+}
+
diff --git a/input/test/boxed-stencil.ly b/input/test/boxed-stencil.ly
deleted file mode 100644 (file)
index a7d2548..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-
-\version "2.3.4"
-\header {
-texidoc = "@cindex Boxed Stencil
-
-The @code{print-function} can be overridden to draw a box around an arbitrary 
-grob. " }
-
-
- \score {  \relative c''  {
-
- \override TextScript  #'print-function =
-   #(make-stencil-boxer 0.1 0.3 0.2 Text_item::print)
-
-   c'4^"foo"
-
-\override Stem  #'print-function =
-   #(make-stencil-boxer 0.05 0.25 0.25 Stem::print)
-
-\override Score.RehearsalMark  #'print-function =
-   #(make-stencil-boxer 0.15 0.3 0.3 Text_item::print)
-      c8
-\revert Stem #'print-function
-
-      c4. c4 \mark "F" c1 
-   }
-\paper{raggedright = ##t}
-}
-
index 256aa9a39d481e7e2772d84993c495a18180594e..323724b1455a3a637ad40899c6ac320ad531daeb 100644 (file)
@@ -7,9 +7,9 @@
 
    }
 
-\version "2.3.4"
+\version "2.2.0"
 
-cadenza =  \relative c' {
+cadenza = \notes \relative c' {
     c4 d8 << { e f g } \\ { d4. } >>
     g4 f2 g4 g
 }
@@ -40,7 +40,7 @@ cadenza =  \relative c' {
 
 
 \score {
-    
+    \notes
     \relative c' \new GrandStaff <<
        \new Staff { \cadenza c4 \bar "|." }
        \new Staff {
index 014141d34b1c3552f60424b6d47eb5e8721658a8..0774d4270a2cb17e5979269b1e5c5bad3453e595 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "@cindex Capital Letters
 The font can be changed to small caps.
@@ -9,8 +9,8 @@ shapeSC = \override LyricText  #'font-shape = #'caps
 shapeNorm = \revert LyricText #'font-shape
 
 \score { <<
-   \relative c'' { c4 c4 c8 c8 c8 }
-  \context Lyrics \lyrics { 
+  \notes \relative c'' { c4 c4 c8 c8 c8 }
+  \lyrics \context Lyrics { 
     what4 is4 \shapeSC The8  Ma -- trix? }
   >>
   \paper { raggedright = ##t}
index 545847d0b66356cd53419fd01984bb53c2ef9d73..1f95942c225fa2ffaa048c17d243dc5601d8db16 100644 (file)
@@ -1,10 +1,10 @@
-\version "2.3.4"
+\version "2.2.0"
 \header{
        texidoc="@cindex Cautionary Accidentals
 Cautinary accidentals are displayed in slurs by default. They can be 
 shown also with accidentals of smaller size.
 " }
-\score {  \context Staff \transpose c c'' {
+\score { \notes \context Staff \transpose c c'' {
   \key d \major
 %  \set Staff.autoReminders = #'cautionary
   \override Staff.Accidental  #'font-size = #0
index e05b39904a686d381e6b783cd242102783df739a..82f7dc878fb79cd9ca527c092e41f75f1f930c04 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header  {
     texidoc = "@cindex Chord Names German
 The english naming of chords (default) can be changed to german 
@@ -16,7 +16,7 @@ scm = \chords {
     % beses/beses
 } 
 \score {
- <<
+\notes <<
     \context ChordNames { \scm }
     \new ChordNames {
        \set instrument = #"german"
@@ -27,6 +27,6 @@ scm = \chords {
     \context Voice {  \scm } >>
 \paper {
     raggedright = ##t 
-    \context {\ChordNames \consists Instrument_name_engraver }}
+    \context {\ChordNamesContext \consists Instrument_name_engraver }}
 
 }
index 5d282eaa47be0b92d0fd27563a82f9787e547378..985b675aa9150ed3097e96a5776df553806c8d9c 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 
 \header {
@@ -15,7 +15,7 @@ are turned off for brevity.
 
 }
 
-chs =  \transpose c' c' 
+chs = \notes \transpose c' c' 
 {
        <c e g>1
        <c es g>% m = minor triad
@@ -67,7 +67,7 @@ chs =  \transpose c' c'
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % alternate Jazz notation
 
-efullmusicJazzAlt = 
+efullmusicJazzAlt = \notes
 {
     <c e gis>1-\markup { "+" }
     <c e g b>-\markup { \normal-size-super
@@ -83,7 +83,7 @@ efullmusicJazzAlt =
 
 efullJazzAlt = #(sequential-music-to-chord-exceptions efullmusicJazzAlt #f)
 
-epartialmusicJazzAlt = {
+epartialmusicJazzAlt = \notes{
     <c d>1-\markup { \normal-size-super "2" }
     <c es>-\markup { "m" }
     <c f>-\markup { \normal-size-super "sus4" }
@@ -141,12 +141,12 @@ banterProperties = \sequential {
        }
 %}
        
-       \new Staff  \transpose c c' { \chs }
+       \new Staff \notes \transpose c c' { \chs }
     >>
     \paper {
        indent = 3.\cm
        \context { 
-           \ChordNames
+           \ChordNamesContext
            \consists Instrument_name_engraver
        }
     }
index 66f5cffc7494f79f3c7fcae0a61a241ffddd5cae..fe240dd5e9d4b4db279b28187559075f637d3018 100644 (file)
@@ -1,10 +1,10 @@
-\version "2.3.4"
+\version "2.2.0"
 \header { texidoc= "@cindex Chord Names No Inversions
 Since there are several interpretations for recognizing 
 chord names, the lowest note is the bass note of a chord and the inversion 
 of the chord is found accordingly. " }
 
-scheme =  {
+scheme = \notes {
   <c' e' g'>1
   <e' g' c''>
   <e e' g' c''>
index 2013001da3df1538ee82284bd7c7de2bd775d8ef..79ab3b6a2b170bfb083675397617fdf60ef0cfb5 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 texidoc = "Jazz chord names can also be printed without notes."
 }
@@ -13,7 +13,7 @@ texidoc = "Jazz chord names can also be printed without notes."
        }
        \paper{
                \context{
-                       \ChordNames
+                       \ChordNamesContext
 
                        \override BarLine #'bar-size = #4
 
index 2d99edc066c75d6b112d7d47e951cc4b6d3f62fd..35b29ddde359994b22b66810b77803961aaffa29 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "@cindex Chord Octavation
 Appending @code{_8} or @code{^8} to a clef name will
@@ -8,7 +8,7 @@ is given in quotes (such as \"treble^8\").
 " }
 
 \score { 
-  \context Voice \relative c {
+  \context Voice \notes\relative c {
   \clef "bass_8" c4 c c c |
   \clef "treble^8" c'''4 c c c |
   }
index 28e6e93f29526f0cd78456bd3681d38f7ecd23fb..53c3f09952da2ab2b545d0fd88e3f5dba421d06e 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc = "@cindex Clef End of Line
@@ -6,7 +6,7 @@ In these scales, the clef and key signature are shown at the end of the line.
 " }
 
 \score {
-     \transpose c c' {
+    \notes \transpose c c' {
        \override Staff.Clef  #'break-visibility = #end-of-line-visible
        \override Staff.KeySignature  #'break-visibility = #end-of-line-visible
        \set Staff.explicitClefVisibility = #end-of-line-visible
index 1f25fd4718d03061ccaffce44cb46fe1c7885e04..464774d4c9c5deacb8d4af85224f967bfb5355f2 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header{ texidoc = "
 
 @cindex Clef Manual Control
@@ -9,7 +9,7 @@ are central C."
 
 }
 
-\score {  {
+\score { \notes {
   \set Staff.clefGlyph = #"clefs-F"
   \set Staff.clefPosition = #2
   c'4
index 36bc794b56c41ff91672bdfdb4322aebcd0120c2..b68797aae11c06e8874a6a637343edd11faa4703 100644 (file)
@@ -1,14 +1,14 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 
 % Ugh, we need to override some LaTeX titling stuff
 \header {
-  title =      "Ouvertüre"
-  subtitle =   "Zu Heinrich Joseph v. Collins Trauerspiel"
-  subsubtitle =        \markup { \large \bold "Coriolan" }
+  title =      "Ouvertüre\\vrule width0pt height 0pt depth 1ex"
+  subtitle =   "\\normalsize Zu Heinrich Joseph v. Collins Trauerspiel\\vrule width0pt height 0pt depth 1ex"
+  subsubtitle =        "\\Large\\bf Coriolan"
   opus = "Op. 62"
-  piece = \markup { \large Allegro con brio }
+  piece = "\\hspace*{30mm}\\normalfont\\large Allegro con brio"
   composer =    "Ludwig van Beethoven (1770-1827)"
 
 texidoc = "@cindex Orchestra Score
@@ -24,7 +24,7 @@ raisedFlat = \markup { \raise #0.4 \smaller \smaller \flat  }
 
 
 
-flauti =  \relative c' {
+flauti = \notes \relative c' {
   \set Staff.instrument = #"2 Flauti"
   \set Staff.instr = #"Fl."
   \time 4/4
@@ -35,73 +35,72 @@ flauti =  \relative c' {
   \bar"|."
 }
 
-oboi =  \relative c' {
+oboi = \notes \relative c' {
   \set Staff.instrument = #"2 Oboi"
   \set Staff.instr = #"Ob."
   c1 c
 }
 
-clarinetti =  \relative c' {
+clarinetti = \notes \relative c' {
     \set Staff.instrument = \markup { \column < "Clarinetti" { "in B" \raisedFlat } > }
     \set Staff.instr = \markup { \smaller  { "Cl(B" \raisedFlat ")" } }
 
   c1 c
 }
 
-fagotti =  \relative c' {
+fagotti = \notes \relative c' {
   \set Staff.instrument = #"2 Fagotti"
   \set Staff.instr = #"Fg."
   c1 c
 }
 
-corni =  \relative c' {
+corni = \notes \relative c' {
     \set Staff.instrument = \markup { \column < "Corni" { "in E" \raisedFlat } > }
     \set Staff.instr = \markup { \smaller  { "Cor(E" \raisedFlat ")" } }
 
   c1 c
 }
 
-trombe =  \relative c' {
+trombe = \notes \relative c' {
   \set Staff.instrument = \markup \column < "2 Trombe" "(C)" >
   \set Staff.instr = \markup \column <  "Tbe." "(C)" >
 
   c1 c
 }
 
-timpani =  \relative c' {
+timpani = \notes \relative c' {
   \set Staff.instrument = \markup \column < "Timpani" "(C-G)" >
   \set Staff.instr = #"Timp."
 
   c1 c
 }
 
-violinoI =  \relative c' {
+violinoI = \notes \relative c' {
   \set Staff.instrument = #"Violino I  "
   \set Staff.instr = #"Vl. I  "
   c1 c
 }
 
-violinoII =  \relative c' {
+violinoII = \notes \relative c' {
   \set Staff.instrument = #"Violino II  "
   \set Staff.instr = #"Vl. II  "
   c1 c
 }
 
-viola =  \relative c' {
+viola = \notes \relative c' {
   \set Staff.instrument = #"Viola"
   \set Staff.instr = #"Vla."
   c1 c 
   %c
 }
 
-violoncello =  \relative c' {
+violoncello = \notes \relative c' {
   \set Staff.instrument = \markup \column < "Violoncello" "e" "Contrabasso" >
   \set Staff.instr = \markup \column <  "Vc." "Cb." >
   c1 c
 }
 
 
-#(set-global-staff-size 16)
 \score {
   << 
     \context StaffGroup ="legni" << 
@@ -132,13 +131,14 @@ violoncello =  \relative c' {
     >>
   >>
   \paper {
+      \paperSixteen
       indent=100.0\mm
       linewidth=150.0\mm
       \context {
          \RemoveEmptyStaffContext
       }
       \context {
-         \Score
+         \OrchestralScoreContext
          \override TimeSignature #'style = #'C
       }
   }
index d109376b04f021c4e6e13cdb6583c0192499f6eb..3ef48705ad113c90d1ecd15c97791d85a8329fcf 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
     
     texidoc="@cindex Count Systems
@@ -19,16 +19,14 @@ to the number of systems or the system number of a grob.
 %% If we're not using 6 systems, there's definately a problem.
 %% #(define (assert-system-count smob n) ...
 
+
 #(define (display-systemno smob)
   (let* ((this-system (ly:grob-system smob))
         (systems (ly:spanner-broken-into
                   (ly:grob-original this-system))))
-   (display smob)
-   (display systems)
-   (display this-system)
-   
-   (display (list-index systems this-system))
-   (newline)))
+    (display smob)
+    (display (list-index systems this-system))
+    (newline)))
   
 
 #(define (display-system-count smob)
@@ -40,10 +38,10 @@ to the number of systems or the system number of a grob.
   
   
 \score{
-    \relative c''{
+    \notes\relative c''{
        \override NoteHead  #'after-line-breaking-callback
-        = #display-system-count
-%      = #display-systemno
+       % = #display-system-count
+       = #display-systemno
        c1
        d
     }
index b44b7bf40cbb90f4ec5804a144f040d93935d7da..c09c197064ad9b1398ab6a5beab20361ff1e7370 100644 (file)
@@ -1,11 +1,11 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{
        texidoc="@cindex Crescendi
 Crescendi can be printed in a number of different ways.
 " }
 \score{
-\relative c''{
+\notes\relative c''{
 a1\fff\> a\pp\!
 a\< a\!
 \set crescendoText = \markup { \italic \bold "cresc." }
index a2cd412f76bcca38651e24fa0181952000ac0b71..e34fee613da267c90cc3ca82dbe29675626f9c58 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 % TODO: check to see if this example can be simplified using \small
 % or \tiny.
 \header { texidoc = "@cindex Cue Notes
@@ -8,7 +8,7 @@ Cue notes are typeset in a smaller font. "
 
 
 \score {
-  
+  \notes
    {
        \set Staff.instrument = #"Horn in F"
        \set Score.skipBars = ##t
index 2b4f58ba9d12a8419e7164b529ded1756ec3cca4..01aa7104366d98c8d86b2c9b0ff81d354e50160e 100644 (file)
@@ -7,13 +7,13 @@ Choices are @code{divisioMinima}, @code{divisioMaior},
 @code{caesura}.
 " }
 
-\version "2.3.4"
+\version "2.2.0"
 
 \include "gregorian-init.ly"
 
 \score {
  <<
-       \context Voice  \transpose c c' {
+       \context Voice \notes \transpose c c' {
            \set Score.timing = ##f
            \set Score.barAlways = ##t
            \override TextScript  #'padding = #3
index 105b6a7682ee437fe94b01e8ca8755f52389f01b..4272c2007f16d5300adbc876cc88fd85ea310d4d 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 % possible rename to slurs-?
 % TODO: find out what drarn means, and if there's an overlap with drarn.ly
 \header{
@@ -8,7 +8,7 @@ Slurs can be forced to always attach to note heads.
 "
 }
 
-fragment =  {
+fragment = \notes {
   \override Slur  #'direction = #1
   \override Slur  #'attachment = #'(head . head)
   g''16(g)(g)(g)(d')(d)(d)(d)
@@ -17,7 +17,7 @@ fragment =  {
 \paper { raggedright = ##t} 
 
 \score {
-  \relative c \fragment
+  \notes\relative c \fragment
   \paper { raggedright = ##t}  
 }
 
index 4435d7131924b578901900b5083e094e7871c1e1..c5b533f3a6cb9e4fd956ef76648ee7a0f81a7fb7 100644 (file)
@@ -1,11 +1,11 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{texidoc="@cindex Drarn
 You can attach slurs and ties to noteheads.
 " }
 
 \score {
-  \context Staff  <<
+  \context Staff \notes <<
     
      \relative c'' {
 \time 3/8       
index b7df4e727b46c1370744f87ec612c0f00b2e2035..d3072fdf307453520b7a749be28e7e55a3620b7c 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "@cindex Dynamic Absolute Volume
 Absolute dynamics have an effect on MIDI files.
@@ -8,7 +8,7 @@ Absolute dynamics have an effect on MIDI files.
 
 
 \score{
-\relative c''{
+\notes\relative c''{
 %segfault in engraver
 a1\ppp 
 a1\pp
index 82c0eaa26815ffd007b68f3061279817381e0227..c0f06587760509b9e36275d55dd351073038f553 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 % probably should be merged into refman.
 \header{
     texidoc = "@cindex Dynamic Piu Forte
@@ -8,7 +8,7 @@ Pi
 piuf = \markup {  \italic "pi\\`u" \dynamic "f" }
 
 \score{
-    \relative c''{
+    \notes\relative c''{
        c-\piuf
        c
        c2\< c2\!
index adb6e4949edebf851f22f30b9273f31d7eb95fd5..fa17ee48c9349d23282d60384d6b318cf20c73b3 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
   texidoc = "@cindex Embedded Postscript
 By inserting the @TeX{} command \embeddedps, you can
@@ -14,7 +14,7 @@ insert postscript directly into the output.
 % 
 
 \score {
-   \relative c'' {
+  \notes \relative c'' {
     a-"\\embeddedps{3 4 moveto 5 3 rlineto stroke}"
     -"\\embeddedps{ [ 0 1 ] 0 setdash 3 5 moveto 5 -3 rlineto stroke}"
     b-"\\embeddedps{3 4 moveto 0 0 1 2 8 4 20 3.5 rcurveto stroke}"
index 90d95e5d4ef3addade64b84aae140cf6ac7e9b30..9237122f77c1b1df91a018eb054b532a0c2186c3 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
     
     texidoc = "@cindex Embedded scm
@@ -15,7 +15,7 @@ output, ``hello world'' is printed to the console.
   (newline))
 
 \score {
-       \relative c' { c }
+       \notes\relative c' { c }
        \paper {raggedright = ##t}
 }
 
index b7a291cb53b1887d48d64802e9abe79ae4c9cc1d..c6614c37b35a26b640e29529921d830af9a14fbe 100644 (file)
@@ -1,16 +1,16 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{ texidoc="@cindex Embedded Tex
 You can embed Tex commands in your score. "}
 
-fragment =  {
+fragment = \notes {
   a''^"3 $\\times$ \\`a deux"
 }
 
 \paper { raggedright = ##t} 
 
 \score {
-  \relative c \fragment
+  \notes\relative c \fragment
   \paper { raggedright = ##t }  
 }
 
index d404affde90747ee460dcc4f099c6b5ec60c6535..8ce64c737bf01db556bde050ef559034305f4609 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
     
 texidoc ="In polyphonic notation, many voices can share a staff: In
index 06b506ec040835a3d8cc2f1a2083c11b0b04c30d..d04633cabd311ccad826f9a336ecbbfa7f1cd198 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     
 texidoc = "The notation problem, creating a certain symbol,
@@ -31,7 +31,7 @@ Staff context.
 % setup for Request->Element conversion. Guru-only
 %
 
-MyStaff =\context {
+MyStaffContext=\context {
        \type "Engraver_group_engraver"
        \name Staff
 
@@ -72,7 +72,7 @@ MyStaff =\context {
 }
 
 
-MyVoice = \context {
+MyVoiceContext = \context {
        \type "Engraver_group_engraver"
        \name Voice
 
@@ -129,27 +129,27 @@ MyVoice = \context {
 \score {
   \topVoice
   \paper {
-      \context { \MyStaff }
-      \context { \MyVoice }
+      \context { \MyStaffContext }
+      \context { \MyVoiceContext }
       }
 }
 
 
-MyStaff = \context {
-    \MyStaff
+MyStaffContext = \context {
+    \MyStaffContext
     \consists "Staff_symbol_engraver"
 }
 
 \score {
   \topVoice
   \paper {
-      \context { \MyStaff }
-      \context { \MyVoice }
+      \context { \MyStaffContext }
+      \context { \MyVoiceContext }
             }
 }
 
-MyStaff = \context {
-    \MyStaff
+MyStaffContext = \context {
+    \MyStaffContext
       \consists "Clef_engraver"
     \remove "Pitch_squash_engraver"
 }
@@ -157,39 +157,39 @@ MyStaff = \context {
 \score {
   \topVoice
   \paper {
-      \context { \MyStaff }
-      \context { \MyVoice }
+      \context { \MyStaffContext }
+      \context { \MyVoiceContext }
             }
 }
 
-MyVoice = \context {
-    \MyVoice
+MyVoiceContext = \context {
+    \MyVoiceContext
     \consists "Stem_engraver"
     }
 
 \score {
   \topVoice
   \paper {
-      \context { \MyStaff }
-      \context { \MyVoice }
+      \context { \MyStaffContext }
+      \context { \MyVoiceContext }
             }
 }
 
-MyVoice = \context {
-    \MyVoice
+MyVoiceContext = \context {
+    \MyVoiceContext
        \consists "Beam_engraver"
 }
 
 \score {
   \topVoice
   \paper {
-      \context { \MyStaff }
-      \context { \MyVoice }
+      \context { \MyStaffContext }
+      \context { \MyVoiceContext }
             }
 }
 
-MyVoice= \context {
-    \MyVoice
+MyVoiceContext= \context {
+    \MyVoiceContext
     \consists "Phrasing_slur_engraver"
     \consists "Slur_engraver"
     \consists "Script_engraver"
@@ -199,13 +199,13 @@ MyVoice= \context {
 \score {
   \topVoice
   \paper {
-      \context { \MyStaff }
-      \context { \MyVoice }
+      \context { \MyStaffContext }
+      \context { \MyVoiceContext }
             }
 }
 
-MyStaff = \context {
-    \MyStaff
+MyStaffContext = \context {
+    \MyStaffContext
  \consists "Bar_engraver"
     \consists "Time_signature_engraver"
       
@@ -214,20 +214,20 @@ MyStaff = \context {
 \score {
   \topVoice
   \paper {
-      \context { \MyStaff }
-      \context { \MyVoice }
+      \context { \MyStaffContext }
+      \context { \MyVoiceContext }
             }
 }
 
-MyStaff = \context {
-    \MyStaff
   \consists "Accidental_engraver"    
-    \consists "Key_engraver"
+MyStaffContext = \context
+ { \MyStaffContext
+ \consists "Accidental_engraver"    
+     \consists "Key_engraver"
 }
 \score {
   \topVoice
   \paper {
-      \context { \MyStaff }
-      \context { \MyVoice }
+      \context { \MyStaffContext }
+      \context { \MyVoiceContext }
             }
 }
index e291179076af14d9d9dd6cf3bf2d6c7486096e6f..fd2d0e827d8570283f51f4ea4f6064a99f6f6b77 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 % definitely wil be renamed to something.
 %{
@@ -35,8 +35,8 @@ a piece. "
 
 \score {
        <<
-               \new Staff \relative c''{ c1 c c c c }
-               \new StaffGroup \relative c''{ 
+               \new Staff \notes\relative c''{ c1 c c c c }
+               \new StaffGroup \notes\relative c''{ 
                        \new Staff 
                        c1 c
                        << c1 \new Staff { c1 } >>
@@ -46,7 +46,7 @@ a piece. "
        \paper {
                raggedright = ##t
                \context{
-                       \Score
+                       \ScoreContext
 
                }
        }
diff --git a/input/test/feathered-beam.ly b/input/test/feathered-beam.ly
deleted file mode 100644 (file)
index be193d9..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-\version "2.2.0" \header {
-
-    texidoc = "A hack to create feathered
-beams: manually make two beams overlap. This uses tuplets to
-condense the spacing."
-
-    }
-
-\score {
-    \notes  \relative c' {
-       \context Voice {  << { \stemUp \once \override Voice.Beam #'positions = #'(0 . 0.5)
-                              \once \override Voice.TupletBracket #'number-visibility = ##f 
-                              \times 1/2 { c8[ c c c c c c c]} } \\
-                            { \stemUp \once \override Voice.Beam #'positions = #'(0 . -0.5) 
-                              \once \override Voice.TupletBracket #'number-visibility = ##f 
-                              \times 1/2 { c[ c c c c c c c] }} >> } r2
-    } 
-    \paper { raggedright = ##t }
-
-}
index 186b79efb4d8764961d3b954db47cbf250cdca6c..e7f0bd5f52936237324ecb27561bec6441354f47 100644 (file)
@@ -3,14 +3,14 @@
 texidoc = "An alternate method to make bass figures is to use
 @code{markup} texts."
 }
-\version "2.3.4"
+\version "2.2.0"
 
 nat = \markup { \natural }
 sh = \markup { \smaller \raise #0.6 \sharp }
 fl = \markup { \flat }
 
 \score {
-      \context Voice  {
+      \context Voice \notes {
          \clef bass
          \override TextScript  #'font-family = #'number
          \override TextScript  #'font-size = #-6
diff --git a/input/test/fill-a4.ly b/input/test/fill-a4.ly
new file mode 100644 (file)
index 0000000..270483c
--- /dev/null
@@ -0,0 +1,45 @@
+\version "2.2.0"
+%possible rename to paper-fill-a4.ly -gp
+% candidate for reg -gp
+% Han says no, but keeping this comment temporarily so that I don't
+% forget and nominate it for reg again.  :)  -gp
+
+% test file to get a4 paper really filled,
+% without having to resort to the ever-ugly oversizing hack:
+%
+%   `textheight = 310.0\mm'
+%
+% process this file with lilypond, and make sure footskip/headsep are set
+% at a reasonably (small) value.  -- jcn
+%
+\header{ texidoc="@cindex Paper a4 Fill
+This should fill a4 paper. "
+}
+
+#(set-global-staff-size 13)
+
+\score{
+       \context Voice \notes\relative c'{
+               \clef alto
+               \repeat "unfold" 36 c1
+       }
+       \paper{
+               \paperThirteen
+               indent = 0.0\mm
+               % URG
+               % Vertical space is rather precious when typesetting
+               % music.  But we can only set textheight here, and must
+               % guess and subtract the height needed for headers and 
+               % footers.  If we want a header or footer on some page,
+               % all other pages suffer shortened `textheight'.
+               % Try the maximum for a4, without loosing footers:
+               textheight = 297.0\mm - 7.0\mm
+               papersize = "a4"
+               linewidth = 15.0\mm
+               \context {
+                       \StaffContext
+                       minimumVerticalExtent = #(cons 0 0)
+               }
+       }
+}
+
index fd3471e85fad489819c5476d4bf3817b1552d0d4..46d372e9f81664e8e4a009d29dbcf3f222f68c4b 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 % MERGED: stuff from follow-break.ly to follow-thread.ly
 
 % followVoice: connect note heads with line when thread switches staff 
@@ -8,7 +8,7 @@ Voices can be traced automatically when they switch staves by setting
 
 
 \score {
-       \relative c {
+       \notes\relative c {
        \new PianoStaff <<
                \set PianoStaff.followVoice = ##t
                \context Staff=one \context Voice {
index b1592ab4df49c89430beb3839b406c992f519aa1..1636ed3904a94624595594b48c7b7db47a3ea1a1 100644 (file)
@@ -1,11 +1,11 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc="@cindex Force hshift
 Horizontal shift (@code{hshift}) can be forced in order to avoid collisions. " }
 
 \score { 
-     \relative c'
+     \notes\relative c'
        \context Staff << {
                        <d g>
                        <d g>
diff --git a/input/test/fret-diagram.ly b/input/test/fret-diagram.ly
deleted file mode 100644 (file)
index 712bacf..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-\header
-{
-  texidoc = "Frets are supported as markup commands."
-}
-
-\version "2.3.4"
-
-\score {
-    <<
-       \new ChordNames \chords {d2. d d s fis fis fis s c c c}
-       
-     \context Voice=mel {
-% simple D chord
-
-    d'2. ^\markup \fret-diagram-verbose #'((mute 6) (mute 5) (open 4) (place-fret 3 2) (place-fret 2 3) (place-fret 1 2))
-    d' ^\markup \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
-    d' ^\markup \fret-diagram-terse #"x;x;o;2;3;2;"
-    r
-% fis major chord, 3/4 size, fingering labeled below string
-    
-    fis' ^\markup \override #'(size . 0.75) {\override #'(finger-code . below-string){\fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2) (place-fret 5 4 3) (place-fret 4 4 4) (place-fret 3 3 2) (place-fret 2 2 1) (place-fret 1 2 1))}}
-    fis' ^\markup \override #'(finger-code . below-string) {\fret-diagram #"s:0.75;c:6-1-2;6-2-1;5-4-3;4-4-4;3-3-2;2-2-1;1-2-1;"}
-    fis' ^\markup \override #'(size . 0.75) {\override #'(finger-code . below-string){\fret-diagram-terse #"2-1-(;4-3;4-4;3-2;2-1;2-1-);"}}
-    r
-
-% c major barre chord, fingering labeled on frets
-   c' ^\markup \override #'(dot-color . white) {
-                \override #'(finger-code . in-dot) 
-                \fret-diagram-verbose #'((mute 6) (place-fret 5 3 1) (place-fret 4 5 2) (place-fret 3 5 3) (place-fret 2 5 4) (place-fret 1 3 1) (barre 5 1 3)) }
-   % the chord below won't label on frets, because dot-color is black
-   c' ^\markup \fret-diagram #"f:1;c:5-1-3;6-x;5-3-1;4-5-2;3-5-3;2-5-4;1-3-1;"
-   c' ^\markup  \override #'(dot-radius . 0.35) {
-                \override #'(finger-code . in-dot) {
-                \override #'(dot-color . white) {
-                \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"}}}
-   r 
-   
-% c major scale using open strings
-  c' ^\markup \fret-diagram-verbose #'((mute 6) (place-fret 5 3) (open 4) (place-fret 4 2) (place-fret 4 3) (open 3) (place-fret 3 2)  (open 2) (place-fret 2 1) (mute 1))
-  c' ^\markup \fret-diagram #'"6-x;5-3;4-o;4-2;4-3;3-o;3-2;2-o;2-1;1-x;"
-  c' ^\markup \fret-diagram-terse #'"x;3;2 3;o 2;o 1;x;"
-
-% c major scale using no open strings
-  c' ^\markup \fret-diagram-verbose #'((mute 6) (place-fret 5 3) (place-fret 5 5) (place-fret 4 2) (place-fret 4 3) (place-fret 4 5) (place-fret 3 2)  (place-fret 3 4) (place-fret 3 5) (mute 2) (mute 1))
-  c' ^\markup \fret-diagram #'"6-x;5-3;5-5;4-2;4-3;4-5;3-2;3-4;3-5;2-x;1-x;"
-  c' ^\markup \fret-diagram-terse #'"x;3 5;2 3 5;2 4 5;x;x;"
-  
-% g major scale, no open strings, two octaves on six strings, white dots
-  g' ^\markup \override #'(dot-color . white) {\fret-diagram-terse #'"3 5;2 3 5;2 4 5;2 4 5;3 5;2 3;" }
-  }
-    >>
-  \paper{ raggedright = ##t }
-}
index 32ad292e47b464d593a3f6bd8d40c34bfc90c613..5d35e4260bd084052a2f0441247b3392029995f2 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header{
 
     texidoc="@cindex Gourlay
@@ -9,7 +9,7 @@ Gourlay's paper on breaking lines.  "
 }
 
 \score{
-        \context Staff  \relative c'' <<
+       \notes \context Staff  \relative c'' <<
            { \stemUp d2 d     | d d | d4 d2. | \break  c1 }
            \\
            { \stemDown g4 g g g | \times 2/3 { g2 g2 g2 } | g4. g8 g2 | c1 }
index a3b3e900b907b16cf8de17cd8c2103a0768c03fb..fd363da21900852d7e4152133b26d4084bf65cf6 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
     title      = "Gregorian Scripts"
     texidoc  = "@cindex Gregorian Scripts
@@ -30,7 +30,7 @@ FIXME: episem stops one notehead too early.
 \score {
   \context VaticanaVoice {
     \override VaticanaScript  #'padding = #-0.5
-     {
+    \notes {
       a\ictus
       a\circulus
       a\semicirculus
index 21a196d352e6ac5003afbe671ec0ac03c112ec8a..19a55459a8a47858ddbae71f2310496d1480e15a 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc ="@cindex Artificial Harmonics
 
@@ -8,7 +8,7 @@ marking the harmonic pitch with @code{\harmonic}."
 }
 
 \score {
-     { 
+    \notes { 
             <c' g'\harmonic>4
         }
     \paper {
index 2efe3a730222a4a892b2a43c99d317a8eafb5b9b..d52fbefc2dc2e92c29c7d121e4172ddcfbe95e4c 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 
 #(if (not (defined? 'pieceTagLine))
@@ -18,7 +18,7 @@ however, the tagline is not printed to the collated webpage snippets.
 " 
 }
 
-\score{ { c'4 }
+\score{ \notes{ c'4 }
 \paper {raggedright=##t}
 }
 
index b2d1b1df410735cfe23c920aa2d8979c56176974..e12a3fc50761e97830cfbaf9532b822e976f5c4d 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header { texidoc = "@cindex Horizontal Shift
 Notes may be manually horizontally shifted. " }
 
@@ -9,7 +9,7 @@ shiftIV = \override NoteColumn  #'horizontal-shift = #3
 shiftV = \override NoteColumn  #'horizontal-shift = #4
 
 \score { 
-  \context Voice \relative c {
+  \context Voice \notes\relative c {
     
        \context Staff <<
                \new Voice  {\stemUp \shiftI g'' }
index af9c86a92699c708f0a75263f04ebd6b9ae3a1be..4ac03a40efcb122d00b6b5dd427f8036bf71668c 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc = "
 
@@ -13,12 +13,12 @@ texts, so they should be switched off.
        \context Staff <<
                \time 4/4
                \partcombine 
-                       \relative c'' {
+                       \notes\relative c'' {
                                a4 c4.(g8) a4 |
                                g4 e' g(f) | 
                                b, a c2
                        }
-                       \relative c'' {
+                       \notes\relative c'' {
                                g4 e4.(d8) c4 |
                                g'4 c, e(f) |
                                d2 a
@@ -27,7 +27,7 @@ texts, so they should be switched off.
        \paper{
                linewidth=140.\mm
                \context {
-                       \Voice
+                       \VoiceContext
                        soloADue = ##f
                }
        }
index 010d9aa409a372fd4e2db0ec830fe6515f012b1f..1f3e201f1c18eb2b337bd8c8480fce24c52f2068 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
     texidoc =
@@ -14,24 +14,24 @@ improvisation is active.
 }
 
 
-improOn =  {
+improOn = \notes {
     \set squashedPosition = #0
     \override NoteHead  #'style = #'slash
 }
 
-improOff =  {
+improOff = \notes {
     \unset squashedPosition 
     \revert NoteHead #'style
 }
 
-global =  { s1*3 \bar "|." }
+global = \notes { s1*3 \bar "|." }
 
 \score {
     <<
        \context ChordNames \chords {
            e8*7:m7 a2.:m7 bes4:m7 b1:m7 e8:m
        }
-        <<
+       \notes <<
            \context Voice = melo \transpose c c' {
                e8 e g a a16(bes)(a8) g \improOn
                e8
@@ -42,7 +42,7 @@ global =  { s1*3 \bar "|." }
     >>
     \paper { 
        \context {
-           \Voice
+           \VoiceContext
            \consists Pitch_squash_engraver
        }
        raggedright = ##t
index 8a2fb5df5c98562ae0aba157235824b1b9cbefee..7b46bb767904668b8ffef9a9de5493ced694b9f7 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header { texidoc = "@cindex Incipit
 This example shows how to make an ``incipit'' to indicate 
 scordatora tuning of a violin part, by overriding the @code{style} of
@@ -8,7 +8,7 @@ Here are the two first bars of Biber's Rosary sonata III. " }
 
 
 
-violinincipit = \relative c''{
+violinincipit = \notes\relative c''{
   \clef "french"
   \time 2/2
   \override Staff.TimeSignature  #'style = #'old
@@ -17,14 +17,14 @@ violinincipit = \relative c''{
   \override Staff.TimeSignature  #'style = #'C
 }
 
-bcincipit = \relative c{
+bcincipit = \notes\relative c{
   \clef bass
   \override Staff.TimeSignature  #'style = #'old
   b2. cis4 | 
   \override Staff.TimeSignature  #'style = #'C
 }
 
-violin = \relative c''{
+violin = \notes\relative c''{
 % Key signatures with different alterations in different octaves
 % are broken since 1.3.58!
 %  \specialkey \keysignature f' fis'' g' gis''
@@ -37,7 +37,7 @@ violin = \relative c''{
   <<{ a d}\\ { es,4}>>|
 }
 
-BC = \relative c{
+BC = \notes\relative c{
   \key d \major
   \time 2/2
   \clef "bass"
@@ -49,14 +49,14 @@ BC = \relative c{
 
 \score{
   <<
-    \context Staff = violin {{
+    \context Staff = violin {\notes{
       \override Staff.Clef  #'transparent = ##t
       \violinincipit \bar ".|" 
       \revert Staff.Clef #'transparent 
       \endincipit
       \violin
     }}
-    \new Staff {{
+    \new Staff {\notes{
       \override Staff.Clef  #'transparent = ##t
       \bcincipit \bar ".|" 
       \revert Staff.Clef #'transparent 
index 230b8bfc320641092e2171dbd0df1ce7b14a9479..0d4ac78559044c6afda740cd7cab62088608446e 100644 (file)
@@ -1,11 +1,11 @@
-\version "2.3.4"
+\version "2.2.0"
 \header { texidoc = "@cindex Instrument Name Grandstaff
 You can have a name for the whole @code{GrandStaff} in addition to 
 individual @code{Staff}s. " }
 
 \score {
-  
-   \context GrandStaff <<
+  \notes
+  \notes \context GrandStaff <<
     \context Staff = treble    {
       \set GrandStaff.instrument = "Violini  "
       \set Staff.instrument = " vn I" { c''4 }}
@@ -14,6 +14,6 @@ individual @code{Staff}s. " }
 
 \paper {
 raggedright = ##t
-\context { \GrandStaff \consists "Instrument_name_engraver" }
+\context { \GrandStaffContext \consists "Instrument_name_engraver" }
 }}
 
index 13549ef01c33bab598f8c44010c97d122b3b24a1..304f18fc534d9c18fd7fd7de99c9b8e65518ea57 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc      = "@cindex Ancient Vaticana
 Vaticana ligature uses four staff lines, special clef, an notes
@@ -7,7 +7,7 @@ calligraphic notes. "
 
 \include "gregorian-init.ly"
 
-cantus = \context VaticanaVoice = "cantus"  {
+cantus = \context VaticanaVoice = "cantus" \notes {
   \clef "vaticana_fa2"
   \[ f\melisma \quilisma g \auctum \descendens a\melismaEnd \]
   \[ \virga a\melisma g \pes a \inclinatum f \inclinatum d
@@ -34,7 +34,7 @@ verba = \context Lyrics = "verba" \lyrics {
     raggedright = ##t
     packed = ##t
     \context {
-      \Score
+      \ScoreContext
       \remove Bar_number_engraver
       timing = ##f
       barAlways = ##t
index b9972af910b92d0b5b2a94668a88539dc02aa1e9..dd72b7966a78cd127d6f39213f230284d10b7359 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 % MERGE with title.ly -gp
 
 %{
@@ -26,11 +26,11 @@ texidoc = "In the generated output for printing, there are several titles which
 
 
 \score {
-  \relative c'' { c1 c1 c1 c1 }
\notes \relative c'' { c1 c1 c1 c1 }
 }
 
 \score {
-        \relative c'' { c1 c1 c1 c1 }
+       \notes \relative c'' { c1 c1 c1 c1 }
        
        \header {
 
index 960ad8672a383b8043d78e56e175541ad1549c7f..e630e4e84f0721a1a2744f6c5daed467fb777125 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -17,24 +17,22 @@ the @code{LyricHyphen} grob.
 }
 
 \score {
-<<     \new Staff \relative c'' { \time 1/4 c16[ c c  c]
+<<    \notes \new Staff \relative c'' { \time 1/4 c16[ c c  c]
 \time 1/4
 c16[ c c c]
 \time 1/4
 c16[ c c c]
 
 }
-      \new Lyrics \with {
+    \lyrics \new Lyrics \with {
        % Otherwise lyrics are so far apart that hyphens don't disappear
-         \override SeparationItem #'padding = #0.0
-      }
-      \lyrics {
-         bla -- bla -- bla -- bla --
-         bla -- bla -- bla -- bla --
+       \override SeparationItem #'padding = #0.0
+       }{ bla -- bla -- bla -- bla --
+          bla -- bla -- bla -- bla --
 
-         \override LyricHyphen  #'minimum-length = #0.7
-         \override LyricHyphen  #'spacing-procedure =
-         #Hyphen_spanner::set_spacing_rods
+          \override LyricHyphen  #'minimum-length = #0.7
+          \override LyricHyphen  #'spacing-procedure =
+                  #Hyphen_spanner::set_spacing_rods
 
           bla -- bla -- bla -- bla 
        }>>
@@ -43,7 +41,7 @@ c16[ c c c]
        linewidth = 3.4 \cm
 
        \context {
-           \Staff \remove "Time_signature_engraver"
+           \StaffContext \remove "Time_signature_engraver"
        }
        
     }
index 8c3607b3d11e9969ad07143f0252494ef8ae17c8..d90664e089cb35e0e5622a11e15d6639fce476f9 100644 (file)
@@ -11,12 +11,12 @@ less lyric syllables to a melody.
 
 
 % shorthand for Skip Lyric
-sl =  { \skip 4 }
+sl = \notes { \skip 4 }
 
-\version "2.3.4"
+\version "2.2.0"
 \score {
   <<
-  \context Voice = "A"    {c4 c c c}
+  \context Voice = "A"  \notes  {c4 c c c}
   \lyricsto "A" \context Lyrics=A \lyrics { foo __ \sl \sl bar }
   \lyricsto "A" \context Lyrics=B \lyrics { foo -- \sl baz bar }
   \lyricsto "A" \context Lyrics=C \lyrics { foo -- baz -- baaz bar }
diff --git a/input/test/markup-score.ly b/input/test/markup-score.ly
deleted file mode 100644 (file)
index ad0bc4c..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-
-\header {
-    texidoc = "Use \\score block as markup command."
-}
-
-\version "2.3.4"
-
-tuning = \markup {
-    \score {
-       \new Staff \with {
-           \remove Time_signature_engraver
-       } {
-           \clef bass  <c, g, d g>1
-       }
-       \paper { raggedright = ##t }
-    }
-}
-
-
-\header {
-    title = "Solo Cello Suites"
-    subtitle = "Suite IV"
-    subsubtitle = \markup { \fill-line < { "Originalstimmung: " \tuning } > }
-}
-
-\relative {
-    \time 4/8
-    \times 2/3 { c'8 d e } \times 2/3 {c d e}
-    \time 4/8
-
-                               % todo: tempo change example.
-    
-    g8 a8 g8 a \break
-}
-
index b2878f32757d89e30b0d946090a5d41a8a6a00e0..f357889b41ad08cc80b5504fc8fa0852512622f9 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 % TODO:
 % check with ancient- stuff.  rename, merge, something.  -gp
 
@@ -13,7 +13,7 @@ in a tight manner."
 % graphical width of the ligatures rather to the musical moment in time.
 % This is intended behaviour.
 
-voice =  \transpose c c' {
+voice = \notes \transpose c c' {
   \set Score.timing = ##f
   \set Score.defaultBarType = "empty"
   g\longa c\breve a\breve f\breve d'\longa^\fermata
@@ -48,7 +48,7 @@ voice =  \transpose c c' {
     \paper {
        linethickness = \staffspace / 5.0
        \context {
-           \Voice
+           \VoiceContext
            \name MensuralVoice
            \alias Voice
            \remove Ligature_bracket_engraver
@@ -56,7 +56,7 @@ voice =  \transpose c c' {
            \override NoteHead #'style = #'mensural
        }
        \context {
-           \Staff
+           \StaffContext
            \name MensuralStaff
            \alias Staff
            \accepts MensuralVoice
@@ -76,7 +76,7 @@ voice =  \transpose c c' {
            \accepts MensuralVoice
         }
        \context {
-           \Score
+           \ScoreContext
            \accepts MensuralStaff
        }
     }
index 55ebeb40537762a05e860b3379c59141217dcf23..a6e45d67ad139c96a76c9ecd5931d62f46f34f12 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
     texidoc ="@cindex Ancient Mensural Note Heads
@@ -7,7 +7,7 @@ Mensural notes may also have note heads. "
 }
 
 \score {
-        {
+       \notes {
        \relative c'' {
                \override NoteHead  #'style = #'mensural
                c\maxima*1/8
index d1602a20a951eabf3cf8f7f2dd50bb0599b79a61..6241fe6d21089714d722505dd58b2e0191c29487 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 % candidate for regression.  -gp
 \header {
   texidoc="Converting LilyPond input to MIDI and then again back with
@@ -27,7 +27,7 @@
 
 %}
 
-scales =  \relative c {
+scales = \notes \relative c {
 
   % [INSTRUMENT_NAME] bright acoustic
   \key c \major  % sharp-major
index f5dbbb8c67ed0afb76c89b526ceac96292646b23..f3ee83c53128af59ffc6252f48ac222c444c9c2e 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 % possible rename to scheme- or something like that.  -gp
 \header { texidoc= "@cindex Scheme Manual Accidentals
@@ -14,7 +14,7 @@ some Scheme code. " }
            (ly:grob-parent elt 1) 'staff-position) pos))))
 
 \score {
-  \context Voice  \relative c'' {
+  \context Voice \notes \relative c'' {
     c2.
     <<
 \set Staff.AccidentalPlacement = \turnOff
index 098e78959ea75455fbabfc1b45b180803272cfd5..a66a019e5c663ae7fa9f96cfde598ba8b3da646e 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 % possible rename to scheme- or something like that.  -gp
 \header { texidoc = "@cindex Scheme Move Text
 Objects, like text, can be moved around by using some Scheme code.
@@ -9,7 +9,7 @@ Objects, like text, can be moved around by using some Scheme code.
    (lambda (grob) (equal? text (ly:grob-property grob 'text))))
 
 \score {
-  \relative c''' {
+  \notes\relative c''' {
     \override Stem  #'direction = #1
     \applyoutput #(outputproperty-compatibility (make-text-checker (make-simple-markup "m.d."))
       'extra-offset '(-3.5 . -4.5))
index ac190a0a2262d4c6a2f667db40471ea47fd28250..7bcfcd1ff430af296e8aab747b898502c673341e 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \include "deutsch.ly"
 % possible rename to scheme- something.  -gp
 % TODO: ask if it needs to have so many empty bars in the middle.  -gp
@@ -62,9 +62,9 @@ using Scheme functions to avoid typing work. " }
 
 
 
-\version "2.3.4"
+\version "2.2.0"
 
-pat =  \transpose c c' \repeat unfold 2 {
+pat = \notes \transpose c c' \repeat unfold 2 {
   << { \context Staff=up {r8 e16 f g e f g } }
     { \context Staff=down <<
       \context Voice=vup  { \stemUp \tieUp r16 d8.~d4 }
@@ -73,18 +73,18 @@ pat =  \transpose c c' \repeat unfold 2 {
   >>
 }
 
-enda =  { r8 f,16 a, c f c a, \stemUp c \change Staff = down
+enda = \notes { r8 f,16 a, c f c a, \stemUp c \change Staff = down
       a, f, a, f, d, f, d, \change Staff = up \stemBoth
       r8 g16 h d' f' d' h d' h g h d f e\prall d <e g c'>1^\fermata \bar "|."
 }
-endb =  {\stemUp \tieUp r16 c,8.~c,4~c,2 r16 h,,8.~h,,4~h,,2 c,1 \bar "|."}
-endc =  {\stemDown \tieDown c,,2~c,, c,,~c,, c,,1_\fermata }
+endb = \notes {\stemUp \tieUp r16 c,8.~c,4~c,2 r16 h,,8.~h,,4~h,,2 c,1 \bar "|."}
+endc = \notes {\stemDown \tieDown c,,2~c,, c,,~c,, c,,1_\fermata }
 
 \score {
-   \transpose c c' \context PianoStaff <<
+  \notes \transpose c c' \context PianoStaff <<
     \context Staff=up   { \clef "G"  }
     \context Staff=down { \clef "F" }
-    { \applymusic #transform {\pat {c e g c' e' }
+    { \apply #transform {\pat {c e g c' e' }
                          \pat {c d a d' f' }
                         \pat {h, d g d' f' }
                         \pat {c e g c' e' }
@@ -131,7 +131,7 @@ endc =  {\stemDown \tieDown c,,2~c,, c,,~c,, c,,1_\fermata }
   >>
   \paper {
     \context {
-      \PianoStaff
+      \PianoStaffContext
       \override VerticalAlignment #'forced-distance = #10
     }
 
index 093fd052ac7ff0186bed2ecd626461202b796911..f54d7f4d2b96e444931d46a4af029f4b2b8ad409 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 % possible rename to scheme- something.  -gp
 \header { texidoc = "@cindex Scheme Music Creation
index 2a18e7389f599942035b0522befccc30a29c2d3b..740608b0567dbe31b37e8cfc15b799d32a2c44cd 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 % possible rename to bar-lines-foo.  -gp
 
 \header{ texidoc = "@cindex Bar Lines Remove
@@ -9,14 +9,14 @@ have been removed.
 }
 
 \score {
-   \relative c'' {
+  \notes \relative c'' {
     a b c d
     d c b a
   }
   \paper {
     raggedright = ##t
     \context {
-      \Staff
+      \StaffContext
       whichBar = #""
       \remove "Time_signature_engraver"
     }
index cc56cac60888cbe0c429e238806c592bb9d14eee..07ece62c69730ad3a23ee110a558c3878e4c7e97 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 % possible rename to staff-something.  -gp
 
 \header{ texidoc = "@cindex Staff Remove
@@ -8,11 +8,11 @@ corresponding engraver.
 }
 
 \score {
-   { c4 d4 e8 d8 }
+  \notes { c4 d4 e8 d8 }
   \paper {
     raggedright = ##t
     \context {
-      \Staff
+      \StaffContext
       \remove Staff_symbol_engraver
       \consists Pitch_squash_engraver
       \remove Clef_engraver
index aeb1ac31412837402de00a637951c11d01d1fb2a..bf91f9e639cb535885edab475447ad745dbd98ad 100644 (file)
@@ -4,10 +4,10 @@
     @code{RemoveEmptyStaffContext} take out the unused parts.
 " }
 
-\version "2.3.4"
+\version "2.2.0"
 
 \score {
-    \relative c''
+    \notes\relative c''
     \new StaffGroup \with {
        \remove "System_start_delimiter_engraver"
        \override SpanBar #'glyph = #":"
@@ -34,7 +34,7 @@
        raggedright= ##t
        \context {\RemoveEmptyStaffContext}
        \context {
-           \Score
+           \ScoreContext
            \remove System_start_delimiter_engraver
            }
     }
index af74904525ad652120d4e53e15d2bc48c4e8d8e3..a8b751c934c2fbd8d8d3d804e9ad1b03af7d8450 100644 (file)
@@ -1,12 +1,7 @@
-#(ly:set-point-and-click 'line-column)
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
-
-texidoc = "Stress optimal page breaking.  This should look
-    nice on 4 a6 pages. "
-
-    
+    texidoc = "Stress optimal page breaking.  This should look nice on 4 a6 pages."
     copyright = "Copyright by /me"
     
     title = "Title"
@@ -22,33 +17,15 @@ texidoc = "Stress optimal page breaking.  This should look
     piece = "Piece"
 }
 
-#(set-default-paper-size "a6")
-
-
-pattern =  { a b c d \break }
-\book {    
-    \score {
-       \context Staff  \relative c' {
-           %% 16: ideally cramped
-           %% 17: very bad without density
-                               %       \repeat unfold 17 { a b c d \break }
-
-           \pattern
-           \pattern
-                               % \noPageBreak
-           \pattern
-           
-                               % the following changes the location of the break.
-                               % 
-                               % \pageBreak
-           
-           \pattern
-           \pattern
-           \pattern
-           \pattern
-           \repeat unfold 10 \pattern
-       }
 
+\score {
+    \context Staff \notes \relative c' {
+       %% 16: ideally cramped
+       %% 17: very bad without density
+       \repeat unfold 17 { a b c d \break }
+    }
+    \paper {
+       #(set-default-paper-size "a6")
+       #(define page-breaking ly:optimal-page-breaks)
     }
-    
 }
index 6781daa18d9b1a1a74667d5771ee5e0b19cbe467..718bb63c508e3684cfd97f3ce1974934a889e72d 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{ texidoc="@cindex Part Combine
 In orchestral scores and hymns, voices are traditionally combined into
@@ -10,7 +10,7 @@ places. "
 }
 
 \score{
-    \context Staff = flauti <<
+   \notes \context Staff = flauti <<
     \time 4/4
     \partcombine
     \relative c'' {
index 473775d0169a528d4f508a29499e5103ed8e98bd..80ae96945f7002d402a9afdfce51ddb289667682 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 % check with invisible-notes or blank-notes.  possible rename. -gp
 \header{ texidoc = "@cindex Partial Blank
 When entering partially typeset music (i.e. for students to be 
@@ -8,14 +8,14 @@ timing of notes: all measures have same length, etc.  It can be
 implemented by adding an invisible staff with a lot of fast notes. "
 }
 
-quickmeasure =  {
+quickmeasure = \notes {
     \repeat unfold 16 c''16
 }
 
-mel =  \relative c' {c16 d16 e8 a4 g2 e8 d c2. g'1 e4 d c2}
+mel = \notes \relative c' {c16 d16 e8 a4 g2 e8 d c2. g'1 e4 d c2}
 
 \score {
-\context PianoStaff  <<
+\context PianoStaff \notes <<
   \new Staff <<
     \clef G
     \new Voice {\mel}
@@ -26,7 +26,7 @@ mel =  \relative c' {c16 d16 e8 a4 g2 e8 d c2. g'1 e4 d c2}
         \repeat unfold 4 \quickmeasure
     }
   >>
-  \new Staff  {\clef F s1*4}
+  \new Staff \notes {\clef F s1*4}
 >>
 \paper {}
 }
index ffff47138d5171f95153f172e4c8f4e77aeee820..0a2bf75199c717603eccf18fa268ae0795e04b67 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header{ texidoc="@cindex Phrasing Slur Height
 The @code{PhrasingSlur} can be made higher in order to avoid collision 
 with other slurs. "
 }
 
 \score {
-    \new Staff \relative c''{
+    \new Staff \notes\relative c''{
        \override Staff.PhrasingSlur  #'height-limit = #8.0
        c8 \( (d e f) g ( a b c)
        | c ( b a g) f ( e d c)\)
index 40b04ed396af13b5d700ba0ae0dacb1c31343d76..15fd1bc4d4d53f2bfad68faa592d4f8415ad9c48 100644 (file)
@@ -8,7 +8,7 @@ Currently, this is for testing purposes.  "
 
 }
 
-\version "2.3.4"
+\version "2.2.0"
 
 #(define ((futz-alignment-callback distance count) grob axis)
 
@@ -32,7 +32,7 @@ DISTANCE; then call the original callback.  "
      (Align_interface::fixed_distance_alignment_callback grob axis)) )
 
 \score {
-     \relative c''  \context PianoStaff
+    \notes \relative c''  \context PianoStaff
     \with {
        verticalAlignmentChildCallback = #(futz-alignment-callback 20 1)
 
index 0b8a37986af6e9f2ce7bbf9b1bac422c1daaeead..cb0f97ecdc5dd3434f52f4395b09fb92639c1cfb 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header{ texidoc="
 
@@ -29,7 +29,7 @@ multiplied by 3/5, so that 3/5 * 10/8 = 3/4.
 
 
 \score {
-     \relative c'  <<
+    \notes \relative c'  <<
        \new Staff {
            \time 3/4
            c4 c c | c c c |
@@ -37,14 +37,14 @@ multiplied by 3/5, so that 3/5 * 10/8 = 3/4.
        \new Staff {
            \time 3/4
            \set Staff.timeSignatureFraction = #'(9 . 8)
-           \applymusic #(scale-music-function '(2 . 3))
+           \apply #(scale-music-function '(2 . 3))
              \repeat unfold 6 { c8[ c c] }
        }
        
        \new Staff {
            \time 3/4
            \set Staff.timeSignatureFraction = #'(10 . 8)
-           \applymusic #(scale-music-function '(3 . 5))
+           \apply #(scale-music-function '(3 . 5))
              { \repeat unfold 2 { c8[ c c] }
                \repeat unfold 2 { c8[  c] }
                |  c4. c4. \times 2/3 { c8 c c } c4  }
index 95983062f91dc0cd47a8b7d1541b12bdc257e476..788ec27a0950761d502a27e8b4b03d9699d74588 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header{ texidoc="@cindex Time Signature Multiple
 
@@ -17,7 +17,7 @@ lines seem to distort the regular spacing.
 %% Should print bar lines according to the time signature of each staff. -HJJ
 
 \score{
-     \relative c'  <<
+    \notes \relative c'  <<
        \new Staff {
            \time 3/4
            c4 c c | c c c |
@@ -36,11 +36,11 @@ lines seem to distort the regular spacing.
     \paper{
        raggedright = ##t
        \context{
-           \Score
+           \ScoreContext
            \remove "Timing_engraver"
        }
        \context{
-           \Staff
+           \StaffContext
            \consists "Timing_engraver"
            
        }
index fb0caaebd034563ed25ff0513e3002cceb2178f6..1cda63ae66b9f24f0ba75f203e13411205091431 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header { texidoc = "
 
 @cindex Preset Extent
index af7c9278f4460e2bb673446ff54727b090064ee2..4212de4c5cd2dd6b88cae8cbde344cc7f4a1f800 100644 (file)
@@ -1,11 +1,11 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header { texidoc = "@cindex Repeat Manual
 By controlling manually the signs and numbers in repeats, an unusual 
 output can be produced. "
 }
 
-\score {  \relative c'' {
+\score { \notes \relative c'' {
 % First a normal looking repeat:
  c2 c
     \set Score.repeatCommands = #'((volta "1."))
index 1666e8173b71259500ea0b4a94db1d74cbd204be..57952b9e05e1e2a2c3b3898055a59d8d06cde947 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header{
     texidoc="
 
@@ -14,7 +14,7 @@ bracket can be shortened.
 
 \score {
     <<
-       \context Staff \relative c''{
+       \context Staff \notes\relative c''{
            c c c c
                                % coda-klugde: let volta span only one bar
            \set Staff.voltaSpannerDuration = #(ly:make-moment 1 1)
index 7d0de5dc5d616db467a2a1ee4f28371214b92c96..eb8c18aff8a271589eb5512d9211e123bf83d667 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 % possible rename to lyric-repeat or repeat-lyric.
 
@@ -11,7 +11,7 @@ Alternate lyrics can be used, as well as alternate notes for repeats. "
 
 \score{
        <<
-                 \context Staff \relative c'{ 
+                 \context Staff \notes\relative c'{ 
                          c d e f
                          \repeat "volta" 2 { g a b c }
                          \alternative { { c b a g } { f e d c } }
index 534b0c3fadbbe3c5ff437f73cd4db9894359f4d5..2cd214e852ba37993b016a2493bf42d0c2fdfc93 100644 (file)
@@ -1,10 +1,10 @@
 
-\version "2.3.4"
+\version "2.2.0"
 % candidate for regression.  -gp
 \header { texidoc = "@cindex Rest Dot Positions
 Dots of rests should follow the rest positions. " }
 
-muz =  \relative c'' {
+muz = \notes \relative c'' {
     \time 6/1
     r\longa r\breve |
     r\longa. |
index 08089ae93b7386a4fe90d40c77ace2e33b1f5c6d..4466456acebeb73b972a7bd136afe513bbb5ea17 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {
     texidoc = "@cindex Rests
 
@@ -13,7 +13,7 @@ Rests may be used in various styles.
 % happen, since there are no notes/stems in this example.
 
 \score {
-    \context Staff \relative c {
+    \context Staff \notes\relative c {
        \set Score.timing = ##f
        \override Staff.Rest  #'style = #'mensural
        r\maxima^"Rest style = \#'mensural"
index 1a060da9fede63c5335dfc6f34c037a419d71231..390fa7f8c24c322df201ff321807bb872295ed64 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 % possible rename to scheme-something.
 \header { texidoc="@cindex Scheme Reverse Music
 Symmetric, or palindromical music can be produced, first, by printing
@@ -8,7 +8,7 @@ function to reverse the syntax.
 "
 }
 
-music =  \relative c'' { c4 d4( e4 f4 }
+music = \notes \relative c'' { c4 d4( e4 f4 }
 
 #(define (reverse-music music)
   (let* ((elements (ly:music-property music 'elements))
@@ -33,7 +33,7 @@ music =  \relative c'' { c4 d4( e4 f4 }
 \score {
   \context Voice {
     \music
-    \applymusic #reverse-music \music
+    \apply #reverse-music \music
   }
   \paper { raggedright = ##t}
 }
index 2d979998b94aa2054a958fd98024e4056f3e3d9f..3f330866e8e478ecaef60b2d451927b95ce29a21 100644 (file)
@@ -1,14 +1,14 @@
-\version "2.3.4"
+\version "2.2.0"
 \header { texidoc = "@cindex Rhythm Exercise
 Rythmic exercises may be produced by removing the @code{Clef} engraver,
 putting all notes to the same pitch and using transparent staff lines.
 "
 }
 
-\score {  { c4 c4 c8[ c8]  c2 c2 }
+\score { \notes { c4 c4 c8[ c8]  c2 c2 }
 
         \paper {
-            \context { \Staff
+            \context { \StaffContext
                           \override StaffSymbol #'transparent = ##t
                           \consists Pitch_squash_engraver
                           \remove Clef_engraver
index da4324394ec7648da7d2a71bbc551bb41c7097e8..94cce528a292c28b31744d87086f9fc083eed119 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
   texidoc = "
 
@@ -9,7 +9,7 @@ aeolian (= minor), and locrian. All these scales are in the key of C.
 "
 }
 
-\score  {  {
+\score  { \notes {
 
 \key c \ionian c'8 -"C ionian, major" d'8 e'8 f'8 g'8 a'8 b'8 c''8
 
index e98e5524477ebc523909315aa45f6fe2ce2b709d..800c158b9e933c4d9711d6ed9ddff6fae6cb626d 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header { texidoc = "@cindex Scheme Interactions
 Using @code{ly:export}, the result of Scheme expressions can be passed
 as LilyPond input.  Within a Scheme expression, you can use, define or 
@@ -8,12 +8,12 @@ generated using scheme functions, and between there are manually
 
 " }
 
-foo =  \transpose c c { d''4-. }
-bra =  \transpose c c { e'4-. }
+foo = \notes \transpose c c { d''4-. }
+bra = \notes \transpose c c { e'4-. }
 
 
 \score { 
-  \context Voice \relative c' {
+  \context Voice \notes\relative c' {
       c4
       #(ly:export (make-sequential-music (list foo foo foo )))
       #(begin (define baz (make-simultaneous-music (list foo bra)))
index 5fbe5cda2e40f74c3780e9fde79f63312fed3e5b..5f895fc1dfbd5f4eff1df732aba1c648a4308c54 100644 (file)
@@ -1,7 +1,7 @@
 
 % this chart is used in the manual too.
 
-\version "2.3.4"
+\version "2.2.0"
 \header { texidoc = "@cindex Script Abbreviations
 
 Some articulations may be entered using an abbreviation.
@@ -11,7 +11,7 @@ Some articulations may be entered using an abbreviation.
 }
 
 \score {
-     \context Voice {
+    \notes \context Voice {
       \override TextScript  #'font-family = #'typewriter
       \override TextScript  #'font-shape = #'upright
       c''4-._"c-."      s4
index 0c4f6520360692583e8bb7e60c54eeacc8c6123e..20c2ce189b86ce16f8ad24211bffc268a75f60b7 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 % this chart is used in the manual too.
 
@@ -14,7 +14,7 @@ This chart shows all articulations, or scripts, that feta font contains.
     <<
       \override Score.LyricText  #'font-family = #'typewriter
       \override Score.LyricText  #'font-shape = #'upright
-      \context Staff  {
+      \context Staff \notes {
        \set Score.timing = ##f
        \set Score.barAlways = ##t
        \override Staff.BarLine  #'transparent = ##t
index 2a3da902a7951cca43ab2b033554675878a9b2c9..403152efc34a1c5ba9661a1ce3abac6cf3991b82 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc = "@cindex Script Priority
 Relative placements of different script types can be controlled
@@ -13,7 +13,7 @@ script symbols.
 
 
 \score{
-    \context Staff  \relative g''{
+    \context Staff \notes \relative g''{
        
        \override Score.TextScript  #'script-priority = #-100
        a4^\prall^\markup { \sharp }
index 668c0d216cbcbd088c9922e21a1d3d26f9390d0d..aaaf0c796d185d5be4245ab1421cf2c357cc7422 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc = "@cindex Stacked Text Articulation
 Text and articulations may be stacked on top of each other. "
 }
 
 \score {
-       \relative c' {
+       \notes\relative c' {
                c2_"geen gedonder"_"jij gaat onder"
                c2^^^.^|^"down"^"up"
         }
index 31a4db73d7e691ad67471b4ddcabc01410cc599e..bf1fa05e1b22797b276210193dfdc894f61d3792 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 % possible rename.  -gp
 
 \header { texidoc="@cindex Seperate Staccato
@@ -8,9 +8,9 @@ them into one thread.  In this example, a repead series of staccato dots
 is attached to the notes."
 } 
 
-staccatos =  { s4-. s-. s-. s s }
+staccatos = \notes { s4-. s-. s-. s s }
 
-music = \relative c' { c4 d e f g  a b c d e }
+music = \notes\relative c' { c4 d e f g  a b c d e }
 
 \score {
    \context Voice <<
index eaad3e2d0b393f26430c77231459d16f69333926..beb8b492b0a45f13aa73c5628627455d9959cf7f 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{
 texidoc="@cindex Slur Attachment Override
@@ -12,7 +12,7 @@ by hand. "
 %% except that both slurs are stem <<-> stem.
 %%
 
-fragment =  {
+fragment = \notes {
   \set autoBeaming = ##f
   \override Stem  #'direction = #1
   \override Slur  #'direction = #1
@@ -23,7 +23,7 @@ fragment =  {
 
 
 \score {
-       \relative c \fragment
+       \notes\relative c \fragment
        \paper { raggedright = ##t} 
 }
 
index e3e754c52817f8b14ac54282f1c7680223ae7868..c57f6f2bf43dc3168000d30f0bd5e03e83e1efdc 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc ="@cindex Slur Beautiful
 The curvature of a slur is adjusted to stay away from note heads and 
@@ -11,7 +11,7 @@ keep slurs more curved.
 "
 }
 
-\score {  {\relative c' {
+\score { \notes {\relative c' {
   \stemDown \slurUp
   c16( a' f' a a f a, c,)
   c( a' f' a a f d, c)
index a686ebff9b53c74c41a6eb61a11e88c93cf14e7d..c98b0fc196c1a4694b4518b7d73e61443c30c5df 100644 (file)
@@ -1,10 +1,10 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {texidoc = "@cindex Slur, dotted
 The appearance of slurs may be changed from solid to dotted or dashed.
 "
 } 
 \score{
-       \relative c'{
+       \notes\relative c'{
                c( d e  c) |
                \slurDotted
                c( d e  c) |
index d75187b4aae149a491fb6005c9f65f3f1a523a35..1d46c9c0ba9e673a713a2f69f4ce7a5ce7b1f2d2 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 \header {
 
 
@@ -11,7 +11,7 @@
     }
 
 \score {
-     \new PianoStaff
+    \notes \new PianoStaff
     <<
        \context Staff = up {
            \clef bass
index 3984879a1ca6b5aefb3b4e908442e3f8539b9dba..f54c6afe3166e8f1eae18f6c97531020389f9158 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc = "@cindex Slur Minimum Length
 By setting the minimum length of a slur, notes are more separated. " 
 }
 
 \score{
-       \relative c''{
+       \notes\relative c''{
                \time 2/4
                \override Slur  #'minimum-length = #40
                c(c)
index e21f7290993c9fbd83aa1410ef3c66c9ba7441a4..e1683c630361fa2f248de3e47d905629e6d2644e 100644 (file)
@@ -1,16 +1,16 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc="@cindex Slur Ugly
 Strange slurs can be produced by setting properties by hand. "
 }
 
-baseWalk =  \relative c {
+baseWalk = \notes \relative c {
   d,8( a' d f a d f d a f d  a)
 }
 
 \score {
-   \context PianoStaff <<
+  \notes \context PianoStaff <<
     \time 6/4
     \context Staff=up { s1 * 6/4 }
     \context Staff=down <<
@@ -22,13 +22,13 @@ baseWalk =  \relative c {
   \paper {
     raggedright = ##t
     \context {
-      \Voice
+      \VoiceContext
       \override Slur #'beautiful = #5.0
       \override Slur #'direction = #1
       \override Stem #'direction = #-1
     }
     \context {
-      \PianoStaff
+      \PianoStaffContext
       \override VerticalAlignment #'threshold = #'(5 . 5)
     }
   }
index d17c67a5db4de6a9ba39a63d72fb22592c46f8ac..d8fdd1edaf67f0fd7443c05311444ad6b5ecf60d 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 texidoc="@cindex Smart Transpose
@@ -64,14 +64,14 @@ In that manner, the most natural enharmonic notes are chosen in this example.
 
     music))
 
-music =  \relative c' { c4 d  e f g a b  c }
+music = \notes \relative c' { c4 d  e f g a b  c }
 
 \score {
-   \context Staff {
+  \notes \context Staff {
     \transpose c ais \music
-    \applymusic #naturalise \transpose c ais \music
+    \apply #naturalise \transpose c ais \music
     \transpose c deses \music
-    \applymusic #naturalise \transpose c deses \music
+    \apply #naturalise \transpose c deses \music
   }
   \paper { raggedright = ##t}
 }
index 25a460c57e4a74988ca19c740845780daf38a99b..12203fc877f76a46b191879c0b66f612c1323a6c 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 % more yummy regression goodness.  -gp
 \header {
@@ -9,7 +9,7 @@ Eighth notes should be spaced equidistantly.
 }
 
 \score { 
-     \relative c''
+    \notes \relative c''
        \context GrandStaff <<
        \new Staff <<
                \new Voice { \stemUp\slurUp\tieUp
index 5ad1560c578dc9bfde3f5758b8fd7b146a6e7869..29bb7f78b92d666631df66439fa7193a257f47ac 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc = "@cindex Spanner after break
 
@@ -25,7 +25,7 @@ after the line break in this example is moved around. "
 
 #(debug-enable 'backtrace)
 
-\score { \relative c'' { 
+\score {\notes \relative c'' { 
     \override Tie  #'after-line-breaking-callback =
        #my-callback
     c1 ~ \break c2 ~ c
index 1399e32c4339d51f39068122f41b7a5d01f0937c..1377581085103ae4bb7f440af85bf4b3827ceb5a 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4
+\version "2.2.0
 
 \header{ texidoc="@cindex Nested Staff Groups
 Staffs can be nested in various combinations. Here, @code{StaffGroup}
@@ -9,7 +9,7 @@ and @code{InnerChoirStaff}, the brackets are shifted leftwards.
 "
 }
 
-\score { 
+\score { \notes
 <<
   \new StaffGroup << 
   \new Staff {c' d' e' f'}
index 55cce286afa812cbae523862781d087cca2f55ce..c52b601228337b1a5ef93fda1a8577a453411338 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -7,7 +7,7 @@
 In this preliminary test of a modern score, the staff lines are washed
 out temporarily. This is done by making a tuned @code{StaffContainer},
 which @code{\skip}s some notes without printing lines either and
-creates a @code{\\new Staff} then in order to create the lines again.
+creates a @code{\new Staff} then in order to create the lines again.
 (Be careful if you use this; it has been done by splitting the
 grouping @code{Axis_group_engraver} and creating functionality into 
 separate contexts, but the clefs and time signatures may not do
@@ -20,7 +20,7 @@ what you would expect.)
 
 
 \score  {
-     \relative c'' <<
+    \notes \relative c'' <<
        \new StaffContainer {
 
            %% need << >>, otherwise we descend to the voice inside SA  
@@ -38,7 +38,7 @@ what you would expect.)
 
     \paper {
        \context {
-           \Score
+           \ScoreContext
            \accepts StaffContainer
            \denies Staff
        }
@@ -53,7 +53,7 @@ what you would expect.)
            \name StaffContainer
        }
        \context {
-           \Staff
+           \StaffContext
            \remove Axis_group_engraver
            \remove Separating_line_group_engraver
            \remove Clef_engraver
index 2b15132bb520a983bc558dde560c1eeae28bb398..edb516b6962cac7049a5f18e9491a3b86d8eddac 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -11,11 +11,11 @@ in the properties of @code{StaffSymbol}.
 }
 
 
-upper = \relative c'' {
+upper = \notes\relative c'' {
   c1 d e f
 }
 
-lower = \relative c {
+lower = \notes\relative c {
   c1 b a g
 }
 
index 80dc63ad86a62f4b3033aa9c439770014ad1aeb9..4210765ddf7853fab42a0d70955e56a29d667d3a 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc = "@cindex Staff Size
 
@@ -8,7 +8,7 @@ must be scaled."
 }
 
 \score {
-   \relative c' <<
+  \notes \relative c' <<
       \new Staff \relative c'' {
          \dynamicDown c,,4 \ff c c c
       }
index b02523bf0c49701f20f4c9365b7d7eecef60d5c8..b0a60e31d2a2fb634dd90da8b0a6bfd295ba440e 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header{ texidoc ="@cindex Staff Space
 By just increasing @code{staff-space} on a staff, you may produce strange
@@ -6,7 +6,7 @@ results. "
 }
 
 \score { 
-   \relative c'' \context GrandStaff <<
+  \notes \relative c'' \context GrandStaff <<
        \new Staff { c4 c4  }
        \new Staff {
            c4
@@ -17,7 +17,7 @@ results. "
         }
 >>
 \paper {  \context  {
-      \Staff
+      \StaffContext
       \override StaffSymbol #'staff-space = #5.5
       }
        raggedright=##t }
index 423d93afb333f56e34c1db03959ce03a8ae8cfa4..03e09fee215ece0a560f6d18d18733364eae6b81 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc = "@cindex Stem Cross Staff
 The chords which exceptionally cross staves may be produced by increasing 
@@ -12,7 +12,7 @@ stemExtend = \once \override Stem  #'length = #22
 noFlag = \once \override Stem  #'flag-style = #'no-flag
 
 
-\score {  
+\score { \notes 
     \context  PianoStaff
         << \new Staff   {
            \stemDown
index a8a16351540a653b93b3c50d7520c139e67777ac..0e016c1031d6382b3bdaeead55bc293921f02113 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc = "@cindex Stem Extend
 Extending stems to the center line may be prevented using @code{no-stem-extend}.
@@ -6,7 +6,7 @@ Extending stems to the center line may be prevented using @code{no-stem-extend}.
 }
 
 \score { 
-  \context Voice \relative c {
+  \context Voice \notes\relative c {
        \context Staff <<
                \new Voice { 
                        f2 f8 g a b 
index 8858f1faf7e0c80f5f37ee08b8f704ab97fe218e..f5a9ba30dec192bc8f8969af889f63f5c732f581 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{ texidoc = "@cindex Stem Length
 The length of stems can be altered. "
 }
 
 \score { 
-  \context Voice \relative c {
+  \context Voice \notes\relative c {
        g''4 \override Stem  #'length = #14  g4
        \override Stem  #'length = #3 g4  g,,4  
   }
index 7915f9efc7b818d18255f33fde19783210986acd..a57c72ca7dc4bdba6160ad239a45c483a2371217 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 \header {texidoc = "@cindex Tablature hammer
 A hammer in tablature can be faked with slurs. "
 } 
 
 \score{
   \context TabStaff <<
-       \relative c''{
+       \notes\relative c''{
                c(d)
                d(d)
                d(c)
index 347359e7356b2b1cc0a9d785882f10f5850d9bcc..1c5d6fafbd6d1cfb25614c782c59f834338952a9 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header{ texidoc = "@cindex Tabulature
 Tablature is internally done by overriding the note-head formatting function
@@ -12,7 +12,7 @@ possible, according to @code{minimumFret}.
 "
 }
 
-partition =  {
+partition = \notes {
     \key e \major
     e8\5 fis\5 gis\5 a\5 b\5 cis'\5 dis'\5 e'\5
     e8\4 fis\4 gis\4 a\4 b\4 cis'\4 dis'\4 e'\4
index 9310a53ae9e337bc04146d859f9f2633cddd9dca..dfa128dff6c269a163e2f31f7f040ce545c921be 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -11,7 +11,7 @@ time and key signatures and clef at the beginning of the extra stave.
 } 
 
 \score {
-   {
+  \notes {
     \relative c' {
       \context Staff = One { c4 d e f }
       <<
@@ -24,7 +24,7 @@ time and key signatures and clef at the beginning of the extra stave.
   }
   \paper {
     \context {
-      \Score
+      \ScoreContext
       \consists Span_bar_engraver
       % Avoid a vertical line at the beginning of the system:
       \remove System_start_delimiter_engraver
@@ -32,7 +32,7 @@ time and key signatures and clef at the beginning of the extra stave.
       \accepts "TemporaryStaff"
     }
     \context {
-      \Staff
+      \StaffContext
       \name "TemporaryStaff"
       \alias "Staff"
       \remove "Clef_engraver"
index a79d711ca0d97b70b34f9e6276ffed9c9a8484f1..fe2415a8766539b8b5af413700680990699da25b 100644 (file)
@@ -16,10 +16,10 @@ output for printing of the source of this example (commenting one line).
 
     }
 
-\version "2.3.4"
+\version "2.2.0"
 
 \score {
-\new Staff  \relative c'' {
+\new Staff \notes \relative c'' {
     \set Staff.instrument = #"rotatebox{90}{Chor}"
 
 %%  uncomment this for rotation
index e74a68974edd86541253f83cfb82b598433c219c..60b8b604597befe3c1008836a432be195c944a75 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc = "@cindex text spanner
 Text spanners can be used in the similar manner than markings for pedals
@@ -8,7 +8,7 @@ or octavation.
 }
 
 \score{
-    \relative c''{
+    \notes\relative c''{
         \override TextSpanner  #'edge-text = #'("bla" . "blu")
         a \startTextSpan
        b c 
index 161b601363abc85cf909246be719f9892fb263f2..1a90db7931a00f71bb75bc8e54cc6818fe615964 100644 (file)
@@ -1,12 +1,12 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc = "@cindex Textscript
 There are different fonts and glyphs to be used with @code{\markup} command. "
 }
 
 \score{
-  \relative c''{
+  \notes\relative c''{
     \override TextScript  #'font-shape = #'upright
     c1^\markup { \dynamic "p" "ma sosten." }  
     c^\markup \huge "ABCD" 
index 323917987757c48680935a42d2bdaabb816cba50..5ca13ef8930d8455674796e72c20965d143874ef 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 
 
@@ -8,7 +8,7 @@
 
 
 \score {
-\context Staff  {
+\context Staff \notes {
 \relative c''  <<
   {
       \once \override Stem  #'transparent = ##t
index afd41af1cab6828f16fc0bedd6d8efa2a75e7835..396166d0d6d106643179344be3760889555d9878 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc= "
 
@@ -21,7 +21,7 @@ tsMarkup =
     }}
        
 
-\score  {  \relative c'
+\score  { \notes \relative c'
          {
           \override Staff.TimeSignature  #'print-function = #Text_item::print
           \override Staff.TimeSignature  #'text = #tsMarkup
index c4c189f5076696f78d954b14869b526a0b2d6015..43cda4dd9c72754c9026ea59ad00b7c729ecdb17 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 % TODO: This file could be old.  Ask about it later.  -gp
 
 \header { texidoc = "@cindex Time
@@ -41,7 +41,7 @@ properties will quite definitely change, and maybe the syntax of the
 %}
 
 \score { 
-  \context Voice \relative c {
+  \context Voice \notes\relative c {
     % LilyPond doesn't understand 'default =>> it does what you want
     \override Staff.TimeSignature  #'style = #'default
     \time 1/1
index c74738a04bcf57038d6bf0822d47bfe38300fc97..5326e3f13aa4fca27eadcb02f0487f323fd9924f 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 % possible rename to bar-something.
 
 \header{ texidoc = "@cindex Bar Length
@@ -9,7 +9,7 @@ You can alter the length of bars by setting explicitly
 }
 
 \score { 
-  \context Voice \relative c {
+  \context Voice \notes\relative c {
     
        
        % \set Score.measurePosition = #(ly:make-moment -1 4)
index 61498e3ea68b8754035a022229464fde680c2183..4ce2898c9c7a08ac9e31b8cc817fb1c44f469826 100644 (file)
@@ -1,35 +1,14 @@
-\version "2.3.4"
-
+\version "2.2.0"
 %{
-   Markup titles also available for direct PostScript output:
+   Experimental markup titles are available in direct PostScript output:
 
    export GS_LIB=$(pwd)/mf/out:/usr/share/texmf/fonts/type1/bluesky/cm
    lilypond-bin -fps input/title/title-markup.ly
 
-  PostScript fonts: WIP.
-
-  * Nonstandardised install directory / how to locate a ps font?
-  * Nonstandardised filenames?
-
-
-For century schoolbook font:
-
-  Debian:
-    cp -pv /usr/share/fonts/type1/gsfonts/c*.{afm,pfb} mf/out
-
-  Red Hat (untested):
-
-    cp -pv /usr/share/fonts/afms/adobe/c*.{afm,pfb} mf/out/
-
-    cp -pv /usr/share/fonts/default/Type1/c*.{pfb,afm} mf/out
-
 %}
 
 \paper{
     #(define page-breaking ly:optimal-page-breaks)
-    %% Ughr, this breaks TeX output...
-    %% fonts = #(make-century-schoolbook-tree 1.0)
-    inputencoding = #"latin1"
 }
 
 latinTest = \markup { \latin-i "Hellö" }
@@ -85,40 +64,28 @@ spaceTest = \markup { "two space chars" }
     %% bookTitle = \markup { \fill-line < \huge\bold \title > > }
 }
 
-%% suggest harder :-)
-%% noPagebreak = #(make-event-chord (list (make-penalty-music 0 1e9)))
-
-\book {
-    
-    \score {
-       \context Staff  \relative c' {
-           c2-\sizeTest c2-\spaceTest
-       }
-       \paper {
-           #(paper-set-staff-size (* 11.0 pt)) 
-       }
+\score {
+    \context Staff \notes \relative c' {
+       c2-\sizeTest c2-\spaceTest
     }
-    
-    \score {
-       \context Staff  \relative c' {
-           %% stress page breaking:
-           %% 35 keep on 3 pages
-           %% 36 spread evenly over 4 pages
-           \repeat unfold 6 { a b c d \break }
-           
-           %% FIXME: TODO factor \pagebreak \noPagebreak into regtest
-           %% Without this, page breaks are better, after measure: 12
-           \noPagebreak
-           \repeat unfold 30 { a b c d \break }
-           c1
-       }
-       \header {
-           %% Override automatic score title
-           %% scoreTitle = \markup { "Tweetje" }
-           opus = "opus 1"
-           piece = "Second"
-       }
-       \paper {
+    \paper {
+%      #(paper-set-staff-size (* 11.0 pt)) 
        }
+}
+
+\header {
+    %% Override automatic score title
+    %% scoreTitle = \markup { "Tweetje" }
+    opus = "opus 1"
+    piece = "Second"
+}
+
+\score {
+    \context Staff \notes \relative c' {
+       %% stress page breaking:
+       %% 35 keep on 3 pages
+       %% 36 spread evenly over 4 pages
+       \repeat unfold 36 { a b c d \break }
+       c1
     }
 }
index d74cf074f3032c5b5ba18cba47235a13842301aa..9f46792667c815477e9ffdd384ce5d2fcbec73e5 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 % MERGE with lilypond-
 \header {
   filename = "title.ly"
@@ -22,7 +22,7 @@
 }
 
 \score {
-  \context Staff  \relative c' {
+  \context Staff \notes \relative c' {
      \repeat unfold 10 {
        c d e f f e d c \break
        c d e f f e d c
@@ -35,7 +35,7 @@
 }
 
 \score {
-   \relative c' {
+  \notes \relative c' {
      f e d c c d e f \break
      f e d c c d e f
   }
index 0dbba5cbda0c911f3ed3b4b2bf0b4598d8a5c3f2..15cd1d7c34a8065c5d85a67951b2c6700a3bbe34 100644 (file)
@@ -1,6 +1,6 @@
-\version "2.3.4"
+\version "2.2.0"
 
-fooBar =  { << c''4 \\ g'4 >> }
+fooBar = \notes { << c''4 \\ g'4 >> }
 
 #(ly:set-option 'parse-protect #f)
 #(load-from-path "to-xml.scm")
index 1262ddfdde63a4bfea253d08f67a3387512cb2b2..1f0a668e8437ddd49b0cb564f3adf80409b3e26a 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.3.4"
+\version "2.2.0"
 
 \header{ texidoc = "@cindex Transposition
 Transposing has also an effect key signature, if it is given using
@@ -10,7 +10,7 @@ the key signature is not transposed."
 
 % should the explicitly set key signature transpose also? -HJJ
 
-vOne =  \relative c''{
+vOne = \notes \relative c''{
         \clef"violin"
         \key d \major
         \time 2/4 
@@ -21,9 +21,9 @@ vOne =  \relative c''{
         c4 c |
 }
 
-vTwo =  \transpose c d { \vOne }
+vTwo = \notes \transpose c d { \vOne }
 
-vThree =  \relative c''{
+vThree = \notes \relative c''{
         \clef"violin"
 %        keysignature fis cis
        \set Staff.keySignature = #'((0 . 2)(3 . 2))
@@ -38,7 +38,7 @@ vThree =  \relative c''{
 }
 
 
-vFour =  \transpose c d \vThree
+vFour = \notes \transpose c d \vThree
 
 \score {
   \context StaffGroup <<
index 0c8fca9ec5ff11004468b78d26fa730d63b2ebab..0fdb12a8b68b5b369ae37afc337d62ab31a5637a 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header { texidoc="@cindex Trill
 The extended trill may be produced using @code{TextSpanner} with @code{trill} 
@@ -8,7 +8,7 @@ spanner style.
 
 
 \score {
-  \context RhythmicStaff  {
+  \context RhythmicStaff \notes {
     \stemDown
     \override Stem  #'transparent = ##t
     \override TextSpanner  #'dash-fraction = #0.0
index eda80c1a1b463c1a44958625cace72c5e125a559..df02e1cb2583a32b0998e3740a66234adafbbb43 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
   texidoc="@cindex Trills
@@ -25,7 +25,7 @@ visible = \revert NoteHead #'transparent
 \score {
   <<
     \context GrandStaff <<
-      \new Staff \relative c'' {
+      \new Staff \notes\relative c'' {
        \time 1/4
        c4\prall
        \time 3/8
@@ -91,7 +91,7 @@ visible = \revert NoteHead #'transparent
        "de suite"1
 %}
       }
-      \new Staff \relative c'' {
+      \new Staff \notes\relative c'' {
         % autobeamer has som problems here
        d32[  \repeat unfold 3 { c d } c]
        d8 ~  d32[\repeat unfold 3 { c32 d  } c]
index 733bfce6c7d0d4a8e568f48be378683dbc70e59a..ea1f233ff45ff5de6ac3366a315b687e1c0c765d 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 % regression.  -gp
 
 \header { 
@@ -7,7 +7,7 @@ recursively all repeats for a correct MIDI output."
 }
 
 
-mel =  \context Staff {
+mel = \notes \context Staff {
   \repeat tremolo 8 {c'32 e' }
   \repeat percent 2 { c''8 d'' }
   \repeat volta 2 {c'4 d' e' f'} 
@@ -18,9 +18,9 @@ mel =  \context Staff {
   \bar "|."
 }
 
-\score {  {
+\score { \notes {
   \mel \break
-  \applymusic #unfold-repeats \mel 
+  \apply #unfold-repeats \mel 
  }
 }
 
index 31c2c50f73d517e8111205972d9950802596dc16..96555701816f349458c10e4fb41addc98a17addd 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
 
@@ -14,7 +14,7 @@
     
 }
 
-\score { \context Lyrics  {
+\score { \context Lyrics \notes {
     \override Score.RehearsalMark  #'self-alignment-X = #LEFT
     \mark #(ly:export (string-append "Processed with LilyPond version " (lilypond-version)))
     s2
index 60a88ab1e521c1fbe26bf877b494b3b512df261b..c5a289f3caac4f942d0c3e7de8c73c44da2b5903 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 % TODO: huh?  what's this file about?  -gp
 
 \header { texidoc = "
@@ -8,7 +8,7 @@ Vertical extents may increased by setting @code{minimumVerticalExtent},
 " }
 
 \score {
-    <<
+  \notes  <<
     \new Staff {
       \set Staff.verticalExtent = #'(-15.0 . 0.0)
       \clef alto
index af52075e838ff95f6db3ddb5badd4c4674280843..5d581b9ed78ea68287846af58d46113ad987b8f3 100644 (file)
@@ -1,5 +1,5 @@
 #(ly:set-option 'old-relative)
-\version "2.3.4"
+\version "2.2.0"
 \header{
 filename =      "twinkle-pop.ly"
 xtitle =        "Ah, vous dirais-je, maman "
@@ -9,7 +9,7 @@ copyright =      "public domain"
 }
 
 
-melodie = \relative c'' {
+melodie = \notes\relative c'' {
         \clef "violin"
         \time 2/4 
 
@@ -59,9 +59,9 @@ text = \lyrics{
 
 \score {
         <<  
-          \context ChordNames \transpose c d\acc
-          \context Staff=melody \transpose c d\melodie
-           \context Lyrics \text
+          \chords \context ChordNames \transpose c d\acc
+          \notes \context Staff=melody \transpose c d\melodie
+           \lyrics \context Lyrics \text
         >>
        \header{
                piece = "clarinet in B$\flat$"
index e17745748548f27453784bbc70671210f573b781..dc4dc20a17da3f1faf381b8660a993459f44658d 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.4"
+\version "2.2.0"
 
 \header {
   texidoc = "Wilhelmus van Nassouwe"
 }
 
 %% hymn tricks
-#(define (prepend-grob-property grob-name
-         grob-prop entry)
+#(define (override-alist-property grob-name alist-property entry)
   (lambda (context)
-   (let*
-    ((grob-def (ly:context-property context grob-name)))
-    (if (pair? grob-def)
-     (ly:context-pushpop-property context grob-name grob-prop
-      (cons
-       entry
-       (assoc-get grob-prop (car grob-def))))))))
-
+    (let* ((grob-properties (ly:context-property context grob-name))
+          (alist-cons (chain-assoc-get alist-property grob-properties '()))
+          (new-alist-cons (assoc-set! alist-cons (car entry) (cdr entry)))
+          (new-props (assoc-set! (car grob-properties)
+                                 alist-property new-alist-cons)))
+      (ly:context-set-property! context grob-name (list new-props)))))
+  
 #(define (set-extra-space grob-name entry value)
-  (prepend-grob-property grob-name 'space-alist
+  (override-alist-property grob-name 'space-alist
+   ;;;huh, broken? --jcn
+   ;;;(cons entry (cons 'fixed-space value))))
    (cons entry (cons 'extra-space value))))
-
-noclefs =  {
-  s1
-  \override Staff.Clef #'break-visibility = #(lambda (dir) (cons #t #t))
-}
-
-setMargins = {
+      
+noclefs = \notes { s1 \set Staff.Clef = \turnOff }
+margins = {
   %% first line left margin
-  %% justified:
-  %% \context Staff \applycontext #(set-extra-space 'TimeSignature 'first-note 4.5)
-  %% raggedright:
-  \context Staff \applycontext #(set-extra-space 'TimeSignature 'first-note 9.5)
+  \applycontext #(set-extra-space 'TimeSignature 'first-note 4.5)
   
   %% next lines left margin
-  \context Staff \applycontext #(set-extra-space 'KeySignature 'staff-bar 15)
+  %% \applycontext #(set-extra-space 'KeySignature 'first-note 15)
+  \applycontext #(set-extra-space 'KeySignature 'staff-bar 15)
   
   %% next lines small key-signature margin
-  \context Staff \applycontext #(set-extra-space 'LeftEdge 'key-signature 1.0)
+  \applycontext #(set-extra-space 'LeftEdge 'key-signature 1.0)
+
+  %% using StaffSymbol.width now
+  %% right margin
+  %%\applycontext #(set-extra-space 'BarLine 'right-edge 12.5)
 }
 
-pipeSymbol = {
+smallBarLines = {
   %% Set height of bar line to 2 staff-spaces
-  \once \override Staff.BarLine #'bar-size-procedure = #(lambda (x) 2)
+  \override Staff.BarLine #'bar-size-procedure = #(lambda (x) 2)
   %% Move barline one staff-space up
-  \once \override Staff.BarLine #'extra-offset = #'(0 . 1)
-  \bar "|"
+  \override Staff.BarLine #'extra-offset = #'(0 . 1)
 }
 
-myBreak = { \bar "" \break }
+endBarLine = {
+  \revert Staff.BarLine #'bar-size-procedure
+  \revert Staff.BarLine #'extra-offset
+  \override Staff.BarLine #'extra-offset = #'(12 . 0)
+  \bar "|."
+}
 
 \paper {
   indent = 0.0\mm
@@ -61,42 +63,30 @@ myBreak = { \bar "" \break }
   textheight = 270.0\mm
 }
 
-voice =  \relative c' {
+voice = \notes \relative c' {
   \clef violin
   \key g \major
-  d4 | g g a a b | a8 \myBreak
-  b8 | c4 b a a | g2. \myBreak
-
-  d4 | g g a a | b a8 \myBreak
-  b8 | c4 b a a| g2.  \myBreak
-
-  %% Hack for better left tekst margin
-  %% b8[ c] | d2 e4 d2 c4 | b a8 \myBreak
-  \set melismaBusyProperties = #'()
-  b8[ c] |
-  \unset melismaBusyProperties
-  d2 e4 d2 c4 b | a8 \myBreak
-  b8 | c4 b a g | a2. \myBreak
-
-  d,4 | g4.\melisma a8\melismaEnd b2 a2 g4 | fis e8 \myBreak
-  d8 | e4 g g fis | 
-  
-  \override NoteHead #'style = #'neo_mensural
+  \partial 4
+  d4 g g a a b a8
+  b8 c4 b a a g2.
 
-  g\breve
+  d4 g g a a b a8
+  b8 c4 b a a g2.
 
-  %% justified lines:
-  %%\override Staff.BarLine #'extra-offset = #'(12 . 0)
-  %% raggedright:
-  \override Staff.BarLine #'extra-offset = #'(23 . 0)
-  \bar "|."
+  b8[ c] d2 e4 d2 c4 b a8
+  b8 c4 b a g a2.
+
+  d,4 g4.\melisma a8\melismaEnd b2 a2 g4 fis e8
+  d8 e4 g g fis
+  \override NoteHead #'style = #'neo_mensural
+  g\breve
 }
 
-stich =  \relative c'' {
+stich = \notes \relative c'' {
   \override Staff.NoteCollision #'merge-differently-dotted = ##t
   \set fontSize = #-3
   %% broken?
-  \override Stem #'beamed-lengths = #(map (lambda (x) (* 0.2 x)) '(3.26))
+  \override Voice.Stem #'beamed-lengths = #(map (lambda (x) (* 0.2 x)) '(3.26))
 
   \voiceTwo
   \partial 4
@@ -132,9 +122,7 @@ text = \lyrics {
   Ben ick van duyt -- schen bloet,
   Den Va -- der -- landt ghe -- trou -- we,
   blyf ick tot in den doot!
-  %% Hack for better left text margin:
-  %% Een Prin -- ce van O -- ran -- gien
-  Een " " Prin -- ce van O -- ran -- gien
+  Een Prin -- ce van O -- ran -- gien
   Ben ick, vry, on -- ver -- veert;
   Den Co -- ninck van His -- pan -- gien
   Heb ick al -- tijt ghe -- eert.
@@ -145,20 +133,13 @@ oneHalfNoteTime = \markup {
   \column < { \number "1" } { \smaller \smaller \note #"2" #-0.5 } >
 }
 
-\paper {
-  raggedright = ##t
-
-  \context {
-    \Score
-    %% defaults
-    %% (shortest-duration-space . 2.0)
-    %% (spacing-increment . 1.2)
-    %% (base-shortest-duration . ,(ly:make-moment 1 8))
-    %% wider spacing
-    \override SpacingSpanner #'shortest-duration-space = #3.0
-    \override SpacingSpanner #'spacing-increment = #1.2
-    \override SpacingSpanner #'base-shortest-duration = #(ly:make-moment 1 8)
-  }
+linebreaks = \notes {
+  \repeat unfold 2 { s4 s1 s4 s8 \bar "" \break
+                    s8 s1 s2. \bar "" \break }
+  s4 s2*3 s4 s8 \bar "" \break
+  s8 s1 s2. \bar "" \break
+  s4 s4*7 s4. \bar "" \break
+  s8 s1 s\breve \endBarLine
 }
 
 \score {
@@ -166,18 +147,33 @@ oneHalfNoteTime = \markup {
     \context Staff <<
       \override Staff.StaffSymbol #'width = #'80
       \set Staff.autoBeaming = ##f
-      \set Score.timing = ##f
-      \setMargins
-     
+      \margins
+      \smallBarLines
+
       %% Less vertical space needed with lyrics
       \set Staff.minimumVerticalExtent = #'(2 . 2)
       
+      %% Second time signature
+      %% \override Staff.TimeSignature   #'print-function =
+      %% #(second-time-signature '(3 . 2) Time_signature::print)
+      
       %% Custom time signature
       \override Staff.TimeSignature #'print-function = #Text_item::print
       \override Staff.TimeSignature #'text = #oneHalfNoteTime
-      \noclefs
-    
+      
+      %% Invisible alternating time signature 
+      \notes {
+       \partial 4 s4
+       \override Staff.TimeSignature #'print-function = #'()
+       \repeat unfold 2 { \time 4/4 s1 \time 2/4 s2 \time 4/4 s1*2 }
+       \time 3/2 s2*3 \time 2/4 s2 \time 4/4 s1*2
+       \time 7/4 s4*7 \time 2/4 s2
+       \time 4/4 s1 \time 4/2 s1*2
+      }
+
       \context Voice = "voice" \voice
+        \linebreaks
+        \noclefs
       \context Voice = "stich" \stich
     >>
     \lyricsto "voice" \new Lyrics {
@@ -186,7 +182,7 @@ oneHalfNoteTime = \markup {
     }
   >>
   \paper {}
-  \midi {}
+%  \midi {}
 }
 
 %%% Local variables:
index 31e0998c9e00e1cb7611c6c9f9260caa7be46e93..7ee21578dbcf5265e4407428b27b0f6a2c414856 100644 (file)
@@ -1,37 +1,32 @@
 /*
   accidental-engraver.cc -- implement accidental_engraver
 
-  source file of the GNU LilyPond music typesetter
-
   (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   Modified 2001--2002 by Rune Zedeler <rz@daimi.au.dk>
 */
 
-#include "accidental-placement.hh"
-#include "arpeggio.hh"
-#include "context.hh"
-#include "engraver-group-engraver.hh"
-#include "engraver.hh"
 #include "event.hh"
+#include "spanner.hh"
 #include "item.hh"
-#include "protected-scm.hh"
+#include "tie.hh"
 #include "rhythmic-head.hh"
+#include "engraver-group-engraver.hh"
+#include "accidental-placement.hh"
 #include "side-position-interface.hh"
-#include "spanner.hh"
-#include "tie.hh"
+#include "engraver.hh"
+#include "arpeggio.hh"
 #include "warn.hh"
+#include "context.hh"
+#include "protected-scm.hh"
 
 
-class Accidental_entry
-{
-public:
+struct Accidental_entry {
   bool done_;
-  Music *melodic_;
-  Grob *accidental_;
+  Music * melodic_;
+  Grob * accidental_;
   Context *origin_;
-  Grob *head_;
+  Grob*  head_;
   bool tied_;
-
   Accidental_entry ();
 };
 
@@ -39,18 +34,13 @@ Accidental_entry::Accidental_entry ()
 {
   tied_ = false;
   done_ = false;
-  melodic_ = 0;
+  melodic_ =0;
   accidental_ = 0;
   origin_ = 0;
   head_ = 0;
 }
 
-class Accidental_engraver : public Engraver
-{
-public:
-  int get_bar_number ();
-  void update_local_key_signature ();
-
+struct Accidental_engraver : Engraver {
 protected:
   TRANSLATOR_DECLARATIONS (Accidental_engraver);
   virtual void process_music ();
@@ -60,83 +50,85 @@ protected:
   virtual void process_acknowledged_grobs ();
   virtual void finalize ();
 
+  void update_local_key_signature ();
 public:
-  Protected_scm last_keysig_;  // ugh.
-  
-  /* Urgh. Since the accidentals depend on lots of variables, we have
-    to store all information before we can really create the
-    accidentals.  */
+
+  Protected_scm last_keysig_;
+
+  /*
+    Urgh. Since the accidentals depend on lots of variables, we have to
+    store all information before we can really create the accidentals.
+  */
   Link_array<Grob> left_objects_;
   Link_array<Grob> right_objects_;
 
-  Grob *accidental_placement_;
+  Grob * accidental_placement_;
 
   Array<Accidental_entry> accidentals_;
   Link_array<Spanner> ties_;
-};
-
 
-/*
-  TODO:
+  SCM get_bar_num ();
+};
 
-  ugh, it is not clear what properties are mutable and which
-  aren't. eg. localKeySignature is changed at runtime, which means
-  that references in grobs should always store ly_deep_copy ()s of
-  those.
- */
 
 static void
-set_property_on_children (Context *trans, char const *sym, SCM val)
+set_property_on_children (Context * trans, const char * sym, SCM val)
 {
   trans->set_property (sym, ly_deep_copy (val));
-  for (SCM p = trans->children_contexts (); ly_c_pair_p (p); p = ly_cdr (p))
+  for (SCM p = trans->context_list_; gh_pair_p (p); p = ly_cdr (p))
     {
-      Context *trg = unsmob_context (ly_car (p));
+      Context *trg =  unsmob_context (ly_car (p));
       set_property_on_children (trg, sym, ly_deep_copy (val));
     }
 }
 
-Accidental_engraver::Accidental_engraver ()
-{
-  accidental_placement_ = 0;
-  last_keysig_ = SCM_EOL;
-}
 
 void
 Accidental_engraver::update_local_key_signature ()
 {
   last_keysig_ = get_property ("keySignature");
-  set_property_on_children (context (), "localKeySignature", last_keysig_);
+  set_property_on_children (daddy_context_, "localKeySignature", last_keysig_);
 
-  Context *trans = context ()->get_parent_context ();
+  Context * trans = daddy_context_->daddy_context_;
 
-  /* Huh. Don't understand what this is good for. --hwn.  */
+  /*
+    Huh. Don't understand what this is good for. --hwn.
+   */
   while (trans && trans->where_defined (ly_symbol2scm ("localKeySignature")))
     {
-      trans->set_property ("localKeySignature", ly_deep_copy (last_keysig_));
-      trans = trans->get_parent_context ();
+      trans->set_property ("localKeySignature",
+                           ly_deep_copy (last_keysig_));
+      trans = trans->daddy_context_;
     }
 }
 
+Accidental_engraver::Accidental_engraver ()
+{
+  accidental_placement_ = 0;
+  last_keysig_ = SCM_EOL;
+}
+
 void
 Accidental_engraver::initialize ()
 {
-  update_local_key_signature (); 
+  update_local_key_signature ();
 }
 
+/*
 
-/** Calculate the number of accidentals on basis of the current local key
-    sig (passed as argument)
-    
-    * First check step+octave (taking into account barnumbers if necessary).
-   
-    * Then check the global signature (only step).
-  
-    Return number of accidentals (0, 1 or 2).  */
+  calculates the number of accidentals on basis of the current local key
+  sig (passed as argument)
+
+  Returns number of accidentals (0, 1 or 2).
+
+*/
 static int
-number_accidentals_from_sig (bool *different, SCM sig, Pitch *pitch,
-                            int curbarnum, SCM laziness, bool ignore_octave)
+number_accidentals_from_sig (bool *different,
+                            SCM sig, Pitch *pitch, SCM scurbarnum, SCM laziness, 
+                            bool ignore_octave)
 {
+  int curbarnum = gh_scm2int (scurbarnum);
+
   int n = pitch->get_notename ();
   int o = pitch->get_octave ();
   int a = pitch->get_alteration ();
@@ -148,15 +140,16 @@ number_accidentals_from_sig (bool *different, SCM sig, Pitch *pitch,
       SCM prev_local
        = scm_assoc (scm_cons (scm_int2num (o), scm_int2num (n)), sig);
 
-      if (ly_c_pair_p (prev_local))
+      if (gh_pair_p (prev_local))
        {
-         if (ly_c_pair_p (ly_cdr (prev_local))
-             && ly_c_number_p (laziness))
+         if (gh_pair_p (ly_cdr (prev_local))
+             && gh_number_p (laziness)
+             )
            {
-             int barnum = ly_scm2int (ly_cddr (prev_local));
+             int barnum = gh_scm2int (ly_cddr (prev_local));
 
              prev_local = scm_cons (ly_car (prev_local), ly_cadr (prev_local));
-             if (curbarnum <= barnum + ly_scm2int (laziness))
+             if (curbarnum <= barnum + gh_scm2int (laziness))
                prev_alt = prev_local;
            }
        }
@@ -165,13 +158,19 @@ number_accidentals_from_sig (bool *different, SCM sig, Pitch *pitch,
   if (prev_alt == SCM_BOOL_F)
     prev_alt = scm_assoc (scm_int2num (n), sig);
 
+
   prev_alt =  (prev_alt == SCM_BOOL_F) ? scm_int2num (0) : ly_cdr (prev_alt); 
     
-  /* UGH. prev_acc can be #t in case of ties. What is this for?  */
-  int p = ly_c_number_p (prev_alt) ? ly_scm2int (prev_alt) : 0;
+  /*
+    UGH. prev_acc can be #t in case of ties. What is this for?
+    
+   */
+  int p = gh_number_p (prev_alt) ? gh_scm2int (prev_alt) : 0;
+
+
 
   int num;
-  if (a == p && ly_c_number_p (prev_alt))
+  if (a == p && gh_number_p (prev_alt))
     num = 0;
   else if ( (abs (a)<abs (p) || p*a<0) && a != 0 )
     num = 2;
@@ -184,37 +183,36 @@ number_accidentals_from_sig (bool *different, SCM sig, Pitch *pitch,
 
 static int
 number_accidentals (bool *different,
-                   Pitch *pitch, Context *origin,
-                   SCM accidentals, int curbarnum)
+                   Pitch *pitch, Context * origin, 
+                   SCM accidentals, SCM curbarnum)
 {
   int number = 0;
 
   *different = false;
-  if (ly_c_pair_p (accidentals) && !ly_c_symbol_p (ly_car (accidentals)))
+  if (gh_pair_p (accidentals) && !gh_symbol_p (ly_car (accidentals)))
     warning (_f ("Accidental typesetting list must begin with context-name: %s", 
                 ly_scm2string (ly_car (accidentals)).to_str0 ()));
   
-  for (; ly_c_pair_p (accidentals) && origin;
-       accidentals = ly_cdr (accidentals))
+  for (; gh_pair_p (accidentals) && origin; accidentals = gh_cdr (accidentals))
     {
       // If pair then it is a new accidentals typesetting rule to be checked
-      SCM rule = ly_car (accidentals);
-      if (ly_c_pair_p (rule))
+      SCM rule = gh_car (accidentals);
+      if (gh_pair_p (rule))
        {
-         SCM type = ly_car (rule);
-         SCM laziness = ly_cdr (rule);
+         SCM type = gh_car (rule);
+         SCM lazyness = gh_cdr (rule);
          SCM localsig = origin->get_property ("localKeySignature");
          
          bool same_octave_b = 
-           ly_c_eq_p (ly_symbol2scm ("same-octave"), type);
+           gh_eq_p (ly_symbol2scm ("same-octave"), type);
          bool any_octave_b = 
-           ly_c_eq_p (ly_symbol2scm ("any-octave"), type);
+           gh_eq_p (ly_symbol2scm ("any-octave"), type);
 
          if (same_octave_b || any_octave_b)
            {
              bool d = false;
              int n = number_accidentals_from_sig
-               (&d, localsig, pitch, curbarnum, laziness, any_octave_b);
+               (&d, localsig, pitch, curbarnum, lazyness, any_octave_b);
              *different = *different || d;
              number = max (number, n);     
            }
@@ -227,11 +225,11 @@ number_accidentals (bool *different,
       /*
        if symbol then it is a context name. Scan parent contexts to find it.
       */
-      else if (ly_c_symbol_p (rule))
+      else if (gh_symbol_p (rule))
        {
-         Context *dad = origin;
+         Context * dad = origin;
          while (dad && !dad->is_alias (rule))
-           dad = dad->get_parent_context ();
+           dad = dad->daddy_context_;
       
          if (dad)
            origin = dad;
@@ -243,19 +241,18 @@ number_accidentals (bool *different,
   return number;
 }
 
-int
-Accidental_engraver::get_bar_number ()
+SCM
+Accidental_engraver::get_bar_num ()
 {
   SCM barnum = get_property ("currentBarNumber");
   SCM smp = get_property ("measurePosition");
-
-  int bn = robust_scm2int (barnum, 0);
-  
+      
   Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
-  if (mp.main_part_ < Rational (0))
-    bn--;
-  
-  return bn;
+  if (mp.main_part_ < Rational (0)
+      && gh_number_p (barnum))
+    barnum = scm_int2num (gh_scm2int (barnum) - 1);
+      
+  return barnum ;
 }
 
 void
@@ -265,19 +262,19 @@ Accidental_engraver::process_acknowledged_grobs ()
     {
       SCM accidentals =  get_property ("autoAccidentals");
       SCM cautionaries =  get_property ("autoCautionaries");
-      int barnum = get_bar_number ();
+      SCM barnum = get_bar_num ();
       
       bool extra_natural_b = get_property ("extraNatural") == SCM_BOOL_T;
-      for (int i = 0; i < accidentals_.size (); i++) 
+      for (int i = 0; i  < accidentals_.size (); i++) 
        {
          if (accidentals_[i].done_ )
            continue;
          accidentals_[i].done_  = true;
-         Grob *support = accidentals_[i].head_;
-         Music *note = accidentals_[i].melodic_;
-         Context *origin = accidentals_[i].origin_;
+         Grob * support = accidentals_[i].head_;
+         Music * note = accidentals_[i].melodic_;
+         Context * origin = accidentals_[i].origin_;
 
-         Pitch *pitch = unsmob_pitch (note->get_property ("pitch"));
+         Pitch * pitch = unsmob_pitch (note->get_property ("pitch"));
          if (!pitch)
            continue;
 
@@ -316,25 +313,34 @@ Accidental_engraver::process_acknowledged_grobs ()
                level, so that we get the property settings for
                Accidental from the respective Voice.
               */
-             Grob *a
-               = make_item_from_properties (origin->implementation (),
-                                            ly_symbol2scm ("Accidental"),
-                                            note->self_scm ());
+             Grob * a = make_item_from_properties (origin,
+                                                   ly_symbol2scm ("Accidental"));
              a->set_parent (support, Y_AXIS);
 
              if (!accidental_placement_)
-               accidental_placement_ = make_item ("AccidentalPlacement",
-                                                  a->self_scm ());
+               {
+                 accidental_placement_ = make_item ("AccidentalPlacement");
+                 announce_grob (accidental_placement_, a->self_scm ());
+               }
+             
              Accidental_placement::add_accidental (accidental_placement_, a);
-             SCM accs = scm_cons (scm_int2num (pitch->get_alteration ()),
-                                  SCM_EOL);
+             announce_grob (a, SCM_EOL);
+
+             
+             SCM accs = gh_cons (scm_int2num (pitch->get_alteration ()), SCM_EOL);
              if (num == 2 && extra_natural_b)
-               accs = scm_cons (scm_int2num (0), accs);
+               accs = gh_cons (scm_int2num (0), accs);
+
+             /* TODO:
 
-             /* TODO: add cautionary option in accidental. */
+             add cautionary option in accidental.
+              */
 
              if (cautionary)
-               a->set_property ("cautionary", SCM_BOOL_T);
+               {
+                 a->set_property ("cautionary", SCM_BOOL_T);
+               }
+             
              
              support->set_property ("accidental-grob", a->self_scm ());
 
@@ -354,6 +360,9 @@ Accidental_engraver::process_acknowledged_grobs ()
     }
 }
 
+
+
+
 void
 Accidental_engraver::finalize ()
 {
@@ -363,17 +372,18 @@ Accidental_engraver::finalize ()
 void
 Accidental_engraver::stop_translation_timestep ()
 {
-  for (int j = ties_.size (); j--;)
+  for (int j  = ties_.size (); j --; )
     {
-      Grob *r = Tie::head (ties_[j], RIGHT);
+      Grob * r = Tie::head (ties_[j], RIGHT);
       for (int i = accidentals_.size ();  i--;)
        if (accidentals_[i].head_ == r)
          {
-           if (Grob *g = accidentals_[i].accidental_)
+           if (Grob * g = accidentals_[i].accidental_)
              {
                g->set_property ("tie", ties_[j]->self_scm ());
-               accidentals_[i].tied_ = true;
+               accidentals_[i].tied_   = true;
              }
+           
            ties_.del (j);
            break;
          }
@@ -381,27 +391,26 @@ Accidental_engraver::stop_translation_timestep ()
 
   for (int i = accidentals_.size (); i--;) 
     {
-      int barnum = get_bar_number ();
+      SCM barnum = get_bar_num ();
 
-      Music *note = accidentals_[i].melodic_;
+      Music * note = accidentals_[i].melodic_;
       Context * origin = accidentals_[i].origin_;
 
-      Pitch *pitch = unsmob_pitch (note->get_property ("pitch"));
+      Pitch * pitch = unsmob_pitch (note->get_property ("pitch"));
       if (!pitch)
        continue;
-
+      
       int n = pitch->get_notename ();
       int o = pitch->get_octave ();
       int a = pitch->get_alteration ();
-      SCM key = scm_cons (scm_int2num (o), scm_int2num (n));
+      SCM on_s = gh_cons (scm_int2num (o), scm_int2num (n));
 
-      while (origin
-            && origin->where_defined (ly_symbol2scm ("localKeySignature")))
+      while (origin)
        {
          /*
            huh? we set props all the way to the top? 
          */
-         SCM localsig = origin->get_property ("localKeySignature");
+         SCM localsig =  ly_deep_copy (origin->get_property ("localKeySignature"));
          bool change = false;
          if (accidentals_[i].tied_)
            {
@@ -410,7 +419,7 @@ Accidental_engraver::stop_translation_timestep ()
                that of the tied note and of the key signature.
              */
              localsig = ly_assoc_front_x
-               (localsig, key, scm_cons (SCM_BOOL_T, scm_int2num (barnum)));
+               (localsig, on_s, gh_cons (SCM_BOOL_T, barnum));
 
              change = true;
            }
@@ -420,20 +429,29 @@ Accidental_engraver::stop_translation_timestep ()
                not really really correct if there are more than one
                noteheads with the same notename.
              */
-             localsig = ly_assoc_front_x (localsig, key,
-                                          scm_cons (scm_int2num (a),
-                                                    scm_int2num (barnum)));
+             localsig = ly_assoc_front_x
+               (localsig, on_s, gh_cons (scm_int2num (a), barnum));
+
              change = true;
            }
 
          if (change)
-           origin->set_property ("localKeySignature", localsig);
-
-         origin = origin->get_parent_context ();
+           origin->set_property ("localKeySignature",  localsig);
+         origin = origin->daddy_context_;
        }
     }
+  
+  for (int i = 0; i < accidentals_.size (); i++)
+    {
+      if (Grob *a = accidentals_[i].accidental_)
+       typeset_grob (a);
+    }
+
+  if (accidental_placement_)
+    typeset_grob (accidental_placement_);
 
   accidental_placement_ = 0;
+  
   accidentals_.clear ();
   left_objects_.clear ();
   right_objects_.clear ();
@@ -442,65 +460,66 @@ Accidental_engraver::stop_translation_timestep ()
 void
 Accidental_engraver::acknowledge_grob (Grob_info info)
 {
-  Music *note = info.music_cause ();
+  Music * note =  info.music_cause ();
 
   if (note
       && note->is_mus_type ("note-event")
       && Rhythmic_head::has_interface (info.grob_))
     {
       if (to_boolean ( get_property ("harmonicAccidentals"))
-         || !ly_c_equal_p (info.grob_->get_property ("style"),
+         || !gh_equal_p (info.grob_->get_property ("style"),
                          ly_symbol2scm ("harmonic")))
        {
          
          Accidental_entry entry ;
          entry.head_ = info.grob_;
-         entry.origin_ = info.origin_trans_->context ();
+         entry.origin_ = info.origin_trans_->daddy_context_;
          entry.melodic_ = note;
 
          accidentals_.push (entry);
        }
     }
   else if (Tie::has_interface (info.grob_))
-    ties_.push (dynamic_cast<Spanner*> (info.grob_));
+    {
+      ties_.push (dynamic_cast<Spanner*> (info.grob_));
+    }
   else if (Arpeggio::has_interface (info.grob_))
-    left_objects_.push (info.grob_); 
-  else if (info.grob_
-          ->internal_has_interface (ly_symbol2scm ("finger-interface")))
-    left_objects_.push (info.grob_); 
+    {
+      left_objects_.push (info.grob_); 
+    }
+  else if (info.grob_->internal_has_interface (ly_symbol2scm ("finger-interface")))
+    {
+      left_objects_.push (info.grob_); 
+    }
 }
 
 void
 Accidental_engraver::process_music ()
 {
   SCM sig = get_property ("keySignature");
+
   /* Detect key sig changes.
-     Update all parents and children.  */
+     Update all parents and children
+  */
   if (last_keysig_ != sig)
-    update_local_key_signature ();
+    {
+      update_local_key_signature ();
+    }
 }
 
+
+
+
+
 ENTER_DESCRIPTION (Accidental_engraver,
-                  "Make accidentals.  "
-                  "Catch note heads, ties and notices key-change events.  "
-                  "This engraver usually lives at Staff level, but "
+                  "Make accidentals.  Catches note heads, ties and notices key-change "
+                  "events.  This engraver usually lives at Staff level, but "
                   "reads the settings for Accidental at @code{Voice} level, " 
                   "so you can @code{\\override} them at @code{Voice}. "
                   ,
-                  "Accidental"
-                  ,
-                  ""
-                  ,
-                  "arpeggio-interface "
-                  "finger-interface "
-                  "rhythmic-head-interface "
-                  "tie-interface "
-                  ,
-                  "autoAccidentals "
-                  "autoCautionaries "
-                  "extraNatural "
-                  "harmonicAccidentals "
-                  "localKeySignature"
-                  ,
-                  "localKeySignature"
-                  );
+                  
+                  "Accidental",
+                  "",
+              "finger-interface rhythmic-head-interface tie-interface arpeggio-interface",
+              "localKeySignature harmonicAccidentals extraNatural autoAccidentals autoCautionaries",
+                  "localKeySignature");
index 12b21171615b84f7cec70bb190ca931b4dd9a438..48308142fd4abb10a66b611427c6149e7a6becb5 100644 (file)
@@ -64,9 +64,9 @@ Accidental_placement::add_accidental (Grob* me, Grob* a)
       entry = SCM_EOL;
     }
   else
-    entry = ly_cdr (entry);
+    entry = gh_cdr (entry);
 
-  entry = scm_cons (a->self_scm (), entry);
+  entry = gh_cons (a->self_scm (), entry);
 
   accs = scm_assq_set_x (accs,  key, entry);
 
@@ -81,11 +81,11 @@ Accidental_placement::split_accidentals (Grob * accs,
                                         Link_array<Grob> *break_reminder,
                                         Link_array<Grob> *real_acc)
 {
-  for (SCM acs =accs->get_property ("accidental-grobs"); ly_c_pair_p (acs);
-       acs =ly_cdr (acs))
-    for (SCM s = ly_cdar (acs); ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM acs =accs->get_property ("accidental-grobs"); gh_pair_p (acs);
+       acs =gh_cdr (acs))
+    for (SCM s = gh_cdar (acs); gh_pair_p (s); s = gh_cdr (s))
       {
-       Grob *a = unsmob_grob (ly_car (s));
+       Grob *a = unsmob_grob (gh_car (s));
 
        if (unsmob_grob (a->get_property ("tie")))
          break_reminder->push (a);
@@ -250,7 +250,7 @@ stagger_apes (Link_array<Accidental_placement_entry> *apes)
 SCM
 Accidental_placement::position_accidentals (Grob * me)
 {
-  if (!me->is_live ())
+  if (!me->live ())
     return SCM_UNSPECIFIED;
   
   SCM accs = me->get_property ("accidental-grobs");
@@ -260,13 +260,13 @@ Accidental_placement::position_accidentals (Grob * me)
     Y-position, they share an Ape, and will be printed in overstrike.
    */
   Link_array<Accidental_placement_entry> apes;
-  for (SCM s = accs; ly_c_pair_p (s); s =ly_cdr (s))
+  for (SCM s = accs; gh_pair_p (s); s =gh_cdr (s))
     {
       Accidental_placement_entry *ape = new Accidental_placement_entry;
-      ape->notename_ = ly_scm2int (ly_caar (s));
+      ape->notename_ = gh_scm2int (gh_caar (s));
       
-      for (SCM t = ly_cdar (s); ly_c_pair_p (t); t =ly_cdr (t))
-       ape->grobs_.push (unsmob_grob (ly_car (t)));
+      for (SCM t = gh_cdar (s); gh_pair_p (t); t =gh_cdr (t))
+       ape->grobs_.push (unsmob_grob (gh_car (t)));
 
       apes.push (ape);
     }
index cde835bd534aff2a196df53d144ab3d5fb357527..b565881e88c21d7b1293d349dd1b2071518c0f31 100644 (file)
@@ -1,15 +1,14 @@
 /*
   accidental.cc -- implement Accidental_interface
 
-  source file of the GNU LilyPond music typesetter
+  (c) 2001--2004 Han-Wen Nienhuys
   
-  (c) 2001--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
+ */
 #include "font-interface.hh"
 #include "item.hh"
 #include "stencil.hh"
 #include "accidental-interface.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "pitch.hh"
 
 /*
@@ -20,6 +19,8 @@
   accidental-placement.cc
 
 */
+
+
 Stencil
 parenthesize (Grob*me, Stencil m)
 {
@@ -59,17 +60,17 @@ Accidental_interface::accurate_boxes (Grob *a,Grob**common)
   if (to_boolean (a->get_property ("cautionary")))
     {
       SCM cstyle = a->get_property ("cautionary-style");
-      parens = ly_c_equal_p (cstyle, ly_symbol2scm ("parentheses"));
+      parens = gh_equal_p (cstyle, ly_symbol2scm ("parentheses"));
 
     }
 
   SCM accs = a->get_property ("accidentals");
   SCM scm_style = a->get_property ("style");
-  if (!ly_c_symbol_p (scm_style)
+  if (!gh_symbol_p (scm_style)
       && !parens
       && scm_ilength (accs) == 1)
     {
-      if (ly_scm2int (ly_car (accs)) == FLAT)
+      if (gh_scm2int (gh_car (accs)) == FLAT)
        {
          Box stem = b;
          Box bulb = b;
@@ -174,13 +175,13 @@ Accidental_interface::print (SCM smob)
   if (caut)
     {
       SCM cstyle = me->get_property ("cautionary-style");
-      parens = ly_c_equal_p (cstyle, ly_symbol2scm ("parentheses"));
-      smaller = ly_c_equal_p (cstyle, ly_symbol2scm ("smaller"));
+      parens = gh_equal_p (cstyle, ly_symbol2scm ("parentheses"));
+      smaller = gh_equal_p (cstyle, ly_symbol2scm ("smaller"));
     }
 
   SCM scm_style = me->get_property ("style");
   String style;
-  if (ly_c_symbol_p (scm_style))
+  if (gh_symbol_p (scm_style))
     {
       style = ly_symbol2string (scm_style);
     }
@@ -196,7 +197,7 @@ Accidental_interface::print (SCM smob)
   if (smaller)
     {
       SCM ac = Font_interface::text_font_alist_chain (me);
-      ac = scm_cons (scm_cons (scm_cons
+      ac = gh_cons (gh_cons (gh_cons
                             (ly_symbol2scm ("font-size"),
                              scm_int2num (-2)), SCM_EOL),
                    ac);
@@ -207,9 +208,9 @@ Accidental_interface::print (SCM smob)
 
   Stencil mol;
   for (SCM s = me->get_property ("accidentals");
-       ly_c_pair_p (s); s = ly_cdr (s))
+       gh_pair_p (s); s = gh_cdr (s))
     {
-      int alteration = ly_scm2int (ly_car (s));
+      int alteration = gh_scm2int (gh_car (s));
       String font_char = get_fontcharname (style, alteration);
       Stencil acc (fm->find_by_name ("accidentals-" + font_char));
 
index c92433bd1a079e968dd486be3bd4fbecdee70596..f79ba628bb3dc93de687d6ca770c723e3426b16c 100644 (file)
 
 #include <string.h>
 
-#include "warn.hh"
+#include "warn.hh"             // error ()
 #include "libc-extension.hh"
 #include "afm.hh"
+#include "stencil.hh"
 #include "dimensions.hh"
 
-Adobe_font_metric::Adobe_font_metric (AFM_Font_info *fi)
+Adobe_font_metric::Adobe_font_metric (AFM_Font_info * fi)
 {
   checksum_ = 0;
-  font_info_ = fi;
-  design_size_ = 1.0;
-  
-  for (int i = 256 >? fi->numOfChars; i--;)
+  font_inf_ = fi;
+
+  for (int i= 256  >? fi->numOfChars; i--;)
     ascii_to_metric_idx_.push (-1);
   
   for (int i=0; i < fi->numOfChars; i++)
     {
       AFM_CharMetricInfo * c = fi->cmi + i;
 
-      /* Some TeX afm files contain code = -1.  We don't know why,
-       let's ignore it.  */
+      /*
+       Some TeX afm files contain code = -1. We don't know why, let's
+       ignore it.
+       
+       */
       if (c->code >= 0)
        ascii_to_metric_idx_[c->code] = i;
       name_to_metric_dict_[c->name] = i;
     }
 }
 
-Adobe_font_metric::~Adobe_font_metric ()
-{
-  AFM_free (font_info_);
-}
 
 SCM
-Adobe_font_metric::make_afm (AFM_Font_info *fi,
-                            unsigned int checksum,
-                            Real design_size)
+Adobe_font_metric::make_afm (AFM_Font_info *fi, unsigned int checksum)
 {
-  Adobe_font_metric *fm = new Adobe_font_metric (fi);
+  Adobe_font_metric * fm = new Adobe_font_metric (fi);
   fm->checksum_ = checksum;
-  fm->design_size_ = design_size;
   return fm->self_scm ();    
 }
 
-AFM_CharMetricInfo const*
+
+AFM_CharMetricInfo const *
 Adobe_font_metric::find_ascii_metric (int a) const
 {
   if (ascii_to_metric_idx_[a] >=0)
     {
       int code = ascii_to_metric_idx_[a];
-      if (code >= 0)
-       return font_info_->cmi + code;
+      if (code>=0)
+       {
+         return font_inf_->cmi + code;
+       }
     }
+
   return 0;
 }
 
-AFM_CharMetricInfo const*
+
+
+AFM_CharMetricInfo const *
 Adobe_font_metric::find_char_metric (String nm) const
 {
   int idx = name_to_index (nm);
   if (idx >= 0)
-    return font_info_->cmi + idx;
-  return 0;
+    return font_inf_->cmi+ idx;
+  else
+    return 0;
 }
 
 int
-Adobe_font_metric::name_to_index (String name) const
+Adobe_font_metric::name_to_index (String nm)const 
 {
-  std::map<String,int>::const_iterator ai = name_to_metric_dict_.find (name);
+  std::map<String,int>::const_iterator ai = name_to_metric_dict_.find (nm);
+  
   if (ai == name_to_metric_dict_.end ())
     return -1;
-  return (*ai).second; 
+  else
+    return (*ai).second; 
 }
 
 int
 Adobe_font_metric::count () const
 {
-  return font_info_->numOfChars;
+  return font_inf_->numOfChars ;
 }
 
 Box
 Adobe_font_metric::get_ascii_char (int code) const
 {
-  AFM_CharMetricInfo const *c = find_ascii_metric (code);
-  Box b (Interval (0, 0), Interval (0, 0));
+  AFM_CharMetricInfo const
+    * c =  find_ascii_metric (code);
+  Box b (Interval (0,0),Interval (0,0));
   if (c)
-    b = afm_bbox_to_box (c->charBBox);         
+    b = afm_bbox_to_box (c->charBBox);                 
+
   return b;
 }
 
-int
-Adobe_font_metric::index_to_ascii (int code) const
-{
-  return font_info_->cmi[code].code;
-}
 
 Box
 Adobe_font_metric::get_indexed_char (int code) const
 {
-  if (code >= 0)
-    return afm_bbox_to_box (font_info_->cmi[code].charBBox);
+  if (code>= 0)
+    return afm_bbox_to_box (font_inf_->cmi[code].charBBox);
   else
-    return Box (Interval (0, 0), Interval (0, 0));
+    return   Box (Interval (0,0),Interval (0,0));
 }
 
 SCM
 read_afm_file (String nm)
 {
   FILE *f = fopen (nm.to_str0 () , "r");
-  char s[2048] = "";
+  char s[2048];
   char *check_key = "Comment TfmCheckSum";
-  char *size_key = "Comment DesignSize";
 
   unsigned int cs = 0;
-  Real ds = 1.0;
-  
+
+  s[0] = 0;
   /* Assume check_key in first 10 lines */
   for (int i = 0; i < 10; i++)
     {
       fgets (s, sizeof (s), f);
       if (strncmp (s, check_key, strlen (check_key)) == 0)
-       sscanf (s + strlen (check_key), "%ud", &cs);
-      else if (strncmp (s, size_key, strlen (size_key)) == 0)
-       sscanf (s + strlen (size_key), "%lf", &ds);
+       {
+         sscanf (s + strlen (check_key), "%ud", &cs);
+         break;
+       }
     }
   
   rewind (f);
     
-  AFM_Font_info *fi;
-  int ok = AFM_parseFile (f, &fi, ~0);
+  AFM_Font_info * fi;
+  int ok = AFM_parseFile (f, &fi, ~1);
 
   if (ok)
     {
@@ -145,12 +147,14 @@ read_afm_file (String nm)
     }
   fclose (f);
 
-  return Adobe_font_metric::make_afm (fi, cs, ds);
+  return Adobe_font_metric::make_afm (fi, cs);
 }
 
 
-/* Actually, AFMs will be printers point, usually, but our .py script dumps
-  real points.  */
+/*
+  actually, AFMs will be printers point, usually, but our .py script dumps
+  real points.
+ */
 Box
 afm_bbox_to_box (AFM_BBox bb)
 {
@@ -160,20 +164,44 @@ afm_bbox_to_box (AFM_BBox bb)
 }
 
 Offset
-Adobe_font_metric::get_indexed_wxwy (int k) const
+Adobe_font_metric::get_indexed_wxwy (int k)const
 {
-  AFM_CharMetricInfo const *mi = font_info_->cmi+ k;
+  AFM_CharMetricInfo const *mi = font_inf_->cmi+ k;
   return 1/1000.0 PT * Offset (mi->wx, mi->wy); 
 }
 
-Real
-Adobe_font_metric::design_size () const
+
+
+Adobe_font_metric::~Adobe_font_metric ()
 {
-  return design_size_;    
+  AFM_free (font_inf_);
 }
 
-String
-Adobe_font_metric::coding_scheme () const
+/*
+  return a stencil, without fontification 
+ */
+Stencil
+Adobe_font_metric::find_by_name (String s) const
 {
-  return font_info_->gfi->encodingScheme;
+  AFM_CharMetricInfo const *cm = find_char_metric (s);
+
+  if (!cm)
+    {
+      /*
+       Why don't we return empty?
+       */
+      
+      Stencil m;
+      m.set_empty (false);
+      return m;
+    }
+  
+  SCM at = (scm_list_n (ly_symbol2scm ("char"),
+                     scm_int2num (cm->code),
+                     SCM_UNDEFINED));
+  
+  //  at= fontify_atom ((Font_metric*)this, at);
+  Box b = afm_bbox_to_box (cm->charBBox);
+
+  return Stencil (b, at);
 }
index b3bbf6a07c4f74ee25ec5fbaebadbb6477a0751c..20f07919bde0c2392b0fff4d7539e32a40f8e53f 100644 (file)
 #include "group-interface.hh"
 #include "axis-group-interface.hh"
 #include "hara-kiri-group-spanner.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 
 MAKE_SCHEME_CALLBACK (Align_interface,alignment_callback,2);
 SCM
 Align_interface::alignment_callback (SCM element_smob, SCM axis)
 {
   Grob * me = unsmob_grob (element_smob);
-  Axis ax = (Axis)ly_scm2int (axis);
+  Axis ax = (Axis)gh_scm2int (axis);
   Grob * par = me->get_parent (ax);
   if (par && !to_boolean (par->get_property ("positioning-done")))
     {
       Align_interface::align_elements_to_extents (par, ax);
     }
-  return scm_make_real (0.0);
+  return gh_double2scm (0.0);
 }
 
 MAKE_SCHEME_CALLBACK (Align_interface,fixed_distance_alignment_callback,2);
@@ -33,13 +33,13 @@ SCM
 Align_interface::fixed_distance_alignment_callback (SCM element_smob, SCM axis)
 {
   Grob * me = unsmob_grob (element_smob);
-  Axis ax = (Axis)ly_scm2int (axis);
+  Axis ax = (Axis)gh_scm2int (axis);
   Grob * par = me->get_parent (ax);
   if (par && !to_boolean (par->get_property ("positioning-done")))
     {
       Align_interface::align_to_fixed_distance (par, ax);
     }
-  return scm_make_real (0.0);
+  return gh_double2scm (0.0);
 }
 
 /*
@@ -52,7 +52,7 @@ Align_interface::align_to_fixed_distance (Grob *me , Axis a)
   
   SCM d =   me->get_property ("stacking-dir");
   
-  Direction stacking_dir = ly_c_number_p (d) ? to_dir (d) : CENTER;
+  Direction stacking_dir = gh_number_p (d) ? to_dir (d) : CENTER;
   if (!stacking_dir)
     stacking_dir = DOWN;
 
@@ -82,7 +82,7 @@ Align_interface::align_to_fixed_distance (Grob *me , Axis a)
          && Hara_kiri_group_spanner::has_interface (elems[j]))
        Hara_kiri_group_spanner::consider_suicide (elems[j]);
 
-      if (!elems[j]->is_live ())
+      if (!elems[j]->live ())
        elems.del (j);
     }
 
@@ -124,11 +124,11 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
   
   SCM d =   me->get_property ("stacking-dir");
   
-  Direction stacking_dir = ly_c_number_p (d) ? to_dir (d) : CENTER;
+  Direction stacking_dir = gh_number_p (d) ? to_dir (d) : CENTER;
   if (!stacking_dir)
     stacking_dir = DOWN;
   
-  Interval threshold = robust_scm2interval (me->get_property ("threshold"), Interval (0, Interval::infinity ()));
+  Interval threshold  = robust_scm2interval ( me->get_property ("threshold"), Interval (0, Interval::infinity ()));
   
   Array<Interval> dims;
 
@@ -216,8 +216,8 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
        FIXME: uncommenting freaks out the Y-alignment of
        line-of-score.
        */
-      if (ly_c_number_p (align))
-       center_offset = total.linear_combination (ly_scm2double (align));
+      if (gh_number_p (align))
+       center_offset = total.linear_combination (gh_scm2double (align));
 
       for (int j = 0 ;  j < all_grobs.size (); j++)
        all_grobs[j]->translate_axis (all_translates[j] - center_offset, a);
@@ -226,7 +226,7 @@ Align_interface::align_elements_to_extents (Grob * me, Axis a)
 Axis
 Align_interface::axis (Grob*me)
 {
-  return  Axis (ly_scm2int (ly_car (me->get_property ("axes"))));
+  return  Axis (gh_scm2int (ly_car (me->get_property ("axes"))));
 }
 
 void
@@ -253,7 +253,7 @@ find_fixed_alignment_parent  (Grob *g)
 {
   while (g)
     {
-      if (ly_c_number_p (g->get_property ("forced-distance")))
+      if (gh_number_p (g->get_property ("forced-distance")))
        return g;
 
       g = g->get_parent (Y_AXIS);
index 94655c48c8726e875220751a48592644e5755d8f..d2450498b350f4cbe8f2a3dafc40f9e7ec7e3bed 100644 (file)
@@ -11,6 +11,7 @@
 #include "config.h"
 #include "main.hh"
 #include "all-font-metrics.hh"
+
 #include "warn.hh"
 #include "afm.hh"
 #include "tfm.hh"
@@ -18,7 +19,7 @@
 #include "scm-hash.hh"
 #include "kpath.hh"
 
-static const char *default_font_str0_ = "cmr10";
+static const char * default_font_str0_ = "cmr10";
 
 All_font_metrics::All_font_metrics (String path)
 {
@@ -37,65 +38,68 @@ All_font_metrics::~All_font_metrics ()
 /*
   TODO: our AFM handling is broken: the units in an AFM file are
   relative to the design size (1000 units = 1 designsize). Hence we
-  should include design size when generating an AFM metric.
-
-  ugr: copied from find_tfm.
+  should include design size when generating an AFM metric. 
  */
 Adobe_font_metric *
 All_font_metrics::find_afm (String name)
 {
   SCM sname = ly_symbol2scm (name.to_str0 ());
+
   SCM name_string = scm_makfrom0str (name.to_str0 ());
+
   SCM val;
+  
   if (!afm_p_dict_->try_retrieve (sname, &val))
     {
-      String filename;
+      String path;
 
-      if (filename.is_empty ())
-       filename = search_path_.find (name  + ".afm");
+      if (path.is_empty ())
+       path = search_path_.find (name  + ".afm");
 
-      if (filename.is_empty ())
+      if (path.is_empty ())
        {
          String p = kpathsea_find_afm (name.to_str0 ());
          if (p.length ())
-           filename = p;
+           path = p;
        }
 
-      if (filename.is_empty ())
+      if (path.is_empty ())
        return 0;
       
       if (verbose_global_b)
-       progress_indication ("[" + filename);
-      val = read_afm_file (filename);
-      unsmob_metrics (val)->filename_ = filename;
+       progress_indication ("[" + path);
+      val = read_afm_file (path);
+      unsmob_metrics (val)->path_ = path;
       
-      unsmob_metrics (val)->description_ = scm_cons (name_string, 
-                                                    scm_make_real (1.0));
+      unsmob_metrics (val)->description_ = gh_cons (name_string, gh_double2scm (1.0));
 
       if (verbose_global_b)
        progress_indication ("]");
 
-      afm_p_dict_->set (sname, val);
+      afm_p_dict_->set (sname,val);
+
       scm_gc_unprotect_object (val);
 
+
       Adobe_font_metric *afm
        = dynamic_cast<Adobe_font_metric*> (unsmob_metrics (val));
 
-      /* Only check checksums if there is one.  We take the risk that
-        some file has valid checksum 0 */
+      /*
+       only check checksums if there is one.  We take the risk that
+       some file has valid checksum 0
+      */
       if (afm->checksum_)
        {
          Tex_font_metric * tfm = find_tfm (name);
          
          /* FIXME: better warning message
-            (maybe check upon startup for feta16.afm, feta16.tfm?) */
+            (maybe check upon startup for feta16.afm, feta16.tfm?)
+         */
          if (tfm && tfm->info_.checksum != afm->checksum_)
            {
-             // FIXME: broken sentence
              String s = _f ("checksum mismatch for font file: `%s'",
-                            filename.to_str0 ());
-             s += " " + _f ("does not match: `%s'",
-                            tfm->filename_.to_str0 ());
+                            path.to_str0 ());
+             s += " " + _f ("does not match: `%s'", tfm->path_.to_str0 ()); // FIXME
              s += "\n";
              s += " TFM: " + to_string ((int) tfm->info_.checksum);
              s += " AFM: " + to_string ((int) afm->checksum_);
@@ -116,53 +120,57 @@ All_font_metrics::find_afm (String name)
 }
 
 
-Tex_font_metric*
+Tex_font_metric *
 All_font_metrics::find_tfm (String name)
 {
   SCM sname = ly_symbol2scm (name.to_str0 ());
   SCM name_string = scm_makfrom0str (name.to_str0 ());
+
   SCM val;
   if (!tfm_p_dict_->try_retrieve (sname, &val))
     {
-      String filename;
+      String path;
       
-      if (filename.is_empty ())
+      if (path.is_empty ())
        {
          String p = kpathsea_find_tfm (name.to_str0 ());
          if (p.length ())
-           filename = p;
+           path = p;
        }
 
-      if (filename.is_empty ())
-       filename = search_path_.find (name  + ".tfm");
-      if (filename.is_empty ())
+      if (path.is_empty ())
+       path = search_path_.find (name  + ".tfm");
+      if (path.is_empty ())
        return 0;
 
       if (verbose_global_b)
-       progress_indication ("[" + filename);
+       progress_indication ("[" + path);
       
-      val = Tex_font_metric::make_tfm (filename);
+      val = Tex_font_metric::make_tfm (path);
 
       if (verbose_global_b)
        progress_indication ("]");
 
-      unsmob_metrics (val)->filename_ = filename;
-      unsmob_metrics (val)->description_ = scm_cons (name_string,
-                                                    scm_make_real (1.0));
+      unsmob_metrics (val)->path_ = path;
+      unsmob_metrics (val)->description_ = gh_cons (name_string, gh_double2scm (1.0));
       tfm_p_dict_->set (sname, val);
+
       scm_gc_unprotect_object (val);
     }
 
-  return dynamic_cast<Tex_font_metric*> (unsmob_metrics (val));
+  return
+    dynamic_cast<Tex_font_metric*> (unsmob_metrics (val));
 }
 
-Font_metric*
+
+
+Font_metric *
 All_font_metrics::find_font (String name)
 {
   if ((name.left_string (4) == "feta") ||
       (name.left_string (8) == "parmesan"))
     {
-      Font_metric *f = find_afm (name);
+      Font_metric * f = find_afm (name);
       if (f)
        return f;
       else
@@ -176,9 +184,9 @@ All_font_metrics::find_font (String name)
       if (f)
        return f;
       else
-      f = find_afm (name);
+      f =find_afm (name);
       if (f)
-       return f;
+       return f ;
     }
 
   warning (_f ("can't find font: `%s'", name.to_str0 ()));
@@ -204,17 +212,4 @@ All_font_metrics::find_font (String name)
   return 0;
 }
 
-All_font_metrics *all_fonts_global;
-
-
-LY_DEFINE (ly_font_load, "ly:font-load", 1, 0, 0,
-          (SCM name),
-          "Load the font @var{name}. ")
-{
-  SCM_ASSERT_TYPE (ly_c_string_p (name), name, SCM_ARG1, __FUNCTION__, "string");
-
-  Font_metric * fm = all_fonts_global->find_font (ly_scm2string (name));
-
-  return fm->self_scm ();
-}
 
index e0328567f86b12b6fb5e3778b03647696a1d0586..ee8c1c47c507c205a4efaa0ff0426bf67fbca143 100644 (file)
@@ -130,7 +130,7 @@ Ambitus_engraver::stop_translation_timestep ()
       SCM key_signature = get_property ("keySignature");
       ambitus_->set_property ("accidentals", key_signature);
 
-      
+      typeset_grob (ambitus_);
       is_typeset = true;
     }
 }
@@ -169,8 +169,9 @@ Ambitus_engraver::acknowledge_grob (Grob_info info)
 void
 Ambitus_engraver::create_ambitus ()
 {
-  ambitus_ = make_item ("Ambitus",SCM_EOL);
+  ambitus_ = make_item ("Ambitus");
   is_typeset = false;          
+  announce_grob (ambitus_, SCM_EOL);
 }
 
 void
index e864fa0bbd0cf6d4366a6702d422a80d62b85370..9e5b145557a9a0f2472f0a56b7bcac37ce356013 100644 (file)
@@ -13,7 +13,7 @@
 #include "note-head.hh"
 #include "item.hh"
 #include "font-interface.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "lookup.hh"
 
 /*
@@ -86,13 +86,13 @@ number_accidentals (SCM key_signature, Pitch *pitch,
   if (ignore_octave_b)
     prev = ly_assoc_cdr (scm_int2num (notename), key_signature);
   else
-    prev = scm_assoc (scm_cons (scm_int2num (octave), scm_int2num (notename)),
+    prev = scm_assoc (gh_cons (scm_int2num (octave), scm_int2num (notename)),
                     key_signature);
 
   /* should really be true unless prev == SCM_BOOL_F */
-  if (ly_c_pair_p (prev) && ly_c_pair_p (ly_cdr (prev)))
+  if (gh_pair_p (prev) && gh_pair_p (ly_cdr (prev)))
     {
-      prev = scm_cons (ly_car (prev), ly_cadr (prev));
+      prev = gh_cons (ly_car (prev), ly_cadr (prev));
     }
 
   /* If an accidental was not found */
@@ -100,7 +100,7 @@ number_accidentals (SCM key_signature, Pitch *pitch,
     prev = scm_assoc (scm_int2num (notename), key_signature);
 
   SCM prev_acc = (prev == SCM_BOOL_F) ? scm_int2num (0) : ly_cdr (prev);
-  int sig_alteration = ly_c_number_p (prev_acc) ? ly_scm2int (prev_acc) : 0;
+  int sig_alteration = gh_number_p (prev_acc) ? gh_scm2int (prev_acc) : 0;
 
   if (alteration == sig_alteration) // no accidental at all needed
     return 0;
@@ -144,12 +144,12 @@ MAKE_SCHEME_CALLBACK (Ambitus,print,1);
 SCM
 Ambitus::print (SCM smob)
 {
-  Item *me = (Item*) unsmob_grob (smob);
-  Stencil stencil;
+  Item *me = (Item *)unsmob_grob (smob);
+  Stencil stencil = Stencil ();
 
   SCM scm_note_head_style = me->get_property ("note-head-style");
   String note_head_style;
-  if (ly_c_symbol_p (scm_note_head_style))
+  if (gh_symbol_p (scm_note_head_style))
     {
       String note_head_style =
        ly_symbol2string (scm_note_head_style);
@@ -195,10 +195,10 @@ Ambitus::print (SCM smob)
     }
 
   SCM c0 = me->get_property ("c0-position");
-  if (ly_c_number_p (c0))
+  if (gh_number_p (c0))
     {
-      p_min += ly_scm2int (c0);
-      p_max += ly_scm2int (c0);
+      p_min += gh_scm2int (c0);
+      p_max += gh_scm2int (c0);
     }
 
   // create heads
@@ -213,8 +213,8 @@ Ambitus::print (SCM smob)
   if (to_boolean (me->get_property ("join-heads")) &&
       ((p_max - p_min) >= 3))
     {
-      Real linethickness = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
-      Real blotdiameter = me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+      Real linethickness = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
+      Real blotdiameter = me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter"));
       Interval x_extent = 0.5 * Interval (-linethickness, +linethickness);
       Interval y_extent = 0.5 * Interval (p_min + 1.35, p_max - 1.35);
       Box line_box (x_extent, y_extent);
@@ -244,7 +244,7 @@ Ambitus::print (SCM smob)
   SCM key_signature = me->get_property ("key-signature");
   SCM scm_accidentals_style = me->get_property ("accidentals-style");
   String accidentals_style;
-  if (ly_c_symbol_p (scm_accidentals_style))
+  if (gh_symbol_p (scm_accidentals_style))
     {
       accidentals_style =
        ly_symbol2string (scm_accidentals_style);
index c2251bed270ec73d24c324bfe3d7d720c9e7c4ed..38036708c0dd867c0f966b0c4929032cd1f3093e 100644 (file)
@@ -1,16 +1,6 @@
-/* 
-  apply-context-iterator.cc --  implement Apply_context_iterator
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
-  
-*/
-
 #include "simple-music-iterator.hh"
 #include "context.hh"
 #include "music.hh"
-#include "input.hh"
 
 /**
   Iterate a property.  
@@ -29,10 +19,7 @@ Apply_context_iterator::process (Moment m)
 {
   SCM proc = get_music ()->get_property ("procedure");
 
-  if (ly_c_procedure_p (proc))
-    scm_call_1 (proc, get_outlet ()->self_scm ());
-  else
-    get_music ()->origin ()->warning (_("\\applycontext argument is not a procedure"));
+  scm_call_1 (proc, get_outlet ()->self_scm ());
   
   Simple_music_iterator::process (m);
 }
index 261ff66f51005d2e273406218713fb92bd0a27ec..5ecde8437af368da2522d02dec513ade938b6355 100644 (file)
@@ -81,14 +81,19 @@ Arpeggio_engraver::process_music ()
 {
   if (arpeggio_req_)
     {
-      arpeggio_ = make_item ("Arpeggio",arpeggio_req_->self_scm ());
+      arpeggio_ = make_item ("Arpeggio");
+      announce_grob (arpeggio_, arpeggio_req_->self_scm ());
     }
 }
 
 void
 Arpeggio_engraver::stop_translation_timestep ()
 {
-  arpeggio_ = 0;
+  if (arpeggio_)
+    {
+      typeset_grob (arpeggio_);
+      arpeggio_ = 0;
+    }
   arpeggio_req_ = 0;
 }
 
index ad0ca353e1b8adb9d6532ef7e8bab4a8778c5d16..59966272ac48e47783e5d483200b625442761cc5 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include "stencil.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "arpeggio.hh"
 #include "grob.hh"
 #include "stem.hh"
@@ -25,7 +25,7 @@ Arpeggio::print (SCM smob)
   Grob *me = unsmob_grob (smob);
   
   Grob * common = me;
-  for (SCM s = me->get_property ("stems"); ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("stems"); gh_pair_p (s); s = ly_cdr (s))
     {
       Grob * stem =  unsmob_grob (ly_car (s));
       common =  common->common_refpoint (Staff_symbol_referencer::get_staff_symbol (stem),
@@ -43,7 +43,7 @@ Arpeggio::print (SCM smob)
   Interval heads;
   Real my_y = me->relative_coordinate (common, Y_AXIS);
       
-  for (SCM s = me->get_property ("stems"); ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("stems"); gh_pair_p (s); s = ly_cdr (s))
     {
       Grob * stem = unsmob_grob (ly_car (s));
       Grob * ss = Staff_symbol_referencer::get_staff_symbol (stem);
@@ -104,7 +104,7 @@ Arpeggio::brew_chord_bracket (SCM smob)
   Grob *me = unsmob_grob (smob);
   
   Grob * common = me;
-  for (SCM s = me->get_property ("stems"); ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("stems"); gh_pair_p (s); s = ly_cdr (s))
     {
       Grob * stem =  unsmob_grob (ly_car (s));
       common =  common->common_refpoint (Staff_symbol_referencer::get_staff_symbol (stem),
@@ -114,7 +114,7 @@ Arpeggio::brew_chord_bracket (SCM smob)
   Interval heads;
   Real my_y = me->relative_coordinate (common, Y_AXIS);
       
-  for (SCM s = me->get_property ("stems"); ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("stems"); gh_pair_p (s); s = ly_cdr (s))
     {
       Grob * stem = unsmob_grob (ly_car (s));
       Grob * ss = Staff_symbol_referencer::get_staff_symbol (stem);
@@ -123,7 +123,7 @@ Arpeggio::brew_chord_bracket (SCM smob)
       heads.unite (iv  +  ss->relative_coordinate (common, Y_AXIS)  -  my_y);
     }
 
-  Real lt =  me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+  Real lt =  me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
   Real sp = 1.5 * Staff_symbol_referencer::staff_space (me);
   Real dy = heads.length () + sp;
   Real x = 0.7;
@@ -143,7 +143,7 @@ SCM
 Arpeggio::width_callback (SCM smob, SCM axis)
 {
   Grob * me = unsmob_grob (smob);
-  Axis a = (Axis)ly_scm2int (axis);
+  Axis a = (Axis)gh_scm2int (axis);
   assert (a == X_AXIS);
   Stencil arpeggio = Font_interface::get_default_font (me)->find_by_name ("scripts-arpeggio");
 
index 549f0f153de3255c337a67430123e2e0507bdcb1..5bec2f0dbf7ff79a9c3ae73823b52883a8e51cab 100644 (file)
@@ -13,6 +13,7 @@
 Audio_column::Audio_column (Moment at_mom)
 {
   at_mom_ = at_mom;
+  performance_ = 0;
 }
 
 void
index 55bd91e29ebb09f2df0b99bf72c5428846a5c8d3..a2bf63233a237bbd4ae8cf8098daacef7b0ba423 100644 (file)
@@ -29,12 +29,12 @@ Audio_element_info::Audio_element_info ()
 Link_array<Context>
 Audio_element_info::origin_contexts (Translator* end) const
 {
-  Context * t = origin_trans_->context ();
+  Context * t = origin_trans_->daddy_context_;
   Link_array<Context> r;
   do {
     r.push (t);
-    t = t->get_parent_context ();
-  } while (t && t != end->context ());
+    t = t->daddy_context_;
+  } while (t && t != end->daddy_context_);
   
   return r;
 }
index fda74a0cf00e8c05c92458a042aa78ae6bcb11c6..a4c431ba5520f9baef6de30db2abbbbed0c7d7c6 100644 (file)
@@ -21,6 +21,9 @@
 #include "duration.hh"
 #include "context.hh"
 
+/*
+  TODO: documentme.
+ */
 class Auto_beam_engraver : public Engraver
 {
   TRANSLATOR_DECLARATIONS (Auto_beam_engraver);
@@ -75,7 +78,7 @@ private:
 void
 Auto_beam_engraver::process_music ()
 {
-  if (ly_c_string_p (get_property ("whichBar")))
+  if (gh_string_p (get_property ("whichBar")))
     {
       consider_end (shortest_mom_);
       junk_beam ();
@@ -185,23 +188,23 @@ Auto_beam_engraver::test_moment (Direction dir, Moment test_mom)
     }
 
   /* second guess: property generic time exception */
-  SCM m = scm_assoc (ly_append3 (function, wild, time), settings);
+  SCM m = scm_assoc (gh_append3 (function, wild, time), settings);
   
   if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
     moment = * unsmob_moment (ly_cdr (m));
 
   /* third guess: property time exception, specific for duration type */
-  m = scm_assoc (ly_append3 (function, type, time), settings);
+  m = scm_assoc (gh_append3 (function, type, time), settings);
   if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
     moment = * unsmob_moment (ly_cdr (m));
 
   /* fourth guess [user override]: property plain generic */
-  m = scm_assoc (ly_append3 (function, wild, wild), settings);
+  m = scm_assoc (gh_append3 (function, wild, wild), settings);
   if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
     moment = * unsmob_moment (ly_cdr (m));
 
   /* fifth guess [user override]: property plain, specific for duration type */
-  m = scm_assoc (ly_append3 (function, type, wild), settings);
+  m = scm_assoc (gh_append3 (function, type, wild), settings);
   if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
     moment = * unsmob_moment (ly_cdr (m));
   
@@ -297,11 +300,11 @@ Auto_beam_engraver::begin_beam ()
   
   stems_ = new Link_array<Item>;
   grouping_ = new Beaming_info_list;
-  beam_settings_ = updated_grob_properties (context (), ly_symbol2scm ("Beam"));
+  beam_settings_ = updated_grob_properties (daddy_context_, ly_symbol2scm ("Beam"));
   
   beam_start_moment_ = now_mom ();
   beam_start_location_ = *unsmob_moment (get_property ("measurePosition"));
-  subdivide_beams_ = ly_scm2bool (get_property ("subdivideBeams"));
+  subdivide_beams_ = gh_scm2bool (get_property ("subdivideBeams"));
   beat_length_ = *unsmob_moment (get_property ("beatLength"));
 }
 
@@ -348,6 +351,7 @@ Auto_beam_engraver::typeset_beam ()
     {
       finished_grouping_->beamify (beat_length_, subdivide_beams_);
       Beam::set_beaming (finished_beam_, finished_grouping_);
+      typeset_grob (finished_beam_);
       finished_beam_ = 0;
     
       delete finished_grouping_;
index 7b73db03caea743a8bd1ee6af3a2921c119c4ca0..852df8d28794a724ae3dd943fd5e236cf5170dc0 100644 (file)
@@ -53,10 +53,10 @@ Auto_change_iterator::change_to (Music_iterator *it, SCM to_type_sym,
   while (current && !current->is_alias (to_type_sym))
     {
       last = current;
-      current = current->get_parent_context ();
+      current = current->daddy_context_;
     }
 
-  if (current && current->id_string () == to_id)
+  if (current && current->id_string_ == to_id)
     {
       String msg;
       msg += _ ("Can't switch translators, I'm there already");
@@ -91,13 +91,13 @@ Auto_change_iterator::process (Moment m)
   Moment now = get_outlet ()->now_mom ();
   Moment *splitm = 0;
   
-  for (; ly_c_pair_p (split_list_); split_list_ = ly_cdr (split_list_))
+  for (; gh_pair_p (split_list_); split_list_ = gh_cdr (split_list_))
     {
-      splitm = unsmob_moment (ly_caar (split_list_));
+      splitm = unsmob_moment (gh_caar (split_list_));
       if ((*splitm + start_moment_) > now)
        break ;
 
-      SCM tag = ly_cdar (split_list_);
+      SCM tag = gh_cdar (split_list_);
       Direction d = to_dir  (tag);
       
       if (d && d != where_dir_)
index f62de7f1de250d70fa021b9b704b31fd7cbfb789..8e404c150ef4d0b50927098d187915b819193c03 100644 (file)
@@ -48,13 +48,15 @@ Axis_group_engraver::process_music ()
       Grob *  it = unsmob_grob (get_property ("currentCommandColumn"));
 
       staffline_->set_bound (LEFT,it);
+
+      announce_grob (staffline_, SCM_EOL);
     }
 } 
 
 Spanner*
 Axis_group_engraver::get_spanner () 
 {
-  return make_spanner ("VerticalAxisGroup", SCM_EOL);
+  return make_spanner ("VerticalAxisGroup");
 }
 
 /*
@@ -67,7 +69,7 @@ Axis_group_engraver::finalize ()
   if (!staffline_)
     return ;
   
-  String type = context ()->context_name ();
+  String type = daddy_context_->context_name ();
   SCM dims = get_property ("verticalExtent");
   
   if (is_number_pair (dims))
@@ -85,6 +87,7 @@ Axis_group_engraver::finalize ()
 
   staffline_->set_bound (RIGHT,it);
 
+  typeset_grob (staffline_);
   staffline_ = 0;
 }
 
@@ -160,7 +163,7 @@ Hara_kiri_engraver::add_element (Grob*e)
 Spanner*
 Hara_kiri_engraver::get_spanner () 
 {
-  Spanner * sp = make_spanner ("RemoveEmptyVerticalGroup", SCM_EOL);
+  Spanner * sp = make_spanner ("RemoveEmptyVerticalGroup");
   
   return sp;
 }
index 764a523df72247980df62db82c9cb5d2a9c72fdc..1f628a458c2d7fcf8b8d8f924a788ee4f7047214 100644 (file)
@@ -15,7 +15,7 @@ Axis_group_interface::add_element (Grob*me,Grob *e)
 {
   for (SCM ax = me->get_property ("axes"); ax != SCM_EOL ; ax = ly_cdr (ax))
     {
-      Axis a = (Axis) ly_scm2int (ly_car (ax));
+      Axis a = (Axis) gh_scm2int (ly_car (ax));
       
       if (!e->get_parent (a))
        e->set_parent (me, a);
@@ -41,7 +41,7 @@ Interval
 Axis_group_interface::relative_group_extent (Axis a, Grob *common, SCM elts)
 {
   Interval r;
-  for (SCM s = elts; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = elts; gh_pair_p (s); s = ly_cdr (s))
     {
       Grob * se = unsmob_grob (ly_car (s));
       Interval dims = se->extent (common, a);
@@ -56,7 +56,7 @@ SCM
 Axis_group_interface::group_extent_callback (SCM element_smob, SCM scm_axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (scm_axis);
+  Axis a = (Axis) gh_scm2int (scm_axis);
 
   SCM elts = me->get_property ("elements");
   Grob * common = common_refpoint_of_list (elts, me, a);
@@ -75,13 +75,13 @@ Axis_group_interface::set_axes (Grob*me,Axis a1, Axis a2)
 
   SCM axes = me->get_property ("axes");
   
-  if (!ly_c_pair_p (axes)
+  if (!gh_pair_p (axes)
       || scm_c_memq (sa1, axes) == SCM_BOOL_F
       || scm_c_memq (sa2, axes) == SCM_BOOL_F)
     {
-      SCM ax = scm_cons (sa1, SCM_EOL);
+      SCM ax = gh_cons (sa1, SCM_EOL);
       if (a1 != a2)
-       ax= scm_cons (sa2, ax);
+       ax= gh_cons (sa2, ax);
       me->set_property ("axes", ax);
     }
 
@@ -108,7 +108,7 @@ Axis_group_interface::get_children (Grob*me)
   if (!has_interface (me))
     return childs;
   
-  for (SCM ep = me->get_property ("elements"); ly_c_pair_p (ep); ep = ly_cdr (ep))
+  for (SCM ep = me->get_property ("elements"); gh_pair_p (ep); ep = ly_cdr (ep))
     {
       Grob* e = unsmob_grob (ly_car (ep));
       if (e)
index bda3fa20cbd9f8d55372a1062d31f0935176ce58..07d75803cc4891d68a68fe014d70758de6e8628b 100644 (file)
@@ -1,10 +1,6 @@
 /*
-  balloon.cc -- implement Balloon
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
+  balloon.cc -- implement Balloon objects
+ */
 
 #include "text-item.hh"
 #include "grob.hh"
 #include "font-interface.hh"
 #include "stencil.hh"
 #include "lily-guile.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "misc.hh"
 
-class Balloon_interface
+struct Balloon_interface
 {
+  
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   static bool has_interface (Grob*);
@@ -27,60 +24,67 @@ MAKE_SCHEME_CALLBACK (Balloon_interface, print, 1);
 SCM
 Balloon_interface::print (SCM smob) 
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me= unsmob_grob (smob);
 
   SCM cb = me->get_property ("balloon-original-callback");
-  SCM stil = SCM_EOL;
+  SCM scm_mol  =  SCM_EOL;
 
-  if (ly_c_procedure_p (cb))
-    stil = scm_call_1 (cb, smob);
+  if (gh_procedure_p (cb))
+    {
+      scm_mol = scm_call_1 (cb, smob);
+    }
 
-  if (!unsmob_stencil (stil))
-    return stil;
+  if (!unsmob_stencil (scm_mol))
+    return scm_mol;
 
   SCM scm_off = me->get_property ("balloon-text-offset");
 
   if (!is_number_pair (scm_off))
-    return stil;
+    return scm_mol;
 
   Offset off = ly_scm2offset (scm_off);
-  Stencil *s = unsmob_stencil (stil);
-  Box orig_extent = s->extent_box ();
+  Stencil * m = unsmob_stencil (scm_mol);
+  Box orig_extent = m->extent_box ();
   Box box_extent = orig_extent;
 
-  Real w = robust_scm2double (me->get_property ("balloon-padding"), .1);
+  Real w = robust_scm2double (me->get_property ("balloon-padding"),  .1);
   box_extent.widen (w, w);
-
-  // FIXME
+  
+  
   Stencil fr = Lookup::frame (box_extent, 0.1, 0.05);
 
-  fr.add_stencil (*s);
   
+  fr.add_stencil (*m);
+
+
+
   SCM bt = me->get_property ("balloon-text");
   SCM chain = Font_interface::text_font_alist_chain (me);
-  chain = scm_cons (me->get_property ("balloon-text-props"), chain);
+  chain = gh_cons (me->get_property ("balloon-text-props"), chain);
 
-  SCM text = Text_item::interpret_markup (me->get_paper ()->self_scm (),
-                                         chain, bt);
 
-  Stencil *text_stil = unsmob_stencil (text);
+  SCM text = Text_item::interpret_markup (me->get_paper ()->self_scm (), chain, bt);
+
+  
+  Stencil *text_mol = unsmob_stencil (text);
+  
   Offset z1;
+
   for (int i = X_AXIS; i < NO_AXES; i++)
     {
-      Axis a ((Axis)i);
+      Axis  a ((Axis)i);
       z1[a] = box_extent [a].linear_combination (sign (off[a]));
-      text_stil->align_to (a, -sign (off[a]));
+      text_mol->align_to (a, -sign (off[a]));
     }
 
   Offset z2 = z1 + off;
+  
   fr.add_stencil (Line_interface::line (me, z1, z2));
 
-  text_stil->translate (z2);
-  fr.add_stencil (*text_stil);
-  fr = Stencil (orig_extent, fr.expr ());
+  text_mol->translate (z2);
+  fr.add_stencil (*text_mol);
+  
+  fr = Stencil (orig_extent, fr.get_expr ());
   return fr.smobbed_copy ();
 }
 
index e62d814c96f0353cdd3585bf3d4852e4993692f2..26dd7a64b31059d24b9dd055370e7225ed1b52ec 100644 (file)
@@ -47,10 +47,12 @@ Bar_engraver::create_bar ()
 {
   if (!bar_)
     {
-      bar_ = make_item ("BarLine", SCM_EOL);
+      bar_ = make_item ("BarLine");
       SCM gl = get_property ("whichBar");
       if (scm_equal_p (gl, bar_->get_property ("glyph")) != SCM_BOOL_T)
          bar_->set_property ("glyph", gl);
+      
+      announce_grob (bar_, SCM_EOL);
     }
 }
 
@@ -75,14 +77,20 @@ Bar_engraver::finalize ()
 void
 Bar_engraver::process_acknowledged_grobs ()
 {
-  if (!bar_ && ly_c_string_p (get_property ("whichBar")))
-    create_bar ();
+  if (!bar_ && gh_string_p (get_property ("whichBar")))
+    {
+      create_bar ();
+    }
 }
 
 void
 Bar_engraver::typeset_bar ()
 {
-  bar_ = 0;
+  if (bar_) 
+    {
+      typeset_grob (bar_);
+      bar_ =0;
+    }
 }
 
 /*
@@ -92,8 +100,9 @@ void
 Bar_engraver::stop_translation_timestep ()
 {
   if (!bar_)
-    /* guh. Use properties! */
-    get_score_engraver ()->forbid_breaks ();
+    {
+      get_score_engraver ()->forbid_breaks (); // guh. Use properties!
+    }
   else
     typeset_bar ();
 }
index f1de0e9f6298538bc37ab93f9164475616adfee9..7767447a5c8c5b9553e2fbe79ae1b696200f2c51 100644 (file)
@@ -14,7 +14,7 @@
 #include "bar-line.hh"
 #include "string.hh"
 #include "stencil.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "font-interface.hh"
 
 #include "all-font-metrics.hh"
@@ -30,10 +30,10 @@ Bar_line::print (SCM smob)
 
   SCM s = me->get_property ("glyph");
   SCM barsiz_proc = me->get_property ("bar-size-procedure");
-  if (ly_c_string_p (s) && ly_c_procedure_p (barsiz_proc))
+  if (gh_string_p (s) && gh_procedure_p (barsiz_proc))
     {
       String str  =ly_scm2string (s);
-      SCM siz = scm_call_1 (barsiz_proc, me->self_scm ());
+      SCM siz = gh_call1 (barsiz_proc, me->self_scm ());
       Real sz = robust_scm2double (siz, 0);
       if (sz < 0)
        return SCM_EOL;
@@ -52,7 +52,7 @@ Bar_line::compound_barline (Grob*me, String str, Real h)
   Real hair = robust_scm2double (me->get_property ("hair-thickness"), 1);
   Real fatline = robust_scm2double (me->get_property ("thick-thickness"), 1);
 
-  Real staffline = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+  Real staffline = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
   Real staff_space = Staff_symbol_referencer::staff_space (me);
 
   kern *= staffline;
@@ -74,6 +74,7 @@ Bar_line::compound_barline (Grob*me, String str, Real h)
   if (str == "||:")
     str = "|:";
   
+  
   if (str == "")
     {
       return Lookup::blank (Box (Interval (0, 0), Interval (-h/2, h/2)));
@@ -144,7 +145,7 @@ Bar_line::compound_barline (Grob*me, String str, Real h)
 Stencil
 Bar_line::simple_barline (Grob *me,Real w, Real h) 
 {
-  Real blot = me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+  Real blot = me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter"));
   return Lookup::round_filled_box (Box (Interval (0,w), Interval (-h/2, h/2)), blot);
 }
 
@@ -159,20 +160,20 @@ Bar_line::before_line_breaking (SCM smob)
   SCM g = me->get_property ("glyph");
   SCM orig = g;
   Direction bsd = item->break_status_dir ();
-  if (ly_c_string_p (g) && bsd)
+  if (gh_string_p (g) && bsd)
     {
       SCM proc = me->get_property ("break-glyph-function");
-      g = scm_call_2 (proc, g, scm_int2num (bsd));
+      g = gh_call2 (proc, g, scm_int2num (bsd));
     }
   
-  if (!ly_c_string_p (g))
+  if (!gh_string_p (g))
     {
       me->set_property ("print-function", SCM_EOL);
       me->set_extent (SCM_EOL, X_AXIS);
       // leave y_extent for spanbar? 
     }
 
-  if (! ly_c_equal_p (g, orig))
+  if (! gh_equal_p (g, orig))
     me->set_property ("glyph", g);
 
   return SCM_UNSPECIFIED;
@@ -188,8 +189,8 @@ Bar_line::get_staff_bar_size (SCM smob)
   Grob*me = unsmob_grob (smob);
   Real ss = Staff_symbol_referencer::staff_space (me);
   SCM size = me->get_property ("bar-size");
-  if (ly_c_number_p (size))
-    return scm_make_real (ly_scm2double (size)*ss);
+  if (gh_number_p (size))
+    return gh_double2scm (gh_scm2double (size)*ss);
   else if (Staff_symbol_referencer::get_staff_symbol (me))
     {
       /*
@@ -197,7 +198,7 @@ Bar_line::get_staff_bar_size (SCM smob)
        calculation. That's a nonsense value, which would collapse the
        barline so we return 0.0 in the next alternative.
       */
-      return scm_make_real ((Staff_symbol_referencer::line_count (me) -1) * ss);
+      return gh_double2scm ((Staff_symbol_referencer::line_count (me) -1) * ss);
     }
   else
     return scm_int2num (0);
index 7ba942a3b37640e86c9250e7052a7b3015ee9806..cea5a246e8016257ea917a6d293b8e4a41bb3897 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "lily-guile.hh"
 #include "paper-column.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "side-position-interface.hh"
 #include "item.hh"
 #include "moment.hh"
@@ -45,7 +45,7 @@ Bar_number_engraver::process_music ()
 
   SCM wb = get_property ("whichBar");
   
-  if (ly_c_string_p (wb))
+  if (gh_string_p (wb))
     {
       SCM smp = get_property ("measurePosition");
       
@@ -54,13 +54,13 @@ Bar_number_engraver::process_music ()
        {
          SCM bn = get_property ("currentBarNumber");
          SCM proc = get_property ("barNumberVisibility");
-         if (ly_c_number_p (bn) && ly_c_procedure_p (proc)
-             && to_boolean (scm_call_1(proc, bn)))
+         if (gh_number_p (bn) && gh_procedure_p (proc)
+             && to_boolean (gh_call1(proc, bn)))
            {
              create_items ();
              // guh.
              text_->set_property
-               ("text", scm_makfrom0str (to_string (ly_scm2int (bn)).to_str0 ()));
+               ("text", scm_makfrom0str (to_string (gh_scm2int (bn)).to_str0 ()));
            }
        }
     }
@@ -96,7 +96,7 @@ Bar_number_engraver::stop_translation_timestep ()
   if (text_)
     {
       text_->set_property ("side-support-elements", get_property ("stavesFound"));
-      
+      typeset_grob (text_);
       text_ =0;
     }
 }
@@ -108,8 +108,10 @@ Bar_number_engraver::create_items ()
   if (text_)
     return;
 
-  text_ = make_item ("BarNumber", SCM_EOL);
+  text_ = make_item ("BarNumber");
   Side_position_interface::set_axis (text_,Y_AXIS);
+
+  announce_grob (text_, SCM_EOL);
 }
 
 ENTER_DESCRIPTION (Bar_number_engraver,
index 4e6238bedf35859f456933059ca9f06db9f2c362..e810b7052d1086d67a54085e64007713d8b42405 100644 (file)
@@ -121,7 +121,7 @@ Beam_engraver::set_melisma (bool ml)
 {
   SCM b = get_property ("autoBeaming");
   if (!to_boolean (b))
-    context ()->set_property ("beamMelismaBusy", ml ? SCM_BOOL_T :SCM_BOOL_F);
+    daddy_context_->set_property ("beamMelismaBusy", ml ? SCM_BOOL_T :SCM_BOOL_F);
 }
 
 void
@@ -142,7 +142,7 @@ Beam_engraver::process_music ()
 
       set_melisma (true);
       prev_start_ev_ = start_ev_;
-      beam_ = make_spanner ("Beam", start_ev_->self_scm ());
+      beam_ = make_spanner ("Beam");
       SCM smp = get_property ("measurePosition");
       Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
 
@@ -152,6 +152,7 @@ Beam_engraver::process_music ()
       beam_info_ = new Beaming_info_list;
       
       /* urg, must copy to Auto_beam_engraver too */
+      announce_grob (beam_, start_ev_->self_scm ());
     }
 
 }
@@ -164,7 +165,7 @@ Beam_engraver::typeset_beam ()
     {
       finished_beam_info_->beamify (beat_length_, subdivide_beams_);
       Beam::set_beaming (finished_beam_, finished_beam_info_);
-      
+      typeset_grob (finished_beam_);
       delete finished_beam_info_;
       finished_beam_info_ =0;
       finished_beam_ = 0;
index 8748d7320d0ebe3987bb9f523e8b40c11f8dd21e..b5b694a04b052bb3308f91dc5a38fc5bf007564d 100644 (file)
@@ -28,13 +28,6 @@ private:
   bool beam_;
 };
 
-Beam_performer::Beam_performer ()
-{
-  beam_ = false;
-  start_ev_ = 0;
-  now_stop_ev_ = 0;
-}
-
 void 
 Beam_performer::process_music ()
 {
@@ -57,7 +50,7 @@ Beam_performer::set_melisma (bool ml)
 {
   SCM b = get_property ("autoBeaming");
   if (!to_boolean (b))
-context ()->set_property ("beamMelismaBusy", ml ? SCM_BOOL_T :SCM_BOOL_F);
+    daddy_context_->set_property ("beamMelismaBusy", ml ? SCM_BOOL_T :SCM_BOOL_F);
 }
 
 void
@@ -90,3 +83,7 @@ Beam_performer::try_music (Music *m)
 ENTER_DESCRIPTION (Beam_performer,"","",
                  "beam-event","","","");
 
+Beam_performer::Beam_performer ()
+{
+  beam_ = false;
+}
index 25df72abb180a87e345a5ef6d1639b3f451191cc..c752512a76d3586a4bbd92d00300d171ef28b8b7 100644 (file)
@@ -19,7 +19,7 @@
 #include "staff-symbol-referencer.hh"
 #include "beam.hh"
 #include "stem.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "group-interface.hh"
 #include "align-interface.hh"
 
@@ -96,8 +96,8 @@ Beam::quanting (SCM smob)
   Grob *me = unsmob_grob (smob);
 
   SCM s = me->get_property ("positions");
-  Real yl = ly_scm2double (ly_car (s));
-  Real yr = ly_scm2double (ly_cdr (s));
+  Real yl = gh_scm2double (gh_car (s));
+  Real yr = gh_scm2double (gh_cdr (s));
 
 
   /*
@@ -110,7 +110,7 @@ Beam::quanting (SCM smob)
   Real slt = Staff_symbol_referencer::line_thickness (me) / ss;
 
   SCM sdy = me->get_property ("least-squares-dy");
-  Real dy_mus = ly_c_number_p (sdy) ? ly_scm2double (sdy) : 0.0;
+  Real dy_mus = gh_number_p (sdy) ? gh_scm2double (sdy) : 0.0;
   
   Real straddle = 0.0;
   Real sit = (thickness - slt) / 2;
@@ -282,7 +282,7 @@ Beam::quanting (SCM smob)
 #if DEBUG_QUANTING
   SCM inspect_quants = me->get_property ("inspect-quants");
   if (debug_beam_quanting_flag
-      && ly_c_pair_p (inspect_quants))
+      && gh_pair_p (inspect_quants))
     {
       Drul_array<Real> ins = ly_scm2interval (inspect_quants);
 
index 7a9eeecb9f2c8f0c48c0940fe04da4ceac39dcb2..130dc8f3e4882d0a4c2c1f7d317a52d0e73c448b 100644 (file)
@@ -35,7 +35,7 @@ Notes:
 #include "misc.hh"
 #include "least-squares.hh"
 #include "stem.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "lookup.hh"
 #include "group-interface.hh"
 #include "staff-symbol-referencer.hh"
@@ -79,10 +79,10 @@ Beam::get_beam_translation (Grob *me)
 {
   SCM func = me->get_property ("space-function");
 
-  if (ly_c_procedure_p (func))
+  if (gh_procedure_p (func))
     {
-      SCM s = scm_call_2 (func, me->self_scm (), scm_int2num (get_beam_count (me)));
-      return ly_scm2double (s);
+      SCM s = gh_call2 (func, me->self_scm (), scm_int2num (get_beam_count (me)));
+      return gh_scm2double (s);
     }
   else
     {
@@ -95,7 +95,7 @@ int
 Beam::get_beam_count (Grob *me) 
 {
   int m = 0;
-  for (SCM s = me->get_property ("stems"); ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("stems"); gh_pair_p (s); s = ly_cdr (s))
     {
       Grob *stem = unsmob_grob (ly_car (s));
       m = m >? (Stem::beam_multiplicity (stem).length () + 1);
@@ -117,11 +117,11 @@ Beam::space_function (SCM smob, SCM beam_count)
   Real line = Staff_symbol_referencer::line_thickness (me);
   Real thickness = get_thickness (me);
   
-  Real beam_translation = ly_scm2int (beam_count) < 4
+  Real beam_translation = gh_scm2int (beam_count) < 4
     ? (2*staff_space + line - thickness) / 2.0
     : (3*staff_space + line - thickness) / 3.0;
   
-  return scm_make_real (beam_translation);
+  return gh_double2scm (beam_translation);
 }
 
 
@@ -155,7 +155,7 @@ Beam::before_line_breaking (SCM smob)
        {
          me->warning (_ ("removing beam with less than two stems"));
 
-         unsmob_grob (ly_car (stems))->set_property ("beam", SCM_EOL);
+         unsmob_grob (gh_car (stems))->set_property ("beam", SCM_EOL);
          me->suicide ();
 
          return SCM_UNSPECIFIED;
@@ -201,7 +201,7 @@ position_with_maximal_common_beams (SCM left_beaming, SCM right_beaming,
                                    Direction left_dir,
                                    Direction right_dir)
 {
-  Slice lslice = int_list_to_slice (ly_cdr (left_beaming));
+  Slice lslice = int_list_to_slice (gh_cdr (left_beaming));
 
   int best_count = 0;
   int best_start = 0;
@@ -209,9 +209,9 @@ position_with_maximal_common_beams (SCM left_beaming, SCM right_beaming,
        (i - lslice[left_dir])* left_dir <= 0 ; i+= left_dir) 
     {
       int count =0;
-      for ( SCM s = ly_car (right_beaming); ly_c_pair_p (s); s = ly_cdr (s))
+      for ( SCM s = gh_car (right_beaming); gh_pair_p (s); s = gh_cdr (s))
        {
-         int k = - right_dir * ly_scm2int (ly_car (s)) + i;
+         int k = - right_dir * gh_scm2int (gh_car (s)) + i;
          if (scm_c_memq (scm_int2num (k), left_beaming) != SCM_BOOL_F)
            count ++;
        }
@@ -242,7 +242,7 @@ Beam::connect_beams (Grob *me)
       SCM this_beaming = this_stem->get_property ("beaming");
 
       Direction this_dir = get_grob_direction (this_stem);
-      if (ly_c_pair_p (last_beaming) && ly_c_pair_p (this_beaming))
+      if (gh_pair_p (last_beaming) && gh_pair_p (this_beaming))
        {
          int start_point = position_with_maximal_common_beams
            (last_beaming, this_beaming,
@@ -257,13 +257,13 @@ Beam::connect_beams (Grob *me)
              
              new_slice.set_empty ();
              SCM s = index_get_cell (this_beaming, d);
-             for (; ly_c_pair_p (s); s = ly_cdr (s))
+             for (; gh_pair_p (s); s = gh_cdr (s))
                {
                  int new_beam_pos =
-                   start_point - this_dir * ly_scm2int (ly_car (s));
+                   start_point - this_dir * gh_scm2int (gh_car (s));
 
                  new_slice.add_point (new_beam_pos);
-                 scm_set_car_x (s, scm_int2num (new_beam_pos));
+                 gh_set_car_x (s, scm_int2num (new_beam_pos));
                }
 
 
@@ -275,22 +275,22 @@ Beam::connect_beams (Grob *me)
        }
       else
        {
-         scm_set_car_x ( this_beaming, SCM_EOL);
-         SCM s = ly_cdr (this_beaming);
-         for (; ly_c_pair_p (s); s = ly_cdr (s))
+         gh_set_car_x ( this_beaming, SCM_EOL);
+         SCM s = gh_cdr (this_beaming);
+         for (; gh_pair_p (s); s = gh_cdr (s))
            {
-             int np = - this_dir * ly_scm2int (ly_car (s));
-             scm_set_car_x (s, scm_int2num (np));
+             int np = - this_dir * gh_scm2int (gh_car (s));
+             gh_set_car_x (s, scm_int2num (np));
              last_int.add_point (np);
            }
        }
 
       if (i == stems.size () -1)
        {
-         scm_set_cdr_x (this_beaming, SCM_EOL);
+         gh_set_cdr_x (this_beaming, SCM_EOL);
        }
 
-      if (scm_ilength (ly_cdr (this_beaming)) > 0)
+      if (scm_ilength (gh_cdr (this_beaming)) > 0)
        {
          last_beaming = this_beaming;
          last_dir = this_dir;
@@ -339,7 +339,7 @@ Beam::print (SCM grob)
   else
     pos= ly_scm2realdrul (posns);
 
-  scale_drul (&pos,  Staff_symbol_referencer::staff_space (me));
+  scale_drul (  &pos,  Staff_symbol_referencer::staff_space (me));
   
   Real dy = pos[RIGHT] - pos[LEFT];
   Real dydx = (dy && dx) ? dy/dx : 0;
@@ -351,10 +351,10 @@ Beam::print (SCM grob)
   Real last_xposn = -1;
   Real last_stem_width = -1 ;
 
-  Real gap_length = robust_scm2double (me->get_property ("gap"), 0.0);
+  Real gap_length =robust_scm2double ( me->get_property ("gap"), 0.0);
   
   Stencil the_beam;
-  Real lt = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+  Real lt = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
   
   for (int i = 0; i<= stems.size (); i++)
     {
@@ -369,18 +369,18 @@ Beam::print (SCM grob)
        right from the left stem, and rfliebertjes pointing left from
        right stem.
        */
-      SCM left = (i > 0) ? ly_cdr (last_beaming) : SCM_EOL;
-      SCM right = st ? ly_car (this_beaming) : SCM_EOL;
+      SCM left = (i>0) ? gh_cdr (last_beaming) : SCM_EOL;
+      SCM right = st ? gh_car (this_beaming) : SCM_EOL;
 
       Array<int> full_beams;
       Array<int> lfliebertjes;
       Array<int> rfliebertjes;   
 
       for (SCM s = left;
-          ly_c_pair_p (s); s =ly_cdr (s))
+          gh_pair_p (s); s =gh_cdr (s))
        {
-         int b = ly_scm2int (ly_car (s));
-         if (scm_c_memq (ly_car (s), right) != SCM_BOOL_F)
+         int b = gh_scm2int (gh_car (s));
+         if (scm_c_memq (gh_car (s), right) != SCM_BOOL_F)
            {
              full_beams.push (b);
            }
@@ -390,10 +390,10 @@ Beam::print (SCM grob)
            }
        }
       for (SCM s = right;
-          ly_c_pair_p (s); s =ly_cdr (s))
+          gh_pair_p (s); s =gh_cdr (s))
        {
-         int b = ly_scm2int (ly_car (s));
-         if (scm_c_memq (ly_car (s), left) == SCM_BOOL_F)
+         int b = gh_scm2int (gh_car (s));
+         if (scm_c_memq (gh_car (s), left) == SCM_BOOL_F)
            {
              rfliebertjes.push (b);
            }
@@ -416,14 +416,14 @@ Beam::print (SCM grob)
        w += stem_width/ 2 ;
       
 
-      Real blot = me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+      Real blot = me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter"));
       Stencil whole = Lookup::beam (dydx, w, thick, blot);
       Stencil gapped;
 
       int gap_count = 0;
-      if (ly_c_number_p (me->get_property ("gap-count")))
+      if (gh_number_p (me->get_property ("gap-count")))
        {
-         gap_count = ly_scm2int (me->get_property ("gap-count"));
+         gap_count = gh_scm2int (me->get_property ("gap-count"));
          gapped = Lookup::beam (dydx, w - 2 * gap_length, thick, blot);
 
          full_beams.sort (default_compare);
@@ -456,8 +456,8 @@ Beam::print (SCM grob)
              int t = Stem::duration_log (st); 
 
              SCM proc = me->get_property ("flag-width-function");
-             SCM result = scm_call_1 (proc, scm_int2num (t));
-             nw_f = ly_scm2double (result);
+             SCM result = gh_call1 (proc, scm_int2num (t));
+             nw_f = gh_scm2double (result);
            }
          else
            nw_f = break_overshoot / 2;
@@ -511,7 +511,7 @@ Beam::print (SCM grob)
 #if (DEBUG_QUANTING)
   SCM quant_score = me->get_property ("quant-score");
   if (debug_beam_quanting_flag
-      && ly_c_string_p (quant_score))
+      && gh_string_p (quant_score))
     {
       
       /*
@@ -548,7 +548,7 @@ Beam::get_default_dir (Grob *me)
   Link_array<Grob> stems=
        Pointer_group_interface__extract_grobs (me, (Grob*)0, "stems");
 
-  for (int i=0; i < stems.size (); i++)
+  for (int i=0; i <stems.size (); i++)
     do {
       Grob *s = stems[i];
       Direction sd = get_grob_direction (s);
@@ -564,13 +564,13 @@ Beam::get_default_dir (Grob *me)
     } while (flip (&d) != DOWN);
   
   SCM func = me->get_property ("dir-function");
-  SCM s = scm_call_2 (func,
-                   scm_cons (scm_int2num (count[UP]),
+  SCM s = gh_call2 (func,
+                   gh_cons (scm_int2num (count[UP]),
                             scm_int2num (count[DOWN])),
-                   scm_cons (scm_int2num (total[UP]),
+                   gh_cons (scm_int2num (total[UP]),
                             scm_int2num (total[DOWN])));
 
-  if (ly_c_number_p (s) && ly_scm2int (s))
+  if (gh_number_p (s) && gh_scm2int (s))
     return to_dir (s);
   
   /* If dir is not determined: get default */
@@ -666,10 +666,10 @@ void
 Beam::consider_auto_knees (Grob* me)
 {
   SCM scm = me->get_property ("auto-knee-gap");
-  if (!ly_c_number_p (scm))
+  if (!gh_number_p (scm))
     return ;
 
-  Real threshold = ly_scm2double (scm);
+  Real threshold = gh_scm2double (scm);
   
   Int_set gaps;
 
@@ -791,13 +791,13 @@ Beam::set_stem_shorten (Grob *me)
   
   SCM shorten_elt =
     robust_list_ref (beam_count -1, shorten_list);
-  Real shorten_f = ly_scm2double (shorten_elt) * staff_space;
+  Real shorten_f = gh_scm2double (shorten_elt) * staff_space;
 
   /* your similar cute comment here */
   shorten_f *= forced_fraction;
 
   if (shorten_f)
-    me->set_property ("shorten", scm_make_real (shorten_f));
+    me->set_property ("shorten", gh_double2scm (shorten_f));
 }
 
 /*  Call list of y-dy-callbacks, that handle setting of
@@ -830,8 +830,8 @@ Beam::position_beam (Grob *me)
     {
       // one wonders if such genericity is necessary  --hwn.
       SCM callbacks = me->get_property ("position-callbacks");
-      for (SCM i = callbacks; ly_c_pair_p (i); i = ly_cdr (i))
-       scm_call_1 (ly_car (i), me->self_scm ());
+      for (SCM i = callbacks; gh_pair_p (i); i = ly_cdr (i))
+       gh_call1 (ly_car (i), me->self_scm ());
     }
 
   set_stem_lengths (me);  
@@ -918,7 +918,7 @@ Beam::least_squares (SCM smob)
         where the second part goes.
        */
       me->set_property ("least-squares-dy",
-                            scm_make_real (pos[RIGHT] - pos[LEFT]));
+                            gh_double2scm (pos[RIGHT] - pos[LEFT]));
     }
   else
     {
@@ -937,7 +937,7 @@ Beam::least_squares (SCM smob)
       minimise_least_squares (&dydx, &y, ideals);
 
       dy = dydx * dx;
-      me->set_property ("least-squares-dy", scm_make_real (dy));
+      me->set_property ("least-squares-dy", gh_double2scm (dy));
       pos = Interval (y, (y+dy));
     }
 
@@ -1101,9 +1101,9 @@ Beam::check_concave (SCM smob)
   */
   bool is_concave1 = false;
   SCM gap = me->get_property ("concaveness-gap");
-  if (ly_c_number_p (gap))
+  if (gh_number_p (gap))
     {
-      Real r1 = ly_scm2double (gap);
+      Real r1 = gh_scm2double (gap);
       Real dy = Stem::chord_start_y (stems.top ())
        - Stem::chord_start_y (stems[0]);
 
@@ -1138,9 +1138,9 @@ Beam::check_concave (SCM smob)
   Real concaveness2 = 0;
   SCM thresh = me->get_property ("concaveness-threshold");
   Real r2 = infinity_f;
-  if (!is_concave1 && ly_c_number_p (thresh))
+  if (!is_concave1 && gh_number_p (thresh))
     {
-      r2 = ly_scm2double (thresh);
+      r2 = gh_scm2double (thresh);
       
       Interval iv;
       iv.add_point (Stem::chord_start_y (stems[0]));
@@ -1164,7 +1164,7 @@ Beam::check_concave (SCM smob)
 
       r /= Staff_symbol_referencer::staff_space (me);
       me->set_property ("positions", ly_interval2scm (Drul_array<Real> (r, r)));
-      me->set_property ("least-squares-dy", scm_make_real (0));
+      me->set_property ("least-squares-dy", gh_double2scm (0));
     }
 
   return SCM_UNSPECIFIED;
@@ -1183,7 +1183,7 @@ Beam::slope_damping (SCM smob)
     return SCM_UNSPECIFIED;
 
   SCM s = me->get_property ("damping"); 
-  int damping = ly_scm2int (s);
+  int damping = gh_scm2int (s);
 
   if (damping)
     {
@@ -1223,11 +1223,11 @@ where_are_the_whole_beams (SCM beaming)
 {
   Slice l; 
   
-  for ( SCM s = ly_car (beaming); ly_c_pair_p (s) ; s = ly_cdr (s))
+  for ( SCM s = gh_car (beaming); gh_pair_p (s) ; s = gh_cdr (s))
     {
-      if (scm_c_memq (ly_car (s), ly_cdr (beaming)) != SCM_BOOL_F)
+      if (scm_c_memq (gh_car (s), gh_cdr (beaming)) != SCM_BOOL_F)
        
-       l.add_point (ly_scm2int (ly_car (s)));
+       l.add_point (gh_scm2int (gh_car (s)));
     }
 
   return l;
@@ -1297,8 +1297,8 @@ Beam::set_stem_lengths (Grob *me)
 
   bool gap = false;
   Real thick =0.0;
-  if (ly_c_number_p (me->get_property ("gap-count"))
-      &&ly_scm2int (me->get_property ("gap-count")))
+  if (gh_number_p (me->get_property ("gap-count"))
+      &&gh_scm2int (me->get_property ("gap-count")))
     {
       gap = true;
       thick = get_thickness (me);
@@ -1453,26 +1453,26 @@ SCM
 Beam::rest_collision_callback (SCM element_smob, SCM axis)
 {
   Grob *rest = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) gh_scm2int (axis);
 
-  if (ly_c_number_p (rest->get_property ("staff-position")))
-    return scm_int2num (0);
+  if (gh_number_p (rest->get_property ("staff-position")))
+    return gh_int2scm (0);
   
   assert (a == Y_AXIS);
 
   Grob *st = unsmob_grob (rest->get_property ("stem"));
   Grob *stem = st;
   if (!stem)
-    return scm_make_real (0.0);
+    return gh_double2scm (0.0);
   Grob *beam = unsmob_grob (stem->get_property ("beam"));
   if (!beam
       || !Beam::has_interface (beam)
       || !Beam::visible_stem_count (beam))
-    return scm_make_real (0.0);
+    return gh_double2scm (0.0);
 
   Drul_array<Real> pos (0, 0);
   SCM s = beam->get_property ("positions");
-  if (ly_c_pair_p (s) && ly_c_number_p (ly_car (s)))
+  if (gh_pair_p (s) && gh_number_p (ly_car (s)))
     pos = ly_scm2interval (s);
   Real staff_space = Staff_symbol_referencer::staff_space (rest);
 
@@ -1518,19 +1518,19 @@ Beam::rest_collision_callback (SCM element_smob, SCM axis)
       < rad)
     shift = ceil (fabs (shift)) *sign (shift);
 
-  return scm_make_real (staff_space * shift);
+  return gh_double2scm (staff_space * shift);
 }
 
 bool
 Beam::is_knee (Grob* me)
 {
   SCM k = me->get_property ("knee");
-  if (ly_c_boolean_p (k))
-    return ly_scm2bool (k);
+  if (gh_boolean_p (k))
+    return gh_scm2bool (k);
 
   bool knee = false;
   int d = 0;
-  for (SCM s = me->get_property ("stems"); ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("stems"); gh_pair_p (s); s = ly_cdr (s))
     {
       Direction dir = get_grob_direction (unsmob_grob (ly_car (s)));
       if (d && d != dir)
@@ -1541,7 +1541,7 @@ Beam::is_knee (Grob* me)
       d = dir;
     }
   
-  me->set_property ("knee", ly_bool2scm (knee));
+  me->set_property ("knee", gh_bool2scm (knee));
 
   return knee;
 }
index 1e4e6c0956735298824d4291945578b09554e23d..9382b6dc9ba1ed9eb2b0fa4f761ae2c663abcf0e 100644 (file)
@@ -88,7 +88,9 @@ Beaming_info_list::beamify (Moment &beat_length,bool subdivide)
   do
     {
       if (splits[d].infos_.size () != 1)
-       splits[d].infos_.boundary (-d, 0).beams_i_drul_[-d] = middle_beams;
+       {
+         splits[d].infos_.boundary (-d, 0).beams_i_drul_[-d] = middle_beams;
+       }
     }
   while (flip (&d) != LEFT);
 
index 85d116e78c0725671c357363340009a619806803..dfd290d499da749df681bd97dd3d9e17064f49a7 100644 (file)
@@ -26,16 +26,6 @@ slur_height (Real width, Real h_inf, Real r_0)
 }
 
   /*
-
-
-  ^              x                    x                  
-  |
-height   <indent>
-  |
-  v      x                                    x
-
-  
-  
   For small w, the height should be proportional to w, for w ->
   infinity, the height should rise to a limit asymptotically.
 
@@ -51,7 +41,7 @@ height   <indent>
 
   * F (x) = 2/pi * atan (pi x/2)
 
-  * F (x) 1/alpha * x^alpha / (1 + x^alpha)
+  * F (x) 1/alpha * x^alpha / (1 + x^alpha)
 
   * (etc.)
 
@@ -64,23 +54,6 @@ height   <indent>
   no experiments for determining the best combinations of F, h_inf and
   r_0.
 
-
-  The indent is proportional to the height of the slur for small
-  slurs.  For large slurs, this gives a certain hookiness at the end,
-  so we increase the indent.
-
-  ind = G(w)
-
-  w -> 0,  G(w) -> .5 h
-
-  w -> inf, G(w) -> 2*h
-
-  eg.
-
-
-  G(w) = h (w/(w+h_inf) 1.5 + .5 h 
-  
-  
   */
 
 Bezier
@@ -88,7 +61,7 @@ slur_shape (Real width, Real h_inf, Real r_0)
 {
   Bezier curve;
   Real height =  slur_height (width, h_inf, r_0);
-  Real indent = (width/(h_inf+ width)*1.5 + 0.5) * height;
+  Real indent = height;
 
   curve.control_[0] = Offset (0, 0);
   curve.control_[1] = Offset (indent, height);
diff --git a/lily/book-paper-def.cc b/lily/book-paper-def.cc
deleted file mode 100644 (file)
index 95d7114..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/* 
-  book-paper-def.cc -- implement Output_def
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
-*/
-
-#include "dimensions.hh"
-#include "font-metric.hh"
-#include "ly-module.hh"
-#include "output-def.hh"
-#include "scaled-font-metric.hh"
-#include "virtual-font-metric.hh"
-
-Real
-output_scale (Output_def *od)
-{
-  return ly_scm2double (od->lookup_variable (ly_symbol2scm ("outputscale")));
-}
-
-/* TODO: should add nesting for Output_def here too. */
-Font_metric *
-find_scaled_font (Output_def *mod,
-                 Font_metric *f, Real m, SCM input_enc_name)
-{
-  if (mod->parent_)
-    return find_scaled_font (mod->parent_, f, m, input_enc_name);
-  
-  Real lookup_mag = m;
-  if (!dynamic_cast<Virtual_font_metric*> (f))
-    lookup_mag /= output_scale (mod);
-
-  SCM font_table = mod->lookup_variable (ly_symbol2scm ("scaled-fonts"));
-  if (scm_hash_table_p (font_table) != SCM_BOOL_T)
-    {
-      font_table = scm_c_make_hash_table (11);
-      mod->set_variable (ly_symbol2scm ("scaled-fonts"), font_table);
-    }
-
-  
-  SCM sizes = scm_hashq_ref (font_table, f->self_scm (), SCM_BOOL_F);
-  if (sizes != SCM_BOOL_F)
-    {
-      SCM met = scm_assoc (scm_make_real (lookup_mag), sizes);
-      if (ly_c_pair_p (met))
-       return unsmob_metrics (ly_cdr (met));
-    }
-  else
-    sizes = SCM_EOL;
-  
-  /* Hmm. We're chaining font - metrics.  Should consider whether to
-     merge virtual-font and scaled_font.  */
-  SCM val = SCM_EOL;
-  if (Virtual_font_metric * vf = dynamic_cast<Virtual_font_metric*> (f))
-    {
-      /* For fontify_atom (), the magnification and name must be known
-        at the same time. That's impossible for
-        
-        Scaled (Virtual_font (Font1,Font2))
-        
-        so we replace by
-        
-        Virtual_font (Scaled (Font1), Scaled (Font2))  */
-      SCM lst = SCM_EOL;
-      SCM *t = &lst;
-      for (SCM s = vf->get_font_list (); ly_c_pair_p (s); s = ly_cdr (s))
-       {
-         Font_metric *scaled = find_scaled_font (mod,
-                                                 unsmob_metrics (ly_car (s)),
-                                                 m, input_enc_name);
-         *t = scm_cons (scaled->self_scm (), SCM_EOL);
-         t = SCM_CDRLOC (*t);
-       }
-
-      vf = new Virtual_font_metric (lst);
-      val = vf->self_scm ();
-    }
-  else
-    {
-      if (!ly_c_symbol_p (input_enc_name))
-       {
-         SCM var = ly_module_lookup (mod->scope_,
-                                     ly_symbol2scm ("inputencoding"));
-         if (var != SCM_BOOL_F) 
-           input_enc_name = scm_variable_ref (var);
-         if (!ly_c_symbol_p (input_enc_name))
-           input_enc_name = ly_symbol2scm ("latin1"); 
-       }
-
-      val = Modified_font_metric::make_scaled_font_metric (input_enc_name,
-                                                          f, lookup_mag);
-    }
-
-  sizes = scm_acons (scm_make_real (lookup_mag), val, sizes);
-  scm_gc_unprotect_object (val);
-  scm_hashq_set_x (font_table, f->self_scm (), sizes);
-  return unsmob_metrics (val);
-}
-
-/* TODO: this is a nasty interface. During formatting,
-   the Output_def should be scaled to the output_scale_
-   specified in the toplevel Output_def.  */
-Output_def * 
-scale_output_def (Output_def *o, Real amount)
-{
-  SCM proc = ly_scheme_function ("scale-paper");
-  SCM new_pap = scm_call_2 (proc, o->self_scm (), scm_double2num (amount));
-  scm_gc_protect_object (new_pap);
-
-  return unsmob_output_def (new_pap);
-}
-
-LY_DEFINE (ly_bookpaper_fonts, "ly:bookpaper-fonts",
-          1, 0, 0,
-          (SCM bp),
-          "Return fonts scaled up BP")
-{
-  Output_def *b = unsmob_output_def (bp);
-
-  SCM font_table = b->lookup_variable (ly_symbol2scm ("scaled-fonts"));
-  
-  SCM_ASSERT_TYPE (b, bp, SCM_ARG1, __FUNCTION__, "bookpaper");
-
-  SCM ell = SCM_EOL;
-  if (scm_hash_table_p (font_table) == SCM_BOOL_T)
-    {
-      SCM func = ly_scheme_function ("hash-table->alist");
-
-      for (SCM s = scm_call_1 (func, font_table); ly_c_pair_p (s);
-          s = ly_cdr (s))
-       {
-         SCM entry = ly_car (s);
-         for (SCM t = ly_cdr (entry); ly_c_pair_p (t); t = ly_cdr (t))
-           {
-             Font_metric *fm = unsmob_metrics (ly_cdar (t));
-
-             if (dynamic_cast<Modified_font_metric*> (fm))
-               ell = scm_cons (fm->self_scm (), ell);
-           }
-       }
-    }
-  return ell;
-}
diff --git a/lily/book.cc b/lily/book.cc
deleted file mode 100644 (file)
index 7387d64..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-  book.cc -- implement Book
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include <stdio.h>
-
-#include "book.hh"
-#include "global-context.hh"
-#include "ly-module.hh"
-#include "main.hh"
-#include "music-iterator.hh"
-#include "music-output.hh"
-#include "music.hh"
-#include "output-def.hh"
-#include "paper-book.hh"
-#include "score.hh"
-#include "stencil.hh"
-#include "warn.hh"
-
-#include "ly-smobs.icc"
-
-Book::Book ()
-  : Input ()
-{
-  bookpaper_ = 0;
-  header_ = SCM_EOL;
-  assert (!scores_.size ());
-  smobify_self ();
-}
-
-Book::~Book ()
-{
-}
-
-IMPLEMENT_SMOBS (Book);
-IMPLEMENT_DEFAULT_EQUAL_P (Book);
-
-SCM
-Book::mark_smob (SCM s)
-{
-  Book *book = (Book*) SCM_CELL_WORD_1 (s);
-  int score_count = book->scores_.size ();
-  for (int i = 0; i < score_count; i++)
-    scm_gc_mark (book->scores_[i]->self_scm ());
-
-  if (book->bookpaper_)
-    scm_gc_mark (book->bookpaper_->self_scm ());
-  return book->header_;
-}
-
-int
-Book::print_smob (SCM, SCM p, scm_print_state*)
-{
-  scm_puts ("#<Book>", p);
-  return 1;
-}
-
-/* This function does not dump the output; outname is required eg. for
-   dumping header fields.  */
-Paper_book *
-Book::process (String outname, Output_def *default_def)
-{
-  Paper_book *paper_book = new Paper_book ();
-  Real scale = ly_scm2double (bookpaper_->c_variable ("outputscale"));
-  
-  Output_def * scaled_bookdef = scale_output_def (bookpaper_, scale);
-
-  paper_book->bookpaper_ = scaled_bookdef;
-  scm_gc_unprotect_object (scaled_bookdef->self_scm());
-  
-  paper_book->header_ = header_;
-  
-  int score_count = scores_.size ();
-  for (int i = 0; i < score_count; i++)
-    {
-      SCM systems = scores_[i]->book_rendering (outname,
-                                               paper_book->bookpaper_,
-                                               default_def);
-      
-      /* If the score is empty, generate no output.  Should we
-        do titling?  */
-      if (SCM_NFALSEP(scm_vector_p (systems)))
-       {
-         Score_lines sc;
-         sc.lines_ = systems;
-         sc.header_ = header_;
-         paper_book->score_lines_.push (sc);
-       }
-    }
-
-  return paper_book;
-}
-
index 97bbbb905bb9c6018b684152231c9e0e35dc56fb..5ec4a9f03949234f7ce87d003b2f6f157b8a0eb9 100644 (file)
@@ -8,7 +8,6 @@
 
 #include "box.hh"
 #include "array.hh"
-#include "axes.hh"
 
 void
 Box::translate (Offset o)
index 72d7021e9555fdc25612a6f9b399e65bd5bf4af5..7176d928ffb0d1439e292f7527bf848b37250401 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "paper-column.hh"
 #include "break-algorithm.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "system.hh"
 #include "paper-score.hh"
 #include "paper-column.hh"
@@ -62,7 +62,7 @@ Break_algorithm::generate_spacing_problem (Link_array<Grob> const &curline,
 
   /*
     this is hardcoded, but this shouldn't happen anyway.
-    used to be get_dimension (ly_symbol2scm ("loose_column_distance"));        
+    used to be get_realvar (ly_symbol2scm ("loose_column_distance"));        
    */
   sp->default_space_ = 1.0;
 
@@ -95,7 +95,7 @@ void
 Break_algorithm::set_pscore (Paper_score*s)
 {
   pscore_ = s;
-  linewidth_ = s->paper_->get_dimension (ly_symbol2scm ("linewidth"));
+  linewidth_ = s->paper_->get_realvar (ly_symbol2scm ("linewidth"));
 }
 
 Array<Column_x_positions>
index 9c830d3fcedc53a2fab1d55c4804339cba41adec..ef66a137bb7df0893785f3623b35bb408712185f 100644 (file)
@@ -12,8 +12,7 @@
 #include "item.hh"
 #include "align-interface.hh"
 #include "axis-group-interface.hh"
-#include "context.hh"
-#include "translator-group.hh"
+
 
 class Break_align_engraver : public Engraver
 {
@@ -37,7 +36,7 @@ Break_align_engraver::add_column (SCM smob)
 {
   Grob * e = unsmob_grob (smob);
   Break_align_interface::add_element (align_,e);
-  
+  typeset_grob (e);
 }
 
 void
@@ -49,15 +48,23 @@ Break_align_engraver::finalize ()
 void
 Break_align_engraver::stop_translation_timestep ()
 {
-  for (SCM p = column_alist_; ly_c_pair_p (p); p = ly_cdr (p))
+  for (SCM p = column_alist_; gh_pair_p (p); p = ly_cdr (p))
     {
       SCM pair = ly_car (p);
       add_column (ly_cdr (pair));
     }
   column_alist_ = SCM_EOL;
 
-  align_ = 0;
-  left_edge_ = 0;
+  if (align_)
+    {
+      typeset_grob (align_);
+      align_ = 0;
+    }
+  if (left_edge_)
+    {
+      typeset_grob (left_edge_);
+      left_edge_ = 0;
+    }
 }
 
 
@@ -85,22 +92,18 @@ Break_align_engraver::acknowledge_grob (Grob_info inf)
        return ;
 
       SCM align_name = item->get_property ("break-align-symbol");
-      if (!ly_c_symbol_p (align_name))
+      if (!gh_symbol_p (align_name))
        return ;
 
       if (!align_)
        {
-         align_ = make_item ("BreakAlignment", SCM_EOL);
+         align_ = make_item ("BreakAlignment");
 
-         
+         announce_grob (align_, SCM_EOL);
 
-         Context*origin = inf.origin_contexts (this)[0];
-         left_edge_ =  make_item_from_properties (origin->implementation (),
-                                                  ly_symbol2scm ("LeftEdge"),
-                                                  SCM_EOL
-                                                  );
-         add_to_group (left_edge_->get_property ("break-align-symbol"),
-                       left_edge_);
+         left_edge_ = make_item ("LeftEdge");
+         add_to_group (left_edge_->get_property ("break-align-symbol"), left_edge_);
+         announce_grob (left_edge_, SCM_EOL);
        }
       
       add_to_group (align_name, item);
@@ -120,10 +123,11 @@ Break_align_engraver::add_to_group (SCM align_name, Item*item)
     }
   else
     {
-      group = make_item ("BreakAlignGroup", item->self_scm () );
+      group = make_item ("BreakAlignGroup");
 
       group->set_property ("break-align-symbol", align_name);
       group->set_parent (align_, Y_AXIS);
+      announce_grob (group, item->self_scm ());
          
       column_alist_ = scm_assoc_set_x (column_alist_, align_name, group->self_scm ());
 
@@ -132,12 +136,9 @@ Break_align_engraver::add_to_group (SCM align_name, Item*item)
 }
 
 ENTER_DESCRIPTION (Break_align_engraver,
-                  "Align grobs with corresponding @code{break-align-symbols} into "
-                  "groups, and order the groups according to @code{breakAlignOrder}. "
-                  "The left edge of the alignment gets a separate group, with a symbol @code{left-edge}. "
-                  ,
-                  /* creats*/       "BreakAlignment BreakAlignGroup LeftEdge",
-                  /* accepts */     "",
-                  /* acks  */       "break-aligned-interface",
-                  /* reads */       "",
-                  /* write */       "");
+/* descr */       "Align grobs with corresponding break-align-symbols into groups, and order the groups according to breakAlignOrder",
+/* creats*/       "BreakAlignment BreakAlignGroup LeftEdge",
+/* accepts */     "",
+/* acks  */       "break-aligned-interface"
+,/* reads */       "",
+/* write */       "");
index 6bbd74a950ab5c9e5e125e09d03b02dcbd163c17..3e5f9d38b5ea39bebf027465ea02176aac9896a9 100644 (file)
@@ -17,7 +17,7 @@
 #include "lily-guile.hh"
 #include "break-align-interface.hh"
 #include "dimensions.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "paper-column.hh"
 #include "group-interface.hh"
 #include "align-interface.hh"
@@ -28,7 +28,7 @@ SCM
 Break_align_interface::alignment_callback (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) gh_scm2int (axis);
 
   assert (a == X_AXIS);
   Grob *par = me->get_parent (a);
@@ -38,7 +38,7 @@ Break_align_interface::alignment_callback (SCM element_smob, SCM axis)
       Break_align_interface::do_alignment (par);
     }
     
-  return scm_make_real (0);
+  return gh_double2scm (0);
 }
 
 MAKE_SCHEME_CALLBACK (Break_align_interface,self_align_callback,2);
@@ -46,7 +46,7 @@ SCM
 Break_align_interface::self_align_callback (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) gh_scm2int (axis);
   assert (a == X_AXIS);
   
   Item* item = dynamic_cast<Item*> (me);
@@ -76,25 +76,25 @@ Break_align_interface::ordered_elements (Grob *grob)
   Item *me  = dynamic_cast<Item*> (grob);
   SCM elts = me->get_property ("elements");
   SCM order_vec = me->get_property ("break-align-orders");
-  if (!ly_c_vector_p (order_vec)
-      || ly_vector_length (order_vec) < 3)
+  if (!gh_vector_p (order_vec)
+      || gh_vector_length (order_vec) < 3)
     return  Pointer_group_interface__extract_grobs (me, (Grob*)0,
                                                    "elements");
   SCM order = scm_vector_ref (order_vec,
-                             scm_int2num (me->break_status_dir() + 1));
+                             gh_int2scm (me->break_status_dir() + 1));
 
 
   /*
     Copy in order specified in BREAK-ALIGN-ORDER.
   */
   Link_array<Grob> new_elts;
-  for (; ly_c_pair_p (order); order = ly_cdr (order))
+  for (; gh_pair_p (order); order = ly_cdr (order))
     {
-      SCM sym = ly_car (order);
+      SCM sym = gh_car (order);
       
-      for (SCM s =elts; ly_c_pair_p (s); s = ly_cdr (s))
+      for (SCM s =elts; gh_pair_p (s); s = gh_cdr (s))
        {
-         Grob *g = unsmob_grob (ly_car (s));
+         Grob *g = unsmob_grob (gh_car (s));
          if (g && sym == g->get_property ("break-align-symbol"))
            {
              new_elts.push (g);
@@ -160,10 +160,10 @@ Break_align_interface::do_alignment (Grob *grob)
       /*
        Find the first grob with a space-alist entry.
        */
-      for (SCM s = l->get_property ("elements");
-          ly_c_pair_p (s) ; s = ly_cdr (s))
+      for (SCM s= l->get_property ("elements");
+          gh_pair_p (s) ; s = gh_cdr (s))
          {
-           Grob *elt = unsmob_grob (ly_car (s));
+           Grob *elt = unsmob_grob (gh_car (s));
 
            if (edge_idx < 0
                && elt->get_property ("break-align-symbol")
@@ -171,7 +171,7 @@ Break_align_interface::do_alignment (Grob *grob)
              edge_idx = idx;
            
            SCM l =elt->get_property ("space-alist");
-           if (ly_c_pair_p (l))
+           if (gh_pair_p (l))
              {
                alist= l;
                break;
@@ -186,9 +186,9 @@ Break_align_interface::do_alignment (Grob *grob)
        reason.
       */
       for (SCM s = r ? r->get_property ("elements") : SCM_EOL;
-          !ly_c_symbol_p (rsym) && ly_c_pair_p (s); s = ly_cdr (s))
+          !gh_symbol_p (rsym) && gh_pair_p (s); s = gh_cdr (s))
        {
-         Grob * elt =unsmob_grob (ly_car (s));
+         Grob * elt =unsmob_grob (gh_car (s));
 
          rsym = elt->get_property ("break-align-symbol");
        }
@@ -197,14 +197,14 @@ Break_align_interface::do_alignment (Grob *grob)
        edge_idx = next_idx;
 
       SCM entry = SCM_EOL;
-      if (ly_c_symbol_p (rsym))
+      if (gh_symbol_p (rsym))
        entry = scm_assq (rsym, alist);
 
-      bool entry_found = ly_c_pair_p (entry);
+      bool entry_found = gh_pair_p (entry);
       if (!entry_found)
        {
          String sym_string;
-         if (ly_c_symbol_p (rsym))
+         if (gh_symbol_p (rsym))
            sym_string = ly_symbol2string (rsym);
 
          String orig_string ;
@@ -221,10 +221,10 @@ Break_align_interface::do_alignment (Grob *grob)
       
       if (entry_found)
        {
-         entry = ly_cdr (entry);
+         entry = gh_cdr (entry);
          
-         distance = ly_scm2double (ly_cdr (entry));
-         type = ly_car (entry) ;
+         distance = gh_scm2double (gh_cdr (entry));
+         type = gh_car (entry) ;
        }
 
       if (r)
index f7dee18a75b9e204699bb7440c1eb96a08b58f1a..0645a1c6c08910acbf803fa43265fadbb34d89c0 100644 (file)
@@ -91,7 +91,7 @@ do_break_substitution (SCM src)
  
   if (unsmob_grob (src))
     return substitute_grob (unsmob_grob (src));
-  else if (ly_c_vector_p (src))
+  else if (gh_vector_p (src))
     {
       int len = SCM_VECTOR_LENGTH (src);
       SCM nv = scm_c_make_vector (len, SCM_UNDEFINED);
@@ -102,7 +102,7 @@ do_break_substitution (SCM src)
                            do_break_substitution (scm_vector_ref (src, si))); 
        }
     }
-  else if (ly_c_pair_p (src)) 
+  else if (ly_pair_p (src)) 
     {
       /*
        UGH! breaks on circular lists.
@@ -111,7 +111,7 @@ do_break_substitution (SCM src)
       SCM oldcdr = ly_cdr (src);
       
       if (newcar == SCM_UNDEFINED
-         && (ly_c_pair_p (oldcdr) || oldcdr == SCM_EOL))
+         && (gh_pair_p (oldcdr) || oldcdr == SCM_EOL))
        {
          /*
            This is tail-recursion, ie. 
@@ -142,13 +142,13 @@ substitute_grob_list (SCM grob_list)
   SCM l = SCM_EOL;
   SCM * tail = &l;
 
-  for (SCM s = grob_list; ly_c_pair_p (s); s =  ly_cdr (s))
+  for (SCM s = grob_list; gh_pair_p (s); s =  gh_cdr (s))
     {
-      SCM n= substitute_grob (unsmob_grob (ly_car (s)));
+      SCM n= substitute_grob (unsmob_grob (gh_car (s)));
 
       if (n != SCM_UNDEFINED)
        {
-         *tail = scm_cons (n, SCM_EOL);
+         *tail = gh_cons (n, SCM_EOL);
          tail = SCM_CDRLOC (*tail);
        }
     }
@@ -350,9 +350,9 @@ Spanner::fast_fubstitute_grob_list (SCM sym,
   
   int sp_index = len;
   int it_index = 0;
-  for (SCM s = grob_list; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = grob_list; gh_pair_p (s); s = gh_cdr (s))
     {
-      Grob * g = unsmob_grob (ly_car (s));
+      Grob * g = unsmob_grob (gh_car (s));
 
       Slice sr = grob_system_range (g);
       sr.intersect (system_range);
@@ -467,10 +467,10 @@ substitute_mutable_property_alist (SCM alist)
 
   SCM l = SCM_EOL;
   SCM *tail = &l;
-  for (SCM s = alist; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = alist; gh_pair_p (s); s = gh_cdr (s))
     {
-      SCM sym = ly_caar (s);
-      SCM val = ly_cdar (s);
+      SCM sym = gh_caar (s);
+      SCM val = gh_cdar (s);
       SCM type = scm_object_property (sym, ly_symbol2scm ("backend-type?"));
 
       if (type == grob_list_p)
@@ -478,7 +478,7 @@ substitute_mutable_property_alist (SCM alist)
       else
        val = do_break_substitution (val);
 
-      *tail = scm_cons (scm_cons (sym, val), SCM_EOL);
+      *tail = gh_cons (gh_cons (sym, val), SCM_EOL);
       tail = SCM_CDRLOC (*tail);
     }
 
index 10074de3f6c15532bd1c4fcbb8c70438e3220fa0..d5bee482859be7f3e8b19318ec3713da28ee1a4f 100644 (file)
@@ -54,7 +54,9 @@ Breathing_sign_engraver::process_acknowledged_grobs ()
 {
   if (breathing_sign_req_ && ! breathing_sign_)
     {
-      breathing_sign_ = make_item ("BreathingSign", breathing_sign_req_->self_scm ());
+      breathing_sign_ = make_item ("BreathingSign");
+
+      announce_grob (breathing_sign_, breathing_sign_req_->self_scm ());
       breathing_sign_req_ = 0;
     }
 }
@@ -62,7 +64,11 @@ Breathing_sign_engraver::process_acknowledged_grobs ()
 void 
 Breathing_sign_engraver::stop_translation_timestep ()
 {
-  breathing_sign_ = 0;
+  if (breathing_sign_)
+    {
+      typeset_grob (breathing_sign_);
+      breathing_sign_ = 0;
+    }
   breathing_sign_req_ = 0;
 }
 
index 511fbd8373bcd68c396c29818f51f38b209e0f97..489a32296f089e5bb2265430b9aab79f5ce7156c 100644 (file)
@@ -15,7 +15,7 @@
 #include "breathing-sign.hh"
 #include "string.hh"
 #include "stencil.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "lookup.hh"
 
 #include "dimensions.hh"
@@ -55,7 +55,7 @@ Breathing_sign::divisio_minima (SCM smob)
   else
     staff_size = 0.0;
 
-  Real blotdiameter = me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+  Real blotdiameter = me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter"));
 
   /*
    * Draw a small vertical line through the uppermost (or, depending
@@ -88,7 +88,7 @@ Breathing_sign::divisio_maior (SCM smob)
   else
     staff_size = 0.0;
 
-  Real blotdiameter = me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+  Real blotdiameter = me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter"));
 
   /*
    * Draw a vertical line that is vertically centered in the staff
@@ -128,7 +128,7 @@ Breathing_sign::divisio_maxima (SCM smob)
   else
     staff_size = 0.0;
 
-  Real blotdiameter = me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+  Real blotdiameter = me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter"));
 
   // like a "|" type bar
   Interval xdim (0, thickness);
@@ -158,7 +158,7 @@ Breathing_sign::finalis (SCM smob)
   else
     staff_size = 0.0;
 
-  Real blotdiameter = me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+  Real blotdiameter = me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter"));
 
   // like a "||" type bar
   Interval xdim (0, thickness);
@@ -187,7 +187,7 @@ Breathing_sign::offset_callback (SCM element_smob, SCM)
 
   Real inter_f = Staff_symbol_referencer::staff_space (me)/2;
   int sz = Staff_symbol_referencer::line_count (me)-1;
-  return scm_make_real (inter_f * sz * d);
+  return gh_double2scm (inter_f * sz * d);
 }
 
 ADD_INTERFACE (Breathing_sign, "breathing-sign-interface",
index d36567b5940981cf5ee0dd2babbfcb8b4fce4060..aa03614babe8b8afa051086ea1dff54e1b95f6f4 100644 (file)
@@ -27,7 +27,7 @@ Change_iterator::error (String reason)
    */
   String warn2= "Change_iterator::process (): " 
     + get_outlet ()->context_name () + " = `"
-    + get_outlet ()->id_string () + "': ";
+    + get_outlet ()->id_string_ + "': ";
   warning (warn2);
   get_music ()->origin ()->warning (warn1);
 }
@@ -52,10 +52,10 @@ Change_iterator::process (Moment m)
   while (current && !current->is_alias (to_type))
     {
       last = current;
-      current = current->get_parent_context ();
+      current = current->daddy_context_;
     }
 
-  if (current && current->id_string () == to_id)
+  if (current && current->id_string_ == to_id)
     {
       String msg;
       msg += _ ("Can't switch translators, I'm there already");
@@ -68,8 +68,8 @@ Change_iterator::process (Moment m)
        Context * where = get_outlet ();
        while (!dest && where)
          {
-           dest = find_context_below (where, to_type, to_id);
-           where = where->get_parent_context ();
+           dest = where->find_context_below (to_type, to_id);
+           where = where->daddy_context_;
          }
        
        if (dest)
@@ -88,7 +88,7 @@ Change_iterator::process (Moment m)
          We could change the current translator's id, but that would make 
          errors hard to catch
          
-          last->translator_id_string ()  = get_change ()->change_to_id_string ();
+          last->translator_id_string_  = get_change ()->change_to_id_string_;
        */
        error (_ ("I'm one myself"));
       }
index 88635e5285860c2a3cd3c29bd1ff7bd08543b022..a13f527601aa0548c33c1ef70dbe7cce6640dd10 100644 (file)
@@ -9,9 +9,9 @@
 #include "engraver.hh"
 #include "chord-name.hh"
 #include "event.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "font-interface.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "dimensions.hh"
 #include "item.hh"
 #include "pitch.hh"
@@ -80,19 +80,19 @@ Chord_name_engraver::process_music ()
       else if (n->get_property ("bass") == SCM_BOOL_T)
        bass = p;
       else
-       pitches = scm_cons (p, pitches);
+       pitches = gh_cons (p, pitches);
     }
 
   if (inversion_event)
     {
       SCM oct = inversion_event->get_property ("octavation");
-      if (ly_c_number_p (oct))
+      if (gh_number_p (oct))
        {
          Pitch *p = unsmob_pitch (inversion_event->get_property ("pitch"));
-         int octavation =  ly_scm2int (oct);
+         int octavation =  gh_scm2int (oct);
          Pitch orig = p->transposed (Pitch (-octavation, 0,0));
          
-         pitches= scm_cons (orig.smobbed_copy (), pitches);
+         pitches= gh_cons (orig.smobbed_copy (), pitches);
        }
       else
        programming_error ("Inversion does not have original pitch.");
@@ -102,19 +102,19 @@ Chord_name_engraver::process_music ()
 
   SCM name_proc = get_property ("chordNameFunction");
   SCM markup = scm_call_4 (name_proc, pitches, bass, inversion,
-                          context ()->self_scm ());
+                          daddy_context_->self_scm ());
 
   /*
     Ugh. 
    */
-  SCM chord_as_scm = scm_cons (pitches, scm_cons (bass, inversion));
+  SCM chord_as_scm = gh_cons (pitches, gh_cons (bass, inversion));
   
-  chord_name_ = make_item ("ChordName",notes_[0]->self_scm ());
+  chord_name_ = make_item ("ChordName");
   chord_name_->set_property ("text", markup);
-
+  announce_grob (chord_name_, notes_[0]->self_scm ());
   SCM s = get_property ("chordChanges");
-  if (to_boolean (s) && ly_c_pair_p (last_chord_) 
-      && ly_c_equal_p (chord_as_scm, last_chord_))
+  if (to_boolean (s) && gh_pair_p (last_chord_) 
+      && gh_equal_p (chord_as_scm, last_chord_))
     chord_name_->set_property ("begin-of-line-visible", SCM_BOOL_T);
 
   last_chord_ = chord_as_scm;
@@ -137,6 +137,10 @@ Chord_name_engraver::try_music (Music* m)
 void
 Chord_name_engraver::stop_translation_timestep ()
 {
+  if (chord_name_)
+    {
+      typeset_grob (chord_name_);
+    }
   chord_name_ = 0;
   notes_.clear ();
 }
index ce7099fa7df743120d68a87eb5a432c5060484e8..92f8c2418b32783da2dc43071a12cb8d724c1517 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "chord-name.hh"
 #include "stencil.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "font-interface.hh"
 #include "grob.hh"
 #include "paper-column.hh"
index ab2dc0d39a979525dc49c1382fed3a451ca73e35..7f9646f14539ec9545b1d2e92b8ed637a261332b 100644 (file)
@@ -1,11 +1,11 @@
 /*   
-     new-chord-tremolo-engraver.cc --  implement Chord_tremolo_engraver
+  new-chord-tremolo-engraver.cc --  implement Chord_tremolo_engraver
   
-     source file of the GNU LilyPond music typesetter
+  source file of the GNU LilyPond music typesetter
   
-     (c) 2000--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2000--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
-*/
+ */
 
 #include "engraver.hh"
 #include "beam.hh"
 
 /**
 
-This acknowledges repeated music with "tremolo" style.  It typesets
-a beam.
+  This acknowledges repeated music with "tremolo" style.  It typesets
+  a beam.
 
-TODO:
+  TODO:
 
-- perhaps use engraver this to steer other engravers? That would
-create dependencies between engravers, which is bad.
+  - perhaps use engraver this to steer other engravers? That would
+  create dependencies between engravers, which is bad.
 
-- create dots if appropriate.
+  - create dots if appropriate.
 
-- create TremoloBeam iso Beam?
+  - create TremoloBeam iso Beam?
 
 */
 class Chord_tremolo_engraver : public Engraver
@@ -120,15 +120,16 @@ void
 Chord_tremolo_engraver::process_music ()
 {
   if (repeat_ && sequential_body_b_ && !beam_)
-    {
-      beam_ = make_spanner ("Beam", repeat_->self_scm ());
-      beam_->set_property ("chord-tremolo", SCM_BOOL_T);
-
-      SCM smp = get_property ("measurePosition");
-      Moment mp
-       = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
-      beam_start_location_ = mp;
-    }
+       {
+         beam_ = make_spanner ("Beam");
+         beam_->set_property ("chord-tremolo", SCM_BOOL_T);
+
+         SCM smp = get_property ("measurePosition");
+         Moment mp
+           = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
+         beam_start_location_ = mp;
+         announce_grob (beam_, repeat_->self_scm ());
+       }
 }
 
 void
@@ -145,7 +146,11 @@ Chord_tremolo_engraver::finalize ()
 void
 Chord_tremolo_engraver::typeset_beam ()
 {
-  finished_beam_ = 0;
+  if (finished_beam_)
+    {
+      typeset_grob (finished_beam_);
+      finished_beam_ = 0;
+    }
 }
 
 void
@@ -162,7 +167,7 @@ Chord_tremolo_engraver::acknowledge_grob (Grob_info info)
          
       if (Stem::duration_log (s) != 1)
        {
-         beam_->set_property ("gap-count", scm_int2num (flags_ - total_duration_flags_));
+         beam_->set_property ("gap-count", gh_int2scm (flags_ - total_duration_flags_));
        }
 
       if (info.music_cause ()->is_mus_type ("rhythmic-event"))
@@ -181,7 +186,8 @@ Chord_tremolo_engraver::acknowledge_grob (Grob_info info)
   else if (repeat_ &&
           flags_ && !sequential_body_b_ && Stem::has_interface (info.grob_))
     {
-      stem_tremolo_ = make_item ("StemTremolo", repeat_->self_scm ());
+      stem_tremolo_ = make_item ("StemTremolo");
+      announce_grob (stem_tremolo_, repeat_->self_scm ());
       stem_tremolo_->set_property ("flag-count",
                                   scm_int2num (flags_));
       stem_tremolo_->set_property ("stem",
@@ -206,15 +212,14 @@ Chord_tremolo_engraver::start_translation_timestep ()
 void
 Chord_tremolo_engraver::stop_translation_timestep ()
 {
+  typeset_beam ();
+
   if (stem_tremolo_)
     {
-      repeat_ = 0;
-      if (beam_)
-       programming_error ("Huh, beam and stem tremolo?");
+      typeset_grob (stem_tremolo_);
       stem_tremolo_ = 0;
+      repeat_ = 0;
     }
-
-  typeset_beam ();
 }
 
 
index c22408b300f96ebaf8fa1aa20f3dacf1eb9772b4..12fbaaf18faa706ff19744326c6a8220c850eb83 100644 (file)
@@ -61,8 +61,8 @@ Clef_engraver::set_glyph ()
 
   SCM basic = ly_symbol2scm ("Clef");
   
-  execute_pushpop_property (context (), basic, glyph_sym, SCM_UNDEFINED);
-  execute_pushpop_property (context (), basic, glyph_sym, glyph);
+  execute_pushpop_property (daddy_context_, basic, glyph_sym, SCM_UNDEFINED);
+  execute_pushpop_property (daddy_context_, basic, glyph_sym, glyph);
 }
 
 /** 
@@ -76,7 +76,7 @@ Clef_engraver::acknowledge_grob (Grob_info info)
   if (item)
     {
       if (Bar_line::has_interface (info.grob_)
-         && ly_c_string_p (get_property ("clefGlyph")))
+         && gh_string_p (get_property ("clefGlyph")))
        create_clef ();
     } 
 }
@@ -86,25 +86,25 @@ Clef_engraver::create_clef ()
 {
   if (!clef_)
     {
-      Item *c = make_item ("Clef", SCM_EOL);
-      
+      Item *c= make_item ("Clef");
+      announce_grob (c, SCM_EOL);
 
       clef_ = c;
       SCM cpos = get_property ("clefPosition");
 
-      if (ly_c_number_p (cpos))
-       clef_->set_property ("staff-position", cpos);
+      if (gh_number_p (cpos))
+       Staff_symbol_referencer::set_position (clef_, gh_scm2int (cpos));
 
       SCM oct =  get_property ("clefOctavation");
-      if (ly_c_number_p (oct) && ly_scm2int (oct))
+      if (gh_number_p (oct) && gh_scm2int (oct))
        {
-         Item * g = make_item ("OctavateEight", SCM_EOL);
+         Item * g = make_item ("OctavateEight");
 
-         int abs_oct = ly_scm2int (oct) ;
+         int abs_oct = gh_scm2int (oct) ;
          int dir = sign (abs_oct);
          abs_oct = abs (abs_oct)  + 1;
 
-         SCM txt = scm_number_to_string (scm_int2num (abs_oct),
+         SCM txt = scm_number_to_string (gh_int2scm (abs_oct),
                                          SCM_MAKINUM (10));
 
          g->set_property ("text",
@@ -116,7 +116,7 @@ Clef_engraver::create_clef ()
          g->set_parent (clef_, X_AXIS);
          g->set_property ("direction", scm_int2num (dir));
          octavate_ = g;
-         
+         announce_grob (octavate_, SCM_EOL);
        }
     }
 }
@@ -152,7 +152,7 @@ Clef_engraver::inspect_clef_properties ()
 
   if (to_boolean (force_clef))
     {
-      Context * w = context ()->where_defined (ly_symbol2scm ("forceClef"));
+      Context * w = daddy_context_->where_defined (ly_symbol2scm ("forceClef"));
       w->set_property ("forceClef", SCM_EOL);
     }
 }
@@ -179,8 +179,14 @@ Clef_engraver::stop_translation_timestep ()
            }
        }
       
+      typeset_grob (clef_);
       clef_ =0;
 
+      if (octavate_)
+       {
+         typeset_grob (octavate_);
+       }
+
       octavate_ = 0;
     }
 }
index 7774d1920e7e2121991d1b3d40c34c534aa55226..73216528f0424e8e2cd636a4ec27c9bef541e615 100644 (file)
@@ -23,7 +23,7 @@ Clef::before_line_breaking (SCM smob)
 
   SCM glyph = s->get_property ("glyph-name");
   
-  if (ly_c_string_p (glyph))
+  if (gh_string_p (glyph))
     {
       String str = ly_scm2string (glyph);
 
@@ -53,7 +53,7 @@ Clef::print (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
   SCM glyph_scm = me->get_property ("glyph-name");
-  if (!ly_c_string_p (glyph_scm))
+  if (!gh_string_p (glyph_scm))
     return SCM_EOL;
 
   String glyph = String (ly_scm2string (glyph_scm));
index a65ee86cbf39d72fcb0447bfe01a56c63f58ec50..5ae931f3d98ce3b22dac6ea3e671c5d5d1b9c198 100644 (file)
@@ -51,8 +51,17 @@ Cluster_spanner_engraver::finalize ()
 void
 Cluster_spanner_engraver::typeset_grobs ()
 {
-  finished_spanner_ = 0;
-  beacon_ = 0;
+  if (finished_spanner_ )
+    {
+      typeset_grob (finished_spanner_);
+      finished_spanner_ = 0;
+    }
+
+  if (beacon_)
+    {
+      typeset_grob (beacon_);
+      beacon_ = 0;
+    }
 }
 
 bool
@@ -73,7 +82,7 @@ Cluster_spanner_engraver::process_music ()
     {
       SCM c0scm = get_property ("middleCPosition");
 
-      int c0 =  ly_c_number_p (c0scm) ? ly_scm2int (c0scm) : 0;
+      int c0 =  gh_number_p (c0scm) ? gh_scm2int (c0scm) : 0;
       int pmax = INT_MIN;
       int pmin = INT_MAX;
       
@@ -87,15 +96,17 @@ Cluster_spanner_engraver::process_music ()
          pmin = pmin <? p;
        }
       
-      beacon_ = make_item ("ClusterSpannerBeacon", cluster_notes_[0]->self_scm ());
+      beacon_ = make_item ("ClusterSpannerBeacon");
       beacon_->set_property ("positions",
-                                 scm_cons (scm_int2num (pmin),
-                                           scm_int2num (pmax)));
+                                 scm_cons (gh_int2scm (pmin),
+                                           gh_int2scm (pmax)));
+      announce_grob (beacon_, cluster_notes_[0]->self_scm ());
     }
 
   if (beacon_ && !spanner_)
     {    
-      spanner_ = make_spanner ("ClusterSpanner", cluster_notes_[0]->self_scm () );
+      spanner_ = make_spanner ("ClusterSpanner");
+      announce_grob (spanner_, cluster_notes_[0]->self_scm ());
     }
   
   if (beacon_ && spanner_)
index 794c42640b358a4eef97229158cf7f215f41f401..490840f1576b7f88417b8a6b80e6b5d9993b4501 100644 (file)
@@ -19,7 +19,7 @@
 #include "lookup.hh"
 #include "box.hh"
 #include "interval.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "warn.hh"
 
 
@@ -41,7 +41,7 @@ brew_cluster_piece (Grob *me, Array<Offset> bottom_points, Array<Offset> top_poi
   SCM shape_scm = me->get_property ("style");
   String shape;
 
-  if (ly_c_symbol_p (shape_scm))
+  if (gh_symbol_p (shape_scm))
     {
       shape = ly_symbol2string (shape_scm);
     }
@@ -53,7 +53,7 @@ brew_cluster_piece (Grob *me, Array<Offset> bottom_points, Array<Offset> top_poi
     }
 
 
-  Stencil out;
+  Stencil out = Stencil ();
   Array<Offset> points;
   points.clear ();
   int size = bottom_points.size ();
@@ -144,7 +144,7 @@ Cluster::print (SCM smob)
   Grob *commonx = left_bound->common_refpoint (right_bound, X_AXIS);
   SCM cols  =me->get_property ("columns");
 
-  if (!ly_c_pair_p (cols))
+  if (!gh_pair_p (cols))
     {
       me->warning ("junking empty cluster");
       me->suicide ();
@@ -165,7 +165,7 @@ Cluster::print (SCM smob)
     line with the center of the note heads?
     
    */
-  for (SCM s = cols; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = cols; gh_pair_p (s); s = ly_cdr (s))
     {
       Grob * col = unsmob_grob (ly_car (s));
       Interval yext = col->extent (commony, Y_AXIS);
@@ -186,7 +186,7 @@ Cluster::print (SCM smob)
        {
          Spanner * next = orig->broken_intos_[spanner->get_break_index () + 1];
          SCM cols = next->get_property ("columns");
-         if (ly_c_pair_p (cols))
+         if (gh_pair_p (cols))
            {
              Grob *next_commony = common_refpoint_of_list (cols, next, Y_AXIS);
              Grob * col = unsmob_grob (ly_car (scm_last_pair (cols)));
index 3e7e6b45eb9443e53e0b52608fa4295f79d31120..3c36448914ffe52bbad1a2c074e1b73c542cde4c 100644 (file)
@@ -86,7 +86,7 @@
          Real distance;
          if (incr_scm != SCM_EOL)
            {
-             distance = ly_scm2double (incr_scm);
+             distance = gh_scm2double (incr_scm);
            }
          else
            {
@@ -127,7 +127,7 @@ Coherent_ligature_engraver::get_set_column (Item *item, Paper_column *column)
       // also for all associated grobs (NoteSpacing, SeparationItem).
       Grob *sl = Staff_symbol_referencer::get_staff_symbol (item);
       for (SCM tail = parent->get_property ("elements");
-          ly_c_pair_p (tail);
+          gh_pair_p (tail);
           tail = ly_cdr (tail))
        {
          Item *sibling = unsmob_item (ly_car (tail));
@@ -140,7 +140,7 @@ Coherent_ligature_engraver::get_set_column (Item *item, Paper_column *column)
                                           "setting `spacing-increment = "
                                           "0.01': ptr=%ul", parent));
              sibling_parent->set_property ("forced-spacing",
-                                             scm_make_real (0.01));
+                                             gh_double2scm (0.01));
 #endif
              sibling->set_parent (column, X_AXIS);
            }
@@ -184,12 +184,12 @@ compute_delta_pitches (Array<Grob_info> primitives)
       {
        delta_pitch = pitch - prev_pitch;
        prev_primitive->set_property ("delta-pitch",
-                                          scm_int2num (delta_pitch));
+                                          gh_int2scm (delta_pitch));
       }
     prev_pitch = pitch;
     prev_primitive = primitive;
   }
-  primitive->set_property ("delta-pitch", scm_int2num (0));
+  primitive->set_property ("delta-pitch", gh_int2scm (0));
 }
 
 void
@@ -211,6 +211,12 @@ Coherent_ligature_engraver::typeset_ligature (Spanner *ligature,
   // prepare ligature for typesetting
   build_ligature (ligature, primitives);
   collect_accidentals (ligature, primitives);
+
+  // now actually typeset
+  for (int i = 0; i < primitives.size (); i++)
+    {
+      typeset_grob (primitives[i].grob_);
+    }
 }
 
 ENTER_DESCRIPTION (Coherent_ligature_engraver,
index c468b610614d584733ddf8fa7c6186ebb92fe081..2a0b1dea2fd4f1cffbdaa34be3f2d9f032665246 100644 (file)
@@ -36,8 +36,8 @@ Collision_engraver::process_acknowledged_grobs ()
     return ;
   if (!col_) 
     {
-      col_ = make_item ("NoteCollision", SCM_EOL);
-      
+      col_ = make_item ("NoteCollision");
+      announce_grob (col_, SCM_EOL);
     }
   
   for (int i=0; i< note_columns_.size (); i++)
@@ -60,7 +60,11 @@ Collision_engraver::acknowledge_grob (Grob_info i)
 void
 Collision_engraver::stop_translation_timestep ()
 {
-  col_ =0;
+  if (col_) 
+    {
+      typeset_grob (col_);
+      col_ =0;
+    }
   note_columns_.clear ();
 }
 
index 525e53ca368dc4eebc3855fdebe9d81b613a7d55..bf4437e41f32b24654e4b36ce60b9fb9e5127f03 100644 (file)
@@ -7,7 +7,7 @@
 #include <ctype.h>
 
 #include "rhythmic-head.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "event.hh"
 #include "dots.hh"
 #include "dot-column.hh"
@@ -210,9 +210,9 @@ Completion_heads_engraver::process_music ()
   for (int i = 0;
        left_to_do_ && i < note_reqs_.size (); i++)
     {
+      Item *note  = make_item ("NoteHead");
       
       Music * req =  note_reqs_[i];
-      Item *note  = make_item ("NoteHead", req->self_scm ());
       if (scratch_note_reqs_.size ())
        {
          req = scratch_note_reqs_[i];
@@ -222,21 +222,22 @@ Completion_heads_engraver::process_music ()
       
       req->set_property ("duration", note_dur.smobbed_copy ());
       note->set_property ("duration-log",
-                                scm_int2num (note_dur.duration_log ()));
+                                gh_int2scm (note_dur.duration_log ()));
       
       int dots= note_dur.dot_count ();
       if (dots)
        {
-         Item * d = make_item ("Dots", SCM_EOL);
+         Item * d = make_item ("Dots");
          Rhythmic_head::set_dots (note, d);
 
          /*
           measly attempt to save an eeny-weenie bit of memory.
          */
-         if (dots != ly_scm2int (d->get_property ("dot-count")))
-           d->set_property ("dot-count", scm_int2num (dots));
+         if (dots != gh_scm2int (d->get_property ("dot-count")))
+           d->set_property ("dot-count", gh_int2scm (dots));
 
          d->set_parent (note, Y_AXIS);
+         announce_grob (d, SCM_EOL);
          dots_.push (d);
        }
 
@@ -244,10 +245,11 @@ Completion_heads_engraver::process_music ()
 
       int pos = pit->steps ();
       SCM c0 = get_property ("middleCPosition");
-      if (ly_c_number_p (c0))
-       pos += ly_scm2int (c0);
+      if (gh_number_p (c0))
+       pos += gh_scm2int (c0);
 
-      note->set_property ("staff-position",   scm_int2num (pos));
+      note->set_property ("staff-position",   gh_int2scm (pos));
+      announce_grob (note,req->self_scm ());
       notes_.push (note);
     }
   
@@ -255,14 +257,14 @@ Completion_heads_engraver::process_music ()
     {
       for (int i= 0; i < notes_.size (); i++)
        {
-         Grob * p = make_spanner ("Tie", SCM_EOL);
+         Grob * p = make_spanner ("Tie");
          Tie::set_interface (p); // cannot remove yet!
          
          Tie::set_head (p, LEFT, prev_notes_[i]);
          Tie::set_head (p, RIGHT, notes_[i]);
          
          ties_.push (p);
-         
+         announce_grob (p, SCM_EOL);
        }
     }
 
@@ -281,12 +283,22 @@ Completion_heads_engraver::process_music ()
 void
 Completion_heads_engraver::stop_translation_timestep ()
 {
+  for (int i = ties_.size (); i--;)
+    typeset_grob (ties_[i]); 
   ties_.clear ();
   
+  for (int i=0; i < notes_.size (); i++)
+    {
+      typeset_grob (notes_[i]);
+    }
   if (notes_.size ())
     prev_notes_ = notes_;
   notes_.clear ();
   
+  for (int i=0; i < dots_.size (); i++)
+    {
+      typeset_grob (dots_[i]);
+    }
   dots_.clear ();
 
   for (int i = scratch_note_reqs_.size (); i--;)
index e9c7f4da3c8785b4794a7ad4b7535443f7b12876..9d88f0d9c50d8b4960f93bc27c630c47319ec3f2 100644 (file)
@@ -1,22 +1,55 @@
 /*   
   translator-def.cc --  implement Context_def
-
+  
   source file of the GNU LilyPond music typesetter
-
+  
   (c) 2000--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
+  
+ */
 
-/* TODO: should junk this class an replace by
-   a single list of context modifications?  */
+/*
+  TODO: should junk this class an replace by
+  a single list of context modifications?
+ */
 
-#include "context-def.hh"
-#include "engraver.hh"
 #include "lily-proto.hh"
-#include "output-def.hh"
-#include "performer.hh"
-#include "score-context.hh"
+#include "context-def.hh"
 #include "translator-group.hh"
 #include "warn.hh"
+#include "music-output-def.hh"
+#include "ly-smobs.icc"
+#include "score-context.hh"
+
+#include "performer.hh"
+#include "engraver.hh"
+
+int
+Context_def::print_smob (SCM smob, SCM port, scm_print_state*)
+{
+  Context_def* me = (Context_def*) SCM_CELL_WORD_1 (smob);
+
+  scm_puts ("#<Context_def ", port);
+  scm_display (me->context_name_, port);
+  scm_puts (">", port);
+  return 1;
+}
+
+
+SCM
+Context_def::mark_smob (SCM smob)
+{
+  Context_def* me = (Context_def*) SCM_CELL_WORD_1 (smob);
+
+  scm_gc_mark (me->description_);
+  scm_gc_mark (me->context_aliases_);
+  scm_gc_mark (me->accept_mods_);
+  scm_gc_mark (me->translator_mods_);
+  scm_gc_mark (me->property_ops_);  
+  scm_gc_mark (me->translator_group_type_);
+
+  return me->context_name_;
+}
+
 
 Context_def::Context_def ()
 {
@@ -33,6 +66,10 @@ Context_def::Context_def ()
   context_name_ = ly_symbol2scm ("");
 }
 
+Context_def::~Context_def ()
+{
+}
+
 Context_def::Context_def (Context_def const & s)
   : Input (s)
 {
@@ -55,52 +92,19 @@ Context_def::Context_def (Context_def const & s)
   context_name_ = s.context_name_;
 }
 
-Context_def::~Context_def ()
-{
-}
-
-#include "ly-smobs.icc"
-IMPLEMENT_SMOBS (Context_def);
-IMPLEMENT_DEFAULT_EQUAL_P (Context_def);
-
-int
-Context_def::print_smob (SCM smob, SCM port, scm_print_state*)
-{
-  Context_def* me = (Context_def*) SCM_CELL_WORD_1 (smob);
-
-  scm_puts ("#<Context_def ", port);
-  scm_display (me->context_name_, port);
-  scm_puts (">", port);
-  return 1;
-}
-
-SCM
-Context_def::mark_smob (SCM smob)
-{
-  Context_def* me = (Context_def*) SCM_CELL_WORD_1 (smob);
-
-  scm_gc_mark (me->description_);
-  scm_gc_mark (me->context_aliases_);
-  scm_gc_mark (me->accept_mods_);
-  scm_gc_mark (me->translator_mods_);
-  scm_gc_mark (me->property_ops_);  
-  scm_gc_mark (me->translator_group_type_);
-
-  return me->context_name_;
-}
 
 void
 Context_def::add_context_mod (SCM mod)
 {
-  SCM tag = ly_car (mod);
-  if (ly_symbol2scm ("description") == tag)
+  SCM tag  = gh_car (mod);
+  if (ly_symbol2scm ("description")  == tag)
     {
-      description_ = ly_cadr (mod);
-      return;
+      description_ = gh_cadr (mod);
+      return ;
     }
 
-  SCM sym = ly_cadr (mod);
-  if (ly_c_string_p (sym))
+  SCM sym = gh_cadr (mod);
+  if (gh_string_p (sym))
     sym = scm_string_to_symbol (sym);
   
   if (ly_symbol2scm ("consists") == tag
@@ -108,30 +112,43 @@ Context_def::add_context_mod (SCM mod)
       || ly_symbol2scm ("remove") == tag)
     {
       if (!get_translator (sym))
-       error (_f ("Program has no such type: `%s'",
-                  ly_symbol2string (sym).to_str0 ()));
+       error (_f ("Program has no such type: `%s'", ly_symbol2string (sym).to_str0 ()));
       else
-       translator_mods_ = scm_cons (scm_list_2 (tag, sym), translator_mods_);
+       translator_mods_ = gh_cons (scm_list_2 (tag, sym), translator_mods_ );
     }
   else if (ly_symbol2scm ("accepts") == tag
           || ly_symbol2scm ("denies") == tag)
-    accept_mods_ = scm_cons (scm_list_2 (tag, sym), accept_mods_); 
+    {
+      accept_mods_ = gh_cons (scm_list_2 (tag, sym), accept_mods_); 
+    }
   else if (ly_symbol2scm ("poppush") == tag
           || ly_symbol2scm ("pop") == tag
           || ly_symbol2scm ("push") == tag
           || ly_symbol2scm ("assign") == tag
           || ly_symbol2scm ("unset") == tag)
-    property_ops_ = scm_cons (mod, property_ops_);
+    {
+      property_ops_ = gh_cons (mod, property_ops_);
+    }
   else if (ly_symbol2scm ("alias") == tag)
-    context_aliases_ = scm_cons (sym, context_aliases_);
+    {
+      context_aliases_ = gh_cons (sym, context_aliases_);
+    }
   else if (ly_symbol2scm ("translator-type")  == tag)
-    translator_group_type_ = sym;
+    {
+      translator_group_type_ = sym;
+    }
   else if (ly_symbol2scm ("context-name")  == tag)
-    context_name_ = sym;
+    {
+      context_name_ = sym;
+    }
   else
-    programming_error ("Unknown context mod tag.");
+    {
+      programming_error ("Unknown context mod tag.");
+    }
 }
 
+
+
 SCM
 Context_def::get_context_name () const
 {
@@ -141,45 +158,51 @@ Context_def::get_context_name () const
 SCM
 Context_def::get_accepted (SCM user_mod) const
 {
-  SCM mods = scm_reverse_x (scm_list_copy (accept_mods_), user_mod);
+  SCM mods = scm_reverse_x (scm_list_copy (accept_mods_),
+                           user_mod);
   SCM acc = SCM_EOL;
-  for (SCM s = mods; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = mods; gh_pair_p (s); s = gh_cdr (s))
     {
-      SCM tag = ly_caar (s);
-      SCM sym = ly_cadar (s);
+      SCM tag = gh_caar (s);
+      SCM sym = gh_cadar (s);
       if (tag == ly_symbol2scm ("accepts"))
-       acc = scm_cons (sym, acc);
+       acc = gh_cons (sym, acc);
       else if (tag == ly_symbol2scm ("denies"))
        acc = scm_delete_x (sym, acc);
     }
   return acc;
 }
 
+          
 Link_array<Context_def>
-Context_def::path_to_acceptable_context (SCM type_sym, Output_def *odef) const
+Context_def::path_to_acceptable_context (SCM type_sym, Music_output_def* odef) const
 {
-  assert (ly_c_symbol_p (type_sym));
+  assert (gh_symbol_p (type_sym));
   
   SCM accepted = get_accepted (SCM_EOL);
 
   Link_array<Context_def> accepteds;
-  for (SCM s = accepted; ly_c_pair_p (s); s = ly_cdr (s))
-    if (Context_def *t = unsmob_context_def (find_context_def (odef,
-                                                              ly_car (s))))
+  for (SCM s = accepted; gh_pair_p (s); s = ly_cdr (s))
+    {
+      Context_def *t = unsmob_context_def (odef->find_context_def (ly_car (s)));
+      if (!t)
+       continue;
       accepteds.push (t);
+    }
 
   Link_array<Context_def> best_result;
   for (int i=0; i < accepteds.size (); i++)
     {
-      /* do not check aliases, because \context Staff should not
-        create RhythmicStaff. */
-      if (ly_c_equal_p (accepteds[i]->get_context_name (), type_sym))
+      /*
+       don't check aliases, because \context Staff should not create RhythmicStaff.
+      */
+      if (gh_equal_p (accepteds[i]->get_context_name (), type_sym))
        {
          best_result.push (accepteds[i]);
          return best_result;
        }
     }
-
+      
   int best_depth= INT_MAX;
   for (int i=0; i < accepteds.size (); i++)
     {
@@ -192,8 +215,10 @@ Context_def::path_to_acceptable_context (SCM type_sym, Output_def *odef) const
          result.insert (g,0);
          best_result = result;
 
-         /* this following line was added in 1.9.3, but hsould've been
-            there all along... Let's hope it doesn't cause nightmares.  */
+         /*
+           this following line was added in 1.9.3, but hsould've been
+           there all along... Let's hope it doesn't cause nightmares.
+          */
          best_depth = result.size ();
        }
     }
@@ -201,71 +226,78 @@ Context_def::path_to_acceptable_context (SCM type_sym, Output_def *odef) const
   return best_result;
 }
 
+IMPLEMENT_SMOBS (Context_def);
+IMPLEMENT_DEFAULT_EQUAL_P (Context_def);
+
+
 SCM
 Context_def::get_translator_names (SCM user_mod) const
 {
   SCM l1 = SCM_EOL;
   SCM l2 = SCM_EOL;
 
-  SCM mods = scm_reverse_x (scm_list_copy (translator_mods_), user_mod);
+  SCM mods = scm_reverse_x (scm_list_copy (translator_mods_),
+                           user_mod);
   
-  for (SCM s = mods; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = mods; gh_pair_p (s); s = gh_cdr (s))
     {
-      SCM tag = ly_caar (s);
-      SCM arg = ly_cadar (s);
+      SCM tag = gh_caar (s);
+      SCM arg = gh_cadar (s);
 
-      if (ly_c_string_p (arg))
+      if (gh_string_p (arg))
        arg = scm_string_to_symbol (arg);
       
       if (ly_symbol2scm ("consists") == tag)
-       l1 = scm_cons (arg, l1);
+       l1 = gh_cons (arg, l1);
       else if (ly_symbol2scm ("consists-end") == tag)
-       l2 = scm_cons (arg, l2);
+       l2 = gh_cons (arg, l2);
       else if (ly_symbol2scm ("remove") == tag)
        {
          l1 = scm_delete_x (arg, l1);
          l2 = scm_delete_x (arg, l2);
        }
     }
+
   return scm_append_x (scm_list_2 (l1, l2));
 }
 
+
 SCM
-filter_performers (SCM ell)
+filter_performers (SCM l)
 {
-  for (SCM *tail = &ell; ly_c_pair_p (*tail); tail = SCM_CDRLOC (*tail))
+  for (SCM *tail = &l; gh_pair_p (*tail); tail = SCM_CDRLOC (*tail))
     {
-      if (dynamic_cast<Performer*> (unsmob_translator (ly_car (*tail))))
+      if (dynamic_cast<Performer*> (unsmob_translator (gh_car (*tail))))
        {
-         *tail = ly_cdr (*tail);
-         if (!ly_c_pair_p (*tail))
+         *tail = gh_cdr (*tail);
+         if (!gh_pair_p (*tail))
            break ;
        }
     }
-  return ell;
+  return l;
 }
 
+
 SCM
-filter_engravers (SCM ell)
+filter_engravers (SCM l)
 {
-  SCM *tail = &ell;  
-  for (; ly_c_pair_p (*tail) ; tail = SCM_CDRLOC (*tail))
+  for (SCM *tail = &l; gh_pair_p (*tail) ; tail = SCM_CDRLOC (*tail))
     {
-      if (dynamic_cast<Engraver*> (unsmob_translator (ly_car (*tail))))
+      if (dynamic_cast<Engraver*> (unsmob_translator (gh_car (*tail))))
        {
-         *tail = ly_cdr (*tail);
-         if (!ly_c_pair_p (*tail))
+         *tail = gh_cdr (*tail);
+         if (!gh_pair_p (*tail))
            break ;
        }
     }
-  return ell;
+  return l;
 }
 
 
 Context *
 Context_def::instantiate (SCM ops)
 {
-  Context *tg =  0;
+  Context * tg =  0;
 
   if (context_name_ == ly_symbol2scm ("Score"))
     tg = new Score_context ();
@@ -276,26 +308,10 @@ Context_def::instantiate (SCM ops)
 
   SCM trans_names = get_translator_names (ops); 
 
-  Translator *g = get_translator (translator_group_type_);
+  Translator * g = get_translator (translator_group_type_);
   g = g->clone ();
   
-  g->simple_trans_list_ = SCM_EOL;
-
-  for (SCM s = trans_names; ly_c_pair_p (s) ; s = ly_cdr (s))
-    {
-      Translator *t = get_translator (ly_car (s));
-      if (!t)
-       warning (_f ("can't find: `%s'", s));
-      else
-       {
-         Translator *tr = t->clone ();
-         SCM str = tr->self_scm ();
-         g->simple_trans_list_ = scm_cons (str, g->simple_trans_list_);
-         tr->daddy_context_ = tg;
-         scm_gc_unprotect_object (str);
-       }
-    }
-  
+  g->simple_trans_list_ = names_to_translators (trans_names, tg);
   tg->implementation_ = g->self_scm ();
   if (dynamic_cast<Engraver*> (g))
     g->simple_trans_list_ = filter_performers (g->simple_trans_list_);
@@ -312,10 +328,12 @@ Context_def::instantiate (SCM ops)
   return tg;
 }
 
+
 SCM
 Context_def::clone_scm () const
 {
   Context_def * t = new Context_def (*this);
+
   SCM x = t->self_scm ();
   scm_gc_unprotect_object (x);
   return x;
@@ -325,7 +343,8 @@ SCM
 Context_def::make_scm ()
 {
   Context_def* t = new Context_def;
-  SCM x = t->self_scm ();
+
+  SCM x  =t->self_scm ();
   scm_gc_unprotect_object (x);
   return x;
 }
@@ -333,28 +352,25 @@ Context_def::make_scm ()
 void
 Context_def::apply_default_property_operations (Context *tg)
 {
-  apply_property_operations (tg, property_ops_);
+  apply_property_operations (tg , property_ops_);
 }
 
 SCM
 Context_def::to_alist () const
 {
-  SCM ell = SCM_EOL;
-
-  ell = scm_cons (scm_cons (ly_symbol2scm ("consists"),
-                           get_translator_names (SCM_EOL)), ell);
-  ell = scm_cons (scm_cons (ly_symbol2scm ("description"), description_), ell);
-  ell = scm_cons (scm_cons (ly_symbol2scm ("aliases"), context_aliases_), ell);
-  ell = scm_cons (scm_cons (ly_symbol2scm ("accepts"), get_accepted (SCM_EOL)),
-                 ell);
-  ell = scm_cons (scm_cons (ly_symbol2scm ("property-ops"), property_ops_),
-                 ell);
-  ell = scm_cons (scm_cons (ly_symbol2scm ("context-name"), context_name_),
-                 ell);
-
-  if (ly_c_symbol_p (translator_group_type_))
-    ell = scm_cons (scm_cons (ly_symbol2scm ("group-type"),
-                             translator_group_type_), ell);    
-  return ell;  
+  SCM l = SCM_EOL;
+
+  l = gh_cons (gh_cons (ly_symbol2scm ("consists"),
+                       get_translator_names (SCM_EOL)), l);
+  l = gh_cons (gh_cons (ly_symbol2scm ("description"),  description_), l);
+  l = gh_cons (gh_cons (ly_symbol2scm ("aliases"),  context_aliases_), l);
+  l = gh_cons (gh_cons (ly_symbol2scm ("accepts"),  get_accepted (SCM_EOL)), l);
+  l = gh_cons (gh_cons (ly_symbol2scm ("property-ops"),  property_ops_), l);
+  l = gh_cons (gh_cons (ly_symbol2scm ("context-name"),  context_name_), l);
+
+  if (gh_symbol_p (translator_group_type_))
+    l = gh_cons (gh_cons (ly_symbol2scm ("group-type"),  translator_group_type_), l);    
+
+  return l;  
 }
 
index cbedf5ea3c484825d47fa5ae34fd57cba3aa428e..c11c266162168f8a1045cf69ba0feb03ba862f3b 100644 (file)
@@ -19,7 +19,7 @@ LY_DEFINE (ly_context_id, "ly:context-id",
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
 
-  return scm_makfrom0str (tr->id_string (). to_str0 ());
+  return scm_makfrom0str (tr->id_string_. to_str0 ());
 }
 
 LY_DEFINE (ly_context_name, "ly:context-name",
@@ -30,7 +30,7 @@ LY_DEFINE (ly_context_name, "ly:context-name",
 {
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
-  return ly_symbol2scm (tr->context_name ().to_str0 ()); 
+  return unsmob_context_def (tr->definition_)->get_context_name (); 
 }
 
 LY_DEFINE (ly_context_pushpop_property, "ly:context-pushpop-property",
@@ -42,12 +42,12 @@ LY_DEFINE (ly_context_pushpop_property, "ly:context-pushpop-property",
 {
   Context *tg = unsmob_context (context);
   SCM_ASSERT_TYPE (tg, context, SCM_ARG1, __FUNCTION__, "context");
-  SCM_ASSERT_TYPE (ly_c_symbol_p (grob), grob, SCM_ARG2, __FUNCTION__, "symbol");
-  SCM_ASSERT_TYPE (ly_c_symbol_p (eltprop), eltprop, SCM_ARG3, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (gh_symbol_p (grob), grob, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (gh_symbol_p (eltprop), eltprop, SCM_ARG3, __FUNCTION__, "symbol");
 
   execute_pushpop_property (tg, grob, eltprop, val);
 
-  return SCM_UNSPECIFIED;
+  return SCM_UNDEFINED;
 }
 
 LY_DEFINE (ly_context_property, "ly:context-property",
@@ -57,7 +57,7 @@ LY_DEFINE (ly_context_property, "ly:context-property",
   Context *t = unsmob_context (c);
   Context * tr= (t);
   SCM_ASSERT_TYPE (tr, c, SCM_ARG1, __FUNCTION__, "Translator group");
-  SCM_ASSERT_TYPE (ly_c_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (gh_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
 
   return tr->internal_get_property (name);
 }
@@ -69,7 +69,7 @@ LY_DEFINE (ly_context_set_property, "ly:context-set-property!",
 {
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
-  SCM_ASSERT_TYPE (ly_c_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (gh_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
 
   tr->internal_set_property (name, val);
 
@@ -83,7 +83,7 @@ LY_DEFINE (ly_context_property_where_defined, "ly:context-property-where-defined
 {
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
-  SCM_ASSERT_TYPE (ly_c_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (gh_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
 
   tr = tr->where_defined (name);
   if (tr)
@@ -98,7 +98,7 @@ LY_DEFINE (ly_unset_context_property, "ly:context-unset-property", 2, 0, 0,
 {
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
-  SCM_ASSERT_TYPE (ly_c_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (gh_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
 
   tr->unset_property (name);
   return SCM_UNSPECIFIED;
@@ -111,7 +111,7 @@ LY_DEFINE (ly_context_parent, "ly:context-parent",
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
 
-  tr = tr->get_parent_context () ;
+  tr = tr->daddy_context_ ;
   if (tr)
     return tr->self_scm ();
   else
@@ -126,14 +126,28 @@ LY_DEFINE (ly_context_find, "ly:context-find",
 {
   Context *tr = unsmob_context (context);
   SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "context");
-  SCM_ASSERT_TYPE (ly_c_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (gh_symbol_p (name), name, SCM_ARG2, __FUNCTION__, "symbol");
   
   while (tr)
     {
       if (tr->is_alias (name))
        return tr->self_scm ();
-      tr =  tr->get_parent_context () ;
+      tr =  tr->daddy_context_ ;
     }
   
   return SCM_BOOL_F;
 }
+
+#if 0
+/*
+  What is this used for? Should remove? --hwn
+ */
+LY_DEFINE (ly_context_properties, "ly:context-properties",
+          1, 0, 0, (SCM context),
+          "Return all properties  of @var{context} in an alist.")
+{
+  Context *tr = unsmob_context (context);
+  SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context");
+  return tr->properties_as_alist ();
+}
+#endif
index fb5968b980bb97999d2cf9e2f42dd817abf27c4b..2f7445fd6760fa34bf96b8f65f93df2eab471d30 100644 (file)
@@ -25,7 +25,7 @@ Context_specced_music_iterator::construct_children ()
 
   String c_id;
   SCM ci = get_music ()->get_property ("context-id");
-  if (ly_c_string_p (ci))
+  if (gh_string_p (ci))
     c_id = ly_scm2string (ci);
   SCM ops = get_music ()->get_property ("property-operations");
   
index 3a4a875ec1f05cde55eaced15f517b577fdbd4db..d891aac163880ce72c92e3cef74edf9fa90be975 100644 (file)
@@ -11,7 +11,7 @@
 #include "context-def.hh"
 #include "context.hh"
 #include "warn.hh"
-#include "output-def.hh"
+#include "music-output-def.hh"
 #include "scm-hash.hh"
 #include "main.hh"
 #include "ly-smobs.icc"
@@ -28,7 +28,7 @@ Context::is_removable () const
 void
 Context::check_removal ()
 {
-  for (SCM p = context_list_; ly_c_pair_p (p); p = ly_cdr (p))
+  for (SCM p = context_list_; gh_pair_p (p); p = gh_cdr (p))
     {
       Context *trg =  unsmob_context (ly_car (p));
 
@@ -56,8 +56,8 @@ void
 Context::add_context (Context*t)
 {
   SCM ts = t->self_scm ();
-  context_list_ = ly_append2 (context_list_,
-                             scm_cons (ts, SCM_EOL));
+  context_list_ = gh_append2 (context_list_,
+                             gh_cons (ts, SCM_EOL));
   
   t->daddy_context_ = this;
   if (!t->init_)
@@ -95,6 +95,22 @@ Context::Context ()
   scm_gc_unprotect_object (properties_scm_);
 }
 
+Context *
+Context::find_context_below (SCM n, String id)
+{
+  if ((is_alias (n) && (id_string_ == id || id.is_empty ())))
+    return this;
+
+  Context* r = 0;
+  for (SCM p = context_list_; !r && gh_pair_p (p); p = ly_cdr (p))
+    {
+      Context *  t = unsmob_context (ly_car (p));
+      
+      r = dynamic_cast<Context*> (t)->find_context_below (n, id);
+    }
+
+  return r;
+}
 
 
 Context*
@@ -109,7 +125,7 @@ Context::find_create_context (SCM n, String id,
     return get_score_context ()->find_create_context (n, id, operations);
     
   
-  Context * existing = find_context_below (this, n,id);
+  Context * existing = find_context_below (n,id);
   if (existing)
     return existing;
 
@@ -173,10 +189,10 @@ Context::find_create_context (SCM n, String id,
   none.
 */
 SCM
-Context::default_child_context_name () const
+default_child_context_name (Context const *tg)
 {
-  return ly_c_pair_p (accepts_list_)
-    ? ly_car (scm_last_pair (accepts_list_))
+  return gh_pair_p (tg->accepts_list_)
+    ? ly_car (scm_last_pair (tg->accepts_list_))
     : SCM_EOL;
 }
 
@@ -184,7 +200,7 @@ Context::default_child_context_name () const
 bool
 Context::is_bottom_context () const
 {
-  return !ly_c_symbol_p (default_child_context_name ());
+  return !gh_symbol_p (default_child_context_name (this));
 }
 
 Context*
@@ -192,8 +208,8 @@ Context::get_default_interpreter ()
 {
   if (!is_bottom_context ())
     {
-      SCM nm = default_child_context_name ();
-      SCM st = find_context_def (get_output_def (), nm);
+      SCM nm = default_child_context_name (this);
+      SCM st = get_output_def ()->find_context_def (nm);
 
       Context_def *t = unsmob_context_def (st);
       if (!t)
@@ -245,7 +261,7 @@ bool
 Context::is_alias (SCM sym) const
 {
   if (sym == ly_symbol2scm ("Bottom")
-      && !ly_c_pair_p (accepts_list_))
+      && !gh_pair_p (accepts_list_))
     return true;
   if (sym == unsmob_context_def (definition_)->get_context_name ())
     return true;
@@ -299,19 +315,19 @@ Context::remove_context (Context*trans)
  */
 Context *
 find_context_below (Context * where,
-                   SCM type, String id)
+                   String type, String id)
 {
-  if (where->is_alias (type))
+  if (where->is_alias (ly_symbol2scm (type.to_str0 ())))
     {
-      if (id == "" || where->id_string () == id)
+      if (id == "" || where->id_string_ == id)
        return where;
     }
   
   Context * found = 0;
-  for (SCM s = where->children_contexts ();
-       !found && ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = where->context_list_;
+       !found && gh_pair_p (s); s = gh_cdr (s))
     {
-      Context * tr = unsmob_context (ly_car (s));
+      Context * tr = unsmob_context (gh_car (s));
 
       found = find_context_below (tr, type, id);
     }
@@ -344,7 +360,7 @@ Context::get_score_context () const
     return 0;
 }
 
-Output_def *
+Music_output_def *
 Context::get_output_def () const
 {
   return  (daddy_context_)
@@ -412,7 +428,7 @@ IMPLEMENT_TYPE_P (Context,"ly:context?");
 bool
 Context::try_music (Music* m)
 {
-  Translator*  t = implementation ();
+  Translator*  t = unsmob_translator (implementation_);
   if (!t)
     return false;
   
@@ -436,15 +452,3 @@ Context::get_global_context () const
   programming_error ("No Global context!");
   return 0;
 }
-
-Context*
-Context::get_parent_context () const
-{
-  return daddy_context_;
-}
-
-Translator_group*
-Context::implementation () const
-{
-  return dynamic_cast<Translator_group*> (unsmob_translator (implementation_));
-}
index 40b2941c07f64929aa3e9855be6a1bc258b06451..7b1a59da1d4dc44d393a61117bdebdd462c16da3 100644 (file)
@@ -51,6 +51,10 @@ Custos_engraver::stop_translation_timestep ()
   /*
     delay typeset until we're at the next moment, so we can silence custodes at the end of the piece.
    */
+  for (int i = custodes_.size (); i--;)
+    {
+      typeset_grob (custodes_[i]);
+    }
   pitches_.clear ();
 
   custos_permitted = false;
@@ -93,7 +97,7 @@ Custos_engraver::acknowledge_grob (Grob_info info)
 void
 Custos_engraver::process_acknowledged_grobs ()
 {
-  if (ly_c_string_p (get_property ("whichBar")))
+  if (gh_string_p (get_property ("whichBar")))
     custos_permitted = true;
   
   if (custos_permitted)
@@ -104,12 +108,12 @@ Custos_engraver::process_acknowledged_grobs ()
 
          int p = pitches_[i].steps ();
          SCM c0 = get_property ("middleCPosition");
-         if (ly_c_number_p (c0))
-           p += ly_scm2int (c0);
+         if (gh_number_p (c0))
+           p += gh_scm2int (c0);
 
          
          c->set_property ("staff-position",
-                               scm_int2num (p));
+                               gh_int2scm (p));
          
        }
 
@@ -120,9 +124,9 @@ Custos_engraver::process_acknowledged_grobs ()
 Item* 
 Custos_engraver::create_custos ()
 {
-  Item* custos = make_item ("Custos", SCM_EOL);
-  
+  Item* custos = make_item ("Custos");
   
+  announce_grob (custos, SCM_EOL);
   custodes_.push (custos);
   
   return custos;
@@ -134,6 +138,7 @@ Custos_engraver::finalize ()
   for (int i = custodes_.size (); i--;)
     {
       custodes_[i]->suicide ();
+      typeset_grob (custodes_[i]);
     }
   custodes_.clear ();
 }
index 45f83c64dc90266ff8cd64d0c39d27f9d744972a..db442a3dee226963ca02dbc913208085d202c8cc 100644 (file)
@@ -34,7 +34,7 @@ Custos::print (SCM smob)
 
   SCM scm_style = me->get_property ("style");
   String style;
-  if (ly_c_symbol_p (scm_style))
+  if (gh_symbol_p (scm_style))
     {
       style = ly_symbol2string (scm_style);
     }
index b45012c3bec2507e35b11c0015d954d5c5625e49..19fb77b0f687fe340a40092d9e13148854be0d9d 100644 (file)
@@ -23,6 +23,6 @@ get_grob_direction (Grob*me)
 void
 set_grob_direction (Grob*me, Direction d) 
 {
-  SCM sd = scm_int2num (d);
+  SCM sd = gh_int2scm (d);
   me->set_property ("direction", sd);
 }
index 141f2cfec63e01ea890945e5fa86469026548616..8ee88506141568720460658042e10f4067281003 100644 (file)
@@ -37,15 +37,20 @@ Dot_column_engraver::Dot_column_engraver ()
 void
 Dot_column_engraver::stop_translation_timestep ()
 {
+  if (dotcol_)
+    {
+
       /*
        Add the stem to the support so dots stay clear of flags.
 
        See [Ross, p 171]
        */
-      if (stem_ && dotcol_)
+      if (stem_)
        dotcol_->set_property ("stem", stem_->self_scm ());
       
+      typeset_grob (dotcol_);
       dotcol_ =0;
+    }
   heads_.clear ();
   stem_ =0;
 }
@@ -58,8 +63,8 @@ Dot_column_engraver::acknowledge_grob (Grob_info info)
     {
       if (!dotcol_)
        {
-         dotcol_ = make_item ("DotColumn", SCM_EOL);
-         
+         dotcol_ = make_item ("DotColumn");
+         announce_grob (dotcol_, SCM_EOL);
        }
 
       Dot_column::add_head (dotcol_, info.grob_);
index 1a7f3cc601222ed66839b0c69b58cc65c05a0cc4..2d49465eb9b4df0cd9cad142fded8fd6cc1b1dff 100644 (file)
@@ -29,7 +29,7 @@ SCM
 Dot_column::force_shift_callback (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) gh_scm2int (axis);
   assert (a == Y_AXIS);
   me = me->get_parent (X_AXIS);
 
@@ -39,7 +39,7 @@ Dot_column::force_shift_callback (SCM element_smob, SCM axis)
   
       do_shifts (me);
     }
-  return scm_make_real (0.0);
+  return gh_double2scm (0.0);
 }
 
 MAKE_SCHEME_CALLBACK (Dot_column,side_position, 2);
@@ -47,7 +47,7 @@ SCM
 Dot_column::side_position (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) gh_scm2int (axis);
   assert (a == X_AXIS);
 
   Grob * stem = unsmob_grob (me->get_property ("stem"));
@@ -255,7 +255,7 @@ Dot_column::do_shifts (Grob*me)
   
   dots.sort (compare_position);
   for (int i = dots.size (); i--;)
-    if (!dots[i]->is_live ())
+    if (!dots[i]->live ())
       dots.del (i);
   
   Dot_configuration cfg;
index c93a6f8c67c0a9e6640d8f80e79fee6da7906781..8fcd15e8ed6bf0eabbbff18a7b9685e10e052df5 100644 (file)
@@ -9,7 +9,7 @@
 #include "dots.hh"
 #include "item.hh"
 #include "stencil.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "font-interface.hh"
 #include "lookup.hh"
 #include "staff-symbol-referencer.hh"
@@ -24,7 +24,7 @@ Dots::print (SCM d)
   
   SCM c = sc->get_property ("dot-count");
 
-  if (ly_c_number_p (c))
+  if (gh_number_p (c))
     {
       Stencil d = Font_interface::get_default_font (sc)->find_by_name (String ("dots-dot"));
       Real dw = d.extent (X_AXIS).length ();
@@ -40,7 +40,7 @@ Dots::print (SCM d)
       mol = Lookup::blank (Box (Interval (0,0),
                                Interval (0,0)));
   
-      for (int i = ly_scm2int (c); i--;)
+      for (int i = gh_scm2int (c); i--;)
        {
          d.translate_axis (2*dw,X_AXIS);
          mol.add_at_edge (X_AXIS, RIGHT, d, dw, 0);
index a668d3408b884f8fe4078f364e4c8f512e5c117c..fd0464e687291a04c542f5cb88259a093b9a701f 100644 (file)
@@ -62,24 +62,24 @@ Drum_notes_engraver::process_music ()
       if (!tab)
        tab = get_property ("drumStyleTable");
       
+      Item *note = make_item ("NoteHead");
       Music * ev = events_[i];
-      Item *note = make_item ("NoteHead", ev->self_scm ());
       
       Duration dur = *unsmob_duration (ev->get_property ("duration"));
 
-      note->set_property ("duration-log", scm_int2num (dur.duration_log ()));
+      note->set_property ("duration-log", gh_int2scm (dur.duration_log ()));
 
       if (dur.dot_count ())
        {
-         Item * d = make_item ("Dots", ev->self_scm ());
+         Item * d = make_item ("Dots");
          Rhythmic_head::set_dots (note, d);
          
          if (dur.dot_count ()
              != robust_scm2int (d->get_property ("dot-count"), 0))
-           d->set_property ("dot-count", scm_int2num (dur.dot_count ()));
+           d->set_property ("dot-count", gh_int2scm (dur.dot_count ()));
 
          d->set_parent (note, Y_AXIS);
-         
+         announce_grob (d, SCM_EOL);
          dots_.push (d);
        }
 
@@ -90,28 +90,29 @@ Drum_notes_engraver::process_music ()
       if (scm_hash_table_p (tab) == SCM_BOOL_T)
        defn = scm_hashq_ref (tab, drum_type, SCM_EOL);
       
-      if (ly_c_pair_p (defn))
+      if (gh_pair_p (defn))
        {
-         SCM pos = ly_caddr (defn);
-         SCM style =ly_car (defn);
-         SCM script = ly_cadr (defn);
+         SCM pos = gh_caddr (defn);
+         SCM style =gh_car (defn);
+         SCM script = gh_cadr (defn);
          
          if (scm_integer_p (pos) == SCM_BOOL_T)
            note->set_property ("staff-position", pos);
-         if (ly_c_symbol_p (style))
+         if (gh_symbol_p (style))
            note->set_property ("style", style);
 
-         if (ly_c_string_p (script))
+         if (gh_string_p (script))
            {
-             Item *p  = make_item ("Script", ev->self_scm ());
+             Item *p  = make_item ("Script");
              SCM desc  = SCM_EOL;
              make_script_from_event (p, &desc,
-                                     context (), script,
+                                     daddy_context_, script,
                                      0);
 
              if (p->get_property ("follow-into-staff"))
                p->set_property ("staff-padding", SCM_EOL);
              
+             announce_grob (p, ev->self_scm ());
 
              p->set_parent (note, Y_AXIS);
              Side_position_interface::add_support (p, note); 
@@ -119,6 +120,9 @@ Drum_notes_engraver::process_music ()
            }
        }
 
+
+      
+      announce_grob (note,ev->self_scm ());
       notes_.push (note);
     }
 }
@@ -162,8 +166,20 @@ Drum_notes_engraver::acknowledge_grob (Grob_info inf)
 void
 Drum_notes_engraver::stop_translation_timestep ()
 {
+  for (int i=0; i < notes_.size (); i++)
+    {
+      typeset_grob (notes_[i]);
+    }
   notes_.clear ();
+  for (int i=0; i < dots_.size (); i++)
+    {
+      typeset_grob (dots_[i]);
+    }
   dots_.clear ();
+  for (int i=0; i < scripts_.size (); i++)
+    {
+      typeset_grob (scripts_[i]);
+    }
   scripts_.clear ();
   
   events_.clear ();
index 03ff0bf48d2faf9524d77383de4657ebd5cec835..e5888fcfbcfef34e1e65f464949c0d610518b7b5 100644 (file)
@@ -39,7 +39,7 @@ Drum_note_performer::create_audio_elements ()
       SCM sym = n->get_property ("drum-type");
       SCM defn = SCM_EOL;
 
-      if (ly_c_symbol_p (sym)
+      if (gh_symbol_p (sym)
          &&  (scm_hash_table_p (tab) == SCM_BOOL_T))
        defn = scm_hashq_ref (tab, sym, SCM_EOL);
       
index 82f5a506c29b4258a69b2fac5a4af898ad4adfdb..39fe26ca397f482c892fe694bf621e200d422be6 100644 (file)
@@ -128,7 +128,7 @@ Duration::less_p (SCM p1, SCM p2)
     return SCM_BOOL_F;
 }
 
-LY_DEFINE (ly_duration_less_p, "ly:duration<?",
+LY_DEFINE (duration_less, "ly:duration<?",
           2, 0, 0, (SCM p1, SCM p2),
          "Is @var{p1} shorter than @var{p2}?")
 {
@@ -144,7 +144,7 @@ LY_DEFINE (ly_duration_less_p, "ly:duration<?",
     return SCM_BOOL_F;
 }
 
-LY_DEFINE (ly_make_duration, "ly:make-duration",
+LY_DEFINE (make_duration, "ly:make-duration",
           1, 3, 0, (SCM length, SCM dotcount, SCM num, SCM den),
           "@var{length} is the negative logarithm (base 2) of the duration:\n"
           "1 is a half note, 2 is a quarter note, 3 is an eighth\n"
@@ -166,65 +166,66 @@ LY_DEFINE (ly_make_duration, "ly:make-duration",
     {
       SCM_ASSERT_TYPE (scm_integer_p (dotcount) == SCM_BOOL_T,
                       dotcount, SCM_ARG2, __FUNCTION__, "integer");
-      dots = ly_scm2int (dotcount);
+      dots = gh_scm2int (dotcount);
     }
 
   bool compress = false;
   if (num != SCM_UNDEFINED)
     {
-      SCM_ASSERT_TYPE (ly_c_number_p (num), length, SCM_ARG3, __FUNCTION__, "integer");
+      SCM_ASSERT_TYPE (gh_number_p (num), length, SCM_ARG3, __FUNCTION__, "integer");
       compress = true;
     }
   else
-    num = scm_int2num (1);
+    num = gh_int2scm (1);
 
   if (den != SCM_UNDEFINED)
     {
-      SCM_ASSERT_TYPE (ly_c_number_p (den), length, SCM_ARG4, __FUNCTION__, "integer");
+      SCM_ASSERT_TYPE (gh_number_p (den), length, SCM_ARG4, __FUNCTION__, "integer");
       compress = true;
     }
   else
-    den = scm_int2num (1);
+    den = gh_int2scm (1);
 
-  Duration p (ly_scm2int (length), dots);
+  Duration p (gh_scm2int (length), dots);
   if (compress)
-    p = p.compressed (Rational (ly_scm2int (num), ly_scm2int (den)));
+    p = p.compressed (Rational (gh_scm2int (num), gh_scm2int (den)));
 
   return p.smobbed_copy ();
 }
 
-LY_DEFINE (ly_duration_log, "ly:duration-log",
+LY_DEFINE (duration_log, "ly:duration-log",
           1, 0, 0, (SCM dur),
          "Extract the duration log from @var{dur}")
 {
   SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration");
-  return scm_int2num (unsmob_duration (dur)->duration_log ());
+  return gh_int2scm (unsmob_duration (dur)->duration_log ());
 }
 
-LY_DEFINE (ly_duration_dot_count, "ly:duration-dot-count",
-          1, 0, 0, (SCM dur),
-         "Extract the dot count from @var{dur}")
+LY_DEFINE (dot_count_log, "ly:duration-dot-count", 1, 0, 0, (SCM dur),
+         "Extract the dot count from @var{dur}"
+)
 {
   SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration");
-  return scm_int2num (unsmob_duration (dur)->dot_count ());
+  return gh_int2scm (unsmob_duration (dur)->dot_count ());
 }
 
+
 LY_DEFINE (ly_intlog2, "ly:intlog2",
           1, 0, 0, (SCM d),
          "The 2-logarithm of 1/@var{d}.")
 {
-  SCM_ASSERT_TYPE (ly_c_number_p (d), d, SCM_ARG1, __FUNCTION__, "integer");
-  int log = intlog2 (ly_scm2int (d));
-  return scm_int2num (log);
+  SCM_ASSERT_TYPE (gh_number_p (d), d, SCM_ARG1, __FUNCTION__, "integer");
+  int log = intlog2 (gh_scm2int (d));
+  return gh_int2scm (log);
 }
 
-LY_DEFINE (ly_duration_factor, "ly:duration-factor",
+LY_DEFINE (compression_factor, "ly:duration-factor",
           1, 0, 0, (SCM dur),
          "Extract the compression factor from @var{dur}. Return as a pair.")
 {
   SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration");
   Rational r = unsmob_duration (dur)->factor ();
-  return scm_cons (scm_int2num (r.num ()), scm_int2num (r.den ()));
+  return gh_cons (gh_int2scm (r.num ()), gh_int2scm (r.den ()));
 }
 
 int
index 8b476249312a452717e9a73b17f8a25d7a2f386f..9ea571da32e643b017e95d89693267469ff2f2fd 100644 (file)
@@ -114,11 +114,12 @@ Dynamic_engraver::process_music ()
     {
       if (!line_spanner_)
        {
-         Music * rq = accepted_spanreqs_drul_[START];
-         line_spanner_ = make_spanner ("DynamicLineSpanner", rq ? rq->self_scm (): SCM_EOL );
+         line_spanner_ = make_spanner ("DynamicLineSpanner");
 
+         Music * rq = accepted_spanreqs_drul_[START];
          if (script_ev_)
-           rq =  script_ev_;
+           rq =  script_ev_ ;
+         announce_grob (line_spanner_, rq ? rq->self_scm (): SCM_EOL);
        }
     }
   
@@ -139,7 +140,7 @@ Dynamic_engraver::process_music ()
   */
   if (script_ev_)
     {
-      script_ = make_item ("DynamicText", script_ev_->self_scm ());
+      script_ = make_item ("DynamicText");
       script_->set_property ("text",
                                   script_ev_->get_property ("text"));
 
@@ -149,6 +150,7 @@ Dynamic_engraver::process_music ()
 
       Axis_group_interface::add_element (line_spanner_, script_);
 
+      announce_grob (script_, script_ev_->self_scm ());
     }
 
   Music *stop_ev = accepted_spanreqs_drul_ [STOP] ?
@@ -218,11 +220,11 @@ Dynamic_engraver::process_music ()
            start_type = "crescendo";
          
          SCM s = get_property ((start_type + "Spanner").to_str0 ());
-         if (!ly_c_symbol_p (s) || s == ly_symbol2scm ("hairpin"))
+         if (!gh_symbol_p (s) || s == ly_symbol2scm ("hairpin"))
            {
-             cresc_  = make_spanner ("Hairpin", accepted_spanreqs_drul_[START]->self_scm ());
+             cresc_  = make_spanner ("Hairpin");
              cresc_->set_property ("grow-direction",
-                                          scm_int2num ((start_type == "crescendo")
+                                          gh_int2scm ((start_type == "crescendo")
                                                       ? BIGGER : SMALLER));
              
            }
@@ -235,19 +237,19 @@ Dynamic_engraver::process_music ()
          */
          else
            {
-             cresc_  = make_spanner ("TextSpanner", accepted_spanreqs_drul_[START]->self_scm ());
+             cresc_  = make_spanner ("TextSpanner");
              cresc_->set_property ("style", s);
-             context ()->set_property ((start_type
+             daddy_context_->set_property ((start_type
                                            + "Spanner").to_str0 (), SCM_EOL);
              s = get_property ((start_type + "Text").to_str0 ());
              /*
                FIXME: use get_markup () to check type.
              */
-             if (ly_c_string_p (s) || ly_c_pair_p (s))
+             if (gh_string_p (s) || gh_pair_p (s))
                {
                  cresc_->set_property ("edge-text",
-                                            scm_cons (s, scm_makfrom0str ("")));
-                 context ()->set_property ((start_type + "Text").to_str0 (),
+                                            gh_cons (s, scm_makfrom0str ("")));
+                 daddy_context_->set_property ((start_type + "Text").to_str0 (),
                                                SCM_EOL);
                }
            }
@@ -260,6 +262,7 @@ Dynamic_engraver::process_music ()
 
          add_bound_item (line_spanner_, cresc_->get_bound (LEFT));
          
+         announce_grob (cresc_, accepted_spanreqs_drul_[START]->self_scm ());
        }
     }
 }
@@ -286,7 +289,7 @@ Dynamic_engraver::finalize ()
   typeset_all ();
   
   if (line_spanner_
-      && !line_spanner_->is_live ())
+      && !line_spanner_->live ())
     line_spanner_ = 0;
   if (line_spanner_)
     {
@@ -295,7 +298,7 @@ Dynamic_engraver::finalize ()
     }
 
   if (cresc_
-      && !cresc_->is_live ())
+      && !cresc_->live ())
     cresc_ = 0;
   if (cresc_)
     {
@@ -315,10 +318,10 @@ Dynamic_engraver::typeset_all ()
     Maybe just check at typeset_grob ()?
   */
   if (finished_cresc_
-      && !finished_cresc_->is_live ())
+      && !finished_cresc_->live ())
     finished_cresc_ = 0;
   if (finished_line_spanner_
-      && !finished_line_spanner_->is_live ())
+      && !finished_line_spanner_->live ())
     finished_line_spanner_ = 0;
 
   if (finished_cresc_)
@@ -333,10 +336,15 @@ Dynamic_engraver::typeset_all ()
            add_bound_item (finished_line_spanner_,
                            finished_cresc_->get_bound (RIGHT));
        }
+      typeset_grob (finished_cresc_);
       finished_cresc_ =0;
     }
   
+  if (script_)
+    {
+      typeset_grob (script_);
       script_ = 0;
+    }
   if (finished_line_spanner_)
     {
       /*
@@ -368,6 +376,7 @@ Dynamic_engraver::typeset_all ()
          finished_line_spanner_->set_bound (LEFT, ci);   
        }
        
+      typeset_grob (finished_line_spanner_);
       finished_line_spanner_ = 0;
     }
 }
@@ -382,7 +391,7 @@ Dynamic_engraver::acknowledge_grob (Grob_info i)
     {
       if (line_spanner_
          /* Don't refill killed spanner */
-         && line_spanner_->is_live ())
+         && line_spanner_->live ())
        {
          Side_position_interface::add_support (line_spanner_,i.grob_);
          add_bound_item (line_spanner_,dynamic_cast<Item*> (i.grob_));
@@ -391,8 +400,8 @@ Dynamic_engraver::acknowledge_grob (Grob_info i)
       if (script_ && !script_->get_parent (X_AXIS))
        {
          SCM head = scm_last_pair (i.grob_->get_property ("note-heads"));
-         if (ly_c_pair_p (head))
-           script_->set_parent (unsmob_grob (ly_car (head)),  X_AXIS);
+         if (gh_pair_p (head))
+           script_->set_parent (unsmob_grob (gh_car (head)),  X_AXIS);
        }
       
     }
@@ -405,8 +414,8 @@ Dynamic_engraver::acknowledge_grob (Grob_info i)
 
        DynamicText doesn't really have a script-priority field.
        */
-      if (ly_c_number_p (p)
-         && ly_scm2int (p) < ly_scm2int (script_->get_property ("script-priority")))
+      if (gh_number_p (p)
+         && gh_scm2int (p) < gh_scm2int (script_->get_property ("script-priority")))
        {
          Side_position_interface::add_support (line_spanner_, i.grob_);
 
index 257708de292fabf63f9b4b7b9eb8a16a5f1b56fb..97641a729769059d72083958339cff5725d1a8f7 100644 (file)
@@ -46,10 +46,10 @@ Dynamic_performer::create_audio_elements ()
       SCM proc = get_property ("dynamicAbsoluteVolumeFunction");
 
       SCM svolume  = SCM_EOL;
-      if (ly_c_procedure_p (proc))
+      if (gh_procedure_p (proc))
        {
          // urg
-         svolume = scm_call_1 (proc, script_req_->get_property ("text"));
+         svolume = gh_call1 (proc, script_req_->get_property ("text"));
        }
 
       Real volume = robust_scm2double (svolume, 0.5); 
@@ -59,13 +59,13 @@ Dynamic_performer::create_audio_elements ()
        */
       SCM min = get_property ("midiMinimumVolume");
       SCM max = get_property ("midiMaximumVolume");
-      if (ly_c_number_p (min) || ly_c_number_p (max))
+      if (gh_number_p (min) || gh_number_p (max))
        {
          Interval iv (0, 1);
-         if (ly_c_number_p (min))
-           iv[MIN] = ly_scm2double (min);
-         if (ly_c_number_p (max))
-           iv[MAX] = ly_scm2double (max);
+         if (gh_number_p (min))
+           iv[MIN] = gh_scm2double (min);
+         if (gh_number_p (max))
+           iv[MAX] = gh_scm2double (max);
          volume = iv[MIN] + iv.length () * volume;
        }
       else
@@ -75,17 +75,17 @@ Dynamic_performer::create_audio_elements ()
          */
          SCM s = get_property ("midiInstrument");
          
-         if (!ly_c_string_p (s))
+         if (!gh_string_p (s))
            s = get_property ("instrument");
          
-         if (!ly_c_string_p (s))
+         if (!gh_string_p (s))
            s = scm_makfrom0str ("piano");
          
          
          SCM eq = get_property ("instrumentEqualizer");
-         if (ly_c_procedure_p (eq))
+         if (gh_procedure_p (eq))
            {
-             s = scm_call_1 (eq, s);
+             s = gh_call1 (eq, s);
            }
 
          if (is_number_pair (s))
index 0820f3c73ebe27ea9d0b002ab04df71fd9c55e57..58cd338d1f216213acf44ef2277beb866a7dea15 100644 (file)
@@ -44,7 +44,7 @@ Engraver_group_engraver::acknowledge_grobs ()
       
       SCM meta = info.grob_->internal_get_property (meta_sym);
       SCM nm = scm_assoc (name_sym, meta);
-      if (ly_c_pair_p (nm))
+      if (gh_pair_p (nm))
        nm = ly_cdr (nm);
       else
        {
@@ -63,11 +63,11 @@ Engraver_group_engraver::acknowledge_grobs ()
       SCM acklist = scm_hashq_ref (tab, nm, SCM_UNDEFINED);
       if (acklist == SCM_BOOL_F)
        {
-         acklist = find_acknowledge_engravers (scm_cons (self_scm (), get_simple_trans_list ()), meta);
+         acklist = find_acknowledge_engravers (gh_cons (self_scm (), get_simple_trans_list ()), meta);
          scm_hashq_set_x (tab, nm, acklist);
        }
 
-      for (SCM p = acklist; ly_c_pair_p (p); p = ly_cdr (p))
+      for (SCM p = acklist; gh_pair_p (p); p = ly_cdr (p))
        {
          Translator * t = unsmob_translator (ly_car (p));
          Engraver * eng = dynamic_cast<Engraver*> (t);
@@ -100,8 +100,8 @@ Engraver_group_engraver::do_announces ()
 void
 Engraver_group_engraver::initialize ()
 {
-  SCM tab = scm_make_vector (scm_int2num (61), SCM_BOOL_F);
-  context ()->set_property ("acknowledgeHashTable", tab);
+  SCM tab = scm_make_vector (gh_int2scm (61), SCM_BOOL_F);
+  daddy_context_->set_property ("acknowledgeHashTable", tab);
 
   Translator_group::initialize ();
 }
@@ -125,8 +125,8 @@ bool
 engraver_valid (Translator*tr, SCM ifaces)
 {
   SCM ack_ifs = scm_assoc (ly_symbol2scm ("interfaces-acked"), tr->translator_description ());
-  ack_ifs = ly_cdr (ack_ifs);
-  for (SCM s = ifaces; ly_c_pair_p (s); s = ly_cdr (s))
+  ack_ifs = gh_cdr (ack_ifs);
+  for (SCM s = ifaces; ly_pair_p (s); s = ly_cdr (s))
     if (scm_c_memq (ly_car (s), ack_ifs) != SCM_BOOL_F)
       return true;
   return false;
@@ -137,10 +137,10 @@ engraver_valid (Translator*tr, SCM ifaces)
 SCM
 find_acknowledge_engravers (SCM gravlist, SCM meta_alist)
 {
-  SCM ifaces = ly_cdr (scm_assoc (ly_symbol2scm ("interfaces"), meta_alist));
+  SCM ifaces = gh_cdr (scm_assoc (ly_symbol2scm ("interfaces"), meta_alist));
 
   SCM l = SCM_EOL;
-  for (SCM s = gravlist; ly_c_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = gravlist; ly_pair_p (s);  s = ly_cdr (s))
     {
       Translator* tr = unsmob_translator (ly_car (s));
       if (engraver_valid (tr, ifaces))
@@ -157,7 +157,7 @@ void
 recurse_down_engravers (Context * c, Engraver_method ptr, bool context_first)
 {
   Engraver_group_engraver * tg
-    = dynamic_cast<Engraver_group_engraver*> (c->implementation ());
+    = dynamic_cast<Engraver_group_engraver*> (unsmob_translator (c->implementation_));
 
 
   if (!context_first)
@@ -168,10 +168,10 @@ recurse_down_engravers (Context * c, Engraver_method ptr, bool context_first)
       (tg->*ptr) ();
     }
 
-  for (SCM s = c->children_contexts () ; ly_c_pair_p (s);
-       s =ly_cdr (s))
+  for (SCM s = c->context_list_ ; gh_pair_p (s);
+       s =gh_cdr (s))
     {
-      recurse_down_engravers (unsmob_context (ly_car (s)), ptr, context_first);
+      recurse_down_engravers (unsmob_context (gh_car (s)), ptr, context_first);
     }
 
   if (context_first)
@@ -186,7 +186,7 @@ recurse_down_engravers (Context * c, Engraver_method ptr, bool context_first)
 void
 engraver_each (SCM list, Engraver_method method)
 {
-  for (SCM p = list; ly_c_pair_p (p); p = ly_cdr (p))
+  for (SCM p = list; gh_pair_p (p); p = ly_cdr (p))
     {
       Engraver * e = dynamic_cast<Engraver*>(unsmob_translator (ly_car (p)));
       if (e)
index 5f83295e18e8135c77b7bb95540b6b080ff70e3f..4119670e7a7948b6045fa79600cbf9228b499508 100644 (file)
@@ -52,6 +52,14 @@ Engraver::announce_grob (Grob* e, SCM cause)
 
 
  
+void
+Engraver::typeset_grob (Grob*p)
+{
+  Engraver *dad = get_daddy_engraver ();
+  if (dad)
+    dad->typeset_grob (p);
+}
+
 
 
 Engraver::Engraver ()
@@ -62,7 +70,8 @@ Engraver::Engraver ()
 Score_engraver* 
 Engraver::get_score_engraver () const
 {
-  return dynamic_cast<Score_engraver*> (get_score_context ()->implementation ());
+  SCM t = get_score_context ()->implementation_;
+  return dynamic_cast<Score_engraver*> (unsmob_translator (t));
 }
 
 
index e588574020e06e93b310ebc702f2aa92f5d91ce0..08bb8fff89f641b1072c7873cb6099fd1f15ca00 100644 (file)
@@ -47,7 +47,7 @@ Event_chord_iterator::process (Moment m)
   if (last_processed_mom_ < Moment (0))
     {
       for (SCM s = dynamic_cast<Music_sequence *> (get_music ())->music_list ();
-          ly_c_pair_p (s);  s = ly_cdr (s))
+          gh_pair_p (s);  s = ly_cdr (s))
        {
          Music *mus = unsmob_music (ly_car (s));
 
index 1c1112379bf68a5dd2a8fd478fe6965351e85997..baa5ad15c91bc6ff13310ea057dda04f2d9a9f0a 100644 (file)
@@ -63,10 +63,10 @@ Event::to_relative_octave (Pitch last)
       new_pit = new_pit.to_relative_octave (last);
 
       SCM check = get_property ("absolute-octave");
-      if (ly_c_number_p (check) &&
-         new_pit.get_octave () != ly_scm2int (check))
+      if (gh_number_p (check) &&
+         new_pit.get_octave () != gh_scm2int (check))
        {
-         Pitch expected_pit (ly_scm2int (check),
+         Pitch expected_pit (gh_scm2int (check),
                              new_pit.get_notename (),
                              new_pit.get_alteration ());
          origin ()->warning (_f ("octave check failed; expected %s, found: %s",
@@ -142,32 +142,32 @@ LY_DEFINE (ly_transpose_key_alist, "ly:transpose-key-alist",
   SCM newlist = SCM_EOL;
   Pitch *p = unsmob_pitch (pit);
   
-  for (SCM s = l; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = l; gh_pair_p (s); s = ly_cdr (s))
     {
       SCM key = ly_caar (s);
       SCM alter = ly_cdar (s);
-      if (ly_c_pair_p (key))
+      if (gh_pair_p (key))
        {
-         Pitch orig (ly_scm2int (ly_car (key)),
-                     ly_scm2int (ly_cdr (key)),
-                     ly_scm2int (alter));
+         Pitch orig (gh_scm2int (ly_car (key)),
+                     gh_scm2int (ly_cdr (key)),
+                     gh_scm2int (alter));
 
          orig =orig.transposed (*p);
 
-         SCM key = scm_cons (scm_int2num (orig.get_octave ()),
+         SCM key = gh_cons (scm_int2num (orig.get_octave ()),
                             scm_int2num (orig.get_notename ()));
 
-         newlist = scm_cons (scm_cons (key, scm_int2num (orig.get_alteration ())),
+         newlist = gh_cons (gh_cons (key, scm_int2num (orig.get_alteration ())),
                             newlist);
        }
-      else if (ly_c_number_p (key))
+      else if (gh_number_p (key))
        {
-         Pitch orig (0, ly_scm2int (key), ly_scm2int (alter));
+         Pitch orig (0, gh_scm2int (key), gh_scm2int (alter));
          orig = orig.transposed (*p);
 
          key =scm_int2num (orig.get_notename ());
          alter = scm_int2num (orig.get_alteration ());
-         newlist = scm_cons (scm_cons (key, alter), newlist);
+         newlist = gh_cons (gh_cons (key, alter), newlist);
        }
     }
   return scm_reverse_x (newlist, SCM_EOL);
@@ -188,14 +188,14 @@ bool
 alist_equal_p (SCM a, SCM b)
 {
   for (SCM s = a;
-       ly_c_pair_p (s); s = ly_cdr (s))
+       gh_pair_p (s); s = ly_cdr (s))
     {
       SCM key = ly_caar (s);
       SCM val = ly_cdar (s);
       SCM l = scm_assoc (key, b);
 
       if (l == SCM_BOOL_F
-         || !ly_c_equal_p ( ly_cdr (l), val))
+         || !gh_equal_p ( ly_cdr (l), val))
 
        return false;
     }
index f2f9d6761411002a89e47b853e55c9fe9c9b4843..e65bc5d5bdf8de12d9de57cba5f1a0b314b754e1 100644 (file)
@@ -59,7 +59,8 @@ Extender_engraver::process_music ()
 {
   if (ev_)
     {
-      extender_ = make_spanner ("LyricExtender", ev_->self_scm ());
+      extender_ = make_spanner ("LyricExtender");
+      announce_grob (extender_, ev_->self_scm ());
     }
 }
 
@@ -85,12 +86,13 @@ Extender_engraver::stop_translation_timestep ()
 {
   if (pending_extender_ && pending_extender_->get_bound (RIGHT))
     {
+      typeset_grob (pending_extender_);
       pending_extender_ = 0;
     }
 
   if (extender_ || pending_extender_)
     {
-      Context *voice = get_voice_to_lyrics (context ());
+      Context *voice = get_voice_to_lyrics (daddy_context_);
       Grob* h =  (voice) ? get_current_note_head (voice) : 0;
 
       if (h)
@@ -119,9 +121,9 @@ completize_extender (Spanner* sp)
   if (!sp->get_bound (RIGHT))
     {
       SCM heads = sp->get_property ("heads");
-      if (ly_c_pair_p (heads))
+      if (gh_pair_p (heads))
        {
-         Item* it = dynamic_cast<Item*> (unsmob_grob (ly_car (heads)));
+         Item* it = dynamic_cast<Item*> (unsmob_grob (gh_car (heads)));
          if (it)
            sp->set_bound (RIGHT, it);
        }
@@ -139,6 +141,7 @@ Extender_engraver::finalize ()
 
       if (!extender_->get_bound (RIGHT))
        extender_->warning (_ ("unterminated extender"));
+      typeset_grob (extender_);
       extender_ = 0;
     }
 
@@ -148,6 +151,7 @@ Extender_engraver::finalize ()
 
       if (!pending_extender_->get_bound (RIGHT))
          pending_extender_->warning (_("unterminated extender"));
+      typeset_grob (pending_extender_);
       pending_extender_ =0;
     }
 }
index 2368748c2a41e30fc9c62d461bf474ac4324189b..b7114de9eaab23a7bd8c79629fa52f2e475874e4 100644 (file)
@@ -37,7 +37,11 @@ Figured_bass_engraver::Figured_bass_engraver ()
 void
 Figured_bass_engraver::stop_translation_timestep ()
 {
-  figure_ = 0;
+  if (figure_)
+    {
+      typeset_grob (figure_);
+      figure_ = 0;
+    }
 
   figures_.clear ();
   rest_req_ = 0;
@@ -64,13 +68,14 @@ Figured_bass_engraver::process_music ()
 {
   if (rest_req_)
     {
-      figure_ = make_item ("BassFigure", rest_req_->self_scm ());
+      figure_ = make_item ("BassFigure");
+      announce_grob (figure_, rest_req_->self_scm ()); // todo
       figure_->set_property ("text" , scm_makfrom0str ("-"));
     }
   else if (figures_.size ())
     {
       SCM proc = get_property ("bassFigureFormatFunction");
-      if (ly_c_procedure_p (proc)) 
+      if (gh_procedure_p (proc)) 
        {
          SCM l = SCM_EOL;
          SCM * t = &l;
@@ -79,9 +84,10 @@ Figured_bass_engraver::process_music ()
              *t = scm_cons (figures_[i]->self_scm (), SCM_EOL);
              t = SCM_CDRLOC (*t);
            }
-         figure_ = make_item ("BassFigure", figures_[0]->self_scm ());
-         scm_call_3 (proc, l, context ()->self_scm (),
+         figure_ = make_item ("BassFigure");
+         scm_call_3 (proc, l, daddy_context_->self_scm (),
                      figure_->self_scm ());
+         announce_grob (figure_, figures_[0]->self_scm ()); // todo
        }
     }
 }
index 8dbc974b6f0e7d0929bc0ac09f899b44a87554c8..c87aab6b31b27689864d53421aa4296e5c2494f1 100644 (file)
@@ -81,7 +81,7 @@ Fingering_engraver::process_music ()
 void
 Fingering_engraver::make_script (Direction d, Music *r, int i)
 {
-  Item *fingering = make_item ("Fingering", r->self_scm ());
+  Item *fingering = make_item ("Fingering");
   Axis a = Y_AXIS;
   Axis other = other_axis (a);
 
@@ -105,26 +105,27 @@ Fingering_engraver::make_script (Direction d, Music *r, int i)
   // Hmm
   int priority = 200;
   SCM s = fingering->get_property ("script-priority");
-  if (ly_c_number_p (s))
-    priority = ly_scm2int (s);
+  if (gh_number_p (s))
+    priority = gh_scm2int (s);
   
   /* See script-engraver.cc */
   priority += i;
 
-  fingering->set_property ("script-priority", scm_int2num (priority));
+  fingering->set_property ("script-priority", gh_int2scm (priority));
 
 
   if (!is_direction (fingering->get_property ("direction")))
     {
       if (d)
-       fingering->set_property ("direction", scm_int2num (d));
+       fingering->set_property ("direction", gh_int2scm (d));
       else
-       fingering->set_property ("direction",  scm_int2num (RIGHT));
+       fingering->set_property ("direction",  gh_int2scm (RIGHT));
     }
 
   SCM dig =  r->get_property ("digit");
-  fingering->set_property ("text", scm_number_to_string (dig, scm_int2num (10)));
+  fingering->set_property ("text", scm_number_to_string (dig, gh_int2scm (10)));
 
+  announce_grob (fingering, r->self_scm ());
   fingerings_.push (fingering);
 }
 
@@ -134,6 +135,11 @@ Fingering_engraver::stop_translation_timestep ()
   if (!fingerings_.size ())
     return;
   
+  for (int i=0; i < fingerings_.size (); i++)
+    {
+      Item *ti = fingerings_[i];
+      typeset_grob (ti);
+    }
   fingerings_.clear ();
 }
 
index f8ff01ab65b096e47c1fe1815d5f882595d46804..a85bd4db7414c3ebd450cd597dfd9d63c5888d01 100644 (file)
@@ -10,7 +10,7 @@
 #include "font-metric.hh"
 #include "font-interface.hh"
 #include "grob.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "warn.hh"
 
 
index 9af80e57387275317987361f05cc07388dde4317..fb041fe3daeb2f8ca786def8dd3b545e3c0d302a 100644 (file)
@@ -1,5 +1,5 @@
 /*   
-  font-metric.cc -- implement Font_metric
+  font-metric.cc --  implement Font_metric
   
   source file of the GNU LilyPond music typesetter
   
@@ -11,7 +11,6 @@
 #include <math.h>
 #include <ctype.h>
 
-#include "scaled-font-metric.hh"
 #include "virtual-methods.hh"
 #include "warn.hh"
 #include "stencil.hh"
 #include "font-metric.hh"
 #include "string.hh"
 
-Real
-Font_metric::design_size () const
+Box
+Font_metric::text_dimension (String text) const
 {
-  return 1.0;
-}
+  Interval ydims;
+  Real w=0.0;
+  
+  for (int i = 0; i < text.length (); i++) 
+    {
+      
+      switch (text[i]) 
+       {
+       case '\\':
+  // accent marks use width of base letter
+         if (i +1 < text.length ())
+          {
+            if (text[i+1]=='\'' || text[i+1]=='`' || text[i+1]=='"' ||
+                text[i+1]=='^')
+              {
+                i++;
+                break;
+              }
+            // for string width \\ is a \ and \_ is a _.
+            if (text[i+1]=='\\' || text[i+1]=='_')        
+              {
+                break;
+              }
+          }
+         
+         for (i++; (i < text.length ()) && !isspace (text[i]) 
+                && text[i]!='{' && text[i]!='}'; i++)
+           ;
+         // ugh.
+         i--; // Compensate for the increment in the outer loop!
+         break;
+       case '{':  // Skip '{' and '}'
+       case '}':
+         break;
+       
+       default: 
+         Box b = get_ascii_char ((unsigned char)text[i]);
+         
+         // Ugh, use the width of 'x' for unknown characters
+         if (b[X_AXIS].length () == 0) 
+           b = get_ascii_char ((unsigned char)'x');
+         
+         w += b[X_AXIS].length ();
+         ydims.unite (b[Y_AXIS]);
+         break;
+       }
+    }
+  if (ydims.is_empty ())
+    ydims = Interval (0,0);
 
-String
-Font_metric::coding_scheme () const
-{
-  return "FontSpecific";
+  return Box (Interval (0, w), ydims);
 }
 
-Stencil
-Font_metric::find_by_name (String s) const
+
+
+Font_metric::~Font_metric ()
 {
-  int idx = name_to_index (s);
-  Box b;
-  
-  SCM expr = SCM_EOL;
-  if (idx >= 0)
-    {
-      expr = scm_list_3 (ly_symbol2scm ("char"),
-                        self_scm (),
-                        scm_int2num (index_to_ascii (idx)));
-      b = get_indexed_char (idx);
-    }
-  
-  Stencil q (b, expr);
-  return q;
 }
 
 Font_metric::Font_metric ()
@@ -61,11 +91,6 @@ Font_metric::Font_metric (Font_metric const &)
 {
 }
 
-
-Font_metric::~Font_metric ()
-{
-}
-
 int
 Font_metric::count () const
 {
@@ -75,7 +100,7 @@ Font_metric::count () const
 Box 
 Font_metric::get_ascii_char (int) const
 {
-  return Box (Interval (0, 0), Interval (0, 0));
+  return Box (Interval (0,0),Interval (0,0));
 }
 
 Box 
@@ -84,6 +109,7 @@ Font_metric::get_indexed_char (int k) const
   return get_ascii_char (k);
 }
 
+
 int
 Font_metric::name_to_index (String) const
 {
@@ -91,20 +117,22 @@ Font_metric::name_to_index (String) const
 }
 
 Offset
-Font_metric::get_indexed_wxwy (intconst
+Font_metric::get_indexed_wxwy (int )const
 {
-  return Offset (0, 0);
+  return Offset (0,0);
 }
 
 void
-Font_metric::derived_mark () const
+Font_metric::derived_mark ()const
 {
+  
 }
 
 SCM
 Font_metric::mark_smob (SCM s)
 {
-  Font_metric *m = (Font_metric*) SCM_CELL_WORD_1 (s);
+  Font_metric * m = (Font_metric*) SCM_CELL_WORD_1 (s);
+
   m->derived_mark ();
   return m->description_;
 }
@@ -127,9 +155,14 @@ IMPLEMENT_SMOBS (Font_metric);
 IMPLEMENT_DEFAULT_EQUAL_P (Font_metric);
 IMPLEMENT_TYPE_P (Font_metric, "ly:font-metric?");
 
+Stencil
+Font_metric::find_by_name (String) const
+{
+  Stencil m ;
+  return m;
+}
 
-LY_DEFINE (ly_find_glyph_by_name, "ly:find-glyph-by-name",
-          2, 0, 0,
+LY_DEFINE (ly_find_glyph_by_name, "ly:find-glyph-by-name", 2 , 0, 0,
          (SCM font, SCM name),
          "This function retrieves a Stencil for the glyph named @var{name} "
           "in "
@@ -139,140 +172,60 @@ LY_DEFINE (ly_find_glyph_by_name, "ly:find-glyph-by-name",
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  SCM_ASSERT_TYPE (ly_c_string_p (name), name, SCM_ARG2, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (gh_string_p (name), name, SCM_ARG2, __FUNCTION__, "string");
 
-  Stencil m = fm->find_by_name (ly_scm2string (name));
+  Stencil m =  fm->find_by_name (ly_scm2string (name));
 
-  /* TODO: make optional argument for default if not found.  */
+  /*
+    TODO: make optional argument for default if not found.
+   */
   return m.smobbed_copy ();
 }
 
-LY_DEFINE (ly_get_glyph, "ly:get-glyph",
-          2, 0, 0,
+LY_DEFINE (ly_get_glyph, "ly:get-glyph", 2 , 0, 0,
          (SCM font, SCM index),
-          "Retrieve a Stencil for the glyph numbered @var{index} "
-          "in @var{font}.")
+         "This function retrieves a Stencil for the glyph numbered @var{index} in "
+"@var{font}. ")
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  SCM_ASSERT_TYPE (ly_c_number_p (index), index, SCM_ARG2, __FUNCTION__, "number");
+  SCM_ASSERT_TYPE (gh_number_p (index), index, SCM_ARG2, __FUNCTION__, "number");
 
-  return fm->get_ascii_char_stencil (ly_scm2int (index)).smobbed_copy ();
+  return fm->get_ascii_char_stencil (gh_scm2int (index)).smobbed_copy ();
 }
 
-LY_DEFINE (ly_text_dimension,"ly:text-dimension",
-          2, 0, 0,
+LY_DEFINE (ly_text_dimension,"ly:text-dimension", 2 , 0, 0,
          (SCM font, SCM text),
-         "Given the font metric in @var{font} and the string @var{text}, "
-          "compute the extents of that text in that font.  "
-          "The return value is a pair of number-pairs.")
+         "Given the font metric in @var{font} and the string @var{text}, compute "
+"the extents of that text in that font. The return value is a pair of "
+"number-pairs.")
 {
   Box b;
-  Modified_font_metric*fm = dynamic_cast<Modified_font_metric*>
-    (unsmob_metrics (font));
-  SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "modified font metric");
-  SCM_ASSERT_TYPE (ly_c_string_p (text), text, SCM_ARG2, __FUNCTION__, "string");
-  
-  b = fm->text_dimension (ly_scm2string (text));
-  
-  return scm_cons (ly_interval2scm (b[X_AXIS]), ly_interval2scm (b[Y_AXIS]));
-}
-
-LY_DEFINE (ly_font_filename,"ly:font-filename",
-          1, 0, 0,
-          (SCM font),
-          "Given the font metric @var{font}, "
-          "return the corresponding file name.")
-{
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  return ly_car (fm->description_);
-}
-
+  SCM_ASSERT_TYPE (gh_string_p (text), text, SCM_ARG2, __FUNCTION__, "string");
 
-#include "afm.hh"
-
-LY_DEFINE (ly_font_name,"ly:font-name",
-          1, 0, 0,
-          (SCM font),
-          "Given the font metric @var{font}, "
-          "return the corresponding name.")
-{
-  Font_metric *fm = unsmob_metrics (font);
-      
-  SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-
-
-  if (Modified_font_metric* mfm = dynamic_cast<Modified_font_metric*> (fm))
-    return ly_font_name (mfm->original_font ()->self_scm ());
-  else if (Adobe_font_metric* afm = dynamic_cast<Adobe_font_metric*> (fm))
-    {
-      return scm_makfrom0str (afm->font_info_->gfi->fontName);
-    }
-  else
-    return SCM_BOOL_F;
-}
-
-
-
-LY_DEFINE (ly_font_magnification,"ly:font-magnification", 1 , 0, 0,
-         (SCM font),
-          "Given the font metric @var{font}, return the "
-          "magnification, relative to the current outputscale.")
-{
-  Font_metric *fm = unsmob_metrics (font);
-  SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  return ly_cdr (fm->description_);
-}
-
-LY_DEFINE (ly_font_design_size,"ly:font-design-size", 1 , 0, 0,
-         (SCM font),
-          "Given the font metric @var{font}, return the "
-          "design size, relative to the current outputscale.")
-{
-  Font_metric *fm = unsmob_metrics (font);
-  SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  return scm_make_real (fm->design_size ());
-}
-
-
-
-int
-Font_metric::index_to_ascii (int i) const
-{
-  return i;
+  b = fm->text_dimension (ly_scm2string (text));
+  
+  return gh_cons (ly_interval2scm (b[X_AXIS]), ly_interval2scm (b[Y_AXIS]));
 }
 
 Stencil
-Font_metric::get_ascii_char_stencil (int code) const
+Font_metric::get_ascii_char_stencil (int code)  const
 {
-  SCM at = scm_list_3 (ly_symbol2scm ("char"),
-                      this->self_scm (),
-                      scm_int2num (code));
+  SCM at = scm_list_n (ly_symbol2scm ("char"), gh_int2scm (code),
+                      SCM_UNDEFINED);
+  at = fontify_atom (this, at);
   Box b = get_ascii_char (code);
   return Stencil (b, at);
 }
 
 Stencil
-Font_metric::get_indexed_char_stencil (int code) const
+Font_metric::get_indexed_char_stencil (int code)  const
 {
-  SCM at = scm_list_3 (ly_symbol2scm ("char"),
-                      self_scm (),
-                      scm_int2num (code));
+  SCM at = scm_list_n (ly_symbol2scm ("char"), gh_int2scm (code),
+                      SCM_UNDEFINED);
+  at = fontify_atom (this, at);
   Box b = get_indexed_char (code);
   return Stencil (b, at);
 }
-
-int
-/*Font_metric::*/
-get_encoded_index (Font_metric *m, String input_coding, int code)
-{
-  String font_coding = m->coding_scheme ();
-  if (font_coding == input_coding)
-    return code;
-  SCM s = scm_call_3 (ly_scheme_function ("encoded-index"),
-                     scm_makfrom0str (input_coding.to_str0 ()),
-                     scm_makfrom0str (font_coding.to_str0 ()),
-                     scm_int2num (code));
-  return ly_scm2int (s);
-}
index ef6ab87107799b7cf3f0f90359c2b257154cb821..26d3cad0d39dec92896ef282d5f6d3020281b660 100644 (file)
@@ -9,9 +9,7 @@
 
 #include <math.h>
 
-
-#include "all-font-metrics.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "font-interface.hh"
 #include "warn.hh"
 
@@ -22,7 +20,7 @@ LY_DEFINE (ly_paper_get_font, "ly:paper-get-font", 2, 0, 0,
           "in the alist chain @var{chain}.\n"
           "(An alist chain is a list of alists, containing grob properties).\n")
 {
-  Output_def *pap = unsmob_output_def (paper);
+  Paper_def *pap = unsmob_paper (paper);
   SCM_ASSERT_TYPE (pap, paper, SCM_ARG1, __FUNCTION__, "paper definition");
   
   Font_metric *fm = select_font (pap, chain);
@@ -33,9 +31,9 @@ LY_DEFINE (ly_paper_get_number, "ly:paper-get-number", 2, 0, 0,
           (SCM paper, SCM name),
           "Return the paper variable @var{name}.")
 {
-  Output_def *pap = unsmob_output_def (paper);
+  Paper_def *pap = unsmob_paper (paper);
   SCM_ASSERT_TYPE (pap, paper, SCM_ARG1, __FUNCTION__, "paper definition");
-  return scm_make_real (pap->get_dimension (name));
+  return gh_double2scm (pap->get_realvar (name));
 }
 
 bool
@@ -44,15 +42,9 @@ wild_compare (SCM field_val, SCM val)
   return (val == SCM_BOOL_F || field_val == ly_symbol2scm ("*") || field_val == val);
 }
 
-
-/*
-  TODO: this triggers a great number of font-loads (feta11 upto
-  parmesan23). We could make a Delayed_load_font_metric for which the
-  design size is specced in advance.
- */
 Font_metric*
-get_font_by_design_size (Output_def* paper, Real requested,
-                        SCM font_vector, SCM input_encoding_name)
+get_font_by_design_size (Paper_def* paper, Real requested,
+                        SCM font_vector)
 {
   int n = SCM_VECTOR_LENGTH (font_vector);
   Real size = 1e6;
@@ -61,10 +53,7 @@ get_font_by_design_size (Output_def* paper, Real requested,
   
   for (; i < n; i++)
     {
-      SCM entry = SCM_VECTOR_REF (font_vector, i);
-      Font_metric *fm = unsmob_metrics (scm_force (entry));
-      size = fm->design_size ();
-      
+      size = gh_scm2double (gh_car (SCM_VECTOR_REF (font_vector, i)));
       if (size > requested)
        break ;
       last_size = size; 
@@ -82,21 +71,19 @@ get_font_by_design_size (Output_def* paper, Real requested,
          size = last_size;
        }
     }
-
-  Font_metric *fm = unsmob_metrics (scm_force (SCM_VECTOR_REF (font_vector, i)));
-  return
-    find_scaled_font (paper, fm, requested / size, input_encoding_name);
-
+  
+  return paper->find_font (gh_cdr (SCM_VECTOR_REF (font_vector, i)),
+                          requested / size);
 }
 
 
 Font_metric*
-get_font_by_mag_step (Output_def* paper, Real requested_step,
-                     SCM font_vector, Real default_size, SCM input_encoding_name)
+get_font_by_mag_step (Paper_def* paper, Real requested_step,
+                     SCM font_vector, Real default_size)
 {
   return get_font_by_design_size (paper,
                                  default_size * pow (2.0, requested_step / 6.0),
-                                 font_vector, input_encoding_name);
+                                 font_vector);
 }
 
 
@@ -109,28 +96,26 @@ properties_to_font_size_family (SCM fonts, SCM alist_chain)
 
 
 Font_metric *
-select_encoded_font (Output_def *paper, SCM chain, SCM encoding_name)
+select_font (Paper_def *paper, SCM chain)
 {
   SCM name = ly_assoc_chain (ly_symbol2scm  ("font-name"), chain);
   
-  if (!ly_c_pair_p (name) || !ly_c_string_p (ly_cdr (name)))
+  if (!gh_pair_p (name) || !gh_string_p (gh_cdr (name)))
     {
       SCM fonts = paper->lookup_variable (ly_symbol2scm ("fonts"));
       name = properties_to_font_size_family (fonts, chain);
     }
   else
-    name  = ly_cdr (name);
+    name  = gh_cdr (name);
+
 
-  if (ly_c_string_p (name))
+  if (gh_string_p (name))
     {
       SCM mag = ly_assoc_chain (ly_symbol2scm ("font-magnification"), chain);
   
-      Real rmag = ly_c_pair_p (mag) ? robust_scm2double (ly_cdr (mag), 1.0) : 1;
-
-      Font_metric * fm = all_fonts_global->find_font (ly_scm2string (name));
-      
-      
-      return find_scaled_font (paper, fm, rmag, encoding_name);
+      Real rmag = gh_pair_p (mag) ? robust_scm2double (gh_cdr (mag), 1.0) : 1;
+  
+      return paper->find_font (name, rmag);
     }
   else if (scm_instance_p (name))
     {
@@ -139,11 +124,11 @@ select_encoded_font (Output_def *paper, SCM chain, SCM encoding_name)
       
       SCM font_size = ly_assoc_chain (ly_symbol2scm ("font-size"), chain);
       Real req = 0.0;
-      if (ly_c_pair_p (font_size))
-       req = ly_scm2double (ly_cdr (font_size));
+      if (gh_pair_p (font_size))
+       req = gh_scm2double (ly_cdr (font_size));
 
       return get_font_by_mag_step (paper, req,
-                                  vec, ly_scm2double (base_size), encoding_name);
+                                  vec, gh_scm2double (base_size));
     }
 
   assert (0);
@@ -151,8 +136,4 @@ select_encoded_font (Output_def *paper, SCM chain, SCM encoding_name)
   return 0;
 }
 
-Font_metric *
-select_font (Output_def *paper, SCM chain)
-{
-  return select_encoded_font (paper, chain, SCM_EOL);
-}
+
index 6c6bfa91d1bbc8d100f1fd119c752011cab8084b..9066bee1f6132c4f8f200d8d19beaaf7158cc83c 100644 (file)
@@ -33,15 +33,15 @@ Font_size_engraver::acknowledge_grob (Grob_info gi)
   /*
     We only want to process a grob once.
    */
-  if (gi.origin_trans_->context () != context ())
+  if (gi.origin_trans_->daddy_context_ != daddy_context_)
     return ;
   
-  if (ly_c_number_p (sz) && ly_scm2double (sz))
+  if (gh_number_p (sz) && gh_scm2double (sz))
     {
-      Real font_size = ly_scm2double (sz);
+      Real font_size = gh_scm2double (sz);
       
       font_size +=  robust_scm2double (gi.grob_->get_property ("font-size"), 0);
-      gi.grob_->set_property ("font-size", scm_make_real (font_size));
+      gi.grob_->set_property ("font-size", gh_double2scm (font_size));
     }
 }
 
index 242866e2f0a3b9751f93e935cc9cac9740faeeaf..a7bf47b2df2924dc84165092c3b2df49ce91f6be 100644 (file)
@@ -21,18 +21,18 @@ Forbid_line_break_engraver::start_translation_timestep ()
   SCM busy = get_property ("busyGrobs");
 
   Moment now = now_mom ();
-  while (ly_c_pair_p (busy) && unsmob_moment (ly_caar (busy))->main_part_ == now.main_part_)
-    busy = ly_cdr (busy);
+  while (gh_pair_p (busy) && unsmob_moment (gh_caar (busy))->main_part_ == now.main_part_)
+    busy = gh_cdr (busy);
 
   
-  while (ly_c_pair_p (busy))
+  while (gh_pair_p (busy))
     {
-      Grob *g = unsmob_grob (ly_cdar (busy));
+      Grob *g = unsmob_grob (gh_cdar (busy));
       if (Rhythmic_head::has_interface (g))
        {
          get_score_engraver ()->forbid_breaks ();
        }
-      busy = ly_cdr (busy);
+      busy = gh_cdr (busy);
     }
 }
 
index dc05bb308883b975d382f0879d1fab790a26e15c..bb6beb9e8b76f90d0df94a274a961c2ea5b9a1b8 100644 (file)
@@ -23,15 +23,15 @@ void ly_add_function_documentation (SCM func,
   if (!strlen (doc))
     return ; 
     
-  if (!ly_c_vector_p (doc_hash_table ))
-    doc_hash_table = scm_make_vector (scm_int2num (59), SCM_EOL);
+  if (!gh_vector_p (doc_hash_table ))
+    doc_hash_table = scm_make_vector (gh_int2scm (59), SCM_EOL);
 
   String s = String (" - ") + "LilyPond procedure: " + fname + " " + varlist
     + "\n" + doc ;
 
   scm_set_procedure_property_x (func, ly_symbol2scm ("documentation"),
                                scm_makfrom0str (s.to_str0 ()));
-  SCM entry = scm_cons (scm_makfrom0str (varlist), scm_makfrom0str (doc));
+  SCM entry = gh_cons (scm_makfrom0str (varlist), scm_makfrom0str (doc));
   scm_hashq_set_x (doc_hash_table, ly_symbol2scm (fname), entry);
 }
 
index 884f5e3665dcfeef368eef1558ed5ca3c9a4f154..795570866f4453a85f839935fde711dc0c43c453 100644 (file)
@@ -55,7 +55,8 @@ Glissando_engraver::process_music ()
 {
   if (event_)
     {
-      line_ = make_spanner ("Glissando", event_->self_scm ());
+      line_ = make_spanner ("Glissando");
+      announce_grob (line_, event_->self_scm ());
     }
 }
 
@@ -80,6 +81,7 @@ Glissando_engraver::stop_translation_timestep ()
 {
   if (last_line_ && last_line_->get_bound (RIGHT))
     {
+      typeset_grob (last_line_);
       last_line_ =0;
     }
   if (line_)
index b00124606d562ff94a46d01be23b259b0cbf4131..dbb66d10ef001357461fdbe67cad5acc28889c31 100644 (file)
 #include "global-context.hh"
 #include "score-context.hh"
 #include "context-def.hh"
-#include "output-def.hh"
+#include "music-output-def.hh"
 #include "grace-fixup.hh"
 
-Global_context::Global_context (Output_def *o, Moment final)
+Global_context::Global_context (Music_output_def *o, Moment final)
 {
   output_def_ = o;
   final_mom_ = final;
-  definition_ = find_context_def (o, ly_symbol2scm ("Global"));
+  definition_ = o->find_context_def (ly_symbol2scm ("Global"));
   unsmob_context_def (definition_)->apply_default_property_operations (this);
   accepts_list_ = scm_list_1 (ly_symbol2scm ("Score"));
 }
 
-Output_def* 
+Music_output_def* 
 Global_context::get_output_def () const
 {
   return output_def_;
@@ -81,8 +81,8 @@ Global_context::now_mom () const
 Score_context*
 Global_context::get_score_context () const
 {
-  return (ly_c_pair_p (context_list_))
-    ? dynamic_cast<Score_context*> (unsmob_context (ly_car (context_list_)))
+  return (gh_pair_p (context_list_))
+    ? dynamic_cast<Score_context*> (unsmob_context (gh_car (context_list_)))
     : 0;
 }
 
@@ -145,7 +145,8 @@ Global_context::run_iterator_on_me (Music_iterator * iter)
       if (!get_score_context ()) 
        {
          SCM key = ly_symbol2scm ("Score");
-         Context_def * t = unsmob_context_def (find_context_def (get_output_def (), key));
+         Context_def * t = unsmob_context_def (get_output_def ()
+                                               ->find_context_def (key));
          if (!t)
            error (_f ("can't find `%s' context", "Score"));
 
@@ -164,19 +165,22 @@ void
 Global_context::apply_finalizations ()
 {
   SCM lst = get_property ("finalizations");
-  set_property ("finalizations", SCM_EOL);
-  for (SCM s = lst; ly_c_pair_p (s); s = ly_cdr (s))
-    /* TODO: make safe.  */
-    scm_primitive_eval (ly_car (s));
+  set_property ("finalizations" , SCM_EOL); 
+  for (SCM s = lst ; gh_pair_p (s); s = gh_cdr (s))
+    {
+      scm_primitive_eval (gh_car (s)); // TODO: make safe.
+    }
 }
 
-/* Add a function to execute before stepping to the next time step.  */
+/*
+  Add a function to execute before stepping to the next time step.
+*/
 void
 Global_context::add_finalization (SCM x)
 {
   SCM lst = get_property ("finalizations");
   lst = scm_cons (x, lst);
-  set_property ("finalizations"lst); 
+  set_property ("finalizations" ,lst); 
 }
 
 Moment
index 9cfd6b531f5677999a8ac6be1daab5274dd8d95b..93192d1a289ad5fc0927f108de501fac7e257e99 100644 (file)
@@ -14,7 +14,7 @@
 #include "main.hh"
 #include "paper-column.hh"
 #include "paper-score.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "simple-spacer.hh"
 #include "system.hh"
 
@@ -79,8 +79,8 @@ Gourlay_breaking::do_solve () const
   Break_node first_node ;
   optimal_paths.push (first_node);
 
-  bool ragged_right = to_boolean (pscore_->paper_->c_variable ("raggedright"));
-  bool ragged_last = to_boolean (pscore_->paper_->c_variable ("raggedlast"));
+  bool ragged_right = to_boolean (pscore_->paper_->get_scmvar ("raggedright"));
+  bool ragged_last = to_boolean (pscore_->paper_->get_scmvar ("raggedlast"));
 
   Real worst_force = 0.0;
   for (int break_idx = 1; break_idx< breaks.size (); break_idx++) 
@@ -106,7 +106,7 @@ Gourlay_breaking::do_solve () const
          cp.cols_ = line;
 
          Interval line_dims
-           = line_dimensions_int (pscore_->paper_, optimal_paths[start_idx].line_);
+           = pscore_->paper_->line_dimensions_int (optimal_paths[start_idx].line_);
          Simple_spacer * sp = generate_spacing_problem (line, line_dims);
          bool last_line = break_idx == breaks.size ()-1;
          bool ragged = ragged_right
@@ -233,9 +233,9 @@ Gourlay_breaking::combine_demerits (Column_x_positions const &prev,
   if (pc->original_)
     {
       SCM pen = pc->get_property ("penalty");
-      if (ly_c_number_p (pen) && fabs (ly_scm2double (pen)) < 10000)
+      if (gh_number_p (pen) && fabs (gh_scm2double (pen)) < 10000)
        {
-         break_penalties += ly_scm2double (pen);
+         break_penalties += gh_scm2double (pen);
        }
     }
 
index d68bcad7b37ff7a1aeb3bd3f0a4af39d76c0ee78..a63ad5c814f7edd4c6e095bcd7cce9cf8b70d086 100644 (file)
 void
 Grace_iterator::process (Moment m)
 {
-  Moment main;
+  Moment main ;
   main.main_part_ = - start_mom_.grace_part_ + m.grace_part_;
   Music_wrapper_iterator::process (main);
 
-  /* We can safely do this, since \grace should always be inside
-     sequential.  */
+  /*
+    We can safely do this, since \grace should always be inside
+    sequential.
+   */
   descend_to_child (child_iter_->get_outlet ());
 }
 
index 8e96a11f48865c4575c1289118e800038b8343ff..ed88e82defcad3dda86a3fc2b6dfe9af00eeafa8 100644 (file)
@@ -186,7 +186,7 @@ void check_and_fix_all_prefixes (Array<Grob_info> primitives)
     /* all other combinations should be valid (unless I made a
        mistake) */
 
-    primitive->set_property ("prefix-set", scm_int2num (prefix_set));
+    primitive->set_property ("prefix-set", gh_int2scm (prefix_set));
   }
 }
 
@@ -205,7 +205,7 @@ provide_context_info (Array<Grob_info> primitives)
     Music *music_cause = primitives[i].music_cause ();
     int context_info = 0;
     int pitch = unsmob_pitch (music_cause->get_property ("pitch"))->steps ();
-    int prefix_set = ly_scm2int (primitive->get_property ("prefix-set"));
+    int prefix_set = gh_scm2int (primitive->get_property ("prefix-set"));
 
     if (prefix_set & PES_OR_FLEXA)
       if (!i) // ligature may not start with 2nd head of pes or flexa
@@ -235,7 +235,7 @@ provide_context_info (Array<Grob_info> primitives)
 
     if (prev_primitive)
       prev_primitive->set_property ("context-info",
-                                        scm_int2num (prev_context_info));
+                                        gh_int2scm (prev_context_info));
     prev_primitive = primitive;
     prev_prefix_set = prefix_set;
     prev_context_info = context_info;
@@ -243,7 +243,7 @@ provide_context_info (Array<Grob_info> primitives)
   }
   if (prev_primitive)
     prev_primitive->set_property ("context-info",
-                                      scm_int2num (prev_context_info));
+                                      gh_int2scm (prev_context_info));
 }
 
 void
index 4ccc5c0fe8803468ea696b4d36a1aad23f6cadeb..26e7bfbb9245c963e00735686c8108fad171cc1e 100644 (file)
@@ -24,7 +24,7 @@ Gregorian_ligature::prefixes_to_str (Grob *primitive)
 {
   String str;
   int prefix_set =
-    ly_scm2int (primitive->get_property ("prefix-set"));
+    gh_scm2int (primitive->get_property ("prefix-set"));
   check_prefix ("virga", VIRGA, prefix_set, &str);
   check_prefix ("stropha", STROPHA, prefix_set, &str);
   check_prefix ("inclinatum", INCLINATUM, prefix_set, &str);
index bc6205a8dc5e3fcb9c6f1f1e5b0a20c22029735f..809fdd54a4c3c17b7cc7e7d4cfd98034da3ed8ca 100644 (file)
@@ -28,12 +28,12 @@ Grob_info::music_cause ()
 Link_array<Context>
 Grob_info::origin_contexts (Translator* end) const
 {
-  Context * t = origin_trans_->context ();
+  Context * t = origin_trans_->daddy_context_;
   Link_array<Context> r;
   do {
     r.push (t);
-    t = t->get_parent_context ();
-  } while (t && t != end->context ());
+    t = t->daddy_context_;
+  } while (t && t != end->daddy_context_);
   
   return r;
 }
index 5a7e7d0f8d9abbd60c665b6f2fc8d5e8b2d90c78..45374a3099dbde6d539a41d98f478620657d7d26 100644 (file)
@@ -1,12 +1,4 @@
-/*
-  grob-interface.cc -- implement graphic objects interface
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 2002--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "protected-scm.hh"
+#include  "protected-scm.hh"
 #include "grob-interface.hh"
 #include "lily-guile.hh"
 #include "grob.hh"
@@ -22,6 +14,7 @@ void add_interface (const char * symbol,
   SCM d = scm_makfrom0str (descr);
   SCM l = parse_symbol_list (vars);
 
+
   ly_add_interface (s,d,l);
 }
 
@@ -29,16 +22,19 @@ void add_interface (const char * symbol,
 LY_DEFINE (ly_add_interface, "ly:add-interface", 3,0,0, (SCM a, SCM b, SCM c),
          "Add an interface description.")
 {
-  SCM_ASSERT_TYPE (ly_c_symbol_p (a), a, SCM_ARG1, __FUNCTION__, "symbol");
-  SCM_ASSERT_TYPE (ly_c_string_p (b), b, SCM_ARG2, __FUNCTION__, "string");  
-  SCM_ASSERT_TYPE (ly_c_list_p (c), c, SCM_ARG3, __FUNCTION__, "list of syms");    
-  if (!ly_c_vector_p (all_ifaces))
-    all_ifaces = scm_make_vector (scm_int2num (40), SCM_EOL);
+  SCM_ASSERT_TYPE (gh_symbol_p (a), a, SCM_ARG1, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (gh_string_p (b), b, SCM_ARG2, __FUNCTION__, "string");  
+  SCM_ASSERT_TYPE (gh_list_p (c), c,  SCM_ARG3, __FUNCTION__, "list of syms");    
+  if (!gh_vector_p (all_ifaces))
+    {
+      all_ifaces = scm_make_vector (gh_int2scm (40), SCM_EOL);
+    }
 
   SCM entry = scm_list_n (a, b, c, SCM_UNDEFINED);
 
   scm_hashq_set_x (all_ifaces, a, entry);
 
+
   return SCM_UNSPECIFIED;
 }
 
@@ -50,7 +46,6 @@ LY_DEFINE (ly_all_grob_interfaces, "ly:all-grob-interfaces",
   return all_ifaces;
 }
 
-
 void
 check_interfaces_for_property (Grob const *me, SCM sym)
 {
@@ -62,28 +57,28 @@ check_interfaces_for_property (Grob const *me, SCM sym)
       return ;
 
     }
-  SCM ifs = me->get_property ("interfaces");
+  SCM ifs =  me->get_property ("interfaces");
 
   bool found = false;
-  for (; !found && ly_c_pair_p (ifs); ifs =ly_cdr (ifs))
+  for (; !found && gh_pair_p (ifs); ifs =gh_cdr (ifs))
     {
-      SCM iface = scm_hashq_ref (all_ifaces , ly_car (ifs), SCM_BOOL_F);
+      SCM iface = scm_hashq_ref (all_ifaces , gh_car (ifs), SCM_BOOL_F);
       if (iface == SCM_BOOL_F)
        {
-         String msg = to_string (_f ("Unknown interface `%s'",
-                                     ly_symbol2string (ly_car (ifs)).to_str0 ()));
+         String msg = to_string ("Unknown interface `%s'",
+                              ly_symbol2string (gh_car (ifs)).to_str0 ());
          programming_error (msg);
          continue;
        }
 
-      found= found || (scm_c_memq (sym, ly_caddr (iface)) != SCM_BOOL_F);
+      found= found || (scm_c_memq (sym, gh_caddr (iface)) != SCM_BOOL_F);
     }
 
   if (!found)
     {
-      String str = to_string (_f ("Grob `%s' has no interface for property `%s'",
-                                 me->name ().to_str0 (),
-                                 ly_symbol2string (sym).to_str0 ()));
-      programming_error (str);
+     String str = to_string ("Grob %s has no interface for property %s",
+                        me->name ().to_str0 (),
+                        ly_symbol2string (sym).to_str0 ());
+     programming_error (str);
     }
 }
index c0f97f1d45c5e44bec31d149ad73c505ecd28b66..c620d4c5f8b481ec3a6af1bb2193573000649d0c 100644 (file)
@@ -30,15 +30,15 @@ Grob_pq_engraver::Grob_pq_engraver ()
 void
 Grob_pq_engraver::initialize ()
 {
-  context ()->set_property ("busyGrobs", SCM_EOL); 
+  daddy_context_->set_property ("busyGrobs", SCM_EOL); 
 }
 
 LY_DEFINE (ly_grob_pq_less_p, "ly:grob-pq-less?",
          2, 0 ,0, (SCM a, SCM b), 
          "Compare 2 grob priority queue entries. Internal")
 {
-  if (Moment::compare (*unsmob_moment (ly_car (a)),
-                      *unsmob_moment (ly_car (b))) < 0)
+  if (Moment::compare (*unsmob_moment (gh_car (a)),
+                      *unsmob_moment (gh_car (b))) < 0)
     return SCM_BOOL_T;
   else
     return SCM_BOOL_F;
@@ -71,7 +71,7 @@ Grob_pq_engraver::acknowledge_grob (Grob_info gi)
 
       SCM busy= get_property ("busyGrobs");
       busy = scm_merge_x (lst, busy, ly_grob_pq_less_p_proc);
-      context ()->set_property ("busyGrobs", busy);
+      daddy_context_->set_property ("busyGrobs", busy);
     }
 }
 
@@ -82,13 +82,13 @@ Grob_pq_engraver::stop_translation_timestep ()
   Moment now = now_mom ();
   SCM start_busy = get_property ("busyGrobs");
   SCM busy = start_busy;
-  while (ly_c_pair_p (busy) && *unsmob_moment (ly_caar (busy)) == now)
+  while (gh_pair_p (busy) && *unsmob_moment (gh_caar (busy)) == now)
     {
-      busy = ly_cdr (busy);
+      busy = gh_cdr (busy);
     }
 
   if (start_busy != busy)
-    context ()->set_property ("busyGrobs", busy);
+    daddy_context_->set_property ("busyGrobs", busy);
 }
 
 void
@@ -98,17 +98,17 @@ Grob_pq_engraver::start_translation_timestep ()
 
   SCM start_busy = get_property ("busyGrobs");
   SCM busy = start_busy;
-  while (ly_c_pair_p (busy) && *unsmob_moment (ly_caar (busy)) < now)
+  while (gh_pair_p (busy) && *unsmob_moment (gh_caar (busy)) < now)
     {
       /*
        The grob-pq-engraver is not water tight, and stuff like
        tupletSpannerDuration confuses it.
        */
-      busy = ly_cdr (busy);
+      busy = gh_cdr (busy);
     }
 
   if (start_busy != busy)
-    context ()->set_property ("busyGrobs", busy);
+    daddy_context_->set_property ("busyGrobs", busy);
 }
 
 
index f351d1ba362f6b8126a18311487d9fc2d1609c85..46d032c64f8800d0431551490084cd180eecf6ed 100644 (file)
@@ -10,7 +10,7 @@
 #include "group-interface.hh"
 #include "misc.hh"
 #include "paper-score.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "grob.hh"
 #include "spanner.hh"
 #include "item.hh"
@@ -45,7 +45,7 @@ Grob::add_to_list_property (SCM sym, SCM thing)
 
   if (handle != SCM_BOOL_F)
     {
-      scm_set_cdr_x (handle, scm_cons (thing, ly_cdr (handle)));
+      gh_set_cdr_x (handle, gh_cons (thing, gh_cdr (handle)));
     }
   else
     {
@@ -54,10 +54,10 @@ Grob::add_to_list_property (SCM sym, SCM thing)
        mutable prop list.
       */
       handle = scm_sloppy_assq (sym, immutable_property_alist_);
-      SCM tail = (handle != SCM_BOOL_F) ? ly_cdr (handle) : SCM_EOL;
-      SCM val = scm_cons (thing, tail);
+      SCM tail = (handle != SCM_BOOL_F) ? gh_cdr (handle) : SCM_EOL;
+      SCM val = gh_cons (thing, tail);
 
-      mutable_property_alist_ = scm_cons (scm_cons (sym, val),
+      mutable_property_alist_ = gh_cons (gh_cons (sym, val),
                                         mutable_property_alist_);
     }
 }
@@ -69,7 +69,7 @@ void
 Grob::internal_set_property (SCM s, SCM v)
 {
   /* Perhaps we simply do the assq_set, but what the heck. */
-  if (!is_live ())
+  if (!live ())
     return;
 
   if (internal_type_checking_global_b)
@@ -92,9 +92,9 @@ Grob::internal_get_property (SCM sym) const
 
   s = scm_sloppy_assq (sym, immutable_property_alist_);
   
-  if (internal_type_checking_global_b && ly_c_pair_p (s))
+  if (internal_type_checking_global_b && gh_pair_p (s))
     {
-      if (!type_check_assignment (sym, ly_cdr (s),
+      if (!type_check_assignment (sym, gh_cdr (s),
                                  ly_symbol2scm ("backend-type?")))
        abort ();
 
@@ -113,7 +113,7 @@ Grob::substitute_mutable_properties (SCM crit, SCM orig)
 
 
 bool
-Grob::is_live () const
+Grob::live () const
 {
   return immutable_property_alist_ != SCM_EOL;
 }
index 7b37fecab7ac78b4db36720f85da0376191522fe..77cc5d914e5a46f0fd4da53a57ee773424176bfe 100644 (file)
 #include "warn.hh"
 #include "spanner.hh"
 #include "item.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "system.hh"
 
 
-LY_DEFINE (ly_grob_set_property_x, "ly:grob-set-property!",
         3, 0, 0, (SCM grob, SCM sym, SCM val),
-          "Set @var{sym} in grob @var{grob} to value @var{val}")
+LY_DEFINE (ly_grob_set_property,"ly:grob-set-property!", 3, 0, 0,
+ (SCM grob, SCM sym, SCM val),
+  "Set @var{sym} in grob @var{grob} to value @var{val}")
 {
-  Grob *sc = unsmob_grob (grob);
+  Grob * sc = unsmob_grob (grob);
   SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
-  SCM_ASSERT_TYPE (ly_c_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
 
   if (!type_check_assignment (sym, val, ly_symbol2scm ("backend-type?")))
     error ("typecheck failed");
@@ -30,7 +30,7 @@ LY_DEFINE (ly_grob_set_property_x, "ly:grob-set-property!",
   return SCM_UNSPECIFIED;
 }
 
-LY_DEFINE (ly_grob_property, "ly:grob-property",
+LY_DEFINE (ly_get_property, "ly:grob-property",
           2, 0, 0, (SCM grob, SCM sym),
          "Return the value of a value in grob @var{g} of property @var{sym}. "
           "It will return @code{' ()} (end-of-list) "
@@ -40,13 +40,13 @@ LY_DEFINE (ly_grob_property, "ly:grob-property",
 {
   Grob *sc = unsmob_grob (grob);
   SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
-  SCM_ASSERT_TYPE (ly_c_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
 
   return sc->internal_get_property (sym);
 }
 
-LY_DEFINE (ly_spanner_get_bound, "ly:spanner-get-bound",
-          2, 0, 0, (SCM slur, SCM dir),
+LY_DEFINE (spanner_get_bound, "ly:spanner-get-bound", 2 , 0, 0,
+          (SCM slur, SCM dir),
           "Get one of the bounds of @var{spanner}. @var{dir} is @code{-1} "
           "for left, and @code{1} for right.")
 {
@@ -58,9 +58,9 @@ LY_DEFINE (ly_spanner_get_bound, "ly:spanner-get-bound",
 
 /* TODO: make difference between scaled and unscalead variable in
    calling (i.e different funcs.) */
-LY_DEFINE (ly_grob_paper, "ly:grob-paper",
         1, 0, 0, (SCM g),
-          "Get @code{\\paper} definition from grob @var{g}.")
+LY_DEFINE (ly_grob_paper,"ly:grob-paper", 1, 0, 0,
+ (SCM g),
+  "Get @code{\\paper} definition from grob @var{g}.")
 {
   Grob * sc = unsmob_grob (g);
   SCM_ASSERT_TYPE (sc, g, SCM_ARG1, __FUNCTION__, "grob");
@@ -68,50 +68,53 @@ LY_DEFINE (ly_grob_paper, "ly:grob-paper",
   return sc->get_paper ()->self_scm ();
 }
 
-LY_DEFINE (ly_grob_alist_chain, "ly:grob-alist-chain",
-          1, 1, 0, (SCM g, SCM global),
-          "Get an alist chain for grob @var{g}, with @var{global} as the "
-          "global default. If unspecified, @code{font-defaults} "
-          "from the paper block is taken. ")
+
+LY_DEFINE(ly_grob_alist_chain, "ly:grob-alist-chain",
+         1, 1, 0,
+         (SCM g, SCM global),
+         "Get an alist chain for grob @var{g}, with @var{global} as the "
+         "global default. If unspecified, @code{font-defaults} "
+         "from the paper block is taken. "
+         )
 {
-  Grob *sc = unsmob_grob (g);
+  Grob * sc = unsmob_grob (g);
   SCM_ASSERT_TYPE (sc, g, SCM_ARG1, __FUNCTION__, "grob");
 
   if (global == SCM_UNDEFINED)
-    global
-      = sc->get_paper ()->lookup_variable (ly_symbol2scm ("font-defaults"));
+    global = sc->get_paper ()->lookup_variable (ly_symbol2scm ("font-defaults"));
 
   return sc->get_property_alist_chain (global);
 }
 
-LY_DEFINE (ly_get_extent, "ly:grob-extent",
-          3, 0, 0, (SCM grob, SCM refp, SCM axis),
+
+LY_DEFINE (ly_get_extent, "ly:grob-extent", 3, 0, 0,
+          (SCM grob, SCM refp, SCM axis),
           "Get the extent in @var{axis} direction of @var{grob} relative to "
           "the grob @var{refp}")
 {
-  Grob *sc = unsmob_grob (grob);
-  Grob *ref = unsmob_grob (refp);
+  Grob * sc = unsmob_grob (grob);
+  Grob * ref = unsmob_grob (refp);
   SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
   SCM_ASSERT_TYPE (ref, refp, SCM_ARG2, __FUNCTION__, "grob");
+
   SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
 
-  return ly_interval2scm ( sc->extent (ref, Axis (ly_scm2int (axis))));
+  return ly_interval2scm ( sc->extent (ref, Axis (gh_scm2int (axis))));
 }
 
-LY_DEFINE (ly_grob_parent, "ly:grob-parent",
-          2, 0, 0, (SCM grob, SCM axis),
+LY_DEFINE (ly_get_parent, "ly:grob-parent", 2, 0, 0, (SCM grob, SCM axis),
           "Get the parent of @var{grob}.  @var{axis} is 0 for the X-axis, "
           "1 for the Y-axis.")
 {
-  Grob *sc = unsmob_grob (grob);
+  Grob * sc = unsmob_grob (grob);
   SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
   SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
 
-  Grob *par = sc->get_parent (Axis (ly_scm2int (axis)));
+  Grob *par = sc->get_parent (Axis (gh_scm2int (axis)));
   return par ? par->self_scm () : SCM_EOL;
 }
 
-LY_DEFINE (ly_grob_system, "ly:grob-system",
+LY_DEFINE (ly_get_system, "ly:grob-system",
           1, 0, 0, (SCM g),
           "Return the System Grob of @var{g}.")
 {
@@ -124,7 +127,7 @@ LY_DEFINE (ly_grob_system, "ly:grob-system",
   return SCM_EOL;
 }
 
-LY_DEFINE (ly_grob_original, "ly:grob-original",
+LY_DEFINE (ly_get_original, "ly:grob-original",
           1, 0, 0, (SCM grob),
           "Return the unbroken original Grob of @var{grob}.")
 {
@@ -133,9 +136,10 @@ LY_DEFINE (ly_grob_original, "ly:grob-original",
   return me->original_ ? me->original_->self_scm () : me->self_scm ();
 }
 
+/* FIXME: ly prefix? spanner in name? */
 /* TODO: maybe we should return a vector -- random access is more
    logical for this list? */
-LY_DEFINE (ly_spanner_broken_into, "ly:spanner-broken-into",
+LY_DEFINE (get_broken_into, "ly:spanner-broken-into",
           1, 0, 0, (SCM spanner),
           "Return broken-into list for @var{spanner}.")
 {
@@ -144,7 +148,7 @@ LY_DEFINE (ly_spanner_broken_into, "ly:spanner-broken-into",
 
   SCM s = SCM_EOL;
   for (int i = me->broken_intos_.size (); i--;)
-    s = scm_cons (me->broken_intos_[i]->self_scm (), s);
+    s = gh_cons (me->broken_intos_[i]->self_scm (), s);
   return s;
 }
 
@@ -156,7 +160,7 @@ LY_DEFINE (ly_grob_suicide, "ly:grob-suicide",
   SCM_ASSERT_TYPE (me, g, SCM_ARG1, __FUNCTION__, "grob");
 
   me->suicide ();
-  return SCM_UNSPECIFIED;
+  return SCM_UNDEFINED;
 }
 
 LY_DEFINE (ly_grob_translate_axis_x, "ly:grob-translate-axis!",
@@ -165,11 +169,11 @@ LY_DEFINE (ly_grob_translate_axis_x, "ly:grob-translate-axis!",
 {
   Grob *me = unsmob_grob (g);
   SCM_ASSERT_TYPE (me, g, SCM_ARG1, __FUNCTION__, "grob");
-  SCM_ASSERT_TYPE (ly_c_number_p (d), d, SCM_ARG2, __FUNCTION__, "dimension");
+  SCM_ASSERT_TYPE (gh_number_p (d), d, SCM_ARG2, __FUNCTION__, "dimension");
   SCM_ASSERT_TYPE (is_axis (a), a, SCM_ARG3, __FUNCTION__, "axis");
 
-  me->translate_axis (ly_scm2double (d), Axis (ly_scm2int (a)));
-  return SCM_UNSPECIFIED;
+  me->translate_axis (gh_scm2double (d), Axis (gh_scm2int (a)));
+  return SCM_UNDEFINED;
 }
 
 LY_DEFINE (ly_spanner_p, "ly:spanner?",
@@ -179,7 +183,7 @@ LY_DEFINE (ly_spanner_p, "ly:spanner?",
   Grob *me = unsmob_grob (g);
   bool b = dynamic_cast<Spanner*> (me);
 
-  return ly_bool2scm (b);
+  return gh_bool2scm (b);
 }
 
 LY_DEFINE (ly_item_p, "ly:item?",
@@ -188,7 +192,7 @@ LY_DEFINE (ly_item_p, "ly:item?",
 {
   Grob *me = unsmob_grob (g);
   bool b = dynamic_cast<Item*> (me);
-  return ly_bool2scm (b);
+  return gh_bool2scm (b);
 }
 
 LY_DEFINE (ly_item_break_dir, "ly:item-break-dir",
@@ -198,5 +202,5 @@ LY_DEFINE (ly_item_break_dir, "ly:item-break-dir",
 {
   Item *me = dynamic_cast<Item*> (unsmob_grob (it));
   SCM_ASSERT_TYPE (me, it, SCM_ARG1, __FUNCTION__, "Item");
-  return scm_int2num (me->break_status_dir ());
+  return gh_int2scm (me->break_status_dir ());
 }
index 477577066388d5d2059d8e62044fe4eebc6ac877..0fd48933619f5d72a18d3105ca4bf4591665a320 100644 (file)
@@ -36,6 +36,7 @@ remove dynamic_cast<Spanner,Item> and put this code into respective
   subclass.
 */
 
+//#define HASHING_FOR_MUTABLE_PROPS
 #define HASH_SIZE 3
 #define INFINITY_MSG "Infinity or NaN encountered"
 
@@ -59,9 +60,12 @@ Grob::Grob (SCM basicprops)
   smobify_self ();
 
 
+#ifdef HASHING_FOR_MUTABLE_PROPS
+  mutable_property_alist_ = scm_c_make_hash_table (HASH_SIZE);
+#endif
   
   SCM meta = get_property ("meta");
-  if (ly_c_pair_p (meta))
+  if (gh_pair_p (meta))
     {
       SCM ifs = scm_assoc (ly_symbol2scm ("interfaces"), meta);
 
@@ -70,7 +74,7 @@ Grob::Grob (SCM basicprops)
        */
       bool itc = internal_type_checking_global_b;
       internal_type_checking_global_b = false;
-      internal_set_property (ly_symbol2scm ("interfaces"), ly_cdr (ifs));
+      internal_set_property (ly_symbol2scm ("interfaces"), gh_cdr (ifs));
       internal_type_checking_global_b = itc;
     }
   
@@ -108,8 +112,8 @@ Grob::Grob (SCM basicprops)
       if (is_number_pair (xt))
        cb = xt;
       else if (cb != SCM_BOOL_F
-         && !ly_c_procedure_p (cb) && !ly_c_pair_p (cb)
-         && ly_c_procedure_p (get_property ("print-function")))
+         && !gh_procedure_p (cb) && !gh_pair_p (cb)
+         && gh_procedure_p (get_property ("print-function")))
        cb = stencil_extent_proc;
     
       dim_cache_[a].dimension_ = cb;
@@ -134,10 +138,17 @@ Grob::Grob (Grob const&s)
   pscore_ = 0;
 
   smobify_self ();
+
+#ifdef HASHING_FOR_MUTABLE_PROPS
+  mutable_property_alist_ = scm_c_make_hash_table (HASH_SIZE);
+#endif
 }
 
 Grob::~Grob ()
 {
+  /*
+    do nothing scm-ish and no unprotecting here.
+   */
 }
 
 
@@ -146,7 +157,7 @@ SCM
 Grob::stencil_extent (SCM element_smob, SCM scm_axis)
 {
   Grob *s = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (scm_axis);
+  Axis a = (Axis) gh_scm2int (scm_axis);
 
   Stencil *m = s->get_stencil ();
   Interval e ;
@@ -155,28 +166,19 @@ Grob::stencil_extent (SCM element_smob, SCM scm_axis)
   return ly_interval2scm (e);
 }
 
-Output_def*
+Paper_def*
 Grob::get_paper ()  const
 {
  return pscore_ ? pscore_->paper_ : 0;
 }
 
-
-/*
-  Recursively track all dependencies of this Grob.  The
-  status_ field is used as a mark-field.  It is marked with
-  BUSY during execution of this function, and marked with FINAL
-  when finished.
-
-  FUNCPTR is the function to call to update this element.
-*/
 void
 Grob::calculate_dependencies (int final, int busy, SCM funcname)
 {
   if (status_ >= final)
     return;
 
-  if (status_ == busy)
+  if (status_== busy)
     {
       programming_error ("Element is busy, come back later");
       return;
@@ -184,7 +186,7 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname)
   
   status_= busy;
 
-  for (SCM d = get_property ("dependencies"); ly_c_pair_p (d);
+  for (SCM d = get_property ("dependencies"); gh_pair_p (d);
        d = ly_cdr (d))
     {
       unsmob_grob (ly_car (d))
@@ -193,16 +195,16 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname)
 
   
   SCM proc = internal_get_property (funcname);
-  if (ly_c_procedure_p (proc))
-    scm_call_1 (proc, this->self_scm ());
+  if (gh_procedure_p (proc))
+    gh_call1 (proc, this->self_scm ());
  
-  status_ = final;
+  status_= final;
 }
 
 Stencil *
 Grob::get_stencil ()  const
 {
-  if (!is_live ())
+  if (!live ())
     {
       return 0;
     }
@@ -213,7 +215,7 @@ Grob::get_stencil ()  const
 
   mol = get_uncached_stencil ();
   
-  if (is_live ())
+  if (live ())
     {
       Grob *me = (Grob*)this;
       me->set_property ("stencil", mol);
@@ -228,34 +230,40 @@ Grob::get_uncached_stencil ()const
   SCM proc = get_property ("print-function");
 
   SCM  mol = SCM_EOL;
-  if (ly_c_procedure_p (proc)) 
-    mol = scm_apply_0 (proc, scm_list_n (this->self_scm (), SCM_UNDEFINED));
+  if (gh_procedure_p (proc)) 
+    mol = gh_apply (proc, scm_list_n (this->self_scm (), SCM_UNDEFINED));
+  
+  Stencil *m = unsmob_stencil (mol);
   
-  if (Stencil *m = unsmob_stencil (mol))
-     {
-      if (to_boolean (get_property ("transparent")))
-       mol = Stencil (m->extent_box (), SCM_EOL).smobbed_copy ();
-    else
-      {
-       SCM origin = ly_symbol2scm ("no-origin");
+  if (unsmob_stencil (mol))
+    {
+      SCM origin = ly_symbol2scm ("no-origin");
       
-       if (store_locations_global_b)
-         {
-           SCM cause = get_property ("cause");
-           if (Music*m = unsmob_music (cause))
-             {
-               SCM music_origin = m->get_property ("origin");
-               if (unsmob_input (music_origin))
-                 origin = music_origin;
-             }
-         }
-
-       // ugr.
-       mol = Stencil (m->extent_box (),
-                      scm_list_n (origin, m->expr (), SCM_UNDEFINED)
-                      ). smobbed_copy ();
+      if (store_locations_global_b)
+       {
+         SCM cause = get_property ("cause");
+         if (Music*m = unsmob_music (cause))
+           {
+             SCM music_origin = m->get_property ("origin");
+             if (unsmob_input (music_origin))
+               origin = music_origin;
+           }
       }
-    }  
+
+      // ugr.
+      
+      mol = Stencil (m->extent_box (),
+                     scm_list_n (origin, m->get_expr (), SCM_UNDEFINED)
+                     ). smobbed_copy ();
+
+      m = unsmob_stencil (mol);
+    }
+  
+  /*
+    transparent retains dimensions of element.
+   */
+  if (m && to_boolean (get_property ("transparent")))
+    mol = Stencil (m->extent_box (), SCM_EOL).smobbed_copy ();
 
   return mol;
 }
@@ -287,6 +295,7 @@ Grob::add_dependency (Grob*e)
     programming_error ("Null dependency added");
 }
 
+
 void
 Grob::handle_broken_dependencies ()
 {
@@ -301,17 +310,17 @@ Grob::handle_broken_dependencies ()
        because some Spanners have enormously long lists in their
        properties.
        */
-      for (SCM s = mutable_property_alist_; ly_c_pair_p (s);
-          s = ly_cdr (s))
+      for (SCM s = mutable_property_alist_; gh_pair_p (s);
+          s = gh_cdr (s))
        {
-         sp->substitute_one_mutable_property (ly_caar (s),
-                                             ly_cdar (s));
+         sp->substitute_one_mutable_property (gh_caar (s),
+                                             gh_cdar (s));
        }
     }
 
   System *system = get_system ();
 
-  if (is_live ()
+  if (live ()
       && system && common_refpoint (system, X_AXIS) && common_refpoint (system, Y_AXIS))
     {
       substitute_mutable_properties (system ? system->self_scm () : SCM_UNDEFINED,
@@ -344,9 +353,12 @@ Grob::handle_broken_dependencies ()
 void
 Grob::suicide ()
 {
-  if (!is_live ())
+  if (!live ())
     return; 
 
+#if 0 // see below. 
+   String nm = name ();
+#endif
   
   mutable_property_alist_ = SCM_EOL;
   immutable_property_alist_ = SCM_EOL;
@@ -359,6 +371,19 @@ Grob::suicide ()
       dim_cache_[a].offset_callbacks_ = SCM_EOL;
       dim_cache_[a].offsets_left_ = 0;
     }
+
+#if 0
+  /*
+    This can make debugging a little easier: we can still know what
+    the object used to be. However, since all its links have been
+    broken, it's usually more convenient to set a conditional
+    breakpoint in GDB before the property lists are wiped.
+   */
+  mutable_property_alist_ = scm_acons (ly_symbol2scm ("name"),
+                                      scm_makfrom0str (nm.to_str0()),
+                                      mutable_property_alist_
+                                      );
+#endif
 }
 
 void
@@ -371,7 +396,7 @@ Grob::handle_prebroken_dependencies ()
   if (original_)
     {
       Item * it = dynamic_cast<Item*> (this);
-      substitute_mutable_properties (scm_int2num (it->break_status_dir ()),
+      substitute_mutable_properties (gh_int2scm (it->break_status_dir ()),
                               original_->mutable_property_alist_);
     }
 }
@@ -432,10 +457,10 @@ Grob::get_offset (Axis a) const
   while (dim_cache_[a].offsets_left_)
     {
       int l = --me->dim_cache_[a].offsets_left_;
-      SCM cb = scm_list_ref (dim_cache_[a].offset_callbacks_,  scm_int2num (l));
-      SCM retval = scm_call_2 (cb, self_scm (), scm_int2num (a));
+      SCM cb = scm_list_ref (dim_cache_[a].offset_callbacks_,  gh_int2scm (l));
+      SCM retval = gh_call2 (cb, self_scm (), gh_int2scm (a));
 
-      Real r =  ly_scm2double (retval);
+      Real r =  gh_scm2double (retval);
       if (isinf (r) || isnan (r))
        {
          programming_error (INFINITY_MSG);
@@ -450,8 +475,8 @@ Grob::get_offset (Axis a) const
 bool
 Grob::is_empty (Axis a)const
 {
-  return ! (ly_c_pair_p (dim_cache_[a].dimension_) ||
-           ly_c_procedure_p (dim_cache_[a].dimension_));
+  return ! (gh_pair_p (dim_cache_[a].dimension_) ||
+           gh_procedure_p (dim_cache_[a].dimension_));
 }
 
 Interval
@@ -462,19 +487,19 @@ Grob::extent (Grob * refp, Axis a) const
   
   Dimension_cache * d = (Dimension_cache *)&dim_cache_[a];
   Interval ext ;   
-  if (ly_c_pair_p (d->dimension_))
+  if (gh_pair_p (d->dimension_))
     ;
-  else if (ly_c_procedure_p (d->dimension_))
+  else if (gh_procedure_p (d->dimension_))
     {
       /*
        FIXME: add doco on types, and should typecheck maybe? 
        */
-      d->dimension_= scm_call_2 (d->dimension_, self_scm (), scm_int2num (a));
+      d->dimension_= gh_call2 (d->dimension_, self_scm (), gh_int2scm (a));
     }
   else
     return ext;
 
-  if (!ly_c_pair_p (d->dimension_))
+  if (!gh_pair_p (d->dimension_))
     return ext;
   
   ext = ly_scm2interval (d->dimension_);
@@ -486,19 +511,19 @@ Grob::extent (Grob * refp, Axis a) const
   /*
     signs ?
    */
-  if (ly_c_pair_p (extra))
+  if (gh_pair_p (extra))
     {
-      ext[BIGGER] +=  ly_scm2double (ly_cdr (extra));
-      ext[SMALLER] +=   ly_scm2double (ly_car (extra));
+      ext[BIGGER] +=  gh_scm2double (ly_cdr (extra));
+      ext[SMALLER] +=   gh_scm2double (ly_car (extra));
     }
   
   extra = get_property (a == X_AXIS
                                ? "minimum-X-extent"
                                : "minimum-Y-extent");
-  if (ly_c_pair_p (extra))
+  if (gh_pair_p (extra))
     {
-      ext.unite (Interval (ly_scm2double (ly_car (extra)),
-                          ly_scm2double (ly_cdr (extra))));
+      ext.unite (Interval (gh_scm2double (ly_car (extra)),
+                          gh_scm2double (ly_cdr (extra))));
     }
 
   ext.translate (x);
@@ -528,7 +553,7 @@ Grob::common_refpoint (Grob const* s, Axis a) const
 Grob *
 common_refpoint_of_list (SCM elist, Grob *common, Axis a) 
 {
-  for (; ly_c_pair_p (elist); elist = ly_cdr (elist))
+  for (; gh_pair_p (elist); elist = ly_cdr (elist))
     {
       Grob * s = unsmob_grob (ly_car (elist));
       if (!s)
@@ -567,8 +592,8 @@ Grob::name () const
 {
   SCM meta = get_property ("meta");
   SCM nm = scm_assoc (ly_symbol2scm ("name"), meta);
-  nm = (ly_c_pair_p (nm)) ? ly_cdr (nm) : SCM_EOL;
-  return  ly_c_symbol_p (nm) ? ly_symbol2string (nm) :  classname (this);  
+  nm = (gh_pair_p (nm)) ? ly_cdr (nm) : SCM_EOL;
+  return  gh_symbol_p (nm) ? ly_symbol2string (nm) :  classname (this);  
 }
 
 void
@@ -576,7 +601,7 @@ Grob::add_offset_callback (SCM cb, Axis a)
 {
   if (!has_offset_callback (cb, a))
   {
-    dim_cache_[a].offset_callbacks_ = scm_cons (cb, dim_cache_[a].offset_callbacks_);
+    dim_cache_[a].offset_callbacks_ = gh_cons (cb, dim_cache_[a].offset_callbacks_);
     dim_cache_[a].offsets_left_ ++;
   }
 }
@@ -597,7 +622,7 @@ Grob::has_offset_callback (SCM cb, Axis a)const
 void
 Grob::set_extent (SCM dc, Axis a)
 {
-  dim_cache_[a].dimension_ = dc;
+  dim_cache_[a].dimension_ =dc;
 }
 
 void
@@ -748,9 +773,9 @@ ly_scm2grobs (SCM l)
 {
   Link_array<Grob> arr;
 
-  for (SCM s = l; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = l; gh_pair_p (s); s = gh_cdr (s))
     {
-      SCM e = ly_car (s);
+      SCM e = gh_car (s);
       arr.push (unsmob_grob (e));
     }
 
@@ -764,7 +789,7 @@ ly_grobs2scm (Link_array<Grob> a)
 {
   SCM s = SCM_EOL;
   for (int i = a.size (); i; i--)
-    s = scm_cons (a[i-1]->self_scm (), s);
+    s = gh_cons (a[i-1]->self_scm (), s);
 
   return s;
 }
@@ -808,8 +833,6 @@ ADD_INTERFACE (Grob, "grob-interface",
               "staff-symbol interfaces dependencies X-extent Y-extent extra-X-extent "
               "meta layer before-line-breaking-callback "
               "after-line-breaking-callback extra-Y-extent minimum-X-extent "
-              // FIXME: page-penalty?
-              "minimum-Y-extent page-penalty transparent "
-              );
+              "minimum-Y-extent transparent");
 
 
index 4c31cbad2e1ea83508f29742fe7124792d5bbe9b..629f8254609f5042453d3f2167c36f01d0f03cfe 100644 (file)
@@ -13,7 +13,7 @@
 #include "spanner.hh"
 #include "font-interface.hh"
 #include "dimensions.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "warn.hh"
 #include "paper-column.hh"
 #include "lookup.hh"
@@ -41,7 +41,7 @@ Hairpin::print (SCM smob)
   /*
     Ugh. property name is not general.
    */
-  Real padding = ly_scm2double (me->get_property ("if-text-padding"));
+  Real padding = gh_scm2double (me->get_property ("if-text-padding"));
  
   Drul_array<bool> broken;
   Drul_array<Item*> bounds ;
index 4cf8465f3fcc1819e0645646c1bc78be58ead8d8..dabcf7c7e186d054dbb6d5fb76496acfc04d6118 100644 (file)
@@ -19,7 +19,7 @@ SCM
 Hara_kiri_group_spanner::y_extent (SCM element_smob, SCM scm_axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (scm_axis);
+  Axis a = (Axis) gh_scm2int (scm_axis);
 
   assert (a == Y_AXIS);
   consider_suicide (me);
@@ -32,7 +32,7 @@ Hara_kiri_group_spanner::consider_suicide (Grob*me)
 {
   Spanner*sp = dynamic_cast<Spanner*> (me);
   SCM worth = me->get_property ("items-worth-living");
-  if (ly_c_pair_p (worth))
+  if (gh_pair_p (worth))
     return ;
 
   if (!to_boolean (me->get_property ("remove-first"))
@@ -63,10 +63,10 @@ SCM
 Hara_kiri_group_spanner::force_hara_kiri_callback (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) gh_scm2int (axis);
   assert (a == Y_AXIS);
   consider_suicide (me);
-  return scm_make_real (0.0);
+  return gh_double2scm (0.0);
 }
 
 
@@ -75,10 +75,10 @@ SCM
 Hara_kiri_group_spanner::force_hara_kiri_in_parent_callback (SCM element_smob, SCM axis)
 {
   Grob *daughter = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) gh_scm2int (axis);
   assert (a == Y_AXIS);
   force_hara_kiri_callback (daughter->get_parent (a)->self_scm (), axis);
-  return scm_make_real (0.0);
+  return gh_double2scm (0.0);
 }
 
 void
index 494a90bc5017c0aed6d671b8126c0d3c66056a93..99836973b4ccc5066650211ae193f20d9dfdd82b 100644 (file)
@@ -91,8 +91,9 @@ Horizontal_bracket_engraver::process_music ()
 {
   for  (int k = 0; k < push_count_; k++)
     {
-      Spanner * sp = make_spanner ("HorizontalBracket", events_[k]->self_scm ());
+      Spanner * sp = make_spanner ("HorizontalBracket");
 
+      announce_grob (sp, events_[k]->self_scm ());
       for (int i = 0; i < bracket_stack_.size (); i++)
        {
          /*
@@ -111,7 +112,7 @@ Horizontal_bracket_engraver::stop_translation_timestep ()
   for (int i = pop_count_; i--;)
     {
       if (bracket_stack_.size ())
-       bracket_stack_.pop ();
+       typeset_grob (bracket_stack_.pop ());
     }
   pop_count_ = 0;
   push_count_ = 0;
index de9ccb32514f3a1fb1b844af1a4efb756b45ca48..4961721496ee18c0939e96fdfc7ac52b5e7420be 100644 (file)
@@ -11,7 +11,7 @@
 #include "lookup.hh"
 #include "group-interface.hh"
 #include "directional-element-interface.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "staff-symbol-referencer.hh"
 
 struct Horizontal_bracket
index 727a657606f43a50ff33bb3cf879af420f69835c..b1614ca9ab5f713e8a596a077d47e332c33d017d 100644 (file)
@@ -73,9 +73,9 @@ completize_hyphen (Spanner* sp)
   if (!sp->get_bound (RIGHT))
     {
       SCM heads = sp->get_property ("heads");
-      if (ly_c_pair_p (heads))
+      if (gh_pair_p (heads))
        {
-         Item* it = dynamic_cast<Item*> (unsmob_grob (ly_car (heads)));
+         Item* it = dynamic_cast<Item*> (unsmob_grob (gh_car (heads)));
          if (it)
            sp->set_bound (RIGHT, it);
        }
@@ -97,6 +97,7 @@ Hyphen_engraver::finalize ()
          hyphen_->suicide ();
        }
 
+      typeset_grob (hyphen_);
       hyphen_ = 0;
     }
 
@@ -109,6 +110,7 @@ Hyphen_engraver::finalize ()
          finished_hyphen_->warning (_("unterminated hyphen; removing"));
          finished_hyphen_->suicide ();
        }
+      typeset_grob (finished_hyphen_);
       finished_hyphen_ =0;
     }
 }
@@ -118,8 +120,8 @@ Hyphen_engraver::process_music ()
 {
   if (ev_)
     {
-      hyphen_ = make_spanner ("LyricHyphen", ev_->self_scm ()
-);
+      hyphen_ = make_spanner ("LyricHyphen");
+      announce_grob (hyphen_, ev_->self_scm ());
     }
 }
 
@@ -129,12 +131,14 @@ Hyphen_engraver::stop_translation_timestep ()
 {
   if (finished_hyphen_ && finished_hyphen_->get_bound (RIGHT))
     {
+      typeset_grob (finished_hyphen_);
       finished_hyphen_ = 0;
     }
 
   if (finished_hyphen_ && hyphen_)
     {
       programming_error ("Haven't finished hyphen yet.");
+      typeset_grob (finished_hyphen_);
       finished_hyphen_ =0;
     }
   
index 7846df26665834ebb7fad38740780f9a58824ded..49a33024004827b2b17f90f21064a6157c74e179 100644 (file)
@@ -1,17 +1,20 @@
-/*
-  identifier-smob.cc -- implement glue to pass Scheme expressions off as
-  identifiers.
+/*   
+identifier-smob.cc -- implement glue to pass Scheme expressions off as
+identifiers.
 
-  source file of the GNU LilyPond music typesetter
+source file of the GNU LilyPond music typesetter
 
-  (c) 2002--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
+(c) 2002--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
+*/
 #include "identifier-smob.hh"
-
+/*
+  C&P from example/box.c
+ */
 
 scm_t_bits package_tag;
 
+/* Print a textual represenation of the smob to a given port.  */
 static int
 print_box (SCM b, SCM port, scm_print_state *)
 {
@@ -25,16 +28,20 @@ print_box (SCM b, SCM port, scm_print_state *)
   return 1;
 }
 
+
 /* This defines the primitve `make-box', which returns a new smob of
    type `box', initialized to `#f'.  */
-LY_DEFINE (ly_export, "ly:export",
-          1, 0, 0, (SCM arg),
-          "Export a Scheme object to the parser, "
-          "so it is treated as an identifier.")
+LY_DEFINE (package_identifier, "ly:export", 1, 0, 0, (SCM arg),
+         "Export a Scheme object to the parser, so it is treated as an identifier.")
 {
+  /* This macro creates the new objects, stores the value `#f' into it
+     and returns it to the caller.  */
   SCM_RETURN_NEWSMOB (package_tag, arg);
 }
 
+
+/* This is the primitive `box-ref' which returns the object stored in
+   the box.  */
 SCM
 unpack_identifier (SCM box)
 {
@@ -51,5 +58,4 @@ init_box_type (void)
   scm_set_smob_mark (package_tag, scm_markcdr);
   scm_set_smob_print (package_tag, print_box);
 }
-
 ADD_SCM_INIT_FUNC (package, init_box_type); 
index 6c473c6d7e0b674bad7c5c4bcfa986306772c5be..aab8fd9fcd850446fae03fb0f7f4469a12608e30 100644 (file)
@@ -40,9 +40,10 @@ Includable_lexer::Includable_lexer ()
   allow_includes_b_ = true;
 }
 
-/** Set the new input file to NAME, remember old file.  */
+/** set the  new input to s, remember old file.
+*/
 void
-Includable_lexer::new_input (String name, Sources *sources)
+Includable_lexer::new_input (String s, Sources  * global_sources)
 {
   if (!allow_includes_b_)
     {
@@ -50,39 +51,45 @@ Includable_lexer::new_input (String name, Sources *sources)
       return;
     }
   
-  Source_file *file = sources->get_file (name);
-  if (!file)
+  Source_file * sl = global_sources->get_file (s);
+  if (!sl)
     {
-      String msg = _f ("can't find file: `%s'", name);
+      String msg = _f ("can't find file: `%s'", s);
       msg += "\n";
-      msg += _f ("(search path: `%s')",
-                sources->path_->to_string ().to_str0 ());
+      msg += _f ("(search path: `%s')", global_sources->path_C_->to_string ().to_str0 ());
       msg += "\n";
       LexerError (msg.to_str0 ());
+
       return;
     }
-  filename_strings_.push (file->name_string ());
+  filename_strings_.push (sl->name_string ());
 
   char_count_stack_.push (0);
   if (yy_current_buffer)
     state_stack_.push (yy_current_buffer);
 
   if (verbose_global_b)
-    progress_indication (String ("[") + name);
+    progress_indication (String ("[") + s);
        
-  include_stack_.push (file);
+  include_stack_.push (sl);
 
-  /* Ugh. We'd want to create a buffer from the bytes directly.
+  /*
+    ugh. We'd want to create a buffer from the bytes directly.
 
-    Whoops.  The size argument to yy_create_buffer is not the
-    filelength but a BUFFERSIZE.  Maybe this is why reading stdin fucks up.  */
-  yy_switch_to_buffer (yy_create_buffer (file->get_istream (), YY_BUF_SIZE));
+    Whoops. The size argument to yy_create_buffer is not the
+    filelength but a BUFFERSIZE. Maybe this is why reading stdin fucks up.
+
+  */
+  yy_switch_to_buffer (yy_create_buffer (sl->get_istream (), YY_BUF_SIZE));
 }
 
+/*
+  Unused.
+ */
 void
-Includable_lexer::new_input (String name, String data, Sources *sources)
+Includable_lexer::new_input (String name, String data, Sourcessources)
 {
-  Source_file *file = new Source_file (name, data);
+  Source_filefile = new Source_file (name, data);
   sources->add (file);
   filename_strings_.push (name);
 
@@ -98,8 +105,7 @@ Includable_lexer::new_input (String name, String data, Sources *sources)
 }
 
 /** pop the inputstack.  conceptually this is a destructor, but it
-  does not destruct the Source_file that Includable_lexer::new_input
-  creates.  */
+  does not destruct the Source_file that Includable_lexer::new_input creates.  */
 bool
 Includable_lexer::close_input ()
 {
@@ -118,8 +124,11 @@ Includable_lexer::close_input ()
 #endif  
       return false;
     }
-  yy_switch_to_buffer (state_stack_.pop ());
-  return true;
+  else
+    {
+      yy_switch_to_buffer (state_stack_.pop ());
+      return true;
+    }
 }
 
 char const*
index ebf8b6afb6bc61bbad048b6dcd2d5285a13c51b5..14ab748e93d9c6ab03b1e54df26ff4ff5a639a7a 100644 (file)
 #include "font-metric.hh"
 #include "parse-afm.hh"
 
-class Adobe_font_metric : public Simple_font_metric
+struct Adobe_font_metric : Font_metric
 {
-public:
-  AFM_Font_info *font_info_;
-  unsigned int checksum_;
-  Real design_size_;
-
-  ~Adobe_font_metric ();
+  AFM_Font_info * font_inf_;
 
   virtual int name_to_index (String) const;
   virtual int count () const;
-  virtual int index_to_ascii (int) const;
   virtual Box get_ascii_char (int) const;
   virtual Box get_indexed_char (int) const;
   virtual Offset get_indexed_wxwy (int) const;
-  virtual String coding_scheme () const;
-  static SCM make_afm (AFM_Font_info*, unsigned, Real);
-  virtual Real design_size () const;
-
-protected:
+  
   AFM_CharMetricInfo const *find_char_metric (String name) const;
   AFM_CharMetricInfo const *find_ascii_metric (int) const;  
 
+  String to_string () const;
+  ~Adobe_font_metric ();
+  static SCM make_afm (AFM_Font_info*, unsigned);
+
+  unsigned int checksum_;
+protected:
   Array<int> ascii_to_metric_idx_;
   std::map<String,int> name_to_metric_dict_;
 
+  virtual Stencil find_by_name (String) const;
+
   Adobe_font_metric (AFM_Font_info*);
 };
 
-SCM read_afm_file (String);
-Box afm_bbox_to_box (AFM_BBox);
+SCM read_afm_file (String fn);
+Box afm_bbox_to_box (AFM_BBox bb);
   
+
 #endif /* AFM_HH */
 
index 457629455fff9750491a20be6aa07c5814e5e105..05fe7e161b0f0de1dc0afe1f0102b6c874aaca14 100644 (file)
@@ -10,6 +10,7 @@
 #ifndef ALIGN_INTERFACE_HH
 #define ALIGN_INTERFACE_HH
 
+#include "axes.hh"
 #include "lily-proto.hh"
 #include "lily-guile.hh"
 
index 776a38d16f40f45027619f52ba1010a1570e7a5e..7174d16dbb45f80f27fb260409a585965c517de1 100644 (file)
@@ -34,7 +34,5 @@ public:
   SCM font_descriptions () const;
 };
 
-extern All_font_metrics *all_fonts_global;
-
 #endif /* ALL_FONTS_HH */
 
index 9b78075c6e6999eb69ce6b49502c2633f6947038..18f51d5bfba764c270cfacb68c7dc6a53586efdb 100644 (file)
@@ -23,8 +23,10 @@ public:
 
   void add_audio_item (Audio_item* i);
   Moment at_mom () const;
+  void print () const;
 
   Link_array<Audio_item> audio_items_;
+  Performance * performance_;
 
 private:
   Audio_column (Audio_column const&);
index b4ded08818c95a3147b3127e2f65915bbea8c88d..8ab5d48fc3ac50c81d3d55d81022661a097e1974 100644 (file)
@@ -11,6 +11,7 @@
 #include "real.hh"
 #include "drul-array.hh"
 #include "interval.hh"
+#include "axes.hh"
 #include "offset.hh"
 #include "array.hh"
 #include "polynomial.hh"
diff --git a/lily/include/book-paper-def.hh b/lily/include/book-paper-def.hh
deleted file mode 100644 (file)
index 9ae39ed..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-  book-paper-def.hh -- declare Output_def
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 2004  Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#ifndef BOOK_PAPER_DEF_HH
-#define BOOK_PAPER_DEF_HH
-
-#include "lily-proto.hh"
-#include "output-def.hh"
-
-class Output_def : public Output_def
-{
-public:
-  VIRTUAL_COPY_CONSTRUCTOR (Output_def, Output_def);
-  Output_def (Output_def const &);
-
-  Output_def ();
-
-  virtual void derived_mark ();
-};
-
-#endif /* BOOK_PAPER_DEF_HH */
diff --git a/lily/include/book.hh b/lily/include/book.hh
deleted file mode 100644 (file)
index 2a81201..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-  book.hh -- declare Book
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#ifndef BOOK_HH
-#define BOOK_HH
-
-#include "input.hh"
-#include "lily-proto.hh"
-#include "parray.hh"
-#include "smobs.hh"
-
-class Book : public Input
-{
-  DECLARE_SMOBS (Book, foo);
-
-public:
-  SCM header_;
-  Output_def *bookpaper_;
-  
-  Link_array<Score> scores_;
-  Book ();
-
-  Paper_book* process (String, Output_def*);
-};
-DECLARE_UNSMOB (Book, book);
-
-#endif /* BOOK_HH */
index a04661fa56a55b0f0d0e1e2f874c318228cbb673..252b695e7bc32e2df24c2db0dd87666075d1100c 100644 (file)
@@ -9,6 +9,8 @@
 #include "real.hh"
 #include "interval.hh"
 #include "offset.hh"
+#include "axes.hh"
+
 
 struct Box
 {
index afa6f6bd1720c4d86d6fccd19c5f3514776c8325..b9ec709ecfe151f9e9425397c0539cf671b2e463 100644 (file)
@@ -13,6 +13,7 @@
 
 class Coherent_ligature_engraver : public Ligature_engraver
 {
+
 public:
   TRANSLATOR_DECLARATIONS(Coherent_ligature_engraver);
 
@@ -22,6 +23,7 @@ protected:
   virtual void typeset_ligature (Spanner *ligature,
                                 Array<Grob_info> primitives);
   virtual void get_set_column (Item *, Paper_column *);
+
 private:
   void collect_accidentals (Spanner *, Array<Grob_info>);
 };
index c734ed924086a6a5a7bcf65e25a78c0d016d75db..3760c044a62468043b9b83c36ea7c2f95909a6aa 100644 (file)
@@ -7,8 +7,8 @@
   
  */
 
-#ifndef CONTEXT_DEF_HH
-#define CONTEXT_DEF_HH
+#ifndef TRANSLATOR_DEF_HH
+#define TRANSLATOR_DEF_HH
 
 #include "lily-proto.hh"
 #include "smobs.hh"
@@ -36,28 +36,27 @@ public:
   void add_context_mod (SCM);
   SCM default_child_context_name ();
   SCM get_context_name () const;
-  SCM get_accepted (SCM) const;
-  SCM get_property_ops () const { return property_ops_; }
+  SCM get_accepted (SCM)  const;
+  SCM get_property_ops ()  const { return property_ops_; }
   SCM get_translator_names (SCM) const;
   void set_acceptor (SCM accepts, bool add);
 
-  Link_array<Context_def> path_to_acceptable_context (SCM type_string,
-                                                     Output_def*) const;
+  Link_array<Context_def> path_to_acceptable_context (SCM type_string, Music_output_def* odef) const;
   Context * instantiate (SCM extra_ops);
 
   SCM to_alist () const;
-  static SCM make_scm ();
-
-  SCM clone_scm () const;
-  void apply_default_property_operations (Context*);
+  static SCM make_scm () ;
 
+  SCM clone_scm ()const;
+  void apply_default_property_operations (Context *);
 private:
-  DECLARE_SMOBS (Context_def, foo);
+  DECLARE_SMOBS (Context_def,foo);
   Context_def ();
   Context_def (Context_def const&);
 };
 
-DECLARE_UNSMOB (Context_def, context_def);
+DECLARE_UNSMOB(Context_def,context_def);
+
 
-#endif /* CONTEXT_DEF_HH */
+#endif /* TRANSLATOR_DEF_HH */
 
index af504c121881480047f21744d01989ee833495f3..004f68fdba88eeaedb921ac37da81e823087f660 100644 (file)
@@ -21,65 +21,53 @@ class Context
   DECLARE_SMOBS (Context, dummy);
 
   void terminate ();
-
-private:
-  friend class Interpretation_context_handle;
-  int iterator_count_;
-  bool init_;
-  
-protected:
-  Context * daddy_context_;
+public:
   SCM definition_;
   SCM properties_scm_;
   SCM context_list_;
   SCM accepts_list_;
   SCM aliases_;
-  SCM implementation_;
-  String id_string_;
 
-  friend class Context_def;
-public:
-  String id_string () const { return id_string_; } 
-  SCM children_contexts () const { return context_list_; }
-  SCM default_child_context_name () const;
-
-  Translator_group* implementation () const;
-  Context * get_parent_context () const;
+  Context * daddy_context_;
+  
   Context ();
-
-  /*
-    properties:
-   */
   void execute_pushpop_property (SCM prop, SCM sym, SCM val);
   SCM internal_get_property (SCM name_sym) const;
-  SCM properties_as_alist () const;
-  void internal_set_property (SCM var_sym, SCM value);  
-  Context *where_defined (SCM name_sym) const;
-  void unset_property (SCM var_sym);
 
-  
   Context *remove_context (Context*trans);
   void check_removal ();
+
+  SCM properties_as_alist () const;
+  void unset_property (SCM var_sym);
+  void internal_set_property (SCM var_sym, SCM value);  
+
+  Context *where_defined (SCM name_sym) const;
   String context_name () const;
   Global_context * get_global_context () const;
   
   virtual Score_context * get_score_context () const;  
-  virtual Output_def *get_output_def () const;
-  virtual Moment now_mom () const;
-  virtual Context *get_default_interpreter ();
-
   bool is_alias (SCM) const;
   void add_alias (SCM); 
   void add_context (Context *trans);
   bool is_bottom_context () const;
   bool is_removable () const;
   bool try_music (Music *);
-
+  
+  virtual Music_output_def *get_output_def () const;
+  virtual Moment now_mom () const;
+  Context *find_context_below (SCM context_name, String id);
   Context *find_create_context (SCM context_name,
-                               String id, SCM ops);
+                                           String id, SCM ops);
   Link_array<Context> path_to_acceptable_context (SCM alias,
-                                                 Output_def*) const;
+                                                 Music_output_def*) const;
+  virtual Context *get_default_interpreter ();
+  String id_string_;
 
+  SCM implementation_;
+private:
+  friend class Interpretation_context_handle;
+  int iterator_count_;
+  bool init_;
 };
 
 /*
@@ -90,7 +78,7 @@ void apply_property_operations (Context*tg, SCM pre_init_ops);
 void execute_pushpop_property (Context * trg, SCM prop, SCM eltprop, SCM val);
 SCM updated_grob_properties (Context* tg, SCM sym);
 Context * find_context_below (Context * where,
-                             SCM type_sym, String id);
+                   String type, String id);
 bool melisma_busy (Context*);
 
 Context *get_voice_to_lyrics (Context *lyrics);
index a72361a6f4ea7c90799f320a8c7a5ab918625687..c5f54a17e7afcec833352a1125463cf9290917e2 100644 (file)
@@ -36,7 +36,6 @@ const Real PT_TO_MM = (1.0/MM_TO_PT);
 #define CHAR *CHAR_TO_PT *PT_TO_MM
 #define INTERNAL_UNIT "mm"
 
-
 #endif
 
 String print_dimen (Real);
index 1535a245cc1408d8235e8cd90ca065e3f081de1b..76f2a122bfb897dcc14c3ab06fa2e32ac404a5e1 100644 (file)
@@ -25,6 +25,10 @@ class Engraver : public virtual Translator {
     
   friend class Engraver_group_engraver;
 protected:
+  /*
+    Call this when you're finished with ELEM_P.
+   */
+  virtual void typeset_grob (Grob*elem);
   /*
     take note of item/spanner
     put item in spanner. Adjust local key; etc.
@@ -38,16 +42,14 @@ protected:
      
    */
   virtual void process_acknowledged_grobs () {}
-
+  /**
+    Announce element. Default: pass on to daddy. Utility
+    */
+  virtual void announce_grob (Grob*, SCM cause);
   virtual void announce_grob (Grob_info);
   Engraver_group_engraver*get_daddy_engraver () const;
 
 public:
-  /**
-    Announce element. Default: pass on to daddy. Utility
-    */
-  void announce_grob (Grob*, SCM cause);
-  
   Score_engraver * get_score_engraver () const;
   /**
     override other ctor
@@ -55,10 +57,10 @@ public:
   TRANSLATOR_DECLARATIONS(Engraver);
 };
 
-#define make_item(x,cause) make_item_from_properties (this, ly_symbol2scm (x), cause)
-#define make_spanner(x,cause) make_spanner_from_properties (this, ly_symbol2scm (x), cause)
-Item* make_item_from_properties (Translator * tg, SCM x, SCM cause);
-Spanner* make_spanner_from_properties (Translator * tg, SCM x, SCM cause);
+#define make_item(x) make_item_from_properties (daddy_context_, ly_symbol2scm (x))
+#define make_spanner(x) make_spanner_from_properties (daddy_context_, ly_symbol2scm (x))
+Item* make_item_from_properties (Context * tg, SCM x);
+Spanner* make_spanner_from_properties (Context * tg, SCM x);
 
 
 
index 769a16095a83b252fa7d53924c9d21510985ab0d..4f8079f963f6dc1569b677594ceaf4edd31896bb 100644 (file)
@@ -20,41 +20,28 @@ struct Font_metric
 {
 public:
   SCM description_;
-  String filename_;
+  String path_;
   
   virtual int count () const;
   virtual Offset get_indexed_wxwy (int) const;
   virtual Box get_indexed_char (int index) const;
   virtual Box get_ascii_char (int ascii) const;
+  virtual Box text_dimension (String)  const;
   virtual int name_to_index (String) const;
-  virtual int index_to_ascii (int) const;
-  virtual Real design_size () const;
+
   virtual Stencil find_by_name (String) const;
   virtual Stencil get_indexed_char_stencil (int k) const;
-  virtual Stencil get_ascii_char_stencil (int k) const;
-  virtual String coding_scheme () const;
+  virtual Stencil get_ascii_char_stencil (int k) const;  
   
   DECLARE_SMOBS (Font_metric,);
-
 private:
-  /* No copying, no implicit copy constructor.  */
-  Font_metric (Font_metric const&);
-
+  Font_metric (Font_metric const&); // no copy.
 protected:
   virtual void derived_mark () const;
 
   Font_metric ();
 };
 
-int get_encoded_index (Font_metric *m, String input_coding, int code);
-
-struct Simple_font_metric : public Font_metric
-{
-public:
-  
-};
-  
-
 DECLARE_UNSMOB(Font_metric, metrics);
 
 #endif /* FONT_METRIC_HH */
index 353b8cf0443b45ff8a2b2bbbd7959e1748a7f826..c3f1834f02af9532da6a3a5d2fe3022fe502b4f4 100644 (file)
 class Global_context : public virtual Context
 {
   PQueue<Moment> extra_mom_pq_;
-  Output_def*  output_def_;
+  Music_output_def*  output_def_;
   
-  friend class Output_def;
+  friend class Music_output_def;
 public:
-  Global_context (Output_def*, Moment final);
+  Global_context (Music_output_def*, Moment final);
   int get_moments_left () const;
   Moment sneaky_insert_extra_moment (Moment);
   void add_moment_to_process (Moment);
@@ -34,7 +34,7 @@ public:
   virtual void prepare (Moment);
   virtual void one_time_step ();
   virtual void finish ();
-  virtual Output_def* get_output_def () const; 
+  virtual Music_output_def* get_output_def () const; 
   virtual Moment now_mom () const;
   virtual Context *get_default_interpreter ();
 
index 314418ad1e0a5c061177f7484dd16c619cf6f43b..fba4a8eaad15bb0f311b6edff9a70afaeea38fab 100644 (file)
@@ -22,6 +22,7 @@
     */
 enum Grob_status {
   ORPHAN=0,                    // not yet added to Paper_score
+  VIRGIN,      
   PRECALCING,
   PRECALCED,           // calcs before spacing done
   POSTCALCING,         // busy calculating. This is used to trap cyclic deps.
@@ -30,62 +31,73 @@ enum Grob_status {
 
 typedef void (Grob::*Grob_method_pointer) (void);
 
-// looking at gtk+/pango docstrings .. WIP
 
-/**
- * Grob:
- * @internal_get_property: get property #NAME.
- *
- * Class structure for #Grob.
- **/
+/* Basic G[raphical output] O[bject].  */
 class Grob
 {
-private:  
-  DECLARE_SMOBS (Grob, foo);
-  void init ();
-
 protected:
   SCM immutable_property_alist_;
   SCM mutable_property_alist_;
   friend class Spanner;
   
-  void substitute_mutable_properties (SCM, SCM);
-  char status_;
-  
+  void substitute_mutable_properties(SCM,SCM);
+
 public:
   Grob *original_;
 
-  /* TODO: junk this member. */
-  Paper_score *pscore_;
+  /**
+    Administration: Where are we?. This is mainly used by Super_element and
+    Grob::calcalute_dependencies ()
+
+    0 means ORPHAN,
+   */
+  char status_;
+
 
+  /*
+    IDEA: make this a global variable. This is the same for all
+    elements, I think it is safe to assume that we will not have
+    scores being formatted multithreadedly.
+   */
+  Paper_score *pscore_;
   Dimension_cache dim_cache_[NO_AXES];
 
   Grob (SCM basic_props);
   Grob (Grob const&);
-  VIRTUAL_COPY_CONSTRUCTOR (Grob, Grob);
-  DECLARE_SCHEME_CALLBACK (stencil_extent, (SCM smob, SCM axis));
+  VIRTUAL_COPY_CONSTRUCTOR(Grob,Grob);
  
   String name () const;
-
-
+  
   /*
-    Properties
+    properties
    */
   SCM internal_get_property (SCM) const;
   void internal_set_property (SCM, SCM val);
   void add_to_list_property (SCM, SCM);
-
-  SCM get_property_alist_chain (SCM) const;
-  static SCM ly_grob_set_property (SCM, SCM,SCM);
-  static SCM ly_grob_property (SCM, SCM);  
-
-  void warning (String) const;
-  void programming_error (String) const;
+  void warning (String)const;
+  void programming_error (String)const;
   
-  Output_def *get_paper () const;
+  void set_elt_pointer (const char*, SCM val);
+  friend class Property_engraver; //  UGHUGHUGH.
+  /*
+    related classes.
+   */
+  Paper_def *get_paper () const;
+
+  /**
+    add a dependency. It may be the 0 pointer, in which case, it is ignored.
+    */
   void add_dependency (Grob*);    
-  virtual System *get_system () const;
+  virtual System * get_system () const;
+
+  /**
+     Recursively track all dependencies of this Grob.  The
+     status_ field is used as a mark-field.  It is marked with
+     #busy# during execution of this function, and marked with #final#
+     when finished.
 
+     #funcptr# is the function to call to update this element.
+   */
   void calculate_dependencies (int final, int busy, SCM funcname);
 
 
@@ -94,54 +106,61 @@ public:
   virtual void discretionary_processing ();
   virtual SCM do_derived_mark () const;
 
-  Stencil *get_stencil () const;
+  Stencil * get_stencil () const;
   SCM get_uncached_stencil () const;
 
+  SCM get_property_alist_chain (SCM) const;
   void suicide ();
-  bool is_live () const;
-  bool is_empty (Axis a) const;
+  bool live () const;
   
+  DECLARE_SCHEME_CALLBACK (stencil_extent, (SCM smob, SCM axis));
+
+  static SCM ly_grob_set_property (SCM, SCM,SCM);
+  static SCM ly_grob_property (SCM, SCM);  
+
   bool internal_has_interface (SCM intf);
-  static bool has_interface (Grob *me);
+  static bool has_interface (Grob*me);  
 
   virtual void handle_broken_dependencies ();
   virtual void handle_prebroken_dependencies ();
 
+  DECLARE_SMOBS (Grob,foo);
+
+  void init ();
+public:
+  bool is_empty (Axis a) const;
+
   Interval extent (Grob * refpoint, Axis) const;
  
   void translate_axis (Real, Axis);
-  Real relative_coordinate (Grob const *refp, Axis) const;
-  Grob *common_refpoint (Grob const *s, Axis a) const;
+  Real relative_coordinate (Grob const* refp, Axis) const;
+  Grob*common_refpoint (Grob const* s, Axis a) const;
+
 
   // duh. slim down interface here. (todo)
-  bool has_offset_callback (SCM callback, Axis) const;
+  bool has_offset_callback (SCM callback, Axis)const;
   void add_offset_callback (SCM callback, Axis);
-  bool has_extent_callback (SCM, Axis) const;
-  void set_extent (SCM, Axis);
+  bool has_extent_callback (SCM, Axis)const;  
+  void set_extent (SCM , Axis);
   Real get_offset (Axis a) const;
   
   void set_parent (Grob* e, Axis);
-
-  // URG
-  Grob *get_parent (Axis a) const
-  {
-    return  dim_cache_[a].parent_;
-  }
-
+  
+  Grob *get_parent (Axis a) const {   return  dim_cache_[a].parent_; }
   DECLARE_SCHEME_CALLBACK (fixup_refpoint, (SCM));
 };
 
-DECLARE_UNSMOB (Grob, grob);
-Spanner *unsmob_spanner (SCM);
-Item *unsmob_item (SCM);
+DECLARE_UNSMOB(Grob,grob);
+Spanner* unsmob_spanner (SCM );
+Item* unsmob_item (SCM );
 
-Grob *common_refpoint_of_list (SCM elt_list, Grob *, Axis a);
-Grob *common_refpoint_of_array (Link_array<Grob> const&, Grob *, Axis a);
+Grob*common_refpoint_of_list (SCM elt_list, Grob * , Axis a);
+Grob*common_refpoint_of_array (Link_array<Grob> const&, Grob * , Axis a);
 
 void set_break_subsititution (SCM criterion);
 SCM substitute_mutable_property_alist (SCM alist);
 
-Link_array<Grob> ly_scm2grobs (SCM ell);
+Link_array<Grob> ly_scm2grobs (SCM l);
 SCM ly_grobs2scm (Link_array<Grob> a);
 
 #endif /* GROB_HH */
index 196eea71f9761ad55529baa8370327a35e4418d4..55519b0123a6e8dc37d0d6f921792a5869a7e475 100644 (file)
@@ -42,9 +42,9 @@ Pointer_group_interface__extract_grobs (Grob const *elt, T *, const char* name)
 {
   Link_array<T> arr;
 
-  for (SCM s = elt->get_property (name); ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = elt->get_property (name); gh_pair_p (s); s = gh_cdr (s))
     {
-      SCM e = ly_car (s);
+      SCM e = gh_car (s);
       arr.push (dynamic_cast<T*> (unsmob_grob (e)));
     }
 
diff --git a/lily/include/input-file-results.hh b/lily/include/input-file-results.hh
new file mode 100644 (file)
index 0000000..08d7192
--- /dev/null
@@ -0,0 +1,43 @@
+/*   
+  file-results.hh -- declare functions for processing one input file.
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1998--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef FILE_RESULTS_HH
+#define FILE_RESULTS_HH
+
+#include "lily-proto.hh"
+#include "source.hh"
+#include "parray.hh"
+#include "protected-scm.hh"
+
+class Input_file_results
+{
+public:
+  Sources sources_;
+  Array<String> inclusion_names_;
+  Array<String> target_strings_;
+  Protected_scm header_;
+
+  int score_count_;
+  
+  void do_deps (String);
+
+  Input_file_results (String init, String in, String out);
+  ~Input_file_results ();
+  
+private:
+  /* Make sure we never get an implicit constructor.*/
+  Input_file_results ();
+};
+
+extern Input_file_results* global_input_file;
+
+void do_one_file (char const* file);
+
+#endif /* FILE_RESULTS_HH */
+
index 1241e34cff94204909fa373649e8ec447c5191b8..d9aad2c9def1a19840ee5b7fb8fe7a7a4067a11c 100644 (file)
 #define LILY_GUILE_HH
 
 
+/*
+  TODO: the  GH interface is deprecated as of GUILE 1.6
+
+  Remove all gh_XXX functions.
+ */
+#include <guile/gh.h>
+
+
 /* GUILE only includes version in headers (libguile/version.h) as of
    1.5.x.  For some strange reason, they call it SCM.*VERSION.
 
@@ -35,6 +43,9 @@
 
 #define scm_t_bits scm_bits_t
 
+#define fix_guile_1_4_gh_scm2newstr(str, lenp) gh_scm2newstr (str, (int*)lenp)
+#define gh_scm2newstr(str, lenp) fix_guile_1_4_gh_scm2newstr (str, lenp)
+
 #define fix_guile_1_4_scm_primitive_eval(form) scm_eval_3 (form, 1, SCM_EOL)
 #define scm_primitive_eval(form) fix_guile_1_4_scm_primitive_eval (form)
 
@@ -47,6 +58,7 @@ inline SCM scm_c_make_vector  (int k, SCM val) {
   return scm_make_vector (SCM_MAKINUM (k), val);
 }
 #define scm_c_define_gsubr scm_make_gsubr
+#define scm_c_eval_string(str) gh_eval_str ((char*)str)
 #define scm_remember_upto_here_1(s) scm_remember (&s)
 #define scm_gc_protect_object scm_protect_object
 #define scm_gc_unprotect_object scm_unprotect_object
@@ -115,7 +127,7 @@ SCM ly_truncate_list (int k, SCM l );
 
 
 /*
-  Using this trick we cache the value of scm_str2symbol ("fooo") where
+  Using this trick we cache the value of gh_symbol2scm ("fooo") where
   "fooo" is a constant string. This is done at the cost of one static
   variable per ly_symbol2scm() use, and one boolean evaluation for
   every call.
@@ -127,26 +139,23 @@ SCM ly_truncate_list (int k, SCM l );
  SCM value = cached;  /* We store this one locally, since G++ -O2 fucks up else */   \
  if ( __builtin_constant_p ((x)))\
  {  if (!cached)\
-     value = cached =  scm_gc_protect_object (scm_str2symbol((x)));\
+     value = cached =  scm_gc_protect_object (gh_symbol2scm((x)));\
  } else\
-  value = scm_str2symbol ((char*) (x)); \
+  value = gh_symbol2scm ((char*) (x)); \
   value; })
 #else
-inline SCM ly_symbol2scm(char const* x) { return scm_str2symbol((x)); }
+inline SCM ly_symbol2scm(char const* x) { return gh_symbol2scm((x)); }
 #endif 
 
 extern SCM global_lily_module;
 
-/*
-  TODO: rename me to ly_c_lily_module_eval
- */
 #define ly_scheme_function(x) ({static SCM cached; \
  SCM value = cached;  /* We store this one locally, since G++ -O2 fucks up else */   \
  if ( __builtin_constant_p ((x)))\
  {  if (!cached)\
-     value = cached =  scm_gc_protect_object (scm_eval(scm_str2symbol (x), global_lily_module));\
+     value = cached =  scm_gc_protect_object (scm_eval(gh_symbol2scm (x), global_lily_module));\
  } else\
-  value = scm_eval(scm_str2symbol (x), global_lily_module);\
+  value = scm_eval(gh_symbol2scm (x), global_lily_module);\
   value; })
 
 
@@ -161,7 +170,6 @@ Interval ly_scm2interval (SCM);
 Drul_array<Real> ly_scm2realdrul (SCM);
 Slice int_list_to_slice (SCM l);
 SCM ly_interval2scm (Drul_array<Real>);
-char *ly_scm2newstr (SCM str, size_t *lenp);
 
 Real robust_scm2double (SCM, double);
 int robust_scm2int (SCM, int);
@@ -187,46 +195,20 @@ inline SCM ly_cddr (SCM x) { return SCM_CDDR (x); }
 inline SCM ly_caddr (SCM x) { return SCM_CADDR (x); }
 inline SCM ly_cdadr (SCM x) { return SCM_CDADR (x); }
 inline SCM ly_caadr (SCM x) { return SCM_CAADR (x); }
-inline SCM ly_cadar (SCM x) { return SCM_CADAR (x); }
 /* inserts at front, removing dublicates */
 inline SCM ly_assoc_front_x(SCM alist, SCM key, SCM val)
 {
   return scm_acons(key, val, scm_assoc_remove_x (alist, key));
 }
-inline bool ly_c_pair_p (SCM x) { return SCM_NFALSEP (scm_pair_p (x)); }
-inline bool ly_c_symbol_p (SCM x) { return SCM_SYMBOLP (x); }
-inline bool ly_c_boolean_p (SCM x) { return SCM_BOOLP (x); }
-inline bool ly_c_char_p (SCM x) { return SCM_CHARP (x); }
-inline bool ly_c_number_p (SCM x) { return SCM_NUMBERP (x); }
-inline bool ly_c_string_p (SCM x) { return SCM_STRINGP (x); }
-inline bool ly_c_vector_p (SCM x) { return SCM_VECTORP (x); }
-inline bool ly_c_list_p (SCM x) { return SCM_NFALSEP (scm_list_p (x)); }
-inline bool ly_c_procedure_p (SCM x) { return SCM_NFALSEP (scm_procedure_p (x)); }
-inline bool ly_c_eq_p (SCM x, SCM y) { return SCM_EQ_P (x, y); }
-inline bool ly_c_equal_p (SCM x, SCM y) { 
-  return SCM_NFALSEP (scm_equal_p (x, y)); 
-}
-
-inline bool ly_scm2bool (SCM x) { return SCM_NFALSEP (x); }
-inline char ly_scm2char (SCM x) { return SCM_CHAR(x); }
-inline int ly_scm2int (SCM x) { return scm_num2int (x, 0, "ly_scm2int"); }
-inline double ly_scm2double (SCM x) { return scm_num2dbl (x, "ly_scm2double"); }
-inline unsigned long ly_length (SCM x) { 
-  return scm_num2ulong (scm_length (x), 0, "ly_length");
-}
-inline unsigned long ly_vector_length (SCM x) { return SCM_VECTOR_LENGTH (x); }
-
-inline SCM ly_bool2scm (bool x) { return SCM_BOOL (x); }
-
-inline SCM ly_append2 (SCM x1, SCM x2) { 
-  return scm_append (scm_listify (x1, x2, SCM_UNDEFINED)); 
-}
-inline SCM ly_append3 (SCM x1, SCM x2, SCM x3) { 
-  return scm_append (scm_listify (x1, x2, x3, SCM_UNDEFINED)); 
-}
-inline SCM ly_append4 (SCM x1, SCM x2, SCM x3, SCM x4) { 
-  return scm_append (scm_listify (x1, x2, x3, x4, SCM_UNDEFINED)); 
-}
+#ifdef PARANOID
+#define gh_pair_p ly_pair_p
+bool ly_pair_p (SCM x);
+#else
+inline bool ly_pair_p (SCM x) { return SCM_NFALSEP (scm_pair_p (x)); }
+#endif
+inline bool ly_symbol_p (SCM x) { return SCM_SYMBOLP (x); }
+inline bool ly_number_p (SCM x) { return SCM_NUMBERP (x); }
+inline bool ly_procedure_p (SCM x) { return SCM_NFALSEP (scm_procedure_p (x)); }
 
 /*
   display and print newline.
@@ -238,7 +220,7 @@ void ly_display_scm (SCM s);
 #include "array.hh"
 
 void read_lily_scm_file (String);
-void ly_c_init_guile ();
+void ly_init_guile ();
 
 bool is_direction (SCM s);
 bool is_number_pair (SCM);
@@ -259,9 +241,8 @@ SCM index_get_cell (SCM cell, Direction d);
 SCM index_set_cell (SCM cell, Direction d, SCM val);
 
 SCM ly_snoc (SCM s, SCM list);
-SCM ly_split_list (SCM s, SCM lst);
-SCM ly_unique (SCM lst);
-SCM ly_list_qsort_uniq_x (SCM lst);
+SCM ly_split_list (SCM s, SCM list);
+SCM ly_unique (SCM list);
 
 
 
@@ -303,9 +284,8 @@ SCM TYPE :: FUNC ## _proc;\
 void                                                           \
 TYPE ## _ ## FUNC ## _init_functions ()                                        \
 {                                                              \
-  TYPE :: FUNC ## _proc = scm_c_define_gsubr (#TYPE "::" #FUNC, \
-                                             (ARGCOUNT), 0, 0, \
-                         (Scheme_function_unknown)TYPE :: FUNC); \
+  TYPE :: FUNC ## _proc = gh_new_procedure ## ARGCOUNT  ## _0 (#TYPE "::" #FUNC, \
+ ((Scheme_function_ ## ARGCOUNT)TYPE :: FUNC));                                \
   scm_c_export (#TYPE "::" #FUNC, NULL);\
 }                                                              \
                                                                \
index f43f3a54bdbdb1288dcea5df83cc37c4cefeb2d3..7b1ce3da0571eb16ae4400c660d5ab4695e6b2e7 100644 (file)
@@ -36,8 +36,6 @@ class Bar_req_collect_engraver;
 class Beaming_info_list;
 class Bezier;
 class Bezier_bow;
-class Book;
-class Output_def;
 class Break_algorithm;
 class Change_iterator;
 class Change_translator;
@@ -78,6 +76,7 @@ class Lyric_performer;
 class Lyric_phrasing_engraver;
 class Mensural_ligature_engraver;
 class Midi_chunk;
+class Midi_def;
 class Midi_duration;
 class Midi_dynamic;
 class Midi_header;
@@ -99,7 +98,7 @@ class Music;
 class Music_iterator;
 class Music_list;
 class Music_output;
-class Output_def;
+class Music_output_def;
 class Music_sequence;
 class Music_wrapper;
 class Music_wrapper_iterator;
@@ -110,8 +109,8 @@ class Note_performer;
 class Output_property;
 class Paper_book;
 class Paper_column;
-class Output_def;
-class Paper_system;
+class Paper_def;
+class Paper_line;
 class Paper_outputter;
 class Paper_score;
 class Paper_stream;
@@ -127,7 +126,7 @@ class Repeated_music;
 class Event;
 class Event_chord;
 class Event_chord_iterator;
-class Modified_font_metric;
+class Scaled_font_metric;
 class Scheme_hash_table;
 class Score;
 class Grob;
index c2409b81c12801c9f71d05e7dd1132216db3616d..d8a3fc0603a94caaefad8362e5bb91fd9b433047 100644 (file)
@@ -26,6 +26,7 @@ protected:
   virtual void create_line_spanner ();
   virtual void initialize ();
   virtual void finalize ();
+  virtual void typeset_grob (Grob*);
 public:
   TRANSLATOR_DECLARATIONS(Line_group_engraver_group);
 };
index 1862845cdeca46e85c491a1e59bbc69a9e31959f..a270341f55c353b8123c506576c7a749ba5c0e03 100644 (file)
@@ -1,25 +1,27 @@
 /*
   ly-module.hh -- declare  module related helper functions 
 
 source file of the GNU LilyPond music typesetter
+ source file of the GNU LilyPond music typesetter
 
  (c) 2002--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
  */
+
 #ifndef LY_MODULE_HH
 #define LY_MODULE_HH
 
 #include "lily-guile.hh"
 
-SCM ly_make_anonymous_module (bool safe);
-SCM ly_import_module (SCM dest, SCM src);
-SCM ly_module2alist (SCM mod);
+SCM ly_make_anonymous_module ();
+void ly_import_module (SCM dest, SCM src);
+SCM ly_module_to_alist (SCM mod);
 SCM ly_module_lookup (SCM module, SCM sym);
-SCM ly_modules_lookup (SCM modules, SCM sym, SCM);
+SCM ly_modules_lookup (SCM modules, SCM sym);
 SCM ly_module_symbols (SCM mod);
 void  ly_reexport_module (SCM mod);
-inline bool ly_c_module_p (SCM x) { return SCM_MODULEP(x); }
+inline bool ly_module_p (SCM x) { return SCM_MODULEP(x); }
 void ly_clear_anonymous_modules ();
-SCM ly_use_module (SCM mod, SCM used);
+
 
 #endif /* LY_MODULE_HH */
 
index 3192056741d9584924e2c9466a87ec201fc0a99c..7e93c837f3638902448296c88229e3daddec0735 100644 (file)
 
 
 #define IMPLEMENT_TYPE_P(CL, FUNCNAME)\
-SCM CL ## _type_p_proc;\
 void init_type_ ## CL ()\
 {\
   SCM subr = scm_c_define_gsubr (FUNCNAME, 1, 0, 0, (Scheme_function_unknown) CL::smob_p);\
-  CL ## _type_p_proc = subr;\
   ly_add_function_documentation (subr, FUNCNAME, "(SCM x)", "Is @var{x} a @code{" #CL "} object?");\
   scm_c_export (FUNCNAME, NULL);\
 }\
@@ -70,7 +68,7 @@ SCM CL::smobbed_copy () const                                 \
 {                                                              \
   CL * ptr  = new CL (*this);\
   SCM s;                                                       \
-  s = scm_cons (SCM_PACK (CL::smob_tag_), SCM_PACK (ptr));     \
+  s = gh_cons (SCM_PACK (CL::smob_tag_), SCM_PACK (ptr));      \
   scm_gc_register_collectable_memory ((CL*)this, sizeof (CL), #CL " smob"); \
                                                                \
   return s;                                                    \
@@ -79,11 +77,12 @@ SCM CL::smobbed_copy () const                                       \
 
 #define IMPLEMENT_SMOBS(CL)                                                    \
 IMPLEMENT_BASE_SMOBS (CL)                                                      \
-void                                                                           \
+SCM                                                                            \
 CL::smobify_self ()                                                            \
 {                                                                              \
-  SCM s = unprotected_smobify_self ();\
+  SCM s =   unprotected_smobify_self ();\
   scm_gc_protect_object (s);\
+  return s;\
 }\
 SCM                                                                            \
 CL::unprotected_smobify_self ()                                                                \
index a26d7f372c3af0f5583d7f3b62501f594998756e..5c5ed19e8c942d854323c7004c9d2fab6d457c44 100644 (file)
@@ -19,14 +19,16 @@ void add_score (Score* s);
 void set_default_output (String s);
 String find_file (String);
 void call_constructors ();
-
-Array<String> get_inclusion_names ();
-void set_inclusion_names (Array<String>);
-
-
+extern Array<String> get_inclusion_names ();
+extern void set_inclusion_names (Array<String>);
 extern String init_name_global;
 
+/* FIXME: in warn.cc */
+void progress_indication (String);
+
 /* options */
+extern bool dependency_global_b;
+extern String dependency_prefix_global;
 extern Array<String> dump_header_fieldnames_global;
 extern bool no_paper_global_b;
 extern String output_format_global;
@@ -38,8 +40,12 @@ extern bool internal_type_checking_global_b;
 
 
 /* misc */
+extern All_font_metrics *all_fonts_global;
 extern Array<String> failed_files;
 extern int exit_status_global;
 extern File_path global_path;
+extern int score_count_global;
+
+extern Paper_book *paper_book;
 
 #endif /* MAIN_HH */
diff --git a/lily/include/midi-def.hh b/lily/include/midi-def.hh
new file mode 100644 (file)
index 0000000..c919a87
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+  midi-def.hh -- declare Midi_def
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997--2004 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+
+#ifndef MIDI_DEF_HH
+#define MIDI_DEF_HH
+
+#include "lily-proto.hh"
+#include "real.hh"
+#include "string.hh"
+#include "moment.hh"
+#include "music-output-def.hh"
+
+/** 
+  definitions for midi output. Rather empty
+ */
+class Midi_def : public Music_output_def
+{
+  static int score_count_;
+
+public:
+  Midi_def ();
+  VIRTUAL_COPY_CONSTRUCTOR (Music_output_def, Midi_def);
+
+  int get_tempo (Moment moment);
+  void set_tempo (Moment moment, int count_per_minute_i);
+};
+
+#endif /* MIDI_DEF_HH */
diff --git a/lily/include/music-function.hh b/lily/include/music-function.hh
deleted file mode 100644 (file)
index cfc923f..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/* 
-  music-head.hh -- declare music_function
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
-  
-*/
-
-#ifndef MUSIC_FUNCTION_HH
-#define MUSIC_FUNCTION_HH
-
-#include "lily-guile.hh"
-
-SCM ly_make_music_function (SCM, SCM);
-SCM get_music_function_transform (SCM);
-bool is_music_function (SCM);
-
-#endif /* MUSIC_FUNCTION_HH */
-
diff --git a/lily/include/music-output-def.hh b/lily/include/music-output-def.hh
new file mode 100644 (file)
index 0000000..53c9bdc
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+  music-output-def.hh -- declare Music_output_def
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef Music_output_DEF_HH
+#define Music_output_DEF_HH
+
+#include "string.hh"
+#include "lily-proto.hh"
+#include "lily-guile.hh"
+#include "virtual-methods.hh"
+#include "smobs.hh"
+#include "input.hh"
+
+/**
+  Definition of how to output lilypond.
+ */
+class Music_output_def   
+{
+public:
+  Scheme_hash_table * translator_tab_;
+  Input input_origin_;
+  
+  SCM scope_;
+  SCM scaled_fonts_;
+  
+  Music_output_def (Music_output_def const&);
+  Music_output_def ();
+  VIRTUAL_COPY_CONSTRUCTOR (Music_output_def, Music_output_def);
+
+  Context *get_group_translator (String type) const;
+  void assign_context_def (SCM transdef);
+  SCM find_context_def (SCM name) const;
+  String outname_string () ;
+  SCM get_scmvar (String id)const;
+  SCM lookup_variable (SCM sym) const;
+  void set_variable (SCM, SCM sym);
+  
+  DECLARE_SMOBS (Music_output_def,);
+};
+
+DECLARE_UNSMOB(Music_output_def,music_output_def);
+#endif // Music_output_DEF_HH
index 5d95c29103e15386a3dcd8211c4fea971c411051..78d1be7bde982e4274190a3a77fc440e8397c372 100644 (file)
@@ -6,6 +6,8 @@
   (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
+
+
 #ifndef MUSIC_HH
 #define MUSIC_HH
 
@@ -66,11 +68,10 @@ protected:
   friend SCM ly_extended_make_music(SCM,SCM);
 };
 
-DECLARE_TYPE_P(Music);
+
 DECLARE_UNSMOB(Music,music);
 
 Music* make_music_by_name (SCM sym);
 SCM ly_deep_mus_copy (SCM);
-SCM ly_music_scorify (SCM);
 
-#endif /* MUSIC_HH */
+#endif // MUSIC_HH
index bdc95f7465f49cdd5e43eb3c4ca785944b81f8b3..6f012b35491253a758b30cec06c07333a5a3c28b 100644 (file)
@@ -6,8 +6,8 @@
   (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#ifndef MY_LILY_LEXER_HH
-#define MY_LILY_LEXER_HH
+#ifndef LEXER_HH
+#define LEXER_HH
 
 #include "includable-lexer.hh"
 
@@ -24,41 +24,28 @@ bool busy_parsing ();
 void kill_lexer ();
 void set_lexer ();
 
+/// lexer for LilyPond
 class My_lily_lexer : public Includable_lexer 
 {
-public:
   Protected_scm scopes_;
-  Protected_scm encoding_;
-  
-private:
-  int lookup_keyword (String);
-  int scan_bare_word (String);
-  SCM scan_markup_word (String);
-  int scan_escaped_word (String);
-  int identifier_type (SCM);
-  char escaped_char (char) const;
-
 public:
   String main_input_name_;
-  void *lexval;
+  void * lexval;
   bool main_input_b_;
-  
-  Sources *sources_; 
 
-  /* Scheme hash tables with (oct name acc)  values, and symbol keys.  */
+  /*
+    Scheme hash tables with (oct name acc)  values, and symbol keys
+   */
   Protected_scm chordmodifier_tab_;
   Protected_scm pitchname_tab_stack_;
+  Keyword_table * keytable_;
+  int errorlevel_;
 
-  Keyword_table *keytable_;
-  int error_level_;
-  Input last_input_;
-
-  My_lily_lexer (Sources*);
-  My_lily_lexer (My_lily_lexer const&);
+  My_lily_lexer ();
   ~My_lily_lexer ();
-
   int yylex ();
 
+  Input last_input_;
   void prepare_for_next_token ();
   int try_special_identifiers (SCM* ,SCM);
   Input here_input () const;
@@ -69,22 +56,25 @@ public:
   void start_main_input ();
 
   SCM lookup_identifier (String s);
-  SCM lookup_identifier_symbol (SCM s);
+  void push_note_state (SCM tab);
   void push_chord_state (SCM tab);
+  void push_markup_state ();
   void push_figuredbass_state ();
   void push_lyric_state ();
-  void push_initial_state ();
-  void push_markup_state ();
-  void push_note_state (SCM tab);
   void pop_state ();
   void LexerError (char const *);
-  void set_encoding (String);
-  SCM encoding () const;
   void set_identifier (SCM name_string, SCM);
   bool is_note_state () const;
   bool is_chord_state () const;
   bool is_lyric_state () const;
   bool is_figure_state () const;
+private:
+  int lookup_keyword (String);
+  int scan_bare_word (String);
+  SCM scan_markup_word (String);
+  int scan_escaped_word (String);
+  int identifier_type (SCM);
+  char escaped_char (char) const;
 };
 
-#endif /* MY_LILY_LEXER_HH */
+#endif
index 7c7c92aafc55881fdd25eb068be0f2d8fb61f882..b98bc843ba01ed824e567a584e79a7656ba7ba89 100644 (file)
@@ -6,16 +6,20 @@
   (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
+
 #ifndef MY_LILY_PARSER_HH
 #define MY_LILY_PARSER_HH
 
-#include "array.hh"
-#include "duration.hh"
-#include "input.hh"
+#include "lily-proto.hh"
+#include "string.hh"
 #include "parray.hh"
+#include "lily-proto.hh"
+#include "lily-proto.hh"
+#include "duration.hh"
 #include "pitch.hh"
-#include "smobs.hh"
 #include "string.hh"
+#include "array.hh"
+#include "input.hh"
 
 /**
    State for the parser.  Do not ever add any variables to parse
 */
 class My_lily_parser 
 {
-  DECLARE_SMOBS (My_lily_parser, );
-  friend int yyparse (void*);
-
-  Array<Input> define_spots_;
+public:
+  My_lily_parser (Input_file_results * sources);
+  ~My_lily_parser ();
 
-  char const* here_str0 () const;
-  Simultaneous_music *get_chord (Pitch tonic,
-                                Array<Pitch> *adds, Array<Pitch> *subs,
-                                Pitch *inversion, Pitch* bass, Duration d);
-  void set_chord_tremolo (int type_i);
-  void set_last_duration (Duration const *);
-  void set_last_pitch (Pitch const *);
+  void do_init_file ();
+  void parse_file (String init, String file, String out_name);
 
 public:
-  My_lily_lexer *lexer_;
-  Sources *sources_;
   Duration default_duration_;
   String output_basename_;
-  //  Protected_scm header_;
-  int score_count_;
-  int book_count_;
+  
+  Scheme_hash_table *default_header_;
+
   int fatal_error_;
+  Input_file_results * input_file_;
   int error_level_;
-  bool ignore_version_b_;
-  SCM last_beam_start_;
 
-  My_lily_parser (Sources *sources);
-  My_lily_parser (My_lily_parser const&);
+  My_lily_lexer * lexer_;
+  bool ignore_version_b_;
 
-  DECLARE_SCHEME_CALLBACK (paper_description, ());
+  SCM last_beam_start_;
+  void beam_check (SCM); 
 
   Input here_input () const;
+  void push_spot ();
   Input pop_spot ();
-  void beam_check (SCM); 
-  void do_init_file ();
+    
   void do_yyparse ();
-  void parse_file (String init, String name, String out_name);
-  void parse_string (String ly_code);
   void parser_error (String);
-  void push_spot ();
+
   void set_yydebug (bool);
-};
 
-DECLARE_UNSMOB (My_lily_parser, my_lily_parser);
 
-SCM ly_parse_file (SCM);
-SCM ly_parse_string (SCM);
-// SCM ly_parser_add_book_and_score (SCM, SCM);
-SCM ly_parser_print_book (SCM, SCM);
-SCM ly_parser_print_score (SCM, SCM);
-SCM ly_parser_bookify (SCM, SCM);
-SCM ly_parser_scorify (SCM, SCM);
+  DECLARE_SCHEME_CALLBACK (paper_description, ());
+private:
+
+  Array<Input> define_spots_;
+
+  char const* here_str0 () const;
 
-Output_def *get_paper (My_lily_parser *parser);
-Output_def *get_midi (My_lily_parser *parser);
-Output_def *get_bookpaper (My_lily_parser *parser);
+  Simultaneous_music * get_chord (Pitch tonic, Array<Pitch>* adds,
+                                 Array<Pitch>* subs, Pitch* inversion,
+                                 Pitch* bass, Duration d);
+  
+  void set_chord_tremolo (int type_i);
+  void set_last_duration (Duration const *);
+  void set_last_pitch (Pitch const *);
+  friend int yyparse (void*);
+};
 
-#endif /* MY_LILY_PARSER_HH */
+#endif // MY_LILY_PARSER_HH
diff --git a/lily/include/output-def.hh b/lily/include/output-def.hh
deleted file mode 100644 (file)
index cd76d29..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-  music-output-def.hh -- declare Output_def
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#ifndef MUSIC_OUTPUT_DEF_HH
-#define MUSIC_OUTPUT_DEF_HH
-
-#include "string.hh"
-#include "lily-proto.hh"
-#include "lily-guile.hh"
-#include "virtual-methods.hh"
-#include "smobs.hh"
-#include "input.hh"
-
-/*
-  Output settings for a block of music.
-
-  This devolved into a rather empty class. The distinction between
-  various instances is made in the parser, which creates
-  midi/paper/bookpaper blocks depending on the keyword read.
-
-  The data structure is set up as recursive: the definitions not
-  supplied in paper are looked up in bookpaper. This is done through
-  the parent_ field of Output_def. However, such nesting is limited to
-  two levels,
-
-  * first because the parser hard-codes the different types
-  of output block.
-
-  * Second, because the prime benefit of multiple levels
-  (eg. bookpaper containing paper for a score, containing paper of a
-  \score embedded in \markup) requires scaling the Stencils (eg. the
-  one coming from score at markup level)
-  
- */
-class Output_def   
-{
-public:
-  VIRTUAL_COPY_CONSTRUCTOR (Output_def, Output_def);
-  DECLARE_SMOBS (Output_def,);
-public:
-  Output_def * parent_;
-  Input input_origin_;
-  SCM scope_;
-
-  Output_def (Output_def const&);
-  Output_def ();
-  virtual void derived_mark ();
-  
-  /*
-    variables.
-   */
-  SCM c_variable (String id) const;
-  SCM lookup_variable (SCM sym) const;
-  void set_variable (SCM sym, SCM val);
-  Real get_dimension (SCM symbol) const;
-};
-
-void assign_context_def (Output_def *m, SCM transdef);
-SCM find_context_def (Output_def const *m, SCM name);
-
-int get_tempo (Output_def*def, Moment moment);
-void set_tempo (Output_def*def, Moment moment, int count_per_minute_i);
-
-Interval line_dimensions_int (Output_def*def, int);
-
-Font_metric *select_encoded_font (Output_def *paper, SCM input_encoding, SCM chain);
-Font_metric *select_font (Output_def *paper, SCM chain);
-
-DECLARE_UNSMOB (Output_def, output_def);
-
-
-Font_metric *find_scaled_font (Output_def * od,
-                              Font_metric *f, Real m, SCM input_enc_name);
-Output_def *scale_output_def (Output_def *def, Real scale);
-Real output_scale (Output_def*);
-
-#endif /* MUSIC_OUTPUT_DEF_HH */
diff --git a/lily/include/pangofc-afm-decoder.hh b/lily/include/pangofc-afm-decoder.hh
deleted file mode 100644 (file)
index cde2830..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-  pangofc-afm-decoder.h -- 
-
-  source file of the GNU LilyPond music typesetter
-
-  Copyright (C) 2004  Jan Nieuwenhuizen <janneke@gnu.org>
-
-  Note: in C and with explicit LPGL header for easier use with PANGO
-  outside of LilyPond.
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Lesser General Public
-  License as published by the Free Software Foundation; either
-  version 2.1 of the License, or (at your option) any later version.
-  This library 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
-  Lesser General Public License for more details.
-  You should have received a copy of the GNU Lesser General Public
-  License along with this library; if not, write to the Free Software
-  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#ifndef __PANGOFC_AFM_DECODER_H__
-#define __PANGOFC_AFM_DECODER_H__
-
-#include "config.h"
-#if HAVE_PANGO_FC_FONT_MAP_ADD_DECODER_FIND_FUNC
-
-/* Note: in C and with explicit header for use outside of LilyPond.  */
-
-#include <pango/pangofc-fontmap.h>
-
-G_BEGIN_DECLS
-
-#define PANGO_TYPE_FC_AFM_DECODER              (pango_fc_afm_decoder_get_type ())
-#define PANGO_FC_AFM_DECODER(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FC_AFM_DECODER, PangoFcAfmDecoder))
-#define PANGO_IS_FC_AFM_DECODER(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FC_AFM_DECODER))
-
-#define PANGO_FC_AFM_DECODER_CLASS(clss)      (G_TYPE_CHECK_CLASS_CAST ((clss), PANGO_TYPE_FC_AFM_DECODER, PangoFcAfmDecoderClass))
-#define PANGO_IS_FC_AFM_DECODER_CLASS(clss)   (G_TYPE_CHECK_CLASS_TYPE ((clss), PANGO_TYPE_FC_AFM_DECODER))
-#define PANGO_FC_AFM_DECODER_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FC_AFM_DECODER, PangoFcAfmDecoderClass))
-
-typedef struct _PangoFcAfmDecoder        PangoFcAfmDecoder;
-typedef struct _PangoFcAfmDecoderClass   PangoFcAfmDecoderClass;
-typedef struct _PangoFcAfmDecoderPrivate PangoFcAfmDecoderPrivate;
-
-
-/**
- * PangoFcAfmDecoder:
- * 
- * #PangoFcAfmDecoder implements an PangoFcDecoder for fonts
- * with an afm mapping.
- **/
-struct _PangoFcAfmDecoder
-{
-  PangoFcDecoder parent_instance;
-
-  /*< private >*/
-  PangoFcAfmDecoderPrivate *priv;
-};
-
-PangoFcAfmDecoder *pango_fc_afm_decoder_new (void);
-PangoFcDecoder *pango_fc_afm_find_decoder (FcPattern *pattern, gpointer user_data);
-void pango_fc_afm_add_decoder (char const *family_name);
-
-/**
- * PangoFcAfmDecoderClass:
- * @read_afm: Read afm mapping for #fcfont.
- *
- * Class structure for #PangoFcAfmDecoder.
- **/
-struct _PangoFcAfmDecoderClass
-{
-  /*< private >*/
-  PangoFcDecoderClass parent_class;
-
-  /*< public >*/
-  void (*read_afm) (PangoFcAfmDecoder *self, PangoFcFont *fcfont);
-};
-
-G_END_DECLS
-
-#endif /* HAVE_PANGO_FC_FONT_MAP_ADD_DECODER_FIND_FUNC */
-
-#endif /* __PANGOFC_AFM_DECODER_H__ */
index 3654b87107b2e82f44cdad0db8c7af4b1ec1710a..24dab4e061db7017946bab34410790bbceafcb4e 100644 (file)
@@ -5,6 +5,7 @@
 
   (c) 2004  Jan Nieuwenhuizen <janneke@gnu.org>
 */
+
 #ifndef PAPER_BOOK_HH
 #define PAPER_BOOK_HH
 
 #include "protected-scm.hh"
 #include "smobs.hh"
 
-struct Score_lines
-{
-  SCM lines_;
-  SCM header_;
-
-  Score_lines () ;
-  void gc_mark ();
-};
+#define PAGE_LAYOUT "ps"
 
-/*
-  
-This class is rather empty. It collects systems (Paper_system), and
-exports them to the output backend, either as systems or as completely
-formatted pages.
-  
-*/
 class Paper_book
 {
-  DECLARE_SMOBS (Paper_book, );
-
-  SCM lines_;
-  SCM pages_;
 public:
-  SCM header_;
-  Array<Score_lines> score_lines_;
-  Output_def *bookpaper_;
-  
-  Paper_book ();
+  Array<SCM> headers_;
+  Array<SCM> global_headers_;
+  Link_array<Paper_def> papers_;
+  Array<SCM> scores_;
+  Real height_;
+  SCM copyright_;
+  SCM tagline_;
 
+  Paper_book ();
+  void init ();
+  Link_array<Page> *pages ();
   SCM lines ();
-  SCM pages ();
-  Stencil book_title ();
-  Stencil score_title (int);
-  void classic_output (String);
+  SCM scopes (int);
+  Stencil* title (int);
   void output (String);
+  void classic_output (String);
+  DECLARE_SMOBS (Paper_book, )
 };
 
 DECLARE_UNSMOB (Paper_book, paper_book)
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..71f0ad1ccea2ee562065c3dae28cff7dc7279a8d 100644 (file)
@@ -0,0 +1,74 @@
+/*
+  paper-def.hh -- declare Paper_def
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1996--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef PAPER_DEF_HH
+#define PAPER_DEF_HH
+
+
+#include "lily-proto.hh"
+#include "lily-guile.hh"
+#include "real.hh"
+#include "array.hh"
+#include "interval.hh"
+#include "music-output-def.hh"
+
+
+/** 
+
+  Symbols, dimensions and constants pertaining to visual output.
+
+  This struct takes care of all kinds of symbols, dimensions and
+  constants. Most of them are related to the point-size of the fonts,
+  so therefore, the lookup table for symbols is also in here.
+
+  TODO: 
+  
+  add support for multiple fontsizes 
+
+  remove all utility funcs 
+  
+
+  add support for other len->wid conversions.
+
+
+  Interesting variables:
+  
+  /// The distance between lines
+  interline
+  
+*/
+class Paper_def : public Music_output_def 
+{
+protected:
+  VIRTUAL_COPY_CONSTRUCTOR (Music_output_def, Paper_def);
+
+public:    
+  static int score_count_;
+  
+  Paper_def ();
+  Paper_def (Paper_def const&);
+  virtual ~Paper_def ();
+  
+  Paper_outputter* get_paper_outputter (String) const;
+  SCM font_descriptions () const;
+  void reinit ();
+  Interval line_dimensions_int (int) const;
+  void output_settings (Paper_outputter*) const;
+  Font_metric *find_font (SCM name, Real mag);
+  
+  /* JUNKME   */
+  Real get_realvar (SCM symbol) const;
+  
+  friend int yyparse (void*);
+};
+
+Paper_def * unsmob_paper (SCM x);
+Font_metric *select_font (Paper_def *paper, SCM chain);
+
+#endif /* PAPER_DEF_HH */
diff --git a/lily/include/paper-line.hh b/lily/include/paper-line.hh
new file mode 100644 (file)
index 0000000..1d383a7
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+  paper-line.hh -- declare Paper_line
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+#ifndef PAPER_LINE_HH
+#define PAPER_LINE_HH
+
+#include "lily-proto.hh"
+#include "smobs.hh"
+#include "offset.hh"
+
+class Paper_line
+{
+  DECLARE_SMOBS (Paper_line,)
+  SCM stencils_;
+  Offset dim_;
+  bool is_title_;
+  
+public:
+  Paper_line (Offset, SCM, bool = false);
+
+  int number_;
+  Offset dim () const;
+  SCM stencils () const;
+  bool is_title () const;
+};
+
+DECLARE_UNSMOB (Paper_line, paper_line);
+
+#endif /* PAPER_LINE_HH */
index 96544542e1391d3bfea44c8d96ea6c016d024aa1..4f2ea7b4cc0d8f4f517a07d3fc6e0abac701a2c4 100644 (file)
 #include "lily-guile.hh"
 #include "protected-scm.hh"
 
-/*
-  Glue between the backend (grobs, systems, pages) and the output file.
-  proxy for Scheme backends.
-*/
-class Paper_outputter
-{
-  SCM output_module_;
-  String filename_;
-  SCM file_;
+/**
+   Interface for a Grob to output itself; The Paper_score contains a
+   pointer to a Paper_outputter, and this enables every grob to output
+   itself.
 
-  SCM file ();
+   The Paper_outputter contains a reference to an output stream
+ (Paper_stream).  */
 
+class Paper_outputter
+{
+  bool verbatim_scheme_b_;
 public:
-  DECLARE_SMOBS (Paper_outputter,);
 
-public:
-  SCM dump_string (SCM);
+  SCM output_func_;
+  SCM output_module_;
+  Protected_scm file_;
+  
+  String basename_;
+  Paper_outputter (String nm);
+  ~Paper_outputter ();
+  
+  void dump_scheme (SCM);
+
+  void output_metadata (Paper_def*, SCM);
+  void output_music_output_def (Music_output_def* odef);
   void output_scheme (SCM scm);
-  Paper_outputter (String nm, String format);
-  SCM scheme_to_string (SCM);
-  void output_stencil (Stencil);
+  void output_expr (SCM expr, Offset o);
+  void output_header (Paper_def*, SCM, int);
+  void output_line (SCM, Offset*, bool);
 };
 
-Paper_outputter *get_paper_outputter (String, String);
-DECLARE_UNSMOB (Paper_outputter, outputter);
-
 #endif /* PAPER_OUTPUTTER_HH */
index 2adfdafb38b248699ba4a4831b1ff9cf0220d383..43bc6a58364250d4b397997faba57e09e8025cb5 100644 (file)
@@ -20,7 +20,7 @@
 class Paper_score : public Music_output
 {
 public:
-  Output_def *paper_;
+  Paper_def *paper_;
   System *system_;
 
   Paper_score ();
diff --git a/lily/include/paper-system.hh b/lily/include/paper-system.hh
deleted file mode 100644 (file)
index 755e66f..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-  paper-system.hh -- declare Paper_system
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 2004  Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-#ifndef PAPER_LINE_HH
-#define PAPER_LINE_HH
-
-#include "lily-proto.hh"
-#include "smobs.hh"
-#include "offset.hh"
-#include "stencil.hh"
-
-/*
-  A formatted "system" (A block of titling also is a Paper_system)
-
-  To save memory, we don't keep around the System grobs, but put the
-  formatted content of the grob is put into a Paper_system. Page-breaking handles
-  Paper_system objects.
-  
- */
-class Paper_system
-{
-  DECLARE_SMOBS (Paper_system, );
-  Stencil stencil_;
-  bool is_title_;
-  
-public:
-  Real penalty_;
-  int number_;
-
-  Paper_system (Stencil, bool);
-
-  Offset dim () const;
-  Stencil to_stencil () const;
-  SCM stencils () const;
-  bool is_title () const;
-  Real penalty () const;
-};
-
-DECLARE_UNSMOB (Paper_system, paper_line);
-
-#endif /* PAPER_LINE_HH */
index 79ef343ebf1f014230e06368e3f895074645b8c8..3d0158fab8c0aeb38757bb9ba3651925f35bf5ce 100644 (file)
@@ -1,14 +1,6 @@
-/*
-  lily-guile.hh encapsulate guile
 
-  source file of the GNU LilyPond music typesetter
-
-  (c) 2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
-*/
-
-#ifndef PARSE_SCM_HH
-#define PARSE_SCM_HH
+#ifndef PARSE_SCM
+#define PARSE_SCM
 
 #include "input.hh"
 #include "lily-guile.hh"
@@ -20,11 +12,11 @@ struct Parse_start
   char const* str;
   int nchars;
   Input start_location_;
-  bool safe_;
 };
 
 SCM catch_protected_parse_body (void *);
 SCM protected_ly_parse_scm (Parse_start *, bool);
+
 SCM ly_parse_scm (char const *, int *, Input, bool);
 
-#endif /* PARSE_SCM_HH */
+#endif
index 416349371183f93905c1327dd9c1463d2c1146dd..907b1ec9989a7dbf6e70c547e5698e66a3f7d6ba 100644 (file)
@@ -29,7 +29,7 @@ public:
 
   Link_array<Audio_staff> audio_staffs_;
   Cons<Audio_element> *audio_elem_p_list_;
-  Output_def *midi_;
+  Midi_def *midi_;
 };
 
 #endif /* PERFORMANCE_HH */
index 5c9a04818b6f2d066eb0f69ac8281a6bd53ce9e0..71c827625076c1708b46f61bada74c2c69cd3f60 100644 (file)
 
 #include "font-metric.hh"
 
-/* Perhaps junk this, and move this to paper_def as interface? */
-struct Modified_font_metric : public Font_metric
+/*
+  Perhaps junk this, and move this to paper_def as interface? 
+ */
+struct Scaled_font_metric : public Font_metric
 {
-public:
-  Box text_dimension (String);
-  
-  
-  static SCM make_scaled_font_metric (SCM, Font_metric*, Real);
+  virtual Box text_dimension (String) const;
+  virtual Stencil find_by_name (String) const;
+  static SCM make_scaled_font_metric (Font_metric*, Real);
   virtual int count () const;
   virtual Offset get_indexed_wxwy (int) const;
   virtual int name_to_index (String) const;
-  virtual String coding_scheme () const;
-
-  virtual Font_metric * original_font () const;  
-
 protected:
-  
-  SCM coding_vector_;
-  SCM coding_table_;
-  SCM coding_mapping_;
-  SCM coding_description_;
-  friend SCM ly_font_encoding_alist (SCM);
-    
-  virtual Real design_size () const;
-  virtual void derived_mark () const; 
-  virtual Box get_indexed_char (int) const;
-  virtual int index_to_ascii (int) const;
-  virtual Box get_ascii_char (int) const;
+  virtual Box get_indexed_char (int)const;
+  virtual Box get_ascii_char (int)const;
   Font_metric *orig_;
   Real magnification_;
-  String coding_scheme_;
-
   
-  Modified_font_metric (String, Font_metric*, Real);
-  Box tex_kludge (String) const;
+  Scaled_font_metric (Font_metric*,Real);
 };
-
-#endif /* SCALED_FONT_METRIC_HH */
+#endif
index a58b2b6efda44532179e25fd7f47b19628adbdf5..bb9af2f5a44945c524b17fb0a94ec8526cf242d5 100644 (file)
@@ -39,6 +39,7 @@ protected:
   virtual void initialize ();
   virtual void finalize ();
   virtual void announce_grob (Grob_info);
+  virtual void typeset_grob (Grob*elem);
   virtual void stop_translation_timestep ();
 
 public:
index 0f015a0139fbba775cc9b5ee863869b8817b9cc7..38e4b3aaf5db94eddb68ca8274011ec94f62c645 100644 (file)
@@ -9,31 +9,28 @@
 #ifndef SCORE_HH
 #define SCORE_HH
 
+#include "input.hh"
 #include "lily-proto.hh"
 
-#include "input.hh"
 #include "parray.hh"
 #include "smobs.hh"
-#include "virtual-methods.hh"
 
 class Score : public Input
 {
-  DECLARE_SMOBS (Score, foo);
-
 public:
-  Link_array<Output_def> defs_;
+  Link_array<Music_output_def> defs_;
   SCM music_;
   SCM header_;
     
   Score ();
   Score (Score const&);
-  SCM book_rendering (String, Output_def*, Output_def*);
+  DECLARE_SMOBS (Score,foo);
 };
+DECLARE_UNSMOB (Score,score); 
 
-DECLARE_UNSMOB (Score, score);
 
 SCM ly_run_translator (SCM, SCM);
 SCM ly_render_output (SCM, SCM);
-void default_rendering (SCM, SCM, SCM, SCM, SCM);
+void default_rendering (SCM,SCM,SCM,SCM);
 
 #endif /* SCORE_HH */
index 80a20eecce26f391f9a77fb703919769944acead..e54fbd480ae9ce431a792a07902cee0e7f689be6 100644 (file)
    For example,
 
      Complex_smob::Complex_smob () {
-       scm_member_ = SCM_EOL;
+       scm_member_ =SCM_EOL;
        smobify_self ();
        scm_member_ = <..what you want to store..>
      }
    
-   after construction, the self_scm () field of a complex smob is
-   protected from Garbage Collection.  This protection should be
-   removed once the object is put into another (reachable) Scheme data
-   structure, i.e.
+   after creation, the self_scm() field of a complex smob is protected
+   from Garbage Collection. This protection should be removed once the
+   object is put into another (reachable) Scheme data structure, ie.
 
-      Complex_smob *p = new Complex_smob;
+      Complex_smob * p = new Complex_smob;
       list = scm_cons (p->self_scm (), list);
       scm_gc_unprotect_object (p->self_scm ());
 
-   Complex smobs are made with DECLARE_SMOBS (Classname,) in the class
+   Complex smobs are made with DECLARE_SMOBS(Classname,) in the class
    declaration.
 
    CALLING INTERFACE
@@ -76,7 +75,7 @@
    
    For implementating a class, the following should be provided
 
-   - an equal_p () function (a default is in the
+   - an equal_p() function (a default is in the
      IMPLEMENT_DEFAULT_EQUAL_P macro in ly-smobs.icc)
 
    - mark_smob () function, that calls scm_gc_mark () on all Scheme
    - a print_smob () function, that displays a representation for
      debugging purposes
 
-   - A call to one of the IMPLEMENT_SMOBS or IMPLEMENT_SIMPLE_SMOBS macros
-     from file "ly-smobs.icc"
+   - A call to one of the IMPLEMENT_SMOBS or  IMPLEMENT_SIMPLE_SMOBS macros
+   from file "ly-smobs.icc"
+   
 */
 
-#define DECLARE_SIMPLE_SMOBS(CL, dummy) \
+#define DECLARE_SIMPLE_SMOBS(CL,dummy) \
 public: \
        SCM smobbed_copy () const; \
 DECLARE_BASE_SMOBS(CL)
 
 
 #define DECLARE_BASE_SMOBS(CL) \
-       friend class Non_existent_class; \
-private: \
+       friend class Non_existant_class ; \
+private:\
        static scm_t_bits smob_tag_;                            \
        static SCM mark_smob (SCM);                             \
        static size_t free_smob (SCM s);                        \
@@ -121,7 +121,7 @@ protected:\
        virtual ~CL ();\
        SCM unprotected_smobify_self ();\
 private: \
-       void smobify_self ();                                   \
+       SCM smobify_self ();                                    \
        SCM self_scm_; \
 public: \
        SCM self_scm () const { return self_scm_; } \
@@ -134,7 +134,7 @@ unsmob_ ## name (SCM s)                     \
 return  CL::unsmob (s);                                \
 }
 
-#define DECLARE_TYPE_P(CL) extern SCM CL ## _type_p_proc
+
 
 #endif /* SMOBS_HH */
 
index b50ca1ffe18da6aeac7a7501f96e81377e63003c..d1aa173c1512426c33f5b0232c77c164f1ca880d 100644 (file)
@@ -1,10 +1,3 @@
-/*   
-  source-file.hh -- declare Source_file
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1999--2004 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
 
 #ifndef SOURCE_FILE_HH
 #define SOURCE_FILE_HH
@@ -78,7 +71,7 @@ private:
   Protected_scm str_port_;
 };
 
-char *gulp_file (String fn, int *len);
+char * gulp_file (String fn, int *len);
 
-#endif /* SOURCE_FILE_HH */
+#endif // SOURCE_FILE_HH //
 
index 5c0774c83451c3a8c671808de8a5568803d33512..55f5e4e2e29b0075142f819b263982c500b21e31 100644 (file)
@@ -9,26 +9,28 @@
 #include "cons.hh"
 #include "flower-proto.hh"
 
-/*   A set of sourcefiles.  */
+/*
+   a set of sourcefiles.
+ */
 class Sources 
 {
   Sources (Sources const&) {}
-  Cons<Source_file> *sourcefile_list_;
-  bool is_binary_;
-
 public:
   Sources ();
   ~Sources ();
 
-  Source_file *get_file (String &filename );
-  Source_file *get_sourcefile (char const*);
+  Source_file * get_file (String &filename );
+  Source_file* get_sourcefile (char const* str0 );
   void add (Source_file* sourcefile );
-  void set_path (File_path*);
+  void set_path (File_path*p);
   void set_binary (bool);
 
-  const File_path *path_;
+  const File_path * path_C_;
+private:
+  Cons<Source_file> *sourcefile_list_;
+  bool is_binary_ ;
 };
 
 
 
-#endif /* SOURCE_HH */
+#endif // SOURCE_HH //
index edfb1c7f8f08dcbdc4918317d6b765a30dd91a0d..0af30a3d634b2566e69918a2d8bd970da4bd20c0 100644 (file)
@@ -11,6 +11,7 @@
 #include <stdlib.h>            // size_t
 #include "lily-proto.hh"
 #include "box.hh"
+#include "axes.hh"
 #include "direction.hh"
 #include "lily-guile.hh"
 #include "smobs.hh"
 
     It is implemented as a "tree" of scheme expressions, as in
 
-     Expr = combine Expr-list
-            | translate Offset Expr
-           | origin (ORIGIN) Expr
-           | no-origin Expr
-           | (SCHEME)
-           ;
+     Expr = combine Expr Expr
+              | translate Offset Expr
+             | SCHEME
+             ;
 
     SCHEME is a Scheme expression that --when eval'd-- produces the
     desired output.  
 
-    Notes:
-    
-    * Because of the way that Stencil is implemented, it is the most
-    efficient to add "fresh" stencils to what you're going to build.
 
-    * Do not create Stencil objects on the heap. That includes passing
-    around Stencil* which are produced by unsmob_stencil(). Either
-    copy Stencil objects, or use SCM references.
+    Because of the way that Stencil is implemented, it is the most
+    efficient to add "fresh" stencils to what you're going to build.
     
-    * Empty stencils have empty dimensions.  If add_at_edge is used to
-    init the stencil, we assume that
+    Dimension behavior:
 
-      DIMENSIONS = (Interval (0,0),Interval (0,0)
+    Empty stencils have empty dimensions.  If add_at_edge is used to
+    init the stencil, we assume that
+    DIMENSIONS = (Interval (0,0),Interval (0,0)
 */
 class Stencil
 {
@@ -63,7 +58,7 @@ public:
   Stencil ();
   
   Offset origin () const;
-  SCM expr () const;
+  SCM get_expr () const;
 
   /**
      Set dimensions to empty, or to (Interval (0,0),Interval (0,0) */
@@ -91,12 +86,8 @@ public:
 DECLARE_UNSMOB(Stencil,stencil);
 SCM fontify_atom (Font_metric const*, SCM atom);
 
-void interpret_stencil_expression (SCM expr,
-                        void (*func) (void*, SCM),
-                        void *func_arg,
-                        Offset o);
-
 Stencil create_stencil (SCM print);
-SCM find_expression_fonts (SCM expr);
 
-#endif /* STENCIL_HH */
+
+
+#endif
index 3ae5cda3fb7b0fa84e4d4ac44e83a0d16052fb1c..1ef5255c5d301463222603949702b1280a8bae21 100644 (file)
@@ -20,7 +20,6 @@ class Text_item
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (interpret_markup, (SCM, SCM, SCM));
-  DECLARE_SCHEME_CALLBACK (interpret_string, (SCM, SCM, SCM, SCM));
   static bool has_interface (Grob*);
   static bool markup_p (SCM) ;
 
index f7e80e35a48ee4948ca689af5f5b2b27e058b9ad..ddf42d6b2330e58e3d93f7179ed18358ddea7a0b 100644 (file)
@@ -27,19 +27,21 @@ private:
   void read_char_metrics ();
   Tex_font_char_metric read_char_metric (Char_code code);
   Tex_font_char_metric read_char ();
-  void read_lig_kern_program (Array<Tfm_ligature>* ligatures,
-                             Array <Tfm_kern>* kerns);
+  void read_lig_kern_program (Array<Tfm_ligature>* ligatures, Array <Tfm_kern>* kerns);
+
 
   Binary_source_file input_;
 
 public:
   Tex_font_metric_reader ( String name);
 
+  
   Tfm_info info_;
   Tfm_header header_;
   Array<Tex_font_char_metric> char_metrics_;
   Array<int> ascii_to_metric_idx_;
 };
 
+
 #endif /* TFM_READER_HH */
 
index 0ce204a0cf1e41917a04fdb298fdbc72bd1cc20c..5869aca15950a77035f739091c7324b29b9a162e 100644 (file)
@@ -131,40 +131,36 @@ struct Tfm_kern
 
 struct Tex_font_char_metric
 {
-  bool exists_;
+  bool exists_b_;
   Char_code code_;
   Real width_, height_, depth_, italic_correction_;
   Fix width_fix_, height_fix_, depth_fix_, italic_correction_fix_;
   Array<Tfm_kern> kerns_;
   Array<Tfm_ligature> ligatures_;
 
+  String to_string () const;
   Tex_font_char_metric ();
 
   Box dimensions () const; 
 };
 
 
-class Tex_font_metric : public Simple_font_metric
+class Tex_font_metric : public Font_metric
 {
 public:
   static  SCM make_tfm (String filename);
 
   virtual int count () const;
   virtual Box get_ascii_char (int) const;
-  virtual Real design_size () const;
-  virtual String coding_scheme () const;
-  virtual void derived_mark () const;
-  virtual int name_to_index (String) const;
-  
+  Tex_font_char_metric const *find_ascii (int ascii, bool warn=true) const;
+
+  String to_string () const;
   
   Tfm_info info_;
   Tfm_header header_;
   Array<Tex_font_char_metric> char_metrics_;
   Array<int> ascii_to_metric_idx_;
-  SCM encoding_table_;
-  
 private:
-  Tex_font_char_metric const *find_ascii (int ascii, bool warn=true) const;
   Tex_font_metric ();
 };
 
index 1050cac31af4aacb15fdaaa0e9254e46ad6e1713..57e3257a2ff94ea8268b04f38413df1f043906c8 100644 (file)
@@ -35,17 +35,30 @@ public:                                                     \
 class Translator
 {
   void init ();
-  
 public:
-  Context * context () const { return daddy_context_; }
+  Music_output_def * output_def_;
   
   Translator (Translator const &);
+  Context * daddy_context_ ;
 
+  void removal_processing ();
+  virtual Music_output_def *get_output_def () const;
   SCM internal_get_property (SCM symbol) const;
-  
-  virtual Output_def *get_output_def () const;
   virtual Translator_group* get_daddy_translator ()const;
   virtual Moment now_mom () const;  
+
+public:
+  DECLARE_SMOBS (Translator, dummy);
+
+protected:                     // should be private.
+  SCM simple_trans_list_;
+  friend class Context_def;
+
+public:
+  Score_context * get_score_context () const;
+  Global_context * get_global_context () const;
+  
+  TRANSLATOR_DECLARATIONS(Translator);
   virtual bool try_music (Music *req);
   virtual void stop_translation_timestep ();
   virtual void start_translation_timestep ();
@@ -53,17 +66,6 @@ public:
   virtual void process_music ();
   virtual void do_announces ();
   virtual void finalize ();
-  
-  Score_context * get_score_context () const;
-  Global_context * get_global_context () const;
-  
-  TRANSLATOR_DECLARATIONS(Translator);
-  DECLARE_SMOBS (Translator, dummy);
-protected:                     // should be private.
-  Context * daddy_context_ ;
-  SCM simple_trans_list_;
-  friend class Context_def;
-  friend class Context;
 };
 
 /**
index 200c1ff02bf00234041ba1118c08deac7f29c149..a3859954dfe5ed3a33dc31f81e3661e7c1d52466 100644 (file)
@@ -16,11 +16,9 @@ source file of the GNU LilyPond music typesetter
 class Virtual_font_metric : public Font_metric
 {
   SCM font_list_;
-
 public:
-  SCM get_font_list () const;
-  Virtual_font_metric (SCM namelist);
-  virtual Real design_size () const;
+  Virtual_font_metric (SCM namelist, Real, Paper_def*);
+
   virtual int count () const;
   virtual Box get_indexed_char (int ascii) const;
   virtual Box get_ascii_char (int ascii) const;
@@ -29,7 +27,6 @@ public:
   virtual Offset get_indexed_wxwy (int) const;
   virtual int name_to_index (String)const;
   virtual Stencil find_by_name (String) const;
-  virtual String coding_scheme () const;
 
 protected:
   virtual void derived_mark () const;
diff --git a/lily/input-file-results.cc b/lily/input-file-results.cc
new file mode 100644 (file)
index 0000000..0da68c8
--- /dev/null
@@ -0,0 +1,235 @@
+/*
+  scores.cc -- implement some globals
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+#include "config.h"
+
+#include <errno.h>
+#include <sys/types.h>
+#include <stdio.h>
+
+
+#if HAVE_SYS_STAT_H 
+#include <sys/stat.h>
+#endif
+#include <unistd.h>
+
+
+#include "main.hh"
+#include "score.hh"
+#include "string.hh"
+#include "paper-def.hh"
+#include "warn.hh"
+#include "parray.hh"
+#include "file-path.hh"
+#include "input-file-results.hh"
+#include "my-lily-parser.hh"
+#include "source.hh"
+#include "lily-version.hh"
+#include "scm-hash.hh"
+#include "ly-module.hh"
+
+#include "paper-book.hh"
+
+bool store_locations_global_b;
+
+/*
+  TODO: should merge with My_lily_parser. 
+ */
+
+/*
+  no ! suffix since it doesn't modify 1st argument.
+ */
+LY_DEFINE (ly_set_point_and_click, "ly:set-point-and-click", 1, 0, 0,
+         (SCM what),
+         "Set the options for Point-and-click source specials output. The\n"
+"argument is a symbol.  Possible options are @code{none} (no source specials),\n"
+"@code{line} and @code{line-column}")
+{
+  /*
+    UGH.
+   */
+  SCM val = SCM_BOOL_F;
+  if (ly_symbol2scm ("line-column") == what)
+    val = gh_eval_str ("line-column-location");
+  else if (what == ly_symbol2scm ("line"))
+    val = gh_eval_str ("line-location");
+
+  scm_module_define (global_lily_module, ly_symbol2scm ("point-and-click"), val);
+
+  store_locations_global_b =gh_procedure_p (val);
+  return SCM_UNSPECIFIED;
+}
+
+void
+write_dependency_file (String fn,
+                      Array<String> targets,
+                      Array<String> deps)
+{
+  const int WRAPWIDTH = 65;
+
+  progress_indication (_f ("dependencies output to `%s'...", fn.to_str0 ()));
+  progress_indication ("\n");
+  FILE * f = fopen  (fn.to_str0 (), "w");
+  if (!f)
+    warning (_f ("can't open file: `%s'", fn));
+
+  fprintf (f, "# Generated automatically by: %s\n", gnu_lilypond_version_string ().to_str0 ());
+  
+  String out;
+  for (int i=0; i < targets.size (); i ++)
+     out += dependency_prefix_global + targets[i] + " ";
+  out +=  ": ";
+
+  for (int i=0; i < deps.size (); i ++)
+    {
+      if (out.length () > WRAPWIDTH)
+       {
+         fprintf (f, "%s\\\n", out.to_str0 ());
+         out = "  ";
+       }
+      String dep = deps[i];
+      if (!dependency_prefix_global.is_empty ())
+       {
+         if (dep.index ('/') < 0)
+           dep = dependency_prefix_global + dep;
+       }
+      out  += " " +  dep;
+    }
+  fprintf (f, "%s\n",  out.to_str0 ());
+}
+
+
+void
+Input_file_results::do_deps (String output)
+{
+  if (dependency_global_b)
+    {
+      Path p = split_path (output);
+      p.ext = "dep";
+      write_dependency_file (p.to_string (),
+                            target_strings_,
+                            inclusion_names_);
+    }
+}
+
+Input_file_results::~Input_file_results ()
+{
+  inclusion_names_.clear ();
+  if (header_)
+    header_ = SCM_EOL;
+
+  global_input_file = 0;
+
+  ly_clear_anonymous_modules ();
+}
+
+
+
+Input_file_results* global_input_file;
+
+Input_file_results::Input_file_results (String init, String in_file, String out_file)
+{
+  header_ = ly_make_anonymous_module ();
+  global_input_file = this;
+  score_count_ = 0;
+  sources_.set_path (&global_path);
+  
+
+  progress_indication (_f ("Now processing `%s'", in_file.to_str0 ()));
+  progress_indication ("\n");
+
+  My_lily_parser parser (this);
+  parser.parse_file (init, in_file, out_file);
+  
+  if (parser.error_level_)
+    {
+      exit_status_global  = 1;
+      failed_files.push (in_file);
+    }
+
+  
+  do_deps (out_file);
+}
+
+/* Distill full input file name from command argument.  PATH describes
+   file name with added default extension, ".ly" if none.  "-" is
+   STDIN.  */
+Path
+distill_inname (String str)
+{
+  Path p = split_path (str);
+  if (str.is_empty () || str == "-")
+    p.base = "-";
+  else
+    {
+      String orig_ext = p.ext;
+      char const *extensions[] = {"ly", "", 0};
+      for (int i = 0; extensions[i]; i++)
+       {
+         p.ext = orig_ext;
+         if (*extensions[i] && !p.ext.is_empty ())
+           p.ext += ".";
+         p.ext += extensions[i];
+         if (!global_path.find (p.to_string ()).is_empty ())
+             break;
+       }
+      /* Reshuffle extension */
+      p = split_path (p.to_string ());
+    }
+  return p;
+}
+
+/* ugr. */
+void
+do_one_file (char const *file)
+{
+  String infile (file);
+  Path inpath = distill_inname (infile);
+  
+  /* By default, use base name of input file for output file name */
+  Path outpath = inpath;
+  if (inpath.to_string () != "-")
+    outpath.ext = output_format_global;
+  
+  /* By default, write output to cwd; do not copy directory part
+     of input file name */
+  outpath.root = "";
+  outpath.dir = "";
+  
+  if (!output_name_global.is_empty ())
+    outpath = split_path (output_name_global);
+  
+  String init;
+  if (!init_name_global.is_empty ())
+    init = init_name_global;
+  else
+    init = "init.ly";
+  
+  String in_file = inpath.to_string ();
+  String out_file = outpath.to_string ();
+
+  if (init.length () && global_path.find (init).is_empty ())
+    {
+      warning (_f ("can't find file: `%s'", init));
+      warning (_f ("(search path: `%s')", global_path.to_string ().to_str0 ()));
+      return;
+    }
+
+  if ((in_file != "-") && global_path.find (in_file).is_empty ())
+    {
+      warning (_f ("can't find file: `%s'", in_file));
+      return;
+    }
+
+  paper_book = new Paper_book ();;
+  Input_file_results inp_file (init, in_file, out_file);
+  if (output_format_global == PAGE_LAYOUT)
+    paper_book->output (out_file);
+
+  scm_gc_unprotect_object (paper_book->self_scm ());
+  paper_book = 0;
+}
index 798e61d51ac9c405b0f1a4463789801a9c2ddaa1..4ca03d940aaae7da83760f97304206062f0849fb 100644 (file)
@@ -85,17 +85,14 @@ LY_DEFINE (ly_input_message, "ly:input-message", 2, 0, 0, (SCM sip, SCM msg),
 {
   Input *ip = unsmob_input (sip);
   SCM_ASSERT_TYPE (ip, sip, SCM_ARG1, __FUNCTION__, "input location");
-  SCM_ASSERT_TYPE (ly_c_string_p (msg), msg, SCM_ARG2, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (gh_string_p (msg), msg, SCM_ARG2, __FUNCTION__, "string");
 
   String m = ly_scm2string (msg);
   ip->message (m);
 
-  return SCM_UNSPECIFIED;
+  return SCM_UNDEFINED;
 }
 
-/*
-  TODO: rename this function. ly:input-location? vs ly:input-location
- */
 LY_DEFINE (ly_input_location, "ly:input-location", 1, 0, 0, (SCM sip),
          "Return input location in @var{sip} as (filename line column).")
 {
index c99b6f5c775ae93f9807f7b159e3d77dcb1e6d43..9793e8dae3f1a31c8540b5666d334bed65349246 100644 (file)
@@ -42,7 +42,7 @@ Instrument_name_engraver::Instrument_name_engraver ()
 void
 Instrument_name_engraver::initialize ()
 {
-  context ()->set_property ("instrumentSupport", SCM_EOL); 
+  daddy_context_->set_property ("instrumentSupport", SCM_EOL); 
 }
 
 void
@@ -52,6 +52,7 @@ Instrument_name_engraver::stop_translation_timestep ()
     {
       text_->set_property ("side-support-elements",
                                get_property ("instrumentSupport"));
+      typeset_grob (text_);
       text_ = 0;
     }
 }
@@ -74,11 +75,11 @@ Instrument_name_engraver::create_text ()
     return ;
 
   
-  text_ = make_item ("InstrumentName", SCM_EOL);
+  text_ = make_item ("InstrumentName");
       
   if (text_->get_property ("text") != txt)
     text_->set_property ("text", txt);
-  
+  announce_grob (text_, SCM_EOL);
   }
 
 void
@@ -107,10 +108,10 @@ Instrument_name_engraver::acknowledge_grob (Grob_info i)
           && Axis_group_interface::has_axis (i.grob_, Y_AXIS)))
       && !Align_interface::has_interface (i.grob_))
     {
-      SCM nl = scm_cons (i.grob_->self_scm (),
+      SCM nl = gh_cons (i.grob_->self_scm (),
                        get_property ("instrumentSupport"));
 
-      context ()->set_property ("instrumentSupport", nl);
+      daddy_context_->set_property ("instrumentSupport", nl);
     }
 }
 
@@ -121,7 +122,7 @@ Instrument_name_engraver::process_music ()
     Also create text if barlines in other groups. This allows
     a name to be attached to lyrics or chords. 
    */
-  if (ly_c_string_p (get_property ("whichBar")))
+  if (gh_string_p (get_property ("whichBar")))
     create_text ();
 }
 
@@ -168,11 +169,11 @@ Vocal_name_engraver::create_text ()
   if (txt == SCM_EOL)
     return ;
   
-  text_ = make_item ("VocalName", SCM_EOL);
+  text_ = make_item ("VocalName");
       
   if (text_->get_property ("text") != txt)
     text_->set_property ("text", txt);
-  
+  announce_grob (text_, SCM_EOL);
 }
 
 
index f857ff55917f038a80652eb9136da4d41ed5c1ab..635ea2f1f52304446b660276b3d76490f5f49e51 100644 (file)
@@ -41,8 +41,8 @@ Item::is_breakable (Grob*me)
   if (!dynamic_cast<Item*> (me))
     me->programming_error ("only items can be breakable.");
   
-  Item * i dynamic_cast<Item*> (me->get_parent (X_AXIS));
-  return (i) ? Item::is_breakable (i) : to_boolean (me->get_property ("breakable"));
+  Item * i  =dynamic_cast<Item*> (me->get_parent (X_AXIS));
+  return (i) ?  Item::is_breakable (i) : to_boolean (me->get_property ("breakable"));
 }
 
 Paper_column *
@@ -153,12 +153,12 @@ Item::handle_prebroken_dependencies ()
     more complicated things.
   */
   SCM vis = get_property ("break-visibility");
-  if (ly_c_procedure_p (vis))
+  if (gh_procedure_p (vis))
     {
-      SCM args = scm_list_n (scm_int2num (break_status_dir ()), SCM_UNDEFINED);
-      SCM result = scm_apply_0 (vis, args);
-      bool trans = ly_scm2bool (ly_car (result));
-      bool empty = ly_scm2bool (ly_cdr (result));
+      SCM args = scm_list_n (gh_int2scm (break_status_dir ()), SCM_UNDEFINED);
+      SCM result = gh_apply (vis, args);
+      bool trans = gh_scm2bool (ly_car (result));
+      bool empty = gh_scm2bool (ly_cdr (result));
       
       if (empty && trans)
        suicide ();
index 6bff182773b5d9ee4328d220debb36131fa58151..a4e2dbe22022c396d25e36448dead2ccc5b61a68 100644 (file)
@@ -64,7 +64,7 @@ Key_engraver::create_key (bool def)
 {
   if (!item_) 
     {
-      item_ = make_item ("KeySignature", key_ev_ ? key_ev_->self_scm () : SCM_EOL);
+      item_ = make_item ("KeySignature");
 
       item_->set_property ("c0-position",
                           get_property ("middleCPosition"));
@@ -72,12 +72,14 @@ Key_engraver::create_key (bool def)
       if (to_boolean (get_property ("printKeyCancellation")))
        item_->set_property ("old-accidentals", get_property ("lastKeySignature"));
       item_->set_property ("new-accidentals", get_property ("keySignature"));
+
+      announce_grob (item_, key_ev_ ? key_ev_->self_scm () : SCM_EOL);
     }
 
   if (!def)
     {
       SCM vis = get_property ("explicitKeySignatureVisibility"); 
-      if (ly_c_procedure_p (vis))
+      if (gh_procedure_p (vis))
        item_->set_property ("break-visibility",vis);
     }
 }      
@@ -88,12 +90,15 @@ Key_engraver::try_music (Music * ev)
 {
   if (ev->is_mus_type ("key-change-event"))
     {
-      /* do this only once, just to be on the safe side.  */
       if (!key_ev_)
        {
+         /*
+           do this only once, just to be on the safe side.
+           */      
          key_ev_ = ev;
          read_ev (key_ev_);
        }
+      
       return true;
     }   
   return  false;
@@ -112,7 +117,7 @@ Key_engraver::acknowledge_grob (Grob_info info)
        }
     }
   else if (Bar_line::has_interface (info.grob_)
-          && ly_c_pair_p (get_property ("keySignature")))
+          && gh_pair_p (get_property ("keySignature")))
     {
       create_key (true);
     }
@@ -131,8 +136,11 @@ Key_engraver::process_music ()
 void
 Key_engraver::stop_translation_timestep ()
 {
-  item_ = 0;
-  context ()->set_property ("lastKeySignature", get_property ("keySignature"));
+  if (item_) 
+    {
+      typeset_grob (item_);
+      item_ = 0;
+    }
 }
 
 
@@ -140,27 +148,27 @@ void
 Key_engraver::read_ev (Music const * r)
 {
   SCM p = r->get_property ("pitch-alist");
-  if (!ly_c_pair_p (p))
+  if (!gh_pair_p (p))
     return;
 
   SCM n = scm_list_copy (p);
   SCM accs = SCM_EOL;
   for (SCM s = get_property ("keyAccidentalOrder");
-       ly_c_pair_p (s); s = ly_cdr (s))
+       gh_pair_p (s); s = ly_cdr (s))
     {
-      if (ly_c_pair_p (scm_member (ly_car (s), n)))
+      if (gh_pair_p (scm_member (ly_car (s), n)))
        {
-         accs = scm_cons (ly_car (s), accs);
+         accs = gh_cons (ly_car (s), accs);
          n = scm_delete_x (ly_car (s), n);
        }
     }
   
-  for (SCM s = n ; ly_c_pair_p (s); s = ly_cdr (s))
-    if (ly_scm2int (ly_cdar (s)))
-      accs = scm_cons (ly_car (s), accs);
+  for (SCM s = n ; gh_pair_p (s); s = ly_cdr (s))
+    if (gh_scm2int (ly_cdar (s)))
+      accs = gh_cons (ly_car (s), accs);
 
-  context ()->set_property ("keySignature", accs);
-  context ()->set_property ("tonic" ,
+  daddy_context_->set_property ("keySignature", accs);
+  daddy_context_->set_property ("tonic" ,
                              r->get_property ("tonic"));
 }
 
@@ -169,17 +177,18 @@ void
 Key_engraver::start_translation_timestep ()
 {
   key_ev_ = 0;
+  daddy_context_->set_property ("lastKeySignature", get_property ("keySignature"));
 }
 
 
 void
 Key_engraver::initialize ()
 {
-  context ()->set_property ("keySignature", SCM_EOL);
-  context ()->set_property ("lastKeySignature", SCM_EOL);
+  daddy_context_->set_property ("keySignature", SCM_EOL);
+  daddy_context_->set_property ("lastKeySignature", SCM_EOL);
 
   Pitch p (0,0,0);
-  context ()->set_property ("tonic", p.smobbed_copy ());
+  daddy_context_->set_property ("tonic", p.smobbed_copy ());
 
 }
 
index f217742603da17e4f9478289d10a14096a0ea60b..c9ced39f6ab631d1d43891859a55ed880d1e1cf7 100644 (file)
@@ -47,11 +47,11 @@ Key_performer::create_audio_elements ()
       SCM pitchlist = key_req_->get_property ("pitch-alist");
       SCM proc = ly_scheme_function ("alterations-in-key");
       
-      SCM acc = scm_call_1 (proc, pitchlist);
+      SCM acc = gh_call1 (proc, pitchlist);
       
       Pitch key_do (0, 
-                   ly_scm2int (ly_caar (pitchlist)),
-                   ly_scm2int (ly_cdar (pitchlist)));
+                   gh_scm2int (ly_caar (pitchlist)),
+                   gh_scm2int (ly_cdar (pitchlist)));
 
       Pitch c_do (0, 0, 0);
                  
@@ -62,7 +62,7 @@ Key_performer::create_audio_elements ()
       /* MIDI keys are too limited for lilypond scales.
         We check for minor scale and assume major otherwise.  */
       SCM minor = scm_c_eval_string ("minor");
-      audio_ = new Audio_key (ly_scm2int (acc),
+      audio_ = new Audio_key (gh_scm2int (acc),
                              SCM_BOOL_T != scm_equal_p (minor, c_pitchlist));
 
       Audio_element_info info (audio_, key_req_);
index 1990b336a5a3606f0b7a26065c18b3d20a608489..7ccd2179ed400d6028d748ea0201524bc77378ae 100644 (file)
@@ -11,7 +11,7 @@
 #include "item.hh"
 
 #include "stencil.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "font-interface.hh"
 #include "staff-symbol-referencer.hh"
 #include "lookup.hh"
@@ -46,6 +46,9 @@ const int NATURAL_TOP_PITCH = 4;
   the thinking to other parties.
 
   - TODO: put this in Scheme
+  
+  - lots of values trivially shared (key doesn't change very
+  often). Compute those once, and use that as cache for the rest.
 
   TODO: can  we do without c0pos? it's partly musical. 
 
@@ -53,10 +56,10 @@ const int NATURAL_TOP_PITCH = 4;
 int
 alteration_pos  (SCM what, int alter, int c0p)
 {
-  if (ly_c_pair_p (what))
-    return ly_scm2int (ly_car (what)) * 7 + ly_scm2int (ly_cdr (what)) + c0p;
+  if (gh_pair_p (what))
+    return gh_scm2int (ly_car (what)) * 7 + gh_scm2int (ly_cdr (what)) + c0p;
 
-  int p = ly_scm2int (what);
+  int p = gh_scm2int (what);
 
   // Find the c in the range -4 through 2
   int from_bottom_pos = c0p + 4;
@@ -71,7 +74,6 @@ alteration_pos  (SCM what, int alter, int c0p)
     {
       p -= 7; /* Typeset below c_position */
     }
-  
   /* Provide for the four cases in which there's a glitch 
        it's a hack, but probably not worth  
        the effort of finding a nicer solution.
@@ -102,7 +104,7 @@ Key_signature_interface::print (SCM smob)
 
   SCM scm_style = me->get_property ("style");
   String style;
-  if (ly_c_symbol_p (scm_style))
+  if (gh_symbol_p (scm_style))
     {
       style = ly_symbol2string (scm_style);
     }
@@ -116,8 +118,8 @@ Key_signature_interface::print (SCM smob)
 
   SCM c0s = me->get_property ("c0-position");
   int c0p = 0;
-  if (ly_c_number_p (c0s))
-    c0p = ly_scm2int (c0s);
+  if (gh_number_p (c0s))
+    c0p = gh_scm2int (c0s);
 
   /*
     SCM lists are stacks, so we work from right to left, ending with
@@ -125,9 +127,9 @@ Key_signature_interface::print (SCM smob)
   */
 
   Font_metric *fm = Font_interface::get_default_font (me);
-  for (SCM s = newas; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = newas; gh_pair_p (s); s = ly_cdr (s))
     {
-      int alteration = ly_scm2int (ly_cdar (s));
+      int alteration = gh_scm2int (ly_cdar (s));
       String font_char =
        Accidental_interface::get_fontcharname (style, alteration);
       Stencil acc (fm->find_by_name ("accidentals-" + font_char));
@@ -161,11 +163,11 @@ Key_signature_interface::print (SCM smob)
       mol.add_at_edge (X_AXIS, LEFT, Lookup::blank (Box (x,y)), 0, 0);
 
       Stencil natural;
-      if (ly_c_pair_p (old))
+      if (gh_pair_p (old))
        natural=Font_interface::get_default_font (me)->
            find_by_name (String ("accidentals-") + style + String ("0"));
       
-      for (; ly_c_pair_p (old); old = ly_cdr (old))
+      for (; gh_pair_p (old); old = ly_cdr (old))
         {
          SCM found = scm_assoc (ly_caar (old), newas);
          if (found == SCM_BOOL_F
index 63b288bea2d4daff8d737f4278c7c1bc013b804d..50cb5c3545485e303d689b6b4f1734f68858c228 100644 (file)
@@ -38,14 +38,13 @@ extern "C" {
 #include "string.hh"
 #include "main.hh"
 #include "kpath.hh"
-#include "source-file.hh"
 #include "warn.hh"
 
 String
 kpathsea_find_afm (char const * name)
 {
 #if (KPATHSEA && HAVE_KPSE_FIND_FILE)
-  char * name_ptr =  kpse_find_file (name, kpse_afm_format, false);
+  char * name_ptr =  kpse_find_file (name, kpse_afm_format, true);
 
   if (!name_ptr)
     {
@@ -63,104 +62,63 @@ kpathsea_find_afm (char const * name)
 }
 
 String
-kpathsea_find_tfm (char const *name)
+kpathsea_find_tfm (char const * name)
 {
-  String filename = global_path.find (String (name) + ".tfm");
+  String p = global_path.find (String (name) + ".tfm");
+
+  if (p.length ())
+    return p;
+  
 #if (KPATHSEA && HAVE_KPSE_FIND_FILE)
-  if (filename.is_empty ())
-    {
-      /* If invoked for a TeX font, we could do TRUE (must exist).
-        We could also do:
-          p = kpse_find_file (name, kpse_mf_format, false);
-          if (p)
-            p = kpse_find_file (name, kpse_mf_format, true);
-
-            but we assume that if there is a .PFA, there is also a .TFM,
-        and it's no use generating TFMs on the fly, because PFAs cannot
-        be generated on the fly. */
-      char *p = kpse_find_file (name, kpse_tfm_format, false);
-      if (!p)
-       warning (_f ("kpathsea can not find TFM file: `%s'", name));
-      else
-       filename = p;
-    }
+  char * name_ptr =  kpse_find_file (name, kpse_tfm_format, true);
+  if (!name_ptr)
+    warning (_f ("kpathsea can not find TFM file: `%s'", name));
+  else
+    return name_ptr;
+  
 #endif
-  return filename;
+  return "";
 }
 
-#if KPATHSEA
-/* FIXME: this should be part of kpathsea */
 
-static kpse_file_format_type
-kpathsea_find_format (String name)
+void
+initialize_kpathsea (char *av0)
 {
-  for (int i = 0; i < kpse_last_format; i++)
-    {
-      if (!kpse_format_info[i].type)
-        kpse_init_format ((kpse_file_format_type) i);
-
-      char const **suffixes[] = { kpse_format_info[i].suffix,
-                                 kpse_format_info[i].alt_suffix };
-      for (int j = 0; j < 2; j++)
-       for (char const **p = suffixes[j]; p && *p; p++)
-         {
-           String suffix = *p;
-           if (name.right_string (suffix.length ()) == suffix)
-             return (kpse_file_format_type) i;
-         }
-    }
-  return kpse_last_format;
-}
-#endif
+#if KPATHSEA && HAVE_KPATHSEA_KPATHSEA_H
+  /*
+    We take two pronged approach to tfms:
 
-String
-kpathsea_gulp_file_to_string (String name)
-{
-  String filename = global_path.find (name);
+    * the lilypond tfms (feta*.tfm) are found through our own routines.
 
-#if (KPATHSEA && HAVE_KPSE_FIND_FILE)
-  if (filename.is_empty ())
-    {
-      char *p = kpse_find_file (name.to_str0 (), kpathsea_find_format (name),
-       true);
-      if (p)
-       filename = p;
-      else
-       warning (_f ("kpathsea can not find file: `%s'", name));
-    }
-#endif
+    * the TeX tfms are found through vanilla kpathsea.
 
-  if (filename.is_empty ())
-    error (_f ("can't find file: `%s'", name));
+    (* other TFMs are not found, i.e. don't use them. )
 
-  if (verbose_global_b)
-    progress_indication ("[" + filename);
+    PRO:
+    - TFM and AFM checksums always match in Lily.
 
-  int filesize;
-  char *str = gulp_file (filename, &filesize);
-  String string (str);
-  delete[] str;
-  
-  if (verbose_global_b)
-    progress_indication ("]");
+    - less hassle, no kpathsea spaghetti
 
-  return string;
-}
+    CON:
 
-LY_DEFINE (ly_kpathsea_gulp_file, "ly:kpathsea-gulp-file",
-          1, 0, 0, (SCM name),
-          "Read the file @var{name}, and return its contents in a string.  "
-          "The file is looked up using the search path and kpathsea.")
-{
-  SCM_ASSERT_TYPE (ly_c_string_p (name), name, SCM_ARG1, __FUNCTION__, "string");
-  return scm_makfrom0str
-    (kpathsea_gulp_file_to_string (ly_scm2string (name)).to_str0 ());
-}
+    - feta PK files are often recreated, locally
+    Solution: cache PK files locally?
+
+    - need env. vars to make sure that TeX finds the TFMs
+
+    - Outdated PK (TFM?) font files are not automatically removed,
+    since VERSION is not part of the standard location.
 
-void
-initialize_kpathsea (char *av0)
-{
-#if KPATHSEA && HAVE_KPATHSEA_KPATHSEA_H
+
+    ALTERNATIVE
+
+    we have tried to come up with schemes that leave this kind of work
+    to kpathsea with objective of fixing the CONs, but miserably
+    failed. TeX installations and kpathsea itself form a buggy,
+    inconsistent, and unorderly mess.
+    
+  */
 
   /*
    initialize kpathsea
@@ -169,3 +127,5 @@ initialize_kpathsea (char *av0)
   kpse_maketex_option ("tfm", TRUE);
 #endif
 }
+
+
index 377e9f1e9b4561f69c1fd3d21e592342c992c7f5..af4afebe88877b74c387ef6f786cbfff37418e73 100644 (file)
 
 #include <iostream>
 using namespace std;
-#include "music-function.hh"
+
 #include "source-file.hh"
 #include "parse-scm.hh"
 #include "lily-guile.hh"
 #include "string.hh"
 #include "string-convert.hh"
 #include "my-lily-lexer.hh"
+#include "input-file-results.hh"
 #include "interval.hh"
 #include "lily-guile.hh"
 #include "parser.hh"
@@ -57,19 +58,19 @@ RH 7 fix (?)
 void strip_trailing_white (String&);
 void strip_leading_white (String&);
 String lyric_fudge (String s);
-int music_function_type (SCM);
-SCM lookup_markup_command (String s);
-bool is_valid_version (String s);
+
+SCM
+lookup_markup_command (String s);
+
+bool
+is_valid_version (String s);
+
 
 
 #define start_quote()  \
        yy_push_state (quote);\
        yylval.string = new String
 
-#define start_lyric_quote()    \
-       yy_push_state (lyric_quote);\
-       yylval.string = new String
-
 #define yylval \
        (*(YYSTYPE*)lexval)
 
@@ -97,18 +98,16 @@ SCM (* scm_parse_error_handler) (void *);
 %option never-interactive 
 %option warn
 
+%x renameinput
+%x version
 %x chords
-%x encoding
-%x figures
 %x incl
 %x lyrics
-%x lyric_quote
-%x longcomment
-%x markup 
 %x notes
+%x figures
 %x quote
-%x renameinput
-%x version
+%x longcomment
+%x markup 
 
 A              [a-zA-Z]
 AA             {A}|_
@@ -161,30 +160,21 @@ HYPHEN            --
   }
 }
 
-<INITIAL,notes>\\encoding{WHITE}* {
-       yy_push_state (encoding);
-}
 <INITIAL,chords,lyrics,notes,figures>\\version{WHITE}* {
        yy_push_state (version);
 }
 <INITIAL,chords,lyrics,notes,figures>\\renameinput{WHITE}*     {
        yy_push_state (renameinput);
 }
-<encoding>\"[^"]*\"     {
-       String s (YYText () + 1);
-       s = s.left_string (s.index_last ('\"'));
-       set_encoding (s);
-       yy_pop_state ();
-}
 <version>\"[^"]*\"     { /* got the version number */
-       String s (YYText () + 1);
+       String s (YYText ()+1);
        s = s.left_string (s.index_last ('\"'));
 
-       yy_pop_state ();
-       if (!is_valid_version (s))
+       yy_pop_state();
+        if (!is_valid_version (s))
                return INVALID;
 }
-<renameinput>\"[^"]*\"     {
+<renameinput>\"[^"]*\"     { /* got the version number */
        String s (YYText ()+1);
        s = s.left_string (s.index_last ('\"'));
 
@@ -193,21 +183,18 @@ HYPHEN            --
        progress_indication ("\n");
        progress_indication (_f ("input renamed to: `%s'", s.to_str0 ()));
        progress_indication ("\n");
-       scm_module_define (ly_car (scopes_),
+       scm_module_define (gh_car (scopes_),
                     ly_symbol2scm ("input-file-name"),
                     scm_makfrom0str (s.to_str0()));
 
 }
-<encoding>.    {
-       LexerError (_ ("No quoted string found after \\encoding").to_str0 ());
-       yy_pop_state ();
-}
+
 <version>.     {
-       LexerError (_ ("No quoted string found after \\version").to_str0 ());
+       LexerError ("No quoted string found after \\version");
        yy_pop_state ();
 }
 <renameinput>.         {
-       LexerError (_ ("No quoted string found after \\renameinput").to_str0 ());
+       LexerError ("No quoted string found after \\renameinput");
        yy_pop_state ();
 }
 <longcomment>{
@@ -233,13 +220,6 @@ HYPHEN             --
        {
                start_main_input ();
                main_input_b_ = true;
-/*
-This is broken - we should switch to \notes when the pitchnames are loaded.
-Then we get spanish etc. correct. --hwn.
-
-*/
-               SCM nn = lookup_identifier ("pitchnames");
-               push_note_state (alist_to_hashq (nn));
        }
        else
                error (_ ("\\maininput not allowed outside init files"));
@@ -249,23 +229,21 @@ Then we get spanish etc. correct. --hwn.
        yy_push_state (incl);
 }
 <incl>\"[^"]*\";?   { /* got the include file name */
-/* FIXME: semicolon? */
        String s (YYText ()+1);
        s = s.left_string (s.index_last ('"'));
 
-       new_input (s, sources_);
+       new_input (s, &global_input_file->sources_);
        yy_pop_state ();
 }
 <incl>\\{BLACK}*;?{WHITE} { /* got the include identifier */
-/* FIXME: semicolon? */
        String s = YYText () + 1;
        strip_trailing_white (s);
        if (s.length () && (s[s.length () - 1] == ';'))
          s = s.left_string (s.length () - 1);
 
        SCM sid = lookup_identifier (s);
-       if (ly_c_string_p (sid)) {
-               new_input (ly_scm2string (sid), sources_);
+       if (gh_string_p (sid)) {
+               new_input (ly_scm2string (sid), &global_input_file->sources_);
                yy_pop_state ();
        } else { 
            String msg (_f ("wrong or undefined identifier: `%s'", s ));
@@ -298,7 +276,7 @@ Then we get spanish etc. correct. --hwn.
        if (sval == SCM_UNDEFINED)
        {
                sval = SCM_UNSPECIFIED;
-               error_level_ = 1;
+               errorlevel_ = 1;
        }
 
        for (int i=0; i < n; i++)
@@ -318,10 +296,10 @@ Then we get spanish etc. correct. --hwn.
 }
 <INITIAL,notes,lyrics>{ 
        \<\<   {
-               return DOUBLE_ANGLE_OPEN;
+               return LESSLESS;
        }
        \>\>   {
-               return DOUBLE_ANGLE_CLOSE;
+               return MOREMORE;
        }
 }
 <figures>{
@@ -391,31 +369,10 @@ Then we get spanish etc. correct. --hwn.
                *yylval.string += YYText ();
        }
 }
-<lyric_quote>{
-       \\{ESCAPED}     {
-               *yylval.string += to_string (escaped_char (YYText ()[1]));
-       }
-       [^\\"]+ {
-               *yylval.string += YYText ();
-       }
-       \"      {
-
-               yy_pop_state ();
-
-               /* yylval is union. Must remember STRING before setting SCM*/
-               String *sp = yylval.string;
-               yylval.scm = scm_makfrom0str (sp->to_str0 ());
-               delete sp;
-               return LYRICS_STRING;
-       }
-       .       {
-               *yylval.string += YYText ();
-       }
-}
 
 <lyrics>{
        \" {
-               start_lyric_quote ();
+               start_quote ();
        }
        {FRACTION}      {
                yylval.scm =  scan_fraction (YYText ());
@@ -444,7 +401,7 @@ Then we get spanish etc. correct. --hwn.
                yylval.scm = scm_makfrom0str (s.to_str0 ());
 
 
-               return LYRICS_STRING;
+               return STRING;
        }
        . {
                return YYText ()[0];
@@ -499,16 +456,13 @@ Then we get spanish etc. correct. --hwn.
        \> {
                return '>';
        }
-       \\score {
-               return SCORE;
-       }
        {MARKUPCOMMAND} {
-               String str (YYText () + 1);
+               String str (YYText() + 1);
                SCM s = lookup_markup_command (str);
 
-               if (ly_c_pair_p (s) && ly_c_symbol_p (ly_cdr (s)) ) {
-                       yylval.scm = ly_car(s);
-                       SCM tag = ly_cdr(s);
+               if (gh_pair_p (s) && gh_symbol_p (gh_cdr (s)) ) {
+                       yylval.scm = gh_car(s);
+                       SCM tag = gh_cdr(s);
                        if (tag == ly_symbol2scm("markup0"))
                                return MARKUP_HEAD_MARKUP0;
                        if (tag == ly_symbol2scm("empty"))
@@ -536,14 +490,13 @@ Then we get spanish etc. correct. --hwn.
                        return scan_escaped_word (str);
        }
        [{}]    {
-               return YYText ()[0];
+               return YYText()[0];
        }
        [^#{}"\\ \t\n\r\f]+ {
                String s (YYText ()); 
 
                char c = s[s.length () - 1];
-               /* brace open is for not confusing dumb tools.  */
-               if (c == '{' ||  c == '}')
+               if (c == '{' ||  c == '}') // brace open is for not confusing dumb tools.
                        here_input ().warning (
                                _ ("Brace found at end of markup.  Did you forget a space?"));
                yylval.scm = scm_makfrom0str (s.to_str0 ());
@@ -557,16 +510,10 @@ Then we get spanish etc. correct. --hwn.
 }
 
 <<EOF>> {
-       if (main_input_b_)
-       {
-               main_input_b_ = false;
-               if (!close_input ())
-               /* Returns YY_NULL */
-                       yyterminate ();
+       main_input_b_ = false;
+       if (! close_input ()) { 
+         yyterminate (); // can't move this, since it actually rets a YY_NULL
        }
-       else if (!close_input ())
-               /* Returns YY_NULL */
-               yyterminate ();
 }
 
 
@@ -581,7 +528,7 @@ Then we get spanish etc. correct. --hwn.
        int cnv=sscanf (YYText (), "%lf", &r);
        assert (cnv == 1);
 
-       yylval.scm = scm_make_real (r);
+       yylval.scm = gh_double2scm (r);
        return REAL;
 }
 
@@ -642,22 +589,22 @@ Then we get spanish etc. correct. --hwn.
 %%
 
 void
-My_lily_lexer::push_chord_state (SCM tab)
+My_lily_lexer::push_note_state (SCM tab)
 {
-       pitchname_tab_stack_ = scm_cons (tab, pitchname_tab_stack_);
-       yy_push_state (chords);
+       pitchname_tab_stack_ = gh_cons (tab, pitchname_tab_stack_);
+       yy_push_state (notes);
 }
 
 void
-My_lily_lexer::push_figuredbass_state ()
+My_lily_lexer::push_figuredbass_state()
 {
        yy_push_state (figures);
 }
-
 void
-My_lily_lexer::push_initial_state ()
+My_lily_lexer::push_chord_state (SCM tab)
 {
-       yy_push_state (INITIAL);
+       pitchname_tab_stack_ = gh_cons (tab, pitchname_tab_stack_);
+       yy_push_state (chords);
 }
 
 void
@@ -672,18 +619,11 @@ My_lily_lexer::push_markup_state ()
        yy_push_state (markup);
 }
 
-void
-My_lily_lexer::push_note_state (SCM tab)
-{
-       pitchname_tab_stack_ = scm_cons (tab, pitchname_tab_stack_);
-       yy_push_state (notes);
-}
-
 void
 My_lily_lexer::pop_state ()
 {
        if (YYSTATE == notes || YYSTATE == chords)
-               pitchname_tab_stack_ = ly_cdr (pitchname_tab_stack_);
+               pitchname_tab_stack_ = gh_cdr (pitchname_tab_stack_);
        yy_pop_state ();
 }
 
@@ -707,13 +647,6 @@ My_lily_lexer::scan_escaped_word (String str)
                return l;
        }
        SCM sid = lookup_identifier (str);
-       if (is_music_function (sid))
-       {
-               yylval.scm = get_music_function_transform (sid);
-               
-               return music_function_type (yylval.scm);
-       }
-
        if (sid != SCM_UNDEFINED)
        {
                yylval.scm = sid;
@@ -734,14 +667,14 @@ My_lily_lexer::scan_bare_word (String str)
        SCM sym = ly_symbol2scm (str.to_str0 ());
        if ((YYSTATE == notes) || (YYSTATE == chords)) {
                SCM handle = SCM_BOOL_F;
-               if (ly_c_pair_p (pitchname_tab_stack_))
-                       handle = scm_hashq_get_handle (ly_car (pitchname_tab_stack_), sym);
+               if (gh_pair_p (pitchname_tab_stack_))
+                       handle = scm_hashq_get_handle (gh_car (pitchname_tab_stack_), sym);
                
-               if (ly_c_pair_p (handle)) {
+               if (gh_pair_p (handle)) {
                        yylval.scm = ly_cdr (handle);
                        if (unsmob_pitch (yylval.scm)) 
                            return (YYSTATE == notes) ? NOTENAME_PITCH : TONICNAME_PITCH;
-                       else if (ly_c_symbol_p (yylval.scm))
+                       else if (gh_symbol_p (yylval.scm))
                            return DRUM_PITCH;
                }
                else if ((handle = scm_hashq_get_handle (chordmodifier_tab_, sym))!= SCM_BOOL_F)
@@ -808,7 +741,7 @@ strip_trailing_white (String&s)
 
 
 /* 2.1.2x something -> \property -> \set. */ 
-Lilypond_version oldest_version ("2.2.0");
+Lilypond_version oldest_version ("2.1.25");
 
 
 bool
@@ -866,7 +799,7 @@ scan_fraction (String frac)
 
        int n = String_convert::dec2int (left);
        int d = String_convert::dec2int (right);
-       return scm_cons (scm_int2num (n), scm_int2num (d));
+       return gh_cons (gh_int2scm (n), gh_int2scm (d));
 }
 
 // Breaks for flex 2.5.31
@@ -893,47 +826,6 @@ SCM
 lookup_markup_command (String s)
 {
        SCM proc = ly_scheme_function ("lookup-markup-command");
-       return scm_call_1 (proc, scm_makfrom0str (s.to_str0 ()));
-}
-
-
-int
-music_function_type (SCM func)
-{
-       SCM type= scm_object_property (func, ly_symbol2scm ("music-function-signature-keyword"));
-       if (type == ly_symbol2scm ("scm"))
-       {
-               return MUSIC_FUNCTION_SCM;
-       }
-       else if (type == ly_symbol2scm ("music"))
-       {
-               return MUSIC_FUNCTION_MUSIC;
-       }
-       else if (type == ly_symbol2scm ("scm-music"))
-       {
-               return MUSIC_FUNCTION_SCM_MUSIC;
-       }
-       else if (type == ly_symbol2scm ("music-music"))
-       {
-               return MUSIC_FUNCTION_MUSIC_MUSIC;
-       }
-       else if (type == ly_symbol2scm ("scm-music-music"))
-       {
-               return MUSIC_FUNCTION_SCM_MUSIC_MUSIC;
-       }
-       else if (type == ly_symbol2scm ("scm-scm-music"))
-       {
-               return MUSIC_FUNCTION_SCM_SCM_MUSIC;
-       }
-       else if (type == ly_symbol2scm ("noarg"))
-       {
-               return MUSIC_FUNCTION;
-       }
-       else
-               {
-               /* TODO: print location */
-               error ("Can not find sigature for music function.");
-               }
 
-       return MUSIC_FUNCTION_SCM;
+       return scm_call_1 (proc, scm_makfrom0str (s.to_str0 ()));
 }
index 0a32c304006549e89114f909dea77d904964fc6c..975b85b7751bdd7b97329992ed848c8c94e17196 100644 (file)
@@ -22,8 +22,13 @@ class Ligature_bracket_engraver : public Ligature_engraver
 protected:
   virtual Spanner *create_ligature_spanner ();
   virtual void acknowledge_grob (Grob_info);
+  virtual void typeset_ligature (Spanner *ligature, Array<Grob_info>);
+
 public:
   TRANSLATOR_DECLARATIONS (Ligature_bracket_engraver);
+
+private:
+  void typeset_ligature_bracket ();
 };
 
 
@@ -34,9 +39,14 @@ Ligature_bracket_engraver::Ligature_bracket_engraver ()
 Spanner *
 Ligature_bracket_engraver::create_ligature_spanner ()
 {
-  return make_spanner ("LigatureBracket", SCM_EOL);
+  return make_spanner ("LigatureBracket");
 }
 
+void
+Ligature_bracket_engraver::typeset_ligature (Spanner *ligature, Array<Grob_info>)
+{
+  typeset_grob (ligature);
+}
 
 void
 Ligature_bracket_engraver::acknowledge_grob (Grob_info info)
index 0e221aa38d86911a27de38af9e9a0c122ec29f6a..c74058e18c4c50bf181cb1c46abd41c4db230d7b 100644 (file)
@@ -115,9 +115,9 @@ Ligature_engraver::override_stencil_callback ()
 {
   SCM target_callback = ly_symbol2scm ("print-function");
   SCM source_callback = ly_symbol2scm ("ligature-primitive-callback");
-  SCM noteHeadProperties = updated_grob_properties (context (), ly_symbol2scm ("NoteHead"));
+  SCM noteHeadProperties = updated_grob_properties (daddy_context_, ly_symbol2scm ("NoteHead"));
   SCM value = ly_cdr (scm_sloppy_assq (source_callback, noteHeadProperties));
-  execute_pushpop_property (context (), ly_symbol2scm ("NoteHead"),
+  execute_pushpop_property (daddy_context_, ly_symbol2scm ("NoteHead"),
                            target_callback, value);
 }
 
@@ -139,7 +139,7 @@ Ligature_engraver::revert_stencil_callback ()
 {
   SCM symbol = ly_symbol2scm ("NoteHead");
   SCM key = ly_symbol2scm ("print-function");
-  execute_pushpop_property (context (), symbol, key, SCM_UNDEFINED);
+  execute_pushpop_property (daddy_context_, symbol, key, SCM_UNDEFINED);
 }
 
 void
@@ -205,9 +205,8 @@ Ligature_engraver::process_music ()
        }
 
       ligature_start_mom_ = now_mom ();
-
-      // TODO: dump cause into make_item/spanner. 
-      // announce_grob (ligature_, reqs_drul_[START]->self_scm ());
+      
+      announce_grob (ligature_, reqs_drul_[START]->self_scm ());
       override_stencil_callback ();
     }
 }
index 47be547d79184b367e474f9abada0777f0df1f73..d9dc08382bd195770e853164aad8ee42686a13f2 100644 (file)
@@ -4,7 +4,8 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 1998--2004 Jan Nieuwenhuizen <janneke@gnu.org>
-                 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+  Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #include <ctype.h>
 
 #include "lily-proto.hh"
-#include "version.hh"
 
-/* MacOS S fix:
-   source-file.hh includes cmath which undefines isinf and isnan
+/* macosx fix:
 
-   FIXME: #ifdef MACOS_X?
+
+ source-file.hh includes cmath which undefines isinf and isnan
 */
 inline int my_isinf (Real r) { return isinf (r); }
 inline int my_isnan (Real r) { return isnan (r); }
 
 
+
 #include "libc-extension.hh"
 #include "lily-guile.hh"
 #include "main.hh"
@@ -58,7 +59,7 @@ ly_write2scm (SCM s)
   SCM write = scm_primitive_eval (ly_symbol2scm ("write"));
   
   // scm_apply (write, port, SCM_EOL);
-  scm_call_2 (write, s, port);
+  gh_call2 (write, s, port);
   return scm_strport_to_string (port);
 }
 
@@ -72,7 +73,7 @@ ly_quote_scm (SCM s)
 String
 ly_symbol2string (SCM s)
 {
-  assert (ly_c_symbol_p (s));
+  assert (gh_symbol_p (s));
   return String ((Byte*)SCM_STRING_CHARS (s), (int) SCM_STRING_LENGTH (s));
 }
 
@@ -103,10 +104,9 @@ gulp_file_to_string (String fn)
 
 LY_DEFINE (ly_gulp_file, "ly:gulp-file",
           1, 0, 0, (SCM name),
-          "Read the file @var{name}, and return its contents in a string.  "
+         "Read the file @var{name}, and return its contents in a string.  "
           "The file is looked up using the search path.")
 {
-  SCM_ASSERT_TYPE (ly_c_string_p (name), name, SCM_ARG1, __FUNCTION__, "string");
   return scm_makfrom0str (gulp_file_to_string (ly_scm2string (name)).to_str0 ());
 }
 
@@ -116,40 +116,21 @@ extern "C" {
 void
 ly_display_scm (SCM s)
 {
-  scm_display (s, scm_current_output_port ());
-  scm_newline (scm_current_output_port ());
+  gh_display (s);
+  gh_newline ();
 }
 };
 
 String
 ly_scm2string (SCM s)
 {
-  assert (ly_c_string_p (s));
+  assert (gh_string_p (s));
 
   char *p = SCM_STRING_CHARS (s);
   String r (p);
   return r;
 }
 
-char *
-ly_scm2newstr (SCM str, size_t *lenp)
-{
-  SCM_ASSERT_TYPE (ly_c_string_p (str), str, SCM_ARG1, __FUNCTION__, "string");
-
-  size_t len = SCM_STRING_LENGTH (str);
-  if (char *new_str = (char *) malloc ((len + 1) * sizeof (char)))
-    {
-      memcpy (new_str, SCM_STRING_CHARS (str), len);
-      new_str[len] = '\0';
-
-      if (lenp)
-       *lenp = len;
-      
-      return new_str;
-    }
-  return 0;
-}
-
 SCM
 index_get_cell (SCM s, Direction d)
 {
@@ -162,31 +143,29 @@ SCM
 index_set_cell (SCM s, Direction d, SCM v)
 {
   if (d == LEFT)
-    scm_set_car_x (s, v);
+    gh_set_car_x (s, v);
   else if (d == RIGHT)
-    scm_set_cdr_x (s, v);
+    gh_set_cdr_x (s, v);
   return s;
 }
   
-LY_DEFINE (ly_warn, "ly:warn",
-          1, 0, 0, (SCM str),
-          "Scheme callable function to issue the warning @code{msg}.")
+LY_DEFINE (ly_warning,"ly:warn", 1, 0, 0,
+  (SCM str), "Scheme callable function to issue the warning @code{msg}.")
 {
-  SCM_ASSERT_TYPE (ly_c_string_p (str), str, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (gh_string_p (str), str, SCM_ARG1, __FUNCTION__, "string");
   progress_indication ("\n");
   warning ("lily-guile: " + ly_scm2string (str));
   return SCM_BOOL_T;
 }
 
-LY_DEFINE (ly_dir_p, "ly:dir?",
-          1, 0, 0, (SCM s),
+LY_DEFINE (ly_dir_p,  "ly:dir?", 1,0, 0,  (SCM s),
          "type predicate. A direction is @code{-1}, @code{0} or "
           "@code{1}, where @code{-1} represents "
          "left or down and @code{1} represents right or up.")
 {
-  if (ly_c_number_p (s))
+  if (gh_number_p (s))
     {
-      int i = ly_scm2int (s);
+      int i = gh_scm2int (s);
       return (i>= -1 && i <= 1)  ? SCM_BOOL_T : SCM_BOOL_F; 
     }
   return SCM_BOOL_F;
@@ -195,8 +174,7 @@ LY_DEFINE (ly_dir_p, "ly:dir?",
 bool
 is_number_pair (SCM p)
 {
-  return ly_c_pair_p (p)
-    && ly_c_number_p (ly_car (p)) && ly_c_number_p (ly_cdr (p));
+  return gh_pair_p (p) && gh_number_p (ly_car (p)) && gh_number_p (ly_cdr (p));
 }
 
 typedef void (*Void_fptr) ();
@@ -210,6 +188,7 @@ void add_scm_init_func (void (*f) ())
   scm_init_funcs_->push (f);
 }
 
+
 void
 ly_init_ly_module (void *)
 {
@@ -222,81 +201,92 @@ ly_init_ly_module (void *)
   scm_primitive_load_path (scm_makfrom0str ("lily.scm"));
 }
 
+
 SCM global_lily_module;
 
 void
-ly_c_init_guile ()
+ly_init_guile ()
 {
   global_lily_module = scm_c_define_module ("lily", ly_init_ly_module, 0);
   scm_c_use_module ("lily");
 }
 
-unsigned int
-ly_scm_hash (SCM s)
+unsigned int ly_scm_hash (SCM s)
 {
   return scm_ihashv (s, ~1u);
 }
 
+
+
 bool
 is_direction (SCM s)
 {
-  if (ly_c_number_p (s))
+  if (gh_number_p (s))
     {
-      int i = ly_scm2int (s);
+      int i = gh_scm2int (s);
       return i>= -1 && i <= 1; 
     }
   return false;
 }
 
+
 bool
 is_axis (SCM s)
 {
-  if (ly_c_number_p (s))
+  if (gh_number_p (s))
     {
-      int i = ly_scm2int (s);
+      int i = gh_scm2int (s);
       return i== 0 || i == 1;
     }
   return false;
 }
 
+
 Direction
 to_dir (SCM s)
 {
-  return SCM_INUMP (s) ? (Direction) ly_scm2int (s) : CENTER;
+  return SCM_INUMP (s) ?  (Direction) gh_scm2int (s) : CENTER;
 }
 
 Interval
 ly_scm2interval (SCM p)
 {
-  return Interval (ly_scm2double (ly_car (p)), ly_scm2double (ly_cdr (p)));
+  return  Interval (gh_scm2double (ly_car (p)),
+                   gh_scm2double (ly_cdr (p)));
 }
 
 Drul_array<Real>
 ly_scm2realdrul (SCM p)
 {
-  return Drul_array<Real> (ly_scm2double (ly_car (p)),
-                          ly_scm2double (ly_cdr (p)));
+  return  Drul_array<Real> (gh_scm2double (ly_car (p)),
+                           gh_scm2double (ly_cdr (p)));
 }
 
 SCM
 ly_interval2scm (Drul_array<Real> i)
 {
-  return scm_cons (scm_make_real (i[LEFT]), scm_make_real (i[RIGHT]));
+  return gh_cons (gh_double2scm (i[LEFT]),
+                 gh_double2scm (i[RIGHT]));
 }
 
+
+
+
 bool
 to_boolean (SCM s)
 {
-  return ly_c_boolean_p (s) && ly_scm2bool (s);
+  return gh_boolean_p (s) && gh_scm2bool (s);
 }
 
-/* Appendable list L: the cdr contains the list, the car the last cons
-   in the list.  */
+/*
+  Appendable list L: the cdr contains the list, the car the last cons
+  in the list.
+ */
 SCM
 appendable_list ()
 {
-  SCM s = scm_cons (SCM_EOL, SCM_EOL);
-  scm_set_car_x (s, s);
+  SCM s = gh_cons (SCM_EOL, SCM_EOL);
+  gh_set_car_x (s, s);
   
   return s;
 }
@@ -304,36 +294,38 @@ appendable_list ()
 void
 appendable_list_append (SCM l, SCM elt)
 {
-  SCM newcons = scm_cons (elt, SCM_EOL);
+  SCM newcons = gh_cons (elt, SCM_EOL);
   
-  scm_set_cdr_x (ly_car (l), newcons);      
-  scm_set_car_x (l, newcons);
+  gh_set_cdr_x (ly_car (l), newcons);      
+  gh_set_car_x (l, newcons);
 }
 
+
 SCM
 ly_offset2scm (Offset o)
 {
-  return scm_cons (scm_make_real (o[X_AXIS]), scm_make_real (o[Y_AXIS]));
+  return gh_cons (gh_double2scm (o[X_AXIS]), gh_double2scm (o[Y_AXIS]));
 }
 
 Offset
 ly_scm2offset (SCM s)
 {
-  return Offset (ly_scm2double (ly_car (s)),
-                ly_scm2double (ly_cdr (s)));
+  return Offset (gh_scm2double (ly_car (s)),
+                gh_scm2double (ly_cdr (s)));
 }
 
+   
 LY_DEFINE (ly_number2string, "ly:number->string",
           1, 0, 0, (SCM s),
           "Convert @var{num} to a string without generating many decimals.")
 {
-  SCM_ASSERT_TYPE (ly_c_number_p (s), s, SCM_ARG1, __FUNCTION__, "number");
+  SCM_ASSERT_TYPE (gh_number_p (s), s, SCM_ARG1, __FUNCTION__, "number");
 
   char str[400];                       // ugh.
 
   if (scm_exact_p (s) == SCM_BOOL_F)
     {
-      Real r (ly_scm2double (s));
+      Real r (gh_scm2double (s));
 
       if (my_isinf (r) || my_isnan (r))
        {
@@ -344,19 +336,41 @@ LY_DEFINE (ly_number2string, "ly:number->string",
       sprintf (str, "%08.4f", r);
     }
   else
-    sprintf (str, "%d", ly_scm2int (s));
+    sprintf (str, "%d", gh_scm2int (s));
 
   return scm_makfrom0str (str);
 }
 
+/*
+  Undef this to see if GUILE GC is causing too many swaps.
+ */
 
+//#define TEST_GC
 
+#ifdef TEST_GC
+#include <libguile/gc.h>
+
+static void *
+greet_sweep (void *dummy1, void *dummy2, void *dummy3)
+{
+   fprintf (stderr, "entering sweep\n");
+}
+
+static void *
+wave_sweep_goodbye (void *dummy1, void *dummy2, void *dummy3)
+{
+   fprintf (stderr, "leaving sweep\n");
+}
+#endif
+
+
+#include "version.hh"
 LY_DEFINE (ly_version,  "ly:version", 0, 0, 0, (),
          "Return the current lilypond version as a list, e.g. @code{(1 3 127 uu1)}. ")
 {
-  char const* vs = "\'(" MAJOR_VERSION " " MINOR_VERSION " "  PATCH_LEVEL " " MY_PATCH_LEVEL ")" ;
+  char const* vs =  "\'(" MAJOR_VERSION " " MINOR_VERSION " "  PATCH_LEVEL " " MY_PATCH_LEVEL ")" ;
   
-  return scm_c_eval_string ((char*)vs);
+  return gh_eval_str ((char*)vs);
 }
 
 LY_DEFINE (ly_unit,  "ly:unit", 0, 0, 0, (),
@@ -374,21 +388,37 @@ LY_DEFINE (ly_dimension_p,  "ly:dimension?", 1, 0, 0, (SCM d),
   return scm_number_p (d);
 }
 
+static void
+init_functions ()
+{
+#ifdef TEST_GC 
+  scm_c_hook_add (&scm_before_mark_c_hook, greet_sweep, 0, 0);
+  scm_c_hook_add (&scm_before_sweep_c_hook, wave_sweep_goodbye, 0, 0);
+#endif
+}
+
+ADD_SCM_INIT_FUNC (funcs, init_functions);
+
 SCM
 ly_deep_copy (SCM src)
 {
-  if (ly_c_pair_p (src))
-    return scm_cons (ly_deep_copy (ly_car (src)), ly_deep_copy (ly_cdr (src)));
-  else if (ly_c_vector_p (src))
+  if (gh_pair_p (src))
+    {
+      return gh_cons (ly_deep_copy (ly_car (src)), ly_deep_copy (ly_cdr (src)));
+    }
+  else if (gh_vector_p (src))
     {
-      int len = SCM_VECTOR_LENGTH (src);
-      SCM nv = scm_c_make_vector (len, SCM_UNDEFINED);
-      for (int i  =0 ; i < len ; i++)
+      int  l = SCM_VECTOR_LENGTH (src);
+      SCM nv = scm_c_make_vector (l, SCM_UNDEFINED);
+      for (int i  =0 ; i< l ; i++)
        {
-         SCM si = scm_int2num (i);
+         SCM si = gh_int2scm (i);
          scm_vector_set_x (nv, si, ly_deep_copy (scm_vector_ref (src, si))); 
        }
     }
+  else
+    return src;
+
   return src;
 }
 
@@ -398,10 +428,10 @@ ly_deep_copy (SCM src)
 SCM
 ly_assoc_chain (SCM key, SCM achain)
 {
-  if (ly_c_pair_p (achain))
+  if (gh_pair_p (achain))
     {
       SCM handle = scm_assoc (key, ly_car (achain));
-      if (ly_c_pair_p (handle))
+      if (gh_pair_p (handle))
        return handle;
       else
        return ly_assoc_chain (key, ly_cdr (achain));
@@ -432,36 +462,43 @@ corresponds to call
 SCM
 ly_assoc_cdr (SCM key, SCM alist)
 {
-  if (ly_c_pair_p (alist))
-    {
-      SCM trykey = ly_caar (alist);
-      if (ly_c_pair_p (trykey) && to_boolean (scm_equal_p (key, ly_cdr (trykey))))
-       return ly_car (alist);
-      else
-       return ly_assoc_cdr (key, ly_cdr (alist));
-    }
-  return SCM_BOOL_F;
+  if (gh_pair_p (alist)) {
+    SCM trykey = ly_caar (alist);
+    if (gh_pair_p (trykey) && to_boolean (scm_equal_p (key,ly_cdr (trykey))))
+      return ly_car (alist);
+    else
+      return ly_assoc_cdr (key, ly_cdr (alist));
+  }
+  else
+    return SCM_BOOL_F;
 }
 
-/* LST has the form "sym1 sym2 sym3\nsym4\nsym5"
-   i.e. \n and ' ' can be used interchangeably as separators.  */
+/*
+  LIST has the form "sym1 sym2 sym3\nsym4\nsym5"
+
+  i.e. \n and ' ' can be used interchangeably as separators.
+ */
 SCM
-parse_symbol_list (char const *lst)
+parse_symbol_list (const char * list)
 {
-  char *s = strdup (lst);
+  char * s = strdup (list);
   char *orig = s;
   SCM create_list = SCM_EOL;
 
   char * e = s + strlen (s) - 1;
   while (e >= s && isspace (*e))
-    *e-- = 0;
+    *e -- = 0;
 
   for (char * p = s; *p; p++)
-    if (*p == '\n')
-      *p = ' ';
+    {
+      if (*p == '\n')
+       *p = ' ' ;
+    }
   
-  if (!s[0])
+  if (!s[0] )
     s = 0;
+
+
   
   while (s)
     {
@@ -469,7 +506,7 @@ parse_symbol_list (char const *lst)
       if (next)
        *next++ = 0;
 
-      create_list = scm_cons (ly_symbol2scm (s), create_list);
+      create_list = gh_cons (ly_symbol2scm (s), create_list);
       s = next;
     }
 
@@ -477,32 +514,37 @@ parse_symbol_list (char const *lst)
   return create_list;
 }
 
+
 SCM
-ly_truncate_list (int k, SCM lst)
+ly_truncate_list (int k, SCM l )
 {
   if (k == 0)
-    lst = SCM_EOL;
+    {
+      l = SCM_EOL;
+    }
   else
     {
-      SCM s = lst;
+      SCM s = l;
       k--;
-      for (; ly_c_pair_p (s) && k--; s = ly_cdr (s))
+      for (; gh_pair_p (s) && k--; s = ly_cdr (s))
        ;
 
-      if (ly_c_pair_p (s))
-       scm_set_cdr_x (s, SCM_EOL);
+      if (gh_pair_p (s))
+       {
+         gh_set_cdr_x (s, SCM_EOL);
+       }
     }
-  return lst;
+  return l;
 }
 
+
 String
 print_scm_val (SCM val)
 {
   String realval = ly_scm2string (ly_write2scm (val));
   if (realval.length () > 200)
-    realval = realval.left_string (100)
-      + "\n :\n :\n"
-      + realval.right_string (100);
+    realval = realval.left_string (100) + "\n :\n :\n" + realval.right_string (100);
+  
   return realval;       
 }
 
@@ -520,7 +562,7 @@ type_check_assignment (SCM sym, SCM val,  SCM type_symbol)
   if (val == SCM_EOL || val == SCM_BOOL_F)
     return ok;
 
-  if (!ly_c_symbol_p (sym))
+  if (!gh_symbol_p (sym))
 #if 0
     return false;
 #else
@@ -537,7 +579,7 @@ type_check_assignment (SCM sym, SCM val,  SCM type_symbol)
   
   SCM type = scm_object_property (sym, type_symbol);
 
-  if (type != SCM_EOL && !ly_c_procedure_p (type))
+  if (type != SCM_EOL && !gh_procedure_p (type))
       {
        warning (_f ("Can't find property type-check for `%s' (%s).",
                     ly_symbol2string (sym).to_str0 (),
@@ -553,13 +595,13 @@ type_check_assignment (SCM sym, SCM val,  SCM type_symbol)
   else
     {
       if (val != SCM_EOL
-         && ly_c_procedure_p (type)
-         && scm_call_1 (type, val) == SCM_BOOL_F)
+         && gh_procedure_p (type)
+         && gh_call1 (type, val) == SCM_BOOL_F)
        {
          SCM errport = scm_current_error_port ();
          ok = false;
          SCM typefunc = ly_scheme_function ("type-name");
-         SCM type_name = scm_call_1 (typefunc, type);
+         SCM type_name = gh_call1 (typefunc, type);
 
         
          scm_puts (_f ("Type check for `%s' failed; value `%s' must be of type `%s'",
@@ -585,77 +627,39 @@ SCM
 ly_unique (SCM list)
 {
   SCM unique = SCM_EOL;
-  for (SCM i = list; ly_c_pair_p (i); i = ly_cdr (i))
+  for (SCM i = list; gh_pair_p (i); i = ly_cdr (i))
     {
-      if (!ly_c_pair_p (ly_cdr (i))
-         || !ly_c_equal_p (ly_car (i), ly_cadr (i)))
-       unique = scm_cons (ly_car (i), unique);
+      if (!gh_pair_p (ly_cdr (i))
+         || !gh_equal_p (ly_car (i), ly_cadr (i)))
+       unique = gh_cons (ly_car (i), unique);
     }
   return scm_reverse_x (unique, SCM_EOL);
 }
 
-
-static int
-scm_default_compare (void const *a, void const *b)
-{
-  SCM pa = *(SCM*) a;
-  SCM pb = *(SCM*) b;
-  if (pa == pb)
-    return 0;
-  return pa < pb ? -1 : 1;
-}
-
-/*  Modify LST in place: qsort it.  */
-SCM
-ly_list_qsort_uniq_x (SCM lst)
-{
-  int len = scm_ilength (lst);
-  SCM *arr = new SCM[len];
-  int k = 0;
-  for (SCM s = lst; SCM_NNULLP (s); s = SCM_CDR (s))
-    arr[k++] = SCM_CAR (s);
-
-  assert (k == len);
-  qsort (arr, len, sizeof (SCM), &scm_default_compare);
-
-  SCM *tail = &lst;
-  for (int i = 0; i < len; i++)
-    if (!i || arr[i] != arr[i - 1])
-      {
-       SCM_SETCAR (*tail, arr[i]);
-       tail = SCM_CDRLOC (*tail);
-      }
-
-  *tail = SCM_EOL;
-  delete[] arr;
-
-  return lst; 
-}
-
-
 /* tail add */
 SCM
 ly_snoc (SCM s, SCM list)
 {
-  return ly_append2 (list, scm_list_n (s, SCM_UNDEFINED));
+  return gh_append2 (list, scm_list_n (s, SCM_UNDEFINED));
 }
 
+
 /* Split list at member s, removing s.
-   Return (BEFORE . AFTER)  */
+   Return (BEFORE . AFTER) */
 SCM
 ly_split_list (SCM s, SCM list)
 {
   SCM before = SCM_EOL;
   SCM after = list;
-  for (; ly_c_pair_p (after);)
+  for (; gh_pair_p (after);)
     {
       SCM i = ly_car (after);
       after = ly_cdr (after);
-      if (ly_c_equal_p (i, s))
+      if (gh_equal_p (i, s))
        break;
-      before = scm_cons (i, before);
+      before = gh_cons (i, before);
     }
-  return scm_cons ( scm_reverse_x (before, SCM_EOL),  after);
+  return gh_cons ( scm_reverse_x (before, SCM_EOL),  after);
   
 }
 
@@ -677,9 +681,9 @@ display_list (SCM s)
   SCM p = scm_current_output_port ();
 
   scm_puts ("(", p);
-  for (; ly_c_pair_p (s); s =ly_cdr (s))
+  for (; gh_pair_p (s); s =gh_cdr (s))
     {
-      scm_display (ly_car (s), p);
+      scm_display (gh_car (s), p);
       scm_puts (" ", p);      
     }
   scm_puts (")", p);
@@ -691,29 +695,38 @@ int_list_to_slice (SCM l)
 {
   Slice s;
   s.set_empty ();
-  for (; ly_c_pair_p (l); l = ly_cdr (l))
-    if (ly_c_number_p (ly_car (l)))
-      s.add_point (ly_scm2int (ly_car (l))); 
+  for (; gh_pair_p (l); l = gh_cdr (l))
+    {
+      if (gh_number_p (gh_car (l)))
+       s.add_point (gh_scm2int (gh_car (l))); 
+    }
+
   return s;
 }
 
-/* Return I-th element, or last elt L. If I < 0, then we take the first
-   element.
-   
-   PRE: length (L) > 0  */
+
+/*
+  Return I-th element, or last elt L. If I < 0, then we take the first
+  element.
+
+  PRE: length (L) > 0
+ */
 SCM
 robust_list_ref (int i, SCM l)
 {
-  while (i-- > 0 && ly_c_pair_p (ly_cdr (l)))
-    l = ly_cdr (l);
-  return ly_car (l);
+  while (i-- > 0 && gh_pair_p (gh_cdr (l)))
+    l = gh_cdr (l);
+
+  return gh_car (l);
 }
 
+
+
 Real
 robust_scm2double (SCM k, double x)
 {
-  if (ly_c_number_p (k))
-    x = ly_scm2double (k);
+  if (gh_number_p (k))
+    x = gh_scm2double (k);
   return x;
 }
 
@@ -741,26 +754,30 @@ robust_scm2offset (SCM k, Offset o)
 {
   if (is_number_pair (k))
     o = ly_scm2offset (k);
+
   return o;
 }
 
+
 int
 robust_scm2int (SCM k, int o)
 {
   if (scm_integer_p (k) == SCM_BOOL_T)
-    o = ly_scm2int (k);
+    o = gh_scm2int (k);
+
   return o;
 }
 
+
 SCM
 alist_to_hashq (SCM alist)
 {
   int i = scm_ilength (alist);
   if (i < 0)
-    return scm_make_vector (scm_int2num (0), SCM_EOL);
+    return scm_make_vector (gh_int2scm (0), SCM_EOL);
          
-  SCM tab = scm_make_vector (scm_int2num (i), SCM_EOL);
-  for (SCM s = alist; ly_c_pair_p (s); s = ly_cdr (s))
+  SCM tab = scm_make_vector (gh_int2scm (i), SCM_EOL);
+  for (SCM s = alist; gh_pair_p (s); s = ly_cdr (s))
     {
       SCM pt = ly_cdar (s);
       scm_hashq_set_x (tab, ly_caar (s), pt);
@@ -772,26 +789,9 @@ alist_to_hashq (SCM alist)
 /*
   Debugging mem leaks:
  */
-LY_DEFINE (ly_protects, "ly:protects",
-          0, 0, 0, (),
+LY_DEFINE (ly_protects, "ly:protects", 0, 0, 0, (),
          "Return hash of protected objects.")
 {
   return scm_protects;
 }
 #endif
-
-
-#if HAVE_PANGO_FC_FONT_MAP_ADD_DECODER_FIND_FUNC
-
-#include "pangofc-afm-decoder.hh"
-
-LY_DEFINE (ly_pango_add_afm_decoder, "ly:pango-add-afm-decoder",
-          1, 0, 0, (SCM font_family),
-          "Add pango afm decoder for FONT-FAMILY.")
-{
-  SCM_ASSERT_TYPE (ly_c_string_p (font_family), font_family, SCM_ARG1, __FUNCTION__, "font_family");
-  pango_fc_afm_add_decoder (ly_scm2newstr (font_family, 0));
-  return SCM_UNSPECIFIED;
-}
-
-#endif
index 33c0f3820915485e9f06f8330aab3eb1490386d6..eb5f8e975626707ed17ca8814e5cf0aae42080e0 100644 (file)
@@ -12,7 +12,7 @@ source file of the GNU LilyPond music typesetter
 #include "grob.hh"
 #include "staff-symbol-referencer.hh"
 #include "lookup.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 
 
 Stencil
@@ -24,11 +24,11 @@ Line_interface::make_dashed_line (Real thick, Offset from, Offset to,
   Real off = dash_period - on;
   
   SCM at = scm_list_n (ly_symbol2scm ("dashed-line"),
-                       scm_make_real (thick), 
-                       scm_make_real (on),
-                       scm_make_real (off),
-                       scm_make_real (to[X_AXIS] - from[X_AXIS]),
-                       scm_make_real (to[Y_AXIS] - from[Y_AXIS]),
+                       gh_double2scm (thick), 
+                       gh_double2scm (on),
+                       gh_double2scm (off),
+                       gh_double2scm (to[X_AXIS] - from[X_AXIS]),
+                       gh_double2scm (to[Y_AXIS] - from[Y_AXIS]),
                        SCM_UNDEFINED);
   
   Box box;
@@ -47,11 +47,11 @@ Stencil
 Line_interface::make_line (Real th, Offset from, Offset to)
 {
   SCM at = scm_list_n (ly_symbol2scm ("draw-line"),
-                       scm_make_real (th), 
-                       scm_make_real (from[X_AXIS]),
-                       scm_make_real (from[Y_AXIS]),
-                       scm_make_real (to[X_AXIS]),
-                       scm_make_real (to[Y_AXIS]),
+                       gh_double2scm (th), 
+                       gh_double2scm (from[X_AXIS]),
+                       gh_double2scm (from[Y_AXIS]),
+                       gh_double2scm (to[X_AXIS]),
+                       gh_double2scm (to[Y_AXIS]),
                        SCM_UNDEFINED);
 
   Box box;
@@ -73,7 +73,7 @@ Line_interface::line (Grob *me, Offset from, Offset to)
   SCM type = me->get_property ("style");
 
   SCM dash_fraction = me->get_property ("dash-fraction");
-  if (ly_c_number_p (dash_fraction) || type == ly_symbol2scm ("dotted-line"))
+  if (gh_number_p (dash_fraction) || type == ly_symbol2scm ("dotted-line"))
     {
       
       Real fraction
index 9dc4562539484b949974bd9be0f065eedf08079d..f0d9c1dbd11f24af6eb970bc0fc2daa33c49b3d7 100644 (file)
@@ -12,7 +12,7 @@
 #include "item.hh"
 #include "spanner.hh"
 #include "line-spanner.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "paper-column.hh"
 #include "staff-symbol-referencer.hh"
 #include "font-interface.hh"
@@ -40,12 +40,12 @@ zigzag_stencil (Grob *me,
   double h = l>w/2 ? sqrt (l*l-w*w/4) : 0;
   
   SCM list = scm_list_n (ly_symbol2scm ("zigzag-line"),
-                     ly_bool2scm (true),
-                     scm_make_real (w),
-                     scm_make_real (h),
-                     scm_make_real (thick),
-                     scm_make_real (dx),
-                     scm_make_real (dy),
+                     gh_bool2scm (true),
+                     gh_double2scm (w),
+                     gh_double2scm (h),
+                     gh_double2scm (thick),
+                     gh_double2scm (dx),
+                     gh_double2scm (dy),
                      SCM_UNDEFINED);
   Box b;
   b.add_point (Offset (0,0));
@@ -98,7 +98,7 @@ Line_spanner::line_stencil (Grob *me,
 {
   Offset dz = to -from ; 
   SCM type = me->get_property ("style");
-  if (ly_c_symbol_p (type)
+  if (gh_symbol_p (type)
       && (type == ly_symbol2scm ("line")
          || type == ly_symbol2scm ("dashed-line")
          || type == ly_symbol2scm ("dotted-line")
@@ -109,16 +109,16 @@ Line_spanner::line_stencil (Grob *me,
        ? zigzag_stencil (me, from, to)
        : Line_interface::line (me, from, to);
     }
-  else if (ly_c_symbol_p (type)
+  else if (gh_symbol_p (type)
           && type == ly_symbol2scm ("trill"))
     {
       SCM alist_chain = Font_interface::text_font_alist_chain (me);
-      SCM style_alist = scm_list_n (scm_cons (ly_symbol2scm ("font-encoding"),
-                                            ly_symbol2scm ("fetaMusic")),
+      SCM style_alist = scm_list_n (gh_cons (ly_symbol2scm ("font-encoding"),
+                                            ly_symbol2scm ("music")),
                                    SCM_UNDEFINED);
       
       Font_metric *fm = select_font (me->get_paper (),
-                                    scm_cons (style_alist,
+                                    gh_cons (style_alist,
                                              alist_chain));
       Stencil m = fm->find_by_name ("scripts-trill-element");
       Stencil mol;
index 222d7ebd0f280e19dfbb41c2c7ada30f0685a11e..3d395f137c60bb18521cb1424232a6178411176e 100644 (file)
@@ -27,9 +27,9 @@ Stencil
 Lookup::dot (Offset p, Real radius)
 {
   SCM at = (scm_list_n (ly_symbol2scm ("dot"),
-                       scm_make_real (p[X_AXIS]),
-                       scm_make_real (p[Y_AXIS]),
-                       scm_make_real (radius),
+                       gh_double2scm (p[X_AXIS]),
+                       gh_double2scm (p[Y_AXIS]),
+                       gh_double2scm (radius),
                        SCM_UNDEFINED));
   Box box;
   box.add_point (p - Offset (radius, radius));
@@ -67,10 +67,10 @@ Lookup::beam (Real slope, Real width, Real thick, Real blot)
         Interval (min_y, max_y));
   
   SCM at = scm_list_n (ly_symbol2scm ("beam"),
-                   scm_make_real (width),
-                   scm_make_real (slope),
-                   scm_make_real (thick),
-                   scm_make_real (blot),
+                   gh_double2scm (width),
+                   gh_double2scm (slope),
+                   gh_double2scm (thick),
+                   gh_double2scm (blot),
                    SCM_UNDEFINED);
   return Stencil (b, at);
 }
@@ -82,12 +82,12 @@ Lookup::dashed_slur (Bezier b, Real thick, Real dash)
 
   for (int i= 4; i -- ;)
     {
-      l = scm_cons (ly_offset2scm (b.control_[i]), l);
+      l = gh_cons (ly_offset2scm (b.control_[i]), l);
     }
 
   SCM at = (scm_list_n (ly_symbol2scm ("dashed-slur"),
-                              scm_make_real (thick), 
-                              scm_make_real (dash),
+                              gh_double2scm (thick), 
+                              gh_double2scm (dash),
                               ly_quote_scm (l),
                               SCM_UNDEFINED));
 
@@ -101,9 +101,9 @@ Stencil
 Lookup::horizontal_line (Interval w, Real th)
 {
   SCM at = scm_list_n (ly_symbol2scm ("horizontal-line"),
-                      scm_make_real (w[LEFT]), 
-                      scm_make_real (w[RIGHT]),
-                      scm_make_real (th),
+                      gh_double2scm (w[LEFT]), 
+                      gh_double2scm (w[RIGHT]),
+                      gh_double2scm (th),
                       SCM_UNDEFINED);
 
 
@@ -125,10 +125,10 @@ Stencil
 Lookup::filled_box (Box b) 
 {
   SCM  at  = (scm_list_n (ly_symbol2scm ("filledbox"),
-                    scm_make_real (-b[X_AXIS][LEFT]),
-                    scm_make_real (b[X_AXIS][RIGHT]),                 
-                    scm_make_real (-b[Y_AXIS][DOWN]),
-                    scm_make_real (b[Y_AXIS][UP]),                    
+                    gh_double2scm (-b[X_AXIS][LEFT]),
+                    gh_double2scm (b[X_AXIS][RIGHT]),                 
+                    gh_double2scm (-b[Y_AXIS][DOWN]),
+                    gh_double2scm (b[Y_AXIS][UP]),                    
                     SCM_UNDEFINED));
 
   return Stencil (b,at);
@@ -176,11 +176,11 @@ Lookup::round_filled_box (Box b, Real blotdiameter)
     }
 
   SCM at = (scm_list_n (ly_symbol2scm ("round-filled-box"),
-                       scm_make_real (-b[X_AXIS][LEFT]),
-                       scm_make_real (b[X_AXIS][RIGHT]),
-                       scm_make_real (-b[Y_AXIS][DOWN]),
-                       scm_make_real (b[Y_AXIS][UP]),
-                       scm_make_real (blotdiameter),
+                       gh_double2scm (-b[X_AXIS][LEFT]),
+                       gh_double2scm (b[X_AXIS][RIGHT]),
+                       gh_double2scm (-b[Y_AXIS][DOWN]),
+                       gh_double2scm (b[Y_AXIS][UP]),
+                       gh_double2scm (blotdiameter),
                        SCM_UNDEFINED));
 
   return Stencil (b,at);
@@ -306,14 +306,14 @@ Lookup::round_filled_polygon (Array<Offset> points, Real blotdiameter)
   Box box;
   for (int i = 0; i < shrinked_points.size (); i++)
     {
-      SCM x = scm_make_real (shrinked_points[i][X_AXIS]);
-      SCM y = scm_make_real (shrinked_points[i][Y_AXIS]);
-      shrinked_points_scm = scm_cons (x, scm_cons (y, shrinked_points_scm));
+      SCM x = gh_double2scm (shrinked_points[i][X_AXIS]);
+      SCM y = gh_double2scm (shrinked_points[i][Y_AXIS]);
+      shrinked_points_scm = gh_cons (x, gh_cons (y, shrinked_points_scm));
       box.add_point (points[i]);
     }
   SCM polygon_scm = scm_list_n (ly_symbol2scm ("polygon"),
                                ly_quote_scm (shrinked_points_scm),
-                               scm_make_real (blotdiameter),
+                               gh_double2scm (blotdiameter),
                                SCM_UNDEFINED);
 
   Stencil polygon = Stencil (box, polygon_scm);
@@ -377,13 +377,13 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick)
   SCM list = SCM_EOL;
   for (int i= 8; i--;)
     {
-      list = scm_cons (scontrols[indices[i]], list);
+      list = gh_cons (scontrols[indices[i]], list);
     }
   
   
   SCM at = (scm_list_n (ly_symbol2scm ("bezier-sandwich"),
                     ly_quote_scm (list),
-                    scm_make_real (linethick),
+                    gh_double2scm (linethick),
                     SCM_UNDEFINED));
   Box b (curve.extent (X_AXIS),
        curve.extent (Y_AXIS));
@@ -424,18 +424,18 @@ Lookup::bezier_sandwich (Bezier top_curve, Bezier bottom_curve)
     Need the weird order b.o. the way PS want its arguments  
    */
   SCM list = SCM_EOL;
-  list = scm_cons (ly_offset2scm (bottom_curve.control_[3]), list);
-  list = scm_cons (ly_offset2scm (bottom_curve.control_[0]), list);
-  list = scm_cons (ly_offset2scm (bottom_curve.control_[1]), list);
-  list = scm_cons (ly_offset2scm (bottom_curve.control_[2]), list);
-  list = scm_cons (ly_offset2scm (top_curve.control_[0]), list);
-  list = scm_cons (ly_offset2scm (top_curve.control_[3]), list);
-  list = scm_cons (ly_offset2scm (top_curve.control_[2]), list);
-  list = scm_cons (ly_offset2scm (top_curve.control_[1]), list);
+  list = gh_cons (ly_offset2scm (bottom_curve.control_[3]), list);
+  list = gh_cons (ly_offset2scm (bottom_curve.control_[0]), list);
+  list = gh_cons (ly_offset2scm (bottom_curve.control_[1]), list);
+  list = gh_cons (ly_offset2scm (bottom_curve.control_[2]), list);
+  list = gh_cons (ly_offset2scm (top_curve.control_[0]), list);
+  list = gh_cons (ly_offset2scm (top_curve.control_[3]), list);
+  list = gh_cons (ly_offset2scm (top_curve.control_[2]), list);
+  list = gh_cons (ly_offset2scm (top_curve.control_[1]), list);
 
   SCM horizontal_bend = scm_list_n (ly_symbol2scm ("bezier-sandwich"),
                                    ly_quote_scm (list),
-                                   scm_make_real (0.0),
+                                   gh_double2scm (0.0),
                                    SCM_UNDEFINED);
 
   Interval x_extent = top_curve.extent (X_AXIS);
@@ -651,9 +651,9 @@ Lookup::accordion (SCM s, Real staff_space, Font_metric *fm)
 Stencil
 Lookup::repeat_slash (Real w, Real s, Real t)
 {
-  SCM wid = scm_make_real (w);
-  SCM sl = scm_make_real (s);
-  SCM thick = scm_make_real (t);
+  SCM wid = gh_double2scm (w);
+  SCM sl = gh_double2scm (s);
+  SCM thick = gh_double2scm (t);
   SCM slashnodot = scm_list_n (ly_symbol2scm ("repeat-slash"),
                            wid, sl, thick, SCM_UNDEFINED);
 
@@ -693,9 +693,9 @@ Lookup::triangle (Interval iv, Real thick, Real protude)
   b[Y_AXIS] = Interval (0 <? protude , 0 >? protude);
 
   SCM s = scm_list_n (ly_symbol2scm ("symmetric-x-triangle"),
-                     scm_make_real (thick),
-                     scm_make_real (iv.length ()), 
-                     scm_make_real (protude), SCM_UNDEFINED);
+                     gh_double2scm (thick),
+                     gh_double2scm (iv.length ()), 
+                     gh_double2scm (protude), SCM_UNDEFINED);
 
   return Stencil (b, s);
 }
@@ -710,14 +710,14 @@ LY_DEFINE (ly_bracket ,"ly:bracket",
 {
   SCM_ASSERT_TYPE (is_axis (a), a, SCM_ARG1, __FUNCTION__, "axis") ;
   SCM_ASSERT_TYPE (is_number_pair (iv), iv, SCM_ARG2, __FUNCTION__, "number pair") ;
-  SCM_ASSERT_TYPE (ly_c_number_p (t), a, SCM_ARG3, __FUNCTION__, "number") ;
-  SCM_ASSERT_TYPE (ly_c_number_p (p), a, SCM_ARG4, __FUNCTION__, "number") ;
+  SCM_ASSERT_TYPE (gh_number_p (t), a, SCM_ARG3, __FUNCTION__, "number") ;
+  SCM_ASSERT_TYPE (gh_number_p (p), a, SCM_ARG4, __FUNCTION__, "number") ;
 
 
-  return Lookup::bracket ((Axis)ly_scm2int (a), ly_scm2interval (iv),
-                         ly_scm2double (t),
-                         ly_scm2double (p),
-                         0.95 * ly_scm2double (t)).smobbed_copy ();
+  return Lookup::bracket ((Axis)gh_scm2int (a), ly_scm2interval (iv),
+                         gh_scm2double (t),
+                         gh_scm2double (p),
+                         0.95 * gh_scm2double (t)).smobbed_copy ();
 }
 
 
@@ -732,9 +732,9 @@ LY_DEFINE (ly_filled_box ,"ly:round-filled-box",
 {
   SCM_ASSERT_TYPE (is_number_pair (xext), xext, SCM_ARG1, __FUNCTION__, "number pair") ;
   SCM_ASSERT_TYPE (is_number_pair (yext), yext, SCM_ARG2, __FUNCTION__, "number pair") ;
-  SCM_ASSERT_TYPE (ly_c_number_p (blot), blot, SCM_ARG3, __FUNCTION__, "number") ;
+  SCM_ASSERT_TYPE (gh_number_p (blot), blot, SCM_ARG3, __FUNCTION__, "number") ;
 
   return Lookup::round_filled_box (Box (ly_scm2interval (xext), ly_scm2interval (yext)),
-                                  ly_scm2double (blot)).smobbed_copy ();
+                                  gh_scm2double (blot)).smobbed_copy ();
 }
 
index ab0d15d405b6432ee2c5f7d3d4f1b1884d281a0b..ea0e7c67f899625ee4345baf2b42dfb3c5d38b81 100644 (file)
@@ -1,12 +1,12 @@
 /*
   ly-module.cc --  implement guile module stuff.
-
+  
   source file of the GNU LilyPond music typesetter
-
+  
   (c) 2002--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
 */
 
-#include "main.hh"
 #include "string.hh"
 #include "lily-guile.hh"
 #include "ly-module.hh"
 static int module_count;
 
 void
-ly_init_anonymous_module (void *data)
+ly_init_anonymous_module (void * data)
 {
   (void) data;
+  scm_c_use_module ("lily");
 }
 
+Protected_scm anon_modules;
+
 SCM
-ly_make_anonymous_module (bool safe)
+ly_make_anonymous_module ()
 {
-  SCM mod = SCM_EOL;
-  if (!safe)
-    {
-      String s = "*anonymous-ly-" + to_string (module_count++) +  "*";
-      mod = scm_c_define_module (s.to_str0 (), ly_init_anonymous_module, 0);
-      ly_use_module (mod, global_lily_module);
-    }
-  else
-    {
-      SCM proc = ly_scheme_function ("make-safe-lilypond-module");
-      mod = scm_call_0 (proc);
-    }
+  String s = "*anonymous-ly-" + to_string (module_count++) +  "*";
+  SCM mod = scm_c_define_module (s.to_str0(), ly_init_anonymous_module, 0);
+  anon_modules = scm_cons (mod, anon_modules);
   return mod;
 }
 
-SCM
-ly_use_module (SCM mod, SCM used)
+void
+ly_clear_anonymous_modules ()
 {
-  SCM expr
-    = scm_list_3 (ly_symbol2scm ("module-use!"),
-                 mod,
-                 scm_list_2 (ly_symbol2scm ("module-public-interface"),
-                             used));
+  SCM s = anon_modules;
+  anon_modules = SCM_EOL;
   
-  return scm_eval (expr, global_lily_module);
+  for (; gh_pair_p (s) ; s = gh_cdr (s))
+    {
+      SCM tab= scm_c_make_hash_table (2);
+      /* UGH. */
+      SCM_STRUCT_DATA (gh_car (s))[scm_module_index_obarray]
+       = (long unsigned int) tab;
+    }
 }
 
 #define FUNC_NAME __FUNCTION__
@@ -59,29 +56,19 @@ ly_module_define (void *closure, SCM key, SCM val, SCM result)
 {
   (void) result;
   SCM module = (SCM) closure;
-  if (scm_variable_bound_p (val) == SCM_BOOL_T)
-    scm_module_define (module, key, scm_variable_ref (val));
+  scm_module_define (module, key, scm_variable_ref (val));
   return SCM_EOL;
 }
 
 /* Ugh signature of scm_internal_hash_fold () is inaccurate.  */
 typedef SCM (*Hash_cl_func)();
 
-/*
-  Check me. This is NOT an actual import. It just copies the
-  definitions.
-
-  If a variable in changed in SRC, we DEST doesn't see the
-  definitions.
- */
-LY_DEFINE (ly_import_module, "ly:import-module",
-          2, 0, 0, (SCM dest, SCM src),
-          "Import all bindings from module SRC into DEST.")
+void
+ly_import_module (SCM dest, SCM src)
 {
   SCM_VALIDATE_MODULE (1, src);
   scm_internal_hash_fold ((Hash_cl_func) &ly_module_define, (void*) dest,
                          SCM_EOL, SCM_MODULE_OBARRAY (src));
-  return SCM_UNSPECIFIED;
 }
 
 static SCM
@@ -109,11 +96,12 @@ entry_to_alist (void *closure, SCM key, SCM val, SCM result)
   return scm_cons (scm_cons (key, scm_variable_ref (val)), result);
 }
 
-LY_DEFINE (ly_module2alist, "ly:module->alist",
-          1, 0, 0, (SCM mod),
-          "Dump the contents of  module @var{mod} as an alist.")
+SCM
+ly_module_to_alist (SCM mod)
 {
   SCM_VALIDATE_MODULE (1, mod);
+  
+  
   SCM obarr= SCM_MODULE_OBARRAY (mod);
 
   return scm_internal_hash_fold ((Hash_cl_func) &entry_to_alist, NULL, SCM_EOL, obarr); 
@@ -130,33 +118,24 @@ ly_module_lookup (SCM module, SCM sym)
 #undef FUNC_NAME
 }
 
-/* Lookup SYM in a list of modules, which do not have to be related.
-   Return the first instance. */
-LY_DEFINE (ly_modules_lookup, "ly:modules-lookup",
-          2, 1, 0,
-          (SCM modules, SCM sym, SCM def),
-          "Lookup @var{sym} in the list @var{modules}, "
-          "returning the first occurence.  "
-          "If not found, return @var{default}, or @code{#f}.")
+SCM
+ly_modules_lookup (SCM modules, SCM sym)
 {
-  for (SCM s = modules; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = gh_car (modules); SCM_MODULEP (s); s = ly_cdr (s))
     {
-      SCM mod = ly_car (s);      
-      SCM v = scm_sym2var (sym, scm_module_lookup_closure (mod),
-                          SCM_UNDEFINED);
-      if (SCM_VARIABLEP(v) && SCM_VARIABLE_REF(v) != SCM_UNDEFINED)
-       return SCM_VARIABLE_REF(v);
+      SCM v = scm_sym2var (sym, scm_module_lookup_closure (s), SCM_UNDEFINED);
+      if (v != SCM_UNDEFINED)
+       return v;
     }
-
-  if (def != SCM_UNDEFINED)
-    return def;
-  return SCM_BOOL_F;
+  return SCM_UNDEFINED;
 }
 
+
+SCM export_function;
+
 void
 ly_export (SCM module, SCM namelist)
 {
-  static SCM export_function;
   if (!export_function)
     export_function = scm_permanent_object (scm_c_lookup ("module-export!"));
   
index 39d2418507267ffe20be57e74fa8e3da2fcc039e..74c076670bdc9282660bd40edf7554fde6fce306 100644 (file)
@@ -45,9 +45,9 @@ melisma_busy (Context* tr)
   SCM melisma_properties = tr->get_property ("melismaBusyProperties");
   bool busy = false;
 
-  for (; ly_c_pair_p (melisma_properties);
-       melisma_properties = ly_cdr (melisma_properties))
-    busy = busy || to_boolean (tr->internal_get_property (ly_car (melisma_properties)));
+  for (; gh_pair_p (melisma_properties);
+       melisma_properties = gh_cdr (melisma_properties))
+    busy = busy || to_boolean (tr->internal_get_property (gh_car (melisma_properties)));
 
   return busy;
 }
@@ -128,10 +128,10 @@ Lyric_combine_music_iterator::get_busy_status () const
 
   SCM grobs = tr->get_property ("busyGrobs");
   Moment now = tr->now_mom ();
-  for (; ly_c_pair_p (grobs); grobs = ly_cdr (grobs))
+  for (; gh_pair_p (grobs); grobs = gh_cdr (grobs))
     {
-      SCM grob = ly_cdar (grobs);
-      Moment end  =*unsmob_moment (ly_caar (grobs));
+      SCM grob = gh_cdar (grobs);
+      Moment end  =*unsmob_moment (gh_caar (grobs));
 
       
       /*
index 9abad8a95829c9d05b846febb22aa909562df00e..916510732b4cc9425ba9fdefda8754c672cff732 100644 (file)
@@ -25,9 +25,9 @@ Music*
 Lyric_combine_music::get_music () const
 {
   SCM l = get_property ("elements");
-  if (!ly_c_pair_p (l))
+  if (!gh_pair_p (l))
     return 0;
-  return unsmob_music (ly_car (l));
+  return unsmob_music (gh_car (l));
 }
 
 
@@ -35,12 +35,12 @@ Music*
 Lyric_combine_music::get_lyrics () const
 {
   SCM l = get_property ("elements");
-  if (!ly_c_pair_p (l))
+  if (!gh_pair_p (l))
     return 0;
-  l = ly_cdr (l);
-  if (!ly_c_pair_p (l))
+  l = gh_cdr (l);
+  if (!gh_pair_p (l))
     return 0;
-  return unsmob_music (ly_car (l));
+  return unsmob_music (gh_car (l));
 }
 
 
index d9e68dbf6a2c6a036a58ccf69868f3c18b028698..4c914d4e90fca0ec2b5eb45e9801bf00a3c45e9b 100644 (file)
@@ -58,9 +58,10 @@ Lyric_engraver::process_music ()
 {
   if (event_)
     {
-      text_=  make_item ("LyricText",event_->self_scm ());
+      text_=  make_item ("LyricText");
       
       text_->set_property ("text", event_->get_property ("text"));
+      announce_grob (text_, event_->self_scm ());
     }
 }
 
@@ -73,9 +74,9 @@ get_voice_to_lyrics (Context *lyrics)
     return c;
 
   SCM voice_name = lyrics->get_property ("associatedVoice");
-  String nm = lyrics->id_string ();
+  String nm = lyrics->id_string_;
 
-  if (ly_c_string_p (voice_name))
+  if (gh_string_p (voice_name))
     nm = ly_scm2string (voice_name);
   else
     {
@@ -88,8 +89,8 @@ get_voice_to_lyrics (Context *lyrics)
   Context *voice = 0; 
   while (parent && !voice)
     {
-      voice = find_context_below (parent, ly_symbol2scm ("Voice"), nm);
-      parent = parent->get_parent_context ();
+      voice = parent->find_context_below (ly_symbol2scm ("Voice"), nm);
+      parent = parent->daddy_context_;
     }
 
   if (voice)
@@ -99,8 +100,8 @@ get_voice_to_lyrics (Context *lyrics)
   voice = 0; 
   while (parent && !voice)
     {
-      voice = find_context_below (parent, ly_symbol2scm ("Voice"), "");
-      parent = parent->get_parent_context ();
+      voice = parent->find_context_below (ly_symbol2scm ("Voice"), "");
+      parent = parent->daddy_context_;
     }
 
   return voice;
@@ -110,9 +111,9 @@ Grob *
 get_current_note_head (Context * voice)
 {
   for (SCM s = voice->get_property ("busyGrobs");
-       ly_c_pair_p (s); s = ly_cdr (s))
+       gh_pair_p (s); s = gh_cdr (s))
     {
-      Item*g = dynamic_cast<Item*> (unsmob_grob (ly_cdar (s)));
+      Item*g = dynamic_cast<Item*> (unsmob_grob (gh_cdar (s)));
          
       if (g && !g->get_column ()
          && Note_head::has_interface (g))
@@ -127,7 +128,7 @@ Lyric_engraver::stop_translation_timestep ()
 {
   if (text_)
     {
-      Context * voice = get_voice_to_lyrics (context ());
+      Context * voice = get_voice_to_lyrics (daddy_context_);
 
       if (voice)
        {
@@ -137,10 +138,11 @@ Lyric_engraver::stop_translation_timestep ()
            {
              text_->set_parent (head, X_AXIS);
              if (melisma_busy (voice))
-               text_->set_property ("self-alignment-X", scm_int2num (LEFT)); 
+               text_->set_property ("self-alignment-X", gh_int2scm (LEFT)); 
            }
        }
       
+      typeset_grob (text_);
       text_ =0;
     }
   event_ =0;
index 7343b6bfcd072a3aefc37e6c8dda3fcf60305f23..92b1ca711a8056d97dddeda6716a656037104de0 100644 (file)
@@ -13,7 +13,7 @@
 #include "lookup.hh"
 #include "stencil.hh"
 #include "paper-column.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "lyric-extender.hh"
 #include "note-head.hh"
 #include "group-interface.hh"
@@ -41,7 +41,7 @@ Lyric_extender::print (SCM smob)
   Grob *common = l->common_refpoint (r, X_AXIS);
   
 
-  Real sl = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));  
+  Real sl = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));  
 
   Link_array<Grob> heads (Pointer_group_interface__extract_grobs (me, (Grob*)0,
                                                                  "heads"));
index 3a2ea9e68f6d084512347e8983a663d37e4db5f7..98b2b22403f33d6375669a51c13accc078022a35 100644 (file)
@@ -11,7 +11,7 @@
 #include "box.hh"
 #include "lookup.hh"
 #include "stencil.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "paper-column.hh"
 #include "spanner.hh"
 #include "item.hh"
@@ -44,7 +44,7 @@ Hyphen_spanner::print (SCM smob)
     }
   while (flip (&d) != LEFT);
   
-  Real lt = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+  Real lt = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
   Real th = robust_scm2double (me->get_property ("thickness"), 1) * lt ;
   Real h = robust_scm2double (me->get_property ("height"), 0.5);
 
index 09a38f40b01f4d390147d1113cdab5ddceb3ff45..2cc834ef9f5c4eb9194374a2cff0d0e47a43cb75 100644 (file)
@@ -40,7 +40,7 @@ Lyric_performer::create_audio_elements ()
 {
   // FIXME: won't work with fancy lyrics
   if (lreqs_.size ()
-      && ly_c_string_p (lreqs_[0]->get_property ("text"))
+      && gh_string_p (lreqs_[0]->get_property ("text"))
       && ly_scm2string (lreqs_[0]->get_property ("text")).length ())
     {
       audio_ = new Audio_text (Audio_text::LYRIC,
index 4fc6dfb1f1300e583cb9dacd0d35db59e6eb6919..80cf2a133aab99bcec29522f5722bca87b68e799 100644 (file)
 #include <libintl.h>
 #endif
 
-#include "all-font-metrics.hh"
-#include "file-name.hh"
-#include "file-path.hh"
-#include "getopt-long.hh"
-#include "global-ctor.hh"
-#include "kpath.hh"
 #include "lily-guile.hh"
 #include "lily-version.hh"
-#include "main.hh"
+#include "all-font-metrics.hh"
+#include "getopt-long.hh"
 #include "misc.hh"
-#include "output-def.hh"
 #include "string.hh"
+#include "main.hh"
+#include "file-path.hh"
+#include "input-file-results.hh"
 #include "warn.hh"
+#include "lily-guile.hh"
+#include "paper-def.hh"
+#include "midi-def.hh"
+#include "global-ctor.hh"
+#include "kpath.hh"
+
+Array<String> failed_files;
 
 /*
  * Global options that can be overridden through command line.
  */
 
+/* Write dependencies file? */
+bool dependency_global_b = false;
+
+/* Prepend to dependencies */
+String dependency_prefix_global;
+
 /* Names of header fields to be dumped to a separate file. */
 Array<String> dump_header_fieldnames_global;
 
@@ -58,18 +68,22 @@ bool safe_global_b = false;
 /* Verbose progress indication? */
 bool verbose_global_b = false;
 
-/* Scheme code to execute before parsing, after .scm init
-   This is where -e arguments are appended to.
-*/
+/* Scheme code to execute before parsing, after .scm init */
 String init_scheme_code_string = "(begin #t ";
 
 
-
 /*
  * Miscellaneous global stuff.
  */
+
+All_font_metrics *all_fonts_global;
+int exit_status_global;
 File_path global_path;
 
+/* Number of current score output block.  If there's more than one
+   score block, this counter will be added to the output filename. */
+int score_count_global;
+
 
 /*
  * File globals.
@@ -127,8 +141,10 @@ static Long_option_init options_static[] =
     {_i ("FIELD"), "header", 'H',  _i ("write header field to BASENAME.FIELD")},
     {_i ("DIR"), "include", 'I',  _i ("add DIR to search path")},
     {_i ("FILE"), "init", 'i',  _i ("use FILE as init file")},
+    {0, "dependencies", 'M',  _i ("write Makefile dependencies")},
     {0, "no-paper", 'm',  _i ("produce MIDI output only")},
     {_i ("FILE"), "output", 'o',  _i ("write output to FILE")},
+    {_i ("DIR"), "dep-prefix", 'P',  _i ("prepend DIR to dependencies")},
     {0, "safe-mode", 's',  _i ("run in safe mode")},
     {0, "version", 'v',  _i ("print version number")},
     {0, "verbose", 'V', _i ("be verbose")},
@@ -211,7 +227,7 @@ setup_paths ()
   if (char const *lilypond_prefix = getenv ("LILYPONDPREFIX"))
     prefix_directory[1] = lilypond_prefix;
 
-  global_path.append ("");
+  global_path.add ("");
 
   /* Adding mf/out make lilypond unchanged source directory, when setting
      LILYPONDPREFIX to lilypond-x.y.z */
@@ -254,44 +270,50 @@ main_with_guile (void *, int, char **)
   if (verbose_global_b)
     dir_info (stderr);
 
-  ly_c_init_guile ();
+  ly_init_guile ();
   call_constructors ();
   progress_indication ("\n");
 
   all_fonts_global = new All_font_metrics (global_path.to_string ());
 
   init_scheme_code_string += ")";
-  scm_c_eval_string ((char*) init_scheme_code_string.to_str0 ());
+  gh_eval_str ((char*) init_scheme_code_string.to_str0 ());
 
   /* We accept multiple independent music files on the command line to
      reduce compile time when processing lots of small files.
      Starting the GUILE engine is very time consuming.  */
-
-  SCM files = SCM_EOL;
-  SCM *tail = &files;
+  bool first = true;
   while (char const *arg = option_parser->get_next_arg ())
     {
-      *tail = scm_cons (scm_makfrom0str (arg), SCM_EOL);
-      tail = SCM_CDRLOC (*tail);
+#if 0
+      /* Code to debug memory leaks.  Cannot call from within .ly
+        since then we get the protects from the parser state too.  */
+      scm_gc ();
+      scm_call_0 (ly_scheme_function ("dump-gc-protects"));
+#endif
+      do_one_file (arg);
+      first = false;
     }
   delete option_parser;
   option_parser = 0;
 
-  if (files == SCM_EOL)
+  /* No FILE arguments is now a usage error to help newbies.  If you
+     want a filter, you're not a newbie and should know to use file
+     argument `-'.  */
+  if (first)
     {
-      /* No FILE arguments is now a usage error to help newbies.  If you
-        want a filter, you're not a newbie and should know to use file
-        argument `-'.  */
       usage ();
       exit (2);
     }
 
-  SCM result = scm_call_1 (ly_scheme_function ("lilypond-main"), files);
-  (void) result;
-
-
-  /* Unreachable.  */
-  exit (0);
+  if (exit_status_global)
+    {
+      printf ("Failed files: ");
+      for (int i = 0; i < failed_files.size (); i++)
+       printf ("%s ", failed_files[i].to_str0 ());
+      printf ("\n");
+    }
+  exit (exit_status_global);
 }
 
 static void
@@ -317,7 +339,7 @@ parse_argv (int argc, char **argv)
 {
   bool help_b = false;
   option_parser = new Getopt_long (argc, argv, options_static);
-  while (Long_option_init const *opt = (*option_parser) ())
+  while (Long_option_init const * opt = (*option_parser) ())
     {
       switch (opt->shortname_char_)
        {
@@ -328,8 +350,10 @@ parse_argv (int argc, char **argv)
        case 'o':
          {
            String s = option_parser->optional_argument_str0_;
-           File_name file_name (s);
-           output_name_global = file_name.to_string ();
+           Path p = split_path (s);
+           if (s != "-" && p.ext.is_empty ())
+             p.ext = output_format_global;
+           output_name_global = p.to_string ();
          }
          break;
        case 'e':
@@ -348,12 +372,15 @@ parse_argv (int argc, char **argv)
            }
          output_format_global = option_parser->optional_argument_str0_;
          break;
+       case 'P':
+           dependency_prefix_global = option_parser->optional_argument_str0_;
+         break;
        case 'H':
          dump_header_fieldnames_global
            .push (option_parser->optional_argument_str0_);
          break;
        case 'I':
-         global_path.append (option_parser->optional_argument_str0_);
+         global_path.push (option_parser->optional_argument_str0_);
          break;
        case 'i':
          init_name_global = option_parser->optional_argument_str0_;
@@ -367,6 +394,9 @@ parse_argv (int argc, char **argv)
        case 's':
          safe_global_b = true;
          break;
+       case 'M':
+         dependency_global_b = true;
+         break; 
        case 'm':
          no_paper_global_b = true;
          break;
index fc09cde8baa4c0b5d2c88fc5426172ba6a37b8d8..026e817645e77aac736e8c4a2416a854025fa8f9 100644 (file)
@@ -69,6 +69,7 @@ Mark_engraver::stop_translation_timestep ()
     {
       SCM lst = get_property ("stavesFound");
       text_->set_property ("side-support-elements" , lst);
+      typeset_grob (text_);
       text_ =0;
     }
   mark_ev_ = 0;
@@ -81,7 +82,8 @@ Mark_engraver::create_items (Music *ev)
   if (text_)
     return;
 
-  text_ = make_item ("RehearsalMark", ev->self_scm ());
+  text_ = make_item ("RehearsalMark");
+  announce_grob (text_, ev->self_scm ());
 }
 
 
@@ -111,22 +113,22 @@ Mark_engraver::process_music ()
       SCM m = mark_ev_->get_property ("label");
       SCM proc = get_property ("markFormatter");
       if (!Text_item::markup_p (m) &&
-         ly_c_procedure_p (proc))
+         gh_procedure_p (proc))
        {
-         if (!ly_c_number_p (m)) 
+         if (!gh_number_p (m)) 
            m =  get_property ("rehearsalMark");
 
          if (scm_integer_p (m) == SCM_BOOL_T
              && scm_exact_p (m) == SCM_BOOL_T)
            {
-             int mark_count = ly_scm2int (m);
+             int mark_count = gh_scm2int (m);
              mark_count ++;
-             context ()->set_property ("rehearsalMark",
-                                           scm_int2num (mark_count));
+             daddy_context_->set_property ("rehearsalMark",
+                                           gh_int2scm (mark_count));
            }
 
-         if (ly_c_number_p (m))
-           m = scm_call_2 (proc, m, context ()->self_scm ());
+         if (gh_number_p (m))
+           m = scm_call_2 (proc, m, daddy_context_->self_scm ());
          else
            warning ("rehearsalMark does not have integer value.");
        }
index 7c262c33eb9431157ad484ba1f115ef8efcda839..67720943c835e5636b7a189b5005dc5a2555adfc 100644 (file)
@@ -32,6 +32,7 @@ Measure_grouping_engraver::finalize ()
   if (grouping_)
     {
       grouping_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn")));
+      typeset_grob (grouping_);
       grouping_->suicide ();
       grouping_= 0;
     }
@@ -55,7 +56,7 @@ Measure_grouping_engraver::process_music ()
     {
       grouping_->set_bound (RIGHT,
                            unsmob_grob (get_property ("currentMusicalColumn")));
-      
+      typeset_grob (grouping_);
       grouping_ = 0;
     }
   
@@ -63,7 +64,7 @@ Measure_grouping_engraver::process_music ()
     return; 
   
   SCM grouping = get_property ("beatGrouping");
-  if (ly_c_pair_p (grouping))
+  if (gh_pair_p (grouping))
     {
       Moment *measpos = unsmob_moment (get_property ("measurePosition"));
       Rational mp = measpos->main_part_;
@@ -72,12 +73,12 @@ Measure_grouping_engraver::process_music ()
       Rational bl = beatlen->main_part_;
        
       Rational where (0);
-      for (SCM s = grouping; ly_c_pair_p (s);
-          where += Rational (ly_scm2int (ly_car (s))) * bl,
-          s = ly_cdr (s)
+      for (SCM s = grouping; gh_pair_p (s);
+          where += Rational (gh_scm2int (gh_car (s))) * bl,
+          s = gh_cdr (s)
           )
        {
-         int grouplen = ly_scm2int (ly_car (s));
+         int grouplen = gh_scm2int (gh_car (s));
          if (where == mp)
            {
              if (grouping_)
@@ -86,9 +87,9 @@ Measure_grouping_engraver::process_music ()
                  continue;
                }
              
-             grouping_ = make_spanner ("MeasureGrouping", SCM_EOL);
+             grouping_ = make_spanner ("MeasureGrouping");
              grouping_->set_bound (LEFT, unsmob_grob (get_property ("currentMusicalColumn")));
-             
+             announce_grob (grouping_, SCM_EOL);
 
 
              stop_grouping_mom_ = now.main_part_ + Rational (grouplen - 1) * bl ;
index 7d160ac8e43cfbb6f9273bdb1f13922b9770ef3c..62c7c287ab0d3148a40310aca28feab2dcd621f9 100644 (file)
@@ -7,7 +7,7 @@
 
  */
 
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "spanner.hh"
 #include "measure-grouping-spanner.hh"
 #include "lookup.hh" 
index d71cf13d98c3c5253ce42947b0814de4b9d3896f..5f057b28d5f46eb675a9fcb510b718661b125b7a 100644 (file)
@@ -36,7 +36,7 @@ Melisma_translator::try_music (Music *m)
 {
   if (m->is_mus_type ("melisma-playing-event"))
     {
-      return melisma_busy (context ());
+      return melisma_busy (daddy_context_);
     }
   else if (m->is_mus_type ("melisma-span-event"))
     {
@@ -55,9 +55,9 @@ Melisma_translator::process_music ()
       SCM sd = event_->get_property ("span-direction");
       Direction d = to_dir (sd);
       if (d == START)
-       context ()->set_property ("melismaBusy", SCM_BOOL_T);
+       daddy_context_->set_property ("melismaBusy", SCM_BOOL_T);
       else
-       context ()->unset_property (ly_symbol2scm ("melismaBusy"));
+       daddy_context_->unset_property (ly_symbol2scm ("melismaBusy"));
     }
       
 }
index 8252e5a5697b6db66550a7c7e008e25ce16d4847..541df714014f9f3374467afe41ce6df185b61d2d 100644 (file)
@@ -18,7 +18,7 @@
 #include "rhythmic-head.hh"
 #include "note-head.hh"
 #include "staff-symbol-referencer.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "font-interface.hh"
 
 /*
@@ -73,7 +73,7 @@ Mensural_ligature_engraver::Mensural_ligature_engraver ()
 Spanner *
 Mensural_ligature_engraver::create_ligature_spanner ()
 {
-  return make_spanner ("MensuralLigature", SCM_EOL);
+  return make_spanner ("MensuralLigature");
 }
 
 /*
@@ -211,7 +211,7 @@ Mensural_ligature_engraver::apply_transition (Array<Grob_info> primitives,
            programming_error ("last_primitive undefined");
            break;
          }
-       last_primitive->set_property ("primitive", scm_int2num (output));
+       last_primitive->set_property ("primitive", gh_int2scm (output));
        break;
       case MLP_BB:
       case MLP_LB:
@@ -226,8 +226,8 @@ Mensural_ligature_engraver::apply_transition (Array<Grob_info> primitives,
            programming_error ("primitive undefined");
            break;
          }
-       last_primitive->set_property ("primitive", scm_int2num (output));
-       primitive->set_property ("primitive", scm_int2num (MLP_NONE));
+       last_primitive->set_property ("primitive", gh_int2scm (output));
+       primitive->set_property ("primitive", gh_int2scm (MLP_NONE));
        break;
       case MLP_SS:
        // delayed primitive with two note heads
@@ -241,8 +241,8 @@ Mensural_ligature_engraver::apply_transition (Array<Grob_info> primitives,
            programming_error ("last_primitive undefined");
            break;
          }
-       last_last_primitive->set_property ("primitive", scm_int2num (output));
-       last_primitive->set_property ("primitive", scm_int2num (MLP_NONE));
+       last_last_primitive->set_property ("primitive", gh_int2scm (output));
+       last_primitive->set_property ("primitive", gh_int2scm (MLP_NONE));
        break;
       default:
        programming_error (_f ("unexpected case fall-through"));
@@ -344,7 +344,7 @@ Mensural_ligature_engraver::propagate_properties (Spanner *ligature,
                                                  Array<Grob_info> primitives)
 {
   Real thickness = robust_scm2double (ligature->get_property ("thickness"), 1.4);
-  thickness *= ligature->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+  thickness *= ligature->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
 
   Real head_width =
     Font_interface::get_default_font (ligature)->
@@ -357,27 +357,27 @@ Mensural_ligature_engraver::propagate_properties (Spanner *ligature,
   for (int i = 0; i < primitives.size (); i++)
     {
       Item *primitive = dynamic_cast<Item*> (primitives[i].grob_);
-      int output = ly_scm2int (primitive->get_property ("primitive"));
+      int output = gh_scm2int (primitive->get_property ("primitive"));
       primitive->set_property ("thickness",
-                                   scm_make_real (thickness));
+                                   gh_double2scm (thickness));
       switch (output) {
        case MLP_NONE:
          primitive->set_property ("head-width",
-                                       scm_make_real (half_flexa_width));
+                                       gh_double2scm (half_flexa_width));
          break;
        case MLP_sc:
        case MLP_ss:
        case MLP_cs:
          primitive->set_property ("head-width",
-                                       scm_make_real (head_width));
+                                       gh_double2scm (head_width));
          break;
        case MLP_BB:
        case MLP_LB:
        case MLP_SS:
          primitive->set_property ("head-width",
-                                       scm_make_real (half_flexa_width));
+                                       gh_double2scm (half_flexa_width));
          primitive->set_property ("flexa-width",
-                                       scm_make_real (flexa_width));
+                                       gh_double2scm (flexa_width));
          break;
        default:
          programming_error (_f ("unexpected case fall-through"));
@@ -407,8 +407,8 @@ Mensural_ligature_engraver::fold_up_primitives (Array<Grob_info> primitives)
        }
 
       distance +=
-       ly_scm2double (current->get_property ("head-width")) -
-       ly_scm2double (current->get_property ("thickness"));
+       gh_scm2double (current->get_property ("head-width")) -
+       gh_scm2double (current->get_property ("thickness"));
     }
 }
 
@@ -423,12 +423,12 @@ Mensural_ligature_engraver::join_primitives (Array<Grob_info> primitives)
       if (i > 0)
         {
          Item *primitive = dynamic_cast<Item*> (info.grob_);
-         int output = ly_scm2int (primitive->get_property ("primitive"));
+         int output = gh_scm2int (primitive->get_property ("primitive"));
          if (output & MLP_ANY)
            {
              int delta_pitch = (pitch.steps () - last_pitch.steps ());
              primitive->set_property ("join-left-amount",
-                                           scm_int2num (delta_pitch));
+                                           gh_int2scm (delta_pitch));
            }
        }
       last_pitch = pitch;
index c9cab99eb4d3a3838be26cea5ea675fdfb65811b..cbd404b32c8fec7f4fa406e628cb849d8e602cf7 100644 (file)
@@ -14,7 +14,7 @@
 #include "lookup.hh"
 #include "staff-symbol-referencer.hh"
 #include "note-head.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "warn.hh"
 
 /*
@@ -33,7 +33,7 @@ brew_flexa (Grob *me,
 {
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   Real height = 0.6 * staff_space;
-  Stencil stencil;
+  Stencil stencil = Stencil ();
 
   if (add_cauda)
     {
@@ -136,7 +136,7 @@ internal_brew_primitive (Grob *me, bool ledger_take_space)
     }
 
   Stencil out;
-  int primitive = ly_scm2int (primitive_scm);
+  int primitive = gh_scm2int (primitive_scm);
   int delta_pitch = 0;
   Real thickness = 0.0;
   Real flexa_width = 0.0;
@@ -188,10 +188,10 @@ internal_brew_primitive (Grob *me, bool ledger_take_space)
   SCM join_left_scm = me->get_property ("join-left-amount");
   if (join_left_scm != SCM_EOL)
     {
-      int join_left = ly_scm2int (join_left_scm);
+      int join_left = gh_scm2int (join_left_scm);
       if (!join_left)
        programming_error (_f ("Mensural_ligature: (join_left == 0)"));
-      Real blotdiameter = (me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter")));
+      Real blotdiameter = (me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter")));
       Interval x_extent = Interval (0, thickness);
       Interval y_extent = (join_left > 0) ?
        Interval (-join_left * 0.5 * staff_space, 0) :
index 2f0cdf5804d00b29c4a8d8d1129806ba0e83693d..63c7b04aad7601e13884feb071cdb4b52c4373ce 100644 (file)
@@ -66,7 +66,7 @@ Metronome_mark_engraver::stop_translation_timestep ()
        text_->set_parent (bar_line_, X_AXIS);
       
       text_->set_property ("side-support-elements" , get_property ("stavesFound"));
-      
+      typeset_grob (text_);
       text_ =0;
     }
   mark_ev_ = 0;
@@ -79,8 +79,9 @@ Metronome_mark_engraver::create_items (Music *rq)
   if (text_)
     return;
 
-  text_ = make_item ("MetronomeMark", rq->self_scm () );
+  text_ = make_item ("MetronomeMark");
 
+  announce_grob (text_, rq->self_scm ());
 }
 
 
@@ -100,7 +101,7 @@ Metronome_mark_engraver::process_music ()
 
       SCM proc = get_property ("metronomeMarkFormatter");
       SCM result= scm_call_2 (proc, mark_ev_->self_scm (),
-                             context ()->self_scm ()); 
+                             daddy_context_->self_scm ()); 
       
       text_->set_property ("text", result);
     }
index d30e94e599a37407ce6961c735ced9e4d28ae346..234ebeb2aaf6f1cf968e693e81fde8726d47c96b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  midi-def.cc -- implement midi output def functions
+  midi-def.cc -- implement Midi_def
 
   source file of the GNU LilyPond music typesetter
 
@@ -7,21 +7,23 @@
 
 */
 #include <math.h>
-
 #include "misc.hh"
-#include "output-def.hh"
-#include "moment.hh"
+#include "midi-def.hh"
+#include "performance.hh"
 #include "warn.hh"
 #include "scm-hash.hh"
 
-
+Midi_def::Midi_def ()
+{
+  // ugh
+  set_tempo (Moment (Rational (1, 4)), 60);
+}
 
 int
-get_tempo (Output_def * def,
-          Moment one_beat_mom)
+Midi_def::get_tempo (Moment one_beat_mom)
 {
   SCM wis  = ly_symbol2scm ("whole-in-seconds");
-  Moment *w = unsmob_moment (def->lookup_variable (wis));
+  Moment *w = unsmob_moment (lookup_variable (wis));
 
   Moment wholes_per_min = Moment (60);
   if (!w)
@@ -39,13 +41,11 @@ get_tempo (Output_def * def,
 }
 
 void
-set_tempo (Output_def * def,
-          Moment one_beat_mom,
-          int beats_per_minute_i)
+Midi_def::set_tempo (Moment one_beat_mom, int beats_per_minute_i)
 {
   Moment beats_per_second = Moment (beats_per_minute_i) / Moment (60);
 
   Moment m = Moment (1)/Moment (beats_per_second * one_beat_mom);
-  def->set_variable (ly_symbol2scm ("whole-in-seconds"), m.smobbed_copy ());
+  set_variable (ly_symbol2scm ("whole-in-seconds"), m.smobbed_copy ());
 }
 
index ab66dc789328f89542cbc3ce470a802a8438f653..1fd33773adf9123177d1eaa25bffb9186e8b3e53 100644 (file)
@@ -145,10 +145,10 @@ Midi_instrument::to_string () const
     UGH. don't use eval.
    */
   SCM proc = ly_scheme_function ("midi-program");
-  SCM program = scm_call_1 (proc, ly_symbol2scm (audio_->str_.to_str0 ()));
+  SCM program = gh_call1 (proc, ly_symbol2scm (audio_->str_.to_str0 ()));
   found = (program != SCM_BOOL_F);
   if (found)
-    program_byte = ly_scm2int (program);
+    program_byte = gh_scm2int (program);
   else
       warning (_f ("no such MIDI instrument: `%s'", audio_->str_.to_str0 ()));
 
diff --git a/lily/modified-font-metric.cc b/lily/modified-font-metric.cc
deleted file mode 100644 (file)
index 0210c86..0000000
+++ /dev/null
@@ -1,303 +0,0 @@
-/*
-  scaled-font-metric.cc -- declare Modified_font_metric
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#include <ctype.h>
-
-#include "warn.hh"
-#include "scaled-font-metric.hh"
-#include "string.hh"
-#include "stencil.hh"
-
-Modified_font_metric::Modified_font_metric (String coding, Font_metric* m, Real magn)
-{
-  coding_vector_ = SCM_EOL;
-  coding_mapping_ = SCM_EOL;
-  coding_table_ = SCM_EOL;
-  coding_description_ = SCM_EOL;
-  
-  coding_scheme_ = coding;
-  magnification_ = magn;
-  
-  SCM desc = m->description_;
-
-  Real total_mag = magn * ly_scm2double (ly_cdr (desc));
-  assert (total_mag);
-  
-  description_ = scm_cons (ly_car (desc), scm_make_real (total_mag));
-  orig_ = m;
-
-  if (coding_scheme_ != "TeX"
-      && coding_scheme_ != "ASCII"
-      && coding_scheme_ !=  orig_->coding_scheme ())
-    {
-      coding_vector_ = scm_call_1 (ly_scheme_function ("get-coding-vector"),
-                                  scm_makfrom0str (coding_scheme_.to_str0 ()));
-
-      if (!ly_c_vector_p (coding_vector_))
-       {
-         programming_error ("get-coding-vector  should return vector");
-         coding_vector_ = scm_c_make_vector (256, ly_symbol2scm (".notdef"));
-       }
-
-      
-      coding_table_ = scm_call_1 (ly_scheme_function ("get-coding-table"),
-                                 scm_makfrom0str (orig_->coding_scheme ().to_str0 ()));
-         
-      coding_mapping_  = scm_call_2 (ly_scheme_function ("make-encoding-mapping"),
-                                        coding_vector_,
-                                        coding_table_);
-
-      coding_description_= SCM_EOL;
-
-      coding_description_ = scm_acons (ly_symbol2scm ("input-name"),
-                                      scm_makfrom0str (coding_scheme_.to_str0 ()),
-                                      coding_description_);
-
-      coding_description_ = scm_acons (ly_symbol2scm ("input-vector"),
-                                      coding_vector_, coding_description_);
-      coding_description_ = scm_acons (ly_symbol2scm ("output-name"),
-                                      scm_makfrom0str (orig_->coding_scheme ().to_str0 ()),
-                                      coding_description_);
-      coding_description_ = scm_acons (ly_symbol2scm ("output-table"),
-                                      coding_table_,
-                                      coding_description_);
-      
-      coding_description_ = scm_acons (ly_symbol2scm ("char-mapping"),
-                                      coding_mapping_,
-                                      coding_description_);
-    } 
-}
-
-
-
-LY_DEFINE (ly_font_encoding_alist, "ly:font-encoding-alist",
-          1, 0, 0,
-          (SCM font),
-          "Given the Modified_font_metric @var{font}, return an "
-          "alist. Keys are input-name, input-vector, "
-          "output-name, output-table, mapping.")
-{
-  Modified_font_metric *fm
-    = dynamic_cast<Modified_font_metric*> (unsmob_metrics (font));
-  
-  SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "Modified_font_metric");
-  return fm->coding_description_;
-}
-
-SCM
-Modified_font_metric::make_scaled_font_metric (SCM coding, Font_metric *m, Real s)
-{
-  /*
-    UGOHR.
-   */
-  if (ly_c_symbol_p (coding))
-    coding = scm_symbol_to_string (coding);
-  
-  String scheme = ly_scm2string (coding);
-  
-  Modified_font_metric *sfm = new Modified_font_metric (scheme, m, s);
-  
-  return sfm->self_scm ();
-}
-
-Real
-Modified_font_metric::design_size () const
-{
-  return orig_->design_size ();
-}
-
-
-Box 
-Modified_font_metric::get_indexed_char (int i) const
-{
-  Box b = orig_->get_indexed_char (i);
-  b.scale (magnification_);
-  return b;  
-}
-
-Box 
-Modified_font_metric::get_ascii_char (int i) const
-{
-  Box b = orig_->get_ascii_char (i);
-  b.scale (magnification_);
-  return b;  
-}
-
-int
-Modified_font_metric::count () const
-{
-  return orig_->count ();
-}
-
-Offset
-Modified_font_metric::get_indexed_wxwy (int k) const
-{
-  Offset o = orig_->get_indexed_wxwy (k);
-  return o * magnification_;
-}
-
-int
-Modified_font_metric::name_to_index (String s) const
-{
-  return orig_->name_to_index (s);
-}
-
-int
-Modified_font_metric::index_to_ascii (int k) const
-{
-  return orig_->index_to_ascii (k);
-}
-
-String
-Modified_font_metric::coding_scheme () const
-{
-  return coding_scheme_;
-}
-
-void
-Modified_font_metric::derived_mark () const
-{
-  scm_gc_mark (coding_vector_);
-  scm_gc_mark (coding_description_);
-  scm_gc_mark (coding_table_);
-  scm_gc_mark (coding_mapping_);
-}
-
-Box
-Modified_font_metric::tex_kludge (String text) const
-{
-  Interval ydims;
-  Real w=0.0;
-
-  /*
-    TODO: put this klutchness behind ly:option switch.
-  */  
-  for (int i = 0; i < text.length (); i++) 
-    {
-      switch (text[i]) 
-       {
-       case '\\':
-         // accent marks use width of base letter
-         if (i +1 < text.length ())
-          {
-            if (text[i+1]=='\'' || text[i+1]=='`' || text[i+1]=='"' ||
-                text[i+1]=='^')
-              {
-                i++;
-                break;
-              }
-            // for string width \\ is a \ and \_ is a _.
-            if (text[i+1]=='\\' || text[i+1]=='_')        
-              {
-                break;
-              }
-          }
-         
-         for (i++; (i < text.length ()) && !isspace (text[i]) 
-                && text[i]!='{' && text[i]!='}'; i++)
-           ;
-         
-         // ugh.
-         i--; // Compensate for the increment in the outer loop!
-         break;
-       case '{':  // Skip '{' and '}'
-       case '}':
-         break;
-       
-       default: 
-         Box b = get_ascii_char ((unsigned char)text[i]);
-         
-         // Ugh, use the width of 'x' for unknown characters
-         if (b[X_AXIS].length () == 0) 
-           b = get_ascii_char ((unsigned char)'x');
-         
-         w += b[X_AXIS].length ();
-         ydims.unite (b[Y_AXIS]);
-         break;
-       }
-    }
-  
-  if (ydims.is_empty ())
-    ydims = Interval (0, 0);
-  
-  return Box (Interval (0, w), ydims);
-}
-
-Box
-Modified_font_metric::text_dimension (String text) 
-{
-  Box b; 
-  if (coding_scheme_ == "TeX")
-    {
-      b = tex_kludge (text);
-    }
-  else if (coding_scheme_ == "ASCII"
-          || coding_scheme_ ==  orig_->coding_scheme ())
-    {
-      Interval ydims;
-
-      Real w=0.0;
-
-      for (int i = 0; i < text.length (); i++) 
-       {
-         Box b = get_ascii_char ((unsigned char)text[i]);
-    
-         w += b[X_AXIS].length ();
-         ydims.unite (b[Y_AXIS]); 
-       }
-      if (ydims.is_empty ())
-       ydims = Interval (0, 0);
-
-      b = Box(Interval(0,w), ydims);
-    }
-  else
-    {
-      Interval ydims;
-      Real w = 0.0;
-
-      for (int i = 0; i < text.length (); i++) 
-       {
-         SCM sym = scm_vector_ref (coding_vector_,
-                                   SCM_MAKINUM((unsigned char) text[i]));
-
-         Box char_box;
-
-         if (!ly_c_symbol_p (sym))
-           continue;
-
-         char const * chars =  SCM_SYMBOL_CHARS(sym);
-         
-         int idx = orig_->name_to_index (chars);
-         if (idx >= 0)
-           {
-             char_box = orig_->get_indexed_char (idx);
-           }
-         
-         char_box.scale (magnification_);
-         if (!char_box[X_AXIS].is_empty ())
-           w += char_box[X_AXIS][RIGHT]; // length ?
-
-         ydims.unite (char_box[Y_AXIS]);
-       }
-
-      if (ydims.is_empty ())
-       ydims = Interval (0, 0);
-
-         
-      b = Box (Interval (0, w), ydims);
-    }
-  
-  return b;
-}
-
-Font_metric*
-Modified_font_metric::original_font () const
-{
-  return orig_;
-}
index 54ee65c1842ec074cb034167bbe76c2b0636d8a6..a180bedd6cb26e02922a60c3312ac02a2225480a 100644 (file)
@@ -1,39 +1,18 @@
 /*   
   moment.cc --  implement Moment
-
+  
   source file of the GNU LilyPond music typesetter
-
+  
   (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
+  
+ */
+
 
 #include "lily-guile.hh"
 #include "moment.hh"
 #include "warn.hh"
-
-
-Moment::Moment ()
-{
-}
-
-Moment::Moment (int m)
-{
-  main_part_ = Rational (m);
-  grace_part_ = Rational ( 0);
-}
-
-Moment::Moment (Rational m, Rational g)
-{
-  main_part_ = m;
-  grace_part_ = g;
-}
-
-Moment::Moment (Rational m)
-{
-  main_part_ = m;
-  grace_part_ = Rational (0);
-}
-
 #include "ly-smobs.icc"
+
 IMPLEMENT_SIMPLE_SMOBS (Moment);
 IMPLEMENT_TYPE_P (Moment, "ly:moment?");
 
@@ -43,6 +22,9 @@ Moment::mark_smob (SCM)
   return SCM_EOL;
 }
 
+
+
+
 int
 Moment::print_smob (SCM s, SCM port, scm_print_state *)
 {
@@ -56,18 +38,19 @@ Moment::print_smob (SCM s, SCM port, scm_print_state *)
   return 1;
 }
 
-/* TODO: add optional factor argument. */
-LY_DEFINE (ly_make_moment, "ly:make-moment",
-          2, 2, 0, (SCM n, SCM d, SCM gn, SCM gd),
+/*
+  TODO: add optional factor argument.
+*/
+LY_DEFINE (make_moment,"ly:make-moment", 2,2,0, (SCM n, SCM d, SCM gn, SCM gd),
           "Create the rational number with main timing @var{n}/@var{d}, "
           "and optional grace timin @var{gn}/@var{gd}.\n"
           "\n"
           "\n"
-          "Moment is a point in musical time.  "
-          "It is consists of a pair of rationals (@var{m},@var{g}), "
-          "where @var{m} is the timing for the main\n"
-          "notes, and @var{g} the timing for grace notes.  "
-          "In absence of grace notes, @var{g} is zero.\n")
+          "Moment is a point in musical time. It is consists of a pair of\n"
+          "rationals (@var{m},@var{g}), where @var{m} is the timing for the  main\n"
+          "notes, and @var{g} the timing for  grace notes. In absence of grace\n"
+          "notes, @var{g} is zero.\n"
+          )
 {
   SCM_ASSERT_TYPE (SCM_INUMP (n), n, SCM_ARG1, __FUNCTION__, "integer");
   SCM_ASSERT_TYPE (SCM_INUMP (d), d, SCM_ARG2, __FUNCTION__, "integer");
@@ -76,64 +59,72 @@ LY_DEFINE (ly_make_moment, "ly:make-moment",
   if (gn != SCM_UNDEFINED)
     {
       SCM_ASSERT_TYPE (SCM_INUMP (gn), gn, SCM_ARG3, __FUNCTION__, "integer");
-      grace_num = ly_scm2int (gn);
+      grace_num = gh_scm2int (gn);
     }
 
   int grace_den = 1;
   if (gd != SCM_UNDEFINED)
     {
       SCM_ASSERT_TYPE (SCM_INUMP (gd), gd, SCM_ARG4, __FUNCTION__, "integer");
-      grace_den = ly_scm2int (gd);
+      grace_den = gh_scm2int (gd);
     }
 
-  return Moment (Rational (ly_scm2int (n), ly_scm2int (d)),
+  return Moment (Rational (gh_scm2int (n), gh_scm2int (d)),
                 Rational (grace_num, grace_den)).smobbed_copy ();
 }
 
-LY_DEFINE (ly_add_moment, "ly:add-moment",
-          2, 0, 0, (SCM a, SCM b),
-          "Add two moments.")
+LY_DEFINE (add_moment,"ly:add-moment", 2,0,0, (SCM a, SCM b),
+          "Add two moments."
+          )
 {
-  Moment *ma = unsmob_moment (a);
-  Moment *mb = unsmob_moment (b);
+  Moment * ma = unsmob_moment (a);
+  Moment * mb = unsmob_moment (b);
   SCM_ASSERT_TYPE (ma, a, SCM_ARG1, __FUNCTION__, "moment");
   SCM_ASSERT_TYPE (mb, b, SCM_ARG2, __FUNCTION__, "moment");
+
   return (*ma + *mb).smobbed_copy ();
 }
 
-LY_DEFINE (ly_mul_moment,"ly:mul-moment",
-          2, 0, 0, (SCM a, SCM b),
-          "Multiply two moments.")
+
+LY_DEFINE (mul_moment,"ly:mul-moment", 2,0,0, (SCM a, SCM b),
+          "Multiply two moments."
+          )
 {
-  Moment *ma = unsmob_moment (a);
-  Moment *mb = unsmob_moment (b);
+  Moment * ma = unsmob_moment (a);
+  Moment * mb = unsmob_moment (b);
   SCM_ASSERT_TYPE (ma, a, SCM_ARG1, __FUNCTION__, "moment");
   SCM_ASSERT_TYPE (mb, b, SCM_ARG2, __FUNCTION__, "moment");
-  return (*ma * *mb).smobbed_copy ();
+
+  return (*ma *  *mb).smobbed_copy ();
 }
 
-LY_DEFINE (ly_div_moment,"ly:div-moment",
-          2, 0, 0, (SCM a, SCM b),
-          "Divide two moments.")
+
+
+LY_DEFINE (div_moment,"ly:div-moment", 2,0,0, (SCM a, SCM b),
+          "Divide two moments."
+          )
 {
-  Moment *ma = unsmob_moment (a);
-  Moment *mb = unsmob_moment (b);
+  Moment * ma = unsmob_moment (a);
+  Moment * mb = unsmob_moment (b);
   SCM_ASSERT_TYPE (ma, a, SCM_ARG1, __FUNCTION__, "moment");
   SCM_ASSERT_TYPE (mb, b, SCM_ARG2, __FUNCTION__, "moment");
-  return (*ma / *mb).smobbed_copy ();
+
+  return (*ma /  *mb).smobbed_copy ();
 }
 
-LY_DEFINE (ly_moment_less_p,"ly:moment<?",
-          2, 0, 0, (SCM a, SCM b),
+LY_DEFINE (ly_moment_less_p,"ly:moment<?", 2,0,0, (SCM a, SCM b),
           "Compare two moments.")
 {
-  Moment *ma = unsmob_moment (a);
-  Moment *mb = unsmob_moment (b);
+  Moment * ma = unsmob_moment (a);
+  Moment * mb = unsmob_moment (b);
   SCM_ASSERT_TYPE (ma, a, SCM_ARG1, __FUNCTION__, "moment");
   SCM_ASSERT_TYPE (mb, b, SCM_ARG2, __FUNCTION__, "moment");
-  return ly_bool2scm (*ma <  *mb);
+
+  return gh_bool2scm (*ma <  *mb);
 }
 
+
+
 SCM
 Moment::equal_p (SCM a, SCM b)
 {
@@ -161,6 +152,29 @@ Moment::compare (Moment const &a, Moment const &b)
   return Rational::compare (a.grace_part_, b.grace_part_);
 }
 
+Moment::Moment ()
+{
+
+}
+
+Moment::Moment (int m)
+{
+  main_part_ = Rational (m);
+  grace_part_  = Rational ( 0);
+}
+
+Moment::Moment (Rational m, Rational g)
+{
+  main_part_ = m;
+  grace_part_  = g;
+}
+
+Moment::Moment (Rational m)
+{
+  main_part_ = m;
+  grace_part_  = Rational (0);
+}
+
 void
 Moment::operator += (Moment const &src)
 {
@@ -194,17 +208,13 @@ Moment::operator /= (Moment const &src)
   grace_part_ /= src.main_part_;
 }
 
+
+
 int
-Moment::den () const
-{
-  return main_part_.den ();
-}
+Moment::den () const { return main_part_.den (); }
 
 int
-Moment::num () const
-{
-  return main_part_.num ();
-}
+Moment::num () const { return main_part_.num (); }
 
 bool
 Moment::to_bool () const
@@ -218,6 +228,7 @@ Moment::set_infinite (int k)
   main_part_.set_infinite (k);
 }
 
+
 String
 Moment::to_string () const
 {
index 5f2314ce088811bfbca1b8df0cb83be72b7842d8..598477b5f421a32e0f9ae6cb3cbbb78c7fda0e6f 100644 (file)
@@ -80,16 +80,16 @@ Multi_measure_rest_engraver::process_music ()
   if (rest_ev_ && !mmrest_
       && stop_moment_ > now_mom ())
     {
-      mmrest_ = make_spanner ("MultiMeasureRest", rest_ev_->self_scm ());
+      mmrest_ = make_spanner ("MultiMeasureRest");
 
       if (text_events_.size ())
        {
          for (int i = 0; i < text_events_.size (); i++)
            {
+             Spanner *sp
+               = make_spanner ("MultiMeasureRestText");
 
              Music* e = text_events_[i];
-             Spanner *sp
-               = make_spanner ("MultiMeasureRestText", e->self_scm () );
              SCM t = e->get_property ("text");
              SCM dir = e->get_property ("direction");
              sp->set_property ("text",t);
@@ -97,6 +97,7 @@ Multi_measure_rest_engraver::process_music ()
                sp->set_property ("direction",dir);
              
              numbers_.push (sp);
+             announce_grob (sp, e->self_scm ());
            }
 
          /*
@@ -107,7 +108,7 @@ Multi_measure_rest_engraver::process_music ()
            Grob *last =0;
            for (int i=0; i <numbers_.size (); i++)
              {
-               if (scm_int2num (d) == numbers_[i]->get_property ("direction"))
+               if (gh_int2scm (d) == numbers_[i]->get_property ("direction"))
                  {
                    if (last)
                      Side_position_interface::add_support (numbers_[i], last);
@@ -119,8 +120,9 @@ Multi_measure_rest_engraver::process_music ()
       else
        {
          Spanner *sp
-           = make_spanner ("MultiMeasureRestNumber", rest_ev_->self_scm () );
+           = make_spanner ("MultiMeasureRestNumber");
          numbers_.push (sp);
+         announce_grob (sp, rest_ev_->self_scm ());
        }
 
       for (int i =0 ; i < numbers_.size (); i++)
@@ -129,11 +131,12 @@ Multi_measure_rest_engraver::process_music ()
          numbers_[i]->set_parent (mmrest_, Y_AXIS);
        }
       
+      announce_grob (mmrest_, rest_ev_->self_scm ());
       start_measure_
-       = ly_scm2int (get_property ("currentBarNumber"));
+       = gh_scm2int (get_property ("currentBarNumber"));
     }
 
-  bar_seen_ = ly_c_string_p (get_property ("whichBar"));
+  bar_seen_ = gh_string_p (get_property ("whichBar"));
 }
 
 void
@@ -179,8 +182,35 @@ Multi_measure_rest_engraver::stop_translation_timestep ()
   SCM smp = get_property ("measurePosition");
   Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
 
+  if (mmrest_
+      && !mp.to_bool ()
+      && mmrest_->get_bound (LEFT) && mmrest_->get_bound (RIGHT))
+    {
+      typeset_grob (mmrest_);
+      for (int i = 0 ; i < numbers_.size (); i++)
+       {
+         typeset_grob (numbers_[i]);
+       }
+      
+      /*
+       we must keep mmrest_ around to set measure-count, so
+       no mmrest_ = 0 here. 
+       */
+    }
+
   if (last_rest_)
     {
+      /* sanity check */
+      if (last_rest_->get_bound (LEFT) && last_rest_->get_bound (RIGHT)
+         && last_rest_->get_bound (LEFT) != last_rest_->get_bound (RIGHT))
+       {
+         typeset_grob (last_rest_);
+
+         for (int i = 0; i < last_numbers_.size ();i++)
+           {
+             typeset_grob (last_numbers_[i]);
+           }
+       }
       last_rest_ = 0;
       last_numbers_.clear ();
     }
@@ -209,14 +239,14 @@ Multi_measure_rest_engraver::start_translation_timestep ()
       last_rest_ = mmrest_;
       last_numbers_ = numbers_;
       
-      int cur = ly_scm2int (get_property ("currentBarNumber"));
+      int cur = gh_scm2int (get_property ("currentBarNumber"));
       int num = cur - start_measure_;
 
       /*
        We can't plug a markup directly into the grob, since the
        measure-count determines the formatting of the mmrest.
       */
-      last_rest_->set_property ("measure-count", scm_int2num (num));
+      last_rest_->set_property ("measure-count", gh_int2scm (num));
 
       SCM sml = get_property ("measureLength");
       Rational ml = (unsmob_moment (sml)) ? unsmob_moment (sml)->main_part_ : Rational (1);
@@ -233,15 +263,15 @@ Multi_measure_rest_engraver::start_translation_timestep ()
        {
          SCM thres = get_property ("restNumberThreshold");
          int t = 1;
-         if (ly_c_number_p (thres))
-           t = ly_scm2int (thres);
+         if (gh_number_p (thres))
+           t = gh_scm2int (thres);
       
          if (num <= t)
            last->suicide ();
          else 
            {
              SCM text
-               = scm_number_to_string (scm_int2num (num), SCM_MAKINUM (10));
+               = scm_number_to_string (gh_int2scm (num), SCM_MAKINUM (10));
              last->set_property ("text", text);
            }
        }
@@ -253,6 +283,21 @@ Multi_measure_rest_engraver::start_translation_timestep ()
 void
 Multi_measure_rest_engraver::finalize ()
 {
+  if (mmrest_)
+    {
+      typeset_grob (mmrest_);
+    }
+  if (last_rest_)
+    {
+      typeset_grob (last_rest_);
+    }
+
+  for (int i = 0; i < last_numbers_.size ();i++)
+    typeset_grob (last_numbers_[i]);
+
+  for (int i = 0; i < numbers_.size ();i++)
+    typeset_grob (numbers_[i]);
+
 }
 
 ENTER_DESCRIPTION (Multi_measure_rest_engraver,
index 49b6c7b63179b15ab7b78413b71881c467bbe5f4..51101be0e2e6f1995dd9810df505789c5b35d060 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "multi-measure-rest.hh"
 #include "warn.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "paper-column.hh" // urg
 #include "font-interface.hh"
 #include "rest.hh"
@@ -102,9 +102,9 @@ Multi_measure_rest::print (SCM smob)
 
   int measures = 0;
   SCM m (me->get_property ("measure-count"));
-  if (ly_c_number_p (m))
+  if (gh_number_p (m))
     {
-      measures = ly_scm2int (m);
+      measures = gh_scm2int (m);
     }
 
   mol.translate_axis (x_off, X_AXIS);
@@ -118,16 +118,16 @@ Multi_measure_rest::symbol_stencil (Grob *me, Real space)
 {
   int measures = 0;
   SCM m (me->get_property ("measure-count"));
-  if (ly_c_number_p (m))
+  if (gh_number_p (m))
     {
-      measures = ly_scm2int (m);
+      measures = gh_scm2int (m);
     }
   if (measures <= 0)
     return Stencil ();
   
 
   SCM limit = me->get_property ("expand-limit");
-  if (measures > ly_scm2int (limit))
+  if (measures > gh_scm2int (limit))
     {
       Real padding = 0.15;  
       Stencil s =  big_rest (me, (1.0 - 2*padding) * space);
@@ -185,7 +185,7 @@ Multi_measure_rest::big_rest (Grob *me, Real width)
 
 
   Real ss = Staff_symbol_referencer::staff_space (me);
-  Real slt = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+  Real slt = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
   Real y = slt * thick_thick/2 * ss;
   Real ythick = hair_thick * slt * ss;
   Box b (Interval (0,  0 >? (width - 2 * ythick)), Interval (-y, y));
@@ -239,7 +239,7 @@ Multi_measure_rest::church_rest (Grob*me, Font_metric *musfont, int measures,
 
          Stencil r (musfont->find_by_name ("rests-" + to_string (k)));
          symbols_width += r.extent (X_AXIS).length ();
-         mols = scm_cons (r.smobbed_copy (), mols);
+         mols = gh_cons (r.smobbed_copy (), mols);
        }
        else
        {
@@ -267,7 +267,7 @@ Multi_measure_rest::church_rest (Grob*me, Font_metric *musfont, int measures,
              r.translate_axis (staff_space, Y_AXIS);
            }
          symbols_width += r.extent (X_AXIS).length ();
-         mols = scm_cons (r.smobbed_copy (), mols);
+         mols = gh_cons (r.smobbed_copy (), mols);
        }
       count ++;
     }
@@ -282,9 +282,9 @@ Multi_measure_rest::church_rest (Grob*me, Font_metric *musfont, int measures,
     }
   
   Stencil mol; 
-  for (SCM  s = mols; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM  s = mols; gh_pair_p (s); s = gh_cdr (s))
     {
-      mol.add_at_edge (X_AXIS, LEFT, *unsmob_stencil (ly_car (s)), inner_padding, 0);
+      mol.add_at_edge (X_AXIS, LEFT, *unsmob_stencil (gh_car (s)), inner_padding, 0);
     }
   mol.align_to (X_AXIS, LEFT);
   mol.translate_axis (outer_padding_factor *  inner_padding, X_AXIS);
diff --git a/lily/music-function.cc b/lily/music-function.cc
deleted file mode 100644 (file)
index 6e3c5ac..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/* 
-  music-function.cc --  implement music_function
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
-  
-*/
-#include "music-function.hh"
-#include "string.hh"
-#include "music.hh"
-
-static scm_t_bits music_function_tag;
-
-/* Print a textual represenation of the smob to a given port.  */
-static int
-print_music_function (SCM b, SCM port, scm_print_state *)
-{
-  SCM value = SCM_CELL_OBJECT_1 (b);
-
-  scm_puts ("#<Music function ", port);
-  scm_write (value, port);
-  scm_puts (">", port);
-
-  /* Non-zero means success.  */
-  return 1;
-}
-
-
-LY_DEFINE (ly_make_music_function, "ly:make-music-function", 2, 0, 0,
-          (SCM signature, SCM func),
-         "Make a function to process music, to be used for the "
-          "parser. @code{func} is the function, and @code{signature} describes "
-          "Its arguments. @code{signature} is a list containing either "
-          "@code{ly:music?} predicates or other type predicates.")
-{
-  String str = "";
-  for (SCM s = signature; ly_c_pair_p (s); s = ly_cdr (s))
-    {
-      if (str != "")
-       str += "-";
-      
-      if (ly_car (s) == Music_type_p_proc)
-       str += "music";
-      else if (ly_c_procedure_p (ly_car (s)))
-       str += "scm";
-    }
-  if (str == "") str = "noarg";
-  scm_set_object_property_x (func, ly_symbol2scm ("music-function-signature"),
-                            signature);
-  
-  scm_set_object_property_x (func, ly_symbol2scm ("music-function-signature-keyword"),
-                            ly_symbol2scm (str.to_str0 ()));
-    
-  SCM_RETURN_NEWSMOB (music_function_tag, func);
-}
-
-bool
-is_music_function (SCM music_function)
-{
-  return (SCM_NIMP (music_function) && SCM_CELL_TYPE (music_function) == music_function_tag);
-}
-
-
-SCM
-get_music_function_transform (SCM music_function)
-{
-  if (!is_music_function (music_function))
-    return SCM_UNDEFINED;
-  
-  return SCM_CELL_OBJECT_1 (music_function);
-}
-
-static void
-init_music_function (void)
-{
-  music_function_tag = scm_make_smob_type ("music-function", 0);
-  scm_set_smob_mark (music_function_tag, scm_markcdr);
-  scm_set_smob_print (music_function_tag, print_music_function);
-}
-
-ADD_SCM_INIT_FUNC (music_function_tag, init_music_function); 
index c4cf900dca52d6ea51c5fc2f16bebbf7afae0fcd..14bbebebd9da988d5d048aaf1efa1c3b997b6ce6 100644 (file)
@@ -78,9 +78,9 @@ Music_iterator::get_static_get_iterator (Music *m)
 
   SCM ctor = m->get_property ("iterator-ctor") ;
   SCM iter = SCM_EOL;
-  if (ly_c_procedure_p (ctor))
+  if (gh_procedure_p (ctor))
     {
-      iter = scm_call_0 (ctor);
+      iter = gh_call0 (ctor);
       p = unsmob_iterator (iter);
     }
   else
@@ -243,7 +243,7 @@ is_child_context (Context *me, Context *child)
 {
   while (child && child != me)
     {
-      child = child->get_parent_context ();
+      child = child->daddy_context_;
     }
   
   return child == me;
diff --git a/lily/music-output-def.cc b/lily/music-output-def.cc
new file mode 100644 (file)
index 0000000..e2c32b6
--- /dev/null
@@ -0,0 +1,161 @@
+/*
+  music-output-def.cc -- implement Music_output_def
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "scm-hash.hh"
+
+#include "warn.hh"
+#include "music-output-def.hh"
+#include "global-context.hh"
+#include "context-def.hh"
+#include "main.hh"
+#include "file-path.hh"
+#include "lily-guile.hh"
+#include "ly-module.hh"
+
+#include "ly-smobs.icc"
+
+Music_output_def::Music_output_def ()
+{
+  scaled_fonts_ = SCM_EOL;
+  translator_tab_ = new Scheme_hash_table;
+  scope_ = SCM_EOL;
+  smobify_self ();
+
+  scm_gc_unprotect_object (translator_tab_->self_scm ());
+  scope_ = ly_make_anonymous_module ();
+}
+
+Music_output_def::~Music_output_def ()
+{
+}
+
+Music_output_def::Music_output_def (Music_output_def const &s)
+{
+  scope_ = SCM_EOL;
+  translator_tab_ = 0;
+  scaled_fonts_ = SCM_EOL;
+  smobify_self ();
+
+  translator_tab_ =   new Scheme_hash_table (*s.translator_tab_);  
+  scm_gc_unprotect_object (translator_tab_->self_scm ());  
+  
+  scaled_fonts_ = scm_list_copy (s.scaled_fonts_);  
+
+  scope_= ly_make_anonymous_module ();
+  if (ly_module_p (s.scope_))
+    ly_import_module (scope_, s.scope_);
+}
+
+
+IMPLEMENT_SMOBS (Music_output_def);
+IMPLEMENT_DEFAULT_EQUAL_P (Music_output_def);
+
+SCM
+Music_output_def::mark_smob (SCM m)
+{
+  Music_output_def * mo = (Music_output_def*) SCM_CELL_WORD_1 (m);
+  if (mo->translator_tab_)
+    scm_gc_mark (mo->translator_tab_->self_scm ());
+  scm_gc_mark (mo->scope_);
+
+  return mo->scaled_fonts_;
+}
+
+void
+Music_output_def::assign_context_def (SCM transdef)
+{
+  Context_def *tp = unsmob_context_def (transdef);
+  assert (tp);
+
+  translator_tab_->set (tp->get_context_name (), transdef);
+  
+  String nm = ly_symbol2string (tp->get_context_name ()) + "Context";
+
+
+  scm_module_define (scope_, ly_symbol2scm (nm.to_str0 ()), transdef);
+}
+
+/*
+  find the translator for NAME. NAME must be a symbol.
+*/
+SCM
+Music_output_def::find_context_def (SCM name) const
+{  
+  SCM val  =SCM_EOL;
+  translator_tab_->try_retrieve (name, &val);
+  return val;
+}
+
+int
+Music_output_def::print_smob (SCM s, SCM p, scm_print_state *)
+{
+  Music_output_def * def = unsmob_music_output_def (s);
+  scm_puts ("#< ", p);
+  scm_puts (classname (def), p);
+  
+  (void)def;
+  scm_puts (">", p);
+  return 1;
+}
+
+SCM
+Music_output_def::get_scmvar (String s) const
+{
+  return lookup_variable (ly_symbol2scm (s.to_str0 ()));
+}
+
+void
+Music_output_def::set_variable (SCM sym, SCM val)
+{
+  scm_module_define (scope_, sym, val);
+}
+
+SCM
+Music_output_def::lookup_variable (SCM sym) const
+{
+  SCM var = ly_module_lookup (scope_, sym);
+
+  return scm_variable_ref (var);
+}
+
+LY_DEFINE (ly_paper_lookup, "ly:paper-lookup",
+          2, 0,0, (SCM pap, SCM sym),
+          "Lookup @var{sym} in @var{pap}. "
+          "Return the value or @code{'()} if undefined.")
+{
+  Music_output_def *op = unsmob_music_output_def (pap);
+  SCM_ASSERT_TYPE (op, pap, SCM_ARG1, __FUNCTION__, "Paper");
+  SCM_ASSERT_TYPE (gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+
+  SCM var = ly_module_lookup (op->scope_, sym);
+  if (SCM_VARIABLEP (var))
+    return SCM_VARIABLE_REF (var);
+  else
+    return SCM_EOL;
+}
+
+LY_DEFINE (ly_output_def_scope, "ly:output-def-scope",
+          1, 0,0, (SCM def),
+          "Get the variable scope inside @var{def}.")
+{
+  Music_output_def *op = unsmob_music_output_def (def);
+  SCM_ASSERT_TYPE (op, def, SCM_ARG1, __FUNCTION__, "Output definition");
+  return op->scope_;
+}
+
+LY_DEFINE (ly_output_def_clone, "ly:output-def-clone",
+          1, 0, 0, (SCM def),
+          "Clone @var{def}.")
+{
+  Music_output_def *op = unsmob_music_output_def (def);
+  SCM_ASSERT_TYPE (op, def, SCM_ARG1, __FUNCTION__, "Output definition");
+  SCM s = op->clone ()->self_scm ();
+  scm_gc_unprotect_object (s);
+  return s;
+}
+
index 90b5258f1dc915a52b1d77d5dd0d5fa8c30e4fd7..ad7333c104712b490c5305ce6a8fbaf727b1f5e3 100644 (file)
@@ -24,7 +24,7 @@ void
 Music_sequence::append_music (Music *m)
 {
   set_property ("elements",
-                   ly_append2 (music_list (), scm_cons (m->self_scm (), SCM_EOL)));
+                   gh_append2 (music_list (), gh_cons (m->self_scm (), SCM_EOL)));
   scm_gc_unprotect_object (m->self_scm ());
 }
 
@@ -36,7 +36,7 @@ Music_sequence::Music_sequence ( )
 void
 transpose_music_list (SCM l,  Pitch rq)
 {
-  for (SCM s = l; ly_c_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; gh_pair_p (s);  s = ly_cdr (s))
     unsmob_music (ly_car (s))->transpose (rq);    
 }
 
@@ -46,7 +46,7 @@ Music_sequence::cumulative_length (SCM l)
   Moment cumulative;
   Moment last_len; 
 
-  for (SCM s = l; ly_c_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; gh_pair_p (s);  s = ly_cdr (s))
     {
       Moment l = unsmob_music (ly_car (s))->get_length ();
       if (last_len.grace_part_ && l.main_part_)
@@ -67,7 +67,7 @@ Moment
 Music_sequence::maximum_length (SCM l)
 {
   Moment dur = 0;
-  for (SCM s = l; ly_c_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; gh_pair_p (s);  s = ly_cdr (s))
     {
       Music * m = unsmob_music (ly_car (s));
       Moment l = m->get_length ();
@@ -84,7 +84,7 @@ music_list_to_relative (SCM l,Pitch p, bool ret_first)
   int count=0;
 
   Pitch last = p;
-  for (SCM s = l; ly_c_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; gh_pair_p (s);  s = ly_cdr (s))
     {
       if (Music *m = unsmob_music (ly_car (s)))
        {
@@ -101,7 +101,7 @@ music_list_to_relative (SCM l,Pitch p, bool ret_first)
 void
 compress_music_list (SCM l, Moment m)
 {
-  for (SCM s = l; ly_c_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; gh_pair_p (s);  s = ly_cdr (s))
     unsmob_music (ly_car (s))->compress (m);
 }
 
@@ -112,7 +112,7 @@ Music_sequence::minimum_start (SCM l)
 {
   Moment m;
   
-  for (SCM s = l; ly_c_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; gh_pair_p (s);  s = ly_cdr (s))
     {
       m = m <? unsmob_music (ly_car (s))->start_mom ();
     }
@@ -124,7 +124,7 @@ Music_sequence::first_start (SCM l)
 {
   Moment m;
   
-  for (SCM s = l; ly_c_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = l; gh_pair_p (s);  s = ly_cdr (s))
     {
       Music * mus = unsmob_music (ly_car (s));
       Moment l = mus->get_length ();
index 3eac65aec6f4688469611208c0d78cd1754ae089..b13d7fac608c3b63924d8fce5f367998acb3e28a 100644 (file)
@@ -8,10 +8,11 @@
  */
 
 
-
 #include "music-wrapper.hh"
 
 
+
+
 Music_wrapper::Music_wrapper ()
   : Music ()
 {
index 4d882ba98339d42d9b2237309a6bbbb94bd11f4c..cfe947119575bc388f557a6335c7101ac7fa3799 100644 (file)
@@ -6,14 +6,14 @@
   (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#include "input-smob.hh"
-#include "ly-smobs.icc"
 #include "main.hh"
-#include "music-list.hh"
+#include "input-smob.hh"
 #include "music.hh"
-#include "pitch.hh"
-#include "score.hh"
+#include "music-list.hh"
 #include "warn.hh"
+#include "pitch.hh"
+#include "ly-smobs.icc"
+#include "main.hh"
 
 
 bool
@@ -28,7 +28,7 @@ String
 Music::name () const
 {
   SCM nm = get_property ("name");
-  if (ly_c_symbol_p (nm))
+  if (gh_symbol_p (nm))
     {
       return ly_symbol2string (nm);
     }
@@ -87,9 +87,9 @@ Music::get_length () const
   SCM lst = get_property ("length");
   if (unsmob_moment (lst))
     return *unsmob_moment (lst);
-  else if (ly_c_procedure_p (lst))
+  else if (gh_procedure_p (lst))
     {
-      SCM res = scm_call_1 (lst, self_scm ());
+      SCM res = gh_call1 (lst, self_scm ());
       return *unsmob_moment (res);
     }
 
@@ -100,9 +100,9 @@ Moment
 Music::start_mom () const
 {
   SCM lst = get_property ("start-moment-function");
-  if (ly_c_procedure_p (lst))
+  if (gh_procedure_p (lst))
     {
-      SCM res = scm_call_1 (lst, self_scm ());
+      SCM res = gh_call1 (lst, self_scm ());
       return *unsmob_moment (res);
     }
 
@@ -114,7 +114,7 @@ void
 print_alist (SCM a, SCM port)
 {
   /* SCM_EOL  -> catch malformed lists.  */
-  for (SCM s = a; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = a; gh_pair_p (s); s = ly_cdr (s))
     {
       scm_display (ly_caar (s), port);
       scm_puts (" = ", port);
@@ -130,7 +130,7 @@ Music::print_smob (SCM s, SCM p, scm_print_state*)
   Music* m = unsmob_music (s);
 
   SCM nm = m->get_property ("name");
-  if (ly_c_symbol_p (nm) || ly_c_string_p (nm))
+  if (gh_symbol_p (nm) || gh_string_p (nm))
     scm_display (nm, p);
   else
     scm_puts (classname (m),p);
@@ -215,18 +215,6 @@ Music::origin () const
   return ip ? ip : & dummy_input_global;
 }
 
-
-Music*
-make_music_by_name (SCM sym)
-{
-  SCM make_music_proc = ly_scheme_function ("make-music");
-  SCM rv = scm_call_1 (make_music_proc, sym);
-
-  /* UGH. */
-  scm_gc_protect_object (rv);
-  return unsmob_music (rv);
-}
-
 LY_DEFINE (ly_music_length, "ly:music-length",
           1, 0, 0, (SCM mus),
          "Get the length of music expression @var{mus}, and return as a @code{Moment} object.")
@@ -243,7 +231,7 @@ LY_DEFINE (ly_music_property,
 {
   Music * sc = unsmob_music (mus);
   SCM_ASSERT_TYPE (sc, mus, SCM_ARG1, __FUNCTION__, "music");
-  SCM_ASSERT_TYPE (ly_c_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
 
   return sc->internal_get_property (sym);
 }
@@ -254,7 +242,7 @@ LY_DEFINE (ly_music_set_property, "ly:music-set-property!",
 {
   Music * sc = unsmob_music (mus);
   SCM_ASSERT_TYPE (sc, mus, SCM_ARG1, __FUNCTION__, "music");
-  SCM_ASSERT_TYPE (ly_c_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
 
   bool ok = type_check_assignment (sym, val, ly_symbol2scm ("music-type?"));
   if (ok)
@@ -287,7 +275,7 @@ LY_DEFINE (ly_extended_make_music, "ly:make-bare-music",
          "for creating music objects. "
          )
 {
-  SCM_ASSERT_TYPE (ly_c_string_p (type), type, SCM_ARG1, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (gh_string_p (type), type, SCM_ARG1, __FUNCTION__, "string");
   SCM s = make_music (ly_scm2string (type))->self_scm ();
   unsmob_music (s)->immutable_property_alist_ = props;
   scm_gc_unprotect_object (s);
@@ -313,11 +301,11 @@ LY_DEFINE (ly_music_list_p,"ly:music-list?",
           "of music objects.")
 {
   if (scm_list_p (lst) == SCM_BOOL_T)
-    while (ly_c_pair_p (lst))
+    while (gh_pair_p (lst))
       {
-       if (!unsmob_music (ly_car (lst)))
+       if (!unsmob_music (gh_car (lst)))
          return SCM_BOOL_F;
-       lst = ly_cdr (lst);
+       lst = gh_cdr (lst);
       }
 
   return SCM_BOOL_T;
@@ -333,8 +321,8 @@ LY_DEFINE (ly_deep_mus_copy, "ly:music-deep-copy",
       copy = unsmob_music (m)->clone ()->self_scm ();
       scm_gc_unprotect_object (copy);
     }
-  else if (ly_c_pair_p (m))
-    copy = scm_cons (ly_deep_mus_copy (ly_car (m)),
+  else if (gh_pair_p (m))
+    copy = gh_cons (ly_deep_mus_copy (ly_car (m)),
                    ly_deep_mus_copy (ly_cdr (m)));
   return copy;
 }
@@ -371,22 +359,14 @@ LY_DEFINE (ly_music_compress, "ly:music-compress",
   return sc->self_scm ();
 }
 
-LY_DEFINE (ly_music_scorify, "ly:music-scorify",
-          1, 0, 0,
-          (SCM music),
-          "Return MUSIC encapsulated in SCORE.")
+Music*
+make_music_by_name (SCM sym)
 {
-#if 0
-  SCM_ASSERT_TYPE (ly_c_music_p (music), music, SCM_ARG1, __FUNCTION__, "music");
-#endif
-  Score *score = new Score;
-  
-  /* URG? */
-  SCM check_funcs = ly_scheme_function ("toplevel-music-functions");
-  for (; ly_c_pair_p (check_funcs); check_funcs = ly_cdr (check_funcs))
-    music = scm_call_1 (ly_car (check_funcs), music);
-  
-  score->music_ = music;
-  scm_gc_unprotect_object (score->self_scm ());
-  return score->self_scm ();
+  SCM make_music_proc = ly_scheme_function ("make-music");
+  SCM rv = scm_call_1 (make_music_proc, sym);
+
+  /* UGH. */
+  scm_gc_protect_object (rv);
+  return unsmob_music (rv);
 }
+
index 6accfaa91d9019604ac3716c1568ae6d18324c1e..c36b546c8640d5c948750e1c4d4727c27bac0236 100644 (file)
@@ -12,6 +12,7 @@
 #include "lily-proto.hh"
 #include "scm-hash.hh"
 #include "interval.hh"
+#include "input-file-results.hh"
 #include "lily-guile.hh"
 #include "parser.hh"
 #include "keyword.hh"
 #include "ly-module.hh"
 
 
-static Keyword_ent the_key_tab[] = {
+static Keyword_ent the_key_tab[]={
+  {"acciaccatura", ACCIACCATURA},
   {"accepts", ACCEPTS},
+  {"addlyrics", ADDLYRICS},
   {"addquote", ADDQUOTE},
   {"alias", ALIAS},
   {"alternative", ALTERNATIVE},
+  {"apply", APPLY},
+  {"applycontext", APPLYCONTEXT},
+  {"applyoutput", APPLYOUTPUT},
+  {"appoggiatura", APPOGGIATURA},
+  {"autochange", AUTOCHANGE},
   {"bar", BAR},
-  {"book", BOOK},
-  {"bookpaper", BOOKPAPER},
+  {"breathe", BREATHE},
   {"change", CHANGE},
   {"chords", CHORDS},
   {"clef", CLEF},
@@ -43,22 +50,23 @@ static Keyword_ent the_key_tab[] = {
   {"drums", DRUMS},
   {"description", DESCRIPTION},
   {"figures",FIGURES},
+  {"grace", GRACE},
   {"grobdescriptions", GROBDESCRIPTIONS},
   {"header", HEADER},
   {"key", KEY},
   {"lyrics", LYRICS},
-  {"lyricsto", LYRICSTO},
+  {"lyricsto", NEWADDLYRICS},
   {"mark", MARK},
   {"markup", MARKUP},
   {"midi", MIDI},
   {"name", NAME},
   {"new", NEWCONTEXT},
-  {"newlyrics", NEWLYRICS},
   {"notes", NOTES},
   {"octave", OCTAVE},
   {"once", ONCE},
   {"override", OVERRIDE},
   {"paper", PAPER},
+  {"partcombine", PARTCOMBINE},
   {"partial", PARTIAL},
   {"quote", QUOTE},
   {"relative", RELATIVE},
@@ -80,67 +88,52 @@ static Keyword_ent the_key_tab[] = {
   {"type", TYPE},
   {"unset", UNSET},
   {"with", WITH},
-  {0, 0}
+  {0,0}
 };
 
 
-My_lily_lexer::My_lily_lexer (Sources *sources)
+My_lily_lexer::My_lily_lexer ()
 {
   keytable_ = new Keyword_table (the_key_tab);
-  encoding_ = SCM_EOL;
-  chordmodifier_tab_ = scm_make_vector (scm_int2num (1), SCM_EOL);
+
+  chordmodifier_tab_ = scm_make_vector (gh_int2scm (1), SCM_EOL);
   pitchname_tab_stack_ = SCM_EOL; 
-  sources_ = sources;
+  
   scopes_ = SCM_EOL;
-  error_level_ = 0; 
-  main_input_b_ = false;
   
-  add_scope (ly_make_anonymous_module (false));
-}
-
-My_lily_lexer::My_lily_lexer (My_lily_lexer const &src)
-  : Includable_lexer ()
-{
-  keytable_ = new Keyword_table (*src.keytable_);
-  encoding_ = src.encoding_;
-  chordmodifier_tab_ = src.chordmodifier_tab_;
-  pitchname_tab_stack_ = src.pitchname_tab_stack_;
-  sources_ = src.sources_;
-  scopes_ = src.scopes_;
-  error_level_ = src.error_level_; 
-  main_input_b_ = src.main_input_b_;
-}
-
-My_lily_lexer::~My_lily_lexer ()
-{
-  delete keytable_;
-}
+  add_scope (ly_make_anonymous_module ());
+  errorlevel_ =0; 
 
-SCM
-My_lily_lexer::encoding () const
-{
-  return encoding_ ;
+  main_input_b_ = false;
 }
 
-
 void
 My_lily_lexer::add_scope (SCM module)
 {
   ly_reexport_module (scm_current_module ());
   scm_set_current_module (module);
-  for (SCM s = scopes_; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = scopes_; gh_pair_p (s); s = gh_cdr (s))
     {
-      ly_use_module (module, ly_car (s));
+      /*
+       UGH. how to do this more neatly? 
+      */      
+      SCM expr = scm_list_n (ly_symbol2scm ("module-use!"),
+                            module, scm_list_n (ly_symbol2scm ("module-public-interface"),
+                                                gh_car (s), SCM_UNDEFINED),
+                            SCM_UNDEFINED);
+      
+      scm_primitive_eval (expr);
     }
+  
   scopes_ = scm_cons (module, scopes_);
 }
 
 SCM
 My_lily_lexer::remove_scope ()
 {
-  SCM sc = ly_car (scopes_);
-  scopes_ = ly_cdr (scopes_);
-  scm_set_current_module (ly_car (scopes_));
+  SCM sc = gh_car (scopes_);
+  scopes_ = gh_cdr (scopes_);
+  scm_set_current_module (gh_car (scopes_));
 
   return sc;
 }
@@ -153,11 +146,12 @@ My_lily_lexer::lookup_keyword (String s)
 }
 
 SCM
-My_lily_lexer::lookup_identifier_symbol (SCM sym)
+My_lily_lexer::lookup_identifier (String s)
 {
-  for (SCM s = scopes_; ly_c_pair_p (s); s = ly_cdr (s))
+  SCM sym = ly_symbol2scm (s.to_str0());
+  for (SCM s = scopes_; gh_pair_p (s); s = gh_cdr (s))
     {
-      SCM var = ly_module_lookup (ly_car (s), sym);
+      SCM var = ly_module_lookup (gh_car (s), sym);
       if (var != SCM_BOOL_F)
        return scm_variable_ref (var);
     }
@@ -165,21 +159,16 @@ My_lily_lexer::lookup_identifier_symbol (SCM sym)
   return SCM_UNDEFINED;
 }
 
-SCM
-My_lily_lexer::lookup_identifier (String name)
-{
-  return lookup_identifier_symbol (ly_symbol2scm (name.to_str0 ()));
-}
-
 void
 My_lily_lexer::start_main_input ()
 {
   // yy_flex_debug = 1;
-  new_input (main_input_name_, sources_);
+
+  new_input (main_input_name_, &global_input_file->sources_);
   /* Do not allow \include in --safe-mode */
-  allow_includes_b_ = allow_includes_b_ && !safe_global_b;
+  allow_includes_b_ = allow_includes_b_ && ! safe_global_b;
 
-  scm_module_define (ly_car (scopes_),
+  scm_module_define (gh_car (scopes_),
                     ly_symbol2scm ("input-file-name"),
                     scm_makfrom0str (main_input_name_.to_str0 ()));
 }
@@ -187,26 +176,25 @@ My_lily_lexer::start_main_input ()
 void
 My_lily_lexer::set_identifier (SCM name, SCM s)
 {
-  SCM sym = name;
-  if (ly_c_string_p (name))
-    sym =  scm_string_to_symbol (name);
+  assert (gh_string_p (name));
   
-  if (ly_c_symbol_p (sym))
+  if (lookup_keyword (ly_scm2string (name)) >= 0)
     {
-      if (lookup_keyword (ly_symbol2string (sym)) >= 0)
-       {
-         warning (_f ("Identifier name is a keyword: `%s'", SCM_SYMBOL_CHARS (sym)));
-       }
+      size_t sz;
+      char * str = gh_scm2newstr (name, &sz) ;
+      warning (_f ("Identifier name is a keyword: `%s'", str));
+      free  (str);
+    }
 
-      SCM mod = ly_car (scopes_);
+  SCM sym = scm_string_to_symbol (name);
+  SCM mod = gh_car (scopes_);
 
-      scm_module_define (mod, sym, s);
-    }
-  
-  else
-    {
-      programming_error ("Identifier is not a symbol.");
-    }
+  scm_module_define (mod, sym, s);
+}
+
+My_lily_lexer::~My_lily_lexer ()
+{
+  delete keytable_;
 }
 
 
@@ -215,10 +203,12 @@ void
 My_lily_lexer::LexerError (char const *s)
 {
   if (include_stack_.is_empty ())
-    progress_indication (_f ("error at EOF: %s", s) + String ("\n"));
+    {
+      progress_indication (_f ("error at EOF: %s", s)+ String ("\n"));
+    }
   else
     {
-      error_level_ |= 1;
+      errorlevel_ |= 1;
       Input spot (get_source_file (), here_str0 ());
       spot.error (s);
     }
@@ -254,12 +244,3 @@ My_lily_lexer::prepare_for_next_token ()
 {
   last_input_ = here_input ();
 }
-
-void
-My_lily_lexer::set_encoding (String s)
-{
-  if (s.length ())
-    encoding_ = ly_symbol2scm (s.to_str0 ());
-  else
-    encoding_ = SCM_EOL;
-}
index bd8939af9d5bca92d663060794895f8646853ac0..c87b1416ef3228f278a483d91ec62764120856e6 100644 (file)
@@ -7,93 +7,46 @@
        Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
-#include "book.hh"
-#include "file-name.hh"
-#include "file-path.hh"
-#include "lily-version.hh"
-#include "ly-module.hh"
-#include "main.hh"
-#include "my-lily-lexer.hh"
 #include "my-lily-parser.hh"
-#include "output-def.hh"
-#include "paper-book.hh"
-#include "parser.hh"
-#include "score.hh"
-#include "source.hh"
+#include "my-lily-lexer.hh"
 #include "warn.hh"
+#include "main.hh"
+#include "parser.hh"
+#include "input-file-results.hh"
+#include "scm-hash.hh"
 
-
-My_lily_parser::My_lily_parser (Sources *sources)
+My_lily_parser::My_lily_parser (Input_file_results * source)
 {
-  book_count_ = 0;
-  score_count_ = 0;
+  input_file_ = source;
   lexer_ = 0;
-  sources_ = sources;
   default_duration_ = Duration (2,0);
   error_level_ = 0;
   last_beam_start_ = SCM_EOL;
 
-  smobify_self ();
-}
-
-My_lily_parser::My_lily_parser (My_lily_parser const &src)
-{
-  book_count_ = src.book_count_;
-  score_count_ = src.score_count_;
-  lexer_ = 0;
-  sources_ = src.sources_;
-  default_duration_ = src.default_duration_;
-  error_level_ = src.error_level_;
-  last_beam_start_ = src.last_beam_start_;
-
-  smobify_self ();
-  lexer_ = new My_lily_lexer (*src.lexer_);
+  default_header_ =0;
 }
 
 My_lily_parser::~My_lily_parser ()
 {
-  // FIXME: Memleak: del lexer
-}
-
-#include "ly-smobs.icc"
-
-IMPLEMENT_SMOBS (My_lily_parser);
-IMPLEMENT_TYPE_P (My_lily_parser, "ly:my-lily-parser?");
-IMPLEMENT_DEFAULT_EQUAL_P (My_lily_parser);
-
-SCM
-My_lily_parser::mark_smob (SCM s)
-{
-  My_lily_parser *parser = (My_lily_parser*) ly_cdr (s);
-  (void) parser;
-  return SCM_EOL;
-}
-
-int
-My_lily_parser::print_smob (SCM s, SCM port, scm_print_state*)
-{
-  scm_puts ("#<my_lily_parser ", port);
-  My_lily_parser *parser = (My_lily_parser*) ly_cdr (s);
-  (void) parser;
-  scm_puts (" >", port);
-  return 1;
+  delete lexer_;
+  if (default_header_)
+    scm_gc_unprotect_object (default_header_->self_scm ());
 }
 
-
 /* Process one .ly file, or book.  */
 void
-My_lily_parser::parse_file (String init, String name, String out_name)
+My_lily_parser::parse_file (String init, String in_file, String out_file)
 {
-  lexer_ = new My_lily_lexer (sources_);
-  output_basename_ = out_name;
+  lexer_ = new My_lily_lexer;
+  output_basename_ = out_file;
   
-  lexer_->main_input_name_ = name;
+  lexer_->main_input_name_ = in_file;
 
   progress_indication (_ ("Parsing..."));
   progress_indication ("\n");
 
   set_yydebug (0);
-  lexer_->new_input (init, sources_);
+  lexer_->new_input (init, &input_file_->sources_);
 
   /* Read .ly IN_FILE, lex, parse, write \score blocks from IN_FILE to
      OUT_FILE (unless IN_FILE redefines output file name).  */
@@ -105,47 +58,9 @@ My_lily_parser::parse_file (String init, String name, String out_name)
       error_level_ = 1;
     }
 
-  error_level_ = error_level_ | lexer_->error_level_;
-  delete lexer_;
-  lexer_ = 0;
-}
+  input_file_->inclusion_names_ = lexer_->filename_strings_;
 
-void
-My_lily_parser::parse_string (String ly_code)
-{
-  My_lily_lexer *parent = lexer_;
-  lexer_ = (parent == 0 ? new My_lily_lexer (sources_)
-           : new My_lily_lexer (*parent));
-
-  lexer_->main_input_name_ = "<string>";
-  lexer_->main_input_b_ = true;
-
-  set_yydebug (0);
-  lexer_->new_input (lexer_->main_input_name_, ly_code, sources_);
-  do_yyparse ();
-  
-  if (!define_spots_.is_empty ())
-    {
-      define_spots_.top ().warning (_ ("Braces don't match"));
-      error_level_ = 1;
-    }
-
-  error_level_ = error_level_ | lexer_->error_level_;
-
-  if (parent != 0)
-    {
-      parent->keytable_ = lexer_->keytable_;
-      parent->encoding_ = lexer_->encoding_;
-      parent->chordmodifier_tab_ = lexer_->chordmodifier_tab_;
-      parent->pitchname_tab_stack_ = lexer_->pitchname_tab_stack_;
-      parent->sources_ = lexer_->sources_;
-      parent->scopes_ = lexer_->scopes_;
-      parent->error_level_ = lexer_->error_level_; 
-      parent->main_input_b_ = lexer_->main_input_b_;
-    }
-
-  delete lexer_;
-  lexer_ = 0;
+  error_level_ = error_level_ | lexer_->errorlevel_; // ugh naming.
 }
 
 void
@@ -165,8 +80,11 @@ My_lily_parser::parser_error (String s)
 {
   here_input ().error (s);
   error_level_ = 1;
+  exit_status_global = 1;
 }
 
+
+
 Input
 My_lily_parser::pop_spot ()
 {
@@ -179,15 +97,14 @@ My_lily_parser::here_input () const
   /*
     Parsing looks ahead , so we really want the previous location of the
     lexer, not lexer_->here_input ().
-  */
-  
+   */
   /*
     Actually, that gets very icky when there are white space, because
     the line-numbers are all wrong.  Let's try the character before
-    the current token. That gets the right result for note/duration
-    stuff, but doesn't mess up for errors in the 1st token of the
-    line.
-  */
+    the current token. That gets the right result for
+    note/duration stuff, but doesn't mess up for errors in the 1st token of the line. 
+    
+   */
   Input hi (lexer_->here_input ());
 
   char const * bla = hi.defined_str0_;
@@ -198,301 +115,29 @@ My_lily_parser::here_input () const
   return Input (hi.source_file_, bla);
 }
 
+#include "paper-def.hh"
+#include "context-def.hh"
 
-/****************************************************************/
-
-
-/*
-  junkme?
- */
-bool store_locations_global_b;
-
-/* Do not append `!' suffix, since 1st argument is not modified. */
-LY_DEFINE (ly_set_point_and_click, "ly:set-point-and-click",
-          1, 0, 0, (SCM what),
-         "Set the options for Point-and-click source specials output. The\n"
-"argument is a symbol.  Possible options are @code{none} (no source specials),\n"
-"@code{line} and @code{line-column}")
-{
-  /* UGH. */
-  SCM val = SCM_BOOL_F;
-  if (ly_symbol2scm ("line-column") == what)
-    val = ly_scheme_function ("line-column-location");
-  else if (what == ly_symbol2scm ("line"))
-    val = ly_scheme_function ("line-location");
-
-  scm_module_define (global_lily_module, ly_symbol2scm ("point-and-click"),
-                    val);
-  store_locations_global_b = ly_c_procedure_p (val);
-  return SCM_UNSPECIFIED;
-}
-
-LY_DEFINE (ly_parse_file, "ly:parse-file",
-          1, 0, 0, (SCM name),
-          "Parse a single @code{.ly} file.  "
-          "Upon failure, throw @code{ly-file-failed} key.")
-{
-  SCM_ASSERT_TYPE (ly_c_string_p (name), name, SCM_ARG1, __FUNCTION__, "string");
-  char const *file = SCM_STRING_CHARS (name);
-  char const *extensions[] = {"ly", "", 0};
-  String file_name = global_path.find (file, extensions);
-  
-  /* By default, use base name of input file for output file name,
-     write output to cwd; do not use root and directory parts of input
-     file name.  */
-  File_name out_file_name (file_name);
-  out_file_name.ext_ = "";
-  out_file_name.root_ = "";
-  out_file_name.dir_ = "";
-
-  if (!output_name_global.is_empty ())
-    out_file_name = File_name (output_name_global);
-  
-  String init;
-  if (!init_name_global.is_empty ())
-    init = init_name_global;
-  else
-    init = "init.ly";
-
-  String out_file = out_file_name.to_string ();
-
-  if (init.length () && global_path.find (init).is_empty ())
-    {
-      warning (_f ("can't find init file: `%s'", init));
-      warning (_f ("(search path: `%s')",
-                  global_path.to_string ().to_str0 ()));
-      exit (2);
-    }
-
-  if ((file_name != "-") && global_path.find (file_name).is_empty ())
-    {
-      warning (_f ("can't find file: `%s'", file_name));
-      scm_throw (ly_symbol2scm ("ly-file-failed"),
-                scm_list_1 (scm_makfrom0str (file_name.to_str0 ())));
-    }
-  else
-    {
-      Sources sources;
-      sources.set_path (&global_path);
-  
-      progress_indication (_f ("Now processing `%s'", file_name.to_str0 ()));
-      progress_indication ("\n");
-
-      My_lily_parser *parser = new My_lily_parser (&sources);
-
-      // TODO: use $parser 
-      scm_module_define (global_lily_module, ly_symbol2scm ("parser"),
-                        parser->self_scm ());
-      parser->parse_file (init, file_name, out_file);
-
-      bool error = parser->error_level_;
-      parser = 0;
-      if (error)
-       /* TODO: pass renamed input file too.  */
-       scm_throw (ly_symbol2scm ("ly-file-failed"),
-                  scm_list_1 (scm_makfrom0str (file_name.to_str0 ())));
-    }
-  return SCM_UNSPECIFIED;
-}
-
-LY_DEFINE (ly_parse_string, "ly:parse-string",
-          1, 0, 0, (SCM ly_code),
-          "Parse the string LY_CODE.  "
-          "Upon failure, throw @code{ly-file-failed} key.")
-{
-  SCM_ASSERT_TYPE (ly_c_string_p (ly_code), ly_code, SCM_ARG1, __FUNCTION__, "string");
-  
-  Sources sources;
-  sources.set_path (&global_path);
-  My_lily_parser *parser = new My_lily_parser (&sources);
-  scm_module_define (global_lily_module, ly_symbol2scm ("parser"),
-                    parser->self_scm ());
-  parser->parse_string (ly_scm2string (ly_code));
-  parser = 0;
-  
-  return SCM_UNSPECIFIED;
-}
-
-LY_DEFINE (ly_clone_parser, "ly:clone-parser",
-           1, 0, 0, (SCM parser_smob),
-           "Return a clone of PARSER_SMOB.")
-{
-  My_lily_parser *parser = unsmob_my_lily_parser (parser_smob);
-  My_lily_parser *clone = new My_lily_parser (*parser);
-
-  /* FIXME: should copy scopes too. */
-  return scm_gc_unprotect_object (clone->self_scm ());
-}
-
-LY_DEFINE (ly_parser_define, "ly:parser-define",
-          3, 0, 0, (SCM parser_smob, SCM symbol, SCM val),
-          "Bind SYMBOL to VAL in PARSER_SMOB's module.")
-{
-  My_lily_parser *parser = unsmob_my_lily_parser (parser_smob);
-  SCM_ASSERT_TYPE (ly_c_symbol_p (symbol), symbol, SCM_ARG2, __FUNCTION__, "symbol");
-  SCM_ASSERT_TYPE (parser, parser_smob, SCM_ARG2, __FUNCTION__, "parser");  
-
+My_lily_parser * current_parser;
 
-  parser->lexer_->set_identifier (scm_symbol_to_string (symbol), val);
-  return SCM_UNSPECIFIED;
-}
-
-LY_DEFINE (ly_parser_lookup, "ly:parser-lookup",
-          2, 0, 0, (SCM parser_smob, SCM symbol),
-          "Lookup @var{symbol} in @var{parser_smob}'s module.  "
-          "Undefined is '().")
-{
-  My_lily_parser *parser = unsmob_my_lily_parser (parser_smob);
+MAKE_SCHEME_CALLBACK (My_lily_parser,paper_description, 0);
 
-  SCM_ASSERT_TYPE (ly_c_symbol_p (symbol), symbol, SCM_ARG2, __FUNCTION__, "symbol");
-  SCM_ASSERT_TYPE (parser, parser_smob, SCM_ARG2, __FUNCTION__, "parser");  
-
-  SCM val= parser->lexer_->lookup_identifier (ly_scm2string (scm_symbol_to_string (symbol)));
-  if (val != SCM_UNDEFINED)
-    return val;
-  else
-    return SCM_EOL;
-}
-
-LY_DEFINE (ly_parser_parse_string, "ly:parser-parse-string",
-          2, 0, 0, (SCM parser_smob, SCM ly_code),
-          "Parse the string LY_CODE with PARSER_SMOB."
-          "Upon failure, throw @code{ly-file-failed} key.")
-{
-  My_lily_parser *parser = unsmob_my_lily_parser (parser_smob);
-
-  SCM_ASSERT_TYPE (parser, parser_smob, SCM_ARG1, __FUNCTION__, "parser");
-  SCM_ASSERT_TYPE (ly_c_string_p (ly_code), ly_code, SCM_ARG2, __FUNCTION__, "string");
-  
-  parser->parse_string (ly_scm2string (ly_code));
-  
-  return SCM_UNSPECIFIED;
-}
-
-Output_def*
-get_paper (My_lily_parser *parser)
-{
-  SCM id = parser->lexer_->lookup_identifier ("$defaultpaper");
-  Output_def *paper = unsmob_output_def (id);
-  paper = paper ? paper->clone () : new Output_def;
-  paper->set_variable (ly_symbol2scm ("is-paper"), SCM_BOOL_T);
-
-  paper->parent_ =unsmob_output_def (parser->lexer_->lookup_identifier ("$defaultbookpaper"));
-  return paper;
-}
-
-
-Output_def*
-get_midi (My_lily_parser *parser)
-{
-  SCM id = parser->lexer_->lookup_identifier ("$defaultmidi");
-  Output_def *paper = unsmob_output_def (id);
-  paper = paper ? paper->clone () : new Output_def;
-  paper->set_variable (ly_symbol2scm ("is-midi"), SCM_BOOL_T);
-  return paper;
-}
-
-
-Output_def*
-get_bookpaper (My_lily_parser *parser)
-{
-  SCM id = parser->lexer_->lookup_identifier ("$defaultbookpaper");
-  Output_def *paper = unsmob_output_def (id);
-
-  paper = paper ? dynamic_cast<Output_def*> (paper->clone ()) : new Output_def;
-  paper->set_variable (ly_symbol2scm ("is-bookpaper"), SCM_BOOL_T);
-  return paper;
-}
-
-
-/* TODO: move this to Scheme?  Why take the parser arg, and all the back
-   & forth between scm and c++? */
-LY_DEFINE (ly_parser_print_score, "ly:parser-print-score",
-          2, 0, 0,
-          (SCM parser_smob, SCM score_smob),
-          "Print score, i.e., the classic way.")
+SCM
+My_lily_parser::paper_description ()
 {
-  My_lily_parser *parser = unsmob_my_lily_parser (parser_smob);
-  Score *score = unsmob_score (score_smob);
-
-  SCM_ASSERT_TYPE (parser, parser_smob, SCM_ARG1, __FUNCTION__, "parser");
-  SCM_ASSERT_TYPE (score, score_smob, SCM_ARG2, __FUNCTION__, "score");
+  My_lily_parser * me = current_parser;
 
-  SCM header = ly_c_module_p (score->header_) ? score->header_
-    : parser->lexer_->lookup_identifier ("$globalheader");
-  
-  File_name outname (parser->output_basename_);
-  int *c = &parser->book_count_;
-  if (*c)
-    outname.base_ += "-" + to_string (*c);
-  (*c)++;
-
-  SCM os = scm_makfrom0str (outname.to_string ().to_str0 ());
-  SCM bookpaper = get_bookpaper (parser)->self_scm ();
-  for (int i = 0; i < score->defs_.size (); i++)
-    default_rendering (score->music_, score->defs_[i]->self_scm (),
-                      bookpaper,
-                      header, os);
+  Music_output_def *id = unsmob_music_output_def (me->lexer_->lookup_identifier ("$defaultpaper"));
+  Paper_def *p = dynamic_cast<Paper_def*> (id->clone ());
 
-  if (score->defs_.is_empty ())
+  SCM al = p->translator_tab_->to_alist ();
+  SCM l = SCM_EOL;
+  for (SCM s = al ; gh_pair_p (s); s = ly_cdr (s))
     {
-      Output_def *paper = get_paper (parser);
-      default_rendering (score->music_, paper->self_scm (),
-                        get_bookpaper (parser)->self_scm (),
-                        header, os);
-      scm_gc_unprotect_object (paper->self_scm ());
+      Context_def * td = unsmob_context_def (ly_cdar (s));
+      l = gh_cons (gh_cons (ly_caar (s), td->to_alist ()),  l);
     }
-  return SCM_UNSPECIFIED;
+  return l;  
 }
-
-
-LY_DEFINE (ly_parser_set_note_names, "ly:parser-set-note-names",
-          2, 0, 0, (SCM parser, SCM names),
-          "Replace current note names in @var{parser}. "
-          "@var{names} is an alist of symbols.  "
-          "This only has effect if the current mode is notes.")
-{
-  My_lily_parser *p = unsmob_my_lily_parser (parser);
-  SCM_ASSERT_TYPE(p, parser, SCM_ARG1, __FUNCTION__, "Lilypond parser");
-
-  if (p->lexer_->is_note_state ())
-    {
-      p->lexer_->pop_state ();
-      p->lexer_->push_note_state (alist_to_hashq (names));
-    }
-
-  return SCM_UNSPECIFIED;
-}
-
-LY_DEFINE (ly_parser_print_book, "ly:parser-print-book",
-          2, 0, 0, (SCM parser_smob, SCM book_smob),
-          "Print book.")
-{
-  My_lily_parser *parser = unsmob_my_lily_parser (parser_smob);
-  Book *book = unsmob_book (book_smob);
-  Output_def *bp = unsmob_output_def (parser->lexer_->lookup_identifier ("$defaultbookpaper"));
   
-  SCM_ASSERT_TYPE (parser, parser_smob, SCM_ARG1, __FUNCTION__, "Lilypond parser");
-  SCM_ASSERT_TYPE (book, book_smob, SCM_ARG2, __FUNCTION__, "Book");
-  
-  /*  ugh. changing argument.*/
-  book->bookpaper_ = bp;
-  
-  File_name outname (parser->output_basename_);
-  int *c = &parser->book_count_;
-  if (*c)
-    outname.base_ += "-" + to_string (*c);
-  (*c)++;
-
-  Output_def *paper = get_paper (parser);
-
-  Paper_book* pb = book->process (outname.to_string (), paper);
-
-  pb->output (outname.to_string ());
-  
-  scm_gc_unprotect_object (paper->self_scm ());
-  scm_gc_unprotect_object (pb->self_scm ());
-
-  return SCM_UNSPECIFIED;
-}
 
index c9a359e9a4427d64c51b6ae98de10b6bc63032ee..7f21e6a954070900800d3e433c7ecadbfd2ef617 100644 (file)
@@ -67,9 +67,9 @@ New_fingering_engraver::acknowledge_grob (Grob_info inf)
 
       SCM arts = note_ev->get_property ("articulations");
 
-      for (SCM s = arts; ly_c_pair_p (s); s = ly_cdr  (s))
+      for (SCM s = arts; gh_pair_p (s); s = gh_cdr  (s))
        {
-         Music * m = unsmob_music (ly_car (s));
+         Music * m = unsmob_music (gh_car (s));
 
          if (!m)
            continue;
@@ -111,14 +111,15 @@ New_fingering_engraver::add_script (Grob * head,
 {
   Finger_tuple ft ;
 
-  Grob * g=  make_item ("Script", event->self_scm () );
-  make_script_from_event (g, &ft.description_, context (),
+  Grob * g=  make_item ("Script");
+  make_script_from_event (g, &ft.description_, daddy_context_,
                          event->get_property ("articulation-type"), 0);
   if (g)
     {
       ft.script_ =g ;
       
       articulations_.push (ft);
+      announce_grob (g, event->self_scm ());
  
       ft.script_->set_parent (head, X_AXIS);
     }
@@ -132,11 +133,12 @@ New_fingering_engraver::add_fingering (Grob * head,
 {
   Finger_tuple ft;
 
-  ft.script_ = make_item ("Fingering", event->self_scm () );
+  ft.script_ = make_item ("Fingering");
+  announce_grob (ft.script_, event->self_scm ());
   
   Side_position_interface::add_support (ft.script_, head);
 
-  int d = ly_scm2int (event->get_property ("digit"));
+  int d = gh_scm2int (event->get_property ("digit"));
   
   /*
     TODO:
@@ -152,7 +154,7 @@ New_fingering_engraver::add_fingering (Grob * head,
        */
       event->origin ()->warning (_("music for the martians."));
     }
-  SCM sstr = scm_number_to_string (scm_int2num (d), scm_int2num (10)) ;
+  SCM sstr = scm_number_to_string (gh_int2scm (d), gh_int2scm (10)) ;
   ft.script_->set_property ("text", sstr);
        
   ft.finger_event_ = event;
@@ -177,7 +179,7 @@ New_fingering_engraver::position_scripts ()
   */
   for (int i = 0; i < fingerings_.size (); i++)
     {      
-      fingerings_[i].position_ = ly_scm2int (fingerings_[i].head_ -> get_property ( "staff-position"));
+      fingerings_[i].position_ = gh_scm2int (fingerings_[i].head_ -> get_property ( "staff-position"));
     }
 
   for (int i = fingerings_.size (); i--;)
@@ -245,7 +247,8 @@ New_fingering_engraver::position_scripts ()
       f->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, Y_AXIS);
       f->add_offset_callback (Side_position_interface::aligned_side_proc, X_AXIS);
 
-      f->set_property ("direction", scm_int2num (hordir));
+      f->set_property ("direction", gh_int2scm (hordir));
+      typeset_grob (f);
     }
 
   int finger_prio = 200;
@@ -255,13 +258,14 @@ New_fingering_engraver::position_scripts ()
       Grob* f = ft.script_;
       f->set_parent (ft.head_, X_AXIS);
       f->set_property ("script-priority",
-                           scm_int2num (finger_prio + i));
+                           gh_int2scm (finger_prio + i));
       f->add_offset_callback (Side_position_interface::aligned_side_proc, Y_AXIS);
       f->add_offset_callback (Self_alignment_interface::centered_on_parent_proc, X_AXIS);
       f->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, X_AXIS);
       
-      f->set_property ("direction", scm_int2num (UP));
+      f->set_property ("direction", gh_int2scm (UP));
 
+      typeset_grob (f);
     }
   
   for (int i = 0; i < down.size (); i++)
@@ -270,12 +274,13 @@ New_fingering_engraver::position_scripts ()
       Grob* f = ft.script_;
       f->set_parent (ft.head_, X_AXIS);
       f->set_property ("script-priority",
-                           scm_int2num (finger_prio + down.size () - i));
+                           gh_int2scm (finger_prio + down.size () - i));
 
       f->add_offset_callback (Self_alignment_interface::centered_on_parent_proc, X_AXIS);
       f->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, X_AXIS);
       f->add_offset_callback (Side_position_interface::aligned_side_proc, Y_AXIS);
-      f->set_property ("direction", scm_int2num (DOWN));
+      f->set_property ("direction", gh_int2scm (DOWN));
+      typeset_grob (f);
     }
 }
 
@@ -299,11 +304,12 @@ New_fingering_engraver::stop_translation_timestep ()
        sc->set_property ("direction-source", stem_->self_scm ());
       
       SCM follow = scm_assoc (ly_symbol2scm ("follow-into-staff"), articulations_[i].description_);
-      if (ly_c_pair_p (follow) && to_boolean (ly_cdr (follow)))
+      if (gh_pair_p (follow) && to_boolean (gh_cdr (follow)))
        {
          sc->add_offset_callback (Side_position_interface::quantised_position_proc, Y_AXIS);
          sc->set_property ("staff-padding" , SCM_EOL);
        }
+      typeset_grob (sc);
     }
 
   stem_ = 0;
index ff658fc8fac039adb3dd52f8bc472313e699429a..fa3e340c6376b0251afa53f48ce71d0c3afed806 100644 (file)
@@ -34,7 +34,6 @@ private:
   bool start_new_syllable () ;
   void find_voice ();
 
-  bool music_found_;
   bool made_association_;
   Context * lyrics_context_;
   Context * music_context_;
@@ -50,7 +49,6 @@ static Music *melisma_playing_ev;
 
 New_lyric_combine_music_iterator::New_lyric_combine_music_iterator ()
 {
-  music_found_ = false;
   made_association_ = false;
   lyric_iter_ =0;
   music_context_ =0;
@@ -146,7 +144,7 @@ New_lyric_combine_music_iterator::construct_children ()
   
   if (lyric_iter_)
     lyrics_context_ = find_context_below (lyric_iter_->get_outlet (),
-                                         ly_symbol2scm ("Lyrics"), "");
+                                         "Lyrics", "");
 
   /*
     We do not create a Lyrics context, because the user might
@@ -162,15 +160,18 @@ New_lyric_combine_music_iterator::find_voice ()
     {
       SCM voice_name = get_music ()->get_property ("associated-context");
   
-      if (ly_c_string_p (voice_name))
+      if (gh_string_p (voice_name))
        {
          Context *t = get_outlet ();
-         while (t && t->get_parent_context ())
-           t = t->get_parent_context ();
+         while (t && t->daddy_context_)
+           t = t->daddy_context_;
 
          String name = ly_scm2string (voice_name);
-         Context *voice = find_context_below (t, ly_symbol2scm ("Voice"), name);
-         if (voice)
+         Context *voice = find_context_below (t, "Voice", name);
+         if (!voice)
+           get_music ()->origin ()->warning (_f ("cannot find Voice: %s",
+                                                 name.to_str0 ()) + "\n");
+         else
            music_context_ = voice;
            
        }
@@ -194,7 +195,7 @@ New_lyric_combine_music_iterator::process (Moment )
   if (!music_context_)
     return ;
   
-  if (!music_context_->get_parent_context ())
+  if (!music_context_->daddy_context_)
     {
       /*
        The melody has died.
@@ -211,26 +212,12 @@ New_lyric_combine_music_iterator::process (Moment )
     {
       Moment m= lyric_iter_->pending_moment ();
       lyric_iter_->process (m);
-
-      music_found_ = true; 
     }
 }
 
 void
 New_lyric_combine_music_iterator::do_quit ()
 {
-  if (!music_found_)
-    {
-      SCM voice_name = get_music ()->get_property ("associated-context");
-
-      String name;
-      if (ly_c_string_p (voice_name))
-       name = ly_scm2string (voice_name);
-
-      get_music ()->origin ()->warning (_f ("Haven't found Voice `%s'.",
-                                           name.to_str0 ()) + "\n");
-    }
-
   if (lyric_iter_)
     lyric_iter_->quit ();
 }
index 02dc5a08e691ac523be09b38ee232ceb5ee7c0b5..3da3de58c95234d1ab52efb57a5d286b631558e2 100644 (file)
@@ -13,7 +13,7 @@
 #include "note-column.hh"
 #include "note-head.hh"
 #include "rhythmic-head.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "axis-group-interface.hh"
 #include "item.hh"
 #include "stem.hh"
@@ -26,7 +26,7 @@ SCM
 Note_collision_interface::force_shift_callback (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) gh_scm2int (axis);
   assert (a == X_AXIS);
   
    me = me->get_parent (a);
@@ -37,7 +37,7 @@ Note_collision_interface::force_shift_callback (SCM element_smob, SCM axis)
       do_shifts (me);
     }
   
-  return scm_make_real (0.0);
+  return gh_double2scm (0.0);
 }
 
 
@@ -74,7 +74,7 @@ check_meshing_chords (Grob *me,
 
 
   /* Do not merge notes typeset in different style. */
-  if ( !ly_c_equal_p (nu->get_property ("style"),
+  if ( !gh_equal_p (nu->get_property ("style"),
                     nd->get_property ("style") ) )
     merge_possible = false;
   
@@ -237,7 +237,7 @@ check_meshing_chords (Grob *me,
            d->suicide ();
        }
       
-      if (wipe_ball && wipe_ball->is_live ())
+      if (wipe_ball && wipe_ball->live ())
        {
          wipe_ball->set_property ("transparent", SCM_BOOL_T);
          wipe_ball->set_property ("stencil", SCM_EOL);
@@ -302,18 +302,18 @@ Note_collision_interface::do_shifts (Grob* me)
   while (flip (&d) != UP);
   
   Link_array<Grob> done;
-  for (; ly_c_pair_p (hand); hand =ly_cdr (hand))
+  for (; gh_pair_p (hand); hand =ly_cdr (hand))
     {
       Grob * s = unsmob_grob (ly_caar (hand));
-      Real amount = ly_scm2double (ly_cdar (hand));
+      Real amount = gh_scm2double (ly_cdar (hand));
       
       s->translate_axis (amount *wid, X_AXIS);
       done.push (s);
     }
-  for (; ly_c_pair_p (autos); autos =ly_cdr (autos))
+  for (; gh_pair_p (autos); autos =ly_cdr (autos))
     {
       Grob * s = unsmob_grob (ly_caar (autos));
-      Real amount = ly_scm2double (ly_cdar (autos));
+      Real amount = gh_scm2double (ly_cdar (autos));
       
       if (!done.find (s))
        s->translate_axis (amount * wid, X_AXIS);
@@ -326,7 +326,7 @@ Note_collision_interface::get_clash_groups (Grob *me)
   Drul_array<Link_array<Grob> > clash_groups;
  
   SCM s = me->get_property ("elements");
-  for (; ly_c_pair_p (s); s = ly_cdr (s))
+  for (; gh_pair_p (s); s = ly_cdr (s))
     {
       SCM car = ly_car (s);
 
@@ -371,8 +371,8 @@ Note_collision_interface::automatic_shift (Grob *me,
          SCM sh
            = clashes[i]->get_property ("horizontal-shift");
 
-         if (ly_c_number_p (sh))
-           shift.push (ly_scm2int (sh));
+         if (gh_number_p (sh))
+           shift.push (gh_scm2int (sh));
          else
            shift.push (0);
        }
@@ -437,8 +437,8 @@ Note_collision_interface::automatic_shift (Grob *me,
   do
     {
       for (int i=0; i < clash_groups[d].size (); i++)
-       tups = scm_cons (scm_cons (clash_groups[d][i]->self_scm (),
-                                scm_make_real (offsets[d][i])),
+       tups = gh_cons (gh_cons (clash_groups[d][i]->self_scm (),
+                                gh_double2scm (offsets[d][i])),
                        tups);
     }
   while (flip (&d) != UP);
@@ -452,14 +452,14 @@ Note_collision_interface::forced_shift (Grob *me)
   SCM tups = SCM_EOL;
   
   SCM s = me->get_property ("elements");
-  for (; ly_c_pair_p (s); s = ly_cdr (s))
+  for (; gh_pair_p (s); s = ly_cdr (s))
     {
       Grob * se = unsmob_grob (ly_car (s));
 
       SCM force =  se->get_property ("force-hshift");
-      if (ly_c_number_p (force))
+      if (gh_number_p (force))
        {
-         tups = scm_cons (scm_cons (se->self_scm (), force),
+         tups = gh_cons (gh_cons (se->self_scm (), force),
                          tups);
        }
     }
index 75117699b422f16d6ccad086c2e15d8f7fc05485..d9a8ce307827d59bb63cb9a974abaeef157e6201 100644 (file)
@@ -11,7 +11,7 @@
 #include "note-column.hh"
 #include "stem.hh"
 #include "warn.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "group-interface.hh"
 #include "staff-symbol-referencer.hh"
 #include "rest.hh"
@@ -35,8 +35,8 @@ Note_column::shift_compare (Grob *const &p1, Grob *const&p2)
   SCM s1 = p1->get_property ("horizontal-shift");
   SCM s2 = p2->get_property ("horizontal-shift");
 
-  int h1 = (ly_c_number_p (s1))?  ly_scm2int (s1) :0;
-  int h2 = (ly_c_number_p (s2)) ? ly_scm2int (s2):0;
+  int h1 = (gh_number_p (s1))?  gh_scm2int (s1) :0;
+  int h2 = (gh_number_p (s2)) ? gh_scm2int (s2):0;
   return h1 - h2;
 }
 
@@ -55,7 +55,7 @@ Note_column::head_positions_interval (Grob *me)
   iv.set_empty ();
 
   SCM h = me->get_property ("note-heads");
-  for (; ly_c_pair_p (h); h = ly_cdr (h))
+  for (; gh_pair_p (h); h = ly_cdr (h))
     {
       Grob *se = unsmob_grob (ly_car (h));
       
@@ -71,7 +71,7 @@ Note_column::dir (Grob*  me)
   Grob *stem = unsmob_grob (me->get_property ("stem"));
   if (stem && Stem::has_interface (stem))
     return Stem::get_direction (stem);
-  else if (ly_c_pair_p (me->get_property ("note-heads")))
+  else if (gh_pair_p (me->get_property ("note-heads")))
     return (Direction)sign (head_positions_interval (me).center ());
 
   programming_error ("Note column without heads and stem!");
@@ -100,7 +100,7 @@ Note_column::add_head (Grob*me,Grob *h)
   bool both = false;
   if (Rest::has_interface (h))
     {
-      if (ly_c_pair_p (me->get_property ("note-heads")))
+      if (gh_pair_p (me->get_property ("note-heads")))
        both = true;
       else
        me->set_property ("rest", h->self_scm ());
@@ -126,7 +126,7 @@ void
 Note_column::translate_rests (Grob*me, int dy)
 {
   Grob * r = unsmob_grob (me->get_property ("rest"));
-  if (r && !ly_c_number_p (r->get_property ("staff-position")))
+  if (r && !gh_number_p (r->get_property ("staff-position")))
     {
       r->translate_axis (dy * Staff_symbol_referencer::staff_space (r)/2.0, Y_AXIS);
     }
@@ -158,9 +158,9 @@ Note_column::accidentals (Grob *me)
 {
   SCM heads = me->get_property ("note-heads");
   Grob * acc = 0;
-  for (;ly_c_pair_p (heads); heads =ly_cdr (heads))
+  for (;gh_pair_p (heads); heads =gh_cdr (heads))
     {
-      Grob * h = unsmob_grob (ly_car (heads));
+      Grob * h = unsmob_grob (gh_car (heads));
       acc = h ? unsmob_grob (h->get_property ("accidental-grob")) : 0;
       if (acc)
        break;
index b489af8b148fa9d18f15495646a96899b2451d1c..fee6c1e63c9c6fb4a30217b0945140519fa85e90 100644 (file)
@@ -60,9 +60,9 @@ Note_head_line_engraver::acknowledge_grob (Grob_info info)
       head_ = info.grob_;
       if (to_boolean (get_property ("followVoice")))
        {
-         Context * tr = context ();
+         Context * tr = daddy_context_;
          while (tr && !tr->is_alias (ly_symbol2scm ( "Staff")))
-           tr = tr->get_parent_context () ;
+           tr = tr->daddy_context_ ;
 
          if (tr
              && tr->is_alias (ly_symbol2scm ("Staff")) && tr != last_staff_)
@@ -87,11 +87,12 @@ Note_head_line_engraver::process_acknowledged_grobs ()
         Should probably store follow_ in line_, and suicide at some
         later point */
       if (follow_)
-       line_ = make_spanner ("VoiceFollower", head_->self_scm ());
+       line_ = make_spanner ("VoiceFollower");
          
       line_->set_bound (LEFT, last_head_);
       line_->set_bound (RIGHT, head_);
       
+      announce_grob (line_, head_->self_scm ());
 
       follow_ = false;
     }
@@ -100,7 +101,11 @@ Note_head_line_engraver::process_acknowledged_grobs ()
 void
 Note_head_line_engraver::stop_translation_timestep ()
 {
-  line_ = 0;
+  if (line_)
+    {
+      typeset_grob (line_);
+      line_ = 0;
+    }
   if (head_)
     last_head_ = head_;
   head_ = 0;
index dfe20fbf5262266d1420b7e7b14ae9c92ef5bdad..0ec06d5686e148f4bc18fac4e483afa32b48db5c 100644 (file)
@@ -19,7 +19,7 @@
 #include "rhythmic-head.hh"
 #include "staff-symbol-referencer.hh"
 #include "lookup.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 
 /*
   Note_head contains the code for printing note heads.
@@ -72,10 +72,12 @@ Note_head::brew_ledger_lines (Grob *me,
 {
   Grob *staff = Staff_symbol_referencer::get_staff_symbol (me);
   Real inter_f = Staff_symbol_referencer::staff_space (me)/2;
-  int line_count = ((abs (pos) < interspaces)
-                   ? 0
-                   : (abs (pos) - interspaces) / 2);
-  Stencil stencil;
+  int line_count = (abs (pos) < interspaces)
+    ? 0
+    : (abs (pos) - interspaces) / 2;
+  Stencil stencil = Stencil ();
+
+
   if (line_count)
     {
       Real ledgerlinethickness =
@@ -120,12 +122,12 @@ Stencil
 internal_print (Grob *me, bool with_ledgers)
 {
   SCM style  = me->get_property ("style");
-  if (!ly_c_symbol_p (style))
+  if (!gh_symbol_p (style))
     {
       return Stencil ();
     }
 
-  SCM log = scm_int2num (Note_head::get_balltype (me));
+  SCM log = gh_int2scm (Note_head::get_balltype (me));
   SCM proc = me->get_property ("glyph-name-procedure");
   SCM scm_font_char = scm_call_2 (proc, log, style);
   String font_char = "noteheads-" + ly_scm2string (scm_font_char);
@@ -230,7 +232,7 @@ Note_head::extent (SCM smob, SCM axis)
 {
   Grob *me = unsmob_grob (smob);
 
-  return ly_interval2scm (head_extent (me, (Axis) ly_scm2int (axis)));
+  return ly_interval2scm (head_extent (me, (Axis) gh_scm2int (axis)));
 }
 
 MAKE_SCHEME_CALLBACK (Note_head,brew_ez_stencil,1);
@@ -246,10 +248,10 @@ Note_head::brew_ez_stencil (SCM smob)
   SCM spitch = unsmob_music (cause)->get_property ("pitch");
   Pitch* pit =  unsmob_pitch (spitch);
 
-  SCM idx = scm_int2num (pit->get_notename ());
+  SCM idx = gh_int2scm (pit->get_notename ());
   SCM names = me->get_property ("note-names");
   SCM charstr = SCM_EOL;
-  if (ly_c_vector_p (names))
+  if (gh_vector_p (names))
     charstr = scm_vector_ref (names, idx);
   else
     {
@@ -261,8 +263,8 @@ Note_head::brew_ez_stencil (SCM smob)
   
   SCM at = scm_list_n (ly_symbol2scm ("ez-ball"),
                       charstr,
-                      scm_int2num (b),
-                      scm_int2num (1-b),
+                      gh_int2scm (b),
+                      gh_int2scm (1-b),
                       SCM_UNDEFINED);
   Box bx (Interval (0, 1.0), Interval (-0.5, 0.5));
   Stencil m (bx, at);
@@ -289,12 +291,12 @@ Note_head::stem_attachment_coordinate (Grob *me, Axis a)
   if (brewer == Note_head::print_proc)
     {
       SCM style  = me->get_property ("style");
-      if (!ly_c_symbol_p (style))
+      if (!gh_symbol_p (style))
        {
          return 0.0;
        }
       
-      SCM log = scm_int2num (Note_head::get_balltype (me));
+      SCM log = gh_int2scm (Note_head::get_balltype (me));
       SCM proc = me->get_property ("glyph-name-procedure");
       SCM scm_font_char = scm_call_2 (proc, log, style);
       String font_char = "noteheads-" + ly_scm2string (scm_font_char);
@@ -315,11 +317,11 @@ Note_head::stem_attachment_coordinate (Grob *me, Axis a)
     Fallback
    */
   SCM v = me->get_property ("stem-attachment-function");
-  if (!ly_c_procedure_p (v))
+  if (!gh_procedure_p (v))
     return 0.0;
   
-  SCM result = scm_call_2 (v, me->self_scm (), scm_int2num (a));
-  if (!ly_c_pair_p (result))
+  SCM result = scm_call_2 (v, me->self_scm (), gh_int2scm (a));
+  if (!gh_pair_p (result))
     return 0.0;
 
   result = (a == X_AXIS) ? ly_car (result) : ly_cdr (result);
@@ -331,7 +333,7 @@ int
 Note_head::get_balltype (Grob*me) 
 {
   SCM s = me->get_property ("duration-log");
-  return ly_c_number_p (s) ? ly_scm2int (s) <? 2 : 0;
+  return gh_number_p (s) ? gh_scm2int (s) <? 2 : 0;
 }
 
 ADD_INTERFACE (Note_head,"note-head-interface",
index 7898b85ec39407dfe06f64f7af8f093214fc2edc..e64dba8693b7a9ccfa35de2409ceda7d657f6df8 100644 (file)
@@ -6,7 +6,7 @@
 #include <ctype.h>
 
 #include "rhythmic-head.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "event.hh"
 #include "dots.hh"
 #include "dot-column.hh"
@@ -57,24 +57,24 @@ Note_heads_engraver::process_music ()
 {
   for (int i=0; i < note_reqs_.size (); i++)
     {
+      Item *note = make_item ("NoteHead");
 
       Music * req = note_reqs_[i];
-      Item *note = make_item ("NoteHead", req->self_scm ());
       
       Duration dur = *unsmob_duration (req->get_property ("duration"));
 
-      note->set_property ("duration-log", scm_int2num (dur.duration_log ()));
+      note->set_property ("duration-log", gh_int2scm (dur.duration_log ()));
       if (dur.dot_count ())
        {
-         Item * d = make_item ("Dots", note->self_scm ());
+         Item * d = make_item ("Dots");
          Rhythmic_head::set_dots (note, d);
          
          if (dur.dot_count ()
              != robust_scm2int (d->get_property ("dot-count"), 0))
-           d->set_property ("dot-count", scm_int2num (dur.dot_count ()));
+           d->set_property ("dot-count", gh_int2scm (dur.dot_count ()));
 
          d->set_parent (note, Y_AXIS);
-         
+         announce_grob (d, SCM_EOL);
          dots_.push (d);
        }
 
@@ -82,10 +82,11 @@ Note_heads_engraver::process_music ()
 
       int pos = pit ? pit->steps () : 0;
       SCM c0 = get_property ("middleCPosition");
-      if (ly_c_number_p (c0))
-       pos += ly_scm2int (c0);
+      if (gh_number_p (c0))
+       pos += gh_scm2int (c0);
 
-      note->set_property ("staff-position",   scm_int2num (pos));
+      note->set_property ("staff-position",   gh_int2scm (pos));
+      announce_grob (note,req->self_scm ());
       notes_.push (note);
     }
 }
@@ -93,8 +94,16 @@ Note_heads_engraver::process_music ()
 void
 Note_heads_engraver::stop_translation_timestep ()
 {
+  for (int i=0; i < notes_.size (); i++)
+    {
+      typeset_grob (notes_[i]);
+    }
 
   notes_.clear ();
+  for (int i=0; i < dots_.size (); i++)
+    {
+      typeset_grob (dots_[i]);
+    }
   dots_.clear ();
   note_reqs_.clear ();
 }
index 94841f74812079a5366e8839bbf6d0ec3996ea8a..a0c904e562027bd7824291010d69491fec3db1e9 100644 (file)
@@ -51,8 +51,9 @@ Note_name_engraver::process_music ()
     }
   if (s.length ())
     {
-      Item * t = make_item ("NoteName", events_[0]->self_scm () );
+      Item * t = make_item ("NoteName");
       t->set_property ("text", scm_makfrom0str (s.to_str0 ()));
+      announce_grob (t, events_[0]->self_scm ());
       texts_.push (t);
     }
 }
@@ -60,6 +61,10 @@ Note_name_engraver::process_music ()
 void
 Note_name_engraver::stop_translation_timestep ()
 {
+  for (int i=0; i < texts_.size (); i++)
+    {
+      typeset_grob (texts_[i]);
+    }
   texts_.clear () ;
   events_.clear ();
 }
index 54a391a881776862221b794e8f40d963ed677aa6..9f767ab54c0501c3b5b0fd9483f6e78c089ccefd 100644 (file)
@@ -18,7 +18,7 @@
 #include "separation-item.hh"
 #include "staff-spacing.hh"
 #include "accidental-placement.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 
 
 /*
@@ -42,9 +42,9 @@ Note_spacing::get_spacing (Grob *me, Item* right_col,
   Interval left_head_wid; 
   do
     {
-      for (SCM  s = props[d]; ly_c_pair_p (s); s = ly_cdr (s))
+      for (SCM  s = props[d]; gh_pair_p (s); s = gh_cdr (s))
        {
-         Item * it= dynamic_cast<Item*> (unsmob_grob (ly_car (s)));
+         Item * it= dynamic_cast<Item*> (unsmob_grob (gh_car (s)));
          
          if (d == RIGHT && it->break_status_dir () != col_dir)
            {
@@ -164,7 +164,7 @@ Note_spacing::get_spacing (Grob *me, Item* right_col,
 Item *
 Note_spacing::left_column (Grob *me)
 {
-  if (!me->is_live ())
+  if (!me->live ())
     return 0;
   
   return dynamic_cast<Item*> (me)->get_column ();
@@ -181,16 +181,16 @@ prune RIGHT-ITEMS.
 Item *
 Note_spacing::right_column (Grob*me)
 {
-  if (!me->is_live ())
+  if (!me->live ())
     return 0;
   
   SCM right = me->get_property ("right-items");
   Item *mincol = 0;
   int min_rank = INT_MAX;
   bool prune = false;
-  for (SCM s = right ; ly_c_pair_p (s) ; s = ly_cdr (s))
+  for (SCM s = right ; gh_pair_p (s) ; s = gh_cdr (s))
     {
-      Item * ri = unsmob_item (ly_car (s));
+      Item * ri = unsmob_item (gh_car (s));
 
       Item * col = ri->get_column ();
       int rank = Paper_column::get_rank (col);
@@ -209,10 +209,10 @@ Note_spacing::right_column (Grob*me)
     {
       // I'm a lazy bum. We could do this in-place.
       SCM newright  = SCM_EOL;
-      for (SCM s = right ; ly_c_pair_p (s) ; s =ly_cdr (s))
+      for (SCM s = right ; gh_pair_p (s) ; s =gh_cdr (s))
        {
-         if (unsmob_item (ly_car (s))->get_column () == mincol)
-           newright = scm_cons (ly_car (s), newright);
+         if (unsmob_item (gh_car (s))->get_column () == mincol)
+           newright = gh_cons (gh_car (s), newright);
        }
 
       me->set_property ("right-items", newright);
@@ -264,16 +264,16 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn,
   
   do
     {
-      for (SCM  s = props[d]; ly_c_pair_p (s); s = ly_cdr (s))
+      for (SCM  s = props[d]; gh_pair_p (s); s = gh_cdr (s))
        {
-         Item * it= dynamic_cast<Item*> (unsmob_grob (ly_car (s)));
+         Item * it= dynamic_cast<Item*> (unsmob_grob (gh_car (s)));
 
          if (d == RIGHT)
            acc_right = acc_right || Note_column::accidentals (it);
          
          Grob *stem = Note_column::get_stem (it);
 
-         if (!stem || !stem->is_live ())
+         if (!stem || !stem->live ())
            {
              if (d == RIGHT && Separation_item::has_interface (it))
                {
index 8f86a03eff62b9ffb5cbf0c3e6d1c6f99e5cecbb..488e355c66170589c423a7ce0c3e932396efc0d6 100644 (file)
@@ -14,7 +14,7 @@
 #include "spanner.hh"
 #include "font-interface.hh"
 #include "dimensions.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "warn.hh"
 #include "paper-column.hh"
 #include "staff-symbol-referencer.hh"
@@ -49,7 +49,7 @@ Ottava_bracket::print (SCM smob)
   Interval span_points;
   
   Grob *common = me->get_bound (LEFT)->common_refpoint (me->get_bound (RIGHT), X_AXIS);
-  Output_def * paper = me->get_paper ();
+  Paper_def * paper = me->get_paper ();
 
   
   Drul_array<bool> broken;
@@ -88,8 +88,8 @@ Ottava_bracket::print (SCM smob)
       Interval ext;
       if (Note_column::has_interface (b))
        {
-         for (SCM s = b->get_property ("note-heads"); ly_c_pair_p (s); s =ly_cdr (s))
-           ext.unite (unsmob_grob (ly_car (s))->extent (common, X_AXIS));
+         for (SCM s = b->get_property ("note-heads"); gh_pair_p (s); s =gh_cdr (s))
+           ext.unite (unsmob_grob (gh_car (s))->extent (common, X_AXIS));
        }
 
       if (ext.is_empty ())
@@ -97,6 +97,7 @@ Ottava_bracket::print (SCM smob)
          Real x = b->relative_coordinate (common, X_AXIS);
          ext = Interval (x,x);
        }
+      
       span_points[d] =  (broken [d]) ? b->extent (common, X_AXIS)[-d] : ext[d];
 
       if (broken[d])
@@ -158,7 +159,7 @@ Ottava_bracket::print (SCM smob)
   
   b = Stencil (Box (b.extent (X_AXIS),
                     Interval (0.1,0.1)),
-               b.expr ());
+               b.get_expr ());
   
   b.translate_axis (bracket_span_points[LEFT], X_AXIS);
   text.translate_axis (span_points[LEFT], X_AXIS);
index 49c2b5601540786e61703729a64559ba9407788c..cd207cc872da052aeca3c8553c441a0a4cb83766 100644 (file)
@@ -46,16 +46,16 @@ Ottava_spanner_engraver::process_music ()
     {
       finished_= span_;
       span_ = 0;
-      if (ly_c_string_p (ott))
+      if (gh_string_p (ott))
        {
-         span_  = make_spanner ("OttavaBracket", SCM_EOL);
+         span_  = make_spanner ("OttavaBracket");
          span_->set_property ("text", ott);
-         
+         announce_grob (span_, SCM_EOL);
 
          SCM c0 (get_property ("middleCPosition"));
          SCM oc0 (get_property ("originalCentralCPosition"));
          if (scm_less_p (oc0, c0) == SCM_BOOL_T)
-           span_->set_property ("direction", scm_int2num (DOWN));
+           span_->set_property ("direction", gh_int2scm (DOWN));
        }
     }
   last_ottavation_ = ott;
@@ -91,6 +91,7 @@ Ottava_spanner_engraver::typeset_all ()
        }
       while (flip (&d) != LEFT);
       
+      typeset_grob (finished_);
       finished_ = 0;
     }
 }
diff --git a/lily/output-def.cc b/lily/output-def.cc
deleted file mode 100644 (file)
index 10dbc0f..0000000
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
-  music-output-def.cc -- implement Output_def
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "context-def.hh"
-#include "file-path.hh"
-#include "global-context.hh"
-#include "interval.hh"
-#include "lily-guile.hh"
-#include "ly-module.hh"
-#include "main.hh"
-#include "output-def.hh"
-#include "output-def.hh"
-#include "scm-hash.hh"
-#include "warn.hh"
-
-Output_def::Output_def ()
-{
-  scope_ = SCM_EOL;
-  parent_ = 0;
-  smobify_self ();
-
-  scope_ = ly_make_anonymous_module (false);
-}
-
-Output_def::Output_def (Output_def const &s)
-{
-  scope_ = SCM_EOL;
-  parent_ = 0;
-  smobify_self ();
-
-  input_origin_ = s.input_origin_;
-  scope_= ly_make_anonymous_module (false);
-  if (ly_c_module_p (s.scope_))
-    ly_import_module (scope_, s.scope_);
-}
-
-Output_def::~Output_def ()
-{
-}
-
-#include "ly-smobs.icc"
-IMPLEMENT_SMOBS (Output_def);
-IMPLEMENT_DEFAULT_EQUAL_P (Output_def);
-
-SCM
-Output_def::mark_smob (SCM m)
-{
-  Output_def *mo = (Output_def*) SCM_CELL_WORD_1 (m);
-
-  /* FIXME: why is this necessary?
-     all bookpaper_ should be protected by themselves. */
-  if (mo->parent_)
-    scm_gc_mark (mo->parent_->self_scm ());
-
-  mo->derived_mark ();
-  return mo->scope_;
-}
-
-void
-Output_def::derived_mark ()
-{
-}
-
-void
-assign_context_def (Output_def * m, SCM transdef)
-{
-  Context_def *tp = unsmob_context_def (transdef);
-  assert (tp);
-
-  if (tp)
-    {
-      SCM sym = tp->get_context_name ();
-      scm_module_define (m->scope_, sym, transdef);
-    }  
-}
-
-/* find the translator for NAME. NAME must be a symbol. */
-SCM
-find_context_def (Output_def const *m, SCM name)
-{  
-  Context_def *cd = unsmob_context_def (m->lookup_variable (name));
-  return cd ? cd->self_scm () : SCM_EOL;
-}
-
-int
-Output_def::print_smob (SCM s, SCM p, scm_print_state *)
-{
-  Output_def * def = unsmob_output_def (s);
-  scm_puts ("#< ", p);
-  scm_puts (classname (def), p);
-  
-  (void)def;
-  scm_puts (">", p);
-  return 1;
-}
-
-Real
-Output_def::get_dimension (SCM s) const
-{
-  SCM val = lookup_variable (s);
-  return ly_scm2double (val);
-}
-
-SCM
-Output_def::lookup_variable (SCM sym) const
-{
-  SCM var = ly_module_lookup (scope_, sym);
-  if (SCM_VARIABLEP (var) && SCM_VARIABLE_REF(var) != SCM_UNDEFINED)
-    return SCM_VARIABLE_REF (var);
-  
-  if (parent_)
-    return parent_->lookup_variable (sym);
-  
-  return SCM_EOL;
-}
-
-SCM
-Output_def::c_variable (String s) const
-{
-  return lookup_variable (ly_symbol2scm (s.to_str0 ()));
-}
-
-void
-Output_def::set_variable (SCM sym, SCM val)
-{
-  scm_module_define (scope_, sym, val);
-}
-
-LY_DEFINE (ly_paper_lookup, "ly:output-def-lookup",
-          2, 0, 0, (SCM pap, SCM sym),
-          "Lookup @var{sym} in @var{pap}. "
-          "Return the value or @code{'()} if undefined.")
-{
-  Output_def *op = unsmob_output_def (pap);
-  SCM_ASSERT_TYPE (op, pap, SCM_ARG1, __FUNCTION__, "Output_def");
-  SCM_ASSERT_TYPE (ly_c_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
-
-  return op->lookup_variable (sym);
-}
-
-LY_DEFINE (ly_output_def_scope, "ly:output-def-scope",
-          1, 0, 0, (SCM def),
-          "Get the variable scope inside @var{def}.")
-{
-  Output_def *op = unsmob_output_def (def);
-  SCM_ASSERT_TYPE (op, def, SCM_ARG1, __FUNCTION__, "Output definition");
-  return op->scope_;
-}
-
-LY_DEFINE (ly_output_def_parent, "ly:output-def-parent",
-          1, 0, 0, (SCM def),
-          "Get the parent output-def of @var{def}.")
-{
-  Output_def *op = unsmob_output_def (def);
-  SCM_ASSERT_TYPE (op, def, SCM_ARG1, __FUNCTION__, "Output definition");
-  return op->parent_ ? op->parent_->self_scm () : SCM_EOL;
-}
-
-LY_DEFINE (ly_output_def_clone, "ly:output-def-clone",
-          1, 0, 0, (SCM def),
-          "Clone @var{def}.")
-{
-  Output_def *op = unsmob_output_def (def);
-  SCM_ASSERT_TYPE (op, def, SCM_ARG1, __FUNCTION__, "Output definition");
-  SCM s = op->clone ()->self_scm ();
-  scm_gc_unprotect_object (s);
-  return s;
-}
-
-LY_DEFINE (ly_output_description, "ly:output-description",
-          1, 0, 0, (SCM output_def),
-          "Return the description of translators in @var{output-def}.")
-{
-  Output_def *id = unsmob_output_def (output_def);
-  
-  SCM al = ly_module2alist (id->scope_);
-
-  SCM ell = SCM_EOL;
-  for (SCM s = al; ly_c_pair_p (s); s = ly_cdr (s))
-    {
-      Context_def * td = unsmob_context_def (ly_cdar (s));
-      SCM key = ly_caar (s);
-      if (td && key == td->get_context_name ())
-       ell = scm_cons (scm_cons (key, td->to_alist ()),  ell);
-    }
-  return ell;  
-}
-  
-/* FIXME.  This is broken until we have a generic way of
-   putting lists inside the \paper block.  */
-Interval
-line_dimensions_int (Output_def *def, int n)
-{
-  Real lw = def->get_dimension (ly_symbol2scm ("linewidth"));
-  Real ind = n ? 0.0 : def->get_dimension (ly_symbol2scm ("indent"));
-  return Interval (ind, lw);
-}
-
-LY_DEFINE (ly_paper_def_p, "ly:paper-def?",
-          1, 0, 0, (SCM def),
-          "Is @var{def} a paper definition?")
-{
-  return ly_bool2scm (unsmob_output_def (def));
-}
-
-LY_DEFINE (ly_bookpaper_outputscale, "ly:bookpaper-outputscale",
-         1, 0, 0, (SCM bp),
-         "Get outputscale for BP.")
-{
-  Output_def *b = unsmob_output_def (bp);
-  SCM_ASSERT_TYPE (b, bp, SCM_ARG1, __FUNCTION__, "bookpaper");
-  return scm_make_real (output_scale (b));
-}
-
-LY_DEFINE (ly_make_output_def, "ly:make-output-def",
-          0, 0, 0, (),
-          "Make a output def.")
-{
-  Output_def *bp = new Output_def ;
-  return scm_gc_unprotect_object (bp->self_scm ());
-}
-
-
index 06bfffefcacfa8b802beaa600273612f26efbc12..ebe2c477717f7f52fab76883d38dd14f45998571 100644 (file)
@@ -45,7 +45,7 @@ Output_property_engraver::acknowledge_grob (Grob_info inf)
 
 
 
-      if (ly_c_procedure_p (pred))
+      if (gh_procedure_p (pred))
        {
          /*
            should typecheck pred. 
@@ -64,13 +64,13 @@ Output_property_engraver::acknowledge_grob (Grob_info inf)
            dynamic_cast<Context *> (inf.origin_trans_);
 
          if (!d)
-           d = dynamic_cast<Context *> (inf.origin_trans_->context ());
+           d = dynamic_cast<Context *> (inf.origin_trans_->daddy_context_);
          
          SCM proc = o->get_property ("procedure");
          scm_call_3 (proc,
                      inf.grob_->self_scm (),
                      d->self_scm (), 
-                     context ()->self_scm ());
+                     daddy_context_->self_scm ());
        }
     }
 }
diff --git a/lily/pangofc-afm-decoder.cc b/lily/pangofc-afm-decoder.cc
deleted file mode 100644 (file)
index c6a587c..0000000
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
-  pango-afm-decoder.c -- AFM fontencoding for Pango fontconfig
-
-  source file of the GNU LilyPond music typesetter
-
-  Copyright (C) 2004  Jan Nieuwenhuizen <janneke@gnu.org>
-
-  Note: in C and with explicit LPGL header for easier use with PANGO
-  outside of LilyPond.
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Lesser General Public
-  License as published by the Free Software Foundation; either
-  version 2.1 of the License, or (at your option) any later version.
-  This library 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
-  Lesser General Public License for more details.
-  You should have received a copy of the GNU Lesser General Public
-  License along with this library; if not, write to the Free Software
-  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "config.h"
-#if HAVE_PANGO_FC_FONT_MAP_ADD_DECODER_FIND_FUNC
-
-/* Need to access to PangoFcFont.full_pattern.  */
-#define PANGO_ENABLE_BACKEND
-
-#include <pango/pango-font.h>
-#include <pango/pangoxft.h>
-#include <pango/pangofc-font.h>
-#include <gdk/gdkx.h>
-#include <X11/Xft/Xft.h>
-
-#include "pangofc-afm-decoder.hh"
-
-#ifdef DEBUG_PANGO_AFM
-#include <stdio.h>
-#define dprintf(args...) fprintf (stderr, args)
-#else
-#define dprintf(args...)
-#endif
-
-struct _PangoFcAfmDecoderPrivate
-{
-  GString encoding[256];
-  //GString file_name;
-  char const *file_name;
-  PangoFcFont *fc_font;
-};
-
-static void pango_fc_afm_decoder_init (PangoFcAfmDecoder *fontmap);
-static void pango_fc_afm_decoder_class_init (PangoFcAfmDecoderClass *clss);
-static void pango_fc_afm_decoder_finalize (GObject *object);
-
-static FcCharSet *pango_fc_afm_get_charset (PangoFcDecoder *decoder,
-                                           PangoFcFont *fcfont);
-static PangoGlyph pango_fc_afm_get_glyph (PangoFcDecoder *decoder,
-                                         PangoFcFont *fcfont, guint32 wc);
-static void pango_fc_afm_decoder_set_file_name (PangoFcAfmDecoder *self,
-                                               char const *file_name);
-
-static PangoFcDecoderClass *parent_class;
-
-#if 0
-/* ugly warning */
-G_DEFINE_TYPE (PangoFcAfmDecoder, pango_fc_afm_decoder, PANGO_TYPE_FC_DECODER);
-#else
-GType
-pango_fc_afm_decoder_get_type (void)
-{
-  static GType object_type = 0;
-
-  if (!object_type)
-    {
-      static const GTypeInfo object_info =
-      {
-        sizeof (PangoFcAfmDecoderClass),
-        (GBaseInitFunc) 0,
-        (GBaseFinalizeFunc) 0,
-        (GClassInitFunc) pango_fc_afm_decoder_class_init,
-        0,           /* class_finalize */
-        0,           /* class_data */
-        sizeof (PangoFcAfmDecoder),
-        0,              /* n_preallocs */
-        (GInstanceInitFunc) pango_fc_afm_decoder_init,
-       0, /* value table */
-      };
-      
-      object_type = g_type_register_static (PANGO_TYPE_FC_DECODER,
-                                            "PangoFcAfmDecoder",
-                                            &object_info, (GTypeFlags)0);
-    }
-  
-  return object_type;
-}
-#endif
-
-static void 
-pango_fc_afm_decoder_init (PangoFcAfmDecoder *fcafmdecoder)
-{
-  PangoFcAfmDecoderPrivate *priv = fcafmdecoder->priv;
-  priv = fcafmdecoder->priv
-    = G_TYPE_INSTANCE_GET_PRIVATE (fcafmdecoder,
-                                  PANGO_TYPE_FC_AFM_DECODER,
-                                  PangoFcAfmDecoderPrivate);
-  /*
-    init members
-   */
-}
-
-static void
-pango_fc_afm_decoder_class_init (PangoFcAfmDecoderClass *clss)
-{
-  GObjectClass *object_class = G_OBJECT_CLASS (clss);
-  object_class->finalize = pango_fc_afm_decoder_finalize;
-  g_type_class_add_private (object_class, sizeof (PangoFcAfmDecoderPrivate));
-
-  PangoFcDecoderClass *parent_class = PANGO_FC_DECODER_CLASS (clss);
-  parent_class->get_charset = pango_fc_afm_get_charset;
-  parent_class->get_glyph = pango_fc_afm_get_glyph;
-}
-
-static void
-pango_fc_afm_decoder_finalize (GObject *object)
-{
-#if 0  
-  PangoFcAfmDecoder *fcafmdecoder = PANGO_FC_AFM_DECODER (object);
-  PangoFcAfmDecoderPrivate *priv = fcafmdecoder->priv;
-#endif
-
-  /*
-    destroy members
-   */
-  G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static FcCharSet *
-pango_fc_afm_get_charset (PangoFcDecoder *decoder, PangoFcFont *fcfont)
-{
-  (void) decoder;
-  //dprintf ("get charset: %s\n", fcfont->font_pattern);
-  dprintf ("get charset: \n");
-#if 0  
-  FcCharSet *charset = 0;
-  FcPatternGetCharSet (fcfont->font_pattern, FC_CHARSET, 0, &charset);
-#else
-  /* Return plain, undecoded charset.
-     TODO:
-       - actually read AFM?
-       - caching?
-       - PUA mapping ? */
-  (void) fcfont;
-  int i;
-  FcChar32 chr = 0;
-  FcCharSet *charset = FcCharSetCreate ();
-  for (i = 0; i < 256; i++)
-    if (!FcCharSetAddChar (charset, chr++))
-      return 0;
-#endif  
-  return charset;
-}
-
-static PangoGlyph
-pango_fc_afm_get_glyph (PangoFcDecoder *decoder, PangoFcFont *fcfont,
-                       guint32 wc)
-{
-  (void) decoder;
-#if 0
-  XftFont *xft_font;
-  xft_font = XftFontOpenPattern (GDK_DISPLAY (),
-                                FcPatternDuplicate (fcfont->font_pattern));
-  PangoGlyph g = XftCharIndex (0, xft_font, wc);
-  dprintf ("get glyph! 0x%x --> 0x%x\n", wc, (unsigned)g);
-#else
-  /* TODO:
-       - PUA mapping?
-       
-     Shortcut PUA mapping/AFM reading: The Feta charsets are encoded
-     without any gaps, starting at 0x21.  *grin*  */
-  (void) fcfont;
-  return wc - 0x21;
-#endif  
-}
-
-static void
-pango_fc_afm_decoder_set_file_name (PangoFcAfmDecoder *self,
-                                   char const *file_name)
-{
-  self->priv->file_name = file_name;
-}
-
-PangoFcAfmDecoder *
-pango_fc_afm_decoder_new (void)
-{
-  return PANGO_FC_AFM_DECODER (g_object_new (PANGO_TYPE_FC_AFM_DECODER, 0));
-}
-
-PangoFcDecoder *
-pango_fc_afm_find_decoder (FcPattern *pattern, gpointer user_data)
-{
-  FcChar8 *family_name;
-  
-  if (FcPatternGetString (pattern, FC_FAMILY, 0, &family_name)
-      == FcResultMatch)
-    {
-      dprintf ("Family name: %s\n", family_name);
-      dprintf ("user_data: %s\n", (char const*) user_data);
-
-      if (!strcasecmp ((char const*) family_name, (char const*) user_data))
-       {
-         PangoFcAfmDecoder *afm = pango_fc_afm_decoder_new ();
-         char const *file_name = "feta20.afm";
-         pango_fc_afm_decoder_set_file_name (afm, file_name);
-         dprintf ("Adding decoder: %s\n", file_name);
-         return PANGO_FC_DECODER (afm);
-       }
-    }
-  return 0;
-}
-
-void
-pango_fc_afm_add_decoder (char const *family_name)
-{
-  PangoFcFontMap *fc_map
-    = PANGO_FC_FONT_MAP (pango_xft_get_font_map (GDK_DISPLAY (), 0));
-
-  pango_fc_font_map_add_decoder_find_func (fc_map, pango_fc_afm_find_decoder,
-                                          (gpointer)family_name, 0);
-}
-
-#ifdef PANGO_FC_AFM_DECODER_TEST
-
-#include <gtk/gtk.h>
-#include <libgnomecanvas/libgnomecanvas.h>
-#include <pango/pangoft2.h>
-#include <pango/pangox.h>
-#include <pango/pangoxft.h>
-
-#include "pangofc-afm-decoder.hh"
-
-#define CANVAS_WIDTH 600
-#define CANVAS_HEIGHT 300
-
-static void
-exit_clicked (GtkWidget *widget, gpointer data)
-{
-  gtk_widget_destroy (GTK_WIDGET (data));
-  gtk_main_quit ();
-}
-
-static gint
-delete_event (GtkWidget *widget, GdkEvent *event, gpointer data)
-{
-  gtk_widget_destroy (widget);
-  gtk_main_quit ();
-  return TRUE;
-}
-
-GnomeCanvas *
-make_canvas (int width, int height)
-{
-  GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  GtkWidget *vbox = gtk_vbox_new (FALSE, 0);
-  GtkWidget *canvas = gnome_canvas_new ();
-  GtkWidget *hbox = gtk_hbox_new (TRUE, 0);
-  GtkWidget *button = gtk_button_new_with_label ("Exit");
-
-  gtk_container_add (GTK_CONTAINER (window), vbox);
-  gtk_widget_set_size_request (canvas, width, height);
-  gtk_box_pack_start (GTK_BOX (vbox), canvas, TRUE, TRUE, 0);
-  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-  gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
-
-  gtk_signal_connect (GTK_OBJECT (button), "clicked",
-                     (GtkSignalFunc) exit_clicked, window);
-  
-  gtk_signal_connect (GTK_OBJECT (window), "delete_event",
-                     (GtkSignalFunc) delete_event, 0);
-
-  gtk_widget_show_all (window);
-  return GNOME_CANVAS (canvas);
-}
-
-#define gnome_canvas_text(x, y, font, text) \
-  gnome_canvas_item_new (root, text_item, "x", x, "y", y, "font", font, \
-                        "text", text, "anchor", GTK_ANCHOR_SOUTH_WEST, \
-                        "fill_color", "black", 0)
-
-int
-main (int argc, char **argv)
-{
-  gtk_init (&argc, &argv);
-  GnomeCanvas *canvas = make_canvas (CANVAS_WIDTH, CANVAS_HEIGHT);
-
-  /* Register GNU LilyPond FETA AFM decoders.  */
-  pango_fc_afm_add_decoder ("lilypond-feta");
-  pango_fc_afm_add_decoder ("lilypond-braces");
-  pango_fc_afm_add_decoder ("lilypond-dyn");
-  pango_fc_afm_add_decoder ("lilypond-parmesan");
-
-  int text_item = gnome_canvas_text_get_type ();
-  GnomeCanvasGroup *root = gnome_canvas_root (canvas);
-  char const *g_clef_utf8 = "\302\220";
-
-  gnome_canvas_text (45.0, 122.5, "LilyPond-feta-nummer 16", "3");
-  gnome_canvas_text (45.0, 142.5, "LilyPond-feta-nummer, r 16", "4");
-  gnome_canvas_text (10.0, 142.0, "LilyPond-feta, 32", g_clef_utf8);
-
-  gtk_main ();
-  return 0;
-}
-#endif /* PANGO_FC_AFM_DECODER_TEST */
-
-#endif /* HAVE_PANGO_FC_FONT_MAP_ADD_DECODER_FIND_FUNC */
index 0c0a0629fc86ba765d19fac5887abee61a76ee1f..ae8e547c1ca0c96513194c7da8de2ab040948efd 100644 (file)
   (c) 2004 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
+#include <stdio.h>
+#include <math.h>
+
 #include "ly-module.hh"
 #include "main.hh"
-#include "output-def.hh"
 #include "paper-book.hh"
+#include "paper-def.hh"
 #include "paper-outputter.hh"
+#include "paper-line.hh"
 #include "paper-score.hh"
-#include "paper-system.hh"
 #include "stencil.hh"
-#include "warn.hh"
 
-#include "ly-smobs.icc"
+static Real const MIN_COVERAGE = 0.66;
+
+static SCM
+stencil2line (Stencil* stil, bool is_title = false)
+{
+  static SCM z;
+  if (!z)
+    z = scm_permanent_object (ly_offset2scm (Offset (0, 0)));
+  Offset dim = Offset (stil->extent (X_AXIS).length (),
+                      stil->extent (Y_AXIS).length ());
+  Paper_line *pl = new Paper_line (dim, scm_cons (stil->smobbed_copy (),
+                                                 SCM_EOL), is_title);
+
+  return scm_gc_unprotect_object (pl->self_scm ());
+}
+
+/* Simplistic page interface */
+class Page
+{
+public:
+  Paper_def *paper_;
+  static int page_count_;
+  int number_;
+  int line_count_;
+
+  Protected_scm lines_;
+  Protected_scm header_;
+  Protected_scm footer_;
+  Protected_scm copyright_;
+  Protected_scm tagline_;
+  
+  Stencil *get_header () { return unsmob_stencil (header_); }
+  Stencil *get_copyright () { return unsmob_stencil (copyright_); }
+  Stencil *get_tagline () { return unsmob_stencil (tagline_); }
+  Stencil *get_footer () { return unsmob_stencil (footer_); }
+
+  /* actual height filled with text.  */
+  Real height_;
+  
+  // HMMM all this size stuff to paper/paper-outputter?
+  Real hsize_;
+  Real vsize_;
+  Real left_margin_;
+  Real top_margin_;
+  Real bottom_margin_;
+  Real foot_sep_;
+  Real head_sep_;
+  Real text_width_;
+
+  /* available area for text.  */
+  Real text_height ();
+
+  Page (Paper_def*, int);
+  void output (Paper_outputter*, bool);
+};
+
+int Page::page_count_ = 0;
+
+Page::Page (Paper_def *paper, int number)
+{
+  paper_ = paper;
+  number_ = number;
+  page_count_++;
+  
+  height_ = 0;
+  lines_ = SCM_EOL;
+  line_count_ = 0;
+
+  hsize_ = paper->get_realvar (ly_symbol2scm ("hsize"));
+  vsize_ = paper->get_realvar (ly_symbol2scm ("vsize"));
+  top_margin_ = paper->get_realvar (ly_symbol2scm ("top-margin"));
+  bottom_margin_ = paper->get_realvar (ly_symbol2scm ("bottom-margin"));
+  head_sep_ = paper->get_realvar (ly_symbol2scm ("head-sep"));
+  foot_sep_ = paper->get_realvar (ly_symbol2scm ("foot-sep"));
+  text_width_ = paper->get_realvar (ly_symbol2scm ("linewidth"));
+  left_margin_ = (hsize_ - text_width_) / 2;
+  
+  copyright_ = SCM_EOL;
+  tagline_ = SCM_EOL;
+  
+  SCM make_header = ly_scheme_function ("make-header");
+  SCM make_footer = ly_scheme_function ("make-footer");
+
+  header_ = scm_call_2 (make_header, paper_->self_scm (),
+                       scm_int2num (number_));
+  // FIXME: why does this (generates Stencil) not trigger font load?
+  if (get_header ())
+    get_header ()->align_to (Y_AXIS, UP);
+    
+  footer_ = scm_call_2 (make_footer, paper_->self_scm (),
+                       scm_int2num (number_));
+  if (get_footer ())
+    get_footer ()->align_to (Y_AXIS, UP);
+}
+
+void
+Page::output (Paper_outputter *out, bool is_last)
+{
+  progress_indication ("[" + to_string (number_));
+  out->output_scheme (scm_list_1 (ly_symbol2scm ("start-page")));
+  Offset o (left_margin_, top_margin_);
+  Real vfill = line_count_ > 1 ? (text_height () - height_) / (line_count_ - 1)
+    : 0;
+
+  Real coverage = height_ / text_height ();
+  if (coverage < MIN_COVERAGE)
+    /* Do not space out a badly filled page.  This is too simplistic
+       (ie broken), because this should not vary too much between
+       (subsequent?) pages in a book.  */
+    vfill = 0;
+
+  if (get_header ())
+    {
+      out->output_line (stencil2line (get_header ()), &o, false);
+      o[Y_AXIS] += head_sep_;
+    }
+  for (SCM s = lines_; s != SCM_EOL; s = ly_cdr (s))
+    {
+      SCM line = ly_car (s);
+      out->output_line (line, &o,
+                       is_last && ly_cdr (s) != SCM_EOL && !get_copyright ()
+                       && !get_tagline () && !get_footer ());
+      
+      /* Do not put vfill between title and its music, */
+      if (scm_pair_p (ly_cdr (s))
+         && (!unsmob_paper_line (line)->is_title () || vfill < 0))
+       o[Y_AXIS] += vfill;
+      /* rather put extra just before the title.  */
+      if (ly_cdr (s) != SCM_EOL
+         && (unsmob_paper_line (ly_cadr (s))->is_title () && vfill > 0))
+       o[Y_AXIS] += vfill;
+    }
+
+  o[Y_AXIS] = vsize_ - bottom_margin_;
+  if (get_copyright ())
+    o[Y_AXIS] -= get_copyright ()->extent (Y_AXIS).length ();
+  if (get_tagline ())
+    o[Y_AXIS] -= get_tagline ()->extent (Y_AXIS).length ();
+  if (get_footer ())
+    o[Y_AXIS] -= get_footer ()->extent (Y_AXIS).length ();
+
+  if (get_copyright ())
+    out->output_line (stencil2line (get_copyright ()), &o,
+                     is_last && !get_tagline () && !get_footer ());
+  if (get_tagline ())
+    out->output_line (stencil2line (get_tagline ()), &o,
+                     is_last && !get_footer ());
+  if (get_footer ())
+    out->output_line (stencil2line (get_footer ()), &o, is_last);
+  out->output_scheme (scm_list_2 (ly_symbol2scm ("stop-page"),
+                                 gh_bool2scm (is_last && !get_footer ())));
+  progress_indication ("]");
+}
+
+Real
+Page::text_height ()
+{
+  Real h = vsize_ - top_margin_ - bottom_margin_;
+  if (get_header ())
+    h -= get_header ()->extent (Y_AXIS).length () + head_sep_;
+  if (get_copyright () || get_tagline () || get_footer ())
+    h -= foot_sep_;
+  if (get_copyright ())
+    h -= get_copyright ()->extent (Y_AXIS).length ();
+  if (get_tagline ())
+    h -= get_tagline ()->extent (Y_AXIS).length ();
+  if (get_footer ())
+    h -= get_footer ()->extent (Y_AXIS).length ();
+  return h;
+}
+
+/****************************************************************/
+
+/* Current global paper book.  Gives default_rendering access from
+   input-file-results.  */
+Paper_book *paper_book;
 
 Paper_book::Paper_book ()
 {
-  pages_ = SCM_BOOL_F;
-  lines_ = SCM_BOOL_F;
-  header_ = SCM_EOL;
+  copyright_ = SCM_EOL;
+  tagline_ = SCM_EOL;
   
-  bookpaper_ = 0;
   smobify_self ();
 }
 
@@ -32,6 +207,8 @@ Paper_book::~Paper_book ()
 {
 }
 
+#include "ly-smobs.icc"
+
 IMPLEMENT_DEFAULT_EQUAL_P (Paper_book);
 IMPLEMENT_SMOBS (Paper_book)
 IMPLEMENT_TYPE_P (Paper_book, "ly:paper-book?")
@@ -39,15 +216,19 @@ IMPLEMENT_TYPE_P (Paper_book, "ly:paper-book?")
 SCM
 Paper_book::mark_smob (SCM smob)
 {
-  Paper_book *b = (Paper_book*) SCM_CELL_WORD_1 (smob);
-  for (int i = 0; i < b->score_lines_.size (); i++)
-    b->score_lines_[i].gc_mark ();
-
-  if (b->bookpaper_)
-    scm_gc_mark (b->bookpaper_->self_scm ());
-  scm_gc_mark (b->header_);
-  scm_gc_mark (b->pages_);
-  return b->lines_;
+  Paper_book *pb = (Paper_book*) SCM_CELL_WORD_1 (smob);
+  for (int i = 0; i < pb->headers_.size (); i++)
+    scm_gc_mark (pb->headers_[i]);
+  for (int i = 0; i < pb->global_headers_.size (); i++)
+    scm_gc_mark (pb->global_headers_[i]);
+  for (int i = 0; i < pb->papers_.size (); i++)
+    scm_gc_mark (pb->papers_[i]->self_scm ());
+  for (int i = 0; i < pb->scores_.size (); i++)
+    scm_gc_mark (pb->scores_[i]);
+
+  scm_gc_mark (pb->copyright_);
+  
+  return pb->tagline_;
 }
 
 int
@@ -63,307 +244,248 @@ Paper_book::print_smob (SCM smob, SCM port, scm_print_state*)
   return 1;
 }
 
-Array<String>
-split_string (String s, char c)
-{
-  Array<String> rv; 
-  while (s.length ())
-    {
-      int i = s.index (c);
-      
-      if (i == 0)
-       {
-         s = s.nomid_string (0, 1);
-         continue;
-       }
-      
-      if (i < 0)
-       i = s.length () ;
-
-      rv.push (s.cut_string (0, i));
-      s = s.nomid_string (0, i);
-    }
-
-  return rv;
-}
-
-SCM
-dump_fields ()
-{
-  SCM fields = SCM_EOL;
-  for (int i = dump_header_fieldnames_global.size (); i--; )
-    fields
-      = scm_cons (ly_symbol2scm (dump_header_fieldnames_global[i].to_str0 ()),
-                 fields);
-  return fields;
-}
-
-LY_DEFINE (ly_output_formats, "ly:output-formats",
-          0, 0, 0, (),
-          "Formats passed to --format as a list of strings, "
-          "used for the output.")
-{
-  Array<String> output_formats = split_string (output_format_global, ',');
-
-  SCM lst = SCM_EOL;
-  int output_formats_count = output_formats.size ();
-  for (int i = 0; i < output_formats_count; i ++)
-    lst = scm_cons (scm_makfrom0str (output_formats[i].to_str0 ()), lst);
-  
-  return lst; 
-}
-
 void
 Paper_book::output (String outname)
 {
-  if (!score_lines_.size ())
+  if (!papers_.size ())
     return;
-
-  /* Generate all stencils to trigger font loads.  */
-  pages ();
-  
-  SCM formats = ly_output_formats ();
-  for (SCM s = formats; ly_c_pair_p (s); s = ly_cdr (s)) 
-    {
-      String format = ly_scm2string (ly_car (s));
-      Paper_outputter *out = get_paper_outputter (outname + "." + format,
-                                                 format);
-  
-      SCM scopes = SCM_EOL;
-      if (ly_c_module_p (header_))
-       scopes = scm_cons (header_, scopes);
-  
-      String mod_nm = "scm framework-" + format;
-      
-      SCM mod = scm_c_resolve_module (mod_nm.to_str0 ());
-      SCM func = scm_c_module_lookup (mod, "output-framework");
-
-      func = scm_variable_ref (func);
-      scm_apply_0 (func, scm_list_n (out->self_scm (),
-                                    self_scm (),
-                                    scopes,
-                                    dump_fields (),
-                                    scm_makfrom0str (outname.to_str0 ()),
-                                    SCM_UNDEFINED));
-
-      scm_gc_unprotect_object (out->self_scm ());
-      progress_indication ("\n");
-    }
-}
-
-void
-Paper_book::classic_output (String outname)
-{
+    
   /* Generate all stencils to trigger font loads.  */
-  lines ();
+  Link_array<Page> *pages = this->pages ();
 
-  // ugh code dup
-  SCM scopes = SCM_EOL;
-  if (ly_c_module_p (header_))
-    scopes = scm_cons (header_, scopes);
+  Paper_def *paper = papers_[0];
+  Paper_outputter *out = paper->get_paper_outputter (outname);
+  out->output_header (paper, scopes (0), pages->size ());
 
-  if (ly_c_module_p (score_lines_[0].header_))
-    scopes = scm_cons (score_lines_[0].header_, scopes);
-  //end ugh
+  int page_count = pages->size ();
+  for (int i = 0; i < page_count; i++)
+    (*pages)[i]->output (out, i + 1 == page_count);
 
-  Array<String> output_formats = split_string (output_format_global, ',');
+  out->output_scheme (scm_list_1 (ly_symbol2scm ("end-output")));
 
-  for (int i = 0; i < output_formats.size (); i++)
-    {
-      String format = output_formats[i];
-      String mod_nm = "scm framework-" + format;
-      
-      SCM mod = scm_c_resolve_module (mod_nm.to_str0 ());
-      SCM func = scm_c_module_lookup (mod, "output-classic-framework");
+  /*
+    Ugh
+   */
+  for (int i =pages->size (); i--;)
+    delete pages->elem(i);
+  delete pages;
 
-      func = scm_variable_ref (func);
-      
-      Paper_outputter *out = get_paper_outputter (outname + "." + format,
-                                                 format);
-
-      scm_apply_0 (func, scm_list_5 (out->self_scm (), self_scm (), scopes,
-                                    dump_fields (),
-                                    scm_makfrom0str (outname.to_str0 ())));
-
-      scm_gc_unprotect_object (out->self_scm ());
-      progress_indication ("\n");
-    }
-}
-
-LY_DEFINE (ly_paper_book_pages, "ly:paper-book-pages",
-         1, 0, 0, (SCM pb),
-         "Return pages in book PB.")
-{
-  return unsmob_paper_book(pb)->pages ();
+  
+  progress_indication ("\n");
 }
 
-LY_DEFINE (ly_paper_book_scopes, "ly:paper-book-scopes",
-         1, 0, 0, (SCM book),
-         "Return pages in paper book @var{book}.")
+SCM
+Paper_book::scopes (int i)
 {
-  Paper_book *pb = unsmob_paper_book(book);
-  SCM_ASSERT_TYPE(pb, book, SCM_ARG1, __FUNCTION__, "Paper_book");
-  
   SCM scopes = SCM_EOL;
-  if (ly_c_module_p (pb->header_))
-    scopes = scm_cons (pb->header_, scopes);
-  
+  if (headers_[i])
+    scopes = scm_cons (headers_[i], scopes);
+  if (global_headers_[i] && global_headers_[i] != headers_[i])
+    scopes = scm_cons (global_headers_[i], scopes);
   return scopes;
 }
 
-LY_DEFINE (ly_paper_book_lines, "ly:paper-book-lines",
-          1, 0, 0, (SCM pb),
-          "Return lines in book PB.")
+Stencil*
+Paper_book::title (int i)
 {
-  return unsmob_paper_book (pb)->lines ();
-}
-
-LY_DEFINE (ly_paper_book_book_paper, "ly:paper-book-book-paper",
-         1, 0, 0, (SCM pb),
-         "Return pages in book PB.")
-{
-  return unsmob_paper_book (pb)->bookpaper_->self_scm ();
-}
-
-/* TODO: resurrect more complex user-tweaks for titling?  */
-Stencil
-Paper_book::book_title ()
-{
-  SCM title_func = bookpaper_->lookup_variable (ly_symbol2scm ("book-title"));
-  Stencil title;
-
-  SCM scopes = SCM_EOL;
-  if (ly_c_module_p (header_))
-    scopes = scm_cons (header_, scopes);
-
-  SCM tit = SCM_EOL;
-  if (ly_c_procedure_p (title_func))
-    tit = scm_call_2 (title_func,
-                    bookpaper_->self_scm (),
-                    scopes);
-
-  if (unsmob_stencil (tit))
-    title = *unsmob_stencil (tit);
-
-  if (!title.is_empty ())
-    title.align_to (Y_AXIS, UP);
+  SCM user_title = ly_scheme_function ("user-title");
+    SCM book_title = ly_scheme_function ("book-title");
+    SCM score_title = ly_scheme_function ("score-title");
+  SCM field = (i == 0 ? ly_symbol2scm ("bookTitle")
+              : ly_symbol2scm ("scoreTitle"));
+
+  Stencil *title = 0;
+  SCM scopes = this->scopes (i);
+  SCM s = ly_modules_lookup (scopes, field);
+  if (s != SCM_UNDEFINED && scm_variable_bound_p (s) == SCM_BOOL_T)
+    title = unsmob_stencil (scm_call_2 (user_title,
+                                       papers_[0]->self_scm (),
+                                       scm_variable_ref (s)));
+  else
+    title = unsmob_stencil (scm_call_2 (i == 0 ? book_title : score_title,
+                                       papers_[0]->self_scm (),
+                                       scopes));
+  if (title)
+    title->align_to (Y_AXIS, UP);
   
   return title;
 }
 
-Stencil
-Paper_book::score_title (int i)
+void
+Paper_book::classic_output (String outname)
 {
-  SCM title_func = bookpaper_->lookup_variable (ly_symbol2scm ("score-title"));
-
-  Stencil title;
+  int count = scores_.size ();
+  Paper_outputter *out = papers_.top ()->get_paper_outputter (outname);
+  out->output_header (papers_.top (), scopes (count - 1), 0);
+
+  int line_count = SCM_VECTOR_LENGTH ((SCM) scores_.top ());
+  for (int i = 0; i < line_count; i++)
+    out->output_line (scm_vector_ref ((SCM) scores_.top (), scm_int2num (i)),
+                     0, i == line_count - 1);
+  
+  out->output_scheme (scm_list_1 (ly_symbol2scm ("end-output")));
+  progress_indication ("\n");
+}
 
-  // ugh code dup
-  SCM scopes = SCM_EOL;
-  if (ly_c_module_p (header_))
-    scopes = scm_cons (header_, scopes);
 
-  if (ly_c_module_p (score_lines_[i].header_))
-    scopes = scm_cons (score_lines_[i].header_, scopes);
-  //end ugh
+/* calculate book height, #lines, stencils.  */
+void
+Paper_book::init ()
+{
+  int score_count = scores_.size ();
 
-  SCM tit = SCM_EOL;
-  if (ly_c_procedure_p (title_func))
-    tit = scm_call_2 (title_func,
-                    bookpaper_->self_scm (),
-                    scopes);
+  /* Calculate the full book height.  Hmm, can't we cache system
+     heights while making stencils?  */
+  height_ = 0;
+  for (int i = 0; i < score_count; i++)
+    {
+      Stencil *title = this->title (i);
+      if (title)
+       height_ += title->extent (Y_AXIS).length ();
 
-  if (unsmob_stencil (tit))
-    title = *unsmob_stencil (tit);
+      int line_count = SCM_VECTOR_LENGTH ((SCM) scores_[i]);
+      for (int j = 0; j < line_count; j++)
+       {
+         SCM s = scm_vector_ref ((SCM) scores_[i], scm_int2num (j));
+         height_ += unsmob_paper_line (s)->dim ()[Y_AXIS];
+       }
+    }
 
-  if (!title.is_empty ())
-    title.align_to (Y_AXIS, UP);
-  
-  return title;
+  Paper_def *paper = papers_[0];
+  SCM scopes = this->scopes (0);
+
+  SCM make_tagline = ly_scheme_function ("make-tagline");
+  tagline_ = scm_call_2 (make_tagline, paper->self_scm (), scopes);
+  Real tag_height = 0;
+  if (Stencil *s = unsmob_stencil (tagline_))
+    tag_height = s->extent (Y_AXIS).length ();
+  height_ += tag_height;
+
+  SCM make_copyright = ly_scheme_function ("make-copyright");
+  copyright_ = scm_call_2 (make_copyright, paper->self_scm (), scopes);
+  Real copy_height = 0;
+  if (Stencil *s = unsmob_stencil (copyright_))
+    copy_height = s->extent (Y_AXIS).length ();
+  height_ += copy_height;
 }
-  
+
 SCM
 Paper_book::lines ()
 {
-  if (lines_ != SCM_BOOL_F)
-    return lines_;
-
-  lines_ = SCM_EOL;
-  Stencil title = book_title ();
-
-  if (!title.is_empty ())
-    {
-      Paper_system *pl = new Paper_system (title, true);
-      lines_ = scm_cons (pl->self_scm (), lines_);
-      scm_gc_unprotect_object (pl->self_scm ());
-    }
-  
-  int score_count = score_lines_.size ();
+  int score_count = scores_.size ();
+  SCM lines = SCM_EOL;
   for (int i = 0; i < score_count; i++)
     {
-      Stencil title = score_title (i);      
-      if (!title.is_empty ())
-       {
-         Paper_system *pl = new Paper_system (title, true);
-         lines_ = scm_cons (pl->self_scm (), lines_);
-         scm_gc_unprotect_object (pl->self_scm ());
-       }
-      
-      if (scm_vector_p (score_lines_[i].lines_) == SCM_BOOL_T)
-       {
-         // guh.         
-         SCM line_list = scm_vector_to_list (score_lines_[i].lines_);
-
-         line_list = scm_reverse (line_list);
-         lines_ = scm_append (scm_list_2 (line_list, lines_));
-       }
+      if (Stencil *title = this->title (i))
+       lines = ly_snoc (stencil2line (title, true), lines);
+      lines = scm_append (scm_list_2 (lines, scm_vector_to_list (scores_[i])));
     }
-  
-  lines_ = scm_reverse (lines_);
-  
+  //debug helper; ughr
   int i = 0;
-  Paper_system *last = 0;
-  for (SCM s = lines_; s != SCM_EOL; s = ly_cdr (s))
-    {
-      Paper_system * p = unsmob_paper_line (ly_car (s));
-      p->number_ = ++i;
-
-      if (last && last->is_title ())
-       // ugh, hardcoded.      
-       p->penalty_ = 10000;
-      last = p;
-    }
-  
-  return lines_;
+  for (SCM s = lines; s != SCM_EOL; s = ly_cdr (s))
+    unsmob_paper_line (ly_car (s))->number_ = ++i;
+  return lines;
 }
 
-SCM
+Link_array<Page>*
 Paper_book::pages ()
 {
-  if (SCM_BOOL_F != pages_)
-    return pages_;
-
-  pages_ = SCM_EOL;
-  Output_def *paper = bookpaper_;
-  SCM proc = paper->c_variable ("page-breaking");
-  pages_ = scm_apply_0 (proc, scm_list_2 (lines (), self_scm ()));
-  return pages_;
-}
+  init ();
+  Page::page_count_ = 0;
+  Paper_def *paper = papers_[0];
+  Page *page = new Page (paper, 1);
+
+  Real text_height = page->text_height ();
+
+  Real copy_height = 0;
+  if (Stencil *s = unsmob_stencil (copyright_))
+    copy_height = s->extent (Y_AXIS).length ();
+
+  Real tag_height = 0;
+  if (Stencil *s = unsmob_stencil (tagline_))
+    tag_height = s->extent (Y_AXIS).length ();
+
+  SCM all = lines ();
+  SCM proc = paper->get_scmvar ("page-breaking");
+  SCM breaks = scm_apply_0 (proc, scm_list_n (all, gh_double2scm (height_),
+                                           gh_double2scm (text_height),
+                                           gh_double2scm (-copy_height),
+                                           gh_double2scm (-tag_height),
+                                           SCM_UNDEFINED));
+
+  /* Copyright on first page.  */
+  if (unsmob_stencil (copyright_))
+    page->copyright_ = copyright_;
+
+  Link_array<Page> *pages = new Link_array<Page>;
+  int page_count = SCM_VECTOR_LENGTH ((SCM) breaks);
+  int line = 1;
+  for (int i = 0; i < page_count; i++)
+    {
+      if (i)
+       page = new Page (paper, i+1);
+      int next = i + 1 < page_count
+       ? gh_scm2int (scm_vector_ref (breaks, gh_int2scm (i))) : 0;
+      while ((!next && all != SCM_EOL) || line <= next)
+       {
+         SCM s = ly_car (all);
+         page->lines_ = ly_snoc (s, page->lines_);
+         page->height_ += unsmob_paper_line (s)->dim ()[Y_AXIS];
+         page->line_count_++;
+         all = ly_cdr (all);
+         line++;
+       }
+      pages->push (page);
+    }
 
+  /* Tagline on last page.  */
+  if (unsmob_stencil (tagline_))
+    page->tagline_ = tagline_;
 
-/****************************************************************/
+  return pages;
+}
 
-Score_lines::Score_lines ()
+static SCM
+c_ragged_page_breaks (SCM lines, Real book_height, Real text_height,
+                     Real first, Real last)
 {
-  lines_ = SCM_EOL;
-  header_ = SCM_EOL;
+  int page_number = 0;
+  int page_count = int (book_height / text_height + 0.5);
+  SCM breaks = SCM_EOL;
+  Real page_height = text_height + first;
+  Real h = 0;
+  int number = 0;
+  for (SCM s = lines; s != SCM_EOL; s = ly_cdr (s))
+    {
+      Paper_line *pl = unsmob_paper_line (ly_car (s));
+      if (!pl->is_title () && h < page_height)
+       number++;
+      h += pl->dim ()[Y_AXIS];
+      if (!pl->is_title () && h > page_height)
+       {
+         breaks = ly_snoc (gh_int2scm (number), breaks);
+         page_number++;
+         page_height = text_height + (page_number == page_count) * last;
+         h = 0;
+       }
+      if (ly_cdr (s) == SCM_EOL)
+       breaks = ly_snoc (gh_int2scm (pl->number_), breaks);
+    }
+
+  return scm_vector (breaks);
 }
 
-void
-Score_lines::gc_mark ()
+LY_DEFINE (ly_ragged_page_breaks, "ly:ragged-page-breaks",
+          5, 0, 0, (SCM lines, SCM book, SCM text, SCM first, SCM last),
+          "Return a vector with line numbers of page breaks.")
 {
-  scm_gc_mark (lines_);
-  scm_gc_mark (header_);
+  SCM_ASSERT_TYPE (scm_pair_p (lines), lines, SCM_ARG1, __FUNCTION__, "list");
+  SCM_ASSERT_TYPE (gh_number_p (book), book, SCM_ARG2, __FUNCTION__, "real");
+  SCM_ASSERT_TYPE (gh_number_p (text), text, SCM_ARG2, __FUNCTION__, "real");
+  SCM_ASSERT_TYPE (gh_number_p (first), first, SCM_ARG2, __FUNCTION__, "real");
+  SCM_ASSERT_TYPE (gh_number_p (last), last, SCM_ARG2, __FUNCTION__, "real");
+
+  return c_ragged_page_breaks (lines,
+                              gh_scm2double (book), gh_scm2double (text),
+                              gh_scm2double (first), gh_scm2double (last));
 }
-
index 9eb5f1c3dd120e541b42a9e1787af2243a54c915..21ec714301b4751bfe9cb62db593dc4b5470fc1d 100644 (file)
@@ -16,7 +16,7 @@
 #include "text-item.hh"
 #include "lookup.hh"
 #include "font-interface.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 
 
 
@@ -35,7 +35,7 @@ ADD_INTERFACE (Paper_column, "paper-column-interface",
               "  non-adjacent numbers.\n"
               "\n"
               ,
-              "between-cols when bounded-by-me "
+              "between-cols between-system-string when bounded-by-me "
               "shortest-playing-duration shortest-starter-duration");
 
 void
@@ -67,7 +67,7 @@ Paper_column::get_column () const
 Paper_column::Paper_column (SCM l)
   : Item (l)           // guh.?
 {
-  system_ = 0;
+  system_=0;
   rank_ = -1;
 }
 
@@ -99,8 +99,8 @@ Paper_column::is_musical (Grob *me)
 bool
 Paper_column::is_used (Grob*me)
 {
-  return ly_c_pair_p (me->get_property ("elements")) ||  Item::is_breakable (me)
-    || ly_c_pair_p (me->get_property ("bounded-by-me"))
+  return gh_pair_p (me->get_property ("elements")) ||  Item::is_breakable (me)
+    || gh_pair_p (me->get_property ("bounded-by-me"))
     ;
 }
 
@@ -147,13 +147,13 @@ Paper_column::before_line_breaking (SCM grob)
   SCM c = me->get_property ("bounded-by-me");
   SCM *ptrptr = &c;
 
-  while (ly_c_pair_p (*ptrptr))
+  while (gh_pair_p (*ptrptr))
     {
-      Grob * g = unsmob_grob (ly_car (*ptrptr));
+      Grob * g = unsmob_grob (gh_car (*ptrptr));
 
-      if (!g || !g->is_live ())
+      if (!g || !g->live ())
        {
-         *ptrptr = ly_cdr (*ptrptr);
+         *ptrptr = gh_cdr (*ptrptr);
        }
       else
        {
diff --git a/lily/paper-def.cc b/lily/paper-def.cc
new file mode 100644 (file)
index 0000000..144a944
--- /dev/null
@@ -0,0 +1,163 @@
+/*
+  paper-def.cc -- implement Paper_def
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#include <math.h>
+
+#include "virtual-font-metric.hh"
+#include "all-font-metrics.hh"
+#include "string.hh"
+#include "misc.hh"
+#include "paper-def.hh"
+#include "warn.hh"
+#include "scaled-font-metric.hh"
+#include "main.hh"
+#include "scm-hash.hh"
+#include "input-file-results.hh" // urg? header_global
+#include "paper-outputter.hh"
+#include "ly-module.hh"
+
+/*
+  This is an almost empty thing. The only substantial thing this class
+  handles is scaling up and down to real-world dimensions (internally
+  dimensions are against global staff-space.)
+ */
+
+Paper_def::Paper_def ()
+{
+}
+
+Paper_def::~Paper_def ()
+{
+}
+
+Paper_def::Paper_def (Paper_def const&src)
+  : Music_output_def (src)
+{
+}
+
+Real
+Paper_def::get_realvar (SCM s) const
+{
+  SCM val = lookup_variable (s);
+  SCM scale = lookup_variable (ly_symbol2scm ("outputscale"));
+  
+  Real sc = gh_scm2double (scale);
+  return gh_scm2double (val) / sc;
+}
+
+/*
+  FIXME. This is broken until we have a generic way of
+  putting lists inside the \paper block.
+ */
+Interval
+Paper_def::line_dimensions_int (int n) const
+{
+  Real lw =  get_realvar (ly_symbol2scm ("linewidth"));
+  Real ind = n? 0.0:get_realvar (ly_symbol2scm ("indent"));
+
+  return Interval (ind, lw);
+}
+
+
+
+
+Paper_outputter*
+Paper_def::get_paper_outputter (String outname)  const
+{
+  progress_indication (_f ("paper output to `%s'...",
+                          outname == "-" ? String ("<stdout>") : outname));
+  progress_indication("\n");
+
+  global_input_file->target_strings_.push (outname);
+  Paper_outputter * po = new Paper_outputter (outname);
+  Path p = split_path (outname);
+  p.ext = "";
+  po->basename_ = p.to_string ();
+  return po;
+}
+
+
+/*
+  Todo: use symbols and hashtable idx?
+*/
+Font_metric *
+Paper_def::find_font (SCM fn, Real m)
+{
+  SCM key = gh_cons (fn, gh_double2scm (m));
+  SCM met = scm_assoc (key, scaled_fonts_);
+
+  if (gh_pair_p (met))
+    return unsmob_metrics (ly_cdr (met));
+
+  /*
+    Hmm. We're chaining font - metrics. Should consider wether to merge
+    virtual-font and scaled_font.
+   */
+  Font_metric*  f=0;
+  if (gh_list_p (fn))
+    {
+      f = new Virtual_font_metric (fn, m, this); // TODO: GC protection.
+      
+      scaled_fonts_ = scm_acons (key, f->self_scm (), scaled_fonts_);
+      scm_gc_unprotect_object (f->self_scm ());
+    }
+  else
+    {
+      SCM scale_var = ly_module_lookup (scope_, ly_symbol2scm ("outputscale"));
+
+      m /= gh_scm2double (scm_variable_ref (scale_var));
+
+      f = all_fonts_global->find_font (ly_scm2string (fn));
+      SCM val = Scaled_font_metric::make_scaled_font_metric (f, m);
+      scaled_fonts_ = scm_acons (key, val, scaled_fonts_);
+      scm_gc_unprotect_object (val);
+      
+      f = unsmob_metrics (val);
+    }
+
+  return f;
+}
+
+
+/*
+  Return alist to translate internally used fonts back to real-world
+  coordinates.  */
+SCM
+Paper_def::font_descriptions ()const
+{
+  SCM l = SCM_EOL;
+  for (SCM s = scaled_fonts_; gh_pair_p (s); s = ly_cdr (s))
+    {
+      SCM desc = ly_caar (s);
+      if (!gh_string_p (gh_car (desc)))
+       continue ;
+
+      SCM mdesc = unsmob_metrics (ly_cdar (s))->description_;
+
+      l = gh_cons (gh_cons (mdesc, desc), l);
+    }
+  return l;
+}
+
+Paper_def* 
+unsmob_paper (SCM x)
+{
+  return dynamic_cast<Paper_def*> (unsmob_music_output_def (x));
+}
+  
+
+LY_DEFINE (ly_paper_def_p, "ly:paper-def?",
+          1, 0,0, (SCM def),
+          "Is @var{def} a paper definition?")
+{
+  Paper_def *op = dynamic_cast<Paper_def*> (unsmob_music_output_def (def));
+
+  bool pap = op;
+  return gh_bool2scm (pap);
+}
diff --git a/lily/paper-line.cc b/lily/paper-line.cc
new file mode 100644 (file)
index 0000000..94a35cc
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+  paper-line.cc -- implement Paper_line
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 2004 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+#include "paper-line.hh"
+#include "ly-smobs.icc"
+#include "string.hh" // to_string
+
+#define TITLE_PENALTY -1
+
+Paper_line::Paper_line (Offset o, SCM stencils, bool is_title)
+{
+  dim_ = o;
+  stencils_ = stencils;
+  is_title_ = is_title;
+  smobify_self ();
+}
+
+Paper_line::~Paper_line ()
+{
+}
+
+IMPLEMENT_SMOBS (Paper_line);
+IMPLEMENT_TYPE_P (Paper_line, "ly:paper-line?");
+IMPLEMENT_DEFAULT_EQUAL_P (Paper_line);
+
+SCM
+Paper_line::mark_smob (SCM s)
+{
+  Paper_line *line = (Paper_line*) ly_cdr (s);
+  return line->stencils_;
+}
+
+int
+Paper_line::print_smob (SCM s, SCM port, scm_print_state*)
+{
+  scm_puts ("#<Paper_line ", port);
+  Paper_line *line = (Paper_line*) ly_cdr (s);
+  scm_puts (to_string (line->number_).to_str0 (), port);
+  if (line->is_title ())
+    scm_puts (" t", port);
+  scm_puts (" >", port);
+  return 1;
+}
+
+Offset
+Paper_line::dim () const
+{
+  return dim_;
+}
+
+bool
+Paper_line::is_title () const
+{
+  return is_title_;
+}
+
+SCM
+Paper_line::stencils () const
+{
+  return stencils_;
+}
+
+LY_DEFINE (ly_paper_line_height, "ly:paper-line-height",
+          1, 0, 0, (SCM line),
+          "Return the height of @var{line}.")
+{
+  Paper_line *pl = unsmob_paper_line (line);
+  SCM_ASSERT_TYPE (pl, line, SCM_ARG1, __FUNCTION__, "paper-line");
+  return gh_double2scm (pl->dim ()[Y_AXIS]);
+}
+
+LY_DEFINE (ly_paper_line_number, "ly:paper-line-number",
+          1, 0, 0, (SCM line),
+          "Return the number of @var{line}.")
+{
+  Paper_line *pl = unsmob_paper_line (line);
+  SCM_ASSERT_TYPE (pl, line, SCM_ARG1, __FUNCTION__, "paper-line");
+  return gh_int2scm (pl->number_);
+}
+
+LY_DEFINE (ly_paper_line_break_score, "ly:paper-line-break-score",
+          1, 0, 0, (SCM line),
+          "Return the score for breaking after @var{line}.")
+{
+  Paper_line *pl = unsmob_paper_line (line);
+  SCM_ASSERT_TYPE (pl, line, SCM_ARG1, __FUNCTION__, "paper-line");
+  return gh_int2scm (int (pl->is_title ()) * TITLE_PENALTY);
+}
index bb9c3812cf8ed9138793f8a04dcc8f1efdaf3c48..4882386cfcd5ef785d41eced4abc49012646e48e 100644 (file)
   source file of the GNU LilyPond music typesetter
 
   (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-                 Jan Nieuwenhuizen <janneke@gnu.org>
+  Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
-#include <math.h>
 #include <time.h>
+#include <math.h>
 
-#include "array.hh"
 #include "dimensions.hh"
-#include "file-name.hh"
-#include "font-metric.hh"
-#include "input-smob.hh"
-#include "lily-guile.hh"
-#include "lily-version.hh"
-#include "ly-module.hh"
-#include "main.hh"
-#include "output-def.hh"
-#include "paper-book.hh"
+#include "virtual-methods.hh"
 #include "paper-outputter.hh"
-#include "paper-system.hh"
-#include "scm-hash.hh"
 #include "stencil.hh"
+#include "array.hh"
 #include "string-convert.hh"
 #include "warn.hh"
-
-#include "ly-smobs.icc"
+#include "font-metric.hh"
+#include "main.hh"
+#include "scm-hash.hh"
+#include "lily-version.hh"
+#include "paper-def.hh"
+#include "input-file-results.hh"
+#include "ly-module.hh"
+#include "paper-book.hh"
+#include "paper-line.hh"
+#include "input-smob.hh"  // output_expr
 
 
-Paper_outputter::Paper_outputter (String filename, String format)
+Paper_outputter::Paper_outputter (String name)
 {
-  file_ = SCM_EOL;
-  output_module_ = SCM_EOL;
-  smobify_self ();
+  if (safe_global_b)
+    scm_define (ly_symbol2scm ("safe-mode?"), SCM_BOOL_T);      
   
-  filename_ = filename;
-  String module_name = "scm output-" + format;
-  output_module_ = scm_c_resolve_module (module_name.to_str0 ());
+  file_ = scm_open_file (scm_makfrom0str (name.to_str0 ()),
+                        scm_makfrom0str ("w"));
+
+  if (output_format_global == PAGE_LAYOUT)
+    {
+      output_func_ = SCM_EOL;
+      String name = "scm output-" + output_format_global;
+      if (safe_global_b)
+       {
+         /* In safe mode, start from a GUILE safe-module and import
+            all symbols from the output module.  */
+         scm_c_use_module ("ice-9 safe");
+         SCM msm = scm_primitive_eval (ly_symbol2scm ("make-safe-module"));
+         output_module_ = scm_call_0 (msm);
+         ly_import_module (output_module_,
+                           scm_c_resolve_module (name.to_str0 ()));
+       }
+      else
+       output_module_ = scm_c_resolve_module (name.to_str0 ());
+
+      /* FIXME: output-lib should be module, that can be imported.  */
+#define IMPORT_LESS 1 // only import the list of IMPORTS
+#if IMPORT_LESS
+      scm_c_use_module ("lily");
+      scm_c_use_module ("ice-9 regex");
+      scm_c_use_module ("srfi srfi-13");
+#endif
+      char const *imports[] = {
+       "lilypond-version",          /* from lily */
+       "ly:output-def-scope",
+       "ly:gulp-file",
+       "ly:number->string",
+       "ly:ragged-page-breaks",
+       "ly:optimal-page-breaks",
+       
+       "ly:number-pair->string",    /* output-lib.scm */
+       "ly:numbers->string",
+       "ly:inexact->string",
+       
+       "assoc-get",
+#if IMPORT_LESS        
+       "string-index",              /* from srfi srfi-13 */
+       "string-join",
+       "regexp-substitute/global",  /* from (ice9 regex) */
+#endif 
+       0,
+      };
+      
+      for (int i = 0; imports[i]; i++)
+       {
+         SCM s = ly_symbol2scm (imports[i]);
+         scm_module_define (output_module_, s, scm_primitive_eval (s));
+       }
+#ifndef IMPORT_LESS  // rather crude, esp for safe-mode let's not
+      SCM m = scm_set_current_module (output_module_);
+      /* not present in current module*/
+      scm_c_use_module ("ice-9 regex");
+      scm_c_use_module ("srfi srfi-13");
+      /* Need only a few of these, see above
+        scm_c_use_module ("lily"); */
+      scm_set_current_module (m);
+#endif
+    }
+  else
+    {
+      output_func_
+       = scm_call_1 (ly_scheme_function ("find-dumper"),
+                     scm_makfrom0str (output_format_global.to_str0 ()));
+      output_module_ = SCM_EOL;
+    }
 }
 
 Paper_outputter::~Paper_outputter ()
 {
+  scm_close_port (file_);
+  file_ = SCM_EOL;
 }
 
-
-IMPLEMENT_SMOBS (Paper_outputter);
-IMPLEMENT_DEFAULT_EQUAL_P (Paper_outputter);
-
-SCM
-Paper_outputter::mark_smob (SCM x)
+void
+Paper_outputter::output_scheme (SCM scm)
 {
-  Paper_outputter *p = (Paper_outputter*) SCM_CELL_WORD_1(x);
-  scm_gc_mark (p->output_module_);
-  return p->file_;
+  if (output_format_global == PAGE_LAYOUT)
+    scm_display (scm_eval (scm, output_module_), file_);
+  else
+    gh_call2 (output_func_, scm, file_);
 }
 
-int
-Paper_outputter::print_smob (SCM x, SCM p, scm_print_state*)
+void
+Paper_outputter::output_metadata (Paper_def *paper, SCM scopes)
 {
-  (void) x;
-  scm_puts ("#<Paper_outputter>", p);
-  return 1;
+  SCM fields = SCM_EOL;
+  for (int i = dump_header_fieldnames_global.size (); i--; )
+    fields
+      = gh_cons (ly_symbol2scm (dump_header_fieldnames_global[i].to_str0 ()),
+                fields);
+  output_scheme (scm_list_n (ly_symbol2scm ("output-scopes"),
+                            paper->self_scm (),
+                            ly_quote_scm (scopes),
+                            ly_quote_scm (fields),
+                            scm_makfrom0str (basename_.to_str0 ()), 
+                            SCM_UNDEFINED));
 }
 
-SCM
-Paper_outputter::file ()
+void
+Paper_outputter::output_header (Paper_def *paper, SCM scopes, int page_count)
 {
-  if (file_ == SCM_EOL)
-    file_ = scm_open_file (scm_makfrom0str (filename_.to_str0 ()),
-                          scm_makfrom0str ("w"));
-  return file_;
-}
+  String creator = gnu_lilypond_version_string ();
+  creator += " (http://lilypond.org)";
+  time_t t (time (0));
+  String time_stamp = ctime (&t);
+  time_stamp = time_stamp.left_string (time_stamp.length () - 1)
+    + " " + *tzname;
+  output_scheme (scm_list_4 (ly_symbol2scm ("header"),
+                            scm_makfrom0str (creator.to_str0 ()),
+                            scm_makfrom0str (time_stamp.to_str0 ()),
+                            scm_int2num (page_count)));
 
-SCM
-Paper_outputter::dump_string (SCM scm)
-{
-  return scm_display (scm, file ());
-}
+  output_metadata (paper, scopes);
+  output_music_output_def (paper);
 
-SCM
-Paper_outputter::scheme_to_string (SCM scm)
-{
-  return scm_eval (scm, output_module_);
+  output_scheme (scm_list_1 (ly_symbol2scm ("header-end")));
+  output_scheme (scm_list_2 (ly_symbol2scm ("define-fonts"),
+                            ly_quote_scm (paper->font_descriptions ())));
 }
 
 void
-Paper_outputter::output_scheme (SCM scm)
+Paper_outputter::output_line (SCM line, Offset *origin, bool is_last)
 {
-  dump_string (scheme_to_string (scm));
-}
+  Paper_line *pl = unsmob_paper_line (line);
+  Offset dim = pl->dim ();
+  if (dim[Y_AXIS] > 50 CM)
+    {
+      programming_error ("Improbable system height.");
+      dim[Y_AXIS] = 50 CM;
+    }
 
-void
-paper_outputter_dump (void *po, SCM x)
-{
-  Paper_outputter *me = (Paper_outputter*) po;
-  me->output_scheme (x);
-}
+  if (output_format_global != PAGE_LAYOUT)
+    output_scheme (scm_list_3 (ly_symbol2scm ("start-system"),
+                              gh_double2scm (dim[X_AXIS]),
+                              gh_double2scm (dim[Y_AXIS])));
+  else
+    {
+      output_scheme (scm_list_3 (ly_symbol2scm ("new-start-system"),
+                                ly_quote_scm (ly_offset2scm (*origin)),
+                                ly_quote_scm (ly_offset2scm (dim))));
+      (*origin)[Y_AXIS] += dim[Y_AXIS];
+    }
 
-void
-Paper_outputter::output_stencil (Stencil stil)
-{
-  interpret_stencil_expression (stil.expr (), paper_outputter_dump,
-                                (void*) this, Offset (0,0));
-}
+  SCM between = SCM_EOL;
+  for (SCM s = pl->stencils (); gh_pair_p (s); s = ly_cdr (s))
+    {
+      Stencil *stil = unsmob_stencil (ly_car (s));
+      if (stil)
+       output_expr (stil->get_expr (), Offset (0,0));
+      /* Only if !PAGE_LAYOUT */
+      else if (ly_caar (s) == ly_symbol2scm ("between-system-string"))
+       between = ly_cdar (s);
+    }
 
-Paper_outputter *
-get_paper_outputter (String outname, String f) 
-{
-  progress_indication (_f ("paper output to `%s'...",
-                          outname == "-" ? String ("<stdout>") : outname));
-  return new Paper_outputter (outname, f);
+  if (is_last)
+    output_scheme (scm_list_1 (ly_symbol2scm ("stop-last-system")));
+  else
+    {
+      output_scheme (scm_list_1 (ly_symbol2scm ("stop-system")));
+      if (output_format_global != PAGE_LAYOUT && between != SCM_EOL)
+       output_scheme (between);
+    }
 }
 
-/* FIXME: why is output_* wrapper called dump?  */
-LY_DEFINE (ly_outputter_dump_stencil, "ly:outputter-dump-stencil",
-          2, 0, 0, (SCM outputter, SCM stencil),
-          "Dump stencil @var{expr} onto @var{outputter}.")
+void
+Paper_outputter::output_music_output_def (Music_output_def* odef)
 {
-  Paper_outputter *po = unsmob_outputter (outputter);
-  Stencil *st = unsmob_stencil (stencil);
-  SCM_ASSERT_TYPE (po, outputter, SCM_ARG1, __FUNCTION__, "Paper_outputter");
-  SCM_ASSERT_TYPE (st, stencil, SCM_ARG1, __FUNCTION__, "Paper_outputter");
-  po->output_stencil (*st);
-  return SCM_UNSPECIFIED;
+  output_scheme (scm_list_n (ly_symbol2scm ("output-paper-def"),
+                            odef->self_scm (), SCM_UNDEFINED));
 }
 
-LY_DEFINE (ly_outputter_dump_string, "ly:outputter-dump-string",
-          2, 0, 0, (SCM outputter, SCM str),
-          "Dump @var{str} onto @var{outputter}.")
+/* TODO: replaceme/rewriteme, see output-ps.scm: output-stencil  */
+void
+Paper_outputter::output_expr (SCM expr, Offset o)
 {
-  Paper_outputter *po = unsmob_outputter (outputter);
-  SCM_ASSERT_TYPE (po, outputter, SCM_ARG1, __FUNCTION__, "Paper_outputter");
-  SCM_ASSERT_TYPE (ly_c_string_p (str), str, SCM_ARG1, __FUNCTION__, "Paper_outputter");
+  while (1)
+    {
+      if (!gh_pair_p (expr))
+       return;
   
-  return po->dump_string (str);
+      SCM head =ly_car (expr);
+      if (unsmob_input (head))
+       {
+         Input * ip = unsmob_input (head);
+      
+         output_scheme (scm_list_n (ly_symbol2scm ("define-origin"),
+                                    scm_makfrom0str (ip->file_string ().to_str0 ()),
+                                    gh_int2scm (ip->line_number ()),
+                                    gh_int2scm (ip->column_number ()),
+                                    SCM_UNDEFINED));
+         expr = ly_cadr (expr);
+       }
+      else  if (head ==  ly_symbol2scm ("no-origin"))
+       {
+         output_scheme (scm_list_n (head, SCM_UNDEFINED));
+         expr = ly_cadr (expr);
+       }
+      else if (head == ly_symbol2scm ("translate-stencil"))
+       {
+         o += ly_scm2offset (ly_cadr (expr));
+         expr = ly_caddr (expr);
+       }
+      else if (head == ly_symbol2scm ("combine-stencil"))
+       {
+         output_expr (ly_cadr (expr), o);
+         expr = ly_caddr (expr);
+       }
+      else
+       {
+         output_scheme (scm_list_n (ly_symbol2scm ("placebox"),
+                                    gh_double2scm (o[X_AXIS]),
+                                    gh_double2scm (o[Y_AXIS]),
+                                    expr,
+                                    SCM_UNDEFINED));
+         return;
+       }
+    }
 }
+
index 9d58682b0c3638c5a8309630a6e122057a22d4f1..1eab7f80f6bc4b54db8cdb55d60f47f415ff191b 100644 (file)
@@ -6,22 +6,26 @@
   (c) 1996--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#include "all-font-metrics.hh"
-#include "font-metric.hh"
-#include "gourlay-breaking.hh"
-#include "ly-module.hh"
+#include "score.hh"
 #include "main.hh"
-#include "misc.hh"
-#include "output-def.hh"
-#include "paper-book.hh"
+#include "warn.hh"
+#include "font-metric.hh"
+#include "spanner.hh"
+#include "paper-def.hh"
+#include "system.hh"
 #include "paper-column.hh"
 #include "paper-score.hh"
+#include "paper-column.hh"
 #include "scm-hash.hh"
-#include "score.hh"
-#include "spanner.hh"
+#include "gourlay-breaking.hh"
+//#include "paper-outputter.hh"
+#include "input-file-results.hh"
+#include "misc.hh"
+#include "all-font-metrics.hh"
+
 #include "stencil.hh"
-#include "system.hh"
-#include "warn.hh"
+#include "paper-book.hh"
+#include "ly-module.hh"
 
 Paper_score::Paper_score ()
 {
@@ -41,7 +45,7 @@ Paper_score::typeset_line (System *system)
   if (!system_)
     system_ = system;
 
-  systems_ = scm_cons (system->self_scm (), systems_);
+  systems_ = gh_cons (system->self_scm (), systems_);
   system->pscore_ = this;
 
   scm_gc_unprotect_object (system->self_scm ());
@@ -50,7 +54,7 @@ Paper_score::typeset_line (System *system)
 Array<Column_x_positions>
 Paper_score::calc_breaking ()
 {
-  Break_algorithm *algorithm = 0;
+  Break_algorithm *algorithm=0;
   Array<Column_x_positions> sol;
 
   algorithm = new Gourlay_breaking ;
@@ -84,11 +88,8 @@ Paper_score::process (String)
   Array<Column_x_positions> breaking = calc_breaking ();
   system_->break_into_pieces (breaking);
   SCM lines = system_->get_lines ();
-#if 0
-  /* gourlay:do_solve also prints newline.  */
   progress_indication ("\n");
-#endif
-  
+
   /* Only keep result stencils in lines_, *title_; delete all grobs.  */
   systems_ = SCM_EOL;
   
diff --git a/lily/paper-system.cc b/lily/paper-system.cc
deleted file mode 100644 (file)
index 340667b..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
-  paper-system.cc -- implement Paper_system
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 2004 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#include "paper-system.hh"
-#include "stencil.hh"
-#include "string.hh"
-#include "virtual-methods.hh"
-
-#include "ly-smobs.icc"
-
-IMPLEMENT_SMOBS (Paper_system);
-IMPLEMENT_TYPE_P (Paper_system, "ly:paper-system?");
-IMPLEMENT_DEFAULT_EQUAL_P (Paper_system);
-
-
-
-Paper_system::Paper_system (Stencil s, bool is_title)
-{
-  is_title_ = is_title;
-  number_ = 0;
-  penalty_ = 0;
-  smobify_self ();
-  stencil_ = s;
-}
-
-Paper_system::~Paper_system ()
-{
-}
-
-SCM
-Paper_system::mark_smob (SCM smob)
-{
-  Paper_system *line = (Paper_system*) ly_cdr (smob);
-  return line-> stencil_.expr ();
-}
-
-int
-Paper_system::print_smob (SCM smob, SCM port, scm_print_state*)
-{
-  Paper_system *p = (Paper_system*) ly_cdr (smob);
-  scm_puts ("#<", port);
-  scm_puts (classname (p), port);
-  scm_puts (" ", port);
-  scm_puts (to_string (p->number_).to_str0 (), port);
-  scm_puts ("p ", port);
-  scm_puts (to_string (p->penalty_).to_str0 (), port);
-  if (p->is_title ())
-    scm_puts (" t", port);
-  scm_puts (" >", port);
-  return 1;
-}
-
-bool
-Paper_system::is_title () const
-{
-  return is_title_;
-}
-
-Real
-Paper_system::penalty () const
-{
-  return penalty_;
-}
-
-Offset
-Paper_system::dim () const
-{
-  return Offset (stencil_.extent (X_AXIS).length (),
-                stencil_.extent (Y_AXIS).length ());
-}
-
-Stencil
-Paper_system::to_stencil () const
-{
-  return stencil_;
-}
-
-LY_DEFINE (ly_paper_line_height, "ly:paper-system-extent",
-          2, 0, 0, (SCM line, SCM axis),
-          "Return the extent of @var{line}.")
-{
-  Paper_system *pl = unsmob_paper_line (line);
-  SCM_ASSERT_TYPE (pl, line, SCM_ARG1, __FUNCTION__, "paper-system");
-  SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
-  Axis ax = (Axis)ly_scm2int (axis);
-  return scm_make_real (pl->dim ()[ax]);
-}
-
-
-
-LY_DEFINE (ly_paper_line_title_p, "ly:paper-system-title?",
-          1, 0, 0, (SCM line),
-          "Is  @var{line} a title line?")
-{
-  Paper_system *pl = unsmob_paper_line (line);
-  SCM_ASSERT_TYPE (pl, line, SCM_ARG1, __FUNCTION__, "paper-system");
-  return SCM_BOOL (pl->is_title ());
-}
-
-LY_DEFINE (ly_paper_line_number, "ly:paper-system-number",
-          1, 0, 0, (SCM line),
-          "Return the number of @var{line}.")
-{
-  Paper_system *pl = unsmob_paper_line (line);
-  SCM_ASSERT_TYPE (pl, line, SCM_ARG1, __FUNCTION__, "paper-system");
-  return scm_int2num (pl->number_);
-}
-
-LY_DEFINE (ly_paper_line_break_score, "ly:paper-system-break-penalty",
-          1, 0, 0, (SCM line),
-          "Return the score for page break after @var{line}.")
-{
-  Paper_system *pl = unsmob_paper_line (line);
-  SCM_ASSERT_TYPE (pl, line, SCM_ARG1, __FUNCTION__, "paper-system");
-  return scm_int2num (int (pl->penalty ()));
-}
-
-LY_DEFINE (ly_paper_line_stencil, "ly:paper-system-stencil",
-          1, 0, 0, (SCM line),
-          "Return the height of @var{line}.")
-{
-  Paper_system *pl = unsmob_paper_line (line);
-  SCM_ASSERT_TYPE (pl, line, SCM_ARG1, __FUNCTION__, "paper-system");
-  return pl->to_stencil ().smobbed_copy ();
-}
-
index 5156ae6623e502481f6ab7704494d90eec396de1..c30547f71f92fcdd90421df9461331d8411c602c 100644 (file)
    
    Thanks to Gary Houston <ghouston@freewire.co.uk>  */
 SCM
-internal_ly_parse_scm (Parse_start * ps)
+internal_ly_parse_scm (Parse_start * ps, bool safe)
 {
-  Source_file *sf =ps->start_location_.source_file_;
+  Source_filesf =ps->start_location_.source_file_;
   SCM port = sf->get_port ();
 
-  int off = ps->start_location_.defined_str0_ - sf->to_str0 ();
+  int off = ps->start_location_.defined_str0_ - sf->to_str0();
   
   scm_seek (port, scm_long2num (off), scm_long2num (SEEK_SET));
   SCM from = scm_ftell (port);
@@ -26,12 +26,20 @@ internal_ly_parse_scm (Parse_start * ps)
   SCM form;
   SCM answer = SCM_UNSPECIFIED;
 
-  /* Read expression from port */
+  /* Read expression from port */
   if (!SCM_EOF_OBJECT_P (form = scm_read (port)))
     {
-      SCM function = ly_scheme_function ("make-safe-lilypond-module");
-      if (ps->safe_)
-       answer = scm_eval (form, function);
+      if (safe)
+       {
+         static SCM safe_module;
+         if (!safe_module)
+           {
+             safe_module = scm_primitive_eval (ly_symbol2scm ("safe-module"));
+             if (output_format_global == PAGE_LAYOUT)
+               ly_import_module (safe_module, scm_c_resolve_module ("lily"));
+           }
+         answer = scm_eval (form, safe_module);
+       }
       else
        answer = scm_primitive_eval (form);
     }
@@ -40,7 +48,7 @@ internal_ly_parse_scm (Parse_start * ps)
      Shouldn't scm_read () do this for us?  */
   scm_fill_input (port);
   SCM to = scm_ftell (port);
-  ps->nchars = ly_scm2int (to) - ly_scm2int (from);
+  ps->nchars = gh_scm2int (to) - gh_scm2int (from);
 
   /* Don't close the port here; if we re-enter this function via a
      continuation, then the next time we enter it, we'll get an error.
@@ -55,20 +63,26 @@ SCM
 catch_protected_parse_body (void *p)
 {
   Parse_start *ps = (Parse_start*) p;
-  
-  return internal_ly_parse_scm (ps);
+  return internal_ly_parse_scm (ps, false);
+}
+
+SCM
+safe_catch_protected_parse_body (void *p)
+{
+  Parse_start *ps = (Parse_start*) p;
+  return internal_ly_parse_scm (ps, true);
 }
 
 SCM 
-parse_handler (void *data, SCM tag, SCM args)
+parse_handler (void * data, SCM tag, SCM args)
 {
-  Parse_start* ps = (Parse_start *) data;
-  (void) tag;
+  Parse_start* ps = (Parse_start*) data;
+  (void) tag;                  // prevent warning
   
   ps->start_location_.error (_("GUILE signaled an error for the expression beginning here"));
 
   if (scm_ilength (args) > 2)
-    scm_display_error_message (ly_cadr (args), ly_caddr (args), scm_current_error_port ());
+    scm_display_error_message (gh_cadr (args), gh_caddr (args), scm_current_error_port ());
 
   /*
     The following is a kludge; we should probably search for
@@ -92,28 +106,27 @@ parse_handler (void *data, SCM tag, SCM args)
 #endif
 
 SCM
-protected_ly_parse_scm (Parse_start *ps)
+protected_ly_parse_scm (Parse_start *ps, bool safe)
 {
   return scm_internal_catch (ly_symbol2scm (READ_ERROR),
-                            &catch_protected_parse_body,
+                            (safe ? &safe_catch_protected_parse_body
+                             : catch_protected_parse_body),
                             (void*) ps,
                             &parse_handler, (void*) ps);
 }
 
 bool parse_protect_global = true; 
 
-/* Try parsing.  Upon failure return SCM_UNDEFINED.
-   FIXME: shouldn't we return SCM_UNSCPECIFIED -- jcn  */
+/* Try parsing.  Upon failure return SCM_UNDEFINED. */
 SCM
-ly_parse_scm (char const *s, int *n, Input i, bool safe)
+ly_parse_scm (char consts, int *n, Input i, bool safe)
 {
-  Parse_start ps;
+  Parse_start ps ;
   ps.str = s;
   ps.start_location_ = i;
-  ps.safe_ = safe;
-  
-  SCM ans = parse_protect_global ? protected_ly_parse_scm (&ps)
-    : internal_ly_parse_scm (&ps);
+
+  SCM ans = parse_protect_global ? protected_ly_parse_scm (&ps, safe)
+    : internal_ly_parse_scm (&ps, safe);
   *n = ps.nchars;
 
   return ans;  
index 1c2712250f22af04678e7af9bd62604e53e9bd55..9a46520cfdf84110b21bf43155bdc3c7d8ed9460 100644 (file)
@@ -25,30 +25,30 @@ TODO:
 #include <stdio.h>
 
 
-#include "book.hh"
-
+#include "scm-option.hh"
 #include "context-def.hh"
-#include "dimensions.hh"
-#include "event.hh"
-#include "file-path.hh"
-#include "input-smob.hh"
-#include "input.hh"
 #include "lily-guile.hh"
-#include "lilypond-input-version.hh"
-#include "ly-module.hh"
-#include "main.hh"
 #include "misc.hh"
-#include "music-list.hh"
-#include "music-sequence.hh"
 #include "my-lily-lexer.hh"
+#include "paper-def.hh"
+#include "midi-def.hh"
+#include "main.hh"
+#include "file-path.hh"
+#include "warn.hh"
+#include "dimensions.hh"
 #include "my-lily-parser.hh"
-#include "paper-book.hh"
-#include "output-def.hh"
-#include "scm-hash.hh"
-#include "scm-option.hh"
 #include "score.hh"
+#include "input-file-results.hh"
+#include "input.hh"
+#include "lilypond-input-version.hh"
+#include "scm-hash.hh"
+#include "ly-module.hh"
+#include "music-sequence.hh"
+#include "input-smob.hh"
+#include "event.hh"
 #include "text-item.hh"
-#include "warn.hh"
+#include "music-list.hh"
+#include "paper-book.hh"
 
 #define MY_MAKE_MUSIC(x)  make_music_by_name (ly_symbol2scm (x))
 
@@ -58,6 +58,7 @@ SCM get_next_unique_context ();
 
 #define YYERROR_VERBOSE 1
 
+My_lily_parser* my_lily_parser;
 #define YYPARSE_PARAM my_lily_parser
 #define YYLEX_PARAM my_lily_parser
 #define THIS\
@@ -71,16 +72,18 @@ void
 tag_music (Music *m, SCM tag, Input ip)
 {
        SCM tags = m->get_property ("tags");
-       if (ly_c_symbol_p (tag))
+       if (gh_symbol_p (tag))
                tags = scm_cons (tag, tags);
-       else if (ly_c_list_p (tag))
-               tags = ly_append2 (tag, tags);
+       else if (gh_list_p (tag))
+               tags = gh_append2 (tag, tags);
        else
                ip.warning (_ ("Tag must be symbol or list of symbols."));
 
        m->set_property ("tags", tags);
 }
 
+
+
 bool
 is_regular_identifier (SCM id)
 {
@@ -101,17 +104,16 @@ is_regular_identifier (SCM id)
 }
 
 SCM
-make_simple_markup (SCM encoding, SCM a)
+make_simple_markup (SCM a)
 {
        SCM simple = ly_scheme_function ("simple-markup");
-       if (ly_c_symbol_p (encoding))
-               return scm_list_3 (ly_scheme_function ("encoded-simple-markup"),
-                          encoding, a);
+
        return scm_list_2 (simple, a);
 }
 
+
 bool
-is_duration (int t)
+is_is_duration (int t)
 {
   return t && t == 1 << intlog2 (t);
 }
@@ -119,8 +121,10 @@ is_duration (int t)
 void
 set_music_properties (Music *p, SCM a)
 {
-  for (SCM k = a; ly_c_pair_p (k); k = ly_cdr (k))
-       p->internal_set_property (ly_caar (k), ly_cdar (k));
+  for (SCM k = a; gh_pair_p (k); k = ly_cdr (k))
+       {
+       p->internal_set_property (ly_caar (k), ly_cdar (k));
+       }
 }
 
 SCM
@@ -149,8 +153,8 @@ make_chord (SCM pitch, SCM dur, SCM modification_list)
 bool
 ly_input_procedure_p (SCM x)
 {
-       return ly_c_procedure_p (x)
-               || (ly_c_pair_p (x) && ly_c_procedure_p (ly_car (x)));
+       return gh_procedure_p (x)
+               || (gh_pair_p (x) && gh_procedure_p (gh_car (x)));
 }
 
 Music*
@@ -162,50 +166,27 @@ set_property_music (SCM sym, SCM value)
        return p;
 }
 
-Music*
-make_music_relative (Pitch start, Music *music)
-{
-       Music *relative = MY_MAKE_MUSIC ("RelativeOctaveMusic");
-       relative->set_property ("element", music->self_scm ());
-       
-       Pitch last = music->to_relative_octave (start);
-       if (lily_1_8_relative)
-               music->set_property ("last-pitch", last.smobbed_copy ());
-       return relative;
-}
-
-Music*
-make_lyric_combine_music (SCM name, Music *music)
-{
-       Music *combine = MY_MAKE_MUSIC ("NewLyricCombineMusic");
-       combine->set_property ("element", music->self_scm ());
-       combine->set_property ("associated-context", name);
-       return combine;
-}
-
 %}
 
 /* We use SCMs to do strings, because it saves us the trouble of
 deleting them.  Let's hope that a stack overflow doesnt trigger a move
 of the parse stack onto the heap. */
 
-%left NEWLYRICS
 
 %union {
-       Book *book;
-       Output_def *outputdef;
-       SCM scm;
        String *string;
-       Music *music;
-       Score *score;
-       int i;
+    Music *music;
+    Score *score;
+    Music_output_def *outputdef;
+    SCM scm;
+    int i;
 }
 %{
 
 int
 yylex (YYSTYPE *s, void *v)
 {
-       My_lily_parser *pars = (My_lily_parser*) v;
+       My_lily_parser   *pars = (My_lily_parser*) v;
        My_lily_lexer *lex = pars->lexer_;
 
        lex->lexval = (void*) s;
@@ -216,10 +197,19 @@ yylex (YYSTYPE *s, void *v)
 
 %}
 
-%expect 3
+%expect 4
 
 /*
-  Three shift/reduce problems:
+  Four shift/reduce problems:
+
+1.     foo = bar.
+
+       "bar" -> String -> Lyric -> Music -> music-assignment
+
+       "bar" -> String -> string-assignment
+
+
+Similar problem for
 
 2. \markup identifier.
 
@@ -236,24 +226,32 @@ or
     \repeat { \repeat } \alternative 
 
 )
+
+--hwn
+
  */
 
 
 %pure_parser
 
+
 %token ACCEPTS
+%token ADDLYRICS
 %token ADDQUOTE
-%token LYRICSTO
+%token NEWADDLYRICS
 %token ALIAS
 %token ALTERNATIVE
+%token APPLY
+%token APPLYCONTEXT
+%token APPLYOUTPUT
+%token AUTOCHANGE
 %token BAR
-%token BOOK
-%token BOOKPAPER
+%token BREATHE
 %token CHANGE
 %token CHORDMODIFIERS
 %token CHORDS
-%token DOUBLE_ANGLE_OPEN
-%token DOUBLE_ANGLE_CLOSE
+%token LESSLESS
+%token MOREMORE
 %token CLEF
 %token COMMANDSPANREQUEST
 %token CONSISTS
@@ -265,13 +263,15 @@ or
 %token EXTENDER
 %token FIGURES FIGURE_OPEN FIGURE_CLOSE
 %token FIGURE_BRACKET_CLOSE FIGURE_BRACKET_OPEN
+%token GRACE
+%token ACCIACCATURA
+%token APPOGGIATURA
 %token GROBDESCRIPTIONS
 %token HEADER
 %token HYPHEN
 %token INVALID
 %token KEY
 %token LYRICS
-%token LYRICS_STRING
 %token MARK
 %token MIDI
 %token MULTI_MEASURE_REST
@@ -282,6 +282,7 @@ or
 %token ONCE
 %token OVERRIDE SET REVERT
 %token PAPER
+%token PARTCOMBINE
 %token PARTIAL
 %token QUOTE
 %token RELATIVE
@@ -291,7 +292,6 @@ or
 %token SCM_T
 %token SCORE
 %token SEQUENTIAL
-%token NEWLYRICS
 %token SIMULTANEOUS
 %token SKIP
 %token SPANREQUEST
@@ -304,118 +304,99 @@ or
 %token TYPE
 %token UNSET
 %token WITH
-%token MARKUP
 
 /* escaped */
-/* FIXME: this sucks.  The user will get to see these names:
-    syntax error, unexpected E_CHAR:
-               \
-                 %%
-  */
-
 %token E_CHAR E_EXCLAMATION E_SMALLER E_BIGGER E_OPEN E_CLOSE
 %token E_LEFTSQUARE E_RIGHTSQUARE E_TILDE
 %token E_BACKSLASH
+%token <i> E_UNSIGNED
 %token CHORD_BASS CHORD_COLON CHORD_MINUS CHORD_CARET  CHORD_SLASH
 %token FIGURE_SPACE
 
+%type <i>      exclamations questions dots optional_rest
+%type <i>       bass_mod
+%type <scm>    grace_head
+%type <scm>    oct_check
+%type <scm>    context_mod_list
+%type <scm>    lyric_element
+%type <scm>    bass_number br_bass_figure bass_figure figure_list figure_spec
 %token <i>     DIGIT
-%token <i>     UNSIGNED
-%token <i> E_UNSIGNED
-%token <id>    IDENTIFIER
+%token <scm>   NOTENAME_PITCH
+%token <scm>   TONICNAME_PITCH
 %token <scm>   CHORDMODIFIER_PITCH
-%token <scm>   DRUM_PITCH
 %token <scm>   DURATION_IDENTIFIER
+%token <scm>    FRACTION
+%token <id>    IDENTIFIER
+%token DRUMS
+%token <scm>   DRUM_PITCH
+%token <scm>   CHORD_MODIFIER
+%token <scm>   SCORE_IDENTIFIER
+%token <scm>   MUSIC_OUTPUT_DEF_IDENTIFIER
+%token <scm>   NUMBER_IDENTIFIER
 %token <scm>   EVENT_IDENTIFIER
 %token <scm>   MUSIC_IDENTIFIER CONTEXT_DEF_IDENTIFIER
-%token <scm>   NOTENAME_PITCH
-%token <scm>   NUMBER_IDENTIFIER
-%token <scm>   OUTPUT_DEF_IDENTIFIER
+%token <scm>   STRING_IDENTIFIER SCM_IDENTIFIER
 %token <scm>   RESTNAME
-%token <scm>   SCM_T
-%token <scm>   SCORE_IDENTIFIER
 %token <scm>   STRING
-%token <scm>   STRING_IDENTIFIER SCM_IDENTIFIER
-%token <scm>   TONICNAME_PITCH
-%token <scm>   CHORD_MODIFIER
-%token <scm>    FRACTION
+%token <scm>   SCM_T
+%token <i>     UNSIGNED
 %token <scm>   REAL
-%token <scm> MARKUP_HEAD_EMPTY
+
+%token MARKUP
 %token <scm> MARKUP_HEAD_MARKUP0
+%token <scm> MARKUP_HEAD_EMPTY
 %token <scm> MARKUP_HEAD_MARKUP0_MARKUP1
 %token <scm> MARKUP_HEAD_SCM0
 %token <scm> MARKUP_HEAD_SCM0_MARKUP1
 %token <scm> MARKUP_HEAD_SCM0_SCM1
-%token <scm> MARKUP_HEAD_SCM0_SCM1_MARKUP2
 %token <scm> MARKUP_HEAD_SCM0_SCM1_SCM2
-%token <scm> MARKUP_IDENTIFIER MARKUP_HEAD_LIST0
-%token <scm> MUSIC_FUNCTION
-%token <scm> MUSIC_FUNCTION_MUSIC 
-%token <scm> MUSIC_FUNCTION_MUSIC_MUSIC 
-%token <scm> MUSIC_FUNCTION_SCM 
-%token <scm> MUSIC_FUNCTION_SCM_MUSIC 
-%token <scm> MUSIC_FUNCTION_SCM_MUSIC_MUSIC 
-%token <scm> MUSIC_FUNCTION_SCM_SCM_MUSIC 
-%token DRUMS
-
+%token <scm> MARKUP_HEAD_SCM0_SCM1_MARKUP2
 
+%token <scm> MARKUP_IDENTIFIER MARKUP_HEAD_LIST0
+%type <scm> markup markup_line markup_list  markup_list_body full_markup
 
-%type <book>   book_block book_body
-%type <i>      bare_int  bare_unsigned
-%type <i>      exclamations questions dots optional_rest
-%type <i>      script_dir
+%type <outputdef> output_def
+%type <scm>    lilypond_header lilypond_header_body
+%type <music>  open_event close_event
 %type <i>      sub_quotes sup_quotes
+%type <music>  simple_element  event_chord command_element Simple_music  Composite_music
+%type <music>  Repeated_music
+%type <scm>     Alternative_music
 %type <i>      tremolo_type
-%type <i>      bass_mod
+%type <i>      bare_int  bare_unsigned
+%type <i>      script_dir
+%type <scm>    identifier_init
 
-%type <music>  Composite_music Simple_music Prefix_composite_music Generic_prefix_music
-%type <music>  Grouped_music_list
+%type <music> note_chord_element chord_body chord_body_element
+%type <scm>  chord_body_elements
+%type <scm> steno_duration optional_notemode_duration multiplied_duration
+       
+%type <scm>   post_events
+%type <music> gen_text_def direction_less_event direction_reqd_event
+%type <scm>   steno_pitch pitch absolute_pitch pitch_also_in_chords
+%type <scm>    steno_tonic_pitch
+%type <scm>    duration_length fraction
+
+%type <scm> new_chord step_number chord_items chord_item chord_separator step_numbers
+
+%type <scm>  embedded_scm scalar
 %type <music>  Music Sequential_music Simultaneous_music
-%type <music>  Repeated_music
-%type <music>  command_req
-%type <music>  gen_text_def direction_less_event direction_reqd_event
+%type <music>  relative_music re_rhythmed_music
 %type <music>  music_property_def context_change
-%type <music>  note_chord_element chord_body chord_body_element
-%type <music>  open_event close_event
+%type <scm> context_prop_spec
+%type <scm> Music_list
+%type <scm> property_operation context_mod context_def_mod optional_context_mod
+%type <outputdef>  music_output_def_body music_output_def_head
 %type <music>  post_event tagged_post_event
-%type <music>  relative_music re_rhythmed_music
-%type <music>  simple_element event_chord command_element
-%type <music>  string_number_event
-%type <music>  toplevel_music
-%type <music>  tempo_event
-
-%type <outputdef>      output_def_body output_def_head
-%type <outputdef> output_def book_paper_block 
+%type <music> command_req
+%type <music> string_number_event
+%type <scm>    string bare_number number_expression number_term number_factor
+%type <score>  score_block score_body
 
-%type <scm>    Music_list
-%type <scm>    chord_body_elements
-%type <scm>    chord_item chord_items chord_separator new_chord
 %type <scm>    context_def_spec_block context_def_spec_body
-%type <scm>    context_mod context_def_mod optional_context_mod
-%type <scm>    context_prop_spec
-%type <scm>    duration_length fraction
-%type <scm>    embedded_scm scalar
-%type <scm>    identifier_init
-%type <scm>    lilypond_header lilypond_header_body
-%type <scm>    new_lyrics
-%type <scm>    post_events
-%type <scm>    property_operation
+%type <music>  tempo_event
 %type <scm>    script_abbreviation
-%type <scm>    simple_string
-%type <scm>    steno_pitch pitch absolute_pitch pitch_also_in_chords
-%type <scm>    steno_tonic_pitch
-%type <scm>    step_number step_numbers 
-%type <scm>    string bare_number number_expression number_term number_factor
-%type <scm>    bass_number br_bass_figure bass_figure figure_list figure_spec
-%type <scm>    context_mod_list
-%type <scm>    octave_check
-%type <scm>    steno_duration optional_notemode_duration multiplied_duration
-%type <scm>    Generic_prefix_music_scm 
-%type <scm>    lyric_element
-%type <scm>     Alternative_music
-%type <scm>    markup markup_line markup_list markup_list_body full_markup
 
-%type <score>  score_block score_body
 
 
 %left '-' '+'
@@ -428,10 +409,8 @@ prec levels in different prods */
 %%
 
 lilypond:      /* empty */
-       | lilypond toplevel_expression {
-       }
-       | lilypond assignment {
-       }
+       | lilypond toplevel_expression {}
+       | lilypond assignment  { }
        | lilypond error {
                THIS->error_level_ = 1;
        }
@@ -442,50 +421,50 @@ lilypond: /* empty */
 
 toplevel_expression:
        lilypond_header {
-               THIS->lexer_->set_identifier (ly_symbol2scm ("$globalheader"), $1);
+               THIS->input_file_->header_ = $1;
        }
        | add_quote {
-       
-       }
-       | book_block {
-               Book *book = $1;
-               SCM proc = THIS->lexer_->lookup_identifier ("toplevel-book-handler");
-               scm_call_2 (proc, THIS->self_scm (), book->self_scm ());
-               scm_gc_unprotect_object (book->self_scm ());
        }
        | score_block {
-               Score *score = $1;
-               
-               SCM proc = THIS->lexer_->lookup_identifier ("toplevel-score-handler");
-               scm_call_2 (proc, THIS->self_scm (), score->self_scm ());
-               scm_gc_unprotect_object (score->self_scm ());
-       }
-       | toplevel_music {
-               Music *music = $1;
-               SCM proc = THIS->lexer_->lookup_identifier ("toplevel-music-handler");
-               scm_call_2 (proc, THIS->self_scm (), music->self_scm ());
-               scm_gc_unprotect_object (music->self_scm ());
+               Score *sc = $1;
+
+               SCM head = ly_module_p (sc->header_) ? sc->header_ : THIS->input_file_->header_.to_SCM ();
+
+               Path p = split_path (THIS->output_basename_);
+               int *c = &THIS->input_file_->score_count_;
+               if (*c)
+                       {
+                       p.base += "-" + to_string (*c);
+                       }
+
+               (*c)++;
+               SCM outname = scm_makfrom0str (p.to_string ().to_str0());
+
+               for (int i = 0; i < sc->defs_.size (); i++)
+                       default_rendering (sc->music_, sc->defs_[i]->self_scm (), head, outname);
+
+               if (sc->defs_.is_empty ())
+               {
+                  Music_output_def *id = unsmob_music_output_def
+                       (THIS->lexer_->lookup_identifier ("$defaultpaper"));
+                  id = id ? id->clone () : new Paper_def;
+                  default_rendering (sc->music_, id->self_scm (), head,
+                       outname);
+                  scm_gc_unprotect_object (id->self_scm ());
+               }
+               scm_gc_unprotect_object (sc->self_scm ());
        }
        | output_def {
                SCM id = SCM_EOL;
-               Output_def * od = $1;
-
-               if ($1->c_variable ("is-paper") == SCM_BOOL_T)
-                       id = ly_symbol2scm ("$defaultpaper");
-               else if ($1->c_variable ("is-midi") == SCM_BOOL_T)
-                       id = ly_symbol2scm ("$defaultmidi");
-               else if ($1->c_variable ("is-bookpaper") == SCM_BOOL_T)
-                       id = ly_symbol2scm ("$defaultbookpaper");
-
-               THIS->lexer_->set_identifier (id, od->self_scm ());
-               scm_gc_unprotect_object (od->self_scm ());
+               if (dynamic_cast<Paper_def*> ($1))
+                       id = scm_makfrom0str ("$defaultpaper");
+               else if (dynamic_cast<Midi_def*> ($1))
+                       id = scm_makfrom0str ("$defaultmidi");
+               THIS->lexer_->set_identifier (id, $1->self_scm ());
+               scm_gc_unprotect_object ($1->self_scm ());
        }
        ;
 
-toplevel_music:
-       Composite_music {
-       }
-       ;
 
 embedded_scm:
        SCM_T
@@ -493,9 +472,11 @@ embedded_scm:
        ;
 
 
+
+
 lilypond_header_body:
        {
-               $$ = ly_make_anonymous_module (safe_global_b);
+               $$ = ly_make_anonymous_module ();
                THIS->lexer_->add_scope ($$);
        }
        | lilypond_header_body assignment  {
@@ -589,19 +570,19 @@ context_def_spec_body:
                $$ = Context_def::make_scm ();
                unsmob_context_def ($$)->set_spot (THIS->here_input ());
        }
-       | CONTEXT_DEF_IDENTIFIER {
+       | CONTEXT_DEF_IDENTIFIER        {
                $$ = $1;
                unsmob_context_def ($$)->set_spot (THIS->here_input ());
        }
        | context_def_spec_body GROBDESCRIPTIONS embedded_scm {
                Context_def*td = unsmob_context_def ($$);
 
-               for (SCM p = $3; ly_c_pair_p (p); p = ly_cdr (p)) {
-                       SCM tag = ly_caar (p);
+               for (SCM p = $3; gh_pair_p (p); p = ly_cdr (p)) {
+                       SCM tag = gh_caar (p);
 
                        /* TODO: should make new tag "grob-definition" ? */
                        td->add_context_mod (scm_list_3 (ly_symbol2scm ("assign"),
-                                                       tag, scm_cons (ly_cdar (p), SCM_EOL)));
+                                                       tag, gh_cons (ly_cdar (p), SCM_EOL)));
                }
        }
        | context_def_spec_body context_mod {
@@ -609,53 +590,9 @@ context_def_spec_body:
        }
        ;
 
-
-
-book_block:
-       BOOK {
-               THIS->push_spot ();
-       }
-       /*cont*/ '{' book_body '}'      {
-               THIS->pop_spot ();
-               $$ = $4;
-       }
-       ;
-
-/* FIXME:
-   * Use 'handlers' like for toplevel-* stuff?
-   * grok \paper and \midi?  */
-book_body:
-       {
-               $$ = new Book;
-               $$->set_spot (THIS->here_input ());
-               $$->bookpaper_ = dynamic_cast<Output_def*> (unsmob_output_def (THIS->lexer_->lookup_identifier ("$defaultbookpaper"))->clone ());
-               scm_gc_unprotect_object ($$->bookpaper_->self_scm ());
-               $$->header_ = THIS->lexer_->lookup_identifier ("$globalheader"); 
-       }
-       | book_body book_paper_block {
-               $$->bookpaper_ = $2;
-               scm_gc_unprotect_object ($2->self_scm ());
-       }
-       | book_body score_block {
-               Score *score = $2;
-               $$->scores_.push (score);
-               scm_gc_unprotect_object (score->self_scm ());
-       }
-       | book_body Composite_music {
-               Music *music = $2;
-               Score *score
-                       = unsmob_score (ly_music_scorify (music->self_scm ()));
-               $$->scores_.push (score);
-               scm_gc_unprotect_object (music->self_scm ());
-       }
-       | book_body lilypond_header {
-               $$->header_ = $2;
-       }
-       | book_body error {
-
-       }
-       ;
-
+/*
+       SCORE
+*/
 score_block:
        SCORE {
                THIS->push_spot ();
@@ -663,35 +600,30 @@ score_block:
        /*cont*/ '{' score_body '}'     {
                THIS->pop_spot ();
                $$ = $4;
+
        }
        ;
 
 score_body:
-       /**/    {
+       Music   {
                $$ = new Score;
        
                $$->set_spot (THIS->here_input ());
-       }
-       | SCORE_IDENTIFIER {
-               $$ = new Score ( *unsmob_score ($1));
-               $$->set_spot (THIS->here_input ());
-       }
-       | score_body Music {
-               SCM m = $2->self_scm ();
+               SCM m = $1->self_scm ();
                scm_gc_unprotect_object (m);
-       
+
                /*
                        guh.
                */
                SCM check_funcs = ly_scheme_function ("toplevel-music-functions");
-               for (; ly_c_pair_p (check_funcs); check_funcs = ly_cdr (check_funcs))
-                       m = scm_call_1 (ly_car (check_funcs), m);
-               if (unsmob_music ($$->music_))
-               {
-                       THIS->parser_error (_("Already have music in score"));
-                       unsmob_music ($$->music_)->origin ()->error (_("This is the previous music"));
-               }
+               for (; gh_pair_p (check_funcs); check_funcs = gh_cdr (check_funcs))
+                       m = gh_call1 (gh_car (check_funcs), m);
                $$->music_ = m;
+
+       }
+       | SCORE_IDENTIFIER {
+               $$ = new Score ( *unsmob_score ($1));
+               $$->set_spot (THIS->here_input ());
        }
        | score_body lilypond_header    {
                $$->header_ = $2;
@@ -707,48 +639,36 @@ score_body:
 
 
 /*
-       OUTPUT DEF
+       MIDI
 */
-
-book_paper_block:
-       output_def {
+output_def:
+       music_output_def_body '}' {
                $$ = $1;
-               if ($$->lookup_variable (ly_symbol2scm ("is-bookpaper")) != SCM_BOOL_T)
-               {
-                       THIS->parser_error (_("Need \\bookpaper for bookpaper block."));
-                       $$ = get_bookpaper (THIS);
-               }
+               THIS-> lexer_-> remove_scope ();
        }
        ;
 
+music_output_def_head:
+       MIDI    {
+               Music_output_def *id = unsmob_music_output_def (THIS->lexer_->lookup_identifier ("$defaultmidi"));
 
-output_def:
-       output_def_body '}' {
-               $$ = $1;
-               if ($1->parent_)
-                       THIS->lexer_->remove_scope ();
 
-               THIS->lexer_->remove_scope ();
-               THIS->lexer_->pop_state ();
-       }
-       ;
+               Midi_def *p = 0;
+               if (id)
+                       p = dynamic_cast<Midi_def*> (id->clone ());
+               else
+                       p = new Midi_def;
 
-output_def_head:
-       BOOKPAPER {
-               $$ = get_bookpaper (THIS);
-               $$->input_origin_ = THIS->here_input ();
-               THIS->lexer_->add_scope ($$->scope_);
-       }
-       | MIDI    {
-               Output_def *p = get_midi (THIS);
                $$ = p;
                THIS->lexer_->add_scope (p->scope_);
        }
        | PAPER         {
-               Output_def* p = get_paper (THIS);
-
-               if (p->parent_)
-                       THIS->lexer_->add_scope (p->parent_->scope_);
+               Music_output_def *id = unsmob_music_output_def (THIS->lexer_->lookup_identifier ("$defaultpaper"));
+                 Paper_def *p = 0;
+               if (id)
+                       p = dynamic_cast<Paper_def*> (id->clone ());
+               else
+                       p = new Paper_def;
 
                THIS->lexer_->add_scope (p->scope_);
                $$ = p;
@@ -756,38 +676,39 @@ output_def_head:
        ;
 
 
-output_def_body:
-       output_def_head '{' {
+music_output_def_body:
+       music_output_def_head '{' {
                $$ = $1;
-               $$->input_origin_.set_spot (THIS->here_input ());
-               THIS->lexer_->push_initial_state ();
+               $$->input_origin_. set_spot (THIS->here_input ());
+               
        }
-       | output_def_head '{' OUTPUT_DEF_IDENTIFIER     {
+       | music_output_def_head '{' MUSIC_OUTPUT_DEF_IDENTIFIER         {
                scm_gc_unprotect_object ($1->self_scm ());
-               Output_def *o = unsmob_output_def ($3);
+               Music_output_def *o = unsmob_music_output_def ($3);
                o->input_origin_.set_spot (THIS->here_input ());
                $$ = o;
                THIS->lexer_->remove_scope ();
                THIS->lexer_->add_scope (o->scope_);
-               THIS->lexer_->push_initial_state ();
        }
-       | output_def_body assignment  {
+       | music_output_def_body assignment  {
 
        }
-       | output_def_body context_def_spec_block        {
-               assign_context_def ($$, $2);
+       | music_output_def_body context_def_spec_block  {
+               $$->assign_context_def ($2);
        }
-       | output_def_body tempo_event  {
+       | music_output_def_body tempo_event  {
                /*
                        junk this ? there already is tempo stuff in
                        music.
                */
-               int m = ly_scm2int ($2->get_property ("metronome-count"));
+               int m = gh_scm2int ( $2->get_property ("metronome-count"));
                Duration *d = unsmob_duration ($2->get_property ("tempo-unit"));
-               set_tempo ($$, d->get_length (), m);
+               Midi_def *md = dynamic_cast<Midi_def*> ($$);
+               if (md)
+                       md->set_tempo (d->get_length (), m);
                scm_gc_unprotect_object ($2->self_scm ());
        }
-       | output_def_body error {
+       | music_output_def_body error {
 
        }
        ;
@@ -796,7 +717,7 @@ tempo_event:
        TEMPO steno_duration '=' bare_unsigned  {
                $$ = MY_MAKE_MUSIC ("MetronomeChangeEvent");
                $$->set_property ("tempo-unit", $2);
-               $$->set_property ("metronome-count", scm_int2num ( $4));
+               $$->set_property ("metronome-count", gh_int2scm ( $4));
        }
        ;
 
@@ -815,13 +736,11 @@ Music_list:
                SCM s = $$;
                SCM c = scm_cons ($2->self_scm (), SCM_EOL);
                scm_gc_unprotect_object ($2->self_scm ()); /* UGH */
-               if (ly_c_pair_p (ly_cdr (s)))
-                       scm_set_cdr_x (ly_cdr (s), c); /* append */
+               if (gh_pair_p (ly_cdr (s)))
+                       gh_set_cdr_x (ly_cdr (s), c); /* append */
                else
-                       scm_set_car_x (s, c); /* set first cons */
-               scm_set_cdr_x (s, c);  /* remember last cell */
-       }
-       | Music_list embedded_scm {
+                       gh_set_car_x (s, c); /* set first cons */
+               gh_set_cdr_x (s, c);  /* remember last cell */
        }
        | Music_list error {
        }
@@ -842,15 +761,14 @@ Alternative_music:
        }
        ;
 
-
 Repeated_music:
-       REPEAT simple_string bare_unsigned Music Alternative_music
+       REPEAT string bare_unsigned Music Alternative_music
        {
                Music *beg = $4;
                int times = $3;
-               SCM alts = ly_c_pair_p ($5) ? ly_car ($5) : SCM_EOL;
+               SCM alts = gh_pair_p ($5) ? gh_car ($5) : SCM_EOL;
                if (times < scm_ilength (alts)) {
-                 unsmob_music (ly_car (alts))
+                 unsmob_music (gh_car (alts))
                    ->origin ()->warning (
                    _ ("More alternatives than repeats.  Junking excess alternatives."));
                  alts = ly_truncate_list (times, alts);
@@ -867,10 +785,10 @@ Repeated_music:
                        r-> set_property ("element", beg->self_scm ());
                        scm_gc_unprotect_object (beg->self_scm ());
                        }
-               r->set_property ("repeat-count", scm_int2num (times >? 1));
+               r->set_property ("repeat-count", gh_int2scm (times >? 1));
 
                r-> set_property ("elements",alts);
-               if (ly_c_equal_p ($2, scm_makfrom0str ("tremolo"))) {
+               if (gh_equal_p ($2, scm_makfrom0str ("tremolo"))) {
                        /*
                        TODO: move this code to Scheme.
                        */
@@ -893,7 +811,7 @@ Repeated_music:
                                shift -= 1;
                                r->compress (Moment (Rational (1, list_len)));
                                }
-                       scm_call_3 (func, r->self_scm (), scm_int2num (shift),scm_int2num (dots));
+                       gh_call3 (func, r->self_scm (), gh_int2scm (shift),gh_int2scm (dots));
 
                }
                r->set_spot (*$4->origin ());
@@ -931,6 +849,20 @@ Simultaneous_music:
 
 Simple_music:
        event_chord             { $$ = $1; }
+       | APPLYOUTPUT embedded_scm {
+               if (!ly_input_procedure_p ($2))
+                       THIS->parser_error (_ ("\\applycontext takes function argument"));
+               $$ = MY_MAKE_MUSIC ("ApplyOutputEvent");
+               $$->set_property ("procedure", $2);
+               $$->set_spot (THIS->here_input ());
+       }
+       | APPLYCONTEXT embedded_scm {
+               if (!ly_input_procedure_p ($2))
+                       THIS->parser_error (_ ("\\applycontext takes function argument"));
+               $$ = MY_MAKE_MUSIC ("ApplyContext");
+               $$->set_property ("procedure", $2);
+               $$->set_spot (THIS->here_input ());
+       }
        | MUSIC_IDENTIFIER {
                $$ = unsmob_music ($1);
        }
@@ -941,122 +873,103 @@ Simple_music:
 
 optional_context_mod:
        /**/ { $$ = SCM_EOL; }
-       | WITH { THIS->lexer_->push_initial_state (); }
-       '{' context_mod_list '}'
-       {
-               THIS->lexer_->pop_state ();
-               $$ = $4;
-       }
+       | WITH '{' context_mod_list '}'  { $$ = $3; }
+       ;
+
+grace_head:
+       GRACE  { $$ = scm_makfrom0str ("Grace"); }
+       | ACCIACCATURA { $$ = scm_makfrom0str ("Acciaccatura"); }
+       | APPOGGIATURA { $$ = scm_makfrom0str ("Appoggiatura"); }
        ;
 
 context_mod_list:
        /* */  { $$ = SCM_EOL; }
        | context_mod_list context_mod  {
-                $$ = scm_cons ($2, $1);
+                $$ = gh_cons ($2, $1);
        }
        ;
 
-
 Composite_music:
-       Prefix_composite_music { $$ = $1; }
-       | Grouped_music_list { $$ = $1; }
-       ;
-
-Grouped_music_list:
-       Simultaneous_music              { $$ = $1; }
-       | Sequential_music              { $$ = $1; }
-       ;
-
-Generic_prefix_music_scm:
-       MUSIC_FUNCTION {
-               $$ = scm_list_2 ($1, make_input (THIS->here_input ()));
-       }
-       | MUSIC_FUNCTION_SCM {
-               THIS->push_spot ();
-       } embedded_scm {
-               $$ = scm_list_3 ($1, make_input (THIS->pop_spot ()), $3);
+       AUTOCHANGE Music        {
+               SCM proc = ly_scheme_function ("make-autochange-music");
+       
+               SCM res = scm_call_1 (proc, $2->self_scm ());
+               scm_gc_unprotect_object ($2->self_scm ());
+               $$ = unsmob_music (res);
+               scm_gc_protect_object (res);
+               $$->set_spot (THIS->here_input ());
        }
-       | MUSIC_FUNCTION_MUSIC {
-               THIS->push_spot (); 
-       } Music {
-               $$ = scm_list_3 ($1, make_input (THIS->pop_spot ()), $3->self_scm ());
+       | PARTCOMBINE Music Music {
+               SCM proc = ly_scheme_function ("make-part-combine-music");
+
+               SCM res = scm_call_1 (proc, gh_list ($2->self_scm (),
+                       $3->self_scm (), SCM_UNDEFINED));
                scm_gc_unprotect_object ($3->self_scm ());
+               scm_gc_unprotect_object ($2->self_scm ());
+               $$ = unsmob_music (res);
+               scm_gc_protect_object (res);
+               $$->set_spot (THIS->here_input ());
        }
-       | MUSIC_FUNCTION_SCM_MUSIC {
-               THIS->push_spot (); 
-       }  embedded_scm Music {
-               $$ = scm_list_4 ($1, make_input (THIS->pop_spot ()), $3, $4->self_scm ());
-               scm_gc_unprotect_object ($4->self_scm ());
-       }
-       | MUSIC_FUNCTION_MUSIC_MUSIC {
-               THIS->push_spot (); 
-       }  Music  Music {
-               $$ = scm_list_4 ($1, make_input (THIS->pop_spot ()), $3->self_scm (), $4->self_scm ());
-               scm_gc_unprotect_object ($3->self_scm ());
-               scm_gc_unprotect_object ($4->self_scm ());
-       }
-       | MUSIC_FUNCTION_SCM_MUSIC_MUSIC {
-               THIS->push_spot (); 
-       } embedded_scm Music Music {
-               $$ = scm_list_5 ($1, make_input (THIS->pop_spot ()),
-                       $3, $4->self_scm (), $5->self_scm ());
-               scm_gc_unprotect_object ($5->self_scm ());
-               scm_gc_unprotect_object ($4->self_scm ());
-       }
-       ;
-
-Generic_prefix_music:
-       Generic_prefix_music_scm {
-               SCM func = ly_car ($1);
-               Input *loc = unsmob_input (ly_cadr ($1));
-               SCM args = ly_cddr ($1);
-               SCM sig = scm_object_property (func, ly_symbol2scm ("music-function-signature"));
-               int k = 0;
-               bool ok  = true; 
-               for (SCM s = sig, t = args;
-                       ok && ly_c_pair_p (s) && ly_c_pair_p (t);
-                       s = ly_cdr (s), t = ly_cdr (t)) {
-                       k++;
-                       if (scm_call_1 (ly_car (s), ly_car (t)) != SCM_BOOL_T)
-                       {
-                               loc->error (_f ("Argument %d failed typecheck", k));
-                               THIS->error_level_ = 1;
-                               ok = false;
-                       }
+       | grace_head Music {
+#if 1
+       /*
+               The other version is for easier debugging  of
+               Sequential_music_iterator in combination with grace notes.
+       */
+
+/*
+
+TODO: should distinguish between both grace types in the
+basic music objects too, since the meaning is different.
+
+*/
+
+               String start_str = "start" + ly_scm2string ($1) + "Music";
+               String stop_str = "stop" + ly_scm2string ($1) + "Music";
+               
+               SCM start = THIS->lexer_->lookup_identifier (start_str);
+               SCM stop = THIS->lexer_->lookup_identifier (stop_str);
+
+               Music *startm = unsmob_music (start);
+               Music *stopm = unsmob_music (stop);
+
+               SCM ms = SCM_EOL;
+               if (stopm) {
+                       stopm = stopm->clone ();
+                       ms = scm_cons (stopm->self_scm (), ms);
+                       scm_gc_unprotect_object (stopm->self_scm ());
+               }
+               ms = scm_cons ($2->self_scm (), ms);
+               scm_gc_unprotect_object ($2->self_scm ());
+               if (startm) {
+                       startm = startm->clone ();
+                       ms = scm_cons (startm->self_scm (), ms);
+                       scm_gc_unprotect_object (startm->self_scm ());
                }
-               SCM m = SCM_EOL;
-               if (ok)
-                       m = scm_apply_0 (func, ly_cdr ($1));
-               if (unsmob_music (m))
-                       {
-                       $$ = unsmob_music (m);
-                       scm_gc_protect_object (m);
-                       }
-               else 
-                       {
-                       if (ok)
-                               loc->error (_ ("Music head function should return Music object.")); 
-                       $$ = MY_MAKE_MUSIC ("Music");
-                       }
-               $$->set_spot (*loc);
-       }
-       ;
 
+               Music* seq = MY_MAKE_MUSIC ("SequentialMusic");
+               seq->set_property ("elements", ms);
 
-Prefix_composite_music:
-       Generic_prefix_music {
-               $$ = $1;
+               
+               $$ = MY_MAKE_MUSIC ("GraceMusic");
+               $$->set_property ("element", seq->self_scm ());
+               scm_gc_unprotect_object (seq->self_scm ());
+#else
+               $$ = MY_MAKE_MUSIC ("GraceMusic");
+               $$->set_property ("element", $2->self_scm ());
+               scm_gc_unprotect_object ($2->self_scm ());
+#endif
        }
-       | CONTEXT simple_string '=' simple_string optional_context_mod Music {
+       | CONTEXT string '=' string optional_context_mod Music {
                $$ = context_spec_music ($2, $4, $6, $5);
 
        }
-       | CONTEXT simple_string optional_context_mod Music {
+       | CONTEXT STRING optional_context_mod Music {
                $$ = context_spec_music ($2, SCM_UNDEFINED, $4, $3);
        }
-       | NEWCONTEXT simple_string optional_context_mod Music {
-               $$ = context_spec_music ($2, get_next_unique_context (), $4,
-                       $3);
+       | NEWCONTEXT string optional_context_mod Music {
+               $$ = context_spec_music ($2, get_next_unique_context (),
+                                        $4, $3);
        }
 
        | TIMES {
@@ -1066,7 +979,7 @@ Prefix_composite_music:
                fraction Music  
 
        {
-               int n = ly_scm2int (ly_car ($3)); int d = ly_scm2int (ly_cdr ($3));
+               int n = gh_scm2int (ly_car ($3)); int d = gh_scm2int (ly_cdr ($3));
                Music *mp = $4;
 
                $$= MY_MAKE_MUSIC ("TimeScaledMusic");
@@ -1074,12 +987,14 @@ Prefix_composite_music:
 
                $$->set_property ("element", mp->self_scm ());
                scm_gc_unprotect_object (mp->self_scm ());
-               $$->set_property ("numerator", scm_int2num (n));
-               $$->set_property ("denominator", scm_int2num (d));
+               $$->set_property ("numerator", gh_int2scm (n));
+               $$->set_property ("denominator", gh_int2scm (d));
                $$->compress (Moment (Rational (n,d)));
 
        }
        | Repeated_music                { $$ = $1; }
+       | Simultaneous_music            { $$ = $1; }
+       | Sequential_music              { $$ = $1; }
        | TRANSPOSE pitch_also_in_chords pitch_also_in_chords Music {
                $$ = MY_MAKE_MUSIC ("TransposedMusic");
                Music *p = $4;
@@ -1090,6 +1005,23 @@ Prefix_composite_music:
                $$->set_property ("element", p->self_scm ());
                scm_gc_unprotect_object (p->self_scm ());
        }
+       | APPLY embedded_scm Music  {
+               if (!ly_input_procedure_p ($2))
+                       {
+                       THIS->parser_error (_ ("\\apply takes function argument"));
+                       $$ = $3;
+                       }
+               else
+                       {
+                       SCM ret = gh_call1 ($2, $3->self_scm ());
+                       Music *m = unsmob_music (ret);
+                       if (!m) {
+                               THIS->parser_error ("\\apply must return a Music");
+                               m = MY_MAKE_MUSIC ("Music");
+                               }
+                       $$ = m;
+                       }
+       }
        | NOTES
                {
                SCM nn = THIS->lexer_->lookup_identifier ("pitchnames");
@@ -1104,19 +1036,13 @@ Prefix_composite_music:
                SCM nn = THIS->lexer_->lookup_identifier ("drumPitchNames");
                THIS->lexer_->push_note_state (alist_to_hashq (nn));
        }
-       /* FIXME: This used to be: */
        Music
-/*     Grouped_music_list */
                { $$ = $3;
                  THIS->lexer_->pop_state ();
                }
        | FIGURES
                { THIS->lexer_->push_figuredbass_state (); }
-       /* FIXME: This used to be:
        Music
-       but that breaks web build
-       */
-       Grouped_music_list
                {
                  Music *chm = MY_MAKE_MUSIC ("UntransposableMusic");
                  chm->set_property ("element", $3->self_scm ());
@@ -1131,12 +1057,7 @@ Prefix_composite_music:
                nn = THIS->lexer_->lookup_identifier ("pitchnames");
                THIS->lexer_->push_chord_state (alist_to_hashq (nn));
 
-       }
-       /* FIXME:
-       Music
-*/
-       Grouped_music_list
-       {
+       } Music {
                  Music *chm = MY_MAKE_MUSIC ("UnrelativableMusic");
                  chm->set_property ("element", $3->self_scm ());
                  scm_gc_unprotect_object ($3->self_scm ());
@@ -1146,10 +1067,7 @@ Prefix_composite_music:
        }
        | LYRICS
                { THIS->lexer_->push_lyric_state (); }
-       /* FIXME:
        Music
-*/
-       Grouped_music_list
                {
                  $$ = $3;
                  THIS->lexer_->pop_state ();
@@ -1164,75 +1082,34 @@ Prefix_composite_music:
 
 relative_music:
        RELATIVE absolute_pitch Music {
-               Music *m = $3;
-               Pitch start = *unsmob_pitch ($2);
-               $$ = make_music_relative (start, m);
-               scm_gc_unprotect_object (m->self_scm ());
-       }
-       | RELATIVE Composite_music {
-               Music *m = $2;
+               Music *p = $3;
+               Pitch pit = *unsmob_pitch ($2);
+               $$ = MY_MAKE_MUSIC ("RelativeOctaveMusic");
 
-               Pitch middle_c (0, 0, 0);
-               $$ = make_music_relative (middle_c, m);
-               scm_gc_unprotect_object (m->self_scm ());
-       }
-       ;
+               $$->set_property ("element", p->self_scm ());
+               scm_gc_unprotect_object (p->self_scm ());
 
-new_lyrics:
-       NEWLYRICS { THIS->lexer_->push_lyric_state (); }
-       /*cont */
-       Grouped_music_list {
-       /* Can also use Music at the expensive of two S/Rs similar to
-           \repeat \alternative */
-               THIS->lexer_->pop_state ();
-#if 0
-               Music *music = MY_MAKE_MUSIC ("SimultaneousMusic");
-               music->set_property ("elements", scm_list_1 ($3->self_scm ()));
-               $$ = music;
-#else
-               $$ = scm_cons ($3->self_scm (), SCM_EOL);
-#endif
-       }
-       | new_lyrics NEWLYRICS { THIS->lexer_->push_lyric_state (); }
-       Grouped_music_list {
-               THIS->lexer_->pop_state ();
-               $$ = scm_cons ($4->self_scm (), $1);
+
+               Pitch retpitch = p->to_relative_octave (pit);
+               if (lily_1_8_relative)
+                       $$->set_property ("last-pitch", retpitch.smobbed_copy ());
        }
        ;
 
 re_rhythmed_music:
-       Grouped_music_list new_lyrics {
-
-               /* FIXME: should find out uniqueXXX name from music */
-               SCM name = $1->get_property ("context-id");
-               //if (name == SCM_EOL)
-               if (!ly_c_string_p (name))
-                       name = scm_makfrom0str ("");
-
-               SCM context = scm_makfrom0str ("Lyrics");
-               Music *all = MY_MAKE_MUSIC ("SimultaneousMusic");
-
-               SCM lst = SCM_EOL;
-               for (SCM s = $2; ly_c_pair_p (s); s = ly_cdr (s))
-               {
-                       Music *music = unsmob_music (ly_car (s));
-                       Music *com = make_lyric_combine_music (name, music);
-                       Music *csm = context_spec_music (context,
-                               get_next_unique_context (), com, SCM_EOL);
-                       lst = scm_cons (csm->self_scm (), lst);
-               }
-               /* FIXME: only first lyric music is accepted,
-                         the rest is junked */
-               all->set_property ("elements", scm_cons ($1->self_scm (),
-                       lst));
-               $$ = all;
-               scm_gc_unprotect_object ($1->self_scm ());
+       ADDLYRICS Music Music {
+       Music *l = MY_MAKE_MUSIC ("LyricCombineMusic");
+         l->set_property ("elements", gh_list ($2->self_scm (), $3->self_scm (), SCM_UNDEFINED));
+         scm_gc_unprotect_object ($3->self_scm ());
+         scm_gc_unprotect_object ($2->self_scm ());
+         $$ = l;
        }
-       | LYRICSTO string Music {
-               Music *music = $3;
-               SCM name = $2;
-               $$ = make_lyric_combine_music (name, music);
-               scm_gc_unprotect_object (music->self_scm ());
+       | NEWADDLYRICS string Music {
+         Music *l = MY_MAKE_MUSIC ("NewLyricCombineMusic");
+         l->set_property ("element", $3->self_scm ());
+         scm_gc_unprotect_object ($3->self_scm ());
+         $$ = l;
+         l->set_property ("associated-context", $2);
        }
        ;
 
@@ -1248,19 +1125,19 @@ context_change:
        ;
 
 property_operation:
-       STRING '=' scalar {
+       STRING '='  scalar {
                $$ = scm_list_3 (ly_symbol2scm ("assign"),
                        scm_string_to_symbol ($1), $3);
        }
-       | UNSET simple_string {
+       | UNSET STRING {
                $$ = scm_list_2 (ly_symbol2scm ("unset"),
                        scm_string_to_symbol ($2));
        }
-       | OVERRIDE simple_string embedded_scm '=' embedded_scm {
+       | OVERRIDE STRING embedded_scm '=' embedded_scm {
                $$ = scm_list_4 (ly_symbol2scm ("push"),
                        scm_string_to_symbol ($2), $3, $5);
        }
-       | REVERT simple_string embedded_scm {
+       | REVERT STRING embedded_scm {
                $$ = scm_list_3 (ly_symbol2scm ("pop"),
                        scm_string_to_symbol ($2), $3);
        }
@@ -1288,13 +1165,11 @@ context_mod:
        ;
 
 context_prop_spec:
-       simple_string {
-               $$ = scm_list_2 (ly_symbol2scm ("Bottom"),
-                       scm_string_to_symbol ($1));
+       STRING  {
+               $$ = scm_list_2 (ly_symbol2scm ("Bottom"), scm_string_to_symbol ($1));
        }
-       | simple_string '.' simple_string {
-               $$ = scm_list_2 (scm_string_to_symbol ($1),
-                       scm_string_to_symbol ($3));
+       | STRING '.' STRING {
+               $$ = scm_list_2 (scm_string_to_symbol ($1), scm_string_to_symbol ($3));
        }
        ;
 
@@ -1302,30 +1177,30 @@ music_property_def:
        OVERRIDE context_prop_spec embedded_scm '=' scalar {
                $$ = property_op_to_music (scm_list_4 (
                        ly_symbol2scm ("poppush"),
-                       ly_cadr ($2),
+                       gh_cadr ($2),
                        $3, $5));
-               $$= context_spec_music (ly_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
+               $$= context_spec_music (gh_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
        }
        | REVERT context_prop_spec embedded_scm {
                $$ = property_op_to_music (scm_list_3 (
                        ly_symbol2scm ("pop"),
-                       ly_cadr ($2),
+                       gh_cadr ($2),
                        $3));
 
-               $$= context_spec_music (ly_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
+               $$= context_spec_music (gh_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
        }
        | SET context_prop_spec '=' scalar {
                $$ = property_op_to_music (scm_list_3 (
                        ly_symbol2scm ("assign"),
-                       ly_cadr ($2),
+                       gh_cadr ($2),
                        $4));
-               $$= context_spec_music (ly_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
+               $$= context_spec_music (gh_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
        }
        | UNSET context_prop_spec {
                $$ = property_op_to_music (scm_list_2 (
                        ly_symbol2scm ("unset"),
-                       ly_cadr ($2)));
-               $$= context_spec_music (ly_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
+                       gh_cadr ($2)));
+               $$= context_spec_music (gh_car ($2), SCM_UNDEFINED, $$, SCM_EOL);
        }
        | ONCE music_property_def {
                SCM e = $2->get_property ("element");
@@ -1336,43 +1211,16 @@ music_property_def:
        ;
 
 
-string:
-       STRING {
-               $$ = $1;
-       }
-       | STRING_IDENTIFIER {
-               $$ = $1;
-       }
-       | string '+' string {
-               $$ = scm_string_append (scm_list_2 ($1, $3));
-       }
-       ;
-
-simple_string: STRING {
-       }
-       | LYRICS_STRING {
-       }
-       ;
 
-scalar: string {
-       }
-       | LYRICS_STRING {
-       }
-        | bare_int {
-               $$ = scm_int2num ($1);
-       }
-        | embedded_scm {
-       }
-       | full_markup {
-       }
-       | DIGIT {
-               $$ = scm_int2num ($1);
-       }
+scalar:
+        string          { $$ = $1; }
+        | bare_int      { $$ = gh_int2scm ($1); }
+        | embedded_scm  { $$ = $1; }
+       | full_markup {  $$ = $1; }
+       | DIGIT { $$ = gh_int2scm ($1); }
        ;
 
 /*
-FIXME: remove or fix this comment.  What is `This'?
-
 This is a trick:
 
 Adding pre_events to the simple_element
@@ -1399,7 +1247,7 @@ event_chord:
        pre_events simple_element post_events   {
                SCM elts = $2-> get_property ("elements");
 
-               elts = ly_append2 (elts, scm_reverse_x ($3, SCM_EOL));
+               elts = gh_append2 (elts, scm_reverse_x ($3, SCM_EOL));
 
                $2->set_property ("elements", elts);
                $$ = $2;
@@ -1416,9 +1264,9 @@ note_chord_element:
                SCM es = $1->get_property ("elements");
                SCM postevs = scm_reverse_x ($3, SCM_EOL);
 
-               for (SCM s = es; ly_c_pair_p (s); s = ly_cdr (s))
-                 unsmob_music (ly_car (s))->set_property ("duration", dur);
-               es = ly_append2 (es, postevs);
+               for (SCM s = es; gh_pair_p (s); s = gh_cdr (s))
+                 unsmob_music (gh_car (s))->set_property ("duration", dur);
+               es = gh_append2 (es, postevs);
 
                $1-> set_property ("elements", es);
                $$ = $1;
@@ -1431,10 +1279,10 @@ chord_open: '<'
 chord_close: '>'
        ;
 
-simul_open: DOUBLE_ANGLE_OPEN
+simul_open: LESSLESS
        ;
 
-simul_close: DOUBLE_ANGLE_CLOSE
+simul_close: MOREMORE
        ;
 
 chord_body:
@@ -1449,7 +1297,7 @@ chord_body:
 chord_body_elements:
        /* empty */             { $$ = SCM_EOL; }
        | chord_body_elements chord_body_element {
-               $$ = scm_cons ($2->self_scm (), $1);
+               $$ = gh_cons ($2->self_scm (), $1);
                scm_gc_unprotect_object ($2->self_scm ());
        }
        ;
@@ -1464,7 +1312,7 @@ chord_body_element:
                if ($2 % 2 || $3 % 2)
                        n->set_property ("force-accidental", SCM_BOOL_T);
 
-               if (ly_c_pair_p ($4)) {
+               if (gh_pair_p ($4)) {
                        SCM arts = scm_reverse_x ($4, SCM_EOL);
                        n->set_property ("articulations", arts);
                }
@@ -1476,7 +1324,7 @@ chord_body_element:
                n->set_property ("drum-type", $1);
                n->set_spot (THIS->here_input ());
 
-               if (ly_c_pair_p ($2)) {
+               if (gh_pair_p ($2)) {
                        SCM arts = scm_reverse_x ($2, SCM_EOL);
                        n->set_property ("articulations", arts);
                }
@@ -1517,7 +1365,7 @@ command_element:
                        evs = scm_hash_ref (tab, key, SCM_BOOL_F);
                }
                Music *quote = 0;
-               if (ly_c_vector_p (evs))
+               if (gh_vector_p (evs))
                {
                        quote = MY_MAKE_MUSIC ("QuoteMusic");
                        quote->set_property ("duration", $3);
@@ -1531,43 +1379,38 @@ command_element:
        }
        | OCTAVE { THIS->push_spot (); }
          pitch {
-               Music *m = MY_MAKE_MUSIC ("RelativeOctaveCheck");
-               $$ = m;
+               Music *l = MY_MAKE_MUSIC ("RelativeOctaveCheck");
+               $$ = l;
                $$->set_spot (THIS->pop_spot ());
                $$->set_property ("pitch", $3);
        }
        | E_LEFTSQUARE {
-               Music *m = MY_MAKE_MUSIC ("LigatureEvent");
-               m->set_property ("span-direction", scm_int2num (START));
-               m->set_spot (THIS->here_input ());
+               Music *l = MY_MAKE_MUSIC ("LigatureEvent");
+               l->set_property ("span-direction", gh_int2scm (START));
+               l->set_spot (THIS->here_input ());
 
                $$ = MY_MAKE_MUSIC ("EventChord");
-               $$->set_property ("elements", scm_cons (m->self_scm (), SCM_EOL));
-               scm_gc_unprotect_object (m->self_scm ());
+               $$->set_property ("elements", scm_cons (l->self_scm (), SCM_EOL));
+               scm_gc_unprotect_object (l->self_scm ());
                $$->set_spot (THIS->here_input ());
        }
        | E_RIGHTSQUARE {
-               Music *m = MY_MAKE_MUSIC ("LigatureEvent");
-               m->set_property ("span-direction", scm_int2num (STOP));
-               m->set_spot (THIS->here_input ());
+               Music *l = MY_MAKE_MUSIC ("LigatureEvent");
+               l->set_property ("span-direction", gh_int2scm (STOP));
+               l->set_spot (THIS->here_input ());
 
                $$ = MY_MAKE_MUSIC ("EventChord");
-               $$->set_property ("elements", scm_cons (m->self_scm (), SCM_EOL));
+               $$->set_property ("elements", scm_cons (l->self_scm (), SCM_EOL));
                $$->set_spot (THIS->here_input ());
-               scm_gc_unprotect_object (m->self_scm ());
+               scm_gc_unprotect_object (l->self_scm ());
        }
        | E_BACKSLASH {
                $$ = MY_MAKE_MUSIC ("VoiceSeparator");
                $$->set_spot (THIS->here_input ());
        }
        | '|'      {
-               SCM pipe =THIS->lexer_->lookup_identifier ("pipeSymbol");
-
-               if (Music * m = unsmob_music (pipe))
-                       $$ = m->clone ();
-               else
-                       $$ = MY_MAKE_MUSIC ("BarCheck");
 
+               $$ = MY_MAKE_MUSIC ("BarCheck");
                $$->set_spot (THIS->here_input ());
        }
        | TRANSPOSITION pitch {
@@ -1606,7 +1449,7 @@ command_element:
        | TIME_T fraction  {
                SCM proc= ly_scheme_function ("make-time-signature-set");
 
-               SCM result = scm_apply_2   (proc, ly_car ($2), ly_cdr ($2), SCM_EOL);
+               SCM result = scm_apply_2   (proc, gh_car ($2), gh_cdr ($2), SCM_EOL);
                scm_gc_protect_object (result);
                $$ = unsmob_music (result);
        }
@@ -1620,7 +1463,10 @@ command_element:
        ;
 
 command_req:
-       E_TILDE {
+       BREATHE {
+               $$ = MY_MAKE_MUSIC ("BreathingSignEvent");
+       }
+       | E_TILDE {
                $$ = MY_MAKE_MUSIC ("PesOrFlexaEvent");
        }
        | MARK DEFAULT  {
@@ -1656,7 +1502,7 @@ post_events:
        }
        | post_events post_event {
                $2->set_spot (THIS->here_input ());
-               $$ = scm_cons ($2->self_scm (), $$);
+               $$ = gh_cons ($2->self_scm (), $$);
                scm_gc_unprotect_object ($2->self_scm ());
        }
        | post_events tagged_post_event {
@@ -1690,12 +1536,12 @@ post_event:
        }
        | script_dir direction_reqd_event {
                if ($1)
-                       $2->set_property ("direction", scm_int2num ($1));
+                       $2->set_property ("direction", gh_int2scm ($1));
                $$ = $2;
        }
        | script_dir direction_less_event {
                if ($1)
-                       $2->set_property ("direction", scm_int2num ($1));
+                       $2->set_property ("direction", gh_int2scm ($1));
                $$ = $2;
        }
        | string_number_event
@@ -1704,7 +1550,7 @@ post_event:
 string_number_event:
        E_UNSIGNED {
                Music *s = MY_MAKE_MUSIC ("StringNumberEvent");
-               s->set_property ("string-number", scm_int2num ($1));
+               s->set_property ("string-number", gh_int2scm ($1));
                s->set_spot (THIS->here_input ());
                $$ = s;
        }
@@ -1726,13 +1572,13 @@ configurable, i.e.
 */
                Music *m = MY_MAKE_MUSIC ("BeamEvent");
                m->set_spot (THIS->here_input ());
-               m->set_property ("span-direction", scm_int2num (START));
+               m->set_property ("span-direction", gh_int2scm (START));
                $$ = m;
        }
        | ']'  {
                Music *m = MY_MAKE_MUSIC ("BeamEvent");
                m->set_spot (THIS->here_input ());
-               m->set_property ("span-direction", scm_int2num (STOP));
+               m->set_property ("span-direction", gh_int2scm (STOP));
                $$ = m;
        }
        | '~' {
@@ -1743,12 +1589,12 @@ configurable, i.e.
        | close_event {
                $$ = $1;
                dynamic_cast<Music *> ($$)->set_property ("span-direction",
-                       scm_int2num (START));
+                       gh_int2scm (START));
        }
        | open_event {
                $$ = $1;
                dynamic_cast<Music *> ($$)->set_property ("span-direction",
-                       scm_int2num (STOP));
+                       gh_int2scm (STOP));
        }
        | EVENT_IDENTIFIER      {
                $$ = unsmob_music ($1);
@@ -1756,7 +1602,7 @@ configurable, i.e.
        | tremolo_type  {
                Music *a = MY_MAKE_MUSIC ("TremoloEvent");
                a->set_spot (THIS->here_input ());
-               a->set_property ("tremolo-type", scm_int2num ($1));
+               a->set_property ("tremolo-type", gh_int2scm ($1));
                $$ = a;
         }
        ;       
@@ -1768,18 +1614,18 @@ direction_reqd_event:
        | script_abbreviation {
                SCM s = THIS->lexer_->lookup_identifier ("dash" + ly_scm2string ($1));
                Music *a = MY_MAKE_MUSIC ("ArticulationEvent");
-               if (ly_c_string_p (s))
+               if (gh_string_p (s))
                        a->set_property ("articulation-type", s);
                else THIS->parser_error (_ ("Expecting string as script definition"));
                $$ = a;
        }
        ;
 
-octave_check:
+oct_check:
        /**/ { $$ = SCM_EOL; }
-       | '='  { $$ = scm_int2num (0); }
-       | '=' sub_quotes { $$ = scm_int2num ($2); }
-       | '=' sup_quotes { $$ = scm_int2num ($2); }
+       | '='  { $$ = gh_int2scm (0); }
+       | '=' sub_quotes { $$ = gh_int2scm ($2); }
+       | '=' sup_quotes { $$ = gh_int2scm ($2); }
        ;
 
 sup_quotes:
@@ -1888,8 +1734,7 @@ open_event:
        | E_CLOSE       {
                Music *s= MY_MAKE_MUSIC ("PhrasingSlurEvent");
                $$ = s;
-               s->set_property ("span-type",
-                       scm_makfrom0str ("phrasing-slur"));
+               s->set_property ("span-type", scm_makfrom0str ( "phrasing-slur"));
                s->set_spot (THIS->here_input ());
        }
        ;
@@ -1903,15 +1748,14 @@ gen_text_def:
        }
        | string {
                Music *t = MY_MAKE_MUSIC ("TextScriptEvent");
-               t->set_property ("text",
-                       make_simple_markup (THIS->lexer_->encoding (), $1));
+               t->set_property ("text", make_simple_markup ($1));
                t->set_spot (THIS->here_input ());
                $$ = t;
        
        }
        | DIGIT {
                Music *t = MY_MAKE_MUSIC ("FingerEvent");
-               t->set_property ("digit", scm_int2num ($1));
+               t->set_property ("digit", gh_int2scm ($1));
                t->set_spot (THIS->here_input ());
                $$ = t;
        }
@@ -1978,7 +1822,7 @@ optional_notemode_duration:
 steno_duration:
        bare_unsigned dots              {
                int len = 0;
-               if (!is_duration ($1))
+               if (!is_is_duration ($1))
                        THIS->parser_error (_f ("not a duration: %d", $1));
                else
                        len = intlog2 ($1);
@@ -1993,6 +1837,9 @@ steno_duration:
        }
        ;
 
+
+
+
 multiplied_duration:
        steno_duration {
                $$ = $1;
@@ -2001,7 +1848,7 @@ multiplied_duration:
                $$ = unsmob_duration ($$)->compressed ( $3) .smobbed_copy ();
        }
        | multiplied_duration '*' FRACTION {
-               Rational  m (ly_scm2int (ly_car ($3)), ly_scm2int (ly_cdr ($3)));
+               Rational  m (gh_scm2int (ly_car ($3)), gh_scm2int (ly_cdr ($3)));
 
                $$ = unsmob_duration ($$)->compressed (m).smobbed_copy ();
        }
@@ -2010,7 +1857,7 @@ multiplied_duration:
 fraction:
        FRACTION { $$ = $1; }
        | UNSIGNED '/' UNSIGNED {
-               $$ = scm_cons (scm_int2num ($1), scm_int2num ($3));
+               $$ = scm_cons (gh_int2scm ($1), gh_int2scm ($3));
        }
        ;
 
@@ -2023,27 +1870,29 @@ dots:
        }
        ;
 
+
 tremolo_type:
        ':'     {
                $$ = 0;
        }
        | ':' bare_unsigned {
-               if (!is_duration ($2))
+               if (!is_is_duration ($2))
                        THIS->parser_error (_f ("not a duration: %d", $2));
                $$ = $2;
        }
        ;
 
+
+
+/*****************************************************************
+               BASS FIGURES
+*****************************************************************/
 bass_number:
        DIGIT   {
-               $$ = scm_number_to_string (scm_int2num ($1), scm_int2num (10));
-               $$ = scm_list_2 (ly_scheme_function ("number-markup"),
-                               $$);
+               $$ = scm_number_to_string (gh_int2scm ($1), gh_int2scm (10));
        }
        | UNSIGNED {
-               $$ = scm_number_to_string (scm_int2num ($1), scm_int2num (10));
-               $$ = scm_list_2 (ly_scheme_function ("number-markup"),
-                               $$);
+               $$ = scm_number_to_string (gh_int2scm ($1), gh_int2scm (10));
        }
        | STRING { $$ = $1; }
        ;
@@ -2072,11 +1921,11 @@ bass_figure:
                Music *m = unsmob_music ($1);
                if ($2) {
                        SCM salter = m->get_property ("alteration");
-                       int alter = ly_c_number_p (salter) ? ly_scm2int (salter) : 0;
+                       int alter = gh_number_p (salter) ? gh_scm2int (salter) : 0;
                        m->set_property ("alteration",
-                               scm_int2num (alter + $2));
+                               gh_int2scm (alter + $2));
                } else {
-                       m->set_property ("alteration", scm_int2num (0));
+                       m->set_property ("alteration", gh_int2scm (0));
                }
        }
        ;
@@ -2120,7 +1969,7 @@ optional_rest:
        ;
 
 simple_element:
-       pitch exclamations questions octave_check optional_notemode_duration optional_rest {
+       pitch exclamations questions oct_check optional_notemode_duration optional_rest {
 
                Input i = THIS->pop_spot ();
                if (!THIS->lexer_->is_note_state ())
@@ -2135,10 +1984,10 @@ simple_element:
                n->set_property ("pitch", $1);
                n->set_property ("duration", $5);
 
-               if (ly_c_number_p ($4))
+               if (gh_number_p ($4))
                {
-                       int q = ly_scm2int ($4);
-                       n->set_property ("absolute-octave", scm_int2num (q-1));
+                       int q = gh_scm2int ($4);
+                       n->set_property ("absolute-octave", gh_int2scm (q-1));
                }
 
                if ($3 % 2)
@@ -2173,7 +2022,7 @@ simple_element:
                Music *m = unsmob_music ($1);
                Input i = THIS->pop_spot ();
                m->set_spot (i);
-               for (SCM s = m->get_property ("elements"); ly_c_pair_p (s); s = ly_cdr (s))
+               for (SCM s = m->get_property ("elements"); gh_pair_p (s); s = ly_cdr (s))
                {
                        unsmob_music (ly_car (s))->set_property ("duration", $2);
                }
@@ -2235,11 +2084,8 @@ simple_element:
        ;
 
 lyric_element:
-       /* FIXME: lyric flavoured markup would be better */
-       full_markup {
-       }
-       | LYRICS_STRING {
-       }
+       full_markup { $$ = $1; }
+       | STRING { $$ = $1; }
        ;
 
 new_chord:
@@ -2248,7 +2094,7 @@ new_chord:
        }
        | steno_tonic_pitch optional_notemode_duration chord_separator chord_items {
                SCM its = scm_reverse_x ($4, SCM_EOL);
-               $$ = make_chord ($1, $2, scm_cons ($3, its));
+               $$ = make_chord ($1, $2, gh_cons ($3, its));
        }
        ;
 
@@ -2257,7 +2103,7 @@ chord_items:
                $$ = SCM_EOL;           
        }
        | chord_items chord_item {
-               $$ = scm_cons ($2, $$);
+               $$ = gh_cons ($2, $$);
        }
        ;
 
@@ -2289,9 +2135,9 @@ chord_item:
        ;
 
 step_numbers:
-       step_number { $$ = scm_cons ($1, SCM_EOL); }
+       step_number { $$ = gh_cons ($1, SCM_EOL); }
        | step_numbers '.' step_number {
-               $$ = scm_cons ($3, $$);
+               $$ = gh_cons ($3, $$);
        }
        ;
 
@@ -2345,7 +2191,7 @@ number_factor:
 
 bare_number:
        UNSIGNED        {
-               $$ = scm_int2num ($1);
+               $$ = gh_int2scm ($1);
        }
        | REAL          {
                $$ = $1;
@@ -2354,10 +2200,10 @@ bare_number:
                $$ = $1;
        }
        | REAL NUMBER_IDENTIFIER        {
-               $$ = scm_make_real (ly_scm2double ($1) *ly_scm2double ($2));
+               $$ = gh_double2scm (gh_scm2double ($1) *gh_scm2double ($2));
        }
        | UNSIGNED NUMBER_IDENTIFIER    {
-               $$ = scm_make_real ($1 *ly_scm2double ($2));
+               $$ = gh_double2scm ($1 *gh_scm2double ($2));
        }
        ;
 
@@ -2375,7 +2221,7 @@ bare_int:
        bare_number {
                if (scm_integer_p ($1) == SCM_BOOL_T)
                {
-                       int k = ly_scm2int ($1);
+                       int k = gh_scm2int ($1);
                        $$ = k;
                } else
                {
@@ -2388,6 +2234,20 @@ bare_int:
        }
        ;
 
+
+string:
+       STRING          {
+               $$ = $1;
+       }
+       | STRING_IDENTIFIER     {
+               $$ = $1;
+       }
+       | string '+' string {
+               $$ = scm_string_append (scm_list_2 ($1, $3));
+       }
+       ;
+
+
 exclamations:
                { $$ = 0; }
        | exclamations '!'      { $$ ++; }
@@ -2418,7 +2278,7 @@ This should be done more dynamically if possible.
 */
 markup:
        STRING {
-               $$ = make_simple_markup (THIS->lexer_->encoding (), $1);
+               $$ = make_simple_markup ($1);
        }
        | MARKUP_HEAD_EMPTY {
                $$ = scm_list_1 ($1);
@@ -2456,15 +2316,6 @@ markup:
        | STRING_IDENTIFIER {
                $$ = $1;
        }
-       | SCORE {
-               SCM nn = THIS->lexer_->lookup_identifier ("pitchnames");
-               THIS->lexer_->push_note_state (alist_to_hashq (nn));
-       } '{' score_body '}' {
-               Score * sc = $4;
-               $$ = scm_list_2 (ly_scheme_function ("score-markup"), sc->self_scm ());
-               scm_gc_unprotect_object (sc->self_scm ());
-               THIS->lexer_->pop_state ();
-       }
        ;
 
 markup_list:
@@ -2482,7 +2333,7 @@ markup_line:
 markup_list_body:
        /**/ {  $$ = SCM_EOL; }
        | markup_list_body markup {
-               $$ = scm_cons ($2, $1);
+               $$ = gh_cons ($2, $1);
        }
        ;
 
@@ -2497,9 +2348,12 @@ My_lily_parser::set_yydebug (bool )
 #endif
 }
 
+extern My_lily_parser *current_parser;
+
 void
 My_lily_parser::do_yyparse ()
 {
+       current_parser = this;;
        yyparse ((void*)this);
 }
 
@@ -2539,18 +2393,18 @@ otherwise, we have to import music classes into the lexer.
 int
 My_lily_lexer::try_special_identifiers (SCM *destination, SCM sid)
 {
-       if (ly_c_string_p (sid)) {
+       if (gh_string_p (sid)) {
                *destination = sid;
                return STRING_IDENTIFIER;
-       } else if (ly_c_number_p (sid)) {
+       } else if (gh_number_p (sid)) {
                *destination = sid;
                return NUMBER_IDENTIFIER;
        } else if (unsmob_context_def (sid)) {
                *destination = unsmob_context_def (sid)->clone_scm ();
                return CONTEXT_DEF_IDENTIFIER;
        } else if (unsmob_score (sid)) {
-               Score *score = new Score (*unsmob_score (sid));
-               *destination = score->self_scm ();
+               Score *sc = new Score (*unsmob_score (sid));
+               *destination = sc->self_scm ();
                return SCORE_IDENTIFIER;
        } else if (Music *mus = unsmob_music (sid)) {
                mus = mus->clone ();
@@ -2562,12 +2416,12 @@ My_lily_lexer::try_special_identifiers (SCM *destination, SCM sid)
        } else if (unsmob_duration (sid)) {
                *destination = unsmob_duration (sid)->smobbed_copy ();
                return DURATION_IDENTIFIER;
-       } else if (unsmob_output_def (sid)) {
-               Output_def *p = unsmob_output_def (sid);
+       } else if (unsmob_music_output_def (sid)) {
+               Music_output_def *p = unsmob_music_output_def (sid);
                p = p->clone ();
 
                *destination = p->self_scm ();
-               return OUTPUT_DEF_IDENTIFIER;
+               return MUSIC_OUTPUT_DEF_IDENTIFIER;
        } else if (Text_item::markup_p (sid)) {
                *destination = sid;
                return MARKUP_IDENTIFIER;
@@ -2580,9 +2434,9 @@ Music *
 property_op_to_music (SCM op)
 {
        Music *m = 0;
-       SCM tag = ly_car (op);
-       SCM symbol = ly_cadr (op);
-       SCM args = ly_cddr (op);
+       SCM tag = gh_car (op);
+       SCM symbol = gh_cadr (op);
+       SCM args = gh_cddr (op);
        SCM grob_val = SCM_UNDEFINED;
        SCM grob_sym = SCM_UNDEFINED;
        SCM val = SCM_UNDEFINED;
@@ -2590,7 +2444,7 @@ property_op_to_music (SCM op)
        if (tag == ly_symbol2scm ("assign"))
                {
                m = MY_MAKE_MUSIC ("PropertySet");
-               val = ly_car (args);
+               val = gh_car (args);
                }
        else if (tag == ly_symbol2scm ("unset"))
                m = MY_MAKE_MUSIC ("PropertyUnset");
@@ -2598,12 +2452,12 @@ property_op_to_music (SCM op)
                 || tag == ly_symbol2scm ("push"))
                {
                m = MY_MAKE_MUSIC ("OverrideProperty");
-               grob_sym = ly_car (args);
-               grob_val = ly_cadr (args);
+               grob_sym = gh_car (args);
+               grob_val = gh_cadr (args);
                }
        else if (tag == ly_symbol2scm ("pop")) {
                m = MY_MAKE_MUSIC ("RevertProperty");
-               grob_sym = ly_car (args);
+               grob_sym = gh_car (args);
                }
 
        m->set_property ("symbol", symbol);
@@ -2618,7 +2472,7 @@ property_op_to_music (SCM op)
                bool itc = internal_type_checking_global_b;
                /* UGH.
                */
-               bool autobeam = ly_c_equal_p (symbol, ly_symbol2scm ("autoBeamSettings"));
+               bool autobeam = gh_equal_p (symbol, ly_symbol2scm ("autoBeamSettings"));
                if (autobeam)
                        internal_type_checking_global_b = false;
                m->set_property ("grob-property", grob_sym);
@@ -2626,7 +2480,7 @@ property_op_to_music (SCM op)
                        internal_type_checking_global_b = itc;
                }
 
-       if (tag == ly_symbol2scm ("poppush"))
+       if (op == ly_symbol2scm ("poppush"))
                m->set_property ("pop-first", SCM_BOOL_T);
 
 
@@ -2642,20 +2496,23 @@ context_spec_music (SCM type, SCM id, Music *m, SCM ops)
        scm_gc_unprotect_object (m->self_scm ());
 
        csm->set_property ("context-type",
-               ly_c_symbol_p (type) ? type : scm_string_to_symbol (type));
+               gh_symbol_p (type) ? type : scm_string_to_symbol (type));
        csm->set_property ("property-operations", ops);
 
-       if (ly_c_string_p (id))
+       if (gh_string_p (id))
                csm->set_property ("context-id", id);
        return csm;
 }
 
+
 SCM
 get_next_unique_context ()
 {
        static int new_context_count;
+
        char s[1024];
-       snprintf (s, 1024, "uniqueContext%d", new_context_count++);
+       snprintf (s, 1024, "uniqueContext%d", new_context_count ++);
+               
        return scm_makfrom0str (s);
 }
 
index b548ca97fdb675ddc32cbbfc8eb938184f05b6eb..a941876ef3f798aceacea6a3f2e2e8716ca63131 100644 (file)
@@ -61,8 +61,9 @@ Part_combine_engraver::process_music ()
 
       if (Text_item::markup_p (text))
        {
-         text_ =  make_item ("CombineTextScript", event_->self_scm () );
+         text_ =  make_item ("CombineTextScript");
          text_->set_property ("text", text);
+         announce_grob (text_, event_->self_scm ());
        }
     }
 }
@@ -90,7 +91,11 @@ Part_combine_engraver::acknowledge_grob (Grob_info i)
 void 
 Part_combine_engraver::stop_translation_timestep ()
 {
+  if (text_)
+    {
+      typeset_grob (text_);
       text_ = 0;
+    }
   event_ = 0;
 }
 
index 0afb18d819d0b1f0f52b813754a760cba1d5b4b5..a25f6a1df43bb5cf9e4d9ce379931ead934ab258 100644 (file)
@@ -327,14 +327,14 @@ Part_combine_iterator::construct_children ()
   one_.set_translator (one);
 
   set_translator (one);
-  first_iter_ = unsmob_iterator (get_iterator (unsmob_music (ly_car (lst))));
+  first_iter_ = unsmob_iterator (get_iterator (unsmob_music (gh_car (lst))));
 
 
   Context *two = tr->find_create_context (ly_symbol2scm ("Voice"),
                                                      "two", props);
   two_.set_translator (two);
   set_translator (two);
-  second_iter_ = unsmob_iterator (get_iterator (unsmob_music (ly_cadr (lst))));
+  second_iter_ = unsmob_iterator (get_iterator (unsmob_music (gh_cadr (lst))));
 
 
   set_translator (tr);
@@ -356,10 +356,10 @@ Part_combine_iterator::construct_children ()
     {
       SCM sym = ly_symbol2scm (*p);
       execute_pushpop_property (one, sym,
-                                    ly_symbol2scm ("direction"), scm_int2num (1));
+                                    ly_symbol2scm ("direction"), gh_int2scm (1));
 
       execute_pushpop_property (two, sym,
-                               ly_symbol2scm ("direction"), scm_int2num (-1));
+                               ly_symbol2scm ("direction"), gh_int2scm (-1));
     }
 
 }
@@ -370,13 +370,13 @@ Part_combine_iterator::process (Moment m)
   Moment now = get_outlet ()->now_mom ();
   Moment *splitm = 0;
   
-  for (; ly_c_pair_p (split_list_); split_list_ = ly_cdr (split_list_))
+  for (; gh_pair_p (split_list_); split_list_ = gh_cdr (split_list_))
     {
-      splitm = unsmob_moment (ly_caar (split_list_));
+      splitm = unsmob_moment (gh_caar (split_list_));
       if (splitm && *splitm + start_moment_ > now)
        break ;
 
-      SCM tag = ly_cdar (split_list_);
+      SCM tag = gh_cdar (split_list_);
       
       if (tag == ly_symbol2scm ("chords"))
        chords_together ();
@@ -392,10 +392,10 @@ Part_combine_iterator::process (Moment m)
        solo1 ();
       else if (tag == ly_symbol2scm ("solo2"))
        solo2 ();
-      else if (ly_c_symbol_p (tag))
+      else if (gh_symbol_p (tag))
        {
          String s =  "Unknown split directive: "
-           + (ly_c_symbol_p (tag) ? ly_symbol2string (tag) : String ("not a symbol")); 
+           + (gh_symbol_p (tag) ? ly_symbol2string (tag) : String ("not a symbol")); 
          programming_error (s);
        }
     }
index 16de3b513d7ff250a5d35cd7a591f3c5cca7d587..2e28caba8b094b41ffb6ac5195e311b8f0b05a5c 100644 (file)
@@ -115,18 +115,16 @@ Percent_repeat_engraver::try_music (Music * m)
 
       
       Global_context *global = get_global_context ();
-      for (int i = 0; i < count; i++)  
+      for (int i = 0; i < count; i++)
        {
          global->add_moment_to_process (next_moment_ + Moment (i) * body_length_);
-
+  
          /*
            bars between % too.
-          */
+         */
          if (repeat_sign_type_ == DOUBLE_MEASURE)
            global->add_moment_to_process (next_moment_ + meas_len + Moment (i) * body_length_);
-         
        }
-  
       return true;
     }
 
@@ -142,13 +140,16 @@ Percent_repeat_engraver::process_music ()
        {
          finished_perc_ = perc_;
          typeset_perc ();
-         perc_ = make_spanner ("PercentRepeat", repeat_->self_scm ());
+         perc_ = make_spanner ("PercentRepeat");
          SCM col =get_property ("currentCommandColumn");
          perc_->set_bound (LEFT, unsmob_grob (col));
+         announce_grob (perc_, repeat_->self_scm ());
        }
       else if (repeat_sign_type_ == DOUBLE_MEASURE)
        {
-         double_percent_ = make_item ("DoublePercentRepeat", repeat_->self_scm ());
+         double_percent_ = make_item ("DoublePercentRepeat");
+         announce_grob (double_percent_, repeat_->self_scm ());
+
       /*
        forbid breaks on a % line. Should forbid all breaks, really.
        */
@@ -179,10 +180,15 @@ Percent_repeat_engraver::typeset_perc ()
     {
       SCM col =get_property ("currentCommandColumn");
       finished_perc_->set_bound (RIGHT, unsmob_grob (col));
+      typeset_grob (finished_perc_);
       finished_perc_ = 0;
     }
 
-  double_percent_ = 0;
+  if (double_percent_)
+    {
+      typeset_grob (double_percent_);
+      double_percent_ = 0;
+    }
 }
 
 
index 379e024793d9f112d0b20e84c1acf9ab5f024113..270bc87d10b580e1f5f189229891153def62f32f 100644 (file)
@@ -7,20 +7,21 @@
 */
 
 #include <time.h>
-
-#include "audio-column.hh"
-#include "audio-item.hh"
-#include "audio-staff.hh"
-#include "file-name.hh"
-#include "lily-version.hh"
+#include "warn.hh"
+#include "string.hh"
+#include "string-convert.hh"
 #include "main.hh"
+#include "midi-def.hh"
 #include "midi-item.hh"
 #include "midi-stream.hh"
+#include "audio-column.hh"
+#include "audio-item.hh"
+#include "audio-staff.hh"
 #include "performance.hh"
 #include "score.hh"
-#include "string-convert.hh"
-#include "string.hh"
-#include "warn.hh"
+#include "input-file-results.hh"
+#include "file-path.hh"
+#include "lily-version.hh"
 
 #include "killing-cons.tcc"
 
@@ -59,7 +60,7 @@ Performance::output (Midi_stream& midi_stream)
        MIDI players tend to ignore instrument settings on
        channel 10, the percussion channel by default.
        */
-      if (channel % 16 == 9)
+      if (channel == 9)
         channel++;
 
 
@@ -69,9 +70,9 @@ Performance::output (Midi_stream& midi_stream)
        */
       if (s->channel_ < 0)
        {
-         s->channel_ = channel % 16;
+         s->channel_ = channel <? 15;
          if (channel > 15)
-           warning ("MIDI channel wrapped around. Remapping modulo 16.");
+           warning ("MIDI channel wrapped around. Mapping to channel 15.");
        }
       
       s->output (midi_stream, channel++);
@@ -149,6 +150,10 @@ Performance::add_element (Audio_element *p)
     {
       audio_staffs_.push (s);
     }
+  else if (Audio_column *c = dynamic_cast<Audio_column*> (p))
+    {
+      c->performance_ = this;
+    }
   audio_elem_p_list_ = new Killing_cons<Audio_element> (p, audio_elem_p_list_);
 }
 
@@ -159,13 +164,15 @@ Performance::process (String out)
     out = "lelie.midi";
   
   /* Maybe a bit crude, but we had this before */
-  File_name file_name (out);
-  file_name.ext_ = "midi";
-  out = file_name.to_string ();
+  Path p = split_path (out);
+  p.ext = "midi";
+  out = p.to_string ();
   
   Midi_stream midi_stream (out);
   progress_indication (_f ("MIDI output to `%s'...", out));
 
+  global_input_file->target_strings_.push (out);
+
   output (midi_stream);
   progress_indication ("\n");
   return SCM_UNDEFINED;
index b776432de1628dd24b2293a822f3c52dc4da60ba..bdf5e3ccb8e362e982e82b3504f5365307875c0f 100644 (file)
@@ -28,7 +28,7 @@ Performer_group_performer::announce_element (Audio_element_info info)
 {
   announce_infos_.push (info);
   Translator *t
-    = context ()->get_parent_context ()->implementation ();
+    = unsmob_translator (daddy_context_->daddy_context_->implementation_);
 
   if (Performer_group_performer * eg = dynamic_cast<Performer_group_performer*> (t))
     eg->announce_element (info);
@@ -41,7 +41,7 @@ Performer_group_performer::acknowledge_audio_elements ()
     {
       Audio_element_info info = announce_infos_[j];
 
-      for (SCM p = get_simple_trans_list (); ly_c_pair_p (p); p = ly_cdr (p))
+      for (SCM p = get_simple_trans_list (); gh_pair_p (p); p = ly_cdr (p))
        {
          Translator * t = unsmob_translator (ly_car (p));
          Performer * eng = dynamic_cast<Performer*> (t);
@@ -76,7 +76,7 @@ Performer_group_performer::Performer_group_performer ()
 void
 performer_each (SCM list, Performer_method method)
 {
-  for (SCM p = list; ly_c_pair_p (p); p = ly_cdr (p))
+  for (SCM p = list; gh_pair_p (p); p = ly_cdr (p))
     {
       Performer * e = dynamic_cast<Performer*>(unsmob_translator (ly_car (p)));
       if (e)
index e3e289ce38371ab2e337d418a38bb0a79e80b11e..f6779595e28d6881cfd81065045e31a27cb48d54 100644 (file)
@@ -132,17 +132,18 @@ Phrasing_slur_engraver::process_acknowledged_grobs ()
        {
          // push a new phrasing_slur onto stack.
          // (use temp. array to wait for all phrasing_slur STOPs)
-         Grob* phrasing_slur = make_spanner ("PhrasingSlur", phrasing_slur_ev->self_scm ());
+         Grob* phrasing_slur = make_spanner ("PhrasingSlur");
          Slur::set_interface (phrasing_slur); // can't remove.
 
 
          if (Direction updown = to_dir (phrasing_slur_ev->get_property ("direction")))
            {
-             phrasing_slur->set_property ("direction", scm_int2num (updown));
+             phrasing_slur->set_property ("direction", gh_int2scm (updown));
            }
 
          start_phrasing_slurs.push (phrasing_slur);
          eventses_.push (phrasing_slur_ev);
+         announce_grob (phrasing_slur, phrasing_slur_ev->self_scm ());
        }
     }
   for (int i=0; i < start_phrasing_slurs.size (); i++)
@@ -153,6 +154,10 @@ Phrasing_slur_engraver::process_acknowledged_grobs ()
 void
 Phrasing_slur_engraver::stop_translation_timestep ()
 {
+  for (int i = 0; i < end_phrasing_slurs_.size (); i++)
+    {
+      typeset_grob (end_phrasing_slurs_[i]);
+    }
   end_phrasing_slurs_.clear ();
 }
 
index ad6741cdb26938c3d520182b467ebd27ca3e43a8..2a04aae68d32a98a8354e628df602f99b4d883de 100644 (file)
@@ -163,8 +163,8 @@ Piano_pedal_engraver::try_music (Music *m)
       for (Pedal_info*p = info_list_; p->name_; p ++)
        {
          String nm = p->name_ + String ("Event");
-         if (ly_c_equal_p (m->get_property ("name") ,
-                         scm_str2symbol(nm.to_str0())))
+         if (gh_equal_p (m->get_property ("name") ,
+                         gh_symbol2scm (nm.to_str0())))
            {
              Direction d = to_dir (m->get_property ("span-direction"));
              p->event_drul_[d] = m;
@@ -185,11 +185,12 @@ Piano_pedal_engraver::process_music ()
          if (!p->line_spanner_)
            {
              String name  = String (p->name_) + "PedalLineSpanner";
-             Music * rq = (p->event_drul_[START]  ?  p->event_drul_[START]  :  p->event_drul_[STOP]);
-             p->line_spanner_ = make_spanner (name.to_str0 (), rq->self_scm ());
+             p->line_spanner_ = make_spanner (name.to_str0 ());
 
+             Music * rq = (p->event_drul_[START]  ?  p->event_drul_[START]  :  p->event_drul_[STOP]);
 
              
+             announce_grob (p->line_spanner_, rq->self_scm ());
            }
       
          /* Choose the appropriate grobs to add to the line spanner
@@ -290,18 +291,20 @@ Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed)
        }
     }
       
-  if (ly_c_string_p (s))
+  if (gh_string_p (s))
     {
       String propname = String (p->name_) + "Pedal";
 
-      p->item_ = make_item (propname.to_str0 (), (p->event_drul_[START]
-                                                 ? p->event_drul_[START]
-                                                 : p->event_drul_[STOP])->self_scm ());
-
+      p->item_ = make_item (propname.to_str0 ());
       p->item_->set_property ("text", s);
       Axis_group_interface::add_element (p->line_spanner_, p->item_);
+         
+      announce_grob (p->item_,
+                    (p->event_drul_[START]
+                     ? p->event_drul_[START]
+                     : p->event_drul_[STOP])->self_scm ());
     }
-  
+
   if (!mixed)
     {
       p->event_drul_[START] = 0;
@@ -337,8 +340,8 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
       if (!p->event_drul_[START])
        {
          SCM flare = p->bracket_->get_property ("bracket-flare");
-         p->bracket_->set_property ("bracket-flare", scm_cons (ly_car (flare),
-                                                               scm_make_real (0)));
+         p->bracket_->set_property ("bracket-flare", scm_cons (gh_car (flare),
+                                                               gh_double2scm (0)));
        }
 
       p->finished_bracket_ = p->bracket_;
@@ -351,7 +354,7 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
       p->start_ev_ = p->event_drul_[START];
       p->current_bracket_ev_ = p->event_drul_[START];
 
-      p->bracket_  = make_spanner ("PianoPedalBracket", p->event_drul_[START]->self_scm ());
+      p->bracket_  = make_spanner ("PianoPedalBracket");
 
       /*
        Set properties so that the stencil-creating function will
@@ -361,7 +364,7 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
       if (!p->finished_bracket_)
        {
          SCM flare = p->bracket_->get_property ("bracket-flare");
-         p->bracket_->set_property ("bracket-flare", scm_cons (scm_make_real (0),ly_cdr (flare)));
+         p->bracket_->set_property ("bracket-flare", scm_cons (gh_double2scm (0),gh_cdr (flare)));
        }
 
 
@@ -400,6 +403,7 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
        
       */
       Axis_group_interface::add_element (p->line_spanner_, p->bracket_);             
+      announce_grob (p->bracket_, p->event_drul_[START]->self_scm ());
 
       if (!p->event_drul_[STOP])
        {
@@ -429,11 +433,11 @@ Piano_pedal_engraver::finalize ()
        suicide?
       */
       if (p->line_spanner_
-         && !p->line_spanner_->is_live ())
+         && !p->line_spanner_->live ())
        p->line_spanner_ = 0;
       
       if (p->bracket_
-         && !p->bracket_->is_live ())
+         && !p->bracket_->live ())
        p->bracket_ = 0;
       
       if (p->bracket_)
@@ -500,15 +504,16 @@ Piano_pedal_engraver::typeset_all (Pedal_info * p)
     Handle suicide. 
   */
   if (p->finished_line_spanner_
-      && !p->finished_line_spanner_->is_live ())
+      && !p->finished_line_spanner_->live ())
     p->finished_line_spanner_ = 0;
   if (p->finished_bracket_
-      && !p->finished_bracket_->is_live ())
+      && !p->finished_bracket_->live ())
     p->finished_bracket_ = 0;
 
 
   if (p->item_)
     {
+      typeset_grob (p->item_);
       p->item_ = 0;
     }
       
@@ -520,7 +525,9 @@ Piano_pedal_engraver::typeset_all (Pedal_info * p)
          p->finished_bracket_->set_bound (RIGHT, unsmob_grob (get_property ("currentMusicalColumn")));
        }
 
-      p->finished_bracket_ = 0;
+      typeset_grob (p->finished_bracket_);
+         
+      p->finished_bracket_ =0;
     }
 
   if (p->finished_line_spanner_)
@@ -538,7 +545,7 @@ Piano_pedal_engraver::typeset_all (Pedal_info * p)
          p->finished_line_spanner_->set_bound (RIGHT, ci);
          p->finished_line_spanner_->set_bound (LEFT, ci);        
        }
-      
+      typeset_grob (p->finished_line_spanner_);
       p->finished_line_spanner_ = 0;
     }
 }
index 1dbdf10dcd69b21299679a335ec469ddc05cde69..af5d54f06548543ad7be9d05424801ce810793c5 100644 (file)
@@ -130,8 +130,8 @@ Piano_pedal_performer::try_music (Music* r)
       for (Pedal_info*p = info_alist_; p->name_; p ++)
        {
          String nm = p->name_ + String ("Event");
-         if (ly_c_equal_p (r->get_property ("name") ,
-                         scm_str2symbol (nm.to_str0())))
+         if (gh_equal_p (r->get_property ("name") ,
+                         scm_makfrom0str (nm.to_str0())))
            {
              Direction d = to_dir (r->get_property ("span-direction"));
              p->req_l_drul_[d] = r;
index 3acff5c995f39144c26e5590d6c38855580af403..d2b8f8d3f22833e0a033c4e93619d59e32fc99aa 100644 (file)
@@ -22,7 +22,7 @@ void
 Pitch_squash_engraver::acknowledge_grob (Grob_info i)
 {
   SCM newpos = get_property ("squashedPosition");
-  if (ly_c_number_p (newpos)
+  if (gh_number_p (newpos)
       && Note_head::has_interface (i.grob_))
     {
       i.grob_->set_property ("staff-position", newpos);
index 4f1b17a5c1e3e3819853d3d25559248cfebbd4b3..1867a0b532b20514436e3f0622a82c85d4758326 100644 (file)
@@ -20,7 +20,6 @@ Pitch::Pitch (int o, int n, int a)
   normalise ();
 }
 
-/* FIXME: why is octave == 0 and default not middleC ? */
 Pitch::Pitch ()
 {
   notename_ = 0;
@@ -291,7 +290,7 @@ Pitch::less_p (SCM p1, SCM p2)
 }
 
 /* Should add optional args.  */
-LY_DEFINE (ly_make_pitch, "ly:make-pitch",
+LY_DEFINE (make_pitch, "ly:make-pitch",
           3, 0, 0, (SCM octave, SCM note, SCM alter),
           "@var{octave} is specified by an integer, "
           "zero for the octave containing middle C.  "
@@ -304,30 +303,30 @@ LY_DEFINE (ly_make_pitch, "ly:make-pitch",
   SCM_ASSERT_TYPE (scm_integer_p (note)== SCM_BOOL_T, note, SCM_ARG2, __FUNCTION__, "integer");
   SCM_ASSERT_TYPE (scm_integer_p (alter)== SCM_BOOL_T, alter, SCM_ARG3, __FUNCTION__, "integer");
 
-  Pitch p (ly_scm2int (octave), ly_scm2int (note), ly_scm2int (alter));
+  Pitch p (gh_scm2int (octave), gh_scm2int (note), gh_scm2int (alter));
   return p.smobbed_copy ();
 }
 
-LY_DEFINE (ly_pitch_steps, "ly:pitch-steps", 1, 0, 0,
+LY_DEFINE (pitch_steps, "ly:pitch-steps", 1, 0, 0,
           (SCM p),
           "Number of steps counted from middle C of the pitch @var{p}.")
 {
   Pitch *pp = unsmob_pitch (p);
   SCM_ASSERT_TYPE (pp, p, SCM_ARG1, __FUNCTION__, "Pitch");
-  return scm_int2num (pp->steps ());
+  return gh_int2scm (pp->steps ());
 }
 
-LY_DEFINE (ly_pitch_octave, "ly:pitch-octave",
+LY_DEFINE (pitch_octave, "ly:pitch-octave",
           1, 0, 0, (SCM pp),
           "Extract the octave from pitch @var{p}.")
 {
   Pitch *p = unsmob_pitch (pp);
   SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
   int q = p->get_octave ();
-  return scm_int2num (q);
+  return gh_int2scm (q);
 }
 
-LY_DEFINE (ly_pitch_alteration, "ly:pitch-alteration",
+LY_DEFINE (pitch_alteration, "ly:pitch-alteration",
           1, 0, 0, (SCM pp),
           "Extract the alteration from pitch  @var{p}.")
 {
@@ -335,7 +334,7 @@ LY_DEFINE (ly_pitch_alteration, "ly:pitch-alteration",
   SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
   int q = p->get_alteration ();
 
-  return scm_int2num (q);
+  return gh_int2scm (q);
 }
 
 LY_DEFINE (pitch_notename, "ly:pitch-notename",
@@ -345,30 +344,30 @@ LY_DEFINE (pitch_notename, "ly:pitch-notename",
   Pitch *p = unsmob_pitch (pp);
   SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
   int q = p->get_notename ();
-  return scm_int2num (q);
+  return gh_int2scm (q);
 }
 
-LY_DEFINE (ly_pitch_quartertones, "ly:pitch-quartertones",
+LY_DEFINE (ly_pitch_quartertones,  "ly:pitch-quartertones",
           1, 0, 0, (SCM pp),
           "Calculate the number of quarter tones of @var{p} from middle C.")
 {
   Pitch *p = unsmob_pitch (pp);
   SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
   int q = p->quartertone_pitch ();
-  return scm_int2num (q);
+  return gh_int2scm (q);
 }
 
-LY_DEFINE (ly_pitch_semitones, "ly:pitch-semitones",
+LY_DEFINE (ly_pitch_semitones,  "ly:pitch-semitones",
           1, 0, 0, (SCM pp),
           "calculate the number of semitones of @var{p} from middle C.")
 {
   Pitch *p = unsmob_pitch (pp);
   SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
   int q = p->semitone_pitch ();
-  return scm_int2num (q);
+  return gh_int2scm (q);
 }
 
-LY_DEFINE (ly_pitch_less_p, "ly:pitch<?",
+LY_DEFINE (pitch_less, "ly:pitch<?",
           2, 0, 0, (SCM p1, SCM p2),
           "Is @var{p1} lexicographically smaller than @var{p2}?")
 {
@@ -397,8 +396,9 @@ LY_DEFINE (ly_pitch_diff, "ly:pitch-diff",
   return interval (*r, *p).smobbed_copy ();
 }
 
+
 int
-Pitch::get_octave () const
+Pitch::get_octave ()const
 {
   return octave_;
 }
index 20f9dc68e8aba9b8e3ad24a82b56b288b0a5aaa1..d3007f84330b2b295db725e4d880ecbb7f44ce0f 100644 (file)
@@ -21,7 +21,7 @@ void
 Property_iterator::process (Moment m)
 {
   SCM sym = get_music ()->get_property ("symbol");
-  if (ly_c_symbol_p (sym))
+  if (gh_symbol_p (sym))
     {
       SCM val = get_music ()->get_property ("value");
       bool ok= true;
@@ -82,7 +82,7 @@ check_grob (Music *mus, SCM sym)
 {
   if (!list_p)
     {
-      list_p = scm_c_eval_string ("list?");
+      list_p = gh_eval_str ("list?");
     }
   
   
index 56bd2def2fef8f6a190510208cef89b45eb2baf1..93b29a48d4a8648d57bf2beb46f754ae9906ea94 100644 (file)
@@ -16,19 +16,12 @@ Protected_scm::Protected_scm ()
 
 Protected_scm::Protected_scm (SCM s)
 {
-  object_ = SCM_NIMP (s) ? scm_gc_protect_object (s): s;
+  object_ = SCM_NIMP (s)  ? scm_gc_protect_object (s): s;
 }
 
 Protected_scm::Protected_scm (Protected_scm const &s)
 {
-  object_ = (SCM_NIMP (s.object_) ? scm_gc_protect_object (s.object_)
-            : s.object_);
-}
-
-Protected_scm::~Protected_scm ()
-{
-  if (SCM_NIMP (object_))
-    scm_gc_unprotect_object (object_);
+  object_ = SCM_NIMP (s.object_) ? scm_gc_protect_object (s.object_) : s.object_;
 }
 
 Protected_scm & 
@@ -40,7 +33,7 @@ Protected_scm::operator = (SCM s)
   if (SCM_NIMP (object_))
     scm_gc_unprotect_object (object_);
 
-  object_ = SCM_NIMP (s) ? scm_gc_protect_object (s) : s;
+  object_ =  SCM_NIMP (s) ? scm_gc_protect_object (s): s;
   return *this;
 }
 
@@ -50,6 +43,15 @@ Protected_scm::operator = (Protected_scm const &s)
   return operator= (s.object_);
 }
 
+
+Protected_scm::~Protected_scm ()
+{
+  if (SCM_NIMP (object_))
+    {
+      scm_gc_unprotect_object (object_);
+    }
+}
+
 Protected_scm::operator SCM () const
 {
   return object_;
index 8e0affdf282c19bb2a6457f77c1656f43e0865b7..0dc72104854192d25f9d84cf80fec49302307f0f 100644 (file)
@@ -72,7 +72,7 @@ binsearch_scm_vector (SCM vec, SCM key, bool (*is_less)(SCM a,SCM b))
   {
     int cmp = (lo + hi) / 2;
 
-      SCM when = ly_caar (SCM_VECTOR_REF (vec, cmp));
+      SCM when = gh_caar (SCM_VECTOR_REF (vec, cmp));
       bool result =  (*is_less) (key, when);
       if (result)
           hi = cmp;
@@ -100,7 +100,7 @@ Quote_iterator::construct_children ()
   start_moment_ = now;
   event_vector_ = get_music ()->get_property ("quoted-events");
 
-  if (ly_c_vector_p (event_vector_))
+  if (gh_vector_p (event_vector_))
     {
       event_idx_ = binsearch_scm_vector (event_vector_, now.smobbed_copy (), &moment_less);
       end_idx_ = binsearch_scm_vector (event_vector_, stop.smobbed_copy (), &moment_less);
@@ -119,7 +119,7 @@ Moment
 Quote_iterator::pending_moment () const
 {
   SCM entry = SCM_VECTOR_REF (event_vector_, event_idx_);
-  return *unsmob_moment (ly_caar (entry)) - start_moment_;
+  return *unsmob_moment (gh_caar (entry)) - start_moment_;
 }
 
 
@@ -133,7 +133,7 @@ Quote_iterator::process (Moment m)
     {
       entry = SCM_VECTOR_REF (event_vector_, event_idx_);
 
-      Moment em = *unsmob_moment (ly_caar (entry));
+      Moment em = *unsmob_moment (gh_caar (entry));
 
       if (em > m)
        return ;
@@ -144,17 +144,17 @@ Quote_iterator::process (Moment m)
       event_idx_++;
     }
 
-  if (ly_c_pair_p (entry))
+  if (gh_pair_p (entry))
     {
-      Pitch * quote_pitch = unsmob_pitch (ly_cdar (entry));
+      Pitch * quote_pitch = unsmob_pitch (gh_cdar (entry));
       Pitch * me_pitch = unsmob_pitch (get_outlet ()->get_property ("instrumentTransposition"));
       
-      for (SCM s = ly_cdr (entry); ly_c_pair_p (s); s = ly_cdr (s))
+      for (SCM s = gh_cdr (entry); gh_pair_p (s); s = gh_cdr (s))
        {
-         SCM ev_acc = ly_car (s);
+         SCM ev_acc = gh_car (s);
 
 
-         Music * mus = unsmob_music (ly_car (ev_acc));
+         Music * mus = unsmob_music (gh_car (ev_acc));
          if (mus)
            {
              if (quote_pitch || me_pitch)
@@ -169,7 +169,7 @@ Quote_iterator::process (Moment m)
 
                  SCM copy = ly_deep_mus_copy (mus->self_scm ());
                  mus = unsmob_music (copy);
-                 transposed_musics_ = scm_cons (copy, transposed_musics_);
+                 transposed_musics_ = gh_cons (copy, transposed_musics_);
                  
                  mus->transpose (diff);
                }
index 41e96ee5e988c9f3751309c4ef1f929fc7530e2d..16dce1646867eb259ca67fb9d1114ade84977d81 100644 (file)
@@ -52,14 +52,14 @@ Recording_group_engraver::start_translation_timestep ()
 void
 Recording_group_engraver::start ()
 {
-  if (!ly_c_pair_p (accumulator_))
-    accumulator_ = scm_cons (SCM_EOL, SCM_EOL);
-  if (!ly_c_pair_p (ly_car (accumulator_)))
+  if (!gh_pair_p (accumulator_))
+    accumulator_ = gh_cons (SCM_EOL, SCM_EOL);
+  if (!gh_pair_p (gh_car (accumulator_)))
     {
       /*
        Need to store transposition for every moment; transposition changes during pieces.
        */
-      scm_set_car_x (accumulator_, scm_cons (scm_cons (now_mom ().smobbed_copy (),
+      scm_set_car_x (accumulator_, gh_cons (gh_cons (now_mom ().smobbed_copy (),
                                                     get_property ("instrumentTransposition")),
                                                     SCM_EOL));
     }
@@ -69,7 +69,7 @@ void
 Recording_group_engraver::stop_translation_timestep ()
 {
   Engraver_group_engraver::stop_translation_timestep ();
-  scm_set_cdr_x (accumulator_, scm_cons (ly_car (accumulator_), ly_cdr (accumulator_)));
+  scm_set_cdr_x (accumulator_, gh_cons (gh_car (accumulator_), gh_cdr (accumulator_)));
 
   scm_set_car_x (accumulator_, SCM_EOL);
 }
@@ -80,8 +80,8 @@ Recording_group_engraver::finalize ()
   Engraver_group_engraver::finalize ();
   SCM proc = get_property ("recordEventSequence");
 
-  if (ly_c_procedure_p (proc))
-    scm_call_2  (proc, context ()->self_scm (), ly_cdr (accumulator_));
+  if (gh_procedure_p (proc))
+    scm_call_2  (proc, daddy_context_->self_scm (), gh_cdr (accumulator_));
 
   accumulator_ = SCM_EOL;
 }
@@ -91,11 +91,11 @@ Recording_group_engraver::try_music (Music  *m)
 {
   bool retval = Translator_group::try_music (m);
 
-  SCM seq = ly_cdar (accumulator_);
-  seq = scm_cons (scm_cons  (m->self_scm (), ly_bool2scm (retval)),
+  SCM seq = gh_cdar (accumulator_);
+  seq = gh_cons (gh_cons  (m->self_scm (), gh_bool2scm (retval)),
                 seq);
   
-  scm_set_cdr_x  (ly_car (accumulator_), seq);
+  scm_set_cdr_x  (gh_car (accumulator_), seq);
 
   return retval;
 }
index fde9c2f8351155f1ec1e1f4abf8392d1f1764e28..ad9f617e2969491320002c955a855ab305499f24 100644 (file)
@@ -17,14 +17,16 @@ Relative_octave_music::to_relative_octave (Pitch p)
   if (lily_1_8_relative)
     {
       lily_1_8_compatibility_used = true;
-      /*  last-pitch should be junked some time, when
-         we ditch 1.8 compat too.
+      /*
+       ugh: last-pitch should  be junked.
 
-        When you do, B should start where A left off.
+       Change this for lilypond 2.0. When you do,
+       then B should start where A left off.
 
-       \relative { A \relative { ...} B }  */
-      Pitch *ptr = unsmob_pitch (get_property ("last-pitch"));
-      return (ptr) ?  *ptr : p;
+       \relative { A \relative { ...} B }
+
+      */
+      return * unsmob_pitch (get_property ("last-pitch"));
     }
   else
     return p;
index ad4082962c5074506da3e2cbad2f220bb19b8a37..0b3752eecdc79f7c278741303abb1f8ef689f966 100644 (file)
@@ -38,7 +38,7 @@ public:
 void
 Repeat_acknowledge_engraver::initialize ()
 {
-  context ()->set_property ("repeatCommands", SCM_EOL);
+  daddy_context_->set_property ("repeatCommands", SCM_EOL);
 }
 
 
@@ -49,9 +49,9 @@ Repeat_acknowledge_engraver::Repeat_acknowledge_engraver ()
 void
 Repeat_acknowledge_engraver::start_translation_timestep ()
 {
-  Context * tr = context ()->where_defined (ly_symbol2scm ("repeatCommands"));
+  Context * tr = daddy_context_->where_defined (ly_symbol2scm ("repeatCommands"));
   if (!tr)
-    tr = context ();
+    tr = daddy_context_;
 
   tr->set_property ("repeatCommands", SCM_EOL);
 }
@@ -71,14 +71,14 @@ Repeat_acknowledge_engraver::process_music ()
   bool start = false;
   bool end = false;
   bool volta_found = false;
-  while (ly_c_pair_p (cs))
+  while (gh_pair_p (cs))
     {
       SCM command = ly_car (cs);
       if (command == ly_symbol2scm ("start-repeat"))
        start = true;
       else if (command == ly_symbol2scm ("end-repeat"))
        end = true;
-      else if (ly_c_pair_p (command) && ly_car (command) == ly_symbol2scm ("volta"))
+      else if (gh_pair_p (command) && ly_car (command) == ly_symbol2scm ("volta"))
        volta_found = true;
       cs = ly_cdr (cs);      
     }
@@ -100,11 +100,11 @@ Repeat_acknowledge_engraver::process_music ()
    */
   SCM wb = get_property ("whichBar");
   SCM db  = get_property ("defaultBarType");
-  if (!ly_c_string_p (wb) || ly_c_equal_p (db, wb))
+  if (!gh_string_p (wb) || gh_equal_p (db, wb))
     {
-      if (s != "" || (volta_found && !ly_c_string_p (wb)))
+      if (s != "" || (volta_found && !gh_string_p (wb)))
        {
-         context ()->set_property ("whichBar", scm_makfrom0str (s.to_str0 ()));
+         daddy_context_->set_property ("whichBar", scm_makfrom0str (s.to_str0 ()));
        }
     }
 }
index db95698b5babd91c04d5e0f9c03f4086cbf32eb5..37bcfd3de9e5861dbdb4d2c79e0b138ad20625d1 100644 (file)
@@ -42,7 +42,7 @@ Repeated_music::to_relative_octave (Pitch p)
        {
          lily_1_8_compatibility_used = true; 
 
-         for (SCM s = alternatives (); ly_c_pair_p (s);  s = ly_cdr (s))
+         for (SCM s = alternatives (); gh_pair_p (s);  s = ly_cdr (s))
            unsmob_music (ly_car (s))->to_relative_octave (p);
        }     
 
@@ -68,7 +68,7 @@ Repeated_music::alternatives_get_length (bool fold) const
   int done =0;
 
   SCM p = alternatives ();
-  while (ly_c_pair_p (p) && done < repeat_count ())
+  while (gh_pair_p (p) && done < repeat_count ())
     {
       m = m + unsmob_music (ly_car (p))->get_length ();
       done ++;
@@ -90,7 +90,7 @@ Repeated_music::alternatives_volta_get_length () const
 
   Moment m;
   SCM p = alternatives ();
-  while (ly_c_pair_p (p))
+  while (gh_pair_p (p))
     {
       m = m + unsmob_music (ly_car (p))->get_length ();
       p = ly_cdr (p);
@@ -116,7 +116,7 @@ Repeated_music::body_get_length () const
 int
 Repeated_music::repeat_count () const
 {
-  return ly_scm2int (get_property ("repeat-count"));
+  return gh_scm2int (get_property ("repeat-count"));
 }
 
 
index 7af8ad7a73e97a6cbc3e5c54b50d5311ab5d6f57..149ad7983122ba9efb576e072add9b570b0e6570 100644 (file)
@@ -40,9 +40,9 @@ Rest_collision_engraver::process_acknowledged_grobs ()
          && rest_count_  < 2))
     return;
 
-  rest_collision_ = make_item ("RestCollision", SCM_EOL);
+  rest_collision_ = make_item ("RestCollision");
 
-  
+  announce_grob (rest_collision_, SCM_EOL);
   for (int i=0; i < note_columns_.size (); i++)
     Rest_collision::add_column (rest_collision_,note_columns_[i]);
 }
@@ -61,7 +61,11 @@ Rest_collision_engraver::acknowledge_grob (Grob_info i)
 void
 Rest_collision_engraver::stop_translation_timestep ()
 {
-  rest_collision_ = 0;
+  if (rest_collision_) 
+    {
+      typeset_grob (rest_collision_);
+      rest_collision_ = 0;
+    }
   note_columns_.clear ();
   rest_count_ = 0;
 }
index 83354c3a50541462b02e2145061699bbeef55e84..f97150bcc0c3724d28191900879be3eda12e23fa 100644 (file)
@@ -13,7 +13,7 @@
 #include "note-column.hh"
 #include "stem.hh"
 #include "rhythmic-head.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "rest.hh"
 #include "group-interface.hh"
 #include "staff-symbol-referencer.hh"
@@ -25,7 +25,7 @@ SCM
 Rest_collision::force_shift_callback (SCM element_smob, SCM axis)
 {
   Grob *them = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) gh_scm2int (axis);
   assert (a == Y_AXIS);
 
   Grob * rc = unsmob_grob (them->get_property ("rest-collision"));
@@ -37,7 +37,7 @@ Rest_collision::force_shift_callback (SCM element_smob, SCM axis)
       do_shift (rc);
     }
   
-  return scm_make_real (0.0);
+  return gh_double2scm (0.0);
 }
 
 
@@ -70,8 +70,8 @@ head_characteristic (Grob * col)
   if (!s)
     return SCM_BOOL_F;
   else
-    return scm_cons (s->get_property ("duration-log"),
-                   scm_int2num (Rhythmic_head::dot_count (s)));
+    return gh_cons (s->get_property ("duration-log"),
+                   gh_int2scm (Rhythmic_head::dot_count (s)));
 }
 
 /*
@@ -87,7 +87,7 @@ Rest_collision::do_shift (Grob *me)
   Link_array<Grob> rests;
   Link_array<Grob> notes;
 
-  for (SCM s = elts; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = elts; gh_pair_p (s); s = ly_cdr (s))
     {
       Grob * e = unsmob_grob (ly_car (s));
       if (unsmob_grob (e->get_property ("rest")))
@@ -150,15 +150,9 @@ Rest_collision::do_shift (Grob *me)
        ordered_rests[d].sort (Note_column::shift_compare);
       } while (flip (&d) != LEFT);
       
-      do {
-       if (ordered_rests[d].size () < 1)
-         {
-           if (ordered_rests[-d].size() > 1)
-             ordered_rests[-d][0]->warning (_("Too many colliding rests."));
-         
-           return SCM_UNSPECIFIED;
-         }
-      } while (flip (&d) != LEFT);
+      if (ordered_rests[UP].size () < 1
+         ||  ordered_rests[DOWN].size () < 1)
+       return SCM_UNSPECIFIED;
 
       Grob *common = common_refpoint_of_array (ordered_rests[DOWN], me, Y_AXIS);
       common =  common_refpoint_of_array (ordered_rests[UP], common, Y_AXIS);
@@ -251,7 +245,7 @@ Rest_collision::do_shift (Grob *me)
 
 
 ADD_INTERFACE (Rest_collision,"rest-collision-interface",
-              "Move around ordinary rests (not multi-measure-rests) to avoid "
-              "conflicts.",
-              "minimum-distance positioning-done elements");
+  "Move around ordinary rests (not multi-measure-rests) to avoid "
+"conflicts.",
+  "minimum-distance positioning-done elements");
 
index 245da72e0038bcd58f60aad5a5d08e669c58a183..1e0782331c011e8f371a6d8dbd05945b2f35b8e4 100644 (file)
@@ -48,8 +48,16 @@ Rest_engraver::start_translation_timestep ()
 void
 Rest_engraver::stop_translation_timestep ()
 {
-  rest_ =0;
-  dot_ =0;
+  if (rest_)
+    {
+      typeset_grob (rest_);
+      rest_ =0;
+    }
+  if (dot_)
+    {
+      typeset_grob (dot_);
+      dot_ =0;
+    }    
 }
 
 void
@@ -57,23 +65,23 @@ Rest_engraver::process_music ()
 {
   if (rest_req_ && !rest_) 
     {
-      rest_ = make_item ("Rest", rest_req_->self_scm ());
+      rest_ = make_item ("Rest");
 
       int durlog  = unsmob_duration (rest_req_->get_property ("duration"))-> duration_log ();
       
       rest_->set_property ("duration-log",
-                                 scm_int2num (durlog));
+                                 gh_int2scm (durlog));
 
       int dots =unsmob_duration (rest_req_->get_property ("duration"))->dot_count ();
       
       if (dots)
        {
-         dot_ = make_item ("Dots", SCM_EOL);
+         dot_ = make_item ("Dots");
 
          Rhythmic_head::set_dots (rest_, dot_);
          dot_->set_parent (rest_, Y_AXIS);
-         dot_->set_property ("dot-count", scm_int2num (dots));
-         
+         dot_->set_property ("dot-count", gh_int2scm (dots));
+         announce_grob (dot_, SCM_EOL);
        }
 
       Pitch *p = unsmob_pitch (rest_req_->get_property ("pitch"));
@@ -86,12 +94,13 @@ Rest_engraver::process_music ()
        {
          int pos= p->steps ();
          SCM c0 = get_property ("middleCPosition");
-         if (ly_c_number_p (c0))
-           pos += ly_scm2int (c0);
+         if (gh_number_p (c0))
+           pos += gh_scm2int (c0);
          
-         rest_->set_property ("staff-position", scm_int2num (pos));
+         rest_->set_property ("staff-position", gh_int2scm (pos));
        }
       
+      announce_grob (rest_, rest_req_->self_scm ());
     }
 }
 
index c5939d2a290f48cbd8348e798fbf4ff4d5657cd9..1bec02a6faca455f9210c3b195279be23cd72f52 100644 (file)
@@ -7,7 +7,7 @@
 */
 
 #include "stencil.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "font-interface.hh"
 #include "rest.hh"
 #include "dots.hh"
@@ -21,7 +21,7 @@ SCM
 Rest::after_line_breaking (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
-  int bt = ly_scm2int (me->get_property ("duration-log"));
+  int bt = gh_scm2int (me->get_property ("duration-log"));
   int lc = Staff_symbol_referencer::line_count (me);
   Real ss = Staff_symbol_referencer::staff_space (me);
   if (lc % 2)
@@ -40,12 +40,12 @@ Rest::after_line_breaking (SCM smob)
   if (d && bt > 4) // UGH.
     {
       d->set_property ("staff-position",
-                           scm_int2num ((bt == 7) ? 4 : 3));
+                           gh_int2scm ((bt == 7) ? 4 : 3));
     }
   if (d && bt >= -1 && bt <= 1) // UGH again.
     {
       d->set_property ("staff-position",
-                           scm_int2num ((bt == 0) ? -1 : 1));
+                           gh_int2scm ((bt == 0) ? -1 : 1));
     }
   return SCM_UNSPECIFIED;
 }
@@ -120,14 +120,14 @@ Rest::brew_internal_stencil (SCM smob)
   Grob* me = unsmob_grob (smob);
 
   SCM balltype_scm = me->get_property ("duration-log");
-  if (!ly_c_number_p (balltype_scm))
+  if (!gh_number_p (balltype_scm))
     return Stencil ().smobbed_copy ();
 
-  int balltype = ly_scm2int (balltype_scm);
+  int balltype = gh_scm2int (balltype_scm);
   
   String style; 
   SCM style_scm = me->get_property ("style");
-  if (ly_c_symbol_p (style_scm))
+  if (gh_symbol_p (style_scm))
     style = ly_scm2string (scm_symbol_to_string (style_scm));
 
   Font_metric *fm = Font_interface::get_default_font (me);
@@ -151,7 +151,7 @@ MAKE_SCHEME_CALLBACK (Rest,extent_callback,2);
 SCM
 Rest::extent_callback (SCM smob, SCM ax)
 {
-  Axis a = (Axis) ly_scm2int (ax);
+  Axis a = (Axis) gh_scm2int (ax);
   SCM m = brew_internal_stencil (smob);
   return ly_interval2scm (unsmob_stencil (m)->extent (a));
 }
@@ -161,17 +161,17 @@ SCM
 Rest::polyphonic_offset_callback (SCM smob, SCM)
 {
   Grob* me = unsmob_grob (smob);
-  if (ly_c_number_p (me->get_property ("staff-position")))
-    return scm_make_real (0);
+  if (gh_number_p (me->get_property ("staff-position")))
+    return gh_double2scm (0);
 
   Direction d = get_grob_direction (me);
   Real off = 2* d ;
   if (off)
     off *= Staff_symbol_referencer::staff_space (me);
-  return scm_make_real (off);
+  return gh_double2scm (off);
 }
 
 ADD_INTERFACE (Rest,"rest-interface",
   "A rest symbol.",
-  "style direction minimum-distance");
+  "style minimum-distance");
 
index 3c63236546d9a36980a3fe308bcf91395c087caa..5e4b5385b82e4612547a80673570db9824a3bb7a 100644 (file)
@@ -83,13 +83,14 @@ Rhythmic_column_engraver::process_acknowledged_grobs ()
     {
       if (!note_column_)
        {
-         note_column_ = make_item ("NoteColumn",rheads_[0]->self_scm ());
+         note_column_ = make_item ("NoteColumn");
+         announce_grob (note_column_, rheads_[0]->self_scm ());
 
-         spacing_ = make_item ("NoteSpacing", SCM_EOL);
-         spacing_->set_property ("left-items", scm_cons (note_column_->self_scm (), SCM_EOL));
+         spacing_ = make_item ("NoteSpacing");
+         spacing_->set_property ("left-items", gh_cons (note_column_->self_scm (), SCM_EOL));
 
 
-         
+         announce_grob (spacing_, SCM_EOL);
 
          if (last_spacing_)
            {
@@ -150,10 +151,15 @@ Rhythmic_column_engraver::acknowledge_grob (Grob_info i)
 void
 Rhythmic_column_engraver::stop_translation_timestep ()
 {
+  if (note_column_) 
+    {
+      typeset_grob (note_column_);
       note_column_ =0;
+    }
 
   if (spacing_)
     {
+      typeset_grob (spacing_);
       last_spacing_ = spacing_;
       spacing_ =0;
     }
index b76ee9229d60f4d3669c704b464f16b363f271ce..02ed3bd664bf15f27611cdd833aebf537d7f29a5 100644 (file)
@@ -32,7 +32,7 @@ int
 Rhythmic_head::dot_count (Grob*me) 
 {
   return get_dots (me)
-    ? ly_scm2int (get_dots (me)->get_property ("dot-count")) : 0;
+    ? gh_scm2int (get_dots (me)->get_property ("dot-count")) : 0;
 }
 
 void
@@ -45,7 +45,7 @@ int
 Rhythmic_head::duration_log (Grob*me) 
 {
   SCM s = me->get_property ("duration-log");
-  return ly_c_number_p (s) ? ly_scm2int (s) : 0;
+  return gh_number_p (s) ? gh_scm2int (s) : 0;
 }
 
 ADD_INTERFACE (Rhythmic_head,"rhythmic-head-interface",
diff --git a/lily/scaled-font-metric.cc b/lily/scaled-font-metric.cc
new file mode 100644 (file)
index 0000000..b3a07b3
--- /dev/null
@@ -0,0 +1,87 @@
+/*   
+     scaled-font-metric.cc -- declare Scaled_font_metric
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include "scaled-font-metric.hh"
+#include "string.hh"
+#include "stencil.hh"
+
+
+Scaled_font_metric::Scaled_font_metric (Font_metric* m, Real magn)
+{
+  magnification_ = magn;
+  SCM desc = m->description_;
+
+  Real total_mag = magn * gh_scm2double (ly_cdr (desc));
+  assert (total_mag);
+  
+  description_ = gh_cons (ly_car (desc), gh_double2scm (total_mag));
+  orig_ = m;
+}
+
+SCM
+Scaled_font_metric::make_scaled_font_metric (Font_metric*m, Real s)
+{
+  Scaled_font_metric *sfm = new Scaled_font_metric (m,s);
+  return sfm->self_scm ();
+}
+
+Stencil
+Scaled_font_metric::find_by_name (String s) const
+{
+  Stencil m = orig_->find_by_name (s);
+  Box b = m.extent_box ();
+  b.scale (magnification_);
+  Stencil q (b,fontify_atom ((Font_metric*) this, m.get_expr ()));
+
+  return q ;
+}
+
+Box 
+Scaled_font_metric::get_indexed_char (int i) const
+{
+  Box b = orig_->get_indexed_char (i);
+  b.scale (magnification_);
+  return b;  
+}
+
+Box 
+Scaled_font_metric::get_ascii_char (int i) const
+{
+  Box b = orig_->get_ascii_char (i);
+  b.scale (magnification_);
+  return b;  
+}
+
+Box
+Scaled_font_metric::text_dimension (String t) const
+{
+  Box b (orig_->text_dimension (t));
+
+  b.scale (magnification_);
+  return b;
+}
+
+int
+Scaled_font_metric::count () const
+{
+  return orig_->count ();
+}
+
+Offset
+Scaled_font_metric::get_indexed_wxwy (int k) const
+{
+  Offset o = orig_->get_indexed_wxwy (k);
+  return o * magnification_;
+}
+
+int
+Scaled_font_metric::name_to_index (String s)const
+{
+  return orig_->name_to_index (s);
+}
index 13c6ba0d5c2ca86088f28c1bfe790ad9d68cceb0..bc0874392ffa33ae531b014428e6ed623fcadc64 100644 (file)
@@ -19,7 +19,7 @@ copy_scm_hashes (SCM dest, SCM src)
 {
   int k = 0;
   for (int i = SCM_VECTOR_LENGTH (src); i--;)
-    for (SCM s = scm_vector_ref (src, SCM_MAKINUM (i)); ly_c_pair_p (s); s = ly_cdr (s))
+    for (SCM s = scm_vector_ref (src, SCM_MAKINUM (i)); ly_pair_p (s); s = ly_cdr (s))
       {
        scm_hashq_set_x (dest, ly_caar (s), ly_cdar (s));
        k++;
@@ -32,7 +32,7 @@ Scheme_hash_table::Scheme_hash_table ()
 {
   hash_tab_ = SCM_EOL;
   smobify_self ();
-  hash_tab_ = scm_make_vector (scm_int2num (119), SCM_EOL);
+  hash_tab_ = scm_make_vector (gh_int2scm (119), SCM_EOL);
   elt_count_ = 0;
 }
 
@@ -44,7 +44,7 @@ Scheme_hash_table::Scheme_hash_table (Scheme_hash_table const &src)
   elt_count_ = 0;
   smobify_self ();
 
-  hash_tab_ = scm_make_vector (scm_int2num (src.elt_count_ >? 11 ), SCM_EOL);  
+  hash_tab_ = scm_make_vector (gh_int2scm (src.elt_count_ >? 11 ), SCM_EOL);  
   elt_count_ = copy_scm_hashes (hash_tab_, src.hash_tab_);
 }
 
@@ -54,7 +54,7 @@ Scheme_hash_table::operator = (Scheme_hash_table const & src)
   if (&src == this)
     return;
   
-  hash_tab_ = scm_make_vector (scm_int2num (src.elt_count_ >? 11), SCM_EOL);  
+  hash_tab_ = scm_make_vector (gh_int2scm (src.elt_count_ >? 11), SCM_EOL);  
   elt_count_ = copy_scm_hashes (hash_tab_, src.hash_tab_);
 }
 
@@ -82,7 +82,7 @@ bool
 Scheme_hash_table::try_retrieve (SCM k, SCM *v)
 {
   SCM handle = scm_hashq_get_handle (hash_tab_, k);
-  if (ly_c_pair_p (handle))
+  if (ly_pair_p (handle))
     {
       *v = ly_cdr (handle);
       return true;
@@ -95,27 +95,27 @@ Scheme_hash_table::try_retrieve (SCM k, SCM *v)
 bool
 Scheme_hash_table::contains (SCM k) const
 {
-  return ly_c_pair_p (scm_hashq_get_handle (hash_tab_, k));
+  return ly_pair_p (scm_hashq_get_handle (hash_tab_, k));
 }
 
 void
 Scheme_hash_table::set (SCM k, SCM v)
 {
-  assert (ly_c_symbol_p (k));
+  assert (gh_symbol_p (k));
   SCM handle = scm_hashq_create_handle_x (hash_tab_, k, SCM_UNDEFINED);
   if (ly_cdr (handle) == SCM_UNDEFINED)
     {
       elt_count_++;
     }
   
-  scm_set_cdr_x (handle, v);
+  gh_set_cdr_x (handle, v);
 
   /*
     resize if getting too large.
   */
   if (elt_count_ > 2 * SCM_VECTOR_LENGTH (hash_tab_))
     {
-      SCM nh = scm_make_vector (scm_int2num (3* elt_count_+1), SCM_EOL);
+      SCM nh = scm_make_vector (gh_int2scm (3* elt_count_+1), SCM_EOL);
       elt_count_ = copy_scm_hashes (nh, hash_tab_);
       hash_tab_ = nh;
     }
@@ -150,7 +150,7 @@ Scheme_hash_table::to_alist () const
 {
   SCM l = SCM_EOL;
   for (int i = SCM_VECTOR_LENGTH (hash_tab_); i--;)
-    for (SCM s = scm_vector_ref (hash_tab_, scm_int2num (i)); ly_c_pair_p (s); s = ly_cdr (s))
+    for (SCM s = scm_vector_ref (hash_tab_, gh_int2scm (i)); ly_pair_p (s); s = ly_cdr (s))
       {
        l = scm_acons (ly_caar (s), ly_cdar (s), l);
       }
index 5a7c6cee19b8a8ce0b69802c552b3a1586119e4e..aac158ba9202806c64a5bbe3bfb9a717cc8491e0 100644 (file)
@@ -1,10 +1,10 @@
-/*
+/*   
   scm-option.cc --  implement option setting from Scheme
-
+  
   source file of the GNU LilyPond music typesetter
-
+  
   (c) 2001--2004  Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
+  
  */
 #include <stdio.h>
 
@@ -25,7 +25,7 @@
   preferably, also dont use TESTING_LEVEL_GLOBAL, since it defeats
   another purpose of this very versatile interface, which is to
   support multiple debug/testing options concurrently.
-
+  
  */
 
 
@@ -46,25 +46,27 @@ bool lily_1_8_compatibility_used = false;
  */
 bool internal_type_checking_global_b;
 
-
-/*
-  What is this function for ? 
- */
 LY_DEFINE (ly_option_usage, "ly:option-usage", 0, 0, 0, (SCM),
-                 "Print ly:set-option usage")
-{
+                 "Print ly-set-option usage")
+{  
   printf ( _("lilypond -e EXPR means:").to_str0 ());
   puts ("");
   printf (_ ("  Evalute the Scheme EXPR before parsing any .ly files.").to_str0 ());
   puts ("");
   printf (_ ("  Multiple -e options may be given, they will be evaluated sequentially.").to_str0 ());
   puts ("");
-  printf (_("  The function ly:set-option allows for access to some internal variables.").to_str0 ());
+  printf (_("  The function ly-set-option allows for access to some internal variables.").to_str0 ());
   puts ("\n");
   printf (_ ("Usage: lilypond-bin -e \"(ly-set-option SYMBOL VAL)\"").to_str0 ());
   puts ("\n");
-  printf (_ ("Use help as  SYMBOL to get online help.").to_str0 ());
-
+  printf (_ ("Where SYMBOL VAL pair is any of:").to_str0 ());
+  puts ("");
+  printf ( "  help ANY-SYMBOL\n"
+          "  internal-type-checking BOOLEAN\n"
+          "  midi-debug BOOLEAN\n"
+          "  parse-protect BOOLEAN\n"
+          "  testing-level INTEGER\n");
+  
   exit (0);
   return SCM_UNSPECIFIED;
 }
@@ -75,11 +77,7 @@ LY_DEFINE (ly_option_usage, "ly:option-usage", 0, 0, 0, (SCM),
 don't timestamp the output
 
 @item -t,--test
-Switch on any experimental features.  Not for general public use.
-
-*/
-
-
+Switch on any experimental features.  Not for general public use. */
 LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val),
            "Set a global option value.  Supported options include\n"
 "\n"
@@ -106,35 +104,49 @@ LY_DEFINE (ly_set_option, "ly:set-option", 1, 1, 0, (SCM var, SCM val),
     val = SCM_BOOL_T;
 
   if (var == ly_symbol2scm ("help"))
-    /* lilypond -e "(ly-set-option 'help #t)" */
-    ly_option_usage (SCM_EOL);
+    {
+      /* lilypond -e "(ly-set-option 'help #t)" */
+      ly_option_usage (SCM_EOL);
+    }
   else if (var == ly_symbol2scm ("midi-debug"))
-    midi_debug_global_b = to_boolean (val);
+    {
+      midi_debug_global_b = to_boolean (val);
+    }
   else if (var == ly_symbol2scm ("testing-level"))
-    testing_level_global = ly_scm2int (val);
+    {
+     testing_level_global = gh_scm2int (val); 
+    }
   else if (var == ly_symbol2scm ("parse-protect" ))
-    parse_protect_global = to_boolean (val);
+    {
+      parse_protect_global = to_boolean (val);
+    }
   else if (var == ly_symbol2scm ("internal-type-checking"))
-    internal_type_checking_global_b = to_boolean (val);
+    {
+     internal_type_checking_global_b = to_boolean (val); 
+    }
   else if (var == ly_symbol2scm ("old-relative"))
     {
       lily_1_8_relative = true;
-      /*  Needs to be reset for each file that uses this option.  */
-      lily_1_8_compatibility_used = false;
+      lily_1_8_compatibility_used = false; 
     }
   else if (var == ly_symbol2scm ("new-relative"))
-    lily_1_8_relative = false;
+    {
+      lily_1_8_relative = false;
+    }
   else if (var == ly_symbol2scm ("debug-beam"))
     {
       extern bool debug_beam_quanting_flag;
       debug_beam_quanting_flag = true;
     }
   else
-    warning (_f ("No such internal option: %s", ly_scm2string (var)));
+    {
+      warning (_("Unknown internal option!"));
+    }
 
   return SCM_UNSPECIFIED;
 }
 
+
 LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var),
            "Get a global option setting.  Supported options include\n"
           "@table @code\n"
@@ -147,17 +159,22 @@ LY_DEFINE (ly_get_option, "ly:get-option", 1, 0, 0, (SCM var),
           "@end table\n"
           "\n")
 {
-  SCM o = SCM_UNSPECIFIED;
-  
-  if (var == ly_symbol2scm ("safe")) // heavily used; put in front. 
-    o = ly_bool2scm (safe_global_b);
-  else  if (var == ly_symbol2scm ("old-relative-used"))
-    o = ly_bool2scm (lily_1_8_compatibility_used);
-  else if (var == ly_symbol2scm ("old-relative"))
-    o = ly_bool2scm (lily_1_8_relative);
-  else if (var == ly_symbol2scm ("verbose"))
-    o = ly_bool2scm (verbose_global_b);
+  if (var == ly_symbol2scm ("old-relative-used"))
+    {
+      return gh_bool2scm (lily_1_8_compatibility_used);
+    }
+  if (var == ly_symbol2scm ("old-relative"))
+    {
+      return gh_bool2scm (lily_1_8_relative);
+    }
+  if (var == ly_symbol2scm ("verbose"))
+    {
+      return gh_bool2scm (verbose_global_b);
+    }  
   else
-    warning (_f ("No such internal option: %s", ly_scm2string (var)));
-  return o;
+    {
+      warning (_("Unknown internal option!"));
+    }
+
+  return SCM_UNSPECIFIED;
 }
index 6cbd6a555915c9263a8f4ee6d20f1aea3adf7213..acabbe813f20f2275f561320042343a7fc98d6a6 100644 (file)
@@ -12,7 +12,7 @@
 void
 Score_context::prepare (Moment w)
 {
-  Translator*  t = implementation ();
+  Translator*  t = unsmob_translator (implementation_);
   Score_translator * s = dynamic_cast<Score_translator *> (t);
 
   s->prepare (w);
@@ -21,7 +21,7 @@ Score_context::prepare (Moment w)
 void
 Score_context::finish ()
 {
-  Translator*  t = implementation ();
+  Translator*  t = unsmob_translator (implementation_);
   Score_translator * s = dynamic_cast<Score_translator *> (t);
 
   s->finish ();
@@ -30,7 +30,7 @@ Score_context::finish ()
 void
 Score_context::one_time_step ()
 {
-  Translator*  t = implementation ();
+  Translator*  t = unsmob_translator (implementation_);
   Score_translator * s = dynamic_cast<Score_translator *> (t);
   s->one_time_step ();
 }
@@ -38,7 +38,7 @@ Score_context::one_time_step ()
 Music_output*
 Score_context::get_output ()
 {
-  Translator *t = implementation ();
+  Translator *t = unsmob_translator (implementation_);
   Score_translator *s = dynamic_cast<Score_translator *> (t);
   return s->get_output ();
 }
index 9321423219f981385853e2d338b1f9db502e6b3a..837fdf5f9e35371e9761a9bcdd0c007f0daac77e 100644 (file)
@@ -15,7 +15,7 @@
 #include "score-engraver.hh"
 #include "paper-score.hh"
 #include "paper-column.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "axis-group-interface.hh"
 #include "context-def.hh"
 #include "staff-spacing.hh"
@@ -47,9 +47,9 @@ Score_engraver::make_columns ()
   if (!command_column_)
     {
       SCM nmp
-       = updated_grob_properties (context (),
+       = updated_grob_properties (daddy_context_,
                                   ly_symbol2scm ("NonMusicalPaperColumn"));
-      SCM pc = updated_grob_properties (context (),
+      SCM pc = updated_grob_properties (daddy_context_,
                                        ly_symbol2scm ("PaperColumn"));
       
       set_columns (new Paper_column (nmp), new Paper_column (pc));
@@ -80,7 +80,7 @@ Score_engraver::prepare (Moment m)
   command_column_->set_property ("when", w);
   musical_column_->set_property ("when", w);
   
-  recurse_over_translators (context (), &Translator::start_translation_timestep, DOWN);
+  recurse_over_translators (daddy_context_, &Translator::start_translation_timestep, DOWN);
 }
 
 void
@@ -89,7 +89,7 @@ Score_engraver::finish ()
   if ((breaks_%8))
     progress_indication ("[" + to_string (breaks_) + "]");
 
-  recurse_over_translators (context (), &Translator::finalize, UP);
+  recurse_over_translators (daddy_context_, &Translator::finalize, UP);
 }
 
 /*
@@ -105,9 +105,9 @@ Score_engraver::initialize ()
    
 
   pscore_ = new Paper_score;
-  pscore_->paper_ = dynamic_cast<Output_def*> (get_output_def ());
+  pscore_->paper_ = dynamic_cast<Paper_def*> (get_output_def ());
 
-  SCM props = updated_grob_properties (context (), ly_symbol2scm ("System"));
+  SCM props = updated_grob_properties (daddy_context_, ly_symbol2scm ("System"));
 
   pscore_->typeset_line (new System (props));
   
@@ -139,11 +139,11 @@ Score_engraver::one_time_step ()
 {
   if (!to_boolean (get_property ("skipTypesetting")))
     {
-      recurse_over_translators (context (), &Engraver::process_music, UP);
-      recurse_over_translators (context (), &Engraver::do_announces, UP);
+      recurse_over_translators (daddy_context_, &Engraver::process_music, UP);
+      recurse_over_translators (daddy_context_, &Engraver::do_announces, UP);
     }
   
-  recurse_over_translators (context (), &Translator::stop_translation_timestep, UP);
+  recurse_over_translators (daddy_context_, &Translator::stop_translation_timestep, UP);
 }
 
 void
@@ -151,9 +151,16 @@ Score_engraver::announce_grob (Grob_info info)
 {
   announce_infos_.push (info);
   pscore_->system_->typeset_grob (info.grob_);
-  elems_.push (info.grob_);
 }
 
+void
+Score_engraver::typeset_grob (Grob *elem)
+{
+  if (!elem)
+    programming_error ("Score_engraver: empty elt\n");
+  else
+    elems_.push (elem);
+}
 
 void
 Score_engraver::typeset_all ()
@@ -161,14 +168,35 @@ Score_engraver::typeset_all ()
   for (int i =0; i < elems_.size (); i++) 
     {
       Grob * elem = elems_[i];
-
       
-      if (dynamic_cast<Item*> (elem)) 
+      if (Spanner *s = dynamic_cast <Spanner *> (elem))
+       {
+         /*
+           do something sensible if spanner not 
+           spanned on 2 items.
+         */
+         Direction d = LEFT;
+         do {
+           if (!s->get_bound (d))
+             {
+               Grob * cc
+                 = unsmob_grob (get_property ("currentCommandColumn"));
+               s->set_bound (d, cc);
+               /* don't warn for empty/suicided spanners,
+                  it makes real warningsinvisible.
+                  maybe should be junked earlier? */
+               if (elem->live ())
+                 elem->warning (_f ("unbound spanner `%s'", s->name ().to_str0 ()));
+             }
+         }
+         while (flip (&d) != LEFT);
+
+         if (dynamic_cast<Item*> (s->get_parent (Y_AXIS)))
+           programming_error ("Spanner Y-parent is an item.");
+       }
+      else 
        {
-         if (!elem->get_parent (X_AXIS)
-             && elem != command_column_
-             && elem != musical_column_
-             )
+         if (!elem->get_parent (X_AXIS))
            {
              bool br = to_boolean (elem->get_property ("breakable"));
              Axis_group_interface::add_element (br ? command_column_ : musical_column_, elem);
@@ -213,12 +241,12 @@ Score_engraver::set_columns (Paper_column *new_command,
   musical_column_ = new_musical;
   if (new_command)
     {
-      context ()->set_property ("currentCommandColumn", new_command->self_scm ());  
+      daddy_context_->set_property ("currentCommandColumn", new_command->self_scm ());  
     }
   
   if (new_musical)
     {
-      context ()->set_property ("currentMusicalColumn", new_musical->self_scm ());
+      daddy_context_->set_property ("currentMusicalColumn", new_musical->self_scm ());
     }
 }
 
@@ -231,36 +259,30 @@ Score_engraver::get_output ()
 }
 
 bool
-Score_engraver::try_music (Music *m)
+Score_engraver::try_music (Music*r)
 {
-  if (Engraver_group_engraver::try_music (m))
-    return true;
+  bool gotcha = Engraver_group_engraver::try_music (r);  
 
-  if (m->is_mus_type ("break-event"))
+  if (!gotcha && r->is_mus_type ("break-event"))
     {
-      SCM pen = command_column_->get_property ("penalty");
-      Real total_penalty = ly_c_number_p (pen) ? ly_scm2double (pen) : 0.0;
-
-      SCM mpen = m->get_property ("penalty");
-      if (ly_c_number_p (mpen))
-       total_penalty += ly_scm2double (mpen);
-
-      command_column_->set_property ("penalty", scm_make_real (total_penalty));
+      gotcha = true;
 
-      /* ugh.  arbitrary, hardcoded */
-      if (total_penalty > 10000.0)
+      SCM pen = command_column_->get_property ("penalty");
+      Real total_penalty = gh_number_p (pen)
+       ? gh_scm2double (pen)
+       : 0.0;
+
+      SCM rpen = r->get_property ("penalty");
+      if (gh_number_p (rpen))
+       total_penalty +=  gh_scm2double (rpen);
+         
+      if (total_penalty > 10000.0) //  ugh. arbitrary.
        forbid_breaks ();
 
-      SCM page_pen = command_column_->get_property ("page-penalty");
-      Real total_pp = ly_c_number_p (page_pen) ? ly_scm2double (page_pen) : 0.0;
-      SCM mpage_pen = m->get_property ("page-penalty");
-      if (ly_c_number_p (mpage_pen))
-       total_pp += ly_scm2double (mpage_pen);
-      
-      command_column_->set_property ("page-penalty", scm_make_real (total_pp));
-      return true;
+      command_column_->set_property ("penalty",
+                                         gh_double2scm (total_penalty));
     }
-  return false;
+  return gotcha;
 }
 
 void
index 4d231ff63a34fe2a72e2a82d32261a94f88a9cb3..54e2c90fb9e59691ad21b94af232fc27b822e8ec 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include "score-performer.hh"
+#include "midi-def.hh"
 #include "audio-column.hh"
 #include "audio-item.hh"
 #include "performance.hh"
@@ -14,7 +15,6 @@
 #include "string-convert.hh"
 #include "warn.hh"
 #include "context-def.hh"
-#include "output-def.hh"
 
 
 
@@ -58,27 +58,27 @@ Score_performer::prepare (Moment m)
 {
   audio_column_ = new Audio_column (m);
   play_element (audio_column_);
-  recurse_over_translators (context (), &Translator::start_translation_timestep, UP);
+  recurse_over_translators (daddy_context_, &Translator::start_translation_timestep, UP);
 }
 
 void
 Score_performer::finish ()
 {
-  recurse_over_translators (context (), &Translator::finalize, UP);
+  recurse_over_translators (daddy_context_, &Translator::finalize, UP);
 }
   
 void 
 Score_performer::one_time_step ()
 {
-  recurse_over_translators (context (), &Performer::process_music, UP);
-  recurse_over_translators (context (), &Performer::do_announces, UP);
-  recurse_over_translators (context (), &Translator::stop_translation_timestep, UP);
+  recurse_over_translators (daddy_context_, &Performer::process_music, UP);
+  recurse_over_translators (daddy_context_, &Performer::do_announces, UP);
+  recurse_over_translators (daddy_context_, &Translator::stop_translation_timestep, UP);
 }
 
 int
 Score_performer::get_tempo () const
 {
-  return ::get_tempo (performance_->midi_, Moment (Rational (1, 4)));
+  return performance_->midi_->get_tempo (Moment (Rational (1, 4)));
 }
 
 
@@ -94,7 +94,7 @@ void
 Score_performer::initialize ()
 {
   performance_ = new Performance;
-  performance_->midi_ = get_output_def ();
+  performance_->midi_ = dynamic_cast<Midi_def*> (get_output_def ());
 
   Translator_group::initialize ();
 }
index 86eccf3e6e489f4ab48c10f999bb3ce8182de328..c43822ac2fb9f458a235457e4827b8d3592a4ac6 100644 (file)
@@ -8,48 +8,59 @@
 
 #include <stdio.h>
 
-#include "book.hh"
-
-#include "cpu-timer.hh"
-#include "global-context.hh"
-#include "ly-module.hh"
 #include "ly-smobs.icc"
-#include "main.hh"
-#include "music-iterator.hh"
-#include "output-def.hh"
+
+#include "score.hh"
+#include "warn.hh"
+#include "music-output-def.hh"
 #include "music-output.hh"
+#include "music-iterator.hh"
 #include "music.hh"
+#include "global-context.hh"
+#include "scm-hash.hh"
+#include "cpu-timer.hh"
+#include "main.hh"
+#include "paper-def.hh"
+#include "ly-module.hh"
 #include "paper-book.hh"
-#include "output-def.hh"
 #include "paper-score.hh"
-#include "scm-hash.hh"
-#include "score.hh"
-#include "warn.hh"
+#include "input-file-results.hh"
 
+
+/*
+  TODO: junkme.
+ */
 Score::Score ()
   : Input ()
 {
   header_ = SCM_EOL;
   music_ = SCM_EOL;
+
   smobify_self ();
 }
 
 Score::~Score ()
 {
+  
 }
 
+
+
+
 IMPLEMENT_SMOBS (Score);
 IMPLEMENT_DEFAULT_EQUAL_P (Score);
-IMPLEMENT_TYPE_P (Score, "ly:score?");
+
 
 SCM
 Score::mark_smob (SCM s)
 {
-  Score *sc = (Score*) SCM_CELL_WORD_1 (s);
+  Score * sc = (Score*) SCM_CELL_WORD_1 (s);
+
   if (sc->header_)
     scm_gc_mark (sc->header_);
   for (int i = sc->defs_.size (); i--;)
     scm_gc_mark (sc->defs_[i]->self_scm ());
+  
   return sc->music_;
 }
 
@@ -61,47 +72,50 @@ Score::print_smob (SCM , SCM p, scm_print_state*)
   return 1;
 }
 
+
+
+/*
+  store point & click locations.
+  Global to save some time. (Sue us!)
+ */
+
 Score::Score (Score const &s)
   : Input (s)
 {
   music_ = SCM_EOL;
-
-  /* FIXME: SCM_EOL? */
   header_ = 0;
-
   smobify_self ();
 
-  Music *m =unsmob_music (s.music_);
-  music_ = m ? m->clone ()->self_scm () : SCM_EOL;
+  Music * m =unsmob_music (s.music_);
+  music_ =  m?m->clone ()->self_scm () : SCM_EOL;
   scm_gc_unprotect_object (music_);
   
   for (int i = 0; i < s.defs_.size (); i++)
     defs_.push (s.defs_[i]->clone ());
 
-  header_ = ly_make_anonymous_module (false);
-  if (ly_c_module_p (s.header_))
+  header_ = ly_make_anonymous_module ();
+  if (ly_module_p (s.header_))
     ly_import_module (header_, s.header_);
 }
 
 LY_DEFINE (ly_run_translator, "ly:run-translator", 
-          2, 0, 0, (SCM mus, SCM output_def),
+         2, 0, 0, (SCM mus, SCM output_def),
           "Process @var{mus} according to @var{output_def}. "
           "An interpretation context is set up, "
           "and @var{mus} is interpreted with it.  "
           "The context is returned in its final state.")
 {
-  Output_def *odef = unsmob_output_def (output_def);
+  Music_output_def *odef = unsmob_music_output_def (output_def);
   Music *music = unsmob_music (mus);
 
-  if (!music)
-    return SCM_BOOL_F;
-
   SCM_ASSERT_TYPE (music, mus, SCM_ARG1, __FUNCTION__, "Music");
   SCM_ASSERT_TYPE (odef, output_def, SCM_ARG2, __FUNCTION__, "Output definition");
   
   Cpu_timer timer;
   
-  Global_context *trans = new Global_context (odef, music->get_length ());
+  Global_context * trans = new Global_context (odef,
+                                              music->get_length ()
+                                              );
   
   if (!trans)
     {
@@ -116,11 +130,10 @@ LY_DEFINE (ly_run_translator, "ly:run-translator",
 
   iter->construct_children ();
 
-  if (!iter->ok ())
+  if (! iter->ok ())
     {
       warning (_ ("Need music in a score"));
-      /* todo: should throw exception. */
-      return SCM_BOOL_F;
+      return SCM_BOOL_F;       // todo: should throw exception.
     }
 
   trans->run_iterator_on_me (iter);
@@ -130,6 +143,7 @@ LY_DEFINE (ly_run_translator, "ly:run-translator",
 
   if (verbose_global_b)
     progress_indication (_f ("elapsed time: %.2f seconds",  timer.read ()));
+
   
   return scm_gc_unprotect_object (trans->self_scm ());
 }
@@ -141,41 +155,19 @@ LY_DEFINE (ly_format_output, "ly:format-output",
 {
   Global_context *g = dynamic_cast<Global_context*> (unsmob_context (context));
   SCM_ASSERT_TYPE (g, context, SCM_ARG1, __FUNCTION__, "Global context");
-  SCM_ASSERT_TYPE (ly_c_string_p (outname), outname, SCM_ARG2, __FUNCTION__, "output filename");
+  SCM_ASSERT_TYPE (gh_string_p (outname), outname, SCM_ARG2, __FUNCTION__, "output filename");
 
   Music_output *output = g->get_output ();
   progress_indication ("\n");
-  /* ugh, midi still wants outname  */
+  // ugh, midi still wants outname
   return output->process (ly_scm2string (outname));
 }
 
 void
-default_rendering (SCM music, SCM outdef,
-                  SCM book_outputdef,
-                  SCM header, SCM outname)
+default_rendering (SCM music, SCM outdef, SCM header, SCM outname)
 {
-  SCM scaled_def = outdef;
-  SCM scaled_bookdef = book_outputdef;
-  
-  Output_def *bpd = unsmob_output_def (book_outputdef);
+  SCM context = ly_run_translator (music, outdef);
 
-  /* ugh.  */
-  if (bpd->c_variable ("is-bookpaper") == SCM_BOOL_T)
-    {
-      Real scale = ly_scm2double (bpd->c_variable ("outputscale"));
-      
-      Output_def *def = scale_output_def (unsmob_output_def (outdef), scale);
-      scaled_def = def->self_scm ();
-
-      scaled_bookdef = scale_output_def (bpd, scale)->self_scm ();
-      unsmob_output_def (scaled_def)->parent_
-       = unsmob_output_def (scaled_bookdef);
-      
-      scm_gc_unprotect_object (scaled_bookdef);
-      scm_gc_unprotect_object (scaled_def);
-    }
-  
-  SCM context = ly_run_translator (music, scaled_def);
   if (Global_context *g = dynamic_cast<Global_context*>
       (unsmob_context (context)))
     {
@@ -183,129 +175,15 @@ default_rendering (SCM music, SCM outdef,
       Music_output *output = g->get_output ();
       if (systems != SCM_UNDEFINED)
        {
-         /* ugh, this is strange, Paper_book without a Book object. */
-         Paper_book *paper_book = new Paper_book ();
-         paper_book->header_ = header;
-         paper_book->bookpaper_ = unsmob_output_def (scaled_bookdef);
-         
-         Score_lines sc;
-         sc.lines_ = systems;
-         sc.header_ = header;
-
-         paper_book->score_lines_.push (sc);
-         
-         paper_book->classic_output (ly_scm2string (outname));
-         scm_gc_unprotect_object (paper_book->self_scm ());
+         Paper_score *ps = dynamic_cast<Paper_score*> (output);
+
+         paper_book->papers_.push (ps->paper_);
+         paper_book->scores_.push (systems);
+         paper_book->global_headers_.push (global_input_file->header_);
+         paper_book->headers_.push (header);
+         if (output_format_global != PAGE_LAYOUT)
+           paper_book->classic_output (ly_scm2string (outname));
        }
       delete output;
     }
-
-  scm_remember_upto_here_1 (scaled_def);
-  scm_remember_upto_here_1 (scaled_bookdef);
-}
-
-/*
-Format score, return systems. OUTNAME is still passed to create a midi
-file.
-
-PAPERBOOK should be scaled already.
-
-*/
-SCM
-Score::book_rendering (String outname,
-                      Output_def *paperbook,
-                      Output_def *default_def)
-{
-  SCM scaled_bookdef = SCM_EOL;
-  Real scale = 1.0;
-
-  if (paperbook && paperbook->c_variable ("is-bookpaper") == SCM_BOOL_T)
-    scale = ly_scm2double (paperbook->c_variable ("outputscale"));
-  
-  SCM out = scm_makfrom0str (outname.to_str0 ());
-  SCM systems = SCM_EOL;
-  int outdef_count = defs_.size ();
-  for (int i = 0; !i || i < outdef_count; i++)
-    {
-      Output_def *def = outdef_count ? defs_[i] : default_def;
-      SCM scaled= SCM_EOL;
-      if (def->c_variable ("is-paper") == SCM_BOOL_T)
-       {
-         def = scale_output_def (def, scale);
-         def->parent_ = paperbook;
-         scaled = def->self_scm ();
-         scm_gc_unprotect_object (scaled);
-       }
-
-      /* TODO: fix or junk --no-paper.  */
-      SCM context = ly_run_translator (music_, def->self_scm ());
-      if (dynamic_cast<Global_context*> (unsmob_context (context)))
-       {
-         SCM s = ly_format_output (context, out);
-         if (s != SCM_UNDEFINED)
-           systems = s;
-       }
-
-      scm_remember_upto_here_1 (scaled);
-    }
-  
-  scm_remember_upto_here_1 (scaled_bookdef);
-  return systems;
-}
-
-LY_DEFINE (ly_score_bookify, "ly:score-bookify",
-          2, 0, 0,
-          (SCM score_smob, SCM header),
-          "Return @var{score_smob} encapsulated in a Book object. Set "
-          "@var{header} as book level header.")
-{
-  SCM_ASSERT_TYPE (unsmob_score (score_smob), score_smob,
-                  SCM_ARG1, __FUNCTION__, "score_smob");
-  
-  Score *score = unsmob_score (score_smob);
-  Book *book = new Book;
-  book->scores_.push (score);
-  book->header_ = header;
-  scm_gc_unprotect_object (book->self_scm ());
-  return book->self_scm ();
-}
-
-
-LY_DEFINE (ly_score_embedded_format, "ly:score-embedded-format",
-          2, 0, 0, (SCM score, SCM paper),
-          "Run @var{score} through @var{paper}, an output definition, "
-          "scaled to correct outputscale already, "
-          "return a list of paper-lines.")
-{
-  Score * sc = unsmob_score (score);
-  Output_def *od = unsmob_output_def (paper);
-
-  SCM_ASSERT_TYPE (sc, score, SCM_ARG1, __FUNCTION__, "Score");
-  SCM_ASSERT_TYPE (od, paper, SCM_ARG2, __FUNCTION__, "Output_def");
-
-  SCM lines = SCM_EOL;
-  Output_def * score_def  = 0;
-
-  /* UGR, FIXME, these are default \paper blocks once again.  They
-     suck. */
-  for (int i = 0; !score_def && i < sc->defs_.size (); i++)
-    if (sc->defs_[i]->c_variable ("is-paper") == SCM_BOOL_T)
-      score_def = sc->defs_[i];
-
-  if (!score_def)
-    return lines;
-      
-  score_def = score_def->clone ();
-  SCM prot = score_def->self_scm ();
-  scm_gc_unprotect_object (prot);
-
-  /* TODO: SCORE_DEF should be scaled according to OD->parent_ or OD
-     itself. */
-  score_def->parent_ = od;
-  
-  SCM context = ly_run_translator (sc->music_, score_def->self_scm ());
-  lines = ly_format_output (context, scm_makfrom0str ("<embedded>"));
-  
-  scm_remember_upto_here_1 (prot);
-  return lines;
 }
index 0975c0a4ddd94b5fcf45b8bb877eaf96cff37281..9fd77afb47abe14d7a1ea4f52aa922c4c66146e8 100644 (file)
@@ -37,7 +37,11 @@ Script_column_engraver::Script_column_engraver ()
 void
 Script_column_engraver::stop_translation_timestep ()
 {
-  scol_ =0;
+  if (scol_)
+    {
+      typeset_grob (scol_);
+      scol_ =0;
+    }
   scripts_.clear ();
 }
 
@@ -60,8 +64,8 @@ Script_column_engraver::process_acknowledged_grobs ()
 {
   if (!scol_ && scripts_.size () > 1)
     {
-      scol_ = make_item ("ScriptColumn", SCM_EOL);
-      
+      scol_ = make_item ("ScriptColumn");
+      announce_grob (scol_, SCM_EOL);
     }
 
   if (scol_)
index faddd44efc856788be3c4e57d099370d5e4179c5..5121d5e77fc380bd31c117c927e56035f5970282 100644 (file)
@@ -15,7 +15,7 @@ void
 Script_column::add_staff_sided (Grob *me, Item *i)
 {
   SCM p = i->get_property ("script-priority");
-  if (!ly_c_number_p (p))
+  if (!gh_number_p (p))
     return;
 
   Pointer_group_interface::add_grob (me, ly_symbol2scm ("scripts"),i);
@@ -23,7 +23,7 @@ Script_column::add_staff_sided (Grob *me, Item *i)
   me->add_dependency (i);
 }
 
-LY_DEFINE (ly_grob_script_priority_less, "ly:grob-script-priority-less",
+LY_DEFINE (grob_script_priority_less, "ly:grob-script-priority-less",
          2, 0, 0, (SCM a, SCM b),
          "Compare two grobs by script priority. For internal use.")
 {
@@ -33,7 +33,7 @@ LY_DEFINE (ly_grob_script_priority_less, "ly:grob-script-priority-less",
   SCM p1 = i1->get_property ("script-priority");
   SCM p2 = i2->get_property ("script-priority");
 
-  return ly_scm2int (p1) < ly_scm2int (p2) ? SCM_BOOL_T : SCM_BOOL_F;
+  return gh_scm2int (p1) < gh_scm2int (p2) ? SCM_BOOL_T : SCM_BOOL_F;
 }
 
 MAKE_SCHEME_CALLBACK (Script_column, before_line_breaking, 1);
@@ -44,13 +44,10 @@ Script_column::before_line_breaking (SCM smob)
   Drul_array<SCM> scripts (SCM_EOL, SCM_EOL);
   Link_array<Grob> staff_sided;
   
-  for (SCM s = me->get_property ("scripts"); ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("scripts"); gh_pair_p (s); s = gh_cdr (s))
     {
-      Grob *sc = unsmob_grob (ly_car (s));
+      Grob *sc = unsmob_grob (gh_car (s));
 
-      /*
-       Don't want to consider scripts horizontally next to notes.
-       */
       if (!sc->has_offset_callback (Side_position_interface::aligned_side_proc,
                                    X_AXIS))
        staff_sided.push (sc);
@@ -64,7 +61,7 @@ Script_column::before_line_breaking (SCM smob)
        {
          programming_error ( "No direction for script?");
          d = DOWN;
-         g->set_property ("direction", scm_int2num (d));
+         g->set_property ("direction", gh_int2scm (d));
        }
       
       scripts[d] = scm_cons (g->self_scm (), scripts[d]);
@@ -74,12 +71,12 @@ Script_column::before_line_breaking (SCM smob)
   do
     {
       SCM ss = scm_reverse_x (scripts[d], SCM_EOL);
-      ss = scm_stable_sort_x (ss, ly_grob_script_priority_less_proc);
+      ss = scm_stable_sort_x (ss, grob_script_priority_less_proc);
       
       Grob * last = 0;
-      for (SCM s = ss; ly_c_pair_p (s); s = ly_cdr (s))
+      for (SCM s = ss; gh_pair_p (s); s = gh_cdr (s))
        {
-         Grob *g = unsmob_grob (ly_car (s));
+         Grob *g = unsmob_grob (gh_car (s));
          if (last)
            Side_position_interface::add_support (g,last);
          
index 4d5a1644bbfeec172fb633e24a533753010d87cc..542f59fcc9e3d37875386275c5815258af83134c 100644 (file)
@@ -50,7 +50,7 @@ Script_engraver::try_music (Music *r)
        This is necessary for part-combining.
        */
       for (int j = 0; j < scripts_.size (); j++)
-       if (ly_c_equal_p (scripts_[j]. event_->get_property ("articulation-type"),
+       if (gh_equal_p (scripts_[j]. event_->get_property ("articulation-type"),
                        r->get_property ("articulation-type")
                        ))
          return true;
@@ -70,9 +70,9 @@ copy_property (Grob * g , SCM sym, SCM alist)
   if (g->internal_get_property (sym) == SCM_EOL)
     {
       SCM entry = scm_assoc (sym,alist);
-      if (ly_c_pair_p (entry))
+      if (gh_pair_p (entry))
        {
-         g->internal_set_property (sym, ly_cdr (entry));
+         g->internal_set_property (sym, gh_cdr (entry));
        }
     }
 }
@@ -99,7 +99,7 @@ void make_script_from_event (Grob *p,
       return  ;
     }
 
-  art = ly_cdr (art);
+  art = gh_cdr (art);
   
   *descr = art;  
 
@@ -110,8 +110,8 @@ void make_script_from_event (Grob *p,
 
   int prio =0;
   SCM sprio = scm_assoc (ly_symbol2scm ("script-priority"), art);
-  if (ly_c_pair_p (sprio))
-    prio = ly_scm2int (ly_cdr (sprio));
+  if (gh_pair_p (sprio))
+    prio = gh_scm2int (gh_cdr (sprio));
 
 
   /*
@@ -122,7 +122,7 @@ void make_script_from_event (Grob *p,
   prio += index;
 
   Side_position_interface::set_axis (p, Y_AXIS);
-  p->set_property ("script-priority", scm_int2num (prio));
+  p->set_property ("script-priority", gh_int2scm (prio));
 }
 
 void
@@ -132,9 +132,9 @@ Script_engraver::process_music ()
     {
       Music* l=scripts_[i].event_;
 
-      Grob * p = make_item ("Script", l->self_scm ());
+      Grob * p = make_item ("Script");
 
-      make_script_from_event (p, &scripts_[i].description_, context (),
+      make_script_from_event (p, &scripts_[i].description_, daddy_context_,
                              l->get_property ("articulation-type"),
                              i);
 
@@ -144,6 +144,9 @@ Script_engraver::process_music ()
       SCM force_dir = l->get_property ("direction");
       if (is_direction (force_dir) && to_dir (force_dir))
        p->set_property ("direction", force_dir);
+      
+      if (p)
+       announce_grob (p, l->self_scm ());
     }
 }
 
@@ -216,11 +219,12 @@ Script_engraver::stop_translation_timestep ()
       Grob * sc = scripts_[i].script_;
 
       SCM follow = scm_assoc (ly_symbol2scm ("follow-into-staff"), scripts_[i].description_);
-      if (ly_c_pair_p (follow) && to_boolean (ly_cdr (follow)))
+      if (gh_pair_p (follow) && to_boolean (gh_cdr (follow)))
        {
          sc->add_offset_callback (Side_position_interface::quantised_position_proc, Y_AXIS);
          sc->set_property ("staff-padding", SCM_EOL);
        }
+      typeset_grob (sc);
     }
   scripts_.clear ();
 }
index 910c240a6aa221f9448d84ef9ef2ab92033bb16b..a63c1d2011b5628f4e3f07e55cd91814bc5ed972 100644 (file)
@@ -12,7 +12,7 @@
 #include "script.hh"
 #include "font-interface.hh"
 #include "side-position-interface.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "item.hh"
 #include "stencil.hh"
 #include "lookup.hh"
@@ -23,14 +23,14 @@ Stencil
 Script_interface::get_stencil (Grob * me, Direction d)
 {
   SCM s = me->get_property ("script-stencil");
-  assert (ly_c_pair_p (s));
+  assert (gh_pair_p (s));
 
   SCM key = ly_car (s);
   if (key == ly_symbol2scm ("feta"))
     {
       SCM name_entry = ly_cdr (s);
 
-      SCM str = (ly_c_pair_p (name_entry)) ? index_get_cell (name_entry, d) :  name_entry;
+      SCM str = (gh_pair_p (name_entry)) ? index_get_cell (name_entry, d) :  name_entry;
       return Font_interface::get_default_font (me)->find_by_name ("scripts-" +
                                                                  ly_scm2string (str));
     }
index 2701772381ccea22eaeb8e739208316a0d7d0055..7ef7b6f52ab7ec7411e5a5a91c220107fbcfe821 100644 (file)
-/*
-  self-alignment-interface.cc
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
 #include "self-alignment-interface.hh"
 #include "warn.hh"
 
-/* Position centered on parent.  */
-MAKE_SCHEME_CALLBACK (Self_alignment_interface, centered_on_parent, 2);
+/*
+  Position centered on parent.
+ */
+MAKE_SCHEME_CALLBACK (Self_alignment_interface,centered_on_parent,2);
 SCM
 Self_alignment_interface::centered_on_parent (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) gh_scm2int (axis);
   Grob *him = me->get_parent (a);
-  Interval he = him->extent (him, a);
+  Interval he = him->extent (him,a);
   
-  return  scm_make_real (he.is_empty () ? 0.0 : he.center ());
+  return  gh_double2scm (he.is_empty () ? 0.0 : he.center ());
 }
 
-MAKE_SCHEME_CALLBACK (Self_alignment_interface, aligned_on_parent, 2);
+MAKE_SCHEME_CALLBACK (Self_alignment_interface,aligned_on_parent,2);
 SCM
 Self_alignment_interface::aligned_on_parent (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) gh_scm2int (axis);
   Grob *him = me->get_parent (a);
-  Interval he = him->extent (him, a);
+  Interval he = him->extent (him,a);
   
-  SCM sym= (a == X_AXIS) ? ly_symbol2scm ("self-alignment-X")
-    : ly_symbol2scm ("self-alignment-Y");
+  SCM sym= (a == X_AXIS) ? ly_symbol2scm ("self-alignment-X"): ly_symbol2scm ("self-alignment-Y");
   SCM align_prop (me->internal_get_property (sym));
 
-  if (!ly_c_number_p (align_prop))
-    return scm_int2num (0);
+  if (!gh_number_p (align_prop))
+    return gh_int2scm (0);
 
   Real x = 0.0;
-  Real align = ly_scm2double (align_prop);
+
+  Real align = gh_scm2double (align_prop);
       
-  Interval ext (me->extent (me, a));
+  Interval ext (me->extent (me,a));
   if (ext.is_empty ())
-    programming_error ("I'm empty. Can't align on self");
+    {
+      programming_error ("I'm empty. Can't align on self");
+      
+    }
   else
     x -= ext.linear_combination (align) ;
 
   if (!he.is_empty ())
-    x += he.linear_combination (align);
+    {
+      x += he.linear_combination (align);
+    }
 
-  return scm_make_real (x);
+  return gh_double2scm (x);
 }
 
-/* Position centered on parent. */
-MAKE_SCHEME_CALLBACK (Self_alignment_interface, centered_on_other_axis_parent, 2);
+/*
+  Position centered on parent.
+ */
+MAKE_SCHEME_CALLBACK (Self_alignment_interface,centered_on_other_axis_parent,2);
 SCM
-Self_alignment_interface::centered_on_other_axis_parent (SCM element_smob, 
+Self_alignment_interface::centered_on_other_axis_parent (SCM element_smob,
                                                         SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) gh_scm2int (axis);
   Grob *him = me->get_parent (other_axis (a));
-  Interval he = him->extent (him, a);
+  Interval he = him->extent (him,a);
   
-  return  scm_make_real (he.is_empty () ? 0.0 : he.center ());
+  return  gh_double2scm (he.is_empty () ? 0.0 : he.center ());
 }
 
-/** callback that centers the element on itself
-    Requires that self-alignment-{X, Y} be set.  */
-MAKE_SCHEME_CALLBACK (Self_alignment_interface, aligned_on_self, 2);
+
+
+
+/**
+  callback that centers the element on itself
+
+  Requires that self-alignment-{X,Y} be set.
+ */
+MAKE_SCHEME_CALLBACK (Self_alignment_interface,aligned_on_self,2);
 SCM
 Self_alignment_interface::aligned_on_self (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) gh_scm2int (axis);
 
-  SCM sym= (a == X_AXIS) ? ly_symbol2scm ("self-alignment-X")
-    : ly_symbol2scm ("self-alignment-Y");
+  SCM sym= (a == X_AXIS) ? ly_symbol2scm ("self-alignment-X"): ly_symbol2scm ("self-alignment-Y");
   
   SCM align (me->internal_get_property (sym));
-  if (ly_c_number_p (align))
+  if (gh_number_p (align))
     {
-      Interval ext (me->extent (me, a));
+      Interval ext (me->extent (me,a));
+
       if (ext.is_empty ())
-       programming_error ("I'm empty. Can't align on self");
+       {
+         programming_error ("I'm empty. Can't align on self");
+         return gh_double2scm (0.0);
+       }
       else
-       return scm_make_real (- ext.linear_combination (ly_scm2double (align)));
+       {
+         return gh_double2scm (- ext.linear_combination (gh_scm2double (align)));
+       }
     }
-  return scm_make_real (0.0);
+  return gh_double2scm (0.0);
 }
 
 
@@ -105,6 +117,7 @@ ADD_INTERFACE (Self_alignment_interface, "self-alignment-interface",
               " extent of the parent \n"
               "@item Self_alignment_interface::centered_on_other_axis_parent\n"
               " For X-axis, center on the Y-parent, and vice versa.\n "
-              "@end table\n", 
+              "@end table\n"
+              ,
               "self-alignment-X self-alignment-Y");
 
index 250fcade9265f4a65f70f659cdf4a21e222be72c..a6100f17a1c51e66e6ebb8f527d17d5d125c6804 100644 (file)
@@ -10,7 +10,7 @@
 #include "separating-group-spanner.hh"
 #include "separation-item.hh"
 #include "paper-column.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "dimensions.hh"
 #include "group-interface.hh"
 
@@ -28,7 +28,7 @@ Separating_group_spanner::find_rods (Item * r, SCM next, Real padding)
     return; 
 
 
-  for (; ly_c_pair_p (next); next = ly_cdr (next))
+  for (; gh_pair_p (next); next = ly_cdr (next))
     {
       Item *l = dynamic_cast<Item*> (unsmob_grob (ly_car ( next)));
       Item *lb = l->find_prebroken_piece (RIGHT);
@@ -83,7 +83,7 @@ Separating_group_spanner::set_spacing_rods (SCM smob)
    */
   Real padding = robust_scm2double (me->get_property ("padding"), 0.1);
   
-  for (SCM s = me->get_property ("elements"); ly_c_pair_p (s) && ly_c_pair_p (ly_cdr (s)); s = ly_cdr (s))
+  for (SCM s = me->get_property ("elements"); gh_pair_p (s) && gh_pair_p (ly_cdr (s)); s = ly_cdr (s))
     {
       /*
        Order of elements is reversed!
index acaf1920b4c64c22beb22938fd58abf717661ee9..a2665fad29db7ce8ad90e0627edee950ab747b39 100644 (file)
@@ -10,7 +10,7 @@
 #include "separating-group-spanner.hh"
 #include "separation-item.hh"
 #include "paper-column.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "engraver.hh"
 #include "axis-group-interface.hh"
 #include "note-spacing.hh"
@@ -75,9 +75,9 @@ Separating_line_group_engraver::process_music ()
 
   if (!sep_span_)
     {
-      sep_span_ = make_spanner ("SeparatingGroupSpanner", SCM_EOL);
+      sep_span_ = make_spanner ("SeparatingGroupSpanner");
 
-      
+      announce_grob (sep_span_, SCM_EOL);
       sep_span_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn")));
     }
 }
@@ -91,6 +91,7 @@ Separating_line_group_engraver::finalize ()
   Grob *column = unsmob_grob (ccol);
   
   sep_span_->set_bound (RIGHT, unsmob_grob (ccol));
+  typeset_grob (sep_span_);
   sep_span_ =0;
 
   for  (int i= 0 ; i < last_spacings_.note_spacings_.size (); i++)
@@ -134,23 +135,23 @@ Separating_line_group_engraver::acknowledge_grob (Grob_info i)
 
   if (!p_ref_)
     {
-      p_ref_ = make_item ("SeparationItem", SCM_EOL);
+      p_ref_ = make_item ("SeparationItem");
 
       if (ib)
        {
          p_ref_->set_property ("breakable", SCM_BOOL_T);
-         context ()->set_property ("breakableSeparationItem", p_ref_->self_scm ());
+         daddy_context_->set_property ("breakableSeparationItem", p_ref_->self_scm ());
        }
-      
+      announce_grob (p_ref_, SCM_EOL);
 
       if (to_boolean (get_property ("createSpacing"))
          && p_ref_ == break_item_)
        {
-         Item *it  = make_item ("StaffSpacing", SCM_EOL);
+         Item *it  = make_item ("StaffSpacing");
          current_spacings_.staff_spacing_ = it;
-         it->set_property ("left-items", scm_cons (break_item_->self_scm (), SCM_EOL));
-         
+         it->set_property ("left-items", gh_cons (break_item_->self_scm (), SCM_EOL));
          
+         announce_grob (it, SCM_EOL);
 
          if (int i = last_spacings_.note_spacings_.size ())
            {
@@ -163,7 +164,7 @@ Separating_line_group_engraver::acknowledge_grob (Grob_info i)
          else if (last_spacings_.staff_spacing_)
            {
              last_spacings_.staff_spacing_->set_property ("right-items",
-                                                               scm_cons (break_item_->self_scm (), SCM_EOL));
+                                                               gh_cons (break_item_->self_scm (), SCM_EOL));
            }
        }
     }
@@ -178,7 +179,7 @@ void
 Separating_line_group_engraver::start_translation_timestep ()
 {
   if (break_item_)
-    context ()->unset_property (ly_symbol2scm ("breakableSeparationItem"));
+    daddy_context_->unset_property (ly_symbol2scm ("breakableSeparationItem"));
   break_item_ =0;
 }
 
@@ -188,6 +189,7 @@ Separating_line_group_engraver::stop_translation_timestep ()
   if (break_item_)
     {
       Separating_group_spanner::add_spacing_unit (sep_span_, break_item_);
+      typeset_grob (break_item_);
     }
   
   if (Item * sp = current_spacings_.staff_spacing_)
@@ -200,6 +202,7 @@ Separating_line_group_engraver::stop_translation_timestep ()
        Pointer_group_interface::add_grob (sp, ly_symbol2scm ("right-items"),
                                           musical_item_);
 
+      typeset_grob (sp);
     }
 
   
@@ -213,6 +216,7 @@ Separating_line_group_engraver::stop_translation_timestep ()
   if (musical_item_)
     {
       Separating_group_spanner::add_spacing_unit (sep_span_, musical_item_);
+      typeset_grob (musical_item_);
     }
   
   musical_item_ =0;
index 4a308146e1c98ae6aff83b53283c847cab508475..c66abca75c933be3764cd1f349bb13628ed5a0e1 100644 (file)
@@ -40,7 +40,7 @@ Separation_item::conditional_width (Grob * me, Grob * left)
   Paper_column * pc = item->get_column ();
   
   
-  for (SCM s =  me->get_property ("conditional-elements"); ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s =  me->get_property ("conditional-elements"); gh_pair_p (s); s = ly_cdr (s))
     {
       SCM elt = ly_car (s);
       if (!unsmob_grob (elt))
@@ -84,7 +84,7 @@ Separation_item::width (Grob *me)
   Paper_column * pc = item->get_column ();
   Interval w;
   
-  for (SCM s =  me->get_property ("elements"); ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s =  me->get_property ("elements"); gh_pair_p (s); s = ly_cdr (s))
     {
       SCM elt = ly_car (s);
       if (!unsmob_grob (elt))
@@ -140,11 +140,11 @@ Separation_item::extremal_break_aligned_grob (Grob *separation_item, Direction d
   last_ext->set_empty ();
   Grob *last_grob = 0;
   for (SCM s = separation_item->get_property ("elements");
-       ly_c_pair_p (s); s = ly_cdr (s))
+       gh_pair_p (s); s = gh_cdr (s))
     {
-      Grob * break_item = unsmob_grob (ly_car (s));
+      Grob * break_item = unsmob_grob (gh_car (s));
       
-      if (!ly_c_symbol_p (break_item->get_property ("break-align-symbol")))
+      if (!gh_symbol_p (break_item->get_property ("break-align-symbol")))
        continue;
 
       Interval ext = break_item->extent (col, X_AXIS);
index 105126cc75cbdbe43ed753bb84ce4b2cf2c24d08..9c88c4e88aa49e175da2763599e0aae5b4c2db27 100644 (file)
@@ -23,7 +23,7 @@
   Invariant for the data structure.
 
 
-  if (ly_c_pair_p (cursor_))
+  if (gh_pair_p (cursor_))
     iter_->music_ == unsmob_music (ly_car (cursor_))
   else
     iter_ == 0;
@@ -85,7 +85,7 @@ create_grace_fixup_list (SCM cursor)
   Grace_fixup *head = 0;
   Grace_fixup **tail = &head;
 
-  for (; ly_c_pair_p (cursor); cursor = ly_cdr (cursor))
+  for (; gh_pair_p (cursor); cursor = ly_cdr (cursor))
     {
       Music *mus = unsmob_music (ly_car (cursor));
       Moment s = mus->start_mom ();
@@ -123,7 +123,7 @@ Sequential_iterator::construct_children ()
   cursor_ = get_music_list ();
 
   iter_ = 0;
-  if (ly_c_pair_p (cursor_))
+  if (gh_pair_p (cursor_))
     {
       Music *m = unsmob_music (ly_car (cursor_));
       iter_ = unsmob_iterator (get_iterator (m));
@@ -188,7 +188,7 @@ Sequential_iterator::next_element (bool)
   cursor_ = ly_cdr (cursor_);
 
   iter_->quit ();
-  if (ly_c_pair_p (cursor_))
+  if (gh_pair_p (cursor_))
     iter_ = unsmob_iterator (get_iterator (unsmob_music (ly_car (cursor_))));
   else
     iter_ = 0;
index 896bbb2b3326dae03c30bf754e6c89a5e9abbf55..e4dfd913a1d373f07cadb15266aadeba75a2a6e9 100644 (file)
@@ -54,7 +54,7 @@ SCM
 Side_position_interface::aligned_on_support_extents (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) gh_scm2int (axis);
 
   return general_side_position (me, a, true);
 }
@@ -73,7 +73,7 @@ Side_position_interface::general_side_position (Grob * me, Axis a, bool use_exte
   Grob * st = Staff_symbol_referencer::get_staff_symbol (me);
   bool include_staff = (st
                        && a == Y_AXIS
-                       && ly_c_number_p (me->get_property ("staff-padding")));
+                       && gh_number_p (me->get_property ("staff-padding")));
 
   Interval dim;
   if (include_staff)
@@ -121,7 +121,7 @@ Side_position_interface::general_side_position (Grob * me, Axis a, bool use_exte
 
   
   
-  return scm_make_real (total_off);
+  return gh_double2scm (total_off);
 }
 
 /*
@@ -132,7 +132,7 @@ SCM
 Side_position_interface::aligned_on_support_refpoints (SCM smob, SCM axis)
 {
   Grob *me = unsmob_grob (smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) gh_scm2int (axis);
 
   return general_side_position (me, a, false); 
 }
@@ -184,9 +184,9 @@ Side_position_interface::quantised_position (SCM element_smob, SCM)
          rp += d;
        }
       
-      return scm_make_real ((rp - p) * Staff_symbol_referencer::staff_space (me) / 2.0);
+      return gh_double2scm ((rp - p) * Staff_symbol_referencer::staff_space (me) / 2.0);
     }
-  return scm_make_real (0.0);
+  return gh_double2scm (0.0);
 }
 
 /*
@@ -197,11 +197,11 @@ SCM
 Side_position_interface::aligned_side (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) gh_scm2int (axis);
   
   Direction d = Side_position_interface::get_direction (me);
   
-  Real o = ly_scm2double (aligned_on_support_extents (element_smob,axis));
+  Real o = gh_scm2double (aligned_on_support_extents (element_smob,axis));
 
   Interval iv =  me->extent (me, a);
 
@@ -222,11 +222,11 @@ Side_position_interface::aligned_side (SCM element_smob, SCM axis)
  */
   Grob * st = Staff_symbol_referencer::get_staff_symbol (me);
   if (st && a == Y_AXIS
-      && ly_c_number_p (me->get_property ("staff-padding")))
+      && gh_number_p (me->get_property ("staff-padding")))
     {
       Real padding=
       Staff_symbol_referencer::staff_space (me)
-      * ly_scm2double (me->get_property ("staff-padding"));
+      * gh_scm2double (me->get_property ("staff-padding"));
   
       Grob *common = me->common_refpoint (st, Y_AXIS);
       
@@ -236,7 +236,7 @@ Side_position_interface::aligned_side (SCM element_smob, SCM axis)
       o += (d*  (diff >? 0));
     }
       
-  return scm_make_real (o);
+  return gh_double2scm (o);
 }
 
 
@@ -255,11 +255,14 @@ Side_position_interface::get_axis (Grob*me)
   if (me->has_offset_callback (Side_position_interface::aligned_side_proc, X_AXIS)
       || me->has_offset_callback (Side_position_interface::aligned_side_proc , X_AXIS))
     return X_AXIS;
+
   
   return Y_AXIS;
 }
 
 
+
+
 ADD_INTERFACE (Side_position_interface,"side-position-interface",
               "Position a victim object (this one) next to other objects (the "
               "support).   The property @code{direction} signifies where to put the  "
index 8aab99bc4fa19410f4cd280b988055f8baa81fc2..b953c524d6dfe72d340f03ec9b0807fffb1ca26e 100644 (file)
@@ -215,7 +215,7 @@ Simple_spacer::add_columns (Link_array<Grob> const &icols)
   Link_array<Grob> cols (icols);
   
   for (int i =  cols.size (); i--;)
-    if (ly_c_pair_p (cols[i]->get_property ("between-cols")))
+    if (gh_pair_p (cols[i]->get_property ("between-cols")))
       {
        loose_cols_.push (cols[i]);
        cols.del (i);
@@ -227,7 +227,7 @@ Simple_spacer::add_columns (Link_array<Grob> const &icols)
       Spring_smob *spring = 0;
 
       for (SCM s = cols[i]->get_property ("ideal-distances");
-          !spring && ly_c_pair_p (s);
+          !spring && gh_pair_p (s);
           s = ly_cdr (s))
        {
          Spring_smob *sp = unsmob_spring (ly_car (s));
@@ -285,13 +285,13 @@ Simple_spacer::add_columns (Link_array<Grob> const &icols)
   for (int i=0; i < cols.size () - 1; i++)
     {
       for (SCM s = Spaceable_grob::get_minimum_distances (cols[i]);
-          ly_c_pair_p (s); s = ly_cdr (s))
+          gh_pair_p (s); s = ly_cdr (s))
        {
          Grob * other = unsmob_grob (ly_caar (s));
          int oi = cols.find_index (other);
          if (oi >= 0)
            {
-             add_rod (i, oi, ly_scm2double (ly_cdar (s)));
+             add_rod (i, oi, gh_scm2double (ly_cdar (s)));
            }
        }
     }
@@ -369,11 +369,11 @@ Simple_spacer::solve (Column_x_positions *positions, bool ragged)
   for (int i = sz; i--; )
     {
       SCM p = positions->cols_[i]->get_property ( "penalty");
-      if (ly_c_number_p (p))
+      if (gh_number_p (p))
        {
-         if (ly_scm2double (p) < -9999)
+         if (gh_scm2double (p) < -9999)
            break_satisfy = break_satisfy && (i == 0 || i == sz -1);
-         if (ly_scm2double (p) > 9999)
+         if (gh_scm2double (p) > 9999)
            break_satisfy = break_satisfy && !(i == 0 || i == sz -1);
        }
       
index c90cd21767dfe9cb4fea945466f51227db894478..766efa44e750b6c0fffeed2e53a2e67ec11d6593 100644 (file)
@@ -29,8 +29,8 @@ Simultaneous_music_iterator::derived_mark () const
 void
 Simultaneous_music_iterator::derived_substitute (Context *f,Context *t)
 {
-  for (SCM s = children_list_; ly_c_pair_p (s); s = ly_cdr (s))
-    unsmob_iterator (ly_car (s))-> substitute_outlet (f,t);
+  for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr (s))
+    unsmob_iterator (gh_car (s))-> substitute_outlet (f,t);
 }
 
 void
@@ -42,7 +42,7 @@ Simultaneous_music_iterator::construct_children ()
 
   children_list_ = SCM_EOL;
   SCM * tail = &children_list_;
-  for (; ly_c_pair_p (i); i = ly_cdr (i), j++)
+  for (; gh_pair_p (i); i = ly_cdr (i), j++)
     {
       Music *mus = unsmob_music (ly_car (i));
 
@@ -52,7 +52,7 @@ Simultaneous_music_iterator::construct_children ()
       /* if create_separate_contexts_ is set, create a new context with the
         number number as name */
 
-      SCM name = ly_symbol2scm (get_outlet ()->context_name ().to_str0 ());
+      SCM name = unsmob_context_def (get_outlet ()->definition_)->get_context_name ();
       Context * t = (j && create_separate_contexts_)
        ? get_outlet ()->find_create_context (name, to_string (j), SCM_EOL)
        : get_outlet ();
@@ -77,9 +77,9 @@ void
 Simultaneous_music_iterator::process (Moment until)
 {
   SCM *proc = &children_list_; 
-  while (ly_c_pair_p (*proc))
+  while (gh_pair_p (*proc))
     {
-      Music_iterator * i = unsmob_iterator (ly_car (*proc));
+      Music_iterator * i = unsmob_iterator (gh_car (*proc));
       if (i->run_always ()
          || i->pending_moment () == until) 
        {
@@ -88,7 +88,7 @@ Simultaneous_music_iterator::process (Moment until)
       if (!i->ok ())
        {
          i->quit ();
-         *proc = ly_cdr (*proc);
+         *proc = gh_cdr (*proc);
        }
       else
        {
@@ -103,9 +103,9 @@ Simultaneous_music_iterator::pending_moment () const
   Moment next;
   next.set_infinite (1);
   
-  for (SCM s = children_list_; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr (s))
     {
-      Music_iterator * it = unsmob_iterator (ly_car (s));
+      Music_iterator * it = unsmob_iterator (gh_car (s));
       next = next <? it->pending_moment ();
     }
   
@@ -116,9 +116,9 @@ bool
 Simultaneous_music_iterator::ok () const
 {
   bool run_always_ok = false; 
-  for (SCM s = children_list_; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr (s))
     {
-      Music_iterator * it = unsmob_iterator (ly_car (s));
+      Music_iterator * it = unsmob_iterator (gh_car (s));
       if (!it->run_always ())
        return true;
       else
@@ -130,9 +130,9 @@ Simultaneous_music_iterator::ok () const
 bool
 Simultaneous_music_iterator::run_always () const
 {
-  for (SCM s = children_list_; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr (s))
     {
-      Music_iterator * it = unsmob_iterator (ly_car (s));
+      Music_iterator * it = unsmob_iterator (gh_car (s));
       if (it->run_always ())
        return true;
     }
@@ -143,16 +143,16 @@ Music_iterator*
 Simultaneous_music_iterator::try_music_in_children (Music *m) const
 {
   Music_iterator * b=0;
-  for (SCM s = children_list_; !b && ly_c_pair_p (s); s = ly_cdr (s))
-    b =unsmob_iterator (ly_car (s))->try_music (m);
+  for (SCM s = children_list_; !b && gh_pair_p (s); s = gh_cdr (s))
+    b =unsmob_iterator (gh_car (s))->try_music (m);
   return b;
 }
 
 void
 Simultaneous_music_iterator::do_quit ()
 {
-  for (SCM s = children_list_; ly_c_pair_p (s); s = ly_cdr (s))
-    unsmob_iterator (ly_car (s))->quit ();
+  for (SCM s = children_list_; gh_pair_p (s); s = gh_cdr (s))
+    unsmob_iterator (gh_car (s))->quit ();
 }
 
 IMPLEMENT_CTOR_CALLBACK (Simultaneous_music_iterator);
index 7b45796ea1b8711cdbd6211996d9b91cc1e35446..2ba59b6250acd27e86ebaf98469e451375178b93 100644 (file)
@@ -110,7 +110,8 @@ Slash_repeat_engraver::process_music ()
 {
   if (repeat_ && now_mom () == next_moment_)
     {
-      beat_slash_ = make_item ("RepeatSlash", repeat_->self_scm ());
+      beat_slash_ = make_item ("RepeatSlash");
+      announce_grob (beat_slash_, repeat_->self_scm ());
       next_moment_ = next_moment_ + body_length_;
 
       get_global_context ()->add_moment_to_process (next_moment_);
@@ -130,7 +131,11 @@ Slash_repeat_engraver::start_translation_timestep ()
 void
 Slash_repeat_engraver::stop_translation_timestep ()
 {
-  beat_slash_ = 0;
+ if (beat_slash_)
+    {
+      typeset_grob (beat_slash_);
+      beat_slash_ = 0;
+    }
 }
 
 
index 380435befb828e7ac3ec7292b680a80f2b9feafb..f007d58dae10927ce8e65bb0e70c67f8eb388b0a 100644 (file)
@@ -7,7 +7,7 @@
 */
 
 #include "warn.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "slur-bezier-bow.hh"
 
 Slur_bezier_bow::Slur_bezier_bow (Array<Offset> encompass, Direction dir,
@@ -153,11 +153,11 @@ Slur_bezier_bow::minimise_enclosed_area (Real beauty,
   if (fit_factor () > 1.0)
     blow_fit ();
   
-  Real pct_c0 = ly_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-c0"), bezier_props)));
-  Real pct_c3 = ly_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-c3"), bezier_props)));
-  Real pct_in_max =  ly_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-in-max"), bezier_props)));
-  Real pct_out_max = ly_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-out-max"), bezier_props)));
-  Real steps =  ly_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-area-steps"),bezier_props)));
+  Real pct_c0 = gh_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-c0"), bezier_props)));
+  Real pct_c3 = gh_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-c3"), bezier_props)));
+  Real pct_in_max =  gh_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-in-max"), bezier_props)));
+  Real pct_out_max = gh_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-pct-out-max"), bezier_props)));
+  Real steps =  gh_scm2double (ly_cdr (scm_assoc (ly_symbol2scm ("bezier-area-steps"),bezier_props)));
 
   for (int i=0; i < steps; i++)
     {
index 7c6bc4fb6a160aa325f2448657a94fafa1a55cc0..4a6a49305beb1a38c38d42a13e7053b10ad2b289 100644 (file)
@@ -88,7 +88,7 @@ Slur_engraver::try_music (Music *ev)
 void
 Slur_engraver::set_melisma (bool m)
 {
-  context ()->set_property ("slurMelismaBusy", m ? SCM_BOOL_T :SCM_BOOL_F);
+  daddy_context_->set_property ("slurMelismaBusy", m ? SCM_BOOL_T :SCM_BOOL_F);
 }
 
 void
@@ -149,17 +149,18 @@ Slur_engraver::process_music ()
        {
          // push a new slur onto stack.
          // (use temp. array to wait for all slur STOPs)
-         Grob* slur = make_spanner ("Slur", slur_ev->self_scm ());
+         Grob* slur = make_spanner ("Slur");
          Slur::set_interface (slur); // cannot remove yet!
 
 
          if (Direction updown = to_dir (slur_ev->get_property ("direction")))
            {
-             slur->set_property ("direction", scm_int2num (updown));
+             slur->set_property ("direction", gh_int2scm (updown));
            }
          
          start_slurs.push (slur);
          events_.push (slur_ev);
+         announce_grob (slur, slur_ev->self_scm ());
        }
     }
 
@@ -173,6 +174,10 @@ Slur_engraver::process_music ()
 void
 Slur_engraver::stop_translation_timestep ()
 {
+  for (int i = 0; i < end_slurs_.size (); i++)
+    {
+      typeset_grob (end_slurs_[i]);
+    }
   end_slurs_.clear ();
   new_slur_evs_.clear ();
 }
index 1836016161cc7c551bb056dd09a52bb19ddbf303..020160708ca65b553d42ea06a5cecaeea4babe93 100644 (file)
@@ -32,14 +32,6 @@ private:
   bool slur_;
 };
 
-Slur_performer::Slur_performer ()
-{
-  slur_ = false;
-  start_ev_ = 0;
-  now_stop_ev_ = 0;
-}
-
-
 void 
 Slur_performer::process_music ()
 {
@@ -60,7 +52,7 @@ Slur_performer::process_music ()
 void
 Slur_performer::set_melisma (bool ml)
 {
-  context ()->set_property ("slurMelismaBusy", ml ? SCM_BOOL_T :SCM_BOOL_F);
+  daddy_context_->set_property ("slurMelismaBusy", ml ? SCM_BOOL_T :SCM_BOOL_F);
 }
 
 void
@@ -93,3 +85,7 @@ Slur_performer::try_music (Music *m)
 ENTER_DESCRIPTION (Slur_performer,"","",
                  "slur-event","","","");
 
+Slur_performer::Slur_performer ()
+{
+  slur_ = false;
+}
index 0363945cc408a3658919dd05423a52cdc2358a7f..5a34e272f46b92c64c590c463aa556e618b539db 100644 (file)
@@ -25,7 +25,7 @@
 #include "group-interface.hh"
 #include "slur.hh"
 #include "lookup.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "note-column.hh"
 #include "stem.hh"
 #include "paper-column.hh"
@@ -69,9 +69,9 @@ Slur::de_uglyfy (Grob*me, Slur_bezier_bow* bb, Real default_height)
       Real f = default_height / length;
       SCM up = me->get_property ("de-uglify-parameters");
       
-      Real c1 = ly_scm2double (ly_car (up));
-      Real c2 = ly_scm2double (ly_cadr (up));
-      Real c3 = ly_scm2double (ly_caddr (up)); 
+      Real c1 = gh_scm2double (ly_car (up));
+      Real c2 = gh_scm2double (ly_cadr (up));
+      Real c3 = gh_scm2double (ly_caddr (up)); 
       
       if (h > c1 * f)
        {
@@ -120,7 +120,7 @@ Slur::after_line_breaking (SCM smob)
       return SCM_UNSPECIFIED;
     }
   set_extremities (me);
-  if (!ly_c_pair_p (me->get_property ("control-points")))
+  if (!gh_pair_p (me->get_property ("control-points")))
     set_control_points (me);
   return SCM_UNSPECIFIED;
 } 
@@ -133,7 +133,7 @@ Slur::check_slope (Grob *me)
     Avoid too steep slurs.
    */
   SCM s = me->get_property ("slope-limit");
-  if (ly_c_number_p (s))
+  if (gh_number_p (s))
     {
       Array<Offset> encompass = get_encompass_offsets (me);
       Drul_array<Offset> attachment;
@@ -147,12 +147,12 @@ Slur::check_slope (Grob *me)
       
       Real slope = slope = abs (dy / dx);
 
-      Real limit = ly_scm2double (s);
+      Real limit = gh_scm2double (s);
 
       if (slope > limit)
        {
          Real staff_space = Staff_symbol_referencer::staff_space ((Grob*)me);
-         Direction dir = (Direction)ly_scm2int (me->get_property ("direction"));
+         Direction dir = (Direction)gh_scm2int (me->get_property ("direction"));
          Direction d = (Direction) (- dir * (sign (dy)));
          SCM a = me->get_property ("attachment-offset");
          Drul_array<Offset> o;
@@ -163,7 +163,7 @@ Slur::check_slope (Grob *me)
          o[d][Y_AXIS] *= get_grob_direction (me);
 
          me->set_property ("attachment-offset",
-                               scm_cons (ly_offset2scm (o[LEFT]),
+                               gh_cons (ly_offset2scm (o[LEFT]),
                                         ly_offset2scm (o[RIGHT])));
        }
     }
@@ -182,10 +182,10 @@ Slur::set_extremities (Grob *me)
   SCM att = me->get_property ("attachment");
       /*
        */
-      if (!ly_c_pair_p (att))
+      if (!gh_pair_p (att))
        {
          programming_error ("attachment is not a cons?!");
-         att = scm_cons (SCM_EOL, SCM_EOL);
+         att = gh_cons (SCM_EOL, SCM_EOL);
          me->set_property ("attachment", att);
        }
       
@@ -193,15 +193,15 @@ Slur::set_extremities (Grob *me)
   do 
     {
     
-      if (!ly_c_symbol_p (index_get_cell (att, dir)))
+      if (!gh_symbol_p (index_get_cell (att, dir)))
        {
          SCM p = me->get_property ("extremity-function");
          SCM res = ly_symbol2scm ("head");
          
-         if (ly_c_procedure_p (p))
-           res =  scm_call_2 (p, me->self_scm (), scm_int2num (dir));
+         if (gh_procedure_p (p))
+           res =  gh_call2 (p, me->self_scm (), gh_int2scm (dir));
 
-         if (ly_c_symbol_p (res))
+         if (gh_symbol_p (res))
            index_set_cell (att, dir, res);
        }
     }
@@ -218,7 +218,7 @@ Slur::get_boundary_notecolumn_y (Grob *me, Direction dir)
 {
   SCM cols = me->get_property ("note-columns");
 
-  if (!ly_c_pair_p (cols))
+  if (!gh_pair_p (cols))
     {
       programming_error ("No note-columns in slur?");
       me->suicide ();
@@ -288,7 +288,7 @@ Slur::get_attachment (Grob *me, Direction dir,
                      Grob **common) 
 {
   SCM s = me->get_property ("attachment");
-  if (!ly_c_pair_p (s) || !ly_c_symbol_p (index_get_cell (s, dir)))
+  if (!gh_pair_p (s) || !gh_symbol_p (index_get_cell (s, dir)))
     {
       s = set_extremities (me);
     }
@@ -374,8 +374,8 @@ Slur::get_attachment (Grob *me, Direction dir,
   int stemdir = stem ? Stem::get_direction (stem) : 1;
   SCM l = scm_assoc
     (scm_list_n (a,
-                 scm_int2num (stemdir * dir),
-                 scm_int2num (slurdir * dir),
+                 gh_int2scm (stemdir * dir),
+                 gh_int2scm (slurdir * dir),
                   SCM_UNDEFINED), alist);
 
   if (l != SCM_BOOL_F)
@@ -524,7 +524,7 @@ MAKE_SCHEME_CALLBACK (Slur, height, 2);
 SCM
 Slur::height (SCM smob, SCM ax)
 {
-  Axis a = (Axis)ly_scm2int (ax);
+  Axis a = (Axis)gh_scm2int (ax);
   Grob * me = unsmob_grob (smob);
   assert (a == Y_AXIS);
 
@@ -565,7 +565,7 @@ Slur::print (SCM smob)
     TODO: replace dashed with generic property.
    */
   SCM d =  me->get_property ("dashed");
-  if (ly_c_number_p (d))
+  if (gh_number_p (d))
     a = Lookup::dashed_slur (one, thick, thick * robust_scm2double (d, 0));
   else
     a = Lookup::slur (one, get_grob_direction (me) * base_thick * ss / 10.0,
@@ -584,7 +584,7 @@ Slur::set_control_points (Grob*me)
   SCM r_0_scm = me->get_property ("ratio");
 
   Real r_0 = robust_scm2double (r_0_scm, 1);
-  Real h_inf = staff_space * ly_scm2double (h_inf_scm);
+  Real h_inf = staff_space * gh_scm2double (h_inf_scm);
   
   Slur_bezier_bow bb (get_encompass_offsets (me),
                      get_grob_direction (me),
@@ -598,14 +598,14 @@ Slur::set_control_points (Grob*me)
 
       SCM ssb = me->get_property ("beautiful");
       Real sb = 0;
-      if (ly_c_number_p (ssb))
-       sb = ly_scm2double (ssb);
+      if (gh_number_p (ssb))
+       sb = gh_scm2double (ssb);
 
       bb.minimise_enclosed_area (sb, details);
       SCM sbf = scm_assq (ly_symbol2scm ("force-blowfit"), details);
       Real bff = 1.0;
-      if (ly_c_pair_p (sbf) && ly_c_number_p (ly_cdr (sbf)))
-         bff = ly_scm2double (ly_cdr (sbf));
+      if (gh_pair_p (sbf) && gh_number_p (ly_cdr (sbf)))
+         bff = gh_scm2double (ly_cdr (sbf));
 
       bb.curve_.control_[1][Y_AXIS] *= bff;
       bb.curve_.control_[2][Y_AXIS] *= bff;
@@ -628,7 +628,7 @@ Slur::set_control_points (Grob*me)
   SCM controls = SCM_EOL;
   for (int i= 4; i--;)
     {
-      controls = scm_cons (ly_offset2scm (b.control_[i]), controls);
+      controls = gh_cons (ly_offset2scm (b.control_[i]), controls);
       /*
        BRRR WHURG.
        All these null control-points, where do they all come from?
@@ -650,16 +650,16 @@ Slur::get_curve (Grob*me)
   int i = 0;
 
   SCM attach = me->get_property ("attachment");
-  if (!ly_c_pair_p (attach))
+  if (!gh_pair_p (attach))
     attach = set_extremities (me);
 
   
   if (!get_grob_direction (me)
-      || ! ly_c_symbol_p (index_get_cell (attach, LEFT))
-      || ! ly_c_symbol_p (index_get_cell (attach, RIGHT)))
+      || ! gh_symbol_p (index_get_cell (attach, LEFT))
+      || ! gh_symbol_p (index_get_cell (attach, RIGHT)))
     set_extremities (me);
   
-  if (!ly_c_pair_p (me->get_property ("control-points")))
+  if (!gh_pair_p (me->get_property ("control-points")))
     set_control_points (me);
 
   // set_control_points may suicide
index d735fd26ff30359cce0a0061afc62bd4713eae57..108c68b6a23e9b3b2a21bb9dc50860ce3a210d5d 100644 (file)
@@ -39,34 +39,43 @@ Source_file::load_stdin ()
   contents_str0_ = chs.remove_array ();
 }
 
-char*
-gulp_file (String filename, int *filesize)
+
+
+char *
+gulp_file (String fn, int* len)
 {
-  /* "b" must ensure to open literally, avoiding text (CR/LF)
-     conversions.  */
-  FILE *f = fopen (filename.to_str0 (), "rb");
+  /*
+    let's hope that "b" opens anything binary, and does not apply
+    CR/LF translation
+    */
+  FILE * f =  fopen (fn.to_str0 (), "rb");
+
   if (!f)
     {
-      warning (_f ("can't open file: `%s'", filename.to_str0 ()));
+      warning (_f ("can't open file: `%s'", fn.to_str0 ()));
       return 0;
     }
 
-  fseek (f, 0, SEEK_END);
-  *filesize = ftell (f);
+  int ret = fseek (f, 0, SEEK_END);
+
+  *len = ftell (f);
   rewind (f);
+  char *  str = new char[*len+1];
+  str[*len] = 0;
+  ret = fread (str, sizeof (char), *len, f);
 
-  char *str = new char[*filesize + 1];
-  str[*filesize] = 0;
+  if (ret!=*len)
+    warning (_f ("Huh?  Got %d, expected %d characters", ret, *len));
 
-  int bytes_read = fread (str, sizeof (char), *filesize, f);
-  if (bytes_read != *filesize)
-    warning (_f ("Huh?  Got %d, expected %d characters", bytes_read,
-                *filesize));
   fclose (f);
 
+
   return str;
 }
 
+/*
+  Unused.
+ */
 Source_file::Source_file (String filename, String data)
 {
   name_ = filename;
@@ -100,9 +109,12 @@ Source_file::Source_file (String filename_string)
 void
 Source_file::init_port ()
 {
-  SCM str = scm_makfrom0str (contents_str0_);
-  str_port_ = scm_mkstrport (SCM_INUM0, str, SCM_OPN | SCM_RDNG, __FUNCTION__);
-  scm_set_port_filename_x (str_port_, scm_makfrom0str (name_.get_str0 ()));
+  SCM str =scm_makfrom0str (contents_str0_);
+  
+  str_port_ = scm_mkstrport (SCM_INUM0, str, SCM_OPN | SCM_RDNG,
+                            __FUNCTION__);
+  scm_set_port_filename_x (str_port_,
+                          scm_makfrom0str (name_.get_str0()));
 }
 
 int
index 927469cc287a8ec4561b1e31fbad72ce03cc77f4..da6ce5339dda71239529d30c8d31d7e3b11ef788 100644 (file)
@@ -19,7 +19,7 @@
 Sources::Sources ()
 {
   sourcefile_list_ = 0;
-  path_= 0;
+  path_C_= 0;
   is_binary_ = false;
 }
 
@@ -32,7 +32,7 @@ Sources::set_binary (bool bo)
 void
 Sources::set_path (File_path *f)
 {
-  path_ = f;
+  path_C_ = f;
 }
 
 /**
@@ -46,9 +46,9 @@ Sources::set_path (File_path *f)
 Source_file*
 Sources::get_file (String &file_string) //UGH
 {
-  if ((file_string != "-") && path_)
+  if ((file_string != "-") && path_C_)
     {
-      String file_string_o = path_->find (file_string); 
+      String file_string_o = path_C_->find (file_string); 
       if ((file_string_o == "") && (file_string != ""))
        return 0;
       file_string = file_string_o;
index 5477f624ade6ab2a732bff15b9484c1339e5aca5..fa597a6e1f7cb3db021a3af9fe8bde4fe7c56b1a 100644 (file)
@@ -30,19 +30,19 @@ Spaceable_grob::add_rod (Grob *me , Grob * p, Real d)
 
   
   SCM mins = get_minimum_distances (me);
-  SCM newdist = scm_make_real (d);
-  for (SCM s = mins; ly_c_pair_p (s); s = ly_cdr (s))
+  SCM newdist = gh_double2scm (d);
+  for (SCM s = mins; gh_pair_p (s); s = ly_cdr (s))
     {
       SCM dist = ly_car (s);
       if (ly_car (dist) == p->self_scm ())
        {
-         scm_set_cdr_x (dist, scm_max (ly_cdr (dist),
+         gh_set_cdr_x (dist, scm_max (ly_cdr (dist),
                                       newdist));
          return ;
        }
     }
 
-  mins = scm_cons (scm_cons (p->self_scm (), newdist), mins);
+  mins = gh_cons (gh_cons (p->self_scm (), newdist), mins);
   me->set_property ("minimum-distances", mins);
 }
 
@@ -70,7 +70,7 @@ Spaceable_grob::add_spring (Grob*me, Grob * p, Real d, Real strength, bool expan
     
 #ifndef NDEBUG
   SCM mins = me->get_property ("ideal-distances");
-  for (SCM s = mins; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = mins; gh_pair_p (s); s = ly_cdr (s))
     {
       Spring_smob * sp = unsmob_spring(ly_car (s));
       if (sp->other_ == p)
index 5da8f7d4077ba6cc4d22610a7dcc8af9005b2b8a..6985a7903a266bd024255ca9da6f077ae20356da 100644 (file)
@@ -78,9 +78,9 @@ Spacing_engraver::process_music ()
 {
   if (!spacing_)
     {
-      spacing_ = make_spanner ("SpacingSpanner", SCM_EOL);
+      spacing_ = make_spanner ("SpacingSpanner");
       spacing_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn")));  
-      
+      announce_grob (spacing_, SCM_EOL);
     }
 }
 
@@ -92,6 +92,7 @@ Spacing_engraver::finalize ()
       Grob * p = unsmob_grob (get_property ("currentCommandColumn"));
   
       spacing_->set_bound (RIGHT, p);
+      typeset_grob (spacing_);
       spacing_ =0;
     }
 }
index fdc5bacad4a0c78c87c63f6b75f6d370c8a5f7b6..21780b9a762cb00b2f4c9970cd954e3740127124 100644 (file)
@@ -13,7 +13,7 @@
 #include "main.hh"
 #include "system.hh"
 #include "warn.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "paper-score.hh"
 #include "paper-column.hh"
 #include "item.hh"
@@ -96,11 +96,11 @@ loose_column (Grob *l, Grob *c, Grob *r)
     such a borderline case.)
     
   */  
-  if (!ly_c_pair_p (lns) || !ly_c_pair_p (rns))
+  if (!gh_pair_p (lns) || !gh_pair_p (rns))
     return false;
 
-  Item * l_neighbor = dynamic_cast<Item*>  (unsmob_grob (ly_car (lns)));
-  Item * r_neighbor = dynamic_cast<Item*>  (unsmob_grob (ly_car (rns)));
+  Item * l_neighbor = dynamic_cast<Item*>  (unsmob_grob (gh_car (lns)));
+  Item * r_neighbor = dynamic_cast<Item*>  (unsmob_grob (gh_car (rns)));
 
   if (!l_neighbor || !r_neighbor)
     return false;
@@ -133,15 +133,15 @@ loose_column (Grob *l, Grob *c, Grob *r)
 
     in any case, we don't want to move bar lines.
    */
-  for (SCM e = c->get_property ("elements"); ly_c_pair_p (e); e = ly_cdr (e))
+  for (SCM e = c->get_property ("elements"); gh_pair_p (e); e = gh_cdr (e))
     {
-      Grob * g = unsmob_grob (ly_car (e));
+      Grob * g = unsmob_grob (gh_car (e));
       if (g && Break_align_interface::has_interface (g))
        {
-         for (SCM s = g->get_property ("elements"); ly_c_pair_p (s);
-              s = ly_cdr (s))
+         for (SCM s = g->get_property ("elements"); gh_pair_p (s);
+              s = gh_cdr (s))
            {
-             Grob *h = unsmob_grob (ly_car (s));
+             Grob *h = unsmob_grob (gh_car (s));
 
              /*
                ugh. -- fix staff-bar name? 
@@ -177,17 +177,17 @@ Spacing_spanner::prune_loose_columns (Grob*me,Link_array<Grob> *cols, Rational s
       if (loose_column (cols->elem (i-1), c, cols->elem (i+1)))
        {
          SCM lns = c->get_property ("left-neighbors");
-         lns = ly_c_pair_p (lns) ? ly_car (lns) : SCM_BOOL_F;
+         lns = gh_pair_p (lns) ? gh_car (lns) : SCM_BOOL_F;
 
          SCM rns = c->get_property ("right-neighbors");
-         rns = ly_c_pair_p (rns) ? ly_car (rns) : SCM_BOOL_F;
+         rns = gh_pair_p (rns) ? gh_car (rns) : SCM_BOOL_F;
 
          /*
            Either object can be non existent, if the score ends
            prematurely.
           */
-         rns = ly_car (unsmob_grob (rns)->get_property ("right-items"));
-         c->set_property ("between-cols", scm_cons (lns,
+         rns = gh_car (unsmob_grob (rns)->get_property ("right-items"));
+         c->set_property ("between-cols", gh_cons (lns,
                                                         rns));
 
          /*
@@ -206,9 +206,9 @@ Spacing_spanner::prune_loose_columns (Grob*me,Link_array<Grob> *cols, Rational s
              Item *rc = dynamic_cast<Item*> (d == LEFT  ? c : next_door[RIGHT]);
 
              for (SCM s = lc->get_property ("spacing-wishes");
-                  ly_c_pair_p (s); s = ly_cdr (s))
+                  gh_pair_p (s); s = gh_cdr (s))
                {
-                 Grob *sp = unsmob_grob (ly_car (s));
+                 Grob *sp = unsmob_grob (gh_car (s));
                  if (Note_spacing::left_column (sp) != lc
                      || Note_spacing::right_column (sp) != rc)
                    continue;
@@ -273,9 +273,9 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array<Grob> cols)
 
 
       SCM wishes=  cols[i]->get_property ("spacing-wishes");
-      for (SCM s =wishes; ly_c_pair_p (s); s = ly_cdr (s))
+      for (SCM s =wishes; gh_pair_p (s); s = gh_cdr (s))
        {
-         Item * wish = dynamic_cast<Item*> (unsmob_grob (ly_car (s)));
+         Item * wish = dynamic_cast<Item*> (unsmob_grob (gh_car (s)));
 
          Item * lc = wish->get_column ();
          Grob * right = Note_spacing::right_column (wish);
@@ -297,7 +297,7 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array<Grob> cols)
                right_neighbors  =SCM_EOL;
              
              min_rank = right_rank;
-             right_neighbors = scm_cons (wish->self_scm (), right_neighbors);
+             right_neighbors = gh_cons (wish->self_scm (), right_neighbors);
            }
 
          /*
@@ -305,10 +305,10 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array<Grob> cols)
           */
          int maxrank = 0;
          SCM left_neighs = rc->get_property ("left-neighbors");
-         if (ly_c_pair_p (left_neighs)
-             && unsmob_grob (ly_car (left_neighs)))
+         if (gh_pair_p (left_neighs)
+             && unsmob_grob (gh_car (left_neighs)))
            {
-             Item * it = dynamic_cast<Item*> (unsmob_grob (ly_car (left_neighs)));
+             Item * it = dynamic_cast<Item*> (unsmob_grob (gh_car (left_neighs)));
              maxrank = Paper_column::get_rank (it->get_column ());
            }
 
@@ -317,12 +317,12 @@ Spacing_spanner::set_explicit_neighbor_columns (Link_array<Grob> cols)
              if (left_rank > maxrank)
                left_neighs = SCM_EOL;
 
-             left_neighs = scm_cons (wish->self_scm (), left_neighs);
+             left_neighs = gh_cons (wish->self_scm (), left_neighs);
              rc->set_property ("left-neighbors", right_neighbors);
            }
        }
 
-      if (ly_c_pair_p (right_neighbors))
+      if (gh_pair_p (right_neighbors))
        {
          cols[i]->set_property ("right-neighbors", right_neighbors);
        }
@@ -348,15 +348,15 @@ Spacing_spanner::set_implicit_neighbor_columns (Link_array<Grob> cols)
        sloppy with typnig left/right-neighbors should take list, but paper-column found instead.
        */
       SCM ln = cols[i] ->get_property ("left-neighbors");
-      if (!ly_c_pair_p (ln) && i ) 
+      if (!gh_pair_p (ln) && i ) 
        {
-         cols[i]->set_property ("left-neighbors", scm_cons (cols[i-1]->self_scm (), SCM_EOL));
+         cols[i]->set_property ("left-neighbors", gh_cons (cols[i-1]->self_scm (), SCM_EOL));
        }
 
       SCM rn = cols[i] ->get_property ("right-neighbors");
-      if (!ly_c_pair_p (rn) && i < cols.size () - 1) 
+      if (!gh_pair_p (rn) && i < cols.size () - 1) 
        {
-         cols[i]->set_property ("right-neighbors", scm_cons (cols[i + 1]->self_scm (), SCM_EOL));
+         cols[i]->set_property ("right-neighbors", gh_cons (cols[i + 1]->self_scm (), SCM_EOL));
        }
     }
 }
@@ -368,9 +368,6 @@ Spacing_spanner::set_springs (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
 
-  /*
-    can't use get_system() ? --hwn.
-   */
   Link_array<Grob> all (me->pscore_->system_->columns ());
 
   set_explicit_neighbor_columns (all);
@@ -572,9 +569,9 @@ Spacing_spanner::musical_column_spacing (Grob *me, Item * lc, Item *rc, Real inc
     happens after the current note (this is set in the grob
     property SPACING-SEQUENCE.
   */
-  for (SCM s = seq; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = seq; gh_pair_p (s); s = ly_cdr (s))
     {
-      Grob * wish = unsmob_grob (ly_car (s));
+      Grob * wish = unsmob_grob (gh_car (s));
 
       Item *wish_rcol = Note_spacing::right_column (wish);
       if (Note_spacing::left_column (wish) != lc
@@ -628,7 +625,7 @@ Spacing_spanner::musical_column_spacing (Grob *me, Item * lc, Item *rc, Real inc
   */
   compound_fixed_note_space = compound_fixed_note_space <? compound_note_space;
 
-  bool packed = to_boolean (me->get_paper ()->c_variable ("packed"));
+  bool packed = to_boolean (me->get_paper ()->get_scmvar ("packed"));
   Real strength, distance;
 
   /*
@@ -736,9 +733,9 @@ Spacing_spanner::breakable_column_spacing (Grob*me, Item* l, Item *r,Moment shor
   if (dt == Moment (0,0))
     {
       for (SCM s = l->get_property ("spacing-wishes");
-          ly_c_pair_p (s); s = ly_cdr (s))
+          gh_pair_p (s); s = gh_cdr (s))
        {
-         Item * spacing_grob = dynamic_cast<Item*> (unsmob_grob (ly_car (s)));
+         Item * spacing_grob = dynamic_cast<Item*> (unsmob_grob (gh_car (s)));
 
          if (!spacing_grob || !Staff_spacing::has_interface (spacing_grob))
            continue;
index 50c7be72c83fc74bfb5cfab9187d6e33db0358fe..e9a45412f8773e1decfa2715c56c10ec6df22e8c 100644 (file)
@@ -65,8 +65,8 @@ Span_arpeggio_engraver::process_acknowledged_grobs ()
   if (!span_arpeggio_ && arpeggios_.size () > 1
       && to_boolean (get_property ("connectArpeggios")))
     {
-      span_arpeggio_ = make_item ("Arpeggio", SCM_EOL);
-            
+      span_arpeggio_ = make_item ("Arpeggio");
+      announce_grob (span_arpeggio_, SCM_EOL);      
     }
 }
 
@@ -82,10 +82,10 @@ Span_arpeggio_engraver::stop_translation_timestep ()
       for (int i=0; i < arpeggios_.size (); i ++)
        {
          for (SCM s = arpeggios_[i]->get_property ("stems");
-              ly_c_pair_p (s); s = ly_cdr (s))
+              gh_pair_p (s); s = ly_cdr (s))
            Group_interface::add_thing (span_arpeggio_, ly_symbol2scm ("stems"), ly_car (s));
          for (SCM s = arpeggios_[i]->get_property ("side-support-elements");
-              ly_c_pair_p (s); s = ly_cdr (s))
+              gh_pair_p (s); s = ly_cdr (s))
            Group_interface::add_thing (span_arpeggio_, ly_symbol2scm ("side-support-elements"), ly_car (s));
 
          /*
@@ -95,6 +95,7 @@ Span_arpeggio_engraver::stop_translation_timestep ()
          arpeggios_[i]->set_property ("print-function", SCM_EOL);
        }
       
+      typeset_grob (span_arpeggio_);
       span_arpeggio_ = 0;
     }
   arpeggios_.clear ();
index 3016528658f961e5636a024602184c5dc9fdc3a5..15e7234259b7794f07d347cf29c847042faefd5e 100644 (file)
@@ -51,10 +51,10 @@ Span_bar_engraver::acknowledge_grob (Grob_info i)
 
       if (bars_.size () >= 2 && !spanbar_) 
        {
-         spanbar_ = make_item ("SpanBar", SCM_EOL);
+         spanbar_ = make_item ("SpanBar");
 
          spanbar_->set_parent (bars_[0], X_AXIS);
-         
+         announce_grob (spanbar_, SCM_EOL);
        }
     }
 }
@@ -69,10 +69,10 @@ Span_bar_engraver::stop_translation_timestep ()
 
       SCM vissym =ly_symbol2scm ("break-visibility");
       SCM vis = bars_[0]->internal_get_property (vissym);        
-      if (ly_c_equal_p (spanbar_->internal_get_property (vissym), vis))
+      if (gh_equal_p (spanbar_->internal_get_property (vissym), vis))
        spanbar_->internal_set_property (vissym, vis);
 
-      
+      typeset_grob (spanbar_);
       spanbar_ =0;
     }
   bars_.set_size (0);
index 8e87dc053010055b9d3678d73b468461d45b8c8d..c90a2837263658ef493f8ed00cc2ad7029a57b6a 100644 (file)
@@ -9,7 +9,7 @@
 #include "span-bar.hh"
 #include "font-interface.hh"
 #include "dimensions.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "stencil.hh"
 #include "warn.hh"
 #include "axis-group-interface.hh"
@@ -53,7 +53,7 @@ Span_bar::print (SCM smobbed_me)
 
   /* compute common refpoint of elements */
   Grob *refp = me;
-  for (SCM elts = first_elt; ly_c_pair_p (elts); elts = ly_cdr (elts))
+  for (SCM elts = first_elt; gh_pair_p (elts); elts = ly_cdr (elts))
     {
       SCM smobbed_staff_bar = ly_car (elts);
       Grob *staff_bar = unsmob_grob (smobbed_staff_bar);
@@ -65,7 +65,7 @@ Span_bar::print (SCM smobbed_me)
 
   /* glyph may not be a string, when ME is killed by Hara Kiri in
     between. */
-  if (!ly_c_string_p (glyph))
+  if (!gh_string_p (glyph))
     return SCM_EOL;
   
   String glyph_string = ly_scm2string (glyph);
@@ -74,7 +74,7 @@ Span_bar::print (SCM smobbed_me)
   Stencil span_bar_mol;
 
   Interval prev_extent;
-  for (SCM elts = first_elt; ly_c_pair_p (elts); elts = ly_cdr (elts))
+  for (SCM elts = first_elt; gh_pair_p (elts); elts = ly_cdr (elts))
     {
       SCM smobbed_staff_bar = ly_car (elts);
       Grob *staff_bar = unsmob_grob (smobbed_staff_bar);
@@ -114,7 +114,7 @@ SCM
 Span_bar::width_callback (SCM element_smob, SCM scm_axis)
 {
   Grob *se = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (scm_axis);
+  Axis a = (Axis) gh_scm2int (scm_axis);
   assert (a == X_AXIS);
   String gl = ly_scm2string (se->get_property ("glyph"));
 
@@ -130,9 +130,8 @@ MAKE_SCHEME_CALLBACK (Span_bar,before_line_breaking,1);
 SCM
 Span_bar::before_line_breaking (SCM smob)
 {
-  Grob * g = unsmob_grob (smob);
-  evaluate_empty (g);
-  evaluate_glyph (g);
+  evaluate_empty (unsmob_grob (smob));
+  evaluate_glyph (unsmob_grob (smob));
 
   /* No need to call Bar_line::before_line_breaking (), because the info
      in ELEMENTS already has been procced by
@@ -146,7 +145,7 @@ SCM
 Span_bar::center_on_spanned_callback (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) ly_scm2int (axis);
+  Axis a = (Axis) gh_scm2int (axis);
   assert (a == Y_AXIS);
   Interval i (get_spanned_interval (me));
 
@@ -156,10 +155,10 @@ Span_bar::center_on_spanned_callback (SCM element_smob, SCM axis)
   if (i.is_empty ())
     {
       me->suicide ();
-      return scm_make_real (0.0);
+      return gh_double2scm (0.0);
     }
   
-  return scm_make_real (i.center ());
+  return gh_double2scm (i.center ());
 }
 
 void
@@ -168,7 +167,7 @@ Span_bar::evaluate_empty (Grob*me)
   /* TODO: filter all hara-kiried out of ELEMENS list, and then
      optionally do suicide. Call this cleanage function from
      center_on_spanned_callback () as well. */
-  if (!ly_c_pair_p (me->get_property ("elements")))
+  if (!gh_pair_p (me->get_property ("elements")))
     {
       me->suicide ();
     }
@@ -179,17 +178,17 @@ Span_bar::evaluate_glyph (Grob*me)
 {
   SCM gl = me->get_property ("glyph");
 
-  if (ly_c_string_p (gl))
+  if (gh_string_p (gl))
     return ;
   
   for (SCM s = me->get_property ("elements");
-       !ly_c_string_p (gl) && ly_c_pair_p (s); s = ly_cdr (s))
+       !gh_string_p (gl) && gh_pair_p (s); s = gh_cdr (s))
     {
-      gl = unsmob_grob (ly_car (s))
+      gl = unsmob_grob (gh_car (s))
        ->get_property ("glyph");
     }
 
-  if (!ly_c_string_p (gl))
+  if (!gh_string_p (gl))
     {
       me->suicide ();
       return;
@@ -219,7 +218,7 @@ Interval
 Span_bar::get_spanned_interval (Grob*me) 
 {
   return ly_scm2interval (Axis_group_interface::group_extent_callback
-                         (me->self_scm (), scm_int2num (Y_AXIS))); 
+                         (me->self_scm (), gh_int2scm (Y_AXIS))); 
 }
 
 
@@ -233,9 +232,9 @@ Span_bar::get_bar_size (SCM smob)
     {
       /* This happens if the bars are hara-kiried from under us. */
       me->suicide ();
-      return scm_make_real (-1);
+      return gh_double2scm (-1);
     }
-  return scm_make_real (iv.length ());
+  return gh_double2scm (iv.length ());
 }
 
 
index e27a72e93db50dcb3e19431b7f2f73bba34bdd1a..591953b0359cf6c175a22c400490f1b8e84cad92 100644 (file)
@@ -28,7 +28,8 @@ Spring_smob::mark_smob (SCM) { return SCM_UNSPECIFIED; }
 int
 Spring_smob::print_smob (SCM s, SCM p, scm_print_state *)
 {
-  scm_puts ("#<Spring smob>", p);
+  Spring_smob *ss = unsmob_spring (s);
+  scm_puts (_f ("#<spring smob d= %f>", ss->distance_).to_str0 (), p);
   return 1;
 }
 
index de3e1fda41ae9fbd748bed8406932115b7b4cb9e..509ff6ae348b0a1d23c2cbebf26b52db31ad0ec5 100644 (file)
@@ -30,9 +30,9 @@ Staff_collecting_engraver::acknowledge_grob (Grob_info gi)
   if (Staff_symbol::has_interface (gi.grob_))
     {
       SCM staffs = get_property ("stavesFound");
-      staffs = scm_cons (gi.grob_->self_scm (), staffs);
+      staffs = gh_cons (gi.grob_->self_scm (), staffs);
 
-      context ()->set_property ("stavesFound", staffs);
+      daddy_context_->set_property ("stavesFound", staffs);
     }
 }
 
index 7cb78b53805d1130416618d2e26ee6707efac537..bc0d86f7d6b52eda706cb1270f335a67971d76f9 100644 (file)
@@ -65,7 +65,7 @@ Staff_performer::initialize ()
   audio_staff_ = new Audio_staff;
   announce_element (Audio_element_info (audio_staff_, 0));
 
-  name_ = new Audio_text (Audio_text::TRACK_NAME, context ()->id_string ());
+  name_ = new Audio_text (Audio_text::TRACK_NAME, daddy_context_->id_string_);
   announce_element (Audio_element_info (name_, 0));
 
   tempo_ = new Audio_tempo (get_tempo ());
@@ -99,7 +99,7 @@ Staff_performer::stop_translation_timestep ()
 {
   SCM proc = ly_scheme_function ("percussion?");
   
-  SCM drums = scm_call_1 (proc, ly_symbol2scm (instrument_string_.to_str0 ()));
+  SCM drums = gh_call1 (proc, ly_symbol2scm (instrument_string_.to_str0 ()));
   audio_staff_->channel_ = (drums == SCM_BOOL_T ? 9 : -1 );
   if (name_)
     {
@@ -130,7 +130,7 @@ Staff_performer::new_instrument_string ()
   // mustn't ask Score for instrument: it will return piano!
   SCM minstr = get_property ("midiInstrument");
 
-  if (!ly_c_string_p (minstr)
+  if (!gh_string_p (minstr)
       || ly_scm2string (minstr) == instrument_string_)
     return "";
 
index cd2827297d671a0acda87c2ff61ded5a621a4c23..124cb364884e2c21adb375c17aa697e5c2977f7d 100644 (file)
@@ -101,7 +101,7 @@ Staff_spacing::bar_y_positions (Grob *bar_grob)
     {
       SCM glyph = bar_grob->get_property ("glyph");
       
-      String glyph_string = ly_c_string_p (glyph) ? ly_scm2string (glyph) : "";
+      String glyph_string = gh_string_p (glyph) ? ly_scm2string (glyph) : "";
       if (glyph_string.left_string (1) == "|" || glyph_string.left_string (1) == ".")
        {
          SCM sz = Bar_line::get_staff_bar_size (bar_grob->self_scm ());
@@ -128,14 +128,14 @@ Staff_spacing::next_notes_correction (Grob *me, Grob * last_grob)
   Real max_corr =0.0;
 
   for (SCM s = me->get_property ("right-items");
-       ly_c_pair_p (s);  s = ly_cdr (s))
+       gh_pair_p (s);  s = gh_cdr (s))
     {
-      Grob * g = unsmob_grob (ly_car (s));
+      Grob * g = unsmob_grob (gh_car (s));
 
       max_corr = max_corr >?  next_note_correction (me, g,  bar_size);
       for (SCM t = g->get_property ("elements");
-          ly_c_pair_p (t); t  = ly_cdr (t))
-       max_corr = max_corr >? next_note_correction (me, unsmob_grob (ly_car (t)), bar_size);
+          gh_pair_p (t); t  = gh_cdr (t))
+       max_corr = max_corr >? next_note_correction (me, unsmob_grob (gh_car (t)), bar_size);
       
     }
   
@@ -152,9 +152,9 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed)
   Item * me_item  = dynamic_cast<Item*> (me);
     
   for (SCM s = me->get_property ("left-items");
-       ly_c_pair_p (s); s = ly_cdr (s))
+       gh_pair_p (s); s = gh_cdr (s))
     {
-      Grob * cand = unsmob_grob (ly_car (s));
+      Grob * cand = unsmob_grob (gh_car (s));
       if (cand && Separation_item::has_interface (cand))
        separation_item = cand ;
     }
@@ -197,20 +197,20 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed)
   if (me_item->break_status_dir () == CENTER)
     {
       SCM nndef = scm_sloppy_assq (ly_symbol2scm ("next-note"), alist);
-      if (ly_c_pair_p (nndef))
+      if (gh_pair_p (nndef))
        space_def = nndef;
     }
   
   
-  if (!ly_c_pair_p (space_def))
+  if (!gh_pair_p (space_def))
     {
       programming_error ("Unknown prefatory spacing. "); 
       return; 
     }
 
-  space_def = ly_cdr (space_def);
-  Real distance = ly_scm2double (ly_cdr (space_def));
-  SCM type = ly_car (space_def) ;
+  space_def = gh_cdr (space_def);
+  Real distance = gh_scm2double (gh_cdr (space_def));
+  SCM type = gh_car (space_def) ;
 
   *fixed = last_ext[RIGHT];
   if (type == ly_symbol2scm ("fixed-space"))
index 38c39dffc4e5fb5c7048a2dcf160811d0e749596..cfd92d8a56f5fb0b7ca40c25bffa6bdb2de89156 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "score.hh"
 #include "paper-column.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "side-position-interface.hh"
 #include "engraver.hh"
 #include "moment.hh"
@@ -46,11 +46,11 @@ Staff_symbol_engraver::process_music ()
 {
   if (!span_)
     {
-      span_ = make_spanner ("StaffSymbol", SCM_EOL);
+      span_ = make_spanner ("StaffSymbol");
   
       span_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn")));
 
-      
+      announce_grob (span_, SCM_EOL);
     }
 }
 
@@ -60,6 +60,7 @@ Staff_symbol_engraver::finalize ()
   if (span_)
     {
       span_->set_bound (RIGHT,unsmob_grob (get_property ("currentCommandColumn")));
+      typeset_grob (span_);
     }
   span_ =0;
 }
@@ -68,6 +69,9 @@ void
 Staff_symbol_engraver::acknowledge_grob (Grob_info s)
 {
   s.grob_->set_property ("staff-symbol", span_->self_scm ());
+
+  // remove this. probly not necessary?
+  s.grob_->add_dependency (span_); // UGH. UGH. UGH
 }
 
 
@@ -102,7 +106,7 @@ Tab_staff_symbol_engraver::process_music ()
     {
       int k = scm_ilength (get_property ("stringTunings"));
       if (k>=0)
-       span_->set_property ("line-count", scm_int2num (k));
+       span_->set_property ("line-count", gh_int2scm (k));
     }
 }
 
index 4ef9fbe9be622197a5e14afb50b04788d8543193..0a2b4faeec08ba8b4c846dd03126e8610feadb86 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "staff-symbol-referencer.hh"
 #include "staff-symbol.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "libc-extension.hh"
 
 
@@ -56,7 +56,7 @@ Staff_symbol_referencer::line_thickness (Grob *me)
   Grob *st = get_staff_symbol (me);
   if (st)
     return Staff_symbol::get_line_thickness (st);
-  return me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+  return me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
 }
 
 Real
@@ -93,9 +93,9 @@ LY_DEFINE (ly_grob_staff_position, "ly:grob-staff-position",
   Real pos = Staff_symbol_referencer::get_position (g);
 
   if (fabs (rint (pos) -pos) < 1e-6) // ugh.
-    return scm_int2num ((int) my_round (pos));
+    return gh_int2scm ((int) my_round (pos));
   else
-    return scm_make_real (pos);
+    return gh_double2scm (pos);
 }
 
 
@@ -108,19 +108,19 @@ Staff_symbol_referencer::callback (SCM element_smob, SCM)
 
   SCM pos = me->get_property ("staff-position");
   Real off = 0.0;
-  if (ly_c_number_p (pos))
+  if (gh_number_p (pos))
     {
       Real space = Staff_symbol_referencer::staff_space (me);
-      off = ly_scm2double (pos) * space / 2.0;
-      me->set_property ("staff-position", scm_int2num (0));
+      off = gh_scm2double (pos) * space / 2.0;
+      me->set_property ("staff-position", gh_int2scm (0));
     }
 
-  return scm_make_real (off);
+  return gh_double2scm (off);
 }
 
 /*  This sets the position relative to the center of the staff symbol.
 
-The function is hairy, because it can be called in two situations:
+The function is hairy, because it can be callled in two situations:
 
 1. There is no staff yet; we must set staff-position
 
@@ -137,12 +137,14 @@ Staff_symbol_referencer::set_position (Grob *me, Real p)
   if (st && me->common_refpoint (st, Y_AXIS))
     {
       Real oldpos = get_position (me);
-      me->set_property ("staff-position", scm_make_real (p - oldpos));
+      me->set_property ("staff-position", gh_double2scm (p - oldpos));
     }
   else
-    me->set_property ("staff-position", scm_make_real (p));
+    me->set_property ("staff-position", gh_double2scm (p));
 
-  me->add_offset_callback (Staff_symbol_referencer::callback_proc, Y_AXIS);
+  if (!me->has_offset_callback (Staff_symbol_referencer::callback_proc,
+                               Y_AXIS))
+    me->add_offset_callback (Staff_symbol_referencer::callback_proc, Y_AXIS);
 }
 
 /* Half of the height, in staff space, i.e. 2.0 for a normal staff. */
index 695ebb201c54a9ed893fd831910a79b5af65d874..616cf613e90b6f07a313b4ae14c7a7825bb46b15 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "lookup.hh"
 #include "dimensions.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "stencil.hh"
 #include "warn.hh"
 #include "item.hh"
@@ -42,14 +42,14 @@ Staff_symbol::print (SCM smob)
   do
     {
       SCM width_scm = me->get_property ("width");
-      if (d == RIGHT && ly_c_number_p (width_scm))
+      if (d == RIGHT && gh_number_p (width_scm))
        {
          /*
            don't multiply by Staff_symbol_referencer::staff_space (me),
            since that would make aligning staff symbols of different sizes to
            one right margin hell.
          */      
-         span_points[RIGHT] = ly_scm2double (width_scm);
+         span_points[RIGHT] = gh_scm2double (width_scm);
        }
       else
        {
@@ -64,7 +64,7 @@ Staff_symbol::print (SCM smob)
   while (flip (&d) !=LEFT);
 
 
-  Real t = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+  Real t = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
   t *= robust_scm2double (me->get_property ("thickness"), 1.0);
   
   int l = Staff_symbol::line_count (me);
@@ -95,8 +95,8 @@ int
 Staff_symbol::line_count (Grob*me) 
 {
   SCM c = me->get_property ("line-count");
-  if (ly_c_number_p (c))
-    return ly_scm2int (c);
+  if (gh_number_p (c))
+    return gh_scm2int (c);
   else
     return 0;
 }
@@ -110,7 +110,7 @@ Staff_symbol::staff_space (Grob*me)
 Real
 Staff_symbol::get_line_thickness (Grob* me)
 {
-  Real lt =  me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+  Real lt =  me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
 
   return robust_scm2double (me->get_property ("thickness"), 1.0) * lt;
 }
index 8904bdd712cc5b4536a7c1cd51f81509848ea8f9..68c09bfa934d3ca537ff0a9053a20703c35e1127 100644 (file)
@@ -45,13 +45,13 @@ Stanza_number_engraver::process_music ()
 {
   SCM stanza = get_property ("stanza");
   
-  if (ly_c_string_p (stanza) && stanza != last_stanza_)
+  if (gh_string_p (stanza) && stanza != last_stanza_)
     {
       last_stanza_ = stanza;
       
-      text_ = make_item ("StanzaNumber", SCM_EOL);
+      text_ = make_item ("StanzaNumber");
       text_->set_property ("text", stanza);
-      
+      announce_grob (text_, SCM_EOL);
     }
 }
 
@@ -69,7 +69,11 @@ Stanza_number_engraver::acknowledge_grob (Grob_info inf)
 void
 Stanza_number_engraver::stop_translation_timestep ()
 {
-  text_ = 0;
+  if (text_)
+    {
+      typeset_grob (text_);
+      text_ = 0;
+    }
 }
 
 
index 15bba47969191e7de7e48afdfad4c0d2a22295c9..0216c85106a0ac45b000eba48dc17ca97d7b45d6 100644 (file)
@@ -65,12 +65,9 @@ Stem_engraver::acknowledge_grob (Grob_info i)
       
       if (!stem_) 
        {
-         /*
-           We announce the cause of the head as cause of the stem.
-           The stem needs a rhythmic structure to fit it into a beam.  */
-         stem_ = make_item ("Stem",i.music_cause ()->self_scm ());
+         stem_ = make_item ("Stem");
 
-         stem_->set_property ("duration-log", scm_int2num (duration_log));
+         stem_->set_property ("duration-log", gh_int2scm (duration_log));
 
          if (tremolo_ev_)
            {
@@ -83,15 +80,15 @@ Stem_engraver::acknowledge_grob (Grob_info i)
 
                the first and last (quarter) note bothe get one tremolo flag.
               */
-             int requested_type = ly_scm2int (tremolo_ev_->get_property ("tremolo-type"));
+             int requested_type = gh_scm2int (tremolo_ev_->get_property ("tremolo-type"));
              SCM f = get_property ("tremoloFlags");
              if (!requested_type)
-               if (ly_c_number_p (f))
-                 requested_type = ly_scm2int (f);
+               if (gh_number_p (f))
+                 requested_type = gh_scm2int (f);
                else
                  requested_type = 8; 
              else
-               context ()->set_property ("tremoloFlags", scm_int2num (requested_type));
+               daddy_context_->set_property ("tremoloFlags", gh_int2scm (requested_type));
 
              int tremolo_flags = intlog2 (requested_type) - 2
                - (duration_log > 2 ? duration_log - 2 : 0);
@@ -103,7 +100,8 @@ Stem_engraver::acknowledge_grob (Grob_info i)
 
              if (tremolo_flags)
                {
-                 tremolo_ = make_item ("StemTremolo", tremolo_ev_->self_scm ());
+                 tremolo_ = make_item ("StemTremolo");
+                 announce_grob (tremolo_, tremolo_ev_->self_scm ());
 
                  /*
                    The number of tremolo flags is the number of flags of
@@ -111,7 +109,7 @@ Stem_engraver::acknowledge_grob (Grob_info i)
                    itself.
                   */
                  tremolo_->set_property ("flag-count",
-                                              scm_int2num (tremolo_flags));
+                                              gh_int2scm (tremolo_flags));
                  tremolo_->set_parent (stem_, X_AXIS);
                  stem_->set_property ("tremolo-flag", tremolo_->self_scm ());
                  tremolo_->set_property ("stem",
@@ -119,6 +117,10 @@ Stem_engraver::acknowledge_grob (Grob_info i)
                }
            }
 
+         /*
+           We announce the cause of the head as cause of the stem.
+           The stem needs a rhythmic structure to fit it into a beam.  */
+         announce_grob (stem_, i.music_cause ()->self_scm ());
        }
 
       if (Stem::duration_log (stem_) != duration_log)
@@ -135,7 +137,11 @@ Stem_engraver::acknowledge_grob (Grob_info i)
 void
 Stem_engraver::stop_translation_timestep ()
 {
-  tremolo_ = 0;
+  if (tremolo_)
+    {
+      typeset_grob (tremolo_);
+      tremolo_ = 0;
+    }
 
   if (stem_)
     {
@@ -143,19 +149,19 @@ Stem_engraver::stop_translation_timestep ()
        toDO: junk these properties.
        */
       SCM prop = get_property ("stemLeftBeamCount");
-      if (ly_c_number_p (prop))
+      if (gh_number_p (prop))
        {
-         Stem::set_beaming (stem_,ly_scm2int (prop),LEFT);
-         context ()->unset_property (ly_symbol2scm ("stemLeftBeamCount"));
+         Stem::set_beaming (stem_,gh_scm2int (prop),LEFT);
+         daddy_context_->unset_property (ly_symbol2scm ("stemLeftBeamCount"));
        }
       prop = get_property ("stemRightBeamCount");
-      if (ly_c_number_p (prop))
+      if (gh_number_p (prop))
        {
-         Stem::set_beaming (stem_,ly_scm2int (prop), RIGHT);
-         context ()->unset_property (ly_symbol2scm ("stemRightBeamCount"));
+         Stem::set_beaming (stem_,gh_scm2int (prop), RIGHT);
+         daddy_context_->unset_property (ly_symbol2scm ("stemRightBeamCount"));
        }
 
-      
+      typeset_grob (stem_);
       stem_ = 0;
     }
 
index 84a70cc432e732ea8588ccb98e0daf41f7f26f12..d8c08c7bd950beca43498d0f2077cbe22c338d7a 100644 (file)
@@ -7,37 +7,43 @@
   
  */
 
+#include "stem-tremolo.hh"
+#include "warn.hh"
 #include "beam.hh"
-#include "directional-element-interface.hh"
-#include "item.hh"
+#include "paper-def.hh"
 #include "lookup.hh"
-#include "output-def.hh"
-#include "staff-symbol-referencer.hh"
-#include "stem-tremolo.hh"
 #include "stem.hh"
-#include "warn.hh"
-
-/* TODO: lengthen stem if necessary  */
+#include "item.hh"
+#include "staff-symbol-referencer.hh"
+#include "directional-element-interface.hh"
 
-MAKE_SCHEME_CALLBACK (Stem_tremolo, dim_callback, 2);
+/*
+  TODO:
+    lengthen stem if necessary
+ */
+MAKE_SCHEME_CALLBACK (Stem_tremolo,dim_callback,2);
 
-/* todo: init with cons.  */
+/*
+  todo: init with cons. 
+ */
 SCM
 Stem_tremolo::dim_callback (SCM e, SCM)
 {
-  Grob *se = unsmob_grob (e);
+  Grob * se = unsmob_grob (e);
   
   Real space = Staff_symbol_referencer::staff_space (se);
   return ly_interval2scm (Interval (-space, space));
 }
 
-/* ugh ?  --from Slur   */
+/*
+  ugh ?  --from Slur
+ */
 MAKE_SCHEME_CALLBACK (Stem_tremolo, height, 2);
 SCM
 Stem_tremolo::height (SCM smob, SCM ax)
 {
-  Axis a = (Axis)ly_scm2int (ax);
-  Grob *me = unsmob_grob (smob);
+  Axis a = (Axis)gh_scm2int (ax);
+  Grob * me = unsmob_grob (smob);
   assert (a == Y_AXIS);
 
   SCM mol = me->get_uncached_stencil ();
@@ -48,6 +54,7 @@ Stem_tremolo::height (SCM smob, SCM ax)
     return ly_interval2scm (Interval ());
 }
 
+
 Stencil
 Stem_tremolo::raw_stencil (Grob *me)
 {
@@ -60,7 +67,9 @@ Stem_tremolo::raw_stencil (Grob *me)
       Real dy = 0;
       SCM s = beam->get_property ("positions");
       if (is_number_pair (s))
-       dy = -ly_scm2double (ly_car (s)) +ly_scm2double (ly_cdr (s));
+       {
+         dy = -gh_scm2double (gh_car (s)) +gh_scm2double (gh_cdr (s));
+       }
       
       Real dx = Beam::last_visible_stem (beam)->relative_coordinate (0, X_AXIS)
        - Beam::first_visible_stem (beam)->relative_coordinate (0, X_AXIS);
@@ -73,18 +82,18 @@ Stem_tremolo::raw_stencil (Grob *me)
   Real ss = Staff_symbol_referencer::staff_space (me);
   Real thick = robust_scm2double (me->get_property ("beam-thickness"),1);
   Real width = robust_scm2double (me->get_property ("beam-width"),1);
-  Real blot = me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+  Real blot = me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter"));
 
   width *= ss;
   thick *= ss;
   
   Stencil a (Lookup::beam (dydx, width, thick, blot));
-  a.translate (Offset (-width * 0.5, width * 0.5 * dydx));
+  a.translate (Offset (-width/2, width / 2 * dydx));
   
   int tremolo_flags = 0;
   SCM s = me->get_property ("flag-count");
-  if (ly_c_number_p (s))
-    tremolo_flags = ly_scm2int (s);
+  if (gh_number_p (s))
+    tremolo_flags = gh_scm2int (s);
 
   if (!tremolo_flags)
     {
@@ -94,7 +103,11 @@ Stem_tremolo::raw_stencil (Grob *me)
       return Stencil ();
     }
 
-  /* Who the fuck is 0.81 ? --hwn.   */
+  /*
+    Who the fuck is 0.81 ?
+
+    --hwn.
+   */
   Real beam_translation = beam ? Beam::get_beam_translation (beam) : 0.81;
 
   Stencil mol; 
@@ -107,6 +120,7 @@ Stem_tremolo::raw_stencil (Grob *me)
   return mol;
 }
 
+
 MAKE_SCHEME_CALLBACK (Stem_tremolo,print,1);
 SCM
 Stem_tremolo::print (SCM grob) 
@@ -121,11 +135,8 @@ Stem_tremolo::print (SCM grob)
   
   Grob *beam = Stem::get_beam (stem);
   Direction stemdir = Stem::get_direction (stem);
-  if (stemdir == 0)
-    stemdir = UP;
-
   Real beam_translation
-    = (beam && beam->is_live ())
+    = (beam && beam->live ())
     ? Beam::get_beam_translation (beam)
     : 0.81;
 
@@ -134,39 +145,50 @@ Stem_tremolo::print (SCM grob)
   Real ss = Staff_symbol_referencer::staff_space (me);
 
   // ugh, rather calc from Stem_tremolo_req
-  int beam_count = beam ? (Stem::beam_multiplicity (stem).length () + 1) : 0;
+  int beam_count = (beam) ? (Stem::beam_multiplicity (stem).length () + 1): 0;
+
 
   Real beamthickness = 0.0;
   SCM sbt = (beam) ? beam->get_property ("thickness") : SCM_EOL ;
-  if (ly_c_number_p (sbt))
-    beamthickness = ly_scm2double (sbt) * ss;
+  if (gh_number_p (sbt))
+    {
+      beamthickness = gh_scm2double (sbt) * ss;
+    }
 
   Real end_y
-    = Stem::stem_end_position (stem) * ss / 2
+    = Stem::stem_end_position (stem) *ss/2 
     - stemdir * (beam_count * beamthickness
                 + ((beam_count -1) >? 0) * beam_translation);
 
-  /* FIXME: the 0.33 ss is to compensate for the size of the note head.  */
-  Real chord_start_y = Stem::chord_start_y (stem) + 0.33 * ss * stemdir;
+  /*
+    the 0.33 ss is to compensate for the size of the note head
+   */
+  Real chord_start_y = Stem::chord_start_y (stem) +
+    0.33 * ss * stemdir;
 
   Real padding = beam_translation;
 
-  /* if there is a flag, just above/below the notehead.
-     if there is not enough space, center on remaining space,
-     else one beamspace away from stem end.  */
+  /*
+    if there is a flag, just above/below the notehead.
+    if there is not enough space, center on remaining space,
+    else one beamspace away from stem end.
+   */
   if (!beam && Stem::duration_log (stem) >= 3)
     {
       mol.align_to (Y_AXIS, -stemdir);
-      mol.translate_axis (chord_start_y + 0.5 * stemdir, Y_AXIS);
+      mol.translate_axis (chord_start_y + .5 * stemdir, Y_AXIS);
+    }
+  else if (stemdir * (end_y - chord_start_y) - 2*padding - mol_ext.length ()  < 0.0)
+    {
+      mol.translate_axis (0.5 * (end_y + chord_start_y)  - mol_ext.center (),Y_AXIS);
     }
-  else if (stemdir * (end_y - chord_start_y) - 2 * padding - mol_ext.length ()
-          < 0.0)
-    mol.translate_axis (0.5 * (end_y + chord_start_y) - mol_ext.center (),
-                       Y_AXIS);
   else
-    mol.translate_axis (end_y - stemdir * beam_translation -mol_ext [stemdir],
-                       Y_AXIS);
-
+    {
+      mol.translate_axis (end_y - stemdir * beam_translation
+                         -mol_ext [stemdir]
+                         , Y_AXIS);
+    }
+  
   return mol.smobbed_copy ();
 }
 
index c7914a054066355738a3f893f094af8523678841..a0006dba1ef1dfdf6541a9536bd9d1bfe0b2e3b0 100644 (file)
@@ -20,7 +20,7 @@
 #include "note-head.hh"
 #include "stem.hh"
 #include "warn.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "rhythmic-head.hh"
 #include "font-interface.hh"
 #include "stencil.hh"
 #include "stem-tremolo.hh"
 
 void
-Stem::set_beaming (Grob *me, int beam_count, Direction d)
+Stem::set_beaming (Grob*me, int beam_count,  Direction d)
 {
   SCM pair = me->get_property ("beaming");
-
-  if (!ly_c_pair_p (pair))
+  
+  if (!gh_pair_p (pair))
     {
-      pair = scm_cons (SCM_EOL, SCM_EOL);
+      pair = gh_cons (SCM_EOL, SCM_EOL);
       me->set_property ("beaming", pair);
     }
 
-  SCM lst = index_get_cell (pair, d);
-  for (int i = 0; i < beam_count; i++)
-    lst = scm_cons (scm_int2num (i), lst);
-  index_set_cell (pair, d, lst);
+  SCM l = index_get_cell (pair, d);
+  for (int i = 0; i<  beam_count; i++)
+    {
+      l = gh_cons (gh_int2scm (i), l);
+    }
+  index_set_cell (pair, d, l);         
 }
 
+
 Interval
-Stem::head_positions (Grob *me)
+Stem::head_positions (Grob*me) 
 {
-  if (head_count (me))
+  if (!head_count (me))
     {
-      Drul_array<Grob*> e (extremal_heads (me));
-      return Interval (Staff_symbol_referencer::get_position (e[DOWN]),
-                      Staff_symbol_referencer::get_position (e[UP]));
+      Interval iv;
+      return iv;
     }
-  return Interval ();
+
+  Drul_array<Grob*> e (extremal_heads (me));
+
+  return Interval (Staff_symbol_referencer::get_position (e[DOWN]),
+                  Staff_symbol_referencer::get_position (e[UP]));
 }
 
+
 Real
-Stem::chord_start_y (Grob *me)
+Stem::chord_start_y (Grob*me) 
 {
-  Interval hp = head_positions (me);
-  if (!hp.is_empty ())
-    return hp[get_direction (me)] * Staff_symbol_referencer::staff_space (me)
-      * 0.5;
-  return 0;
+  return head_positions (me)[get_direction (me)]
+    * Staff_symbol_referencer::staff_space (me)/2.0;
 }
 
 Real
-Stem::stem_end_position (Grob *me)
+Stem::stem_end_position (Grob*me) 
 {
-  SCM p = me->get_property ("stem-end-position");
+  SCM p =me->get_property ("stem-end-position");
   Real pos;
-  if (!ly_c_number_p (p))
+  if (!gh_number_p (p))
     {
       pos = get_default_stem_end_position (me);
-      me->set_property ("stem-end-position", scm_make_real (pos));
+      me->set_property ("stem-end-position", gh_double2scm (pos));
     }
   else
-    pos = ly_scm2double (p);
+    pos = gh_scm2double (p);
 
   return pos;
 }
 
 Direction
-Stem::get_direction (Grob *me)
+Stem::get_direction (Grob*me)
 {
   Direction d = get_grob_direction (me);
 
   if (!d)
     {
-      d = get_default_dir (me);
-      // urg, AAARGH!
-      set_grob_direction (me, d);
+       d = get_default_dir (me);
+       // urg, AAARGH!
+       set_grob_direction (me, d);
     }
-  return d;
+  return d ;
 }
 
+
 void
-Stem::set_stemend (Grob *me, Real se)
+Stem::set_stemend (Grob*me, Real se)
 {
   // todo: margins
-  Direction d = get_direction (me);
-
+  Direction d= get_direction (me);
+  
   if (d && d * head_positions (me)[get_direction (me)] >= se*d)
     me->warning (_ ("Weird stem size; check for narrow beams"));
 
-  me->set_property ("stem-end-position", scm_make_real (se));
+  me->set_property ("stem-end-position", gh_double2scm (se));
 }
 
-/* Note head that determines hshift for upstems
-   WARNING: triggers direction  */
-Grob *
-Stem::support_head (Grob *me)
+
+/*
+  Note head that determines hshift for upstems
+
+  WARNING: triggers direction
+*/ 
+Grob*
+Stem::support_head (Grob*me)
 {
   if (head_count (me) == 1)
-    /* UGH. */
-    return unsmob_grob (ly_car (me->get_property ("note-heads")));
-  return first_head (me);
+    {
+      /*
+       UGH.
+       */
+      
+      return unsmob_grob (ly_car (me->get_property ("note-heads")));
+    }
+  else
+    return first_head (me);
 }
 
+
 int
-Stem::head_count (Grob *me)
+Stem::head_count (Grob*me)
 {
-  return Pointer_group_interface::count (me, "note-heads");
+  return  Pointer_group_interface::count (me, "note-heads");
 }
 
-/* The note head which forms one end of the stem.
-   WARNING: triggers direction  */
-Grob *
-Stem::first_head (Grob *me)
+/*
+  The note head which forms one end of the stem.  
+
+  WARNING: triggers direction
+*/
+Grob*
+Stem::first_head (Grob*me)
 {
   Direction d = get_direction (me);
-  if (d)
-    return extremal_heads (me)[-d];
-  return 0;
+  if (!d)
+    return 0;
+  return extremal_heads (me)[-d];
 }
 
-/* The note head opposite to the first head.  */
-Grob *
-Stem::last_head (Grob *me)
+/*
+  The note head opposite to the first head.
+ */
+Grob*
+Stem::last_head (Grob*me)
 {
   Direction d = get_direction (me);
-  if (d)
-    return extremal_heads (me)[d];
-  return 0;  
+  if (!d)
+    return 0;
+  return extremal_heads (me)[d];
 }
 
-/* START is part where stem reaches `last' head.  */
+/*
+  START is part where stem reaches `last' head. 
+ */
 Drul_array<Grob*>
-Stem::extremal_heads (Grob *me)
+Stem::extremal_heads (Grob*me) 
 {
   const int inf = 1000000;
   Drul_array<int> extpos;
   extpos[DOWN] = inf;
-  extpos[UP] = -inf;
-
+  extpos[UP] = -inf;  
+  
   Drul_array<Grob *> exthead;
   exthead[LEFT] = exthead[RIGHT] =0;
-
-  for (SCM s = me->get_property ("note-heads"); ly_c_pair_p (s);
-       s = ly_cdr (s))
+  
+  for (SCM s = me->get_property ("note-heads"); gh_pair_p (s); s = ly_cdr (s))
     {
-      Grob *n = unsmob_grob (ly_car (s));
+      Grob * n = unsmob_grob (ly_car (s));
+
+      
       int p = Staff_symbol_referencer::get_rounded_position (n);
 
       Direction d = LEFT;
-      do
+      do {
+      if (d* p > d* extpos[d])
        {
-         if (d * p > d * extpos[d])
-           {
-             exthead[d] = n;
-             extpos[d] = p;
-           }
-       } while (flip (&d) != DOWN);
+         exthead[d] = n;
+         extpos[d] = p;
+       }
+      } while (flip (&d) != DOWN);
     }
+
   return exthead;
 }
 
 static int
 icmp (int const &a, int const &b)
 {
-  return a - b;
+  return a-b;
 }
 
-/* The positions, in ascending order.  */
+/*
+  The positions, in ascending order.
+ */
 Array<int>
 Stem::note_head_positions (Grob *me)
 {
   Array<int> ps ;
-  for (SCM s = me->get_property ("note-heads"); ly_c_pair_p (s);
-       s = ly_cdr (s))
+  for (SCM s = me->get_property ("note-heads"); gh_pair_p (s); s = ly_cdr (s))
     {
-      Grob *n = unsmob_grob (ly_car (s));
+      Grob * n = unsmob_grob (ly_car (s));
       int p = Staff_symbol_referencer::get_rounded_position (n);
 
       ps.push (p);
     }
-
+  
   ps.sort (icmp);
-  return ps;
+  return ps; 
 }
 
+
 void
-Stem::add_head (Grob *me, Grob *n)
+Stem::add_head (Grob*me, Grob *n)
 {
   n->set_property ("stem", me->self_scm ());
   n->add_dependency (me);
 
-  /* TODO: why not store Rest pointers? */
+  /*
+    TODO: why not store Rest pointers? 
+  */
   if (Note_head::has_interface (n))
-    Pointer_group_interface::add_grob (me, ly_symbol2scm ("note-heads"), n);
+    {
+      Pointer_group_interface::add_grob (me, ly_symbol2scm ("note-heads"), n);
+    }
 }
 
 bool
-Stem::is_invisible (Grob *me)
+Stem::is_invisible (Grob*me)
 {
-  return !(head_count (me)
-          && ly_scm2int (me->get_property ("duration-log")) >= 1);
+  return ! (head_count (me)
+           && gh_scm2int (me->get_property ("duration-log")) >= 1);
 }
 
 Direction
-Stem::get_default_dir (Grob *me)
+Stem::get_default_dir (Grob*me) 
 {
   int staff_center = 0;
   Interval hp = head_positions (me);
   if (hp.is_empty ())
-    return CENTER;
-
+    {
+      return CENTER;
+    }
+  
   int udistance = (int) (UP * hp[UP] - staff_center);
-  int ddistance = (int) (DOWN * hp[DOWN] - staff_center);
-
+  int ddistance = (int) (DOWN* hp[DOWN] - staff_center);  
+  
   if (sign (ddistance - udistance))
-    return Direction (sign (ddistance - udistance));
+    return Direction (sign (ddistance -udistance));
 
   return to_dir (me->get_property ("neutral-direction"));
 }
 
 Real
-Stem::get_default_stem_end_position (Grob *me)
+Stem::get_default_stem_end_position (Grob*me) 
 {
-  Real ss = Staff_symbol_referencer::staff_space (me);
+  Real ss = Staff_symbol_referencer::staff_space (me); 
+
   int durlog = duration_log (me);
+    
   SCM s;
   Array<Real> a;
 
-  /* WARNING: IN HALF SPACES */
-  Real length = 7;
+  
+  Real length = 7;             // WARNING: IN HALF SPACES
   SCM scm_len = me->get_property ("length");
-  if (ly_c_number_p (scm_len))
-    length = ly_scm2double (scm_len);
+  if (gh_number_p (scm_len))
+    {
+      length = gh_scm2double (scm_len);
+    }
   else
     {
       s = me->get_property ("lengths");
-      if (ly_c_pair_p (s))
-       length = 2 * ly_scm2double (robust_list_ref (durlog - 2, s));
+      if (gh_pair_p (s))
+       {
+         length = 2* gh_scm2double (robust_list_ref (durlog -2, s));
+       }
     }
 
   /* URGURGURG
-     'set-default-stemlen' sets direction too.   */
+     'set-default-stemlen' sets direction too
+   */
   Direction dir = get_direction (me);
   if (!dir)
     {
@@ -273,60 +312,74 @@ Stem::get_default_stem_end_position (Grob *me)
       set_grob_direction (me, dir);
     }
 
-  /* Stems in unnatural (forced) direction should be shortened,
-     according to [Roush & Gourlay] */
-  Interval hp = head_positions (me);
+  /* stems in unnatural (forced) direction should be shortened, 
+    according to [Roush & Gourlay] */
+  Interval hp = head_positions (me);  
   if (dir && dir * hp[dir] >= 0)
     {
       SCM sshorten = me->get_property ("stem-shorten");
-      SCM scm_shorten = ly_c_pair_p (sshorten) ?
+      SCM scm_shorten = gh_pair_p (sshorten) ?
        robust_list_ref ((duration_log (me) - 2) >? 0, sshorten): SCM_EOL;
       Real shorten = 2* robust_scm2double (scm_shorten,0);
-
+      
+  
       /* On boundary: shorten only half */
       if (abs (head_positions (me)[dir]) <= 1)
        shorten *= 0.5;
-
+  
       length -= shorten;
     }
 
-  /* Tremolo stuff.  */
-  Grob *t_flag = unsmob_grob (me->get_property ("tremolo-flag"));
-  if (t_flag && !unsmob_grob (me->get_property ("beam")))
+  /*
+    Tremolo stuff: 
+  */
+  Grob * trem = unsmob_grob (me->get_property ("tremolo-flag"));
+  if (trem &&  !unsmob_grob (me->get_property ("beam")))
     {
-      /* Crude hack: add extra space if tremolo flag is there.
+      /*
+       Crude hack: add extra space if tremolo flag is there.
 
        We can't do this for the beam, since we get into a loop
-       (Stem_tremolo::raw_stencil () looks at the beam.) --hwn  */
-
-      Real minlen = 1.0
-       + 2 * Stem_tremolo::raw_stencil (t_flag).extent (Y_AXIS).length  ()
-       / ss;
-
+       (Stem_tremolo::raw_stencil () looks at the beam.)
+       
+        --hwn 
+      */
+      
+      Real minlen =
+       1.0 + 2 * Stem_tremolo::raw_stencil (trem).extent (Y_AXIS).length  () / ss;
+      
       if (durlog >= 3)
        {
-         Interval flag_ext = flag (me).extent (Y_AXIS);
+         Interval flag_ext = flag (me).extent (Y_AXIS) ;
          if (!flag_ext.is_empty ())
-           minlen += 2 * flag_ext.length () / ss;
+           minlen += 2 * flag_ext.length () / ss ;
 
-         /* The clash is smaller for down stems (since the tremolo is
-            angled up.) */
+         /*
+           The clash is smaller for down stems (since the tremolo is
+           angled up.)
+          */
          if (dir == DOWN)
            minlen -= 1.0;
        }
+      
       length = length >? (minlen + 1.0);
     }
+   
+  Real st = dir ? hp[dir] + dir * length : 0.0;
 
-  Real st = dir ? hp[dir] + dir * length : 0;
-
-  /* TODO: change name  to extend-stems to staff/center/'()  */
+  /*
+    TODO: change name  to extend-stems to staff/center/'()
+  */
   bool no_extend_b = to_boolean (me->get_property ("no-stem-extend"));
-  if (!no_extend_b && dir * st < 0)
+  if (!no_extend_b && dir * st < 0) // junkme?
     st = 0.0;
 
-  /* Make a little room if we have a upflag and there is a dot.
-     previous approach was to lengthen the stem. This is not
-     good typesetting practice.  */
+  /*
+    Make a little room if we have a upflag and there is a dot.
+    previous approach was to lengthen the stem. This is not
+    good typesetting practice. 
+    
+  */
   if (!get_beam (me) && dir == UP
       && durlog > 2)
     {
@@ -337,10 +390,13 @@ Stem::get_default_stem_end_position (Grob *me)
       if (dots)
        {
          Real dp = Staff_symbol_referencer::get_position (dots);
-         Real flagy = flag (me).extent (Y_AXIS)[-dir] * 2 / ss;
+         Real flagy =  flag (me).extent (Y_AXIS)[-dir] * 2
+           / ss;
 
-         /* Very gory: add myself to the X-support of the parent,
-            which should be a dot-column. */
+         /*
+           Very gory: add myself to the X-support of the parent,
+           which should be a dot-column.
+          */
          if (dir * (st + flagy -  dp) < 0.5)
            {
              Grob *par = dots->get_parent (X_AXIS);
@@ -349,51 +405,62 @@ Stem::get_default_stem_end_position (Grob *me)
                {
                  Side_position_interface::add_support (par, me);
 
-                 /* TODO: apply some better logic here. The flag is
-                    curved inwards, so this will typically be too
-                    much. */
+                 /*
+                   TODO: apply some better logic here. The flag is
+                   curved inwards, so this will typically be too
+                   much.
+                 */
                }
            }
        }
     }
+
+
   return st;
 }
 
-/* The log of the duration (Number of hooks on the flag minus two)  */
+
+
+/*
+  
+  the log of the duration (Number of hooks on the flag minus two)
+ */
 int
-Stem::duration_log (Grob *me)
+Stem::duration_log (Grob*me) 
 {
   SCM s = me->get_property ("duration-log");
-  return (ly_c_number_p (s)) ? ly_scm2int (s) : 2;
+  return (gh_number_p (s)) ? gh_scm2int (s) : 2;
 }
 
 void
-Stem::position_noteheads (Grob *me)
+Stem::position_noteheads (Grob*me)
 {
   if (!head_count (me))
     return;
-
+  
   Link_array<Grob> heads =
-    Pointer_group_interface__extract_grobs (me, (Grob*) 0, "note-heads");
+    Pointer_group_interface__extract_grobs (me, (Grob*)0, "note-heads");
 
   heads.sort (compare_position);
   Direction dir =get_direction (me);
-
+  
   if (dir < 0)
     heads.reverse ();
 
-  Real thick = thickness (me);
 
+  Real thick = thickness (me);
+      
   Grob *hed = support_head (me);
   Real w = Note_head::head_extent (hed,X_AXIS)[dir];
-  for (int i = 0; i < heads.size (); i++)
-    heads[i]->translate_axis (w - Note_head::head_extent (heads[i],
-                                                         X_AXIS)[dir],
-                             X_AXIS);
-
-  bool parity = true;
+  for (int i=0; i < heads.size (); i++)
+    {
+      heads[i]->translate_axis (w - Note_head::head_extent (heads[i],X_AXIS)[dir],
+                               X_AXIS);
+    }
+  
+  bool parity= true;
   Real lastpos = Real (Staff_symbol_referencer::get_position (heads[0]));
-  for (int i = 1; i < heads.size (); i ++)
+  for (int i=1; i < heads.size (); i ++)
     {
       Real p = Staff_symbol_referencer::get_position (heads[i]);
       Real dy =fabs (lastpos- p);
@@ -406,45 +473,45 @@ Stem::position_noteheads (Grob *me)
        {
          if (parity)
            {
-             Real ell = Note_head::head_extent (heads[i], X_AXIS).length ();
+             Real l = Note_head::head_extent (heads[i], X_AXIS).length ();
 
              Direction d = get_direction (me);
              /*
-               Reversed head should be shifted ell-thickness, but this
-               looks too crowded, so we only shift ell-0.5*thickness.
+               Reversed head should be shifted l-thickness, but this
+               looks too crowded, so we only shift l-0.5*thickness.
 
                This leads to assymetry: Normal heads overlap the
                stem 100% whereas reversed heads only overlaps the
                stem 50%
+
              */
 
-             Real reverse_overlap = 0.5;
-             heads[i]->translate_axis ((ell - thick * reverse_overlap) * d,
-                                       X_AXIS);
+             Real reverse_overlap =0.5;
+             heads[i]->translate_axis ((l-thick*reverse_overlap) * d, X_AXIS);
 
              if (is_invisible (me))
-               heads[i]->translate_axis (-thick * (2 - reverse_overlap) * d,
-                                         X_AXIS);
+               heads[i]->translate_axis (-thick*(2 - reverse_overlap) * d , X_AXIS);
 
+             
             /* TODO:
-               
+                
              For some cases we should kern some more: when the
-             distance between the next or prev note is too large, we'd
+             distance between the next or prev note is too large, we'd 
              get large white gaps, eg.
-       
+             
                |
               X|
               |X  <- kern this.
               |
              X
-       
+             
              */
            }
          parity = !parity;
        }
       else
        parity = true;
-
+      
       lastpos = int (p);
     }
 }
@@ -453,7 +520,8 @@ MAKE_SCHEME_CALLBACK (Stem,before_line_breaking,1);
 SCM
 Stem::before_line_breaking (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob*me = unsmob_grob (smob);
+
 
   /*
     Do the calculations for visible stems, but also for invisible stems
@@ -465,7 +533,9 @@ Stem::before_line_breaking (SCM smob)
       position_noteheads (me);
     }
   else
-    me->set_property ("print-function", SCM_EOL);
+    {
+      me->set_property ("print-function", SCM_EOL);
+    }
   
   return SCM_UNSPECIFIED;
 }
@@ -479,8 +549,8 @@ MAKE_SCHEME_CALLBACK (Stem, height, 2);
 SCM
 Stem::height (SCM smob, SCM ax)
 {
-  Axis a = (Axis)ly_scm2int (ax);
-  Grob *me = unsmob_grob (smob);
+  Axis a = (Axis)gh_scm2int (ax);
+  Grob * me = unsmob_grob (smob);
   assert (a == Y_AXIS);
 
   SCM mol = me->get_uncached_stencil ();
@@ -490,7 +560,7 @@ Stem::height (SCM smob, SCM ax)
   if (Grob *b =get_beam (me))
     {
       Direction d = get_direction (me);
-      iv[d] += d * Beam::get_thickness (b) * 0.5 ;
+      iv[d] += d * Beam::get_thickness (b) /2.0 ;
     }
 
   return ly_interval2scm (iv);
@@ -498,19 +568,23 @@ Stem::height (SCM smob, SCM ax)
 
 
 Stencil
-Stem::flag (Grob *me)
+Stem::flag (Grob*me)
 {
   /* TODO: maybe property stroke-style should take different values,
      e.g. "" (i.e. no stroke), "single" and "double" (currently, it's
      '() or "grace").  */
   String flag_style;
-
-  SCM flag_style_scm = me->get_property ("flag-style");
-  if (ly_c_symbol_p (flag_style_scm))
-    flag_style = ly_symbol2string (flag_style_scm);
   
+  SCM flag_style_scm = me->get_property ("flag-style");
+  if (gh_symbol_p (flag_style_scm))
+    {
+      flag_style = ly_symbol2string (flag_style_scm);
+    }
+
   if (flag_style == "no-flag")
-    return Stencil ();
+    {
+      return Stencil ();
+    }
 
   bool adjust = true;
 
@@ -547,12 +621,12 @@ Stem::flag (Grob *me)
          /*
            perhaps the detection whether this correction is needed should
            happen in a different place  to avoid the recursion.
-       
+           
            --hwn.
          */
          int p = Staff_symbol_referencer::get_rounded_position (me);
-         staffline_offs = Staff_symbol_referencer::on_staffline (me, p)
-           "1" : "0";
+         staffline_offs = Staff_symbol_referencer::on_staffline (me, p) ?
+           "1" : "0";
        }
       else
         {
@@ -565,15 +639,17 @@ Stem::flag (Grob *me)
     }
 
   char dir = (get_direction (me) == UP) ? 'u' : 'd';
-  String font_char = flag_style
-    + to_string (dir) + staffline_offs + to_string (duration_log (me));
+  String font_char =
+    flag_style + to_string (dir) + staffline_offs + to_string (duration_log (me));
   Font_metric *fm = Font_interface::get_default_font (me);
   Stencil flag = fm->find_by_name ("flags-" + font_char);
   if (flag.is_empty ())
-    me->warning (_f ("flag `%s' not found", font_char));
+    {
+      me->warning (_f ("flag `%s' not found", font_char));
+    }
 
   SCM stroke_style_scm = me->get_property ("stroke-style");
-  if (ly_c_string_p (stroke_style_scm))
+  if (gh_string_p (stroke_style_scm))
     {
       String stroke_style = ly_scm2string (stroke_style_scm);
       if (!stroke_style.is_empty ())
@@ -581,9 +657,13 @@ Stem::flag (Grob *me)
          String font_char = to_string (dir) + stroke_style;
          Stencil stroke = fm->find_by_name ("flags-" + font_char);
          if (stroke.is_empty ())
-           me->warning (_f ("flag stroke `%s' not found", font_char));
+           {
+             me->warning (_f ("flag stroke `%s' not found", font_char));
+           }
          else
-           flag.add_stencil (stroke);
+           {
+             flag.add_stencil (stroke);
+           }
        }
     }
 
@@ -594,36 +674,42 @@ MAKE_SCHEME_CALLBACK (Stem,dim_callback,2);
 SCM
 Stem::dim_callback (SCM e, SCM ax)
 {
-  Axis a = (Axis) ly_scm2int (ax);
+  Axis a = (Axis) gh_scm2int (ax);
   assert (a == X_AXIS);
   Grob *me = unsmob_grob (e);
   Interval r (0, 0);
   if (unsmob_grob (me->get_property ("beam")) || abs (duration_log (me)) <= 2)
     ;  // TODO!
   else
-    r = flag (me).extent (X_AXIS)
-      + thickness (me)/2;
+    {
+      r = flag (me).extent (X_AXIS)
+       + thickness (me)/2;
+    }
   return ly_interval2scm (r);
 }
-
 Real
-Stem::thickness (Grob *me)
+Stem::thickness (Grobme)
 {
-  return ly_scm2double (me->get_property ("thickness"))
+  return gh_scm2double (me->get_property ("thickness"))
     * Staff_symbol_referencer::line_thickness (me);
 }
 
-MAKE_SCHEME_CALLBACK (Stem, print, 1);
+MAKE_SCHEME_CALLBACK (Stem,print,1);
+
 SCM
-Stem::print (SCM smob)
+Stem::print (SCM smob) 
 {
-  Grob *me = unsmob_grob (smob);
+  Grob*me = unsmob_grob (smob);
   Stencil mol;
   Direction d = get_direction (me);
+     
+  /*
+    TODO: make the stem start a direction ?
 
-  /* TODO: make the stem start a direction ?
-     This is required to avoid stems passing in tablature chords.  */
-  Grob *lh = to_boolean (me->get_property ("avoid-note-head"))
+    This is required to avoid stems passing in tablature chords...
+  */
+  Grob *lh = to_boolean (me->get_property ("avoid-note-head")) 
     ? last_head (me) :  lh = first_head (me);
 
   if (!lh)
@@ -631,11 +717,12 @@ Stem::print (SCM smob)
 
   if (is_invisible (me))
     return SCM_EOL;
-
+  
   Real y1 = Staff_symbol_referencer::get_position (lh);
   Real y2 = stem_end_position (me);
-
+  
   Interval stem_y (y1 <? y2,y2 >? y1);
 
   // dy?
   Real dy = Staff_symbol_referencer::staff_space (me) * 0.5;
@@ -652,12 +739,12 @@ Stem::print (SCM smob)
       stem_y[Direction (-d)] += d * y_attach/dy;
     }
 
-
+  
   // URG
   Real stem_width = thickness (me);
-  Real blot =
-       me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter"));
-
+  Real blot = 
+       me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter"));
+  
   Box b = Box (Interval (-stem_width/2, stem_width/2),
               Interval (stem_y[DOWN]*dy, stem_y[UP]*dy));
 
@@ -678,42 +765,57 @@ Stem::print (SCM smob)
 /*
   move the stem to right of the notehead if it is up.
  */
-MAKE_SCHEME_CALLBACK (Stem, off_callback, 2);
+MAKE_SCHEME_CALLBACK (Stem,off_callback,2);
 SCM
 Stem::off_callback (SCM element_smob, SCM)
 {
   Grob *me = unsmob_grob (element_smob);
-  Real r = 0.0;
   
-  if (head_count (me))
-    if (Grob *f = first_head (me))
-      {
-       Interval head_wid = Note_head::head_extent (f, X_AXIS);
-       Real attach = 0.0;
-       
-       if (is_invisible (me))
+  Real r=0;
+
+  if (head_count (me) == 0)
+    {
+      return gh_double2scm (0.0);
+    }
+  
+  if (Grob * f = first_head (me))
+    {
+      Interval head_wid = Note_head::head_extent (f, X_AXIS);
+      
+      Real attach =0.0;
+
+      if (is_invisible (me))
+       {
          attach = 0.0;
-       else
+       }
+      else
        attach = Note_head::stem_attachment_coordinate (f, X_AXIS);
-       
-       Direction d = get_direction (me);
-       Real real_attach = head_wid.linear_combination (d * attach);
-       r = real_attach;
-       
-       /* If not centered: correct for stem thickness.  */
-       if (attach)
-         {
-           Real rule_thick = thickness (me);
-           r += - d * rule_thick * 0.5;
-         }
-      }
-  return scm_make_real (r);
+
+      Direction d = get_direction (me);
+
+      Real real_attach = head_wid.linear_combination (d * attach);
+
+      r = real_attach;
+
+      /*
+       If not centered: correct for stem thickness.
+       */
+      if (attach)
+       {
+         Real rule_thick
+           = thickness (me);
+         
+         r += - d * rule_thick * 0.5;
+       }
+    }
+  return gh_double2scm (r);
 }
 
-Grob *
-Stem::get_beam (Grob *me)
+
+Grob*
+Stem::get_beam (Grob*me)
 {
-  SCM b = me->get_property ("beam");
+  SCM b me->get_property ("beam");
   return unsmob_grob (b);
 }
 
@@ -722,21 +824,23 @@ Stem::get_stem_info (Grob *me)
 {
   /* Return cached info if available */
   SCM scm_info = me->get_property ("stem-info");
-  if (!ly_c_pair_p (scm_info))
+  if (!gh_pair_p (scm_info))
     {
       calc_stem_info (me);
       scm_info = me->get_property ("stem-info");
     }
-
+  
   Stem_info si;
-  si.dir_ = get_grob_direction (me);
-  si.ideal_y_ = ly_scm2double (ly_car (scm_info));
-  si.shortest_y_ = ly_scm2double (ly_cadr (scm_info));
+  si.dir_ = get_grob_direction (me); 
+  si.ideal_y_ = gh_scm2double (gh_car (scm_info)); 
+  si.shortest_y_ = gh_scm2double (gh_cadr (scm_info));
   return si;
 }
 
 
-/* TODO: add extra space for tremolos!  */
+/*
+  TODO: add extra space for tremolos!
+ */
 void
 Stem::calc_stem_info (Grob *me)
 {
@@ -747,7 +851,7 @@ Stem::calc_stem_info (Grob *me)
       programming_error ("No stem dir set?");
       my_dir  = UP;
     }
-
+  
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   Grob *beam = get_beam (me);
   Real beam_translation = Beam::get_beam_translation (beam);
@@ -758,25 +862,25 @@ Stem::calc_stem_info (Grob *me)
   /* Simple standard stem length */
   SCM lengths = me->get_property ("beamed-lengths");
   Real ideal_length =
-    ly_scm2double (robust_list_ref (beam_count - 1,lengths))
+    gh_scm2double (robust_list_ref (beam_count - 1,lengths))
                
     * staff_space
     /* stem only extends to center of beam */
     - 0.5 * beam_thickness;
-
+  
   /* Condition: sane minimum free stem length (chord to beams) */
   lengths = me->get_property ("beamed-minimum-free-lengths");
   Real ideal_minimum_free =
-    ly_scm2double (robust_list_ref (beam_count - 1, lengths))
+    gh_scm2double (robust_list_ref (beam_count - 1, lengths))
     * staff_space;
-
+  
 
   /* UGH
      It seems that also for ideal minimum length, we must use
      the maximum beam count (for this direction):
-
+     
      \score{ \notes\relative c''{ [a8 a32] }}
-
+     
      must be horizontal. */
   Real height_of_my_beams = beam_thickness
     + (beam_count - 1) * beam_translation;
@@ -788,6 +892,7 @@ Stem::calc_stem_info (Grob *me)
 
   ideal_length = ideal_length >? ideal_minimum_length;
 
+  
   /* Convert to Y position, calculate for dir == UP */
   Real note_start =
     /* staff positions */
@@ -799,9 +904,9 @@ Stem::calc_stem_info (Grob *me)
   /* Conditions for Y position */
 
   /* Lowest beam of (UP) beam must never be lower than second staffline
-
      Reference?
-
      Although this (additional) rule is probably correct,
      I expect that highest beam (UP) should also never be lower
      than middle staffline, just as normal stems.
@@ -809,7 +914,7 @@ Stem::calc_stem_info (Grob *me)
      Reference?
 
      Obviously not for grace beams.
-
+     
      Also, not for knees.  Seems to be a good thing. */
   bool no_extend_b = to_boolean (me->get_property ("no-stem-extend"));
   bool is_knee = to_boolean (beam->get_property ("knee"));
@@ -827,7 +932,7 @@ Stem::calc_stem_info (Grob *me)
   ideal_y -= robust_scm2double (beam->get_property ("shorten"), 0);
 
   Real minimum_free =
-    ly_scm2double (robust_list_ref
+    gh_scm2double (robust_list_ref
                   (beam_count - 1,
                    me->get_property
                    ("beamed-extreme-minimum-free-lengths")))
@@ -838,32 +943,40 @@ Stem::calc_stem_info (Grob *me)
     /* stem only extends to center of beam */
     - 0.5 * beam_thickness;
 
-  ideal_y *= my_dir;
   Real minimum_y = note_start + minimum_length;
-  Real shortest_y = minimum_y * my_dir;
-
+  
+  
+  ideal_y *= my_dir;
+  Real shortest_y = minimum_y * my_dir; 
+  
   me->set_property ("stem-info",
-                   scm_list_2 (scm_make_real (ideal_y),
-                               scm_make_real (shortest_y)));
+                        scm_list_n (gh_double2scm (ideal_y),
+                                    gh_double2scm (shortest_y),
+                                    SCM_UNDEFINED));
 }
 
 Slice
 Stem::beam_multiplicity (Grob *stem)
 {
   SCM beaming= stem->get_property ("beaming");
-  Slice le = int_list_to_slice (ly_car (beaming));
-  Slice ri = int_list_to_slice (ly_cdr (beaming));
-  le.unite (ri);
-  return le;
+  Slice l = int_list_to_slice (gh_car (beaming));
+  Slice r = int_list_to_slice (gh_cdr (beaming));
+  l.unite (r);
+
+  return l;
 }
 
 
-/* FIXME:  Too many properties  */
-ADD_INTERFACE (Stem, "stem-interface",
-              "The stem represent the graphical stem.  "
-              "In addition, it internally connects note heads, beams and"
-              "tremolos. "
-              "Rests and whole notes have invisible stems.",
+/*
+  these are too many props.
+ */
+ADD_INTERFACE (Stem,"stem-interface",
+              "The stem represent the graphical  stem. "
+              "  In addition, it internally connects note heads, beams, tremolos. Rests "
+              " and whole notes have invisible stems."
+
+,
+              
               "tremolo-flag french-beaming "
               "avoid-note-head thickness "
               "stem-info beamed-lengths beamed-minimum-free-lengths "
@@ -872,11 +985,13 @@ ADD_INTERFACE (Stem, "stem-interface",
               "note-heads direction length flag-style "
               "no-stem-extend stroke-style");
 
+
+
 /****************************************************************/
 
 Stem_info::Stem_info ()
 {
-  ideal_y_ = shortest_y_ = 0;
+  ideal_y_ = shortest_y_ =0;
   dir_ = CENTER;
 }
 
index 0848c1afc3eac93e5161ff5ca7f60b576610d1c8..79ab518636e0b29bf2e4d2cc8c70ad35a8e95f8e 100644 (file)
@@ -13,7 +13,8 @@
   TODO: naming add/combine.
  */
 /*
-  UGH. Junk all mutators.
+  UMGH. junkme!
+  
  */
 LY_DEFINE (ly_stencil_set_extent_x, "ly:stencil-set-extent!",
           3, 0, 0, (SCM stil, SCM axis, SCM np),
@@ -28,9 +29,9 @@ LY_DEFINE (ly_stencil_set_extent_x, "ly:stencil-set-extent!",
                   "number pair");
 
   Interval iv = ly_scm2interval (np);
-  s->dim_[Axis (ly_scm2int (axis))] = iv;
+  s->dim_[Axis (gh_scm2int (axis))] = iv;
 
-  return SCM_UNSPECIFIED;
+  return SCM_UNDEFINED;
 }
 
 LY_DEFINE (ly_translate_stencil_axis, "ly:stencil-translate-axis",
@@ -39,12 +40,12 @@ LY_DEFINE (ly_translate_stencil_axis, "ly:stencil-translate-axis",
 {
   Stencil *s = unsmob_stencil (stil);
   SCM_ASSERT_TYPE (s, stil, SCM_ARG1, __FUNCTION__, "stencil");
-  SCM_ASSERT_TYPE (ly_c_number_p (amount), amount, SCM_ARG2, __FUNCTION__, "number pair");
+  SCM_ASSERT_TYPE (gh_number_p (amount), amount, SCM_ARG2, __FUNCTION__, "number pair");
   SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
 
   SCM new_s = s->smobbed_copy ();
   Stencil *q = unsmob_stencil (new_s);
-  q->translate_axis (ly_scm2double (amount), Axis (ly_scm2int (axis)));
+  q->translate_axis (gh_scm2double (amount), Axis (gh_scm2int (axis)));
   return new_s;
 
 }
@@ -65,13 +66,13 @@ LY_DEFINE (ly_translate_stencil, "ly:stencil-translate",
   return new_s;
 }
 
-LY_DEFINE (ly_stencil_expr, "ly:stencil-expr",
+LY_DEFINE (ly_stencil_get_expr, "ly:stencil-get-expr",
           1, 0, 0, (SCM stil),
           "Return the expression of @var{stil}.")
 {
   Stencil *s = unsmob_stencil (stil);
   SCM_ASSERT_TYPE (s, stil, SCM_ARG1, __FUNCTION__, "stencil");
-  return s->expr ();
+  return s->get_expr ();
 }
 
 LY_DEFINE (ly_stencil_get_extent, "ly:stencil-extent",
@@ -83,7 +84,7 @@ LY_DEFINE (ly_stencil_get_extent, "ly:stencil-extent",
   SCM_ASSERT_TYPE (s, stil, SCM_ARG1, __FUNCTION__, "stencil");
   SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
 
-  return ly_interval2scm (s->extent (Axis (ly_scm2int (axis))));
+  return ly_interval2scm (s->extent (Axis (gh_scm2int (axis))));
 }
 
 LY_DEFINE (ly_stencil_moved_to_edge, "ly:stencil-moved-to-edge",
@@ -105,29 +106,29 @@ LY_DEFINE (ly_stencil_moved_to_edge, "ly:stencil-moved-to-edge",
   Real p = 0.0;
   if (padding != SCM_UNDEFINED)
     {
-      SCM_ASSERT_TYPE (ly_c_number_p (padding), padding, SCM_ARG5, __FUNCTION__, "number");
-      p = ly_scm2double (padding);
+      SCM_ASSERT_TYPE (gh_number_p (padding), padding, SCM_ARG5, __FUNCTION__, "number");
+      p = gh_scm2double (padding);
     }
   Real m = 0.0;
   if (minimum != SCM_UNDEFINED)
     {
-      SCM_ASSERT_TYPE (ly_c_number_p (minimum), minimum, SCM_ARG6, __FUNCTION__, "number");
-      m = ly_scm2double (minimum);
+      SCM_ASSERT_TYPE (gh_number_p (minimum), minimum, SCM_ARG6, __FUNCTION__, "number");
+      m = gh_scm2double (minimum);
     }
 
   if (s1)
     first_stencil = *s1;
 
   if (s2)
-    return first_stencil.moved_to_edge (Axis (ly_scm2int (axis)),
-                                       Direction (ly_scm2int (direction)),
+    return first_stencil.moved_to_edge (Axis (gh_scm2int (axis)),
+                                       Direction (gh_scm2int (direction)),
                                        *s2, p, m).smobbed_copy ();
   else
     return Stencil().smobbed_copy ();
 }
 
 
-
+  
 LY_DEFINE (ly_stencil_combine_at_edge, "ly:stencil-combine-at-edge",
           4, 2, 0,  (SCM first, SCM axis, SCM direction,
                      SCM second,
@@ -138,39 +139,33 @@ LY_DEFINE (ly_stencil_combine_at_edge, "ly:stencil-combine-at-edge",
           "@var{direction} can be -1 (left or down) or 1 (right or up). "
           "The stencils are juxtaposed with  @var{padding} as extra space. "
           "If this puts the reference points closer than @var{minimum}, "
-          "they are moved by the latter amount."
-          "@var{first} and @var{second} may also be '() or #f.")
+          "they are moved by the latter amount.")
 {
   Stencil *s1 = unsmob_stencil (first);
   Stencil *s2 = unsmob_stencil (second);
   Stencil result;
 
-  SCM_ASSERT_TYPE (s1 || first == SCM_BOOL_F || first  == SCM_EOL,
-                  first, SCM_ARG1, __FUNCTION__, "Stencil, #f or ()");
-  SCM_ASSERT_TYPE (s2 || second == SCM_BOOL_F || second  == SCM_EOL,
-                  second, SCM_ARG4, __FUNCTION__, "Stencil, #f or ()");
-  SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
-  SCM_ASSERT_TYPE (is_direction (direction), direction, SCM_ARG3, __FUNCTION__, "dir");
+  SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG3, __FUNCTION__, "axis");
+  SCM_ASSERT_TYPE (is_direction (direction), direction, SCM_ARG4, __FUNCTION__, "dir");
 
   Real p = 0.0;
   if (padding != SCM_UNDEFINED)
     {
-      SCM_ASSERT_TYPE (ly_c_number_p (padding), padding, SCM_ARG5, __FUNCTION__, "number");
-      p = ly_scm2double (padding);
+      SCM_ASSERT_TYPE (gh_number_p (padding), padding, SCM_ARG5, __FUNCTION__, "number");
+      p = gh_scm2double (padding);
     }
   Real m = 0.0;
   if (minimum != SCM_UNDEFINED)
     {
-      SCM_ASSERT_TYPE (ly_c_number_p (minimum), minimum, SCM_ARG6, __FUNCTION__, "number");
-      m = ly_scm2double (minimum);
+      SCM_ASSERT_TYPE (gh_number_p (minimum), minimum, SCM_ARG6, __FUNCTION__, "number");
+      m = gh_scm2double (minimum);
     }
 
   if (s1)
     result = *s1;
-  
   if (s2)
-    result.add_at_edge (Axis (ly_scm2int (axis)),
-                       Direction (ly_scm2int (direction)), *s2, p, m);
+    result.add_at_edge (Axis (gh_scm2int (axis)),
+                       Direction (gh_scm2int (direction)), *s2, p, m);
 
   return result.smobbed_copy ();
 }
@@ -186,12 +181,12 @@ LY_DEFINE (ly_stencil_add , "ly:stencil-add",
 
   while (!SCM_NULLP (args))
     {
-      Stencil *s = unsmob_stencil (ly_car (args));
+      Stencil *s = unsmob_stencil (gh_car (args));
       if (!s)
-       SCM_ASSERT_TYPE (s, ly_car (args), SCM_ARGn, __FUNCTION__, "Stencil");
+       SCM_ASSERT_TYPE (s, gh_car (args), SCM_ARGn, __FUNCTION__, "Stencil");
 
       result.add_stencil (*s);
-      args = ly_cdr (args);
+      args = gh_cdr (args);
     }
 
   return result.smobbed_copy ();
@@ -215,8 +210,27 @@ LY_DEFINE (ly_make_stencil, "ly:make-stencil",
   return s.smobbed_copy ();
 }
 
+SCM
+fontify_atom (Font_metric const *met, SCM f)
+{
+  if (f == SCM_EOL)
+    return f;
+  else
+    return  scm_list_n (ly_symbol2scm ("fontify"),
+                       ly_quote_scm (met->description_), f, SCM_UNDEFINED);
+}
+
+LY_DEFINE (ly_fontify_atom,"ly:fontify-atom",
+          2, 0, 0, (SCM met, SCM f),
+          "Add a font selection command for the font metric @var{met} "
+          "to @var{f}.")
+{
+  SCM_ASSERT_TYPE (unsmob_metrics (met), met, SCM_ARG1, __FUNCTION__, "font metric");
+
+  return fontify_atom (unsmob_metrics (met), f);
+}
 
-LY_DEFINE (ly_stencil_align_to_x, "ly:stencil-align-to!",
+LY_DEFINE (ly_align_to_x, "ly:stencil-align-to!",
           3, 0, 0, (SCM stil, SCM axis, SCM dir),
           "Align @var{stil} using its own extents. "
           "@var{dir} is a number -1, 1 are left and right respectively. "
@@ -224,9 +238,9 @@ LY_DEFINE (ly_stencil_align_to_x, "ly:stencil-align-to!",
 {
   SCM_ASSERT_TYPE (unsmob_stencil (stil), stil, SCM_ARG1, __FUNCTION__, "stencil");
   SCM_ASSERT_TYPE (is_axis (axis), axis, SCM_ARG2, __FUNCTION__, "axis");
-  SCM_ASSERT_TYPE (ly_c_number_p (dir), dir, SCM_ARG3, __FUNCTION__, "number");
+  SCM_ASSERT_TYPE (gh_number_p (dir), dir, SCM_ARG3, __FUNCTION__, "number");
 
-  unsmob_stencil (stil)->align_to ((Axis)ly_scm2int (axis),
-                                  ly_scm2double (dir));
-  return stil;
+  unsmob_stencil (stil)->align_to ((Axis)gh_scm2int (axis),
+                                  gh_scm2double (dir));
+  return SCM_UNDEFINED;
 }
index 3d7420efacbd39287a40ef222540a9fe52ff57f6..fade2d75ea0d55a86cd2c35677e3fa71dc586d1e 100644 (file)
@@ -9,7 +9,6 @@
 #include <math.h>
 #include <libc-extension.hh>   // isinf
 
-#include "input-smob.hh"
 #include "font-metric.hh" 
 #include "dimensions.hh"
 #include "interval.hh"
 
 #include "ly-smobs.icc"
 
-Stencil::Stencil ()
-{
-  expr_ = SCM_EOL;
-  set_empty (true);
-}
-
-Stencil::Stencil (Box b, SCM func)
-{
-  expr_ = func;
-  dim_ = b;
-}
-
-int
-Stencil::print_smob (SCM, SCM port, scm_print_state *)
-{
-  scm_puts ("#<Stencil ", port);
-  scm_puts (" >", port);
-  return 1;
-}
 
-SCM
-Stencil::mark_smob (SCM smob)
+Offset
+Stencil::origin () const
 {
-  Stencil *s = (Stencil*) ly_cdr (smob);
-  return s->expr_;
+  return origin_;
 }
 
-IMPLEMENT_SIMPLE_SMOBS (Stencil);
-IMPLEMENT_TYPE_P (Stencil, "ly:stencil?");
-IMPLEMENT_DEFAULT_EQUAL_P (Stencil);
-
 Interval
 Stencil::extent (Axis a) const
 {
   return dim_[a];
 }
 
-/* Hmm... maybe this is not such a good idea ; stuff can be empty,
-   while expr_ == '()  */
-bool
-Stencil::is_empty () const
-{
-  return expr_ == SCM_EOL;
-}
-
-SCM
-Stencil::expr () const
+Stencil::Stencil (Box b, SCM func)
 {
-  return expr_;
+  expr_ = func;
+  dim_ = b;
 }
 
-Box
-Stencil::extent_box () const
-{
-  return dim_;
-}
-Offset
-Stencil::origin () const
+Stencil::Stencil ()
 {
-  return origin_;
+  expr_ = SCM_EOL;
+  set_empty (true);
 }
 
 void
@@ -115,12 +77,11 @@ Stencil::translate_axis (Real x, Axis a)
 void
 Stencil::add_stencil (Stencil const &s)
 {
-  expr_ = scm_list_3 (ly_symbol2scm ("combine-stencil"), s.expr_, expr_);
+  expr_ = scm_list_n (ly_symbol2scm ("combine-stencil"),
+                     s.expr_, expr_, SCM_UNDEFINED);
   dim_.unite (s.dim_);
 }
 
-
-
 void
 Stencil::set_empty (bool e)
 {
@@ -140,184 +101,87 @@ void
 Stencil::align_to (Axis a, Real x)
 {
   if (is_empty ())
-    return;
+    return ;
 
   Interval i (extent (a));
   translate_axis (-i.linear_combination (x), a);
 }
 
-/* FIXME: unintuitive naming, you would expect *this to be moved.
-   Kept (keeping?) API for compat with add_at_edge ().
-
-   What is PADDING, what is MINIMUM, exactly?  */
+/*
+  TODO: unintuitive naming, you would expect *this to be moved.  Kept
+  API for compat with add_at_edge ().
+*/
 Stencil
-Stencil::moved_to_edge (Axis a, Direction d, Stencil const &s,
-                       Real padding, Real minimum) const
+Stencil::moved_to_edge (Axis a, Direction d, Stencil const &s, Real padding,
+                       Real minimum) const
 {
-  Interval my_extent = dim_[a];
+  Real my_extent= is_empty () ? 0.0 : dim_[a][d];
   Interval i (s.extent (a));
   Real his_extent;
   if (i.is_empty ())
     {
-      programming_error ("Stencil::moved_to_edge: adding empty stencil.");
+      programming_error ("Stencil::move_to_edge: adding empty stencil.");
       his_extent = 0.0;
     }
   else
     his_extent = i[-d];
 
-  Real offset = (my_extent.is_empty () ? 0.0 : my_extent[d] - his_extent)
-    + d * padding;
+  Real offset = (my_extent -  his_extent) + d * padding;
 
   Stencil toadd (s);
   toadd.translate_axis (offset,a);
 
-  if (minimum > 0 && d * (-origin ()[a] + toadd.origin ()[a]) < minimum)
+  if (minimum > 0
+      && d *(- origin ()[a] + toadd.origin ()[a]) < minimum)
     toadd.translate_axis ( -toadd.origin ()[a]
-                          + origin ()[a] + d * minimum, a);
-
+                          + origin ()[a] + d* minimum, a);
+    
   return toadd;
 }
 
 /*  See scheme Function.  */
 void
 Stencil::add_at_edge (Axis a, Direction d, Stencil const &s, Real padding,
-                     Real minimum)
+                      Real minimum)
 {
-  add_stencil (moved_to_edge (a, d, s, padding, minimum));
-}
-
-
-/****************************************************************/
-
-
-void
-interpret_stencil_expression (SCM expr,
-                             void (*func) (void*, SCM),
-                             void *func_arg,
-                             Offset o)
-{
-  while (1)
-    {
-      if (!ly_c_pair_p (expr))
-        return;
-
-      SCM head =ly_car (expr);
-      if (unsmob_input (head))
-        {
-          Input *ip = unsmob_input (head);
-          (*func) (func_arg,
-                  scm_list_4 (ly_symbol2scm ("define-origin"),
-                              scm_makfrom0str (ip->file_string ()
-                                               .to_str0 ()),
-                              scm_int2num (ip->line_number ()),
-                              scm_int2num (ip->column_number ())));
-          expr = ly_cadr (expr);
-        }
-      else  if (head ==  ly_symbol2scm ("no-origin"))
-        {
-          (*func) (func_arg, scm_list_1 (head));
-          expr = ly_cadr (expr);
-        }
-      else if (head == ly_symbol2scm ("translate-stencil"))
-        {
-          o += ly_scm2offset (ly_cadr (expr));
-          expr = ly_caddr (expr);
-        }
-      else if (head == ly_symbol2scm ("combine-stencil"))
-        {
-          for (SCM x = ly_cdr (expr); ly_c_pair_p (x); x = ly_cdr (x))
-           interpret_stencil_expression (ly_car (x), func, func_arg, o);
-          return;
-        }
-      else
-        {
-          (*func) (func_arg, 
-                   scm_list_4 (ly_symbol2scm ("placebox"),
-                               scm_make_real (o[X_AXIS]),
-                               scm_make_real (o[Y_AXIS]),
-                               expr));
-           return;
-        }
-    }
+  add_stencil (moved_to_edge (a,d,s,padding, minimum));
 }
 
-
-struct Font_list
-{
-  SCM fonts_;
-};
-
-static void
-find_font_function (void *fs, SCM x)
+/* Hmm... maybe this is not such a good idea ; stuff can be empty,
+   while expr_ == '()  */
+bool
+Stencil::is_empty () const
 {
-  Font_list *me = (Font_list*) fs;
-
-  if (ly_car (x) == ly_symbol2scm ("placebox"))
-    {
-      SCM args = ly_cdr (x); 
-      SCM what = ly_caddr (args);
-
-      if (ly_c_pair_p (what))
-        {
-          SCM head = ly_car (what);
-          if (ly_symbol2scm ("text") == head)
-            me->fonts_ = scm_cons (ly_cadr (what), me->fonts_);
-          else if (head == ly_symbol2scm ("char"))
-            me->fonts_ = scm_cons (ly_cadr (what), me->fonts_);
-        }
-    }
+  return expr_ == SCM_EOL;
 }
 
 SCM
-find_expression_fonts (SCM expr)
+Stencil::get_expr () const
 {
-  Font_list fl;
-  
-  fl.fonts_ = SCM_EOL;
-  
-  interpret_stencil_expression (expr, &find_font_function, 
-                               (void*) &fl, Offset (0,0));
-
-  return fl.fonts_;
+  return expr_;
 }
 
-
-LY_DEFINE (ly_stencil_fonts, "ly:stencil-fonts",
-          1, 0, 0, (SCM s),
-         " Analyse @var{s}, and return a list of fonts used in @var{s}.")
+Box
+Stencil::extent_box () const
 {
-  Stencil *stil = unsmob_stencil (s);
-  SCM_ASSERT_TYPE (stil, s, SCM_ARG1, __FUNCTION__, "Stencil");
-  return find_expression_fonts (stil->expr ());
+  return dim_;
 }
 
-struct Stencil_interpret_arguments
-{
-  SCM func;
-  SCM arg1;
-};
-
-void stencil_interpret_in_scm (void *p, SCM expr)
+int
+Stencil::print_smob (SCM , SCM port, scm_print_state *)
 {
-  Stencil_interpret_arguments *ap = (Stencil_interpret_arguments*) p;
-  scm_call_2 (ap->func, ap->arg1, expr);
+  scm_puts ("#<Stencil ", port);
+  scm_puts (" >", port);
+  return 1;
 }
 
-
-
-LY_DEFINE (ly_interpret_stencil_expression, "ly:interpret-stencil-expression",
-           4, 0, 0, (SCM expr, SCM func, SCM arg1, SCM offset),
-           "Parse EXPR, feed bits to FUNC with first arg ARG1")
+SCM
+Stencil::mark_smob (SCM s)
 {
-  SCM_ASSERT_TYPE (ly_c_procedure_p(func), func, SCM_ARG1, __FUNCTION__,
-                  "procedure");
-
-  Stencil_interpret_arguments a;
-  a.func = func;
-  a.arg1 = arg1;
-  Offset o = ly_scm2offset (offset);
-
-  interpret_stencil_expression (expr, stencil_interpret_in_scm, (void*) &a, o);
-
-  return SCM_UNSPECIFIED;
+  Stencil  *r = (Stencil *) ly_cdr (s);
+  return r->expr_;
 }
+
+IMPLEMENT_SIMPLE_SMOBS (Stencil);
+IMPLEMENT_TYPE_P (Stencil, "ly:stencil?");
+IMPLEMENT_DEFAULT_EQUAL_P (Stencil);
index f57ba09a9eb8568bbcc48898a7805cb448d2a11b..dee7a88bc3e029701dd49f0dedcc202e73676c79 100644 (file)
@@ -42,7 +42,7 @@ Sustain_pedal::print (SCM smob)
   
   Stencil mol;
   SCM glyph = e->get_property ("text");
-  if (!ly_c_string_p (glyph))
+  if (!gh_string_p (glyph))
     return mol.smobbed_copy ();
   
   String text = ly_scm2string (glyph);
index 719a5ed17d0a8cb8c91097fa49c65af8cc173650..67964f6f492db0672196188cbfa9d0c3d2818942 100644 (file)
@@ -12,7 +12,7 @@
 #include "staff-symbol.hh"
 #include "group-interface.hh"
 #include "paper-column.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "spanner.hh"
 
 class System_start_delimiter_engraver : public Engraver
@@ -48,15 +48,15 @@ System_start_delimiter_engraver::acknowledge_grob (Grob_info inf)
       /*
        UGH UGH
        */
-      if (ly_c_string_p (gl) && ly_c_equal_p (gl, scm_makfrom0str  ("brace"))
-         && ly_c_string_p (my_gl) && ly_c_equal_p (my_gl, scm_makfrom0str  ("bracket")))
+      if (gh_string_p (gl) && gh_equal_p (gl, scm_makfrom0str  ("brace"))
+         && gh_string_p (my_gl) && gh_equal_p (my_gl, scm_makfrom0str  ("bracket")))
        inf.grob_->translate_axis (-0.8, X_AXIS); // ugh
-      else if (ly_c_string_p (gl) && ly_c_equal_p (gl, scm_makfrom0str  ("bracket"))
-              && ly_c_string_p (my_gl) && ly_c_equal_p (my_gl, scm_makfrom0str  ("bracket")))
+      else if (gh_string_p (gl) && gh_equal_p (gl, scm_makfrom0str  ("bracket"))
+              && gh_string_p (my_gl) && gh_equal_p (my_gl, scm_makfrom0str  ("bracket")))
        {
          inf.grob_->translate_axis ( -0.8, X_AXIS); // ugh
          inf.grob_->set_property ("arch-height",
-                                      scm_make_real (ly_scm2double (inf.grob_->get_property
+                                      gh_double2scm (gh_scm2double (inf.grob_->get_property
                                        ("arch-height"))+0.5));
        }
     }
@@ -73,10 +73,10 @@ System_start_delimiter_engraver::process_music ()
   if (!delim_)
     {
       SCM delim_name =get_property ("systemStartDelimiter");
-      delim_ = make_spanner_from_properties (this, delim_name, SCM_EOL);
+      delim_ = make_spanner_from_properties (daddy_context_, delim_name);
 
       delim_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn")));
-      
+      announce_grob (delim_, SCM_EOL);
     }
 }
 void
@@ -85,7 +85,7 @@ System_start_delimiter_engraver::finalize ()
   if (delim_)
     {
       delim_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn")));
-      
+      typeset_grob (delim_);
     }
 }
 
index 4977fa0ddce6ca27dc5ced3a3aefe75a04d1e5f4..e61fa4e71829a5179f67ce08e56e1f0643f149c2 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "axis-group-interface.hh"
 #include "system-start-delimiter.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "stencil.hh"
 #include "font-interface.hh"
 #include "all-font-metrics.hh"
 Stencil
 System_start_delimiter::staff_bracket (Grob*me,Real height)  
 {
-  Real arc_height = ly_scm2double (me->get_property ("arch-height")) ;
+  Real arc_height = gh_scm2double (me->get_property ("arch-height")) ;
   
   SCM at = scm_list_n (ly_symbol2scm ("bracket"),
                    me->get_property ("arch-angle"),
                    me->get_property ("arch-width"),
-                   scm_make_real (arc_height),
-                   scm_make_real (height),
+                   gh_double2scm (arc_height),
+                   gh_double2scm (height),
                    me->get_property ("arch-thick"),
                    me->get_property ("thickness"),
                    SCM_UNDEFINED);
@@ -62,7 +62,7 @@ Will not fix it since I'm not sure.
 Stencil
 System_start_delimiter::simple_bar (Grob*me,Real h) 
 {
-  Real lt =me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness")) ;
+  Real lt =me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")) ;
   Real w = lt * robust_scm2double (me->get_property ("thickness"), 1);
   return Lookup::round_filled_box (Box (Interval (0,w), Interval (-h/2, h/2)),
                                   lt);
@@ -75,7 +75,7 @@ System_start_delimiter::after_line_breaking (SCM smob)
 {
   Grob * me = unsmob_grob (smob);
   SCM   gl = me->get_property ("glyph");
-  if (ly_c_equal_p (gl,scm_makfrom0str ("bar-line")))
+  if (gh_equal_p (gl,scm_makfrom0str ("bar-line")))
     {
       int count = 0;
 
@@ -84,9 +84,9 @@ System_start_delimiter::after_line_breaking (SCM smob)
       */
       SCM elts = me->get_property ("elements");
       Grob *common = common_refpoint_of_list (elts, me, Y_AXIS);
-      for (SCM s = elts; ly_c_pair_p (s); s = ly_cdr (s))
+      for (SCM s = elts; gh_pair_p (s); s = gh_cdr (s))
        {
-         Interval v = unsmob_grob (ly_car (s))->extent (common, Y_AXIS);
+         Interval v = unsmob_grob (gh_car (s))->extent (common, Y_AXIS);
 
          if (!v.is_empty ())
            count ++;
@@ -109,13 +109,13 @@ System_start_delimiter::print (SCM smob)
   Grob * me = unsmob_grob (smob);
 
   SCM s = me->get_property ("glyph");
-  if (!ly_c_string_p (s))
+  if (!gh_string_p (s))
     return SCM_EOL;
   SCM gsym = scm_string_to_symbol (s) ;
   
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   Interval ext = ly_scm2interval (Axis_group_interface::group_extent_callback
- (me->self_scm (), scm_int2num (Y_AXIS)));
+ (me->self_scm (), gh_int2scm (Y_AXIS)));
   Real l = ext.length () / staff_space;
   
   if (ext.is_empty ()
@@ -147,7 +147,7 @@ System_start_delimiter::staff_brace (Grob*me, Real y)
      name.  This is better than using find_font directly,
      esp. because that triggers mktextfm for non-existent
      fonts. */
-  SCM fam = scm_cons (ly_symbol2scm ("font-encoding"), ly_symbol2scm ("fetaBraces"));
+  SCM fam = gh_cons (ly_symbol2scm ("font-encoding"), ly_symbol2scm ("braces"));
   
   SCM alist = scm_list_n (fam, SCM_UNDEFINED);
   fm = select_font (me->get_paper (), scm_list_n (alist, SCM_UNDEFINED));
@@ -169,13 +169,12 @@ System_start_delimiter::staff_brace (Grob*me, Real y)
        lo = cmp;
     }
   while (hi - lo > 1);
+      
+  Stencil m (fm->get_indexed_char_stencil (lo)); // ugh.  ascii?
+  b=m.extent_box ();
+  b[X_AXIS] = Interval (0,0);
 
-  /* FIXME: ascii? */
-  Stencil stil (fm->get_indexed_char_stencil (lo));
-  b = stil.extent_box ();
-  b[X_AXIS] = Interval (0, 0);
-
-  return Stencil (b, stil.expr ());
+  return Stencil (b, m.get_expr ());
 }
   
 
index 0d2ce87b9ddbf9996721207b37373f307d7118dc..94d77d48d34d6cb8a332f66b1087453ab6d4e05d 100644 (file)
@@ -6,14 +6,12 @@
   (c) 1996--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#include <math.h>
-
 #include "axis-group-interface.hh"
 #include "warn.hh"
 #include "system.hh"
 #include "main.hh"
 #include "paper-column.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "paper-outputter.hh"
 #include "paper-score.hh"
 #include "string.hh"
@@ -23,7 +21,7 @@
 #include "spacing-interface.hh"
 #include "staff-symbol-referencer.hh"
 #include "paper-book.hh"
-#include "paper-system.hh"
+#include "paper-line.hh"
 
 System::System (SCM s)
   : Spanner (s)
@@ -40,31 +38,81 @@ System::element_count () const
 int
 System::spanner_count () const
 {
-  int k = 0;
-  for (SCM s = get_property ("all-elements"); ly_c_pair_p (s); s = ly_cdr (s))
-    if (dynamic_cast<Spanner*> (unsmob_grob (ly_car (s))))
-      k++;
+  int k =0;
+  for (SCM s = get_property ("all-elements");
+       gh_pair_p (s); s = ly_cdr (s))
+    {
+      if (dynamic_cast<Spanner*> (unsmob_grob (gh_car (s))))
+       k++;
+    }
+
   return k;
 }
+  
+
+int
+scm_default_compare (const void * a, const void *b)
+{
+  SCM pa = *(SCM *)a;
+  SCM pb = *(SCM *)b;
+
+  if (pa < pb)
+    return -1;
+  else if (pa > pb)
+    return 1;
+  else
+    return 0;
+}
+
+/*
+  modify L in place: sort it 
+*/
+SCM
+uniquify_list (SCM l)
+{
+  int len = scm_ilength (l);
+  SCM  * arr = new SCM[len];
+  int k = 0;
+  for (SCM s = l; SCM_NNULLP (s); s = SCM_CDR (s))
+    arr[k++] = SCM_CAR (s);
+
+  assert (k == len);
+  qsort (arr, len, sizeof (SCM), &scm_default_compare);
+
+  k = 0;
+  SCM *tail = &l;
+  
+  for (int i = 0; i < len ; i++)
+    {
+      if (i && arr[i] == arr[i-1])
+       continue;
+
+      SCM_SETCAR (*tail, arr[i]);
+      tail = SCM_CDRLOC(*tail);
+    }
+
+  *tail = SCM_EOL;
+  delete[] arr;
+  
+  return l; 
+}
 
 void
 System::typeset_grob (Grob * elem)
 {
   if (elem->pscore_)
     programming_error ("Adding element twice.");
-  else
-    {
-      elem->pscore_ = pscore_;
-      Pointer_group_interface::add_grob (this, ly_symbol2scm ("all-elements"), elem);
-      scm_gc_unprotect_object (elem->self_scm ());
-    }
+  
+  elem->pscore_ = pscore_;
+  Pointer_group_interface::add_grob (this, ly_symbol2scm ("all-elements"), elem);
+  scm_gc_unprotect_object (elem->self_scm ());
 }
 
 // todo: use map.
 static void
 fixup_refpoints (SCM s)
 {
-  for (; ly_c_pair_p (s); s = ly_cdr (s))
+  for (; gh_pair_p (s); s = ly_cdr (s))
     {
       Grob::fixup_refpoint (ly_car (s));
     }
@@ -73,7 +121,7 @@ fixup_refpoints (SCM s)
 SCM
 System::get_lines ()
 {
-  for (SCM s = get_property ("all-elements"); ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
     {
       Grob *g = unsmob_grob (ly_car (s));
       if (g->internal_has_interface (ly_symbol2scm ("only-prebreak-interface")))
@@ -89,7 +137,7 @@ System::get_lines ()
            }
          g->suicide ();
        }
-      else if (g->is_live ())
+      else if (g->live ())
        g->do_break_processing ();
     }
 
@@ -101,7 +149,7 @@ System::get_lines ()
     {
       Grob *se = broken_intos_[i];
       SCM all = se->get_property ("all-elements");
-      for (SCM s = all; ly_c_pair_p (s); s = ly_cdr (s))
+      for (SCM s = all; gh_pair_p (s); s = ly_cdr (s))
        fixup_refpoint (ly_car (s));
       count += scm_ilength (all);
     }
@@ -111,7 +159,7 @@ System::get_lines ()
    */
   fixup_refpoints (get_property ("all-elements"));
 
-  for (SCM s = get_property ("all-elements"); ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
     unsmob_grob (ly_car (s))->handle_broken_dependencies ();
   handle_broken_dependencies ();
 
@@ -120,12 +168,12 @@ System::get_lines ()
   /* Because the this->get_property (all-elements) contains items in 3
      versions, handle_broken_dependencies () will leave duplicated
      items in all-elements.  Strictly speaking this is harmless, but
-     it leads to duplicated symbols in the output.  ly_list_qsort_uniq_x ()
+     it leads to duplicated symbols in the output.  uniquify_list ()
      makes sure that no duplicates are in the list.  */
   for (int i = 0; i < line_count; i++)
     {
       SCM all = broken_intos_[i]->get_property ("all-elements");
-      all = ly_list_qsort_uniq_x(all); 
+      all = uniquify_list (all); 
     }
 #endif
   
@@ -133,9 +181,9 @@ System::get_lines ()
     progress_indication (_f ("Element count %d.",  count + element_count ()));
 
   int line_count = broken_intos_.size ();
-  SCM lines = scm_c_make_vector (line_count, SCM_EOL);
+  SCM lines = scm_c_make_vector (line_count, SCM_UNDEFINED);
   
-  for (int i = 0; i < line_count; i++)
+   for (int i = 0; i < line_count; i++)
     {
       if (verbose_global_b)
        progress_indication ("[");
@@ -147,16 +195,19 @@ System::get_lines ()
       if (verbose_global_b)
        progress_indication (to_string (i) + "]");
     }
-  return lines;
+   return lines;
 }
 
-/* Find the loose columns in POSNS, and drape them around the columns
-   specified in BETWEEN-COLS.  */
-static void
+
+
+
+/*
+  Find the loose columns in POSNS, and drape them around the columns
+  specified in BETWEEN-COLS.  */
+void
 set_loose_columns (System* which, Column_x_positions const *posns)
 {
-  int loose_col_count = posns->loose_cols_.size ();
-  for (int i = 0; i < loose_col_count; i++)
+  for (int i = 0; i < posns->loose_cols_.size (); i++)
     {
       int divide_over = 1;
       Item *loose = dynamic_cast<Item*> (posns->loose_cols_[i]);
@@ -165,60 +216,73 @@ set_loose_columns (System* which, Column_x_positions const *posns)
       if (col->system_)
        continue;
       
-      Item *left = 0;
-      Item *right = 0;
-      while (1)
+      Item * left = 0;
+      Item * right = 0;
+      do
        {
          SCM between = loose->get_property ("between-cols");
-         if (!ly_c_pair_p (between))
+         if (!gh_pair_p (between))
            break;
 
-         Item *le = dynamic_cast<Item*> (unsmob_grob (ly_car (between)));
-         Item *re = dynamic_cast<Item*> (unsmob_grob (ly_cdr (between)));
 
-         if (!(le && re))
-           break;
+         Item * l=dynamic_cast<Item*> (unsmob_grob (ly_car (between)));
+         Item * r=dynamic_cast<Item*> (unsmob_grob (ly_cdr (between)));
+
+         if (!(l && r))
+           break ;
          
-         if (!left && le)
+         if (!left && l)
            {
-             left = le->get_column ();
+             left = l->get_column ();
              if (!left->get_system ())
                left = left->find_prebroken_piece (RIGHT);
            }
 
-         divide_over++;
-         loose = right = re->get_column ();
+         divide_over ++;
+         loose = right = r->get_column ();
        }
+      while (1);
 
       if (!right->get_system ())
        right = right->find_prebroken_piece (LEFT);
       
-      /* Divide the remaining space of the column over the left and
-       right side.  At the moment,  FIXME  */
-      Grob *common = right->common_refpoint (left, X_AXIS);
+      /*
+       We divide the remaining space of the column over the left and
+       right side. At the moment, we  
+       
+      */
+      Grob * common = right->common_refpoint (left, X_AXIS);
       
       Real rx =        right->extent (common, X_AXIS)[LEFT];
       Real lx = left->extent (common, X_AXIS)[RIGHT];
       Real total_dx = rx - lx;
       Interval cval =col->extent (col, X_AXIS);
 
-      /* Put it in the middle.  This is not an ideal solution -- the
-        break alignment code inserts a fixed space before the clef
-        (about 1 SS), while the space following the clef is flexible.
-        In tight situations, the clef will almost be on top of the
-        following note.  */
-      Real dx = rx - lx - cval.length ();
+      /*
+       
+       We put it in the middle. This is not an ideal solution -- the
+       break alignment code inserts a fixed space before the clef
+       (about 1 SS), while the space following the clef is
+       flexible. In tight situations, the clef will almost be on top
+       of the following note. 
+       
+      */
+      Real dx = rx-lx - cval.length ();
       if (total_dx < 2* cval.length ())
        {
-         /* TODO: this is discontinuous. I'm too tired to
-           invent a sliding mechanism.  Duh. */
+         /*
+           todo: this is discontinuous. I'm too tired to
+           invent a sliding mechanism. Duh.
+
+           TODO.
+          */
          dx *= 0.25;
        }
       else
        dx *= 0.5;
 
       col->system_ = which;
-      col->translate_axis (-col->relative_coordinate (common, X_AXIS), X_AXIS);
+      col->translate_axis (- col->relative_coordinate (common, X_AXIS), X_AXIS);
       col->translate_axis (lx + dx - cval[LEFT], X_AXIS); 
     }
 }
@@ -227,7 +291,7 @@ set_loose_columns (System* which, Column_x_positions const *posns)
 void
 System::break_into_pieces (Array<Column_x_positions> const &breaking)
 {
-  for (int i = 0; i < breaking.size (); i++)
+  for (int i=0; i < breaking.size (); i++)
     {
       System *system = dynamic_cast <System*> (clone ());
       system->rank_ = i;
@@ -237,9 +301,9 @@ System::break_into_pieces (Array<Column_x_positions> const &breaking)
       
       system->set_bound (LEFT,c[0]);
       system->set_bound (RIGHT,c.top ());
-      for (int j = 0; j < c.size (); j++)
+      for (int j=0; j < c.size (); j++)
        {
-         c[j]->translate_axis (breaking[i].config_[j], X_AXIS);
+         c[j]->translate_axis (breaking[i].config_[j],X_AXIS);
          dynamic_cast<Paper_column*> (c[j])->system_ = system;
        }
       set_loose_columns (system, &breaking[i]);
@@ -252,11 +316,11 @@ System::add_column (Paper_column*p)
 {
   Grob *me = this;
   SCM cs = me->get_property ("columns");
-  Grob *prev =  ly_c_pair_p (cs) ? unsmob_grob (ly_car (cs)) : 0;
+  Grob * prev =  gh_pair_p (cs) ? unsmob_grob (ly_car (cs)) : 0;
 
   p->rank_ = prev ? Paper_column::get_rank (prev) + 1 : 0; 
 
-  me->set_property ("columns", scm_cons (p->self_scm (), cs));
+  me->set_property ("columns",  gh_cons (p->self_scm (), cs));
 
   Axis_group_interface::add_element (me, p);
 }
@@ -264,39 +328,38 @@ System::add_column (Paper_column*p)
 void
 System::pre_processing ()
 {
-  for (SCM s = get_property ("all-elements"); ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
     unsmob_grob (ly_car (s))->discretionary_processing ();
 
   if (verbose_global_b)
-    progress_indication (_f ("Grob count %d", element_count ()));
+    progress_indication (_f ("Grob count %d",  element_count ()));
+
   
-  for (SCM s = get_property ("all-elements"); ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
     unsmob_grob (ly_car (s))->handle_prebroken_dependencies ();
   
   fixup_refpoints (get_property ("all-elements"));
   
-  for (SCM s = get_property ("all-elements"); ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
     {
-      Grob *sc = unsmob_grob (ly_car (s));
+      Grobsc = unsmob_grob (ly_car (s));
       sc->calculate_dependencies (PRECALCED, PRECALCING, ly_symbol2scm ("before-line-breaking-callback"));
     }
   
-  progress_indication ("\n");
-  progress_indication (_ ("Calculating line breaks..."));
-  progress_indication (" ");
-  for (SCM s = get_property ("all-elements"); ly_c_pair_p (s); s = ly_cdr (s))
+  progress_indication ("\n" + _ ("Calculating line breaks...") + " ");
+  for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
     {
-      Grob *e = unsmob_grob (ly_car (s));
+      Grob * e = unsmob_grob (ly_car (s));
       SCM proc = e->get_property ("spacing-procedure");
-      if (ly_c_procedure_p (proc))
-       scm_call_1 (proc, e->self_scm ());
+      if (gh_procedure_p (proc))
+       gh_call1 (proc, e->self_scm ());
     }
 }
 
 void
 System::post_processing ()
 {
-  for (SCM s = get_property ("all-elements"); ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
     {
       Grob *g = unsmob_grob (ly_car (s));
       g->calculate_dependencies (POSTCALCED, POSTCALCING,
@@ -313,10 +376,10 @@ System::post_processing ()
      This might seem inefficient, but Stencils are cached per grob
      anyway. */
   SCM all = get_property ("all-elements");
-  all = ly_list_qsort_uniq_x (all);
+  all = uniquify_list (all);
 
   this->get_stencil ();
-  for (SCM s = all; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = all; gh_pair_p (s); s = ly_cdr (s))
     {
       Grob *g = unsmob_grob (ly_car (s));
       g->get_stencil ();
@@ -332,16 +395,16 @@ System::get_line ()
   if (Stencil *me = get_stencil ())
     stencils = scm_cons (me->smobbed_copy (), stencils);
 
-  /* Output stencils in three layers: 0, 1, 2.  Default layer: 1.
+  /* Output stencils in three layers: 0, 1, 2.  The default layer is
+     1.
 
-     Start with layer 3, since scm_cons prepends to list.  */
+     Start with layer 3, since  scm_cons prepends to list.
+     
+  */
   SCM all = get_property ("all-elements");
-
-  SCM exprs = SCM_EOL;
-  SCM *tail = &exprs;
-
+  
   for (int i = LAYER_COUNT; i--;)
-    for (SCM s = all; ly_c_pair_p (s); s = ly_cdr (s))
+    for (SCM s = all; gh_pair_p (s); s = ly_cdr (s))
       {
        Grob *g = unsmob_grob (ly_car (s));
        Stencil *stil = g->get_stencil ();
@@ -358,49 +421,51 @@ System::get_line ()
                                          Offset (0, 0))
          * Staff_symbol_referencer::staff_space (g);
 
-       /* Must copy the stencil, for we cannot change the stencil
-          cached in G.  */
-
-       Stencil st = *stil;
-       st.translate (o + extra);
-       *tail = scm_cons (st.expr (), SCM_EOL);
-       tail = SCM_CDRLOC(*tail);
-       
+       /*
+         must copy the stencil, for we cannot change the stencil
+         cached in G.
+       */
+       SCM my_stencil = stil->smobbed_copy ();
+       unsmob_stencil (my_stencil)->translate (o + extra);
+       stencils = scm_cons (my_stencil, stencils);
       }
 
-  
+  if (output_format_global != PAGE_LAYOUT)
+    {
+      SCM lastcol = ly_car (get_property ("columns"));
+      Grob *g = unsmob_grob (lastcol);
+      
+      SCM between = ly_symbol2scm ("between-system-string");
+      SCM inter = g->internal_get_property (between);
+      if (gh_string_p (inter))
+       stencils = scm_cons (scm_cons (between, inter), stencils);
+    }
 
   Interval x (extent (this, X_AXIS));
   Interval y (extent (this, Y_AXIS));
-  Stencil sys_stencil (Box (x,y),
-                      scm_cons (ly_symbol2scm ("combine-stencil"),
-                                exprs));
-  
-  Paper_system *pl = new Paper_system (sys_stencil, false);
+  Paper_line *pl = new Paper_line (Offset (x.length (), y.length ()),
+                                  stencils);
 
-  Item * break_point =this->get_bound(LEFT);
-  pl->penalty_ =
-    robust_scm2double (break_point->get_property ("page-penalty"), 0.0);
-  
-  return scm_gc_unprotect_object (pl->self_scm ());
+  scm_gc_unprotect_object (pl->self_scm ());
+  return pl->self_scm ();
 }
 
 Link_array<Item> 
-System::broken_col_range (Item const *left, Item const *right) const
+System::broken_col_range (Item const*l, Item const*r) const
 {
   Link_array<Item> ret;
 
-  left = left->get_column ();
-  right = right->get_column ();
+  l = l->get_column ();
+  r = r->get_column ();
   SCM s = get_property ("columns");
 
-  while (ly_c_pair_p (s) && ly_car (s) != right->self_scm ())
+  while (gh_pair_p (s) && ly_car (s) != r->self_scm ())
     s = ly_cdr (s);
 
-  if (ly_c_pair_p (s))
+  if (gh_pair_p (s))
     s = ly_cdr (s);
 
-  while (ly_c_pair_p (s) && ly_car (s) != left->self_scm ())
+  while (gh_pair_p (s) && ly_car (s) != l->self_scm ())
     {
       Paper_column*c = dynamic_cast<Paper_column*> (unsmob_grob (ly_car (s)));
       if (Item::is_breakable (c) && !c->system_)
@@ -413,25 +478,27 @@ System::broken_col_range (Item const *left, Item const *right) const
   return ret;
 }
 
-/** Return all columns, but filter out any unused columns , since they might
-    disrupt the spacing problem. */
+/**
+   Return all columns, but filter out any unused columns , since they might
+   disrupt the spacing problem.
+ */
 Link_array<Grob>
-System::columns () const
+System::columns ()const
 {
   Link_array<Grob> acs
     = Pointer_group_interface__extract_grobs (this, (Grob*) 0, "columns");
-  bool found = false;
-  for (int i = acs.size (); i--;)
+  bool bfound = false;
+  for (int i= acs.size (); i -- ;)
     {
       bool brb = Item::is_breakable (acs[i]);
-      found = found || brb;
+      bfound = bfound || brb;
 
       /*
        the last column should be breakable. Weed out any columns that
        seem empty. We need to retain breakable columns, in case
        someone forced a breakpoint.
       */
-      if (!found || !Paper_column::is_used (acs[i]))
+      if (!bfound || !Paper_column::is_used (acs[i]))
        acs.del (i);
     }
   return acs;
@@ -440,4 +507,4 @@ System::columns () const
 ADD_INTERFACE (System,"system-interface",
               "This is the toplevel object: each object in a score "
               "ultimately has a System object as its X and Y parent. ",
-              "all-elements columns")
+              "between-system-string all-elements columns")
index e4caf6835b14949d4710600a96262c9100253bc8..e091d633845e4f36d18f86dcf87aa3c8a218477d 100644 (file)
@@ -7,7 +7,7 @@
 #include <stdio.h>
 
 #include "rhythmic-head.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "event.hh"
 #include "dots.hh"
 #include "dot-column.hh"
@@ -70,20 +70,20 @@ Tab_note_heads_engraver::process_music ()
   for (int i=0; i < note_events_.size (); i++)
     {
       SCM stringTunings = get_property ("stringTunings");
-      int number_of_strings = ((int) ly_length (stringTunings));
+      int number_of_strings = ((int) gh_length (stringTunings));
       bool high_string_one = to_boolean (get_property ("highStringOne"));
 
+      Item * note  = make_item ("TabNoteHead");
       
       Music * event = note_events_[i];
-      Item * note  = make_item ("TabNoteHead", event->self_scm ());
 
       
       Music * tabstring_event=0;
 
       for (SCM s =event->get_property ("articulations");
-          !tabstring_event && ly_c_pair_p (s); s = ly_cdr (s))
+          !tabstring_event && gh_pair_p (s); s = gh_cdr (s))
        {
-         Music * art = unsmob_music (ly_car (s));
+         Music * art = unsmob_music (gh_car (s));
 
          if (art->is_mus_type ("string-number-event"))
            tabstring_event = art;
@@ -100,7 +100,7 @@ Tab_note_heads_engraver::process_music ()
       bool string_found;
       if (tabstring_event)
        {
-         tab_string = ly_scm2int (tabstring_event->get_property ("string-number"));
+         tab_string = gh_scm2int (tabstring_event->get_property ("string-number"));
          string_found = true;
        }
       else
@@ -111,19 +111,19 @@ Tab_note_heads_engraver::process_music ()
       
       Duration dur = *unsmob_duration (event->get_property ("duration"));
       note->set_property ("duration-log",
-                              scm_int2num (dur.duration_log ()));
+                              gh_int2scm (dur.duration_log ()));
 
       if (dur.dot_count ())
        {
-         Item * d = make_item ("Dots", event->self_scm ());
+         Item * d = make_item ("Dots");
          Rhythmic_head::set_dots (note, d);
          
          if (dur.dot_count ()
-             != ly_scm2int (d->get_property ("dot-count")))
-           d->set_property ("dot-count", scm_int2num (dur.dot_count ()));
+             != gh_scm2int (d->get_property ("dot-count")))
+           d->set_property ("dot-count", gh_int2scm (dur.dot_count ()));
 
          d->set_parent (note, Y_AXIS);
-         
+         announce_grob (d, SCM_EOL);
          dots_.push (d);
        }
       
@@ -131,19 +131,19 @@ Tab_note_heads_engraver::process_music ()
       SCM scm_pitch = event->get_property ("pitch");
       SCM proc      = get_property ("tablatureFormat");
       SCM min_fret_scm = get_property ("minimumFret");
-      int min_fret = ly_c_number_p (min_fret_scm) ? ly_scm2int (min_fret_scm) : 0;
+      int min_fret = gh_number_p (min_fret_scm) ? gh_scm2int (min_fret_scm) : 0;
 
       while (!string_found)
        {
          int fret = unsmob_pitch (scm_pitch)->semitone_pitch ()
-           - ly_scm2int (scm_list_ref (stringTunings,scm_int2num (tab_string-1)));
+           - gh_scm2int (gh_list_ref (stringTunings,gh_int2scm (tab_string-1)));
          if (fret<min_fret)
            tab_string += high_string_one ? 1 : -1;
          else
            string_found = true;
        }
 
-      SCM text = scm_call_3 (proc, scm_int2num (tab_string), stringTunings, scm_pitch);
+      SCM text = gh_call3 (proc, gh_int2scm (tab_string), stringTunings, scm_pitch);
 
       int pos = 2 * tab_string - number_of_strings - 1; // No tab-note between the string !!!
       if (to_boolean (get_property ("stringOneTopmost")))
@@ -151,7 +151,8 @@ Tab_note_heads_engraver::process_music ()
       
       note->set_property ("text", text);      
       
-      note->set_property ("staff-position", scm_int2num (pos));
+      note->set_property ("staff-position", gh_int2scm (pos));
+      announce_grob (note, event->self_scm ());
       notes_.push (note);
     }
 }
@@ -159,7 +160,17 @@ Tab_note_heads_engraver::process_music ()
 void
 Tab_note_heads_engraver::stop_translation_timestep ()
 {
+  for (int i=0; i < notes_.size (); i++)
+    {
+      typeset_grob (notes_[i]);
+    }
+
   notes_.clear ();
+  for (int i=0; i < dots_.size (); i++)
+    {
+      typeset_grob (dots_[i]);
+    }
+  
   dots_.clear ();
   note_events_.clear ();
   tabstring_events_.clear ();
index 2e5406bbed34d7ac2e956509692fb54fb30cf5c2..80821732e79920ae0b2a48618d45307e4707bae4 100644 (file)
@@ -47,7 +47,7 @@ Tempo_performer::create_audio_elements ()
       SCM met = tempo_req_->get_property ("metronome-count");
       Duration *d = unsmob_duration (tempo_req_->get_property ("tempo-unit"));
       
-      Rational r =  (d->get_length () / Moment (Rational (1, 4)) * Moment (ly_scm2int (met))).main_part_;
+      Rational r =  (d->get_length () / Moment (Rational (1, 4)) * Moment (gh_scm2int (met))).main_part_;
       
       audio_ = new Audio_tempo (int (r));
 
index af6e4c5869aac5d2d54e9a4e9165eb2d3427bbf9..09e1ab073c7102335cae5eee224d388799891fe2 100644 (file)
@@ -84,7 +84,7 @@ Text_engraver::process_acknowledged_grobs ()
       Music * r = evs_[i];
       
       // URG: Text vs TextScript
-      Item *text = make_item ("TextScript", r->self_scm ());
+      Item *text = make_item ("TextScript");
 
       
       Axis ax = Y_AXIS;
@@ -93,13 +93,13 @@ Text_engraver::process_acknowledged_grobs ()
       // Hmm
       int priority = 200;
       SCM s = text->get_property ("script-priority");
-      if (ly_c_number_p (s))
-       priority = ly_scm2int (s);
+      if (gh_number_p (s))
+       priority = gh_scm2int (s);
       
       /* see script-engraver.cc */
       priority += i;
       
-      text->set_property ("script-priority", scm_int2num (priority));
+      text->set_property ("script-priority", gh_int2scm (priority));
 
       Direction dir = to_dir (r->get_property ("direction"));
       if (dir)
@@ -109,6 +109,7 @@ Text_engraver::process_acknowledged_grobs ()
       SCM mark = r->get_property ("text");
 
       text->set_property ("text", mark);
+      announce_grob (text, r->self_scm ());
       texts_.push (text);
     }
 }
@@ -116,6 +117,11 @@ Text_engraver::process_acknowledged_grobs ()
 void
 Text_engraver::stop_translation_timestep ()
 {
+  for (int i=0; i < texts_.size (); i++)
+    {
+      Item *ti = texts_[i];
+      typeset_grob (ti);
+    }
   texts_.clear ();
   evs_.clear ();
 }
index b03027b965ea9304bdc755dc5468d2aa8eb539db..63ed2334fde7c1e48f31b9307191765c52d59603 100644 (file)
 #include "text-item.hh"
 #include "font-interface.hh"
 #include "virtual-font-metric.hh"
-#include "output-def.hh"
-#include "scaled-font-metric.hh"
+#include "paper-def.hh"
 
-MAKE_SCHEME_CALLBACK (Text_item, interpret_string, 4)
+MAKE_SCHEME_CALLBACK (Text_item, interpret_markup, 3)
 SCM
-Text_item::interpret_string (SCM paper, SCM props, SCM encoding, SCM markup)
+Text_item::interpret_markup (SCM paper, SCM props, SCM markup)
 {
-  Output_def *pap = unsmob_output_def (paper);
-  
-  SCM_ASSERT_TYPE(pap, paper, SCM_ARG1, __FUNCTION__, "Paper definition");
-  SCM_ASSERT_TYPE(ly_c_string_p (markup), markup, SCM_ARG3, __FUNCTION__, "string");
-  SCM_ASSERT_TYPE(encoding == SCM_EOL
-                 || ly_c_symbol_p (encoding), encoding, SCM_ARG2, __FUNCTION__, "symbol");
-  
-  String str = ly_scm2string (markup);
-  Font_metric *fm = select_encoded_font (pap, props, encoding);
-
-  SCM lst = SCM_EOL;      
-  Box b;
-  if (Modified_font_metric* mf = dynamic_cast<Modified_font_metric*> (fm))
-    {
-      lst = scm_list_3 (ly_symbol2scm ("text"),
-                       mf->self_scm (),
-                       markup);
-       
-      b = mf->text_dimension (str);
-    }
-  else
+  if (gh_string_p (markup))
     {
-      /* ARGH. */
-      programming_error ("Must have Modified_font_metric for text.");
-    }
+      String str = ly_scm2string (markup);
       
-  return Stencil (b, lst).smobbed_copy ();
-}
-
+      Paper_def *pap = unsmob_paper (paper);
+      Font_metric *fm = select_font (pap, props);
+      SCM lst = scm_list_n (ly_symbol2scm ("text"), markup, SCM_UNDEFINED);
+      
+      if (dynamic_cast<Virtual_font_metric*> (fm))
+       /* ARGH. */
+       programming_error ("Can't use virtual font for text.");
+      else
+       lst = fontify_atom (fm, lst);
 
-MAKE_SCHEME_CALLBACK (Text_item, interpret_markup, 3)
-SCM
-Text_item::interpret_markup (SCM paper, SCM props, SCM markup)
-{
-  if (ly_c_string_p (markup))
-    return interpret_string (paper, props, SCM_EOL, markup);
-  else if (ly_c_pair_p (markup))
+      Box b = fm->text_dimension (str);
+      return Stencil (b, lst).smobbed_copy ();
+    }
+  else if (gh_pair_p (markup))
     {
-      SCM func = ly_car (markup);
-      SCM args = ly_cdr (markup);
+      SCM func = gh_car (markup);
+      SCM args = gh_cdr (markup);
       if (!markup_p (markup))
        programming_error ("Markup head has no markup signature.");
       
@@ -72,7 +52,7 @@ MAKE_SCHEME_CALLBACK (Text_item,print,1);
 SCM
 Text_item::print (SCM grob)
 {
-  Grob *me = unsmob_grob (grob);
+  Grob * me = unsmob_grob (grob);
   
   SCM t = me->get_property ("text");
   SCM chain = Font_interface::text_font_alist_chain (me);
@@ -87,9 +67,9 @@ bool
 Text_item::markup_p (SCM x)
 {
   return
-    ly_c_string_p (x) ||
-    (ly_c_pair_p (x)
-     && SCM_BOOL_F != scm_object_property (ly_car (x), ly_symbol2scm ("markup-signature")));
+    gh_string_p (x) ||
+    (gh_pair_p (x)
+     && SCM_BOOL_F != scm_object_property (gh_car (x), ly_symbol2scm ("markup-signature")));
 }
 
 ADD_INTERFACE (Text_item,"text-interface",
index b7bd32b9e1ffc07d7f6804bc2b4c5767e3c20ed2..c5fb70991a30a64da1117ef375c7b7e2992fe841 100644 (file)
@@ -81,10 +81,11 @@ Text_spanner_engraver::process_music ()
       else
        {
          current_req_ = req_drul_[START];
-         span_  = make_spanner ("TextSpanner", req_drul_[START]->self_scm ());
+         span_  = make_spanner ("TextSpanner");
 
          
          Side_position_interface::set_axis (span_, Y_AXIS);
+         announce_grob (span_, req_drul_[START]->self_scm ());
          req_drul_[START] = 0;
        }
     }
@@ -114,6 +115,7 @@ Text_spanner_engraver::typeset_all ()
          Grob* e = unsmob_grob (get_property ("currentMusicalColumn"));
          finished_->set_bound (RIGHT, e);
        }
+      typeset_grob (finished_);
       finished_ = 0;
     }
 }
index b2254b14517cd4f331f5d42dc51038403cab48f2..e7e75c3351c4bf29bbde4469b921046dd0a1eae4 100644 (file)
@@ -15,7 +15,7 @@
 #include "spanner.hh"
 #include "font-interface.hh"
 #include "dimensions.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "warn.hh"
 #include "paper-column.hh"
 #include "staff-symbol-referencer.hh"
@@ -42,7 +42,7 @@ Text_spanner::print (SCM smob)
   /* Ugh, must be same as Hairpin::print.  */
 
   Grob *common = spanner->get_bound (LEFT)->common_refpoint (spanner->get_bound (RIGHT), X_AXIS);
-  Output_def * paper = me->get_paper ();
+  Paper_def * paper = me->get_paper ();
 
   SCM flare = me->get_property ("bracket-flare");
   SCM shorten = me->get_property ("shorten-pair");
@@ -68,11 +68,11 @@ Text_spanner::print (SCM smob)
            span_points[d] = b->extent (common, X_AXIS).linear_combination (d * encl);
 
            if (is_number_pair (shorten))
-             span_points -= d * ly_scm2double (index_get_cell (shorten, d));
+             span_points -= d * gh_scm2double (index_get_cell (shorten, d));
          }
       
       if (is_number_pair (flare))
-       span_points -= d * ly_scm2double (index_get_cell (flare, d));
+       span_points -= d * gh_scm2double (index_get_cell (flare, d));
     }
   while (flip (&d) != LEFT);
 
@@ -80,7 +80,7 @@ Text_spanner::print (SCM smob)
   SCM properties = Font_interface::text_font_alist_chain (me);
   SCM edge_text = me->get_property ("edge-text");
   Drul_array<Stencil> edge;
-  if (ly_c_pair_p (edge_text))
+  if (gh_pair_p (edge_text))
     {
       Direction d = LEFT;
       do
@@ -112,7 +112,7 @@ Text_spanner::print (SCM smob)
          
          Real dx = 0.0;
          if (is_number_pair (flare))
-           dx = ly_scm2double (index_get_cell (flare, d)) * d;
+           dx = gh_scm2double (index_get_cell (flare, d)) * d;
 
          Real dy = - dir * edge_height[d] ;
          if (dy)
index 08b6995f6727a694574becdf1362d95a1c8dfffa..2e3b1148c90313137a38d239ad546dc7e2b3549b 100644 (file)
@@ -164,7 +164,7 @@ Tex_font_metric_reader::read_char_metrics ()
   for (int i = info_.first_charcode; i <= info_.last_charcode; i++)
     {
       Tex_font_char_metric tfm_char = read_char_metric (i);
-      if (tfm_char.exists_)
+      if (tfm_char.exists_b_)
        ascii_to_metric_idx_[tfm_char.code_] = char_metrics_.size ();
       char_metrics_.push (tfm_char);
     }
@@ -191,7 +191,7 @@ Tex_font_metric_reader::read_char_metric (Char_code code)
   /* Read the character.  */
   tfm_char = read_char ();
 
-  if (tfm_char.exists_)
+  if (tfm_char.exists_b_)
     tfm_char.code_ = code;
 
   return tfm_char;
@@ -239,7 +239,7 @@ Tex_font_metric_reader::read_char ()
      the first and last character codes given in the header.  We've
      already assumed that's true (or we couldn't be positioned at a
      `char_info_word').  */
-  tfm_char.exists_ = width_index != 0;
+  tfm_char.exists_b_ = width_index != 0;
 
   if (tag == 1)
     {
index 942cffb3afe8fe99394177d407adeb3a8964c955..5529c0b1894d4e12132a953d652c0e1fa69f384c 100644 (file)
@@ -4,6 +4,7 @@
   source file of the GNU LilyPond music typesetter
   
   (c) 1999--2004 Jan Nieuwenhuizen <janneke@gnu.org>
+  
 
   some code shamelessly copied from GNU fontutils-0.6/tfm/tfm_input.c
  */
 #include "warn.hh"
 #include "dimensions.hh"
 
-static Tex_font_char_metric dummy_static_char_metric;
-
-Tex_font_char_metric::Tex_font_char_metric ()
-{
-  exists_ = false;
-  code_ = 0;;
-  width_ = 0;
-  height_ = 0;
-  depth_ = 0;
-  italic_correction_ = 0;
-  width_fix_ = 0;
-  height_fix_ = 0;
-  depth_fix_ = 0;
-  italic_correction_fix_ = 0;
-}
-
 Box
 Tex_font_char_metric::dimensions () const
 {
-  if (!exists_)
+  if (!exists_b_)
     {
       Box b;
       b.set_empty ();
@@ -50,94 +35,101 @@ Tex_font_char_metric::dimensions () const
                        (d >? height_)*point_constant));
 }
 
-Tex_font_metric::Tex_font_metric ()
+Tex_font_char_metric::Tex_font_char_metric ()
 {
-  encoding_table_ = SCM_EOL;
+  exists_b_ = false;
+  code_ = 0;;
+  width_ = 0;
+  height_ = 0;
+  depth_ = 0;
+  italic_correction_ = 0;
+  width_fix_ = 0;
+  height_fix_ = 0;
+  depth_fix_ = 0;
+  italic_correction_fix_ = 0;
 }
 
+#define APPEND_CHAR_METRIC_ELT(k)  outstr += ::to_string (#k) + " "  + ::to_string (k ## _)  + "; "
 
+String
+Tex_font_char_metric::to_string () const
+{
+  String outstr ;
+
+  APPEND_CHAR_METRIC_ELT (exists_b);
+  APPEND_CHAR_METRIC_ELT (code);
+  APPEND_CHAR_METRIC_ELT (width);
+  APPEND_CHAR_METRIC_ELT (height);
+  APPEND_CHAR_METRIC_ELT (depth);
+  APPEND_CHAR_METRIC_ELT (italic_correction);
+  
+  return outstr + "\n";
+}
 
-void
-Tex_font_metric::derived_mark () const
+Tex_font_metric::Tex_font_metric ()
 {
-  scm_gc_mark (encoding_table_);
 }
 
+
+static Tex_font_char_metric dummy_static_char_metric;
+
 Tex_font_char_metric const *
 Tex_font_metric::find_ascii (int ascii, bool warn) const
 {
-  if (ascii >= 0 && ascii < ascii_to_metric_idx_.size ()
-      && ascii_to_metric_idx_[ascii] >= 0)
+  if (ascii >= 0 && ascii < ascii_to_metric_idx_.size () && ascii_to_metric_idx_[ascii] >= 0)
     return & char_metrics_[ascii_to_metric_idx_ [ascii]];
   else if (warn)
-    warning (_f ("can't find ascii character: %d", ascii));
+    {
+      warning (_f ("can't find ascii character: %d", ascii));
+    }
   return &dummy_static_char_metric;  
 }
 
-/* UGH: glyphs need not be consecutive in TFM. */
+
+/*
+  UGH: glyphs need not be consecutive in TFM.
+ */
 int
 Tex_font_metric::count () const
 {
   for (int i = ascii_to_metric_idx_.size (); i--;)
-    if (ascii_to_metric_idx_[i] != -1)
-      return i + 1;
+    {
+      if (ascii_to_metric_idx_[i] != -1)
+       return i + 1;
+    }
   return 0;
 }
 
 Box
 Tex_font_metric::get_ascii_char (int a) const
 {
-  Box b = find_ascii (a)->dimensions ();
+  Box b = find_ascii (a)->dimensions () ;
   return b;
 }
 
-SCM
-Tex_font_metric::make_tfm (String filename)
+String
+Tex_font_metric::to_string () const
 {
-  Tex_font_metric *tfm = new Tex_font_metric;
-  Tex_font_metric_reader reader (filename);
-
-  tfm->info_ = reader.info_;
-  tfm->header_ = reader.header_;
-  tfm->char_metrics_ = reader.char_metrics_;
-  tfm->ascii_to_metric_idx_ = reader.ascii_to_metric_idx_;
-
+  String outstr;
+  for (int i=0; i < char_metrics_.size (); i++)
+    outstr += char_metrics_[i].to_string ();
   
-  tfm->encoding_table_ =
-    scm_call_1 (ly_scheme_function ("get-coding-table"),
-               scm_makfrom0str (tfm->coding_scheme ().to_str0 ()));
-
-  return tfm->self_scm ();
+  return outstr;
 }
 
-Real
-Tex_font_metric::design_size () const
-{
-  return info_.design_size;
-}
-
-String
-Tex_font_metric::coding_scheme () const
-{
-  String scm = info_.coding_scheme;
 
-  for(int i = 0; i < scm.length (); i++)
-    if (scm[i] == ' ')
-      scm[i] = '-';
 
-  return scm;
-}
 
-int
-Tex_font_metric::name_to_index (String s) const
+SCM
+Tex_font_metric::make_tfm (String fn)
 {
-  SCM sym = ly_symbol2scm (s.to_str0 ());
+  Tex_font_metric * tfm = new Tex_font_metric;
+  Tex_font_metric_reader reader (fn);
 
-  SCM idx = scm_hash_ref (encoding_table_, sym, SCM_BOOL_F);
-  if (ly_c_char_p (idx))
-    {
-      return (unsigned char) ly_scm2char (idx);
-    }
-  else
-    return -1;  
+  tfm->info_ = reader.info_;
+  tfm->header_ = reader.header_;
+  tfm->char_metrics_ = reader.char_metrics_;
+  tfm->ascii_to_metric_idx_ = reader.ascii_to_metric_idx_;
+  
+  return tfm->self_scm ();
 }
index c3ff0c50e672958908557893ff24fcfc71871870..17ea197241e26f86137e55214eb8a17443dec393 100644 (file)
@@ -154,7 +154,7 @@ Tie_column::werner_directions (Grob *me)
   if (ties.size () == 1)
     {
       Grob *  t = ties[0];
-      if (t->is_live ()
+      if (t->live ()
          && !get_grob_direction (t))
        set_grob_direction (t,Tie::get_default_dir (t));
       return ;
index 8c418564753480dbbd6ed64c5e7ed9c08ebce8e9..a1df498c98f356877b2cf7a56c44538167b20819 100644 (file)
@@ -74,7 +74,7 @@ void
 Tie_engraver::process_music ()
 {
   if (event_)
-    context ()->set_property ("tieMelismaBusy", SCM_BOOL_T);
+    daddy_context_->set_property ("tieMelismaBusy", SCM_BOOL_T);
 }
 
 void
@@ -94,23 +94,24 @@ Tie_engraver::acknowledge_grob (Grob_info i)
            maybe should check positions too.
           */
          if (right_mus && left_mus
-             && ly_c_equal_p (right_mus->get_property ("pitch"),
+             && gh_equal_p (right_mus->get_property ("pitch"),
                             left_mus->get_property ("pitch")))
            {
-             Grob * p = make_spanner ("Tie", last_event_->self_scm ());
+             Grob * p = make_spanner ("Tie");
              Tie::set_interface (p); // cannot remove yet!
          
              Tie::set_head (p, LEFT, th);
              Tie::set_head (p, RIGHT, h);
          
              ties_.push (p);
+             announce_grob (p, last_event_->self_scm ());
            }
        }
 
       if (ties_.size () && ! tie_column_)
        {
-         tie_column_ = make_spanner ("TieColumn", SCM_EOL);
-         
+         tie_column_ = make_spanner ("TieColumn");
+         announce_grob (tie_column_, SCM_EOL);
        }
 
       if (tie_column_)
@@ -122,8 +123,8 @@ Tie_engraver::acknowledge_grob (Grob_info i)
 void
 Tie_engraver::start_translation_timestep ()
 {
-  context ()->set_property ("tieMelismaBusy",
-                             ly_bool2scm (heads_to_tie_.size ()));
+  daddy_context_->set_property ("tieMelismaBusy",
+                             gh_bool2scm (heads_to_tie_.size ()));
       
 }
 
@@ -140,7 +141,11 @@ Tie_engraver::stop_translation_timestep ()
 
       ties_.clear ();
       last_event_ = 0;
-      tie_column_ =0;
+      if (tie_column_)
+       {
+         typeset_grob (tie_column_);
+         tie_column_ =0;
+       }
     }
   
   if (event_)
@@ -170,6 +175,7 @@ Tie_engraver::typeset_tie (Grob *her)
   index_set_cell (her->get_property ("head-pair"), LEFT, new_head_drul[LEFT]->self_scm ());
   index_set_cell (her->get_property ("head-pair"), RIGHT, new_head_drul[RIGHT]->self_scm ());
 
+  typeset_grob (her);
 }
 
 
index 5bcc1987a0df73c47c620bd92e8555e6b218c44e..8552c20e0cb209e6ec739260a4b3d40285eb729f 100644 (file)
@@ -32,6 +32,8 @@ public:
   TRANSLATOR_DECLARATIONS (Tie_performer);
 };
 
+
+
 Tie_performer::Tie_performer ()
 {
   event_ = 0;
@@ -39,6 +41,7 @@ Tie_performer::Tie_performer ()
   ties_created_ = false;
 }
 
+
 bool
 Tie_performer::try_music (Music *mus)
 {
@@ -54,7 +57,7 @@ void
 Tie_performer::process_music ()
 {
   if (event_)
-    context ()->set_property ("tieMelismaBusy", SCM_BOOL_T);
+    daddy_context_->set_property ("tieMelismaBusy", SCM_BOOL_T);
 }
 
 void
@@ -71,8 +74,8 @@ Tie_performer::acknowledge_audio_element (Audio_element_info inf)
          Music * left_mus = heads_to_tie_[i].event_;
 
          if (right_mus && left_mus
-             && ly_c_equal_p (right_mus->get_property ("pitch"),
-                              left_mus->get_property ("pitch")))
+             && gh_equal_p (right_mus->get_property ("pitch"),
+                            left_mus->get_property ("pitch")))
            {
              an->tie_to (th);
              ties_created_ = true;  
@@ -84,8 +87,8 @@ Tie_performer::acknowledge_audio_element (Audio_element_info inf)
 void
 Tie_performer::start_translation_timestep ()
 {
-  context ()->set_property ("tieMelismaBusy",
-                           ly_bool2scm (heads_to_tie_.size ()));
+  daddy_context_->set_property ("tieMelismaBusy",
+                             gh_bool2scm (heads_to_tie_.size ()));
       
 }
 
index c13f97f3540f42d454f6036039e7bd2cbe772f28..92daec75b10d6f4cdb7e2208d8576b08fb3b9cb1 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "spanner.hh"
 #include "lookup.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "tie.hh"
 #include "rhythmic-head.hh"
 #include "bezier.hh"
@@ -50,7 +50,7 @@ Tie::set_head (Grob*me,Direction d, Grob * h)
 void
 Tie::set_interface (Grob*me)
 {
-  me->set_property ("head-pair", scm_cons (SCM_EOL, SCM_EOL));
+  me->set_property ("head-pair", gh_cons (SCM_EOL, SCM_EOL));
 }
 
 
@@ -59,7 +59,7 @@ Tie::head (Grob*me, Direction d)
 {
   SCM c = me->get_property ("head-pair");
 
-  if (ly_c_pair_p (c))
+  if (gh_pair_p (c))
     return unsmob_grob (index_get_cell (c, d));
   else
     return 0;
@@ -206,8 +206,8 @@ Tie::get_control_points (SCM smob)
   SCM lim // groetjes aan de chirurgendochter.
     = scm_assq (ly_symbol2scm ("height-limit"),details);
   
-  Real h_inf = ly_scm2double (ly_cdr (lim)) *  staff_space;
-  Real r_0 = ly_scm2double (ly_cdr (scm_assq (ly_symbol2scm ("ratio"),details)));
+  Real h_inf = gh_scm2double (ly_cdr (lim)) *  staff_space;
+  Real r_0 = gh_scm2double (ly_cdr (scm_assq (ly_symbol2scm ("ratio"),details)));
 
   Bezier b  = slur_shape (width, h_inf, r_0);
   
@@ -220,7 +220,7 @@ Tie::get_control_points (SCM smob)
   */
 
   Real ypos = Tie::get_position (me) * staff_space/2
-    + dir * ly_scm2double (me->get_property ("y-offset"));;
+    + dir * gh_scm2double (me->get_property ("y-offset"));;
 
   /*
     Make sure we don't start on a dots
@@ -268,7 +268,7 @@ Tie::get_control_points (SCM smob)
       Real diff = ry - y;
       Real newy = y;
 
-      Real clear = staff_space * ly_scm2double (me->get_property ("staffline-clearance"));
+      Real clear = staff_space * gh_scm2double (me->get_property ("staffline-clearance"));
 
       if (fabs (y) <=
          Staff_symbol_referencer::staff_radius (me) * staff_space + clear
@@ -314,7 +314,7 @@ Tie::get_control_points (SCM smob)
 
   SCM controls = SCM_EOL;
   for (int i= 4; i--;)
-    controls = scm_cons (ly_offset2scm (b.control_[i]), controls);
+    controls = gh_cons (ly_offset2scm (b.control_[i]), controls);
   return controls;
 }
 
@@ -326,13 +326,13 @@ Tie::print (SCM smob)
   Grob*me = unsmob_grob (smob);
 
   SCM cp = me->get_property ("control-points");
-  if (!ly_c_pair_p (cp))               // list is more accurate
+  if (!gh_pair_p (cp))         // list is more accurate
     {
       cp = get_control_points (smob);
       me->set_property ("control-points", cp);
     }
 
-  if (!ly_c_pair_p (cp))
+  if (!gh_pair_p (cp))
     return Stencil ().smobbed_copy ();
   
   Real thick
index 60c9a63411d1671618ce9be588a97ff06ae62f4b..017dd42b7bea566146f464a293f6bbc5cf40716a 100644 (file)
@@ -18,7 +18,7 @@
   */
 class Time_signature_engraver : public Engraver
 {
-  Item *time_signature_;
+  Item * time_signature_;
   SCM last_time_fraction_;
 
 protected:
@@ -31,7 +31,7 @@ public:
 
 Time_signature_engraver::Time_signature_engraver ()
 { 
-  time_signature_ = 0;
+  time_signature_ =0;
   last_time_fraction_ = SCM_BOOL_F;
 }
 
@@ -41,12 +41,12 @@ Time_signature_engraver::process_music ()
   /*
     not rigorously safe, since the value might get GC'd and
     reallocated in the same spot */
-  SCM fr = get_property ("timeSignatureFraction");
+  SCM fr= get_property ("timeSignatureFraction");
   if (!time_signature_
       && last_time_fraction_ != fr
-      && ly_c_pair_p (fr))
+      && gh_pair_p (fr))
     {
-      int den = ly_scm2int (ly_cdr (fr));
+      int den = gh_scm2int (gh_cdr (fr));
       if (den != (1 << intlog2 (den)))
        {
          /*
@@ -56,21 +56,28 @@ Time_signature_engraver::process_music ()
           */
          warning (_f ("Found strange time signature %d/%d.",
                      den,
-                     ly_scm2int (ly_car (fr))
+                     gh_scm2int (gh_car (fr))
                      ));
        }
   
       
       last_time_fraction_ = fr; 
-      time_signature_ = make_item ("TimeSignature",SCM_EOL);
+      time_signature_ = make_item ("TimeSignature");
       time_signature_->set_property ("fraction",fr);
+
+      if (time_signature_)
+       announce_grob (time_signature_, SCM_EOL);
     }
 }
 
 void
 Time_signature_engraver::stop_translation_timestep ()
 {
-  time_signature_ = 0;
+  if (time_signature_) 
+    {
+      typeset_grob (time_signature_);
+      time_signature_ =0;
+    }
 }
  
 
index 3d3e26d3273a93a44685fa820245295bf5a3a76e..2bc27ef5565a9c20a8dbf8513ec331f9863d95ac 100644 (file)
@@ -44,11 +44,11 @@ void
 Time_signature_performer::create_audio_elements ()
 {
   SCM fr = get_property ("timeSignatureFraction");
-  if (ly_c_pair_p (fr) && !ly_c_equal_p (fr, prev_fraction_))
+  if (gh_pair_p (fr) && !gh_equal_p (fr, prev_fraction_))
     {
       prev_fraction_ = fr;
-      int b = ly_scm2int (ly_car (fr));
-      int o = ly_scm2int (ly_cdr (fr));
+      int b = gh_scm2int (ly_car (fr));
+      int o = gh_scm2int (ly_cdr (fr));
       
       audio_ = new Audio_time_signature (b,o);
       Audio_element_info info (audio_, 0);
index d6e3b16f3efdbbbbd6c43301dd77b4c3191bd802..be45079d32b51e6a42f084ef7197f6df791b692b 100644 (file)
@@ -11,7 +11,7 @@
 #include "stencil.hh"
 #include "text-item.hh"
 #include "time-signature.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "font-interface.hh"
 #include "warn.hh"
 #include "staff-symbol-referencer.hh"
@@ -34,14 +34,14 @@ Time_signature::print (SCM smob)
   SCM frac = me->get_property ("fraction");
   int n = 4;
   int d = 4;
-  if (ly_c_pair_p (frac))
+  if (gh_pair_p (frac))
     {
-      n = ly_scm2int (ly_car (frac));
-      d = ly_scm2int (ly_cdr (frac));
+      n = gh_scm2int (ly_car (frac));
+      d = gh_scm2int (ly_cdr (frac));
     }
 
   Stencil m;
-  if (ly_c_symbol_p (st))
+  if (gh_symbol_p (st))
     {
       String style (ly_scm2string (scm_symbol_to_string (st)));
       if (style[0]=='1')
@@ -84,7 +84,7 @@ Time_signature::special_time_signature (Grob *me, SCM scm_style, int n, int d)
     }
 
   String char_name = style + to_string (n) + "/" + to_string (d);
-  me->set_property ("font-encoding", ly_symbol2scm ("fetaMusic"));
+  me->set_property ("font-encoding", ly_symbol2scm ("music"));
   Stencil out = Font_interface::get_default_font (me)
     ->find_by_name ("timesig-" + char_name);
   if (!out.is_empty ())
@@ -101,14 +101,14 @@ Stencil
 Time_signature::numbered_time_signature (Grob*me,int num, int den)
 {
   SCM chain = me->get_property_alist_chain (Font_interface::text_font_alist_chain (me));
-  chain = scm_cons (scm_list_1 (scm_cons (ly_symbol2scm ("font-encoding"),
-                                        ly_symbol2scm ("fetaNumber"))),
+  chain = scm_cons (scm_list_1 (gh_cons (ly_symbol2scm ("font-encoding"),
+                                        ly_symbol2scm ("number"))),
                    chain);
                                
   SCM sn = Text_item::interpret_markup (me->get_paper ()->self_scm (), chain,
-                                       scm_makfrom0str (to_string (num).to_str0 ()));
+                                scm_makfrom0str (to_string (num).to_str0 ()));
   SCM sd = Text_item::interpret_markup (me->get_paper ()->self_scm (), chain,
-                                       scm_makfrom0str (to_string (den).to_str0 ()));
+                                scm_makfrom0str (to_string (den).to_str0 ()));
 
   Stencil n = *unsmob_stencil (sn);
   Stencil d = *unsmob_stencil (sd);
index 2c12f4166abaa523a36b04eb6ad144a5e379acbf..78b56d44a927c5486dd328352fa8c35ef3fd04ec 100644 (file)
@@ -45,11 +45,11 @@ Timing_engraver::initialize ()
   Moment now = now_mom ();
   
   /* Set the first bar of the score? */
-  if (!ly_c_string_p (which))
+  if (!gh_string_p (which))
     which = (now.main_part_ || now.main_part_ == last_moment_.main_part_)
       ? SCM_EOL : scm_makfrom0str ("|");
 
-  context ()->set_property ("whichBar", which);
+  daddy_context_->set_property ("whichBar", which);
 }
 
 
@@ -63,7 +63,7 @@ Timing_engraver::start_translation_timestep ()
   SCM which = get_property ("whichBar");
 
   /* Set the first bar of the score? */
-  if (!ly_c_string_p (which))
+  if (!gh_string_p (which))
     which = SCM_EOL;
 
   Moment mp = measure_position ();
@@ -77,7 +77,7 @@ Timing_engraver::start_translation_timestep ()
        ->set_property ("measure-length", mlen.smobbed_copy ()); 
     }
   
-  if (!ly_c_string_p (which) && to_boolean (automatic_bars))
+  if (!gh_string_p (which) && to_boolean (automatic_bars))
     {
       SCM always = get_property ("barAlways");
 
@@ -88,14 +88,14 @@ Timing_engraver::start_translation_timestep ()
        }
     }
 
-  context ()->set_property ("whichBar", which);
+  daddy_context_->set_property ("whichBar", which);
 }
 
 void
 Timing_engraver::stop_translation_timestep ()
 {
   Timing_translator::stop_translation_timestep ();
-  context ()->set_property ("whichBar", SCM_EOL);
+  daddy_context_->set_property ("whichBar", SCM_EOL);
   last_moment_ = now_mom ();
 }
 
index 24d2c3c377d397e4ff13f5a4f24d15fcb4551ff1..10d09d3d9a4aa3798702718c65a3f44b22dc4f72 100644 (file)
@@ -49,18 +49,18 @@ Timing_translator::initialize ()
   /*
     move this to engraver-init.ly? 
    */
-  context ()->add_alias (ly_symbol2scm ("Timing"));
-  context ()->set_property ("timing" , SCM_BOOL_T);  
-  context ()->set_property ("currentBarNumber" , scm_int2num (1));
+  daddy_context_->add_alias (ly_symbol2scm ("Timing"));
+  daddy_context_->set_property ("timing" , SCM_BOOL_T);  
+  daddy_context_->set_property ("currentBarNumber" , gh_int2scm (1));
 
-  context ()->set_property ("timeSignatureFraction",
-                               scm_cons (scm_int2num (4), scm_int2num (4)));
+  daddy_context_->set_property ("timeSignatureFraction",
+                               gh_cons (gh_int2scm (4), gh_int2scm (4)));
   /*
     Do not init measurePosition; this should be done from global
     context.
    */
-  context ()->set_property ("measureLength", Moment (Rational (1)).smobbed_copy ());
-  context ()->set_property ("beatLength", Moment (Rational (1,4)).smobbed_copy ());
+  daddy_context_->set_property ("measureLength", Moment (Rational (1)).smobbed_copy ());
+  daddy_context_->set_property ("beatLength", Moment (Rational (1,4)).smobbed_copy ());
 }
 
 Rational
@@ -125,7 +125,7 @@ Timing_translator::start_translation_timestep ()
   else
     {
       measposp = now;
-      context ()->set_property ("measurePosition",
+      daddy_context_->set_property ("measurePosition",
                                    measposp.smobbed_copy ());
     }
   
@@ -133,9 +133,9 @@ Timing_translator::start_translation_timestep ()
   
   SCM barn = get_property ("currentBarNumber");
   int b = 0;
-  if (ly_c_number_p (barn))
+  if (gh_number_p (barn))
     {
-      b = ly_scm2int (barn);
+      b = gh_scm2int (barn);
     }
 
   SCM cad = get_property ("timing");
@@ -148,8 +148,8 @@ Timing_translator::start_translation_timestep ()
       b ++;
     }
 
-  context ()->set_property ("currentBarNumber", scm_int2num (b));
-  context ()->set_property ("measurePosition", measposp.smobbed_copy ());
+  daddy_context_->set_property ("currentBarNumber", gh_int2scm (b));
+  daddy_context_->set_property ("measurePosition", measposp.smobbed_copy ());
 }
 
 ENTER_DESCRIPTION (Timing_translator,
index 5998b4f234793bb9e958c6ec5c50f37e20e517fb..654d90899bda3333e88bcafc43839b0aa179cfda 100644 (file)
@@ -22,9 +22,9 @@ LY_DEFINE (get_all_translators,"ly:get-all-translators", 0, 0, 0,  (),
 {
   SCM l = global_translator_dict ?  global_translator_dict->to_alist () : SCM_EOL;
 
-  for (SCM s =l; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s =l; gh_pair_p (s); s = gh_cdr (s))
     {
-      scm_set_car_x (s, ly_cdar (s));
+      gh_set_car_x (s, gh_cdar (s));
     }
 
   return l;
index 803832378680cfa58531827860256972c4e7a4b7..0d09e91e7df99885fbb50f65cc4b272a151d7204 100644 (file)
@@ -6,7 +6,7 @@
   (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#include "output-def.hh"
+#include "music-output-def.hh"
 #include "translator-group.hh"
 #include "translator.hh"
 #include "warn.hh"
 Translator_group*
 Translator_group::get_daddy_translator () const
 {
-  return context ()->get_parent_context ()->implementation ();
+  Translator *t
+    = unsmob_translator (daddy_context_->daddy_context_->implementation_);
+  return dynamic_cast<Translator_group*> (t);
 }
 
 
 void
 translator_each (SCM list, Translator_method method)
 {
-  for (SCM p = list; ly_c_pair_p (p); p = ly_cdr (p))
+  for (SCM p = list; gh_pair_p (p); p = ly_cdr (p))
     (unsmob_translator (ly_car (p))->*method) ();
 }
 
@@ -35,8 +37,8 @@ translator_each (SCM list, Translator_method method)
 void
 Translator_group::initialize ()
 {
-  SCM tab = scm_make_vector (scm_int2num (19), SCM_BOOL_F);
-  context ()->set_property ("acceptHashTable", tab);
+  SCM tab = scm_make_vector (gh_int2scm (19), SCM_BOOL_F);
+  daddy_context_->set_property ("acceptHashTable", tab);
 }
 
 
@@ -45,8 +47,8 @@ translator_accepts_any_of (Translator*tr, SCM ifaces)
 {
   SCM ack_ifs = scm_assoc (ly_symbol2scm ("events-accepted"),
                           tr->translator_description ());
-  ack_ifs = ly_cdr (ack_ifs);
-  for (SCM s = ifaces; ly_c_pair_p (s); s = ly_cdr (s))
+  ack_ifs = gh_cdr (ack_ifs);
+  for (SCM s = ifaces; ly_pair_p (s); s = ly_cdr (s))
     if (scm_c_memq (ly_car (s), ack_ifs) != SCM_BOOL_F)
       return true;
   return false;
@@ -56,7 +58,7 @@ SCM
 find_accept_translators (SCM gravlist, SCM ifaces)
 {
   SCM l = SCM_EOL;
-  for (SCM s = gravlist; ly_c_pair_p (s);  s = ly_cdr (s))
+  for (SCM s = gravlist; ly_pair_p (s);  s = ly_cdr (s))
     {
       Translator* tr = unsmob_translator (ly_car (s));
       if (translator_accepts_any_of (tr, ifaces))
@@ -74,10 +76,10 @@ Translator_group::try_music (Music* m)
   SCM name = scm_sloppy_assq (ly_symbol2scm ("name"),
                              m->get_property_alist (false));
 
-  if (!ly_c_pair_p (name))
+  if (!gh_pair_p (name))
     return false;
 
-  name = ly_cdr (name);
+  name = gh_cdr (name);
   SCM accept_list = scm_hashq_ref (tab, name, SCM_UNDEFINED);
   if (accept_list == SCM_BOOL_F)
     {
@@ -86,7 +88,7 @@ Translator_group::try_music (Music* m)
       scm_hashq_set_x (tab, name, accept_list);
     }
 
-  for (SCM p = accept_list; ly_c_pair_p (p); p = ly_cdr (p))
+  for (SCM p = accept_list; gh_pair_p (p); p = ly_cdr (p))
     {
       Translator * t = unsmob_translator (ly_car (p));
       if (t && t->try_music (m))
@@ -95,6 +97,28 @@ Translator_group::try_music (Music* m)
   return false;
 }
 
+SCM
+names_to_translators (SCM namelist, Context*tg)
+{
+  SCM l = SCM_EOL;
+  for (SCM s = namelist; gh_pair_p (s) ; s = ly_cdr (s))
+    {
+      Translator * t = get_translator (ly_car (s));
+      if (!t)
+       warning (_f ("can't find: `%s'", s));
+      else
+       {
+         Translator * tr = t->clone ();
+         SCM str = tr->self_scm ();
+         l = gh_cons (str, l);
+
+         tr->daddy_context_ = tg;
+         scm_gc_unprotect_object (str);
+       }
+    }
+  return l;
+}
+
 
 SCM
 Translator_group::get_simple_trans_list ()
@@ -106,7 +130,7 @@ void
 recurse_over_translators (Context * c, Translator_method ptr, Direction dir)
 {
   Translator_group * tg
-    = dynamic_cast<Translator_group*> (c->implementation ());
+    = dynamic_cast<Translator_group*> (unsmob_translator (c->implementation_));
 
 
   /*
@@ -120,10 +144,10 @@ recurse_over_translators (Context * c, Translator_method ptr, Direction dir)
       (tg->*ptr) ();
     }
 
-  for (SCM s = c->children_contexts () ; ly_c_pair_p (s);
-       s =ly_cdr (s))
+  for (SCM s = c->context_list_ ; gh_pair_p (s);
+       s =gh_cdr (s))
     {
-      recurse_over_translators (unsmob_context (ly_car (s)), ptr, dir);
+      recurse_over_translators (unsmob_context (gh_car (s)), ptr, dir);
     }
 
   if (dir == UP)
index 2c433a008619eda8e823908dfb2b76dd61b23422..de977343fc295dbf282c3d726dc1aed55b871879 100644 (file)
@@ -13,7 +13,6 @@
 #include "warn.hh"
 #include "item.hh"
 #include "spanner.hh"
-#include "engraver.hh"
 
 /*
   Grob descriptions (ie. alists with layout properties) are
@@ -33,7 +32,7 @@ void
 execute_pushpop_property (Context * trg,
                          SCM prop, SCM eltprop, SCM val)
 {
-  if (ly_c_symbol_p (prop) && ly_c_symbol_p (eltprop))
+  if (gh_symbol_p (prop) && gh_symbol_p (eltprop))
     {
       if (val != SCM_UNDEFINED)
        {
@@ -49,21 +48,21 @@ execute_pushpop_property (Context * trg,
          if (where != trg)
            {
              SCM base = updated_grob_properties (trg, prop);
-             prev = scm_cons (base, base); 
+             prev = gh_cons (base, base); 
              trg->internal_set_property (prop, prev);
            }
          else
            prev = trg->internal_get_property (prop);
          
-         if (!ly_c_pair_p (prev))
+         if (!gh_pair_p (prev))
            {
              programming_error ("Grob definition should be cons.");
              return ;
            }
 
-         SCM prev_alist = ly_car (prev);
+         SCM prev_alist = gh_car (prev);
          
-         if (ly_c_pair_p (prev_alist) || prev_alist == SCM_EOL)
+         if (gh_pair_p (prev_alist) || prev_alist == SCM_EOL)
            {
              bool ok = type_check_assignment (eltprop, val, ly_symbol2scm ("backend-type?"));
 
@@ -71,7 +70,7 @@ execute_pushpop_property (Context * trg,
               tack onto alist:
              */
              if (ok)
-               scm_set_car_x (prev, scm_acons (eltprop, val, prev_alist));
+               gh_set_car_x (prev, scm_acons (eltprop, val, prev_alist));
            }
          else
            {
@@ -81,24 +80,24 @@ execute_pushpop_property (Context * trg,
       else if (trg->where_defined (prop) == trg)
        {
          SCM prev = trg->internal_get_property (prop);
-         SCM prev_alist = ly_car (prev);
-         SCM daddy = ly_cdr (prev);
+         SCM prev_alist = gh_car (prev);
+         SCM daddy = gh_cdr (prev);
          
          SCM new_alist = SCM_EOL;
          SCM *tail = &new_alist;
 
          while (prev_alist != daddy)
            {
-             if (ly_c_equal_p (ly_caar (prev_alist), eltprop))
+             if (gh_equal_p (gh_caar (prev_alist), eltprop))
                {
-                 prev_alist = ly_cdr (prev_alist);
+                 prev_alist = gh_cdr (prev_alist);
                  break ;
                }
 
              
-             *tail = scm_cons (ly_car (prev_alist), SCM_EOL);
+             *tail = gh_cons (gh_car (prev_alist), SCM_EOL);
              tail = SCM_CDRLOC (*tail);
-             prev_alist = ly_cdr (prev_alist);
+             prev_alist = gh_cdr (prev_alist);
            }
 
          if (new_alist == SCM_EOL && prev_alist == daddy)
@@ -106,7 +105,7 @@ execute_pushpop_property (Context * trg,
          else
            {
              *tail = prev_alist;
-             trg->internal_set_property (prop, scm_cons (new_alist, daddy));
+             trg->internal_set_property (prop, gh_cons (new_alist, daddy));
            }
        }
     }
@@ -125,7 +124,7 @@ void
 apply_property_operations (Context *tg, SCM pre_init_ops)
 {
   SCM correct_order = scm_reverse (pre_init_ops);
-  for (SCM s = correct_order; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = correct_order; gh_pair_p (s); s = ly_cdr (s))
     {
       SCM entry = ly_car (s);
       SCM type = ly_car (entry);
@@ -134,7 +133,7 @@ apply_property_operations (Context *tg, SCM pre_init_ops)
       if (type == ly_symbol2scm ("push") || type == ly_symbol2scm ("poppush"))
        {
          SCM val = ly_cddr (entry);
-         val = ly_c_pair_p (val) ? ly_car (val) : SCM_UNDEFINED;
+         val = gh_pair_p (val) ? ly_car (val) : SCM_UNDEFINED;
 
          execute_pushpop_property (tg, ly_car (entry), ly_cadr (entry), val);
        }
@@ -152,38 +151,38 @@ apply_property_operations (Context *tg, SCM pre_init_ops)
 SCM
 updated_grob_properties (Context * tg, SCM sym)
 {
-  assert (ly_c_symbol_p (sym));
+  assert (gh_symbol_p (sym));
   
   tg = tg->where_defined (sym);
   if (!tg)
     return SCM_EOL;
   
   SCM daddy_props
-    = (tg->get_parent_context ())
-    ? updated_grob_properties (tg->get_parent_context (), sym)
+    = (tg->daddy_context_)
+    ? updated_grob_properties (tg->daddy_context_, sym)
     : SCM_EOL;
   
   SCM props  = tg->internal_get_property (sym);
 
-  if (!ly_c_pair_p (props))
+  if (!gh_pair_p (props))
     {
       programming_error ("grob props not a pair?");
       return SCM_EOL;
     }
 
-  SCM based_on = ly_cdr (props);
+  SCM based_on = gh_cdr (props);
   if (based_on == daddy_props)
     {
-      return ly_car (props);
+      return gh_car (props);
     }
   else
     {
       SCM copy = daddy_props;
       SCM * tail = &copy;
-      SCM p = ly_car (props);
+      SCM p = gh_car (props);
       while  (p != based_on)
        {
-         *tail = scm_cons (ly_car (p), daddy_props);
+         *tail = gh_cons (gh_car (p), daddy_props);
          tail = SCM_CDRLOC (*tail);
          p = SCM_CDR (p);
        }
@@ -196,27 +195,16 @@ updated_grob_properties (Context * tg, SCM sym)
 }
 
 Item*
-make_item_from_properties (Translator *tr, SCM x, SCM cause)
+make_item_from_properties (Context * tg, SCM x)
 {
-  Context *tg = tr->context ();
-  
   SCM props = updated_grob_properties (tg, x);
-  Item *it= new Item (props);
-
-  dynamic_cast<Engraver*>(tr)->announce_grob (it, cause);
-  
-  return it;
+  return new Item (props);
 }
 
 Spanner*
-make_spanner_from_properties (Translator *tr, SCM x, SCM cause)
+make_spanner_from_properties (Context *tg, SCM x)
 {
-  Context *tg = tr->context ();
-  
   SCM props = updated_grob_properties (tg, x);
-  Spanner *it= new Spanner (props);
-
-  dynamic_cast<Engraver*>(tr)->announce_grob (it, cause);
-  
-  return it;
+  return new Spanner (props);
 }
+
index 485e22b29af528baf46dbb4b216f69deddfda2b9..d8211a24c1f3c1c19855317d7107482979d9ca49 100644 (file)
@@ -64,7 +64,7 @@ Translator::now_mom () const
   return daddy_context_->now_mom ();
 }
 
-Output_def *
+Music_output_def *
 Translator::get_output_def () const
 {
   return daddy_context_->get_output_def ();
@@ -74,7 +74,9 @@ Translator::get_output_def () const
 Translator_group*
 Translator::get_daddy_translator () const
 {
-  return daddy_context_->implementation ();
+  Translator *t
+    = unsmob_translator (daddy_context_->implementation_);
+  return dynamic_cast<Translator_group*> (t);
 }
 
 
index 493cf23998174ff967fafeab6ce918569922cdf4..b75b602b5434c74dd0ebc64ff08be44572387861 100644 (file)
@@ -31,7 +31,7 @@
 #include "warn.hh"
 #include "font-interface.hh"
 #include "stencil.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "text-item.hh"
 #include "tuplet-bracket.hh"
 #include "stem.hh"
@@ -114,7 +114,7 @@ Tuplet_bracket::print (SCM smob)
     SCM lp = me->get_property ("left-position");
     SCM rp = me->get_property ("right-position");  
 
-    if (!ly_c_number_p (rp) || !ly_c_number_p (lp))
+    if (!gh_number_p (rp) || !gh_number_p (lp))
       after_line_breaking (smob);
   }
   
@@ -133,17 +133,17 @@ Tuplet_bracket::print (SCM smob)
     Fixme: the type of this prop is sucky.
    */
   SCM bracket = me->get_property ("bracket-visibility");
-  if (ly_c_boolean_p (bracket))
+  if (gh_boolean_p (bracket))
     {
-      bracket_visibility = ly_scm2bool (bracket);
+      bracket_visibility = gh_scm2bool (bracket);
     }
   else if (bracket == ly_symbol2scm ("if-no-beam"))
     bracket_visibility = !par_beam;
 
   SCM numb = me->get_property ("number-visibility");  
-  if (ly_c_boolean_p (numb))
+  if (gh_boolean_p (numb))
     {
-      number_visibility = ly_scm2bool (numb);
+      number_visibility = gh_scm2bool (numb);
     }
   else if (numb == ly_symbol2scm ("if-no-beam"))
     number_visibility = !par_beam;
@@ -168,9 +168,9 @@ Tuplet_bracket::print (SCM smob)
   
   SCM number = me->get_property ("text");
 
-  Output_def *pap = me->get_paper ();
+  Paper_def *pap = me->get_paper ();
   Stencil num;
- if (ly_c_string_p (number) && number_visibility)
+ if (gh_string_p (number) && number_visibility)
     {
       SCM properties = Font_interface::text_font_alist_chain (me);
       SCM snum = Text_item::interpret_markup (pap->self_scm (), properties, number);
@@ -213,11 +213,11 @@ Tuplet_bracket::print (SCM smob)
       do {
        flare[d] =  height[d] = shorten[d] = 0.0;
        if (is_number_pair (fl))
-         flare[d] +=  ss * ly_scm2double (index_get_cell (fl, d));
+         flare[d] +=  ss * gh_scm2double (index_get_cell (fl, d));
        if (is_number_pair (eh))
-         height[d] +=  - dir * ss *ly_scm2double (index_get_cell (eh, d));
+         height[d] +=  - dir * ss *gh_scm2double (index_get_cell (eh, d));
        if (is_number_pair (sp))
-         shorten[d] +=  ss *ly_scm2double (index_get_cell (sp, d));
+         shorten[d] +=  ss *gh_scm2double (index_get_cell (sp, d));
       }
       while (flip (&d) != LEFT);
       
@@ -383,7 +383,7 @@ Tuplet_bracket::calc_position_and_height (Grob*me,Real *offset, Real * dy)
     }
 
   // padding
-  *offset +=  ly_scm2double (me->get_property ("padding")) *dir;
+  *offset +=  gh_scm2double (me->get_property ("padding")) *dir;
 
   
   /*
@@ -426,7 +426,7 @@ Tuplet_bracket::before_line_breaking (SCM smob)
       if (b)
        me->add_dependency (b);
     }
-  return SCM_UNSPECIFIED;
+  return SCM_UNDEFINED;
 }
 
 MAKE_SCHEME_CALLBACK (Tuplet_bracket,after_line_breaking,1);
@@ -473,13 +473,13 @@ Tuplet_bracket::after_line_breaking (SCM smob)
     {
       SCM ps =  par_beam->get_property ("positions"); 
 
-      Real lp = ly_scm2double (ly_car (ps));
-      Real rp = ly_scm2double (ly_cdr (ps));
+      Real lp = gh_scm2double (gh_car (ps));
+      Real rp = gh_scm2double (gh_cdr (ps));
 
       /*
        duh. magic.
        */
-      offset = lp + dir * (0.5 + ly_scm2double (me->get_property ("padding")));
+      offset = lp + dir * (0.5 + gh_scm2double (me->get_property ("padding")));
       dy = rp- lp;
     }
   
@@ -487,18 +487,18 @@ Tuplet_bracket::after_line_breaking (SCM smob)
   SCM lp =  me->get_property ("left-position");
   SCM rp = me->get_property ("right-position");  
   
-  if (ly_c_number_p (lp) && !ly_c_number_p (rp))
+  if (gh_number_p (lp) && !gh_number_p (rp))
     {
-      rp = scm_make_real (ly_scm2double (lp) + dy);
+      rp = gh_double2scm (gh_scm2double (lp) + dy);
     }
-  else if (ly_c_number_p (rp) && !ly_c_number_p (lp))
+  else if (gh_number_p (rp) && !gh_number_p (lp))
     {
-      lp = scm_make_real (ly_scm2double (rp) - dy);
+      lp = gh_double2scm (gh_scm2double (rp) - dy);
     }
-  else if (!ly_c_number_p (rp) && !ly_c_number_p (lp))
+  else if (!gh_number_p (rp) && !gh_number_p (lp))
     {
-      lp = scm_make_real (offset);
-      rp = scm_make_real (offset +dy);
+      lp = gh_double2scm (offset);
+      rp = gh_double2scm (offset +dy);
     }
 
   me->set_property ("left-position", lp);
@@ -515,7 +515,7 @@ Direction
 Tuplet_bracket::get_default_dir (Grob*me)
 {
   Drul_array<int> dirs (0,0);  
-  for (SCM s = me->get_property ("note-columns"); ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("note-columns"); gh_pair_p (s); s = ly_cdr (s))
     {
       Grob * nc = unsmob_grob (ly_car (s));
       Direction d = Note_column::dir (nc);
index 70378670ebc28cf85e08c359e2dfdf5053e0b377..82ef13dbdf5267ca98d55342e66140bdf12672fa 100644 (file)
@@ -32,6 +32,7 @@ protected:
   /// The spanners. Array order is synced with time_scaled_musics_
   Link_array<Spanner> started_spanners_;
 
+  virtual void finalize ();
   virtual void acknowledge_grob (Grob_info);
   virtual bool try_music (Music*r);
   virtual void start_translation_timestep ();
@@ -69,7 +70,7 @@ Tuplet_engraver::process_acknowledged_grobs ()
       if (i < started_spanners_.size () && started_spanners_[i])
        continue;
 
-      Spanner* glep = make_spanner ("TupletBracket", time_scaled_musics_ [i]->self_scm ());
+      Spanner* glep = make_spanner ("TupletBracket");
 
       if (i >= started_spanners_.size ())
        started_spanners_.push (glep);
@@ -78,12 +79,13 @@ Tuplet_engraver::process_acknowledged_grobs ()
       
 
       SCM proc = get_property ("tupletNumberFormatFunction");
-      if (ly_c_procedure_p (proc))
+      if (gh_procedure_p (proc))
        {
-         SCM t = scm_apply_0 (proc, scm_list_n (time_scaled_musics_[i]->self_scm (), SCM_UNDEFINED));
+         SCM t = gh_apply (proc, scm_list_n (time_scaled_musics_[i]->self_scm (), SCM_UNDEFINED));
          glep->set_property ("text", t);
        }
       
+      announce_grob (glep, time_scaled_musics_ [i]->self_scm ());
     }
 }
 
@@ -92,7 +94,7 @@ Tuplet_engraver::acknowledge_grob (Grob_info i)
 {
   if (Note_column::has_interface (i.grob_))
     {
-      for (int j =0; j started_spanners_.size (); j++)
+      for (int j =0; j  <started_spanners_.size (); j++)
        if (started_spanners_[j]) 
          Tuplet_bracket::add_column (started_spanners_[j], dynamic_cast<Item*> (i.grob_));
     }
@@ -117,6 +119,8 @@ Tuplet_engraver::start_translation_timestep ()
              if (!sp->get_bound (RIGHT))
                sp->set_bound (RIGHT, sp->get_bound (LEFT));
              
+             typeset_grob (sp);
+
              started_spanners_[i] =0;
            }
          
@@ -134,10 +138,20 @@ Tuplet_engraver::start_translation_timestep ()
     }
 }
 
-Tuplet_engraver::Tuplet_engraver ()
+void
+Tuplet_engraver::finalize ()
 {
+  for (int i=0; i < started_spanners_.size (); i++)
+    {
+      if (started_spanners_[i])
+       typeset_grob (started_spanners_[i]);
+    }  
 }
 
+
+
+Tuplet_engraver::Tuplet_engraver (){}
+
 ENTER_DESCRIPTION (Tuplet_engraver,
 /* descr */       "Catch Time_scaled_music and generate appropriate bracket  ",
 /* creats*/       "TupletBracket",
index 0dd91b2352428af70e9e4a4a3bd7cf5f1ab85694..70ee5a4dfbb44727e246fdc01faf069a9835b1b3 100644 (file)
@@ -30,22 +30,22 @@ Unfolded_repeat_iterator::get_music_list () const
   SCM body = get_music ()->get_property ("element");
   SCM alts = get_music ()->get_property ("elements");
   int alt_count = scm_ilength (alts);
-  int rep_count = ly_scm2int (get_music ()->get_property ("repeat-count"));
+  int rep_count = gh_scm2int (get_music ()->get_property ("repeat-count"));
 
   for (int i = 0; i < rep_count; i++)
     {
       if (unsmob_music (body))
-       *tail = scm_cons (body, SCM_EOL) ;
+       *tail = gh_cons (body, SCM_EOL) ;
 
       tail = SCM_CDRLOC (*tail);
 
       if (alt_count)
        {
-         *tail = scm_cons (ly_car (alts), SCM_EOL);
+         *tail = gh_cons (gh_car (alts), SCM_EOL);
          tail = SCM_CDRLOC (*tail);
          if (i >= rep_count - alt_count)
            
-           alts = ly_cdr (alts);
+           alts = gh_cdr (alts);
        }      
     }
 
@@ -81,7 +81,7 @@ Volta_repeat_iterator::Volta_repeat_iterator ()
 SCM
 Volta_repeat_iterator::get_music_list ()const
 {
-  return scm_cons (get_music ()->get_property ("element"),
+  return gh_cons (get_music ()->get_property ("element"),
                  get_music ()->get_property ("elements"));
 }
 
@@ -93,7 +93,7 @@ Volta_repeat_iterator::construct_children ()
   SCM alts = get_music ()->get_property ("elements");
 
   alt_count_ = scm_ilength (alts);
-  rep_count_ = ly_scm2int (get_music ()->get_property ("repeat-count"));
+  rep_count_ = gh_scm2int (get_music ()->get_property ("repeat-count"));
   done_count_ = 0;
 }
 
@@ -109,9 +109,9 @@ Volta_repeat_iterator::add_repeat_command (SCM what)
 
   Context * where = get_outlet ()->where_defined (reps);
   if (where
-      && current_reps == SCM_EOL || ly_c_pair_p (current_reps))
+      && current_reps == SCM_EOL || gh_pair_p (current_reps))
     {
-      current_reps = scm_cons (what, current_reps);
+      current_reps = gh_cons (what, current_reps);
       where->internal_set_property (reps, current_reps);
     }
 }
index 94cccf6f08bdfa9f983b1a62d0420a2091fda9c4..8fd1a60d903b8270c68aced28b5a5fd4f497f3d7 100644 (file)
@@ -14,7 +14,7 @@
 #include "staff-symbol-referencer.hh"
 #include "font-interface.hh"
 #include "warn.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "paper-column.hh"
 
 /*
@@ -48,7 +48,7 @@ Vaticana_ligature_engraver::Vaticana_ligature_engraver ()
 Spanner *
 Vaticana_ligature_engraver::create_ligature_spanner ()
 {
-  return make_spanner ("VaticanaLigature", SCM_EOL);
+  return make_spanner ("VaticanaLigature");
 }
 
 bool
@@ -155,7 +155,7 @@ Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
     dynamic_cast<Item*> (primitives[0].grob_)->get_column ();
 
   Real join_thickness =
-    thickness * column->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+    thickness * column->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
 
   /*
    * Amount of extra space two put between some particular
@@ -176,9 +176,9 @@ Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
     {
       Item *primitive = dynamic_cast<Item*> (primitives[i].grob_);
       int prefix_set =
-       ly_scm2int (primitive->get_property ("prefix-set"));
+       gh_scm2int (primitive->get_property ("prefix-set"));
       int context_info =
-       ly_scm2int (primitive->get_property ("context-info"));
+       gh_scm2int (primitive->get_property ("context-info"));
 
       /*
        * Get glyph_name, delta_pitch and context_info for this head.
@@ -200,7 +200,7 @@ Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
          SCM delta_pitch_scm = prev_primitive->get_property ("delta-pitch");
          if (delta_pitch_scm != SCM_EOL)
            {
-             delta_pitch = ly_scm2int (delta_pitch_scm);
+             delta_pitch = gh_scm2int (delta_pitch_scm);
            }
          else
            {
@@ -258,7 +258,7 @@ Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
        * Save the head's final x-offset.
        */
       primitive->set_property ("x-offset",
-                                   scm_make_real (x_offset));
+                                   gh_double2scm (x_offset));
 
       /*
        * If the head is the 2nd head of a pes or flexa (but not a
@@ -277,7 +277,7 @@ Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
          else
            {
              prev_primitive->set_property ("add-join",
-                                                ly_bool2scm (true));
+                                                gh_bool2scm (true));
 
              /*
               * Create a small overlap of adjacent heads so that the join
@@ -335,7 +335,7 @@ void
 check_for_prefix_loss (Item *primitive)
 {
   int prefix_set =
-    ly_scm2int (primitive->get_property ("prefix-set"));
+    gh_scm2int (primitive->get_property ("prefix-set"));
   if (prefix_set & ~PES_OR_FLEXA)
     {
       String prefs = Gregorian_ligature::prefixes_to_str (primitive);
@@ -365,7 +365,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
     SCM delta_pitch_scm = primitive->get_property ("delta-pitch");
     if (delta_pitch_scm != SCM_EOL)
       {
-       delta_pitch = ly_scm2int (delta_pitch_scm);
+       delta_pitch = gh_scm2int (delta_pitch_scm);
       }
     else
       {
@@ -377,14 +377,14 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
 
     /* retrieve & complete prefix_set and context_info */
     int prefix_set =
-      ly_scm2int (primitive->get_property ("prefix-set"));
+      gh_scm2int (primitive->get_property ("prefix-set"));
     int context_info =
-      ly_scm2int (primitive->get_property ("context-info"));
+      gh_scm2int (primitive->get_property ("context-info"));
     if (is_stacked_head (prefix_set, context_info))
       {
        context_info |= STACKED_HEAD;
        primitive->set_property ("context-info",
-                                     scm_int2num (context_info));
+                                     gh_int2scm (context_info));
       }
 
     /*
@@ -397,7 +397,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
     if (prefix_set & VIRGA)
       {
        glyph_name = "vaticana_punctum";
-       primitive->set_property ("add-stem", ly_bool2scm (true));
+       primitive->set_property ("add-stem", gh_bool2scm (true));
       }
     else if (prefix_set & QUILISMA)
       glyph_name = "vaticana_quilisma";
@@ -459,7 +459,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
               * placed somewhere else.
               */
              prev_primitive->set_property ("add-cauda",
-                                                ly_bool2scm (false));
+                                                gh_bool2scm (false));
            }
          glyph_name = "vaticana_reverse_plica";
        }
@@ -490,7 +490,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
      */
     if ((context_info & FLEXA_LEFT) && !(context_info & PES_UPPER))
       if (!String::compare (glyph_name, "vaticana_punctum"))
-       primitive->set_property ("add-cauda", ly_bool2scm (true));
+       primitive->set_property ("add-cauda", gh_bool2scm (true));
 
     /*
      * Execptional rule for porrectus:
@@ -504,16 +504,16 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
        check_for_prefix_loss (prev_primitive);
        prev_glyph_name = "flexa";
        prev_primitive->set_property ("flexa-height",
-                                          scm_int2num (prev_delta_pitch));
+                                          gh_int2scm (prev_delta_pitch));
        prev_primitive->set_property ("flexa-width",
-                                          scm_make_real (flexa_width));
+                                          gh_double2scm (flexa_width));
        bool add_cauda = !(prev_prefix_set && PES_OR_FLEXA);
        prev_primitive->set_property ("add-cauda",
-                                          ly_bool2scm (add_cauda));
+                                          gh_bool2scm (add_cauda));
        check_for_prefix_loss (primitive);
        glyph_name = "";
        primitive->set_property ("flexa-width",
-                                     scm_make_real (flexa_width));
+                                     gh_double2scm (flexa_width));
       }
 
     /*
@@ -546,7 +546,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
      * ligature grob's value for thickness to each ligature head (even
      * if not all of them need to know).
      */
-    primitive->set_property ("thickness", scm_make_real (thickness));
+    primitive->set_property ("thickness", gh_double2scm (thickness));
 
     prev_primitive = primitive;
     prev_prefix_set = prefix_set;
@@ -573,7 +573,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
                             "setting `spacing-increment = %f': ptr=%ul",
                             ligature_width, paper_column));
   paper_column->
-    set_property ("forced-spacing", scm_make_real (ligature_width));
+    set_property ("forced-spacing", gh_double2scm (ligature_width));
 #endif
 }
 
index 2528586aa1c002ed5d866c6ac7cdeee5495060f9..169be2404ae27c36a2ce1a4927731b59f6b10c46 100644 (file)
@@ -14,7 +14,7 @@
 #include "lookup.hh"
 #include "staff-symbol-referencer.hh"
 #include "note-head.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "bezier.hh"
 #include "warn.hh"
 
@@ -71,14 +71,14 @@ vaticana_brew_flexa (Grob *me,
                     Real line_thickness)
 {
   Real staff_space = Staff_symbol_referencer::staff_space (me);
-  Stencil stencil;
+  Stencil stencil = Stencil ();
   Real right_height = 0.6 * staff_space;
 
   Real interval;
   SCM flexa_height_scm = me->get_property ("flexa-height");
   if (flexa_height_scm != SCM_EOL)
     {
-      interval = ly_scm2int (flexa_height_scm);
+      interval = gh_scm2int (flexa_height_scm);
     }
   else
     {
@@ -230,17 +230,17 @@ vaticana_brew_primitive (Grob *me, bool ledger_take_space)
   Real thickness = robust_scm2double ( me->get_property ("thickness"), 1);
 
   Real line_thickness =
-    thickness * me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+    thickness * me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
 
   Real blotdiameter =
-    (me->get_paper ()->get_dimension (ly_symbol2scm ("blotdiameter")));
+    (me->get_paper ()->get_realvar (ly_symbol2scm ("blotdiameter")));
 
   int pos = Staff_symbol_referencer::get_rounded_position (me);
 
   SCM delta_pitch_scm = me->get_property ("delta-pitch");
   int delta_pitch;
   if (delta_pitch_scm != SCM_EOL)
-    delta_pitch = ly_scm2int (delta_pitch_scm);
+    delta_pitch = gh_scm2int (delta_pitch_scm);
   else
     delta_pitch = 0;
 
index 7ad89b9b345be5986f1accdbdf8cd957e0be878a..b703745c4b5be2c852930d7ddf1e4fee1cf59936 100644 (file)
@@ -35,8 +35,9 @@ Vertical_align_engraver::process_music ()
 {
   if (!valign_)
     {
-      valign_ = make_spanner ("VerticalAlignment", SCM_EOL);
+      valign_ =make_spanner ("VerticalAlignment");
       valign_->set_bound (LEFT,unsmob_grob (get_property ("currentCommandColumn")));
+      announce_grob (valign_ , SCM_EOL);
     }
 }
 
@@ -46,7 +47,8 @@ Vertical_align_engraver::finalize ()
   if (valign_)
     {
       valign_->set_bound (RIGHT,unsmob_grob (get_property ("currentCommandColumn")));
-      valign_ = 0;
+      typeset_grob (valign_);
+      valign_ =0;
     }
 }
 
index d63d8b74a00ec9e7540497ac60433bfe9741d065..ba4580e92992bb9046d667c4eb3ad7919a75c363 100644 (file)
@@ -11,44 +11,25 @@ source file of the GNU LilyPond music typesetter
 #include "virtual-font-metric.hh"
 #include "all-font-metrics.hh"
 #include "stencil.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 
 
 /*
   passing DEF is ughish. Should move into paperdef?
   */
-Virtual_font_metric::Virtual_font_metric (SCM font_list)
+Virtual_font_metric::Virtual_font_metric (SCM name_list, 
+                                         Real mag,Paper_def*def)
 {
   font_list_ = SCM_EOL;
   SCM *tail = &font_list_;
-
-  SCM mag = SCM_EOL;
-  SCM name_list = SCM_EOL;
-  SCM *name_tail = &name_list;
-  
-  for (SCM s = font_list; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = name_list; gh_pair_p (s); s = gh_cdr (s))
     {
-      if (Font_metric *fm = unsmob_metrics (ly_car (s)))
-       {
-         *tail =  scm_cons (ly_car (s),SCM_EOL);
-         tail = SCM_CDRLOC (*tail);
+      SCM nm = gh_car (s);
 
-         if (!ly_c_number_p (mag))
-           /* Ugh.  */
-           mag = ly_cdr (fm->description_);
-
-         *name_tail = scm_cons (ly_car (fm->description_), SCM_EOL);
-         name_tail = SCM_CDRLOC (*name_tail);
-       }
+      Font_metric *fm = def->find_font (nm, mag);
+      *tail =  scm_cons (fm->self_scm (),SCM_EOL);
+      tail = SCM_CDRLOC (*tail);
     }
-
-  description_ = scm_cons (name_list, mag);
-}
-
-Real 
-Virtual_font_metric::design_size () const
-{
-  return unsmob_metrics (ly_car (font_list_))-> design_size ();
 }
 
 void
@@ -61,8 +42,11 @@ int
 Virtual_font_metric::count () const
 {
   int k = 0;
-  for (SCM s = font_list_; ly_c_pair_p (s); s = ly_cdr (s))
-      k += unsmob_metrics (ly_car (s))->count ();
+  for (SCM s = font_list_; gh_pair_p (s); s = gh_cdr (s))
+    {
+      k+= unsmob_metrics (gh_car (s))->count ();
+    }
+
   return k;
 }
 
@@ -70,13 +54,15 @@ Stencil
 Virtual_font_metric::find_by_name (String glyph) const
 {
   Stencil m;  
-  for (SCM s = font_list_; m.is_empty () && ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = font_list_; m.is_empty () && gh_pair_p (s); s = gh_cdr (s))
     {
-      m = unsmob_metrics (ly_car (s))->find_by_name (glyph);
+      m = unsmob_metrics (gh_car (s))->find_by_name (glyph);
     }
 
   return m;
 }
+  
+  
 
 Box
 Virtual_font_metric::get_ascii_char (int)  const
@@ -92,17 +78,22 @@ Virtual_font_metric::get_ascii_char_stencil (int )  const
   return Stencil ();
 }
 
+
 Offset
 Virtual_font_metric::get_indexed_wxwy (int code)  const
 {
   int total = 0;
-  for (SCM s = font_list_; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = font_list_; gh_pair_p (s); s = gh_cdr (s))
     {
-      Font_metric *fm = unsmob_metrics (ly_car (s));
+      Font_metric* fm = unsmob_metrics (gh_car (s));
       if (code < total + fm->count ())
-       return fm->get_indexed_wxwy (code - total);
+       {
+         return fm->get_indexed_wxwy (code - total);
+       }
       total += fm->count ();
     }
+
+  
   return Offset (0,0);
 }
 
@@ -110,32 +101,39 @@ Box
 Virtual_font_metric::get_indexed_char (int code)  const
 {
   int total = 0;
-  for (SCM s = font_list_; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = font_list_; gh_pair_p (s); s = gh_cdr (s))
     {
-      Font_metric *fm = unsmob_metrics (ly_car (s));
+      Font_metric* fm = unsmob_metrics (gh_car (s));
       if (code < total + fm->count ())
-       return fm->get_indexed_char (code - total);
+       {
+         return fm->get_indexed_char (code - total);
+       }
       total += fm->count ();
     }
+
+  
   return Box ();
 }
 
+
 int 
 Virtual_font_metric::name_to_index (String glyph) const
 {
   Stencil m;
   int total = 0; 
-  for (SCM s = font_list_; m.is_empty () && ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = font_list_; m.is_empty () && gh_pair_p (s); s = gh_cdr (s))
     {
-      Font_metric *m =unsmob_metrics (ly_car (s));
+      Font_metric *m =unsmob_metrics (gh_car (s));
       int k = m->name_to_index (glyph);
       if (k >= 0)
        return total + k;
 
       total += m->count ();
     }
+
   return -1;
 }
+
   
 Stencil
 Virtual_font_metric::get_indexed_char_stencil (int code)  const
@@ -143,39 +141,17 @@ Virtual_font_metric::get_indexed_char_stencil (int code)  const
   Stencil  m ;  
   int total = 0;
   
-  for (SCM s = font_list_; ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = font_list_; gh_pair_p (s); s = gh_cdr (s))
     {
-      Font_metric *fm = unsmob_metrics (ly_car (s));
+      Font_metric* fm = unsmob_metrics (gh_car (s));
       if (code < total + fm->count ())
        {
-         /* Ugh.  */
-         m = fm->get_indexed_char_stencil (code - total);
+         m = fm->get_indexed_char_stencil (code - total); // ugh.
          break; 
        }
       total += fm->count ();
     }
-  return m;
-}
-
 
-SCM
-Virtual_font_metric::get_font_list () const
-{
-  return font_list_;
-}
-
-LY_DEFINE (ly_make_virtual_font, "ly:make-virtual-font", 0, 0, 1,
-          (SCM args),
-          "Make a virtual font metric from @var{args}, "
-          "a list of font objects.")
-{
-  Virtual_font_metric *fm = new Virtual_font_metric (args);
-  return scm_gc_unprotect_object (fm->self_scm ());
-}
-
-String
-Virtual_font_metric::coding_scheme () const
-{
-  Font_metric *fm = unsmob_metrics (ly_car (font_list_));
-  return fm->coding_scheme ();
+  return m;
 }
+  
index 9f4d8a505f8d87c54e5f6449906dc031b1f0a094..119868b189bddcbeddd42743d0bc4d72ab7a545f 100644 (file)
@@ -14,7 +14,7 @@
 #include "line-interface.hh"
 #include "stencil.hh"
 #include "paper-column.hh"
-#include "output-def.hh"
+#include "paper-def.hh"
 #include "text-item.hh"
 #include "volta-bracket.hh"
 #include "group-interface.hh"
@@ -56,7 +56,7 @@ Volta_bracket_interface::print (SCM smob)
   SCM glyph = endbar->get_property ("glyph");
   
   String str;
-  if (ly_c_string_p (glyph))
+  if (gh_string_p (glyph))
     str = ly_scm2string (glyph);
   else
     return SCM_EOL;
@@ -66,7 +66,7 @@ Volta_bracket_interface::print (SCM smob)
     (strcmp (cs,":|")!=0 && strcmp (cs,"|:")!=0 && strcmp (cs,"|.")!=0
      && strcmp (cs,":|:")!=0 && strcmp (cs,".|")!=0);
 
-  Output_def * paper =me->get_paper ();
+  Paper_def * paper =me->get_paper ();
   Real half_space = 0.5;
 
   Item * bound = dynamic_cast<Spanner*> (me)->get_bound (LEFT);
index 6215489426a523c0ad6b280c779c0575f351fd6a..d0bf95641940341f2635a16432e8a09aa7f4f47b 100644 (file)
@@ -82,7 +82,7 @@ Volta_engraver::staff_eligible ()
        volta engraver in score context or somesuch.
        
       */
-      if (!ly_c_pair_p (staffs))
+      if (!gh_pair_p (staffs))
        {
          programming_error ("Huh? Volta engraver can't find staffs?");
          return false;
@@ -106,13 +106,13 @@ Volta_engraver::process_music ()
     
   bool  end = false;
   start_string_ = SCM_EOL;
-  while (ly_c_pair_p (cs))
+  while (gh_pair_p (cs))
     {
       SCM c = ly_car (cs);
 
-      if (ly_c_pair_p (c)
+      if (gh_pair_p (c)
          && ly_car (c) == ly_symbol2scm ("volta")
-         && ly_c_pair_p (ly_cdr (c)))
+         && gh_pair_p (ly_cdr (c)))
        {
          if (ly_cadr (c) ==  SCM_BOOL_F)
            end = true;
@@ -146,7 +146,7 @@ Volta_engraver::process_music ()
     }
 
   if (volta_span_ && 
-      (ly_c_string_p (start_string_) || ly_c_pair_p (start_string_)))
+      (gh_string_p (start_string_) || gh_pair_p (start_string_)))
     {
       warning (_ ("Already have a volta spanner.  Stopping that one prematurely."));
       
@@ -161,13 +161,13 @@ Volta_engraver::process_music ()
     }
 
   if (!volta_span_ && 
-      (ly_c_string_p (start_string_) || ly_c_pair_p (start_string_)))
+      (gh_string_p (start_string_) || gh_pair_p (start_string_)))
     {
       started_mom_ = now_mom () ;
 
-      volta_span_ = make_spanner ("VoltaBracket", SCM_EOL);
+      volta_span_ = make_spanner ("VoltaBracket");
 
-      
+      announce_grob (volta_span_, SCM_EOL);
       volta_span_->set_property ("text", start_string_);
     }
 }
@@ -207,6 +207,14 @@ Volta_engraver::acknowledge_grob (Grob_info i)
 void
 Volta_engraver::finalize ()
 {
+  if (volta_span_)
+    {
+      typeset_grob (volta_span_);
+    }
+  if (end_volta_span_)
+    {
+      typeset_grob (end_volta_span_);
+    }
 }
 
 
@@ -227,7 +235,11 @@ Volta_engraver::stop_translation_timestep ()
       volta_span_ = 0;
     }
   
-  end_volta_span_ =0;
+  if (end_volta_span_)
+    {
+      typeset_grob (end_volta_span_);
+      end_volta_span_ =0;
+    }
 }
 
 /*
diff --git a/lily/warn.cc b/lily/warn.cc
new file mode 100644 (file)
index 0000000..9193017
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+  warn.cc -- implement warning and error messages. Needs cleanup.
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include <stdio.h>
+
+#include "string.hh"
+#include "main.hh"
+
+void
+progress_indication (String s)
+{
+ fputs (s.to_str0 (), stderr);
+ fflush (stderr);
+}
+
index 91808038f2d711e01d104ba3cd8534c93635b3fd..64240acd9ee2a360ed9aed0d5d8658527bf150fb 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.2.0"
+\version "2.1.36"
 % a3-init.ly
 
 hsize = 296.9 \mm
index ca343e448fc79309c34d452b5240386ff039ee5a..12b7d2bf2401ba256c805b2e506442ebb958fc18 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.2.0"
+\version "2.1.36"
 % a4.ly
 
 hsize = 210.0 \mm
index 2ee0a90d2b6a5be9ff72c947d6af6152c890e827..6cf9d04d7e6165633aa96add22d6dfa5ed20fa9c 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.2.0"
+\version "2.1.36"
 % Symbols needed to print accordion music
 % 
 %  2' = T
index cbb5a6c54bbfc6c01e9794e3f5b8950dbb813172..c4ae2ee4a0129451a2b72157923d546aee7dc4e2 100644 (file)
@@ -1,6 +1,6 @@
 % Toplevel initialisation file. 
        
-\version "2.2.0"
+\version "2.1.36"
 
 
 \include "declarations-init.ly"
diff --git a/ly/book-paper-defaults.ly b/ly/book-paper-defaults.ly
deleted file mode 100644 (file)
index 381d665..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-\version "2.3.2"
-
-\bookpaper {
-    unit = #(ly:unit)
-    mm = 1.0
-    in = 25.4
-    pt = #(/  in 72.27)
-    cm = #(* 10 mm)
-
-    inputencoding = #"TeX"
-    
-   %
-   % 20pt staff, 5 pt = 1.75 mm
-   %
-
-   outputscale = #1.7573
-    
-    #(define-public score-title default-score-title)
-    #(define-public user-title default-user-title)
-    #(define-public book-title default-book-title)
-
-    %
-    % ugh. hard coded?
-    %
-    
-    #(paper-set-staff-size (* 20.0 pt))
-
-
-  papersize = "a4"
-
-    #(define font-defaults
-      '((font-encoding . fetaMusic)))
-
-    #(define text-font-defaults
-      '((font-encoding . latin1)
-       (baseline-skip . 2)
-       (word-space . 0.6)))
-
-    #(define page-breaking ly:optimal-page-breaks)
-    #(define page-music-height default-page-music-height )
-    #(define page-make-stencil default-page-make-stencil )
-
-    #(define make-header plain-header)
-    #(define make-footer plain-footer)
-   
-}
index f0425045647ae0b63743393c1b4ea71c3509aede..a6ad8d66b825f0d1d6d6fb2c4f6d17e101aa9853 100644 (file)
@@ -73,6 +73,4 @@ pitchnamesCatalan = #`(
 
 pitchnames = \pitchnamesCatalan
 
-\version "2.2.0"
-
-#(ly:parser-set-note-names parser pitchnames)
+\version "2.1.36"
index 8c750ef92c9bc8008c3bc0eb368aba21c5c115f0..699d0638c66bd8d74745ade9eae2b6ca1b302805 100644 (file)
@@ -1,6 +1,6 @@
 % Toplevel initialisation file. 
        
-\version "2.2.0"
+\version "2.1.36"
 
 
 \include "declarations-init.ly"
index e5bd41aea181e09ce9d85949ea11ad065909838b..3e528ae1b6a8deeae9931f3ff1db5d2b96a164f9 100644 (file)
@@ -1,10 +1,12 @@
-\version "2.2.0"
+\version "2.1.36"
 
 chordmodifiers = #default-chord-modifier-list
 
-whiteTriangleMarkup = \markup { \override #'(font-encoding . TeX-math) "M" } 
+whiteTriangleMarkup = #(make-override-markup
+                       '(font-encoding . math) (make-simple-markup "M"))
 
-blackTriangleMarkup = \markup { \override #'(font-encoding . TeX-math) "N" }
+blackTriangleMarkup = #(make-override-markup
+                       '(font-encoding . math) (make-simple-markup "N"))
 
 ignatzekExceptionMusic = \notes{
        <c e gis>1-\markup { "+" }
index 92ec2ee052f7b42b471375391bc670d7a130388c..d39b6914111fde828cfa13a59e65cb6fc8be7b94 100644 (file)
@@ -1,11 +1,10 @@
 #(ly:set-option 'old-relative)
 
-\version "2.3.2"
+\version "2.1.36"
 breve = #(ly:make-duration -1 0)
 longa = #(ly:make-duration -2 0 )
 maxima = #(ly:make-duration -3 0)
 
-\include "music-functions-init.ly"
 \include "nederlands.ly"               % dutch
 \include "drumpitch-init.ly"           
 \include "chord-modifiers-init.ly"
@@ -28,23 +27,13 @@ should also set allowBeamBreak, but how to do it "portably"? (ie. also
 working with lyric sections)
 
 %}
-
-%% rather name \newline, \newpage ?
-break = #(make-event-chord (list (make-penalty-music -10001 0)))
-noBreak = #(make-event-chord (list (make-penalty-music 10001 0)))
-pageBreak = #(make-event-chord (list (make-penalty-music -10001 -10001)))
-pagebreak = \pageBreak % ugh.
-noPageBreak = #(make-event-chord (list (make-penalty-music 0 10001)))
-noPagebreak = \noPageBreak % ugh
+break =#(make-event-chord (list (make-penalty-music -10001)))
+noBreak = #(make-event-chord (list (make-penalty-music 10001)))
 
 noBeam = #(make-music 'BeamForbidEvent) 
-pipeSymbol = #(make-music 'BarCheck)
-
-foo = \notes { \pageBreak }
 
 \include "scale-definitions-init.ly"
 
-
 melisma = #(make-span-event 'ManualMelismaEvent START)
 melismaEnd = #(make-span-event 'ManualMelismaEvent STOP)
 
@@ -53,29 +42,49 @@ melismaEnd = #(make-span-event 'ManualMelismaEvent STOP)
 % ugh
 \include "midi-init.ly"
 
-\include "book-paper-defaults.ly"
 
+% Do units first; must be done before any units are specified.
 \paper {
-    mm = #(ly:output-def-lookup $defaultbookpaper  'mm)
-    unit = #(ly:output-def-lookup $defaultbookpaper  'unit)
-
-    in = #(* 25.4 mm)
+    unit = #(ly:unit)
+    mm = 1.0
+    in = 25.4
     pt = #(/  in 72.27)
     cm = #(* 10 mm)
+
+    raggedright = ##f
+    raggedlast = ##f 
+    packed = ##f
+    #(define $is-paper #t)
+    
+    #(define font-defaults
+      '((font-encoding . music))
+      )
+
+    #(define text-font-defaults
+      '((font-encoding . text)
+       (baseline-skip . 2)
+       (word-space . 0.6)
+       ))
+
+    #(define page-breaking ly:ragged-page-breaks)
+    %#(define page-breaking ly:optimal-page-breaks)
     
     \include "engraver-init.ly"
 }
 
-
 #(set-default-paper-size "a4")
 
 
-
 %{
 
-%% these would supercede defaults in \bookpaper.
-% let's comment this out for now. 
+; note:
+; you can add fonts manually  in the paper block by issuing
 
+#(set! fonts (append ...myfonts... fonts))
+
+for the format of myfonts, see font.scm
+
+%}
 
 paperEleven = \paper {
     #(paper-set-staff-size (* 11.0 pt))
@@ -107,17 +116,15 @@ paperTwentysix = \paper {
 
 \paper { \paperTwenty }
 
-%}
-
 partCombineListener = \paper {
  \context {
-         \Voice
+         \VoiceContext
          \consists Note_heads_engraver
          \consists Rest_engraver
          \type "Recording_group_engraver"
          recordEventSequence = #notice-the-events-for-pc
  }
- \context { \Score skipTypesetting = ##t }
+ \context { \ScoreContext skipTypesetting = ##t }
 }
 
 #(set-part-combine-listener partCombineListener)
@@ -127,15 +134,11 @@ partCombineListener = \paper {
 
 \include "property-init.ly"
 
-%% reset default duration
-unusedEntry = \notes { c4 }
 
-%% must have size argument for GUILE 1.6 compat.
-#(define musicQuotes (make-hash-table 29))
 
-%%#(define-public toplevel-music-handler ly:parser-add-book-and-score)
-#(define toplevel-book-handler default-toplevel-book-handler)
-#(define toplevel-music-handler default-toplevel-music-handler)
-#(define toplevel-score-handler default-toplevel-score-handler)
+% reset default duration
+unusedEntry = \notes { c4 }
+
 
-#(define toplevel-score-handler default-toplevel-score-handler)
+% must have size argument for GUILE 1.6 compat.
+#(define musicQuotes (make-hash-table 29)) 
index d58a6267b8b9e4ca6b3a565ed6b12f3e67101c6b..38fcfaa75e9a6689b62d8710ac429643a2131db1 100644 (file)
@@ -49,6 +49,4 @@ pitchnamesDeutsch = #`(
 
 pitchnames = \pitchnamesDeutsch
 
-\version "2.2.0"
-
-#(ly:parser-set-note-names parser pitchnames)
+\version "2.1.36"
index 58672f9a6ab81b99f363f471ee16180ffa3c85fe..c9339e1c1e4059ebe7e904af9e0e951d8c59006b 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.2.0"
+\version "2.1.36"
 
 drumPitchNames =
 #'((acousticbassdrum . acousticbassdrum)
index 535c565e08bbbe800a71f00b0cb7eae8be1365a0..82b864ba0de2abe8c7ce45c39190def60ca9524d 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.2.0"
+\version "2.1.36"
 
 %
 % declare the standard dynamic identifiers.
index 5c35e15315111b06c0149c1a39eb500783afa144..f0535243d65b762dc074888906ca4ab0195453ce 100644 (file)
@@ -87,7 +87,5 @@ pitchnamesEnglish = #`(
 
 pitchnames = \pitchnamesEnglish
 
-\version "2.2.0"
+\version "2.1.36"
 
-
-#(ly:parser-set-note-names parser pitchnames)
index 0b2a4479028ada041961dd98beaac68d79413eed..49245a2fbe6e8b14c4e657a14e22e84924ab837c 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.2"
+\version "2.1.36"
 
 \context {
     \name Global
@@ -8,6 +8,10 @@
     \grobdescriptions #all-grob-descriptions    
 }
 
+%
+% setup for Request->Element conversion. Guru-only
+%
+
 \context {
        \type "Engraver_group_engraver"
        \name Staff
@@ -44,7 +48,6 @@
        verticalExtent = ##f 
        localKeySignature = #'()
        createSpacing = ##t
-       
        % explicitly set instrument, so we don't get 
        % weird effects when doing instrument names for
        % piano staves
@@ -59,7 +62,7 @@
 }
 
 \context {
-    \Staff
+    \StaffContext
     \type "Engraver_group_engraver"
     \name DrumStaff
     \alias Staff
@@ -86,6 +89,7 @@
     \name InnerChoirStaff
     \consists "System_start_delimiter_engraver"
     systemStartDelimiter = #'SystemStartBracket
+    localKeySignature = #'()
 
     \accepts "Staff"
     \accepts "DrumStaff"
 }
 
 \context {
-       \InnerChoirStaff
+       \InnerChoirStaffContext
        \name ChoirStaff
        
        \accepts "InnerChoirStaff"
 }
 
 \context {
-    \Voice
+    \VoiceContext
     \name DrumVoice
     \alias Voice
 
 }
 
 \context{
-    \GrandStaff
+    \GrandStaffContext
     \name "PianoStaff"
     \alias "GrandStaff"
 
 \context {
     \type "Engraver_group_engraver"
     \name InnerStaffGroup
+    localKeySignature = #'()
 
     \consists "Span_bar_engraver"
     \consists "Span_arpeggio_engraver"
 }
 
 \context {
-    \InnerStaffGroup
+    \InnerStaffGroupContext
     \name StaffGroup
     
     \description
@@ -368,7 +373,7 @@ printing of a single line of lyrics.  "
 
 
 RemoveEmptyStaffContext= \context {
-    \Staff
+    \StaffContext
     \remove "Axis_group_engraver"
     \consistsend "Hara_kiri_engraver"
     \override Beam #'auto-knee-gap = #'()
@@ -385,6 +390,7 @@ AncientRemoveEmptyStaffContext = \context {
 \context {
     \type Score_engraver
     \name Score
+    localKeySignature = #'()
 
     \description "This is the top level notation context.  No
     other context can contain a @code{Score} context.  This context
@@ -536,7 +542,7 @@ AncientRemoveEmptyStaffContext = \context {
        (Voice NoteHead  font-size -3)
        (Voice Dots  font-size -3)
        (Voice Stem beamed-lengths  
-        ,(map (lambda (x) (* 0.8 x)) '(3.3 3.3 4.0)))
+        ,(map (lambda (x) (* 0.8 x)) '(3.26)))
        (Voice Stem beamed-minimum-free-lengths  
         ,(map (lambda (x) (* 0.8 x)) '(2.5 2.0 1.5)))
        (Voice Stem beamed-extreme-minimum-free-lengths  
@@ -553,8 +559,12 @@ AncientRemoveEmptyStaffContext = \context {
     
 }
 
-EasyNotation = \context {      % TODO: why \context override? 
-       \Score
+OrchestralScoreContext = \context {
+       \ScoreContext
+}
+
+EasyNotation = \context {
+       \ScoreContext
        \override NoteHead #'print-function = #Note_head::brew_ez_stencil
        \override NoteHead #'Y-extent-callback = #'()
        \override NoteHead #'X-extent-callback = #'()
@@ -586,7 +596,7 @@ EasyNotation = \context {   % TODO: why \context override?
     }
 
 \context {
-      \Voice
+      \VoiceContext
       \name "TabVoice"
       \consists "Tab_note_heads_engraver"
       \remove "Note_heads_engraver"
@@ -608,7 +618,7 @@ EasyNotation = \context {   % TODO: why \context override?
 }
 
 \context {
-      \Staff
+      \StaffContext
       \alias "Staff"
       \name "TabStaff"
       \denies "Voice"
@@ -638,14 +648,14 @@ EasyNotation = \context { % TODO: why \context override?
 % but this does not work (is this a bug or intended behaviour?):
 %
 % If I try to do so, I get "error: unknown escaped string:
-% `\VaticanaStaff'" in params-init.ly.  If I also move
+% `\VaticanaStaffContext'" in params-init.ly.  If I also move
 % "\context { \Vaticana*Context }" from params-init.ly to the end
 % of gregorian-init.ly, then I get "error: parse error, unexpected
-% TRANSLATOR: \context { \VaticanaStaff }" in
+% TRANSLATOR: \context { \VaticanaStaffContext }" in
 % gregorian-init.ly. --jr
 
 \context {
-  \Voice
+  \VoiceContext
   \name "VaticanaVoice"
   \alias "Voice"
   \description "Same as @code{Voice} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
@@ -674,7 +684,7 @@ EasyNotation = \context {   % TODO: why \context override?
 }
 
 \context {
-  \Staff
+  \StaffContext
   \name "VaticanaStaff"
   \alias "Staff"
   \denies "Voice"
@@ -713,7 +723,7 @@ EasyNotation = \context {   % TODO: why \context override?
 }
 
 \context {
-  \Voice
+  \VoiceContext
   \name "GregorianTranscriptionVoice"
   \alias "Voice"
 
@@ -738,7 +748,7 @@ EasyNotation = \context {   % TODO: why \context override?
   \override TextSpanner #'edge-text = #'("" . "")
 }
  \context {
-  \Staff
+  \StaffContext
   \name "GregorianTranscriptionStaff"
   \alias "Staff"
   \denies "Voice"
index 6fe014bcb594c2923c701db78799f5ad8cf4dc3a..93ff1257718513982652e2e7353654c9e5221edb 100644 (file)
@@ -58,6 +58,4 @@ pitchnamesEspanol = #`(
 
 pitchnames = \pitchnamesEspanol
 
-\version "2.2.0"
-
-#(ly:parser-set-note-names parser pitchnames)
+\version "2.1.36"
index b748657b22b6ca1e3f10ed9442f033d071463b23..813b21cc3408025c52a63bf396508b362e1542aa 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.2.0"
+\version "2.1.36"
 
 %
 % Running LilyPond on this file generates the documentation
index 8f77e80ceebc103e9759b22f9a0d1cf1021d8c2d..2a6696268db8e0d93744c710ab7e57b12e6132a2 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.2.0"
+\version "2.1.36"
 
 %
 % Running LilyPond on this file generates the short interface doc
index 8cd9b0392d0d0135eeb0c99c7c4660c80f8fbe12..0528f47422868f3013250f4ffc9b409cffc4ad54 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.1"
+\version "2.1.36"
 
 
 startGraceMusic = \notes {
index 3a4372d3feaab6c31be6773ccdcc576238ab68a8..f135e18f2b94a7ee1fc7d12b25c73d897df9ab4f 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.2.0"
+\version "2.1.36"
 
 %%%%%%%%
 %%%%%%%% shortcuts common for all styles of gregorian chant notation
index cf9571d58bf48a1227c20c490aca4a4492d2f69d..08334138ff194d40f01c7fab9eef72f3cc4eddc4 100644 (file)
@@ -1,10 +1,10 @@
 % Toplevel initialisation file. 
 
 #(define-public point-and-click #f)
-#(define-public midi-debug  #f)
+#(define-public midi-debug #f)
 
 
-\version "2.2.0"
+\version "2.1.36"
 
 \include "declarations-init.ly"
 
@@ -21,7 +21,6 @@
 %%
 
 #(if (and (ly:get-option 'old-relative)
-      (defined? 'input-file-name)
       (not (ly:get-option 'old-relative-used)))
   (ly:warn (string-append
            "\n"
index d0e07504566a75ee5a4479a4c7af00d182b9574b..2b99fba152919cd4f008ecc2a4c546931e22a562 100644 (file)
@@ -86,6 +86,4 @@ pitchnamesItaliano = #`(
 
 pitchnames = \pitchnamesItaliano
 
-\version "2.2.0"
-
-#(ly:parser-set-note-names parser pitchnames)
+\version "2.1.36"
index 6ab5ebe4d6d70e7845657bb4def314f7c2ca8e68..dd0459242c1380a10b3a534327a5d46bbaa53310 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.2.0"
+\version "2.1.36"
 % legal-init.ly
 
 hsize = 8.5 \in
index 03eb7a3af893af18ab4bbcd8a4aa63a4c9e71bc7..b51d384a74d35c52ce71d7dfbb1b302612043c3e 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.2.0"
+\version "2.1.36"
 % letter-init.ly
 
 hsize = 8.5 \in
index 2dfad3904ea32cfc7ef9b44513bf4b76a1aa6851..dd5b3c2c5344b5d8b7a1b16b1c57478b30a52039 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.2.0"
+\version "2.1.36"
 \midi {
         \tempo 4=60
        \include "performer-init.ly"
diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly
deleted file mode 100644 (file)
index e13994f..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-\version "2.3.2"
-
-
-applymusic = #(def-music-function (location func music) (procedure? ly:music?)
-               (func music))
-
-addlyrics = #(def-music-function (location music lyrics) (ly:music? ly:music?)
-              (make-music 'LyricCombineMusic 
-                          'origin location
-                          'elements (list music lyrics)))
-
-grace = #(def-grace-function startGraceMusic stopGraceMusic)
-acciaccatura = #(def-grace-function startAcciaccaturaMusic stopAcciaccaturaMusic)
-appoggiatura = #(def-grace-function startAppoggiaturaMusic stopAppoggiaturaMusic)
-
-partcombine = #(def-music-function (location part1 part2) (ly:music? ly:music?)
-                (make-part-combine-music (list part1 part2)))
-
-autochange = #(def-music-function (location music) (ly:music?)
-               (make-autochange-music music))
-
-applycontext = #(def-music-function (location proc) (procedure?)
-                 (make-music 'ApplyContext 
-                   'origin location
-                   'procedure proc))
-
-applyoutput = #(def-music-function (location proc) (procedure?)
-                (make-music 'ApplyOutputEvent 
-                  'origin location
-                  'procedure proc))
-
-breathe = #(def-music-function (location) ()
-            (make-music 'EventChord 
-              'origin location
-              'elements (list (make-music 'BreathingSignEvent))))
-
-%% \mytag #'foo { ... } ==> OK
-%% c-\mytag #'foo ^4    ==> KO
-%{
-#(use-modules (srfi srfi-1))
-#(define-public (symbol-or-symbols? obj)
-  "Return #t iif obj is a symbol or a symbol list."
-  (or (symbol? obj)
-      (and (list? obj)
-           (null? (remove symbol? obj)))))
-
-mytag = #(def-music-function (location tagname music) (symbol-or-symbols? ly:music?)
-        (set! (ly:music-property music 'tags)
-              ((if (list? tagname) append cons) tagname (ly:music-property music 'tags)))
-        music)
-%}
-
-%{
-
-TODO:
-
-remove these from the parser, and softcode here:
-
- * \tag
-
-with small syntax changes, we could also do
-
- * \bar
- *  ?
-
-%}
index f41e204c846943ef239aed4d9c82b2280b6d3704..8b6b7076fcab31547245a98d6f3fa1a25efc901f 100644 (file)
@@ -1,9 +1,6 @@
-\version "2.2.0"
+\version "2.1.36"
 %{
  common dutch names for notes. es means flat, is means sharp
-
-notenames should only contain letters. No digits or punctuation.
-
 %}
 
 dutchPitchnames = #`(
@@ -85,4 +82,3 @@ dutchPitchnames = #`(
 
 
 pitchnames = \dutchPitchnames 
-#(ly:parser-set-note-names parser pitchnames)
index 5c686989883f838a50b7e09ada561e47965f22e2..d21bf06b13307691904f8cb3d9702f328668bb98 100644 (file)
@@ -105,6 +105,4 @@ pitchnamesNorsk = #`(
 
 pitchnames =\pitchnamesNorsk
 
-\version "2.2.0"
-
-#(ly:parser-set-note-names parser pitchnames)
+\version "2.1.36"
index 76d9c2b5da38712288bc0cef867e39fbd10a030c..6761ce6f3aa66235b0cc815ff6b49922510cc427 100644 (file)
@@ -1,2 +1,2 @@
-\version "2.2.0"
+\version "2.1.36"
 
index 13aa8fddac29d3de878cab1c1ef1beeee2309476..c42ce24716584c5d09397d4dffbf62430d7cb624 100644 (file)
@@ -1,10 +1,10 @@
-\version "2.3.2"
+\version "2.1.36"
 
 % JUNKME
 %part-paper-init.ly
 
 \paper {
-       \context { \OrchestralPartStaff }
-       \context { \Score skipBars = ##t }
+       \context { \OrchestralPartStaffContext }
+       \context { \ScoreContext skipBars = ##t }
 }
 
index 9f0d421bd3aa6d202c37ce902719da6ef0970bf4..06a01c1ed57bd9d9d202cf10f4eb392d34f06135 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.3.2"
+\version "2.1.36"
 
                                %
                                % setup for Request->Element conversion. Guru-only
@@ -18,7 +18,7 @@
 \description "Hard coded entry point for LilyPond. Cannot be tuned."
     }
 \context {
-    \Staff
+    \StaffContext
     \name DrumStaff
     midiInstrument = #"drums"
     \accepts DrumVoice
@@ -39,7 +39,7 @@
 
 
 \context {
-    \Voice
+    \VoiceContext
     \remove "Note_performer"
     \consists "Drum_note_performer" 
     \name DrumVoice
     \accepts DrumStaff
 }
 
-\context { \Staff \name RhythmicStaff }
+\context { \StaffContext \name RhythmicStaff }
 
 
diff --git a/ly/portugues.ly b/ly/portugues.ly
deleted file mode 100644 (file)
index a246f66..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-%{
-
- Common Portuguese names for notes. "b" means flat (bemol), "s" means
- sharp (sustenido).  Adapted from espanol.ly and italian.ly.
-
- English: a   b   c   d   e   f   g
- Portuguese: la  si  do  re  mi  fa  sol
-
-%}
-
-% contributed by Pedro Kröger <<kroeger@pedrokroeger.net>>
-
-
-pitchnamesPortuguese = #`(
-       (dobb . ,(ly:make-pitch -1 0 DOUBLE-FLAT))
-       (dobtqt . ,(ly:make-pitch -1 0 THREE-Q-FLAT))
-       (dob . ,(ly:make-pitch -1 0 FLAT))
-       (dobqt . ,(ly:make-pitch -1 0 SEMI-FLAT))
-       (do . ,(ly:make-pitch -1 0 NATURAL))
-       (dosqt . ,(ly:make-pitch -1 0 SEMI-SHARP))
-       (dos . ,(ly:make-pitch -1 0 SHARP))
-       (dostqt . ,(ly:make-pitch -1 0 THREE-Q-SHARP))
-       (doss . ,(ly:make-pitch -1 0 DOUBLE-SHARP))
-
-       (rebb . ,(ly:make-pitch -1 1 DOUBLE-FLAT))
-       (rebtqt . ,(ly:make-pitch -1 1 THREE-Q-FLAT))
-       (reb . ,(ly:make-pitch -1 1 FLAT))
-       (rebqt . ,(ly:make-pitch -1 1 SEMI-FLAT))
-       (re . ,(ly:make-pitch -1 1 NATURAL))
-       (resqt . ,(ly:make-pitch -1 1 SEMI-SHARP))
-       (res . ,(ly:make-pitch -1 1 SHARP))
-       (restqt . ,(ly:make-pitch -1 1 THREE-Q-SHARP))
-       (ress . ,(ly:make-pitch -1 1 DOUBLE-SHARP))
-
-       (mibb . ,(ly:make-pitch -1 2 DOUBLE-FLAT))
-       (mibtqt . ,(ly:make-pitch -1 2 THREE-Q-FLAT))
-       (mib . ,(ly:make-pitch -1 2 FLAT))
-       (mibqt . ,(ly:make-pitch -1 2 SEMI-FLAT))
-       (mi . ,(ly:make-pitch -1 2 NATURAL))
-       (misqt . ,(ly:make-pitch -1 2 SEMI-SHARP))
-       (mis . ,(ly:make-pitch -1 2 SHARP))
-       (mistqt . ,(ly:make-pitch -1 2 THREE-Q-SHARP))
-       (miss . ,(ly:make-pitch -1 2 DOUBLE-SHARP))
-
-       (fabb . ,(ly:make-pitch -1 3 DOUBLE-FLAT))
-       (fabtqt . ,(ly:make-pitch -1 3 THREE-Q-FLAT))
-       (fab . ,(ly:make-pitch -1 3 FLAT))
-       (fabqt . ,(ly:make-pitch -1 3 SEMI-FLAT))
-       (fa . ,(ly:make-pitch -1 3 NATURAL))
-       (fasqt . ,(ly:make-pitch -1 3 SEMI-SHARP))
-       (fas . ,(ly:make-pitch -1 3 SHARP))
-       (fastqt . ,(ly:make-pitch -1 3 THREE-Q-SHARP))
-       (fass . ,(ly:make-pitch -1 3 DOUBLE-SHARP))
-
-       (solbb . ,(ly:make-pitch -1 4 DOUBLE-FLAT))
-       (solbtqt . ,(ly:make-pitch -1 4 THREE-Q-FLAT))
-       (solb . ,(ly:make-pitch -1 4 FLAT))
-       (solbqt . ,(ly:make-pitch -1 4 SEMI-FLAT))
-       (sol . ,(ly:make-pitch -1 4 NATURAL))
-       (solsqt . ,(ly:make-pitch -1 4 SEMI-SHARP))
-       (sols . ,(ly:make-pitch -1 4 SHARP))
-       (solstqt . ,(ly:make-pitch -1 4 THREE-Q-SHARP))
-       (solss . ,(ly:make-pitch -1 4 DOUBLE-SHARP))
-
-       (labb . ,(ly:make-pitch -1 5 DOUBLE-FLAT))
-       (labtqt . ,(ly:make-pitch -1 5 THREE-Q-FLAT))
-       (lab . ,(ly:make-pitch -1 5 FLAT))
-       (labqt . ,(ly:make-pitch -1 5 SEMI-FLAT))
-       (la . ,(ly:make-pitch -1 5 NATURAL))
-       (lasqt . ,(ly:make-pitch -1 5 SEMI-SHARP))
-       (las . ,(ly:make-pitch -1 5 SHARP))
-       (lastqt . ,(ly:make-pitch -1 5 THREE-Q-SHARP))
-       (lass . ,(ly:make-pitch -1 5 DOUBLE-SHARP))
-
-       (sibb . ,(ly:make-pitch -1 6 DOUBLE-FLAT))
-       (sibtqt . ,(ly:make-pitch -1 6 THREE-Q-FLAT))
-       (sib . ,(ly:make-pitch -1 6 FLAT))
-       (sibqt . ,(ly:make-pitch -1 6 SEMI-FLAT))
-       (si . ,(ly:make-pitch -1 6 NATURAL))
-       (sisqt . ,(ly:make-pitch -1 6 SEMI-SHARP))
-       (sis . ,(ly:make-pitch -1 6 SHARP))
-       (sistqt . ,(ly:make-pitch -1 6 THREE-Q-SHARP))
-       (siss . ,(ly:make-pitch -1 6 DOUBLE-SHARP))
-
-)
-
-pitchnames = \pitchnamesPortuguese
-
-\version "2.2.0"
-
-#(ly:parser-set-note-names parser pitchnames)
index d5289bd14fa947ea07b997bec0e17de87091d199..4d11d8ff6887d8f23a0a17e3ee75342ec82fd577 100644 (file)
@@ -1,6 +1,6 @@
 % property-init.ly
 
-\version "2.2.0"
+\version "2.1.36"
 
 stemUp = \override Stem  #'direction = #1
 stemDown = \override Stem  #'direction = #-1 
@@ -77,6 +77,15 @@ cadenzaOff = {
   \set Timing.measurePosition = #(ly:make-moment 0 1)
 }
 
+newpage = \notes
+{
+  \break
+  % urg, only works for TeX output
+  \context Score \applyoutput
+  #(outputproperty-compatibility (make-type-checker 'paper-column-interface)
+    'between-system-string "\\newpage")
+}
+
 % dynamic ly:dir?  text script, articulation script ly:dir?    
 oneVoice = #(context-spec-music (make-voice-props-revert) 'Voice)
 voiceOne = #(context-spec-music (make-voice-props-set 0) 'Voice)
index c6a0f65a77938a9fa5f3fb8247ee301abd06cce2..4fd21b53711d8a1ab091143d371610a648323dd1 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.2.0"
+\version "2.1.36"
 
 
 major = #`(
index 6d6bb9aab0004c05c613b15af34fa096857cc8ec..5cf5f99d8227e7882875b081c4d67a1a3cc004e5 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.2.0"
+\version "2.1.36"
 
 
 dashHat= "marcato"
index 9c4e53db80f9e65e32b6ee8134ee2f8b9b68ce93..d022ab1c1d11cb0e1692b1de417d112c745bd900 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.2.0"
+\version "2.1.36"
 
 startGroup = #(make-span-event 'NoteGroupingEvent START)
 stopGroup = #(make-span-event 'NoteGroupingEvent STOP)
index 21b0dab45f26340b0d13c15777d2d5d3f852bd8f..7bb331e6d4c5570a57150bbe2b12710a20b41dc5 100644 (file)
@@ -48,6 +48,4 @@ pitchnamesSuomi = #`(
 
 pitchnames = \pitchnamesSuomi
 
-\version "2.2.0"
-
-#(ly:parser-set-note-names parser pitchnames)
+\version "2.1.36"
index 38905bd4ccfa54cffc7480b6bf4250727f801a2b..c0dae064c3b96a7ac068a1d0792429206bea74ae 100644 (file)
@@ -42,6 +42,4 @@ pitchnamesSvenska = #`(
 )
 
 pitchnames = \pitchnamesSvenska
-\version "2.2.0"
-
-#(ly:parser-set-note-names parser pitchnames)
+\version "2.1.36"
index 672376b01cf3fa3c48bc3212524ad470e55f0d3f..36bcd5f589196ee57888e5bd2839b5d50ef41dd3 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.2.0"
+\version "2.1.36"
 
 % tabloid-init.ly
 
diff --git a/ly/vlaams.ly b/ly/vlaams.ly
deleted file mode 100644 (file)
index d16aec9..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-\version "2.2.0" %hier stond 2.1.36, mocht ik dat wel veranderen?
-
-%{
-
- Common Flemish names for notes. "b" means flat (bemol), "k" means sharp (kruis).
- Adapted from espanol.ly.
-
- English: a   b   c   d   e   f   g
- Flemish: la  si  do  re  mi  fa  sol
-
-%}
-
-% contributed by Hendrik Maryns <<hendrik.maryns@ugent.be>> 06/06/2004
-
-
-pitchnamesVlaams = #`(
-       (dobb . ,(ly:make-pitch -1 0 DOUBLE-FLAT))
-       (dob . ,(ly:make-pitch -1 0 FLAT))
-       (do . ,(ly:make-pitch -1 0 NATURAL))
-       (dok . ,(ly:make-pitch -1 0 SHARP))
-       (dokk . ,(ly:make-pitch -1 0 DOUBLE-SHARP))
-
-       (rebb . ,(ly:make-pitch -1 1 DOUBLE-FLAT))
-       (reb . ,(ly:make-pitch -1 1 FLAT))
-       (re . ,(ly:make-pitch -1 1 NATURAL))
-       (rek . ,(ly:make-pitch -1 1 SHARP))
-       (rekk . ,(ly:make-pitch -1 1 DOUBLE-SHARP))
-
-       (mibb . ,(ly:make-pitch -1 2 DOUBLE-FLAT))
-       (mib . ,(ly:make-pitch -1 2 FLAT))
-       (mi . ,(ly:make-pitch -1 2 NATURAL))
-       (mik . ,(ly:make-pitch -1 2 SHARP))
-       (mikk . ,(ly:make-pitch -1 2 DOUBLE-SHARP))
-
-       (fabb . ,(ly:make-pitch -1 3 DOUBLE-FLAT))
-       (fab . ,(ly:make-pitch -1 3 FLAT))
-       (fa . ,(ly:make-pitch -1 3 NATURAL))
-       (fak . ,(ly:make-pitch -1 3 SHARP))
-       (fakk . ,(ly:make-pitch -1 3 DOUBLE-SHARP))
-
-       (solbb . ,(ly:make-pitch -1 4 DOUBLE-FLAT))
-       (solb . ,(ly:make-pitch -1 4 FLAT))
-       (sol . ,(ly:make-pitch -1 4 NATURAL))
-       (solk . ,(ly:make-pitch -1 4 SHARP))
-       (solkk . ,(ly:make-pitch -1 4 DOUBLE-SHARP))
-
-       (labb . ,(ly:make-pitch -1 5 DOUBLE-FLAT))
-       (lab . ,(ly:make-pitch -1 5 FLAT))
-       (la . ,(ly:make-pitch -1 5 NATURAL))
-       (lak . ,(ly:make-pitch -1 5 SHARP))
-       (lakk . ,(ly:make-pitch -1 5 DOUBLE-SHARP))
-
-       (sibb . ,(ly:make-pitch -1 6 DOUBLE-FLAT))
-       (sib . ,(ly:make-pitch -1 6 FLAT))
-       (si . ,(ly:make-pitch -1 6 NATURAL))
-       (sik . ,(ly:make-pitch -1 6 SHARP))
-       (sikk . ,(ly:make-pitch -1 6 DOUBLE-SHARP))
-)
-
-pitchnames = \pitchnamesVlaams
index 45c35c02f48169e71b31ce53f13a8118b04e36fa..0b8613180dd30f8f369bcb343eab5bd151cb2cf2 100644 (file)
@@ -37,7 +37,7 @@ ABC2LY = $(script-dir)/abc2ly.py
 CONVERT_LY = $(script-dir)/convert-ly.py
 LILYPOND = $(builddir)/lily/$(outconfbase)/lilypond
 LILYPOND_BOOK = $(script-dir)/lilypond-book.py
-LILYPOND_BOOK_INCLUDES = -I $(pwd) -I $(outdir) -I$(input-dir) -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ -I $(builddir)/mf/$(outconfbase)/  -I $(builddir)/mf/out/
+LILYPOND_BOOK_INCLUDES = -I $(pwd) -I $(outdir) -I$(input-dir) -I $(input-dir)/tricks/ -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ -I $(builddir)/mf/$(outconfbase)/  -I $(builddir)/mf/out/
 
 #texi-html for www only:
 LILYPOND_BOOK_FORMAT=$(if $(subst out-www,,$(notdir $(outdir))),texi,texi-html)
index f2701797ad3d7b15503b22892cd0dd4f95d7a603..049cba2402df51fef497a530e999d67c660379e3 100644 (file)
@@ -18,7 +18,7 @@ Buildrequires: t1utils bison flex mftrace ImageMagick
 Buildrequires: texinfo >= 4.6
 Buildrequires: guile-devel >= 1.6.4-8
 Requires: tetex  tetex-latex libstdc++ python  tetex-dvips tetex-latex
-Requires: guile >= 1.6.4-8 ec-fonts-mftraced >= 1.0.2
+Requires: guile >= 1.6.4-8
 
 %description
 LilyPond lets you create music notation.  It produces
@@ -79,8 +79,6 @@ make prefix="$RPM_BUILD_ROOT%{_prefix}" \
   infodir="$RPM_BUILD_ROOT%{_infodir}"  \
   webdir="$RPM_BUILD_ROOT%{_prefix}/share/doc/lilypond/" web-install
 
-ln -sf ../../doc/lilypond/Documentation/user/out-www/*png $RPM_BUILD_ROOT%{_infodir}/lilypond/
-
 # info 
 %if %{info}
 rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
index 7fe835f7ad946e306142a5ebdadb2a7eb0111376..08d608dfb215a04946fe567de179f2b0df04c4e9 100644 (file)
@@ -16,4 +16,4 @@ TEXINFO_SOURCES += $(TELY_FILES) $(ITELY_FILES) $(ITEXI_FILES)
 
 EXTRA_DIST_FILES += $(TELY_FILES) $(LY_FILES) $(ITEXI_FILES) $(ITELY_FILES) $(LYINC_FILES)
 
-DVIPS_FLAGS= -u+ec-mftrace.map -u +lilypond.map  -Ppdf
+DVIPS_FLAGS= -u +lilypond.map  -Ppdf
index 8a243f1c17e4a71899cbbbd3af7485f3f89f4d15..b9452646f8a663757385869fcfe59d807bba20ac 100644 (file)
@@ -20,14 +20,14 @@ $(outdir)/%.ly: %.abc
        $(PYTHON) $(ABC2LY) --strict -o $@ $< 
 
 $(outdir)/%.dvi: $(outdir)/%.ly
-       $(PYTHON) $(LY2DVI) --output=$@ $<  
+       $(PYTHON) $(LY2DVI) --output=$@ --dependencies $<  
 
 # don't junk intermediate .dvi files.  They're easier to view than
 # .ps or .png
 .PRECIOUS: $(outdir)/%.dvi
 
 $(outdir)/%.dvi: %.ly
-       $(PYTHON) $(LY2DVI) --output=$@ $< 
+       $(PYTHON) $(LY2DVI) --output=$@ --dependencies $< 
 
 
 $(outdir)/%.pdf: $(outdir)/%.dvi
@@ -35,6 +35,6 @@ $(outdir)/%.pdf: $(outdir)/%.dvi
        ps2pdf -sPAPERSIZE=$(DVIPS_PAPERSIZE) $@.pdfps $@
 
 $(outdir)-$(PAPERSIZE)/%.dvi: %.ly
-       $(PYTHON) $(LY2DVI) --output=$@ --set=papersize=$(PAPERSIZE) $< 
+       $(PYTHON) $(LY2DVI) --output=$@ --dependencies --set=papersize=$(PAPERSIZE) $< 
 
 
index 1e35e0ca9f3156303606436b159102a76e8bb581..753ceb7024ef0dc1961aadb2003073a8d3dce3d8 100644 (file)
@@ -6,11 +6,11 @@ include $(depth)/make/stepmake.make
 
 AF_FILES = $(wildcard *.af) 
 
-EXTRA_DIST_FILES += README feta.tex cmr.enc
+EXTRA_DIST_FILES += README feta.tex
 
 # We don't use $(MF_FILES), because there's more .mf cruft here
 FETA_MF_FILES = $(wildcard feta[0-9]*.mf)\
-       $(wildcard feta-braces-[a-z].mf)\
+       $(wildcard feta-braces*[0-9].mf)\
        $(wildcard feta-din*[0-9].mf)\
        $(wildcard feta-nummer*[0-9].mf)\
        $(wildcard parmesan[0-9]*.mf)
@@ -23,15 +23,14 @@ LOG_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.log)
 TEXTABLES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tex)
 AFM_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.afm) \
        $(AF_FILES:%.af=$(outdir)/%.afm)
-ENC_FILES = $(TEXTABLES:.tex=.enc) $(outdir)/cmr.enc
-TFM_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tfm) $(addprefix $(outdir)/,$(addsuffix .tfm,$(SAUTER_FONTS)))
+ENC_FILES = $(TEXTABLES:.tex=.enc)
+TFM_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tfm)
 FETA_LIST_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%list.ly)
 
 
 ENCODING_FILE=$(findstring $(<:.mf=.enc), $(FETA_MF_FILES:.mf=.enc))
 MFTRACE_FLAGS=$(if $(ENCODING_FILE),--encoding $(ENCODING_FILE),)
-bla:
-       echo $(TFM_FILES) 
+
 
 # only for fonts which
 #
@@ -39,12 +38,8 @@ bla:
 #
 # 2. are not included with teTeX
 #
+SAUTER_FONTS = cmbxti8 ecbm14 ecrm12
 
-
-## use separate package sauter-fonts-mftraced.
-SAUTER_FONTS = ecb10
-
-#cmbxti8 ecbm14 ecrm12
 MORE_SAUTER_FONTS = cmbx14 cmbx17 \
         cmbxti12 cmbxti14 \
         cmbxti6 cmbxti7 cmbxti8 \
@@ -65,7 +60,7 @@ ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(AFM_FILES) $(TFM_FILES) $(LOG_FILES)
 INSTALLATION_DIR=$(local_lilypond_datadir)/fonts/source
 INSTALLATION_FILES=$(MF_FILES) $(AF_FILES)
 
-INSTALLATION_OUT_SUFFIXES=1 2 3 4 5 6 7
+INSTALLATION_OUT_SUFFIXES=1 2 3 4 5 6
 
 INSTALLATION_OUT_DIR1=$(local_lilypond_datadir)/tex
 INSTALLATION_OUT_FILES1=$(TEXTABLES)
@@ -85,9 +80,6 @@ INSTALLATION_OUT_FILES5=$(PFA_FILES) $(outdir)/fonts.scale $(outdir)/Fontmap $(o
 INSTALLATION_OUT_DIR6=$(local_lilypond_datadir)/dvips/
 INSTALLATION_OUT_FILES6=$(outdir)/lilypond.map
 
-INSTALLATION_OUT_DIR7=$(local_lilypond_datadir)/ps/
-INSTALLATION_OUT_FILES7=$(ENC_FILES)
-
 export MFINPUTS:=.:$(MFINPUTS)
 
 default: pfa_warning $(ALL_GEN_FILES)
@@ -126,7 +118,7 @@ get-deb-pfa: $(outdir)/$(debian-package)
 
 redhat-package=lilypond-$(TOPLEVEL_VERSION)-1.i386.rpm
 $(outdir)/$(redhat-package):
-       wget  --passive-ftp -P $(outdir) http://lilypond.org/download/binaries/Fedora-1/$(redhat-package)
+       wget  --passive-ftp -P $(outdir) http://lilypond.org/download/binaries/RedHat-9/$(redhat-package)
 
 get-rpm-pfa: $(outdir)/$(redhat-package)
        cd $(outdir) ; rm -rf usr/ # (root alert!) 
@@ -207,5 +199,3 @@ $(SAUTER_FONTS:%=$(outdir)/%.bla):
 $(outdir)/%.pfa: $(outdir)/%.bla
        $(MFTRACE) -I $(outdir)/ --pfa --simplify --keep-trying $(notdir $(basename $@))  && mv $(notdir $@) $(outdir)/
 
-$(outdir)/%.enc: %.enc
-       cp $< $@
diff --git a/mf/cmr.enc b/mf/cmr.enc
deleted file mode 100644 (file)
index fca576b..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-% Thomas Esser, Dec 2002. public domain
-%
-% Encoding for:
-%     cmb10 cmbx10 cmbx12 cmbx5 cmbx6 cmbx7 cmbx8 cmbx9 cmbxsl10
-%     cmdunh10 cmr10 cmr12 cmr17cmr6 cmr7 cmr8 cmr9 cmsl10 cmsl12 cmsl8
-%     cmsl9 cmss10cmss12 cmss17 cmss8 cmss9 cmssbx10 cmssdc10 cmssi10
-%     cmssi12 cmssi17 cmssi8cmssi9 cmssq8 cmssqi8 cmvtt10
-%
-/TeXf7b6d320Encoding [
-/Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi /Omega
-/ff /fi /fl /ffi /ffl /dotlessi /dotlessj /grave /acute /caron /breve
-/macron /ring /cedilla /germandbls /ae /oe /oslash /AE /OE /Oslash
-/suppress /exclam /quotedblright /numbersign /dollar /percent /ampersand
-/quoteright /parenleft /parenright /asterisk /plus /comma /hyphen
-/period /slash /zero /one /two /three /four /five /six /seven /eight
-/nine /colon /semicolon /exclamdown /equal /questiondown /question /at
-/A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X
-/Y /Z /bracketleft /quotedblleft /bracketright /circumflex /dotaccent
-/quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u
-/v /w /x /y /z /endash /emdash /hungarumlaut /tilde /dieresis /suppress
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
-] def
diff --git a/mf/ecb.mf b/mf/ecb.mf
deleted file mode 100644 (file)
index 9967bc6..0000000
--- a/mf/ecb.mf
+++ /dev/null
@@ -1,95 +0,0 @@
-% ecbx.mf
-%
-% (c) Copyright 1995, 1996, 1997 J"org Knappen
-% (c) Copyright 1990, 1992 Norbert Schwarz
-%
-% This file is part of ecfonts version 1.0
-%
-% Please read the files 00readme.txt, 00inst.txt, 00error.txt, and
-% copyrite.txt for further information
-%
-% You find some documentation in ecdoc.tex (needs LaTeX2e)
-%
-% Content:
-%
-%    Parameter for
-%
-%    European Computer Modern Bold Extend Roman
-
-%% modified: Han-Wen Nienhuys, change u# down to ecrm value.
-%
-%
-
-font_identifier:="ECB";
-font_size (gensize*pt#);
-basedef                             (      5,      6,      7,      8,      9,     10,     12);
-gendef   [1/36pt#]( u#             )(   12.5,     14,   15.5,     17,   18.5,     20,     23.5);
-gendef   [1/36pt#]( width_adj#     )(      7,    7.8,    8.6,    9.4,   10.2,     11,     13);
-gendef   [1/36pt#]( serif_fit#     )(      0,      0,      0,      0,      0,      0,      0);
-gendef   [1/36pt#]( cap_serif_fit# )(      3,    3.8,    4.6,    5.4,    6.2,      7,      8);
-gendef   [1/36pt#]( letter_fit#    )(      3,      2,      1,      0,      0,      0,      0);
-gendef   [1/36pt#]( body_height#   )(    135,    162,    189,    216,    243,    270,    324);
-gendef   [1/36pt#]( asc_height#    )(    125,    150,    175,    200,    225,    250,    300);
-gendef   [1/36pt#]( cap_height#    )(  123.5,  148.2,  172.9,  197.6,  222.3,    247,  296.4);
-gendef   [1/36pt#]( fig_height#    )(    116,  139.2,  162.4,  185.6,  208.8,    232,  278.4);
-gendef   [1/36pt#]( x_height#      )(     80,     96,    112,    128,    144,    160,    192);
-gendef   [1/36pt#]( math_axis#     )(     45,     54,     63,     72,     81,     90,    108);
-gendef   [1/36pt#]( bar_height#    )(     40,     49,     58,     67,     76,     85,    102);
-gendef   [1/36pt#]( comma_depth#   )(     35,     42,     49,     56,     63,     70,     84);
-gendef   [1/36pt#]( desc_depth#    )(     35,     42,     49,     56,     63,     70,     84);
-gendef   [1/36pt#]( acc_height#    )(   37.5,     45,   52.5,     60,   67.5,     75,     90);
-gendef   [1/36pt#]( dot_height#    )(   37.5,     45,   52.5,     60,   67.5,     75,     90);
-gendef   [1/36pt#]( udot_height#   )(   29.5,   35.5,   41.3,   47.2,   53.1,     59,   70.8);
-gendef   [1/36pt#]( crisp#         )(      0,      0,      0,      0,      0,      0,      0);
-gendef   [1/36pt#]( tiny#          )(      9,     10,     11,     12,     13,     13,     13);
-gendef   [1/36pt#]( fine#          )(      8,      9,      9,     10,     10,     10,     10);
-gendef   [1/36pt#]( thin_join#     )(      8,      9,      9,     10,     10,     10,   10.5);
-gendef   [1/36pt#]( hair#          )(     15,   15.4,   15.8,   16.2,   16.6,     17,   18.3);
-gendef   [1/36pt#]( stem#          )(     24,     28,     32,     35,     38,     41,     47);
-gendef   [1/36pt#]( curve#         )(     27,     31,     35,     39,     43,     46,     52);
-gendef   [1/36pt#]( ess#           )(     19,     25,     29,     32,     35,     38,     44);
-gendef   [1/36pt#]( flare#         )(     27,     31,     35,     39,     42,     45,     51);
-gendef   [1/36pt#]( dot_size#      )(     31,     36,     41,     46,     51,     56,     62);
-gendef   [1/36pt#]( cap_hair#      )(     17,     18,     18,     19,     19,     19,     20);
-gendef   [1/36pt#]( cap_stem#      )(     28,     33,     38,     43,     47,     51,     57);
-gendef   [1/36pt#]( cap_curve#     )(     31,     36,     41,     46,     51,     55,     61);
-gendef   [1/36pt#]( cap_ess#       )(     24,     31,     37,     43,     48,     53,     59);
-gendef       [pt#]( rule_thickness#)(    .43,    .47,    .51,    .54,    .57,    .60,    .66);
-gendef   [1/36pt#]( dish#          )(     .7,     .8,     .9,      1,      1,      1,      1);
-gendef   [1/36pt#]( bracket#       )(      5,      6,      7,      8,      9,     10,     12);
-gendef   [1/36pt#]( jut#           )(     13,     15,     17,     19,     22,     25,     30);
-gendef   [1/36pt#]( cap_jut#       )(     19,     23,     27,     31,     35,     39,     46);
-gendef   [1/36pt#]( beak_jut#      )(      7,    7.8,    8.6,    9.4,   10.2,     11,   12.4);
-gendef   [1/36pt#]( beak#          )(     25,     36,     46,     55,     63,     70,     84);
-gendef   [1/36pt#]( vair#          )(     10,     11,   11.5,     12,   12.5,     13,   14.3);
-gendef       [pt#]( notch_cut#     )(      5,      6,      7,      8,      9,     10,     12);
-gendef   [1/36pt#]( bar#           )(     12,     13,     14,     15,     16,     17,   18.5);
-gendef   [1/36pt#]( slab#          )(     12,     13,     14,     15,     16,     17,   18.5);
-gendef   [1/36pt#]( cap_bar#       )(     12,     13,     14,     15,     16,     17,   18.5);
-gendef   [1/36pt#]( cap_band#      )(     12,     13,     14,     15,     16,     17,   18.5);
-gendef       [pt#]( cap_notch_cut# )(      5,      6,      7,      8,      9,     10,     12);
-gendef   [1/36pt#]( serif_drop#    )(    1.5,    1.8,    2.1,    2.4,    2.7,      3,    3.6);
-gendef   [1/36pt#]( stem_corr#     )(    1.5,    1.6,    1.7,    1.8,    1.9,      2,      2);
-gendef   [1/36pt#]( vair_corr#     )(      1,    1.1,    1.2,    1.3,    1.4,    1.5,    1.5);
-gendef   [1/36pt#]( apex_corr#     )(      9,      5,      2,      0,      0,      0,      0);
-gendef   [1/36pt#]( o#             )(      3,      3,      3,      4,      4,      4,      5);
-gendef   [1/36pt#]( apex_o#        )(      3,      3,      3,      3,      3,      3,      4);
-slant:=0;
-gendef            ( fudge          )(      1,      1,      1,      1,      1,      1,      1);
-gendef            ( math_spread    )(    1.5,    1.3,    1.1,     .9,     .7,     .5,     .5);
-superness:=8/11;
-superpull:=1/8;
-beak_darkness:=.4;
-square_dots:=false;
-hefty:=false;
-serifs:=true;
-monospace:=false;
-variant_g:=false;
-low_asterisk:=false;
-math_fitting:=false;
-
-clear_extra_memory;
-
-generate exroman;
-
-endinput;
diff --git a/mf/ecb10.mf b/mf/ecb10.mf
deleted file mode 100644 (file)
index 3e5299e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-if unknown exbase: input exbase fi;
-gensize:=10;
-generate ecb;
index eaa80fc5aa3b59d0d18bf9bc8d41977f059b5e94..a7779390349056b2a59697d0cfb068f4bc583f17 100644 (file)
@@ -17,16 +17,16 @@ message "Do not worry about the @ signs in the output, they are not errors. ";
 message "******************************************************";
 
 % font or database?
-def fet_beginfont(expr name,size,encod) =
+def fet_beginfont(expr name,size) =
        font_identifier:=name&decimal size;
        font_size size;
-       font_coding_scheme encod;
-       message "@{font@:GNU@:LilyPond@:"&name&"@:"&decimal size&"@:"&encod&"@}";
+       message "@{font@:GNU@:LilyPond@:"&name&"@:"&decimal size&"@}";
        message "";
        enddef;
 
-def fet_endfont =
-       message "@{tnof@}";
+def fet_endfont(expr name) =
+       message "@{tnof@:"&name&"@}";
+       message "";
        enddef;
 
 % group or table?
index 3d6f6b037023f652a207ca6bd53821b0601d0adf..8ab96f18c61ce34fdaa2db0c8cc535b9fa3daf5d 100644 (file)
@@ -3,25 +3,17 @@
 input feta-autometric;
 input feta-macros;
 
-staffsize#  := 20 pt#;  %% arbitrary.
+staffsize# := 20 pt#;  %% arbitrary.
 
 
 input feta-params;
 
+font_coding_scheme "feta braces";
 
-def abc_encode_int (expr i) =
-       if i > 0:
-               abc_encode_int(i div 26)&char(65 + i mod 26)
-       else:
-               "A"
-       fi
-enddef ;
-
-% we must let the design increase for each
-% font to make sure that mftrace doesn't jack up the resolution too highly
-% for the longer braces.
-fet_beginfont("feta-braces-" &char(97 + font_count), (font_count + 1)* 15,
-               "fetaBraces");
+% we set the designsize arbitrarily at 10
+% if the * 10 is left out, pktrace gets confused  over the proper magnification,
+% and makes it too large.
+fet_beginfont("feta-braces", font_count * 10);
 
 mode_setup;
 
@@ -31,6 +23,14 @@ save code;
 code := -1;
 
 
+def abc_encode_int (expr i) =
+       if i > 0:
+               abc_encode_int(i div 26)&char(65 + i mod 26)
+       else:
+               "A"
+       fi
+enddef ;
+
 def draw_brace (expr height_sharp, width_sharp, slt_sharp) =
 
        save pendir, height, width, thin, thick, slt;
@@ -90,12 +90,7 @@ for i := 0 step 1 until font_count:
     % message "l: "&decimal l;
     % note: define_pixels (x) multiplies x by hppp,
     % must never get bigger than infinity
-    y := y + increment;
-
-    if y > infinity/hppp:
-      message "Resolution and/or magnification is too high";
-      error please report: <bug-lilypond@gnu.org>;
-    fi
+    y := min (y + increment, infinity/hppp - 1);
 
     % x should be about one staff space, taking brace to have
     % default height of 3 staffs, this yields height / 3 / 4 = 12
index ba3da5509bd3d1df4bc7b1560bad150803a94325..69f8977f19ea3f5dc7a11487d35212f9da2fcc33 100644 (file)
@@ -529,30 +529,7 @@ fet_beginchar("X-Circled notehead", "2xcircle", "xcircledhead")
 fet_endchar;
 
 
+
 fet_endgroup("noteheads");
 
-% what is this doing here?
 define_pixels(black_notehead_width);
-
-
-if 0 = 1:
-
-% free space: ascii a-i
-code:=106;
-
-%
-% testing unicode/gnome-canvas
-%
-savecode:=code;
-code:=96;
-%fet_beginchar("Whole notehead", "0", "wholehead")
-fet_beginchar("Ascii a", "a", "a")
-       draw_outside_ellipse (1.80 - puff_up_factor / 3.0, 0, 0.707, 0);
-       undraw_inside_ellipse (1.30, 125 - puff_up_factor *10,
-                       0.68, 2 stafflinethickness#,
-                       (w /2, 0));
-%      draw_staff_outline (-2, 2, 0.5);
-fet_endchar;
-
-code:=savecode;
-fi
diff --git a/mf/feta-braces-a.mf b/mf/feta-braces-a.mf
deleted file mode 100644 (file)
index 7044ac5..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-% 
-% feta-braces0.mf --  256 smallest braces
-% 
-% source file of the Feta (Font-En-Tja) music font
-% 
-% (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-% 
-
-font_count := 0;
-input feta-beugel;
-end.
diff --git a/mf/feta-braces-b.mf b/mf/feta-braces-b.mf
deleted file mode 100644 (file)
index 740f28d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-% 
-% feta-braces1.mf --  next 256 braces
-% 
-% source file of the Feta (Font-En-Tja) music font
-% 
-% (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-% 
-
-font_count := 1;
-input feta-beugel;
-end.
diff --git a/mf/feta-braces-c.mf b/mf/feta-braces-c.mf
deleted file mode 100644 (file)
index e8ce7f2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-% 
-% feta-braces2.mf --  next 256 braces
-% 
-% source file of the Feta (Font-En-Tja) music font
-% 
-% (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-% 
-
-font_count := 2;
-input feta-beugel;
-end.
diff --git a/mf/feta-braces-d.mf b/mf/feta-braces-d.mf
deleted file mode 100644 (file)
index 66d9a0b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-% 
-% feta-braces3.mf --  next 256 braces
-% 
-% source file of the Feta (Font-En-Tja) music font
-% 
-% (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-% 
-
-font_count := 3;
-input feta-beugel;
-end.
diff --git a/mf/feta-braces-e.mf b/mf/feta-braces-e.mf
deleted file mode 100644 (file)
index 39c44f0..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-% 
-% feta-braces4.mf --  next 256 braces
-% 
-% source file of the Feta (Font-En-Tja) music font
-% 
-% (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-% 
-
-font_count := 4;
-input feta-beugel;
-end.
-
-
diff --git a/mf/feta-braces-f.mf b/mf/feta-braces-f.mf
deleted file mode 100644 (file)
index d7ea284..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-% 
-% feta-braces5.mf --  next 256 braces
-% 
-% source file of the Feta (Font-En-Tja) music font
-% 
-% (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-% 
-
-font_count := 5;
-input feta-beugel;
-end.
diff --git a/mf/feta-braces-g.mf b/mf/feta-braces-g.mf
deleted file mode 100644 (file)
index 3b0ab2a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-% 
-% feta-braces6.mf --  next 256 braces
-% 
-% source file of the Feta (Font-En-Tja) music font
-% 
-% (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-% 
-
-font_count := 6;
-input feta-beugel;
-end.
diff --git a/mf/feta-braces-h.mf b/mf/feta-braces-h.mf
deleted file mode 100644 (file)
index 61635b9..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-% 
-% feta-braces6.mf --  next 256 braces
-% 
-% source file of the Feta (Font-En-Tja) music font
-% 
-% (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-% 
-
-font_count := 7;
-input feta-beugel;
-end.
diff --git a/mf/feta-braces-i.mf b/mf/feta-braces-i.mf
deleted file mode 100644 (file)
index fb603a9..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-% 
-% feta-braces6.mf --  next 256 braces
-% 
-% source file of the Feta (Font-En-Tja) music font
-% 
-% (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-% 
-
-font_count := 8;
-input feta-beugel;
-end.
diff --git a/mf/feta-braces00.mf b/mf/feta-braces00.mf
new file mode 100644 (file)
index 0000000..7044ac5
--- /dev/null
@@ -0,0 +1,11 @@
+% 
+% feta-braces0.mf --  256 smallest braces
+% 
+% source file of the Feta (Font-En-Tja) music font
+% 
+% (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+% 
+
+font_count := 0;
+input feta-beugel;
+end.
diff --git a/mf/feta-braces10.mf b/mf/feta-braces10.mf
new file mode 100644 (file)
index 0000000..740f28d
--- /dev/null
@@ -0,0 +1,11 @@
+% 
+% feta-braces1.mf --  next 256 braces
+% 
+% source file of the Feta (Font-En-Tja) music font
+% 
+% (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+% 
+
+font_count := 1;
+input feta-beugel;
+end.
diff --git a/mf/feta-braces20.mf b/mf/feta-braces20.mf
new file mode 100644 (file)
index 0000000..e8ce7f2
--- /dev/null
@@ -0,0 +1,11 @@
+% 
+% feta-braces2.mf --  next 256 braces
+% 
+% source file of the Feta (Font-En-Tja) music font
+% 
+% (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+% 
+
+font_count := 2;
+input feta-beugel;
+end.
diff --git a/mf/feta-braces30.mf b/mf/feta-braces30.mf
new file mode 100644 (file)
index 0000000..66d9a0b
--- /dev/null
@@ -0,0 +1,11 @@
+% 
+% feta-braces3.mf --  next 256 braces
+% 
+% source file of the Feta (Font-En-Tja) music font
+% 
+% (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+% 
+
+font_count := 3;
+input feta-beugel;
+end.
diff --git a/mf/feta-braces40.mf b/mf/feta-braces40.mf
new file mode 100644 (file)
index 0000000..39c44f0
--- /dev/null
@@ -0,0 +1,13 @@
+% 
+% feta-braces4.mf --  next 256 braces
+% 
+% source file of the Feta (Font-En-Tja) music font
+% 
+% (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+% 
+
+font_count := 4;
+input feta-beugel;
+end.
+
+
diff --git a/mf/feta-braces50.mf b/mf/feta-braces50.mf
new file mode 100644 (file)
index 0000000..d7ea284
--- /dev/null
@@ -0,0 +1,11 @@
+% 
+% feta-braces5.mf --  next 256 braces
+% 
+% source file of the Feta (Font-En-Tja) music font
+% 
+% (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+% 
+
+font_count := 5;
+input feta-beugel;
+end.
diff --git a/mf/feta-braces60.mf b/mf/feta-braces60.mf
new file mode 100644 (file)
index 0000000..3b0ab2a
--- /dev/null
@@ -0,0 +1,11 @@
+% 
+% feta-braces6.mf --  next 256 braces
+% 
+% source file of the Feta (Font-En-Tja) music font
+% 
+% (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+% 
+
+font_count := 6;
+input feta-beugel;
+end.
diff --git a/mf/feta-braces70.mf b/mf/feta-braces70.mf
new file mode 100644 (file)
index 0000000..61635b9
--- /dev/null
@@ -0,0 +1,11 @@
+% 
+% feta-braces6.mf --  next 256 braces
+% 
+% source file of the Feta (Font-En-Tja) music font
+% 
+% (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+% 
+
+font_count := 7;
+input feta-beugel;
+end.
diff --git a/mf/feta-braces80.mf b/mf/feta-braces80.mf
new file mode 100644 (file)
index 0000000..fb603a9
--- /dev/null
@@ -0,0 +1,11 @@
+% 
+% feta-braces6.mf --  next 256 braces
+% 
+% source file of the Feta (Font-En-Tja) music font
+% 
+% (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+% 
+
+font_count := 8;
+input feta-beugel;
+end.
index 5294f2df7d81ef1e51f22d58f57521ca98d70b5a..ca5029d2867407d5166e1f63b32fc00a799f48ed 100644 (file)
@@ -25,7 +25,7 @@ font_normal_space horizontal_space#;
 
 define_pixels (staffspace, linethickness, stafflinethickness, ex, descender, ascender);
 
-fet_beginfont("feta-din", design_size, "TeX text");
+fet_beginfont("feta-din", design_size);
 
 input feta-din-code;
 
index 99f02ed528f65f76aef7d4f8541de03bf793dec9..767a83d194f13499d49e90c8b95af0b274ac229b 100644 (file)
@@ -13,17 +13,16 @@ if test = -1:
        mode := smoke;
 fi
 
-staffsize# := design_size * pt#;
-
 mode_setup;
+%
 
 input feta-macros;
 
 input feta-params;
 
 font_x_height  staff_space#;
+font_coding_scheme "feta music";
 
-fet_beginfont("feta", design_size, "fetaMusic");
 if test = 0: 
        input feta-eindelijk;
        input feta-toevallig;
@@ -40,6 +39,3 @@ else:
        input feta-test-generic.mf;
 
 fi
-
-fet_endfont;
-
index 75b67886a5dd6f53d21cd2d6513d2adc96c0d3d2..0f9df26550b92114e7364063d50f79a01ef4c23d 100644 (file)
@@ -449,7 +449,6 @@ fet_beginchar("G clef", "G", "trebleclef")
        fi;
        draw_gclef(1.0);
 fet_endchar;
-
 fet_beginchar("G clef", "G_change", "ctrebleclef")
        draw_gclef(0.8);
 fet_endchar;
@@ -670,24 +669,3 @@ fet_beginchar("tab clef (reduced)", "tab_change", "ctabclef")
 fet_endchar;
 
 fet_endgroup("clefs");
-
-if 0 = 1:
-
-%
-% testing unicode/gnome-canvas
-%
-
-savecode:=code;
-code:=97;
-fet_beginchar("Ascii b", "b", "b")
-%%fet_beginchar("G clef", "G", "trebleclef")
-       if test_staff = 1:
-               draw_staff(-1,3, 0.0);
-       fi;
-       draw_gclef(1.0);
-       %% charnamestr:="Ascii b";
-fet_endchar;
-
-code:=savecode;
-
-fi
index 16d69e15b0c1397ca4ca61c7efd590bd513ed98b..0f0646a16da2fbc803e43d7935fa24bdbd312362 100644 (file)
@@ -17,6 +17,8 @@
 % glyph.
 %
 
+fet_begingroup("number")
+
 define_pixels(height,thick,thick,thin,hair,flare);
 define_pixels(foot_top,foot_width);
 define_pixels(kuulleke);
@@ -181,7 +183,7 @@ fet_endchar;
 code := 43;  % , = 44 
 
 % urg
-fet_beginchar("Numeral comma", "comma", "comma")
+fet_beginchar("Numeral comma", ",", "comma")
        set_char_box(0, dot_diam#, 3/2dot_diam#, dot_diam#);
        pickup pencircle scaled dot_diam;
        draw (dot_diam/2,dot_diam/2);
@@ -196,7 +198,7 @@ fet_beginchar("Numeral comma", "comma", "comma")
        penlabels(1);
 fet_endchar;
 
-fet_beginchar("Numeral dash", "hyphen", "hyphen")
+fet_beginchar("Numeral dash", "-", "dash")
        set_char_box(0, height#/3, 0, height#);
        pickup pencircle scaled thin;
        lft x1 = -b;
@@ -205,7 +207,7 @@ fet_beginchar("Numeral dash", "hyphen", "hyphen")
        draw z1 .. z2;
 fet_endchar;
 
-fet_beginchar("Numeral dot", "period", "period")
+fet_beginchar("Numeral dot", ".", "dot")
        set_char_box(0, dot_diam#, 0, dot_diam#);
        pickup pencircle scaled dot_diam;
        draw (dot_diam/2,dot_diam/2);
@@ -216,7 +218,7 @@ fet_endchar;
 
 code := 47; % 0 = 48
 
-fet_beginchar("Numeral 0", "zero", "zero")
+fet_beginchar("Numeral 0", "0", "zero")
        set_char_box(0, 11/15height# * widen, 0, height#);
        message "w:"&decimal w;
        message "h:"&decimal h;
@@ -235,7 +237,7 @@ fet_beginchar("Numeral 0", "zero", "zero")
                ..tension t..z4l..tension t..cycle;
 fet_endchar;
        
-fet_beginchar("Numeral 1", "one", "one")
+fet_beginchar("Numeral 1", "1", "one")
 %      set_char_box(0, 19/30height#*widen, 0, height#);
        set_char_box(0, 1/2foot_width#+3/2thick#+1/2hair#, 0, height#);
        message "w:"&decimal w;
@@ -267,7 +269,7 @@ fet_beginchar("Numeral 1", "one", "one")
        draw_foot(x1);
 fet_endchar;
 
-fet_beginchar("Numeral 2", "two", "two")
+fet_beginchar("Numeral 2", "2", "two")
        set_char_box(0, 22/30 height#*widen, 0, height#);
        message "w:"&decimal w;
        message "h:"&decimal h;
@@ -320,7 +322,7 @@ fet_endchar;
 % TODO: should widen a bit. The right edge of the 3 bumps into next glyph in
 % combinations 
 %
-fet_beginchar("Numeral 3", "three", "three")
+fet_beginchar("Numeral 3", "3", "three")
        set_char_box(0, 2/3height#*widen, 0, height#);
        message "w:"&decimal w;
        message "h:"&decimal h;
@@ -385,7 +387,7 @@ fet_endchar;
 
 
        
-fet_beginchar("Numeral 4", "four", "four")
+fet_beginchar("Numeral 4", "4", "four")
        set_char_box(0, 4/5height#*widen, 0, height#);
        message "w:"&decimal w;
        message "h:"&decimal h;
@@ -427,7 +429,7 @@ fet_beginchar("Numeral 4", "four", "four")
        draw_foot(x5);
 fet_endchar;
 
-fet_beginchar("Numeral 5", "five", "five")
+fet_beginchar("Numeral 5", "5", "five")
        set_char_box(0, 27/40 height#*widen, 0, height#);
        message "w:"&decimal w;
        message "h:"&decimal h;
@@ -480,11 +482,11 @@ fet_beginchar("Numeral 5", "five", "five")
 
 fet_endchar;
 
-fet_beginchar("Numeral 6", "six", "six")
+fet_beginchar("Numeral 6", "6", "six")
        draw_six;
 fet_endchar;
 
-fet_beginchar("Numeral 7", "seven", "seven")
+fet_beginchar("Numeral 7", "7", "seven")
        set_char_box(0, 11/15height#*widen, 0, height#);
        message "w:"&decimal w;
        message "h:"&decimal h;
@@ -539,7 +541,7 @@ fi
        penlabels(1,2,3,4,5,6);
 fet_endchar;
 
-fet_beginchar("Numeral 8", "eight", "eight")
+fet_beginchar("Numeral 8", "8", "eight")
        set_char_box(0, 11/15height#*widen, 0, height#);
        message "w:"&decimal w;
        message "h:"&decimal h;
@@ -573,13 +575,15 @@ fet_beginchar("Numeral 8", "eight", "eight")
                ..z2l{dir(beta)}..cycle;
 fet_endchar;
 
-fet_beginchar("Numeral 9", "nine", "nine")
+fet_beginchar("Numeral 9", "9", "nine")
        draw_six;
 %      xy_mirror_char;
        currentpicture := currentpicture scaled -1;
        currentpicture := currentpicture shifted (w,h);
 fet_endchar;
 
+fet_endgroup("number")
+
 ligtable "3" : "3" kern 0.1 space#,  "0" kern 0.1 space#; 
 ligtable "2" : "7" kern 0.15 space#;
 
index 07106b6c1db55dac9391d1c86d3eb46497d61e8e..7b1778b15b009ebee631edddec30b7571ef48809 100644 (file)
@@ -15,7 +15,7 @@ input feta-macros;
 
 %blot_diameter# = .4pt#;
 
-fet_beginfont("feta-nummer", design_size, "fetaNumber");
+fet_beginfont("feta-nummer", design_size);
 mode_setup;
 
 height#:=designsize;
@@ -23,6 +23,7 @@ space# := design_size/2;
 
 font_x_height height#;
 font_normal_space space#;
+font_coding_scheme "feta number";
 
 
 %
index 66917bb063d3061a5bf5a4f668dae421f21d09ef..1568c9d5aa57aaa7ff502e335da1ddbab59507e5 100644 (file)
@@ -2,7 +2,8 @@
 % part of LilyPond's pretty-but-neat music font
 
 input feta-autometric;
-design_size := 11;
+fet_beginfont("feta-test", 11);
+staffsize#:=11pt#;
 test:=1;
 
 % smoked cheese
@@ -14,5 +15,7 @@ test:=1;
 
 input feta-generic;
 
+fet_endfont("feta");
+
 end.
 
index be8ebb8dae9d85b59210d5a190a878dccf830258..fc79ef990c660f0fe085457e2c2de7e8d1eec99b 100644 (file)
@@ -2,7 +2,8 @@
 % part of LilyPond's pretty-but-neat music font
 
 input feta-autometric;
-design_size := 13;
+fet_beginfont("feta-test", 13);
+staffsize#:=13pt#;
 test:=1;
 
 % smoked cheese
@@ -14,6 +15,7 @@ test:=1;
 
 input feta-generic;
 
+fet_endfont("feta");
 
 end.
 
index 8dd1f2da14b80c329306cb90a64ee1262baea607..3d2ed3cea24a5753346a70045d28856d0e9be4d3 100644 (file)
@@ -2,7 +2,8 @@
 % part of LilyPond's pretty-but-neat music font
 
 input feta-autometric;
-design_size := 16;
+fet_beginfont("feta-test", 16);
+staffsize#:=16pt#;
 test:=1;
 
 % smoked cheese
@@ -14,6 +15,7 @@ test:=1;
 
 input feta-generic;
 
+fet_endfont("feta");
 
 end.
 
index 5838201c5a56395ae57aa9b4bd26b9a19683ce19..72f9a877588dac4f8e082b495ae661e7931c8033 100644 (file)
@@ -3,7 +3,8 @@
 
 
 input feta-autometric;
-design_size := 20;
+fet_beginfont("feta-test", 20);
+staffsize#:=20pt#;
 test:=1;
 
 % smoked cheese
@@ -15,6 +16,7 @@ test:=1;
 
 input feta-generic;
 
+fet_endfont("feta");
 
 end.
 
index 8dc122b74180bfc51ad952f8578cf82a17797ab1..e4656d6d26633132e10918b2b602eba5f64cf063 100644 (file)
@@ -3,7 +3,8 @@
 
 
 input feta-autometric;
-design_size := 23;
+fet_beginfont("feta-test", 23);
+staffsize#:=23pt#;
 test:=1;
 
 % smoked cheese
@@ -15,6 +16,7 @@ test:=1;
 
 input feta-generic;
 
+fet_endfont("feta");
 
 end.
 
index 748efb8760b6690c179d33aa4c288d20abab47f4..09f34025bde3a648a64f054aa47fe06312090868 100644 (file)
@@ -2,7 +2,8 @@
 % part of LilyPond's pretty-but-neat music font
 
 input feta-autometric;
-design_size := 26;
+fet_beginfont("feta-test", 26);
+staffsize#:=26pt#;
 test:=1;
 
 % smoked cheese
@@ -14,6 +15,7 @@ test:=1;
 
 input feta-generic;
 
+fet_endfont("feta");
 
 end.
 
index de5e4dfd7c266bb868a7efb642395c0b15d6ca96..c0e87d7d8c3e72a009f98c7626d05c78ca41f859 100644 (file)
@@ -3,12 +3,14 @@
 
 
 input feta-autometric;
-
-design_size:= 11.22;
+fet_beginfont("feta", 11);
+staffsize#:=11.22pt#;
 test:=0;
 
 
 input feta-generic;
 
+fet_endfont("feta");
+
 end.
 
index 66db45b0efd6fd8c09448e79e5040965fa2b9aa7..1987d397500c504b62a4e197f2a1c918746d3fe0 100644 (file)
@@ -2,13 +2,14 @@
 % part of LilyPond's pretty-but-neat music font
 
 input feta-autometric;
-
-design_size := 12.60;
-
+fet_beginfont("feta", 13);
+staffsize#:=12.60pt#;
 test:=0;
 
 
 input feta-generic;
 
+fet_endfont("feta");
+
 end.
 
index 63b71fe2c6f1af7eb2f68a694929e572b4aa3f1e..cc8aa4a6fd36368683d24b4f9433f244ea55d6e2 100644 (file)
@@ -3,12 +3,14 @@
 % part of LilyPond's pretty-but-neat music font
 
 input feta-autometric;
-design_size := 14.14;
+fet_beginfont("feta", 14);
+staffsize#:=14.14pt#;
 test:=0;
 
 
 input feta-generic;
 
+fet_endfont("feta");
 
 end.
 
index 251a5c60d3301621c54fdc9f8740dbe257c46dce..30d7b0a2a22433c731303dd75e58dca8cef8c7b1 100644 (file)
@@ -2,11 +2,14 @@
 % part of LilyPond's pretty-but-neat music font
 
 input feta-autometric;
-design_size := 15.87;
+fet_beginfont("feta", 16);
+staffsize#:=15.87pt#;
 test:=0;
 
 
 input feta-generic;
 
+fet_endfont("feta");
+
 end.
 
index 4c1de346994ac74dfd82c177464c65955b2933c3..1fa053e16966a78bea54c472d0c02c9312acf589 100644 (file)
@@ -4,12 +4,14 @@
 input feta-autometric;
 
 % todo change file name
-design_size := 17.82;
+fet_beginfont("feta", 18);
+staffsize#:=17.82pt#;
 test:=0;
 
 
 input feta-generic;
 
+fet_endfont("feta");
 
 end.
 
index c49d776ffc54c3712bda4420115953ea31b87a88..35190154ff9c3848888ca40f1e6940c5e56f9e01 100644 (file)
@@ -1,15 +1,17 @@
 % feta20.mf
 % part of LilyPond's pretty-but-neat music font
 
-design_size := 20;
+staffsize#:=20pt#;
 
 input feta-autometric;
+fet_beginfont("feta", 20);
 
 
 % use feta-test for debugging.
 test := 0;
 input feta-generic;
 
+fet_endfont("feta");
 
 end.
 
index efb7af8e45fde9c08eaba5a32370be86a4c0d2fc..95962446bacff6c5819e60b33500649c954c5305 100644 (file)
@@ -4,12 +4,14 @@
 input feta-autometric;
 
 % todo change file name
-design_size := 22.45;
+fet_beginfont("feta", 22.5);
+staffsize#:=22.45pt#;
 test:=0;
 
 
 input feta-generic;
 
+fet_endfont("feta");
 
 end.
 
index 7df8ac277c5f6a5fbe68f5bff38e3bf44db0029f..ec85398e995c9bd3d08b9c69de6099717aa8b2af 100644 (file)
@@ -2,12 +2,14 @@
 % part of LilyPond's pretty-but-neat music font
 
 input feta-autometric;
-design_size := 25.20;
+fet_beginfont("feta", 26);
+staffsize#:=25.20pt#;
 test:=0;
 
 
 input feta-generic;
 
+fet_endfont("feta");
 
 end.
 
index c0ba15b115c8ce30fe25efb1c92d91b269d23a39..3b9e69d13d19c96fa914a3fbf5b51adfcca501e8 100644 (file)
@@ -15,15 +15,13 @@ fi
 
 mode_setup;
 %
-staffsize# := design_size * pt#;
 
 input feta-macros;
 input feta-params;
 
-
 font_x_height  staff_space#;
+font_coding_scheme "parmesan music";
 
-fet_beginfont("parmesan", design_size, "parmesanMusic")
 if test = 0: 
        input parmesan-rests;
        input parmesan-heads;
@@ -33,8 +31,7 @@ if test = 0:
        input parmesan-flags;
        input parmesan-timesig;
        input parmesan-scripts;
+
 else:
 
 fi
-fet_endfont;
-
index 27ba341437d1952a24bf2aea32069ec0f87d6d04..d0877b022d94bfc685e1fe1204337d1e04d6ff49 100644 (file)
@@ -1,13 +1,16 @@
 % parmesan11.mf
 % part of LilyPond's pretty-but-neat music font
 
-design_size := 11.22;
+staffsize#:=11.22pt#;
 
 input feta-autometric;
+fet_beginfont("parmesan", 11);
 
 test := 0;
 
 input parmesan-generic;
 
+fet_endfont("parmesan");
+
 end.
 
index 905da48d5d8d73021461d78a0ed9771ef082779f..06878f238881d06738d9c5e5651b558177c2607d 100644 (file)
@@ -1,14 +1,16 @@
 % parmesan13.mf
 % part of LilyPond's pretty-but-neat music font
 
-design_size := 12.60;
+staffsize#:=12.60pt#;
 
 input feta-autometric;
+fet_beginfont("parmesan", 13);
 
 test := 0;
 
 input parmesan-generic;
 
+fet_endfont("parmesan");
 
 end.
 
index a66c841265fc47140944c579427321c8eea8a689..2e78a737d2d030b5a38fd1b2c232aed07c5ce6d3 100644 (file)
@@ -1,14 +1,16 @@
 % parmesan13.mf
 % part of LilyPond's pretty-but-neat music font
 
-design_size := 14.14;
+staffsize#:=14.14pt#;
 
 input feta-autometric;
+fet_beginfont("parmesan", 14);
 
 test := 0;
 
 input parmesan-generic;
 
+fet_endfont("parmesan");
 
 end.
 
index 19b0516779b768ddf31468905f616d469fefbc84..0b6f3220223c48f15a18787a473f22c4c9ddbcd8 100644 (file)
@@ -1,14 +1,16 @@
 % parmesan16.mf
 % part of LilyPond's pretty-but-neat music font
 
-design_size := 15.87;
+staffsize#:=15.87pt#;
 
 input feta-autometric;
+fet_beginfont("parmesan", 16);
 
 test := 0;
 
 input parmesan-generic;
 
+fet_endfont("parmesan");
 
 end.
 
index 25238727d3dfd5c41f30222f1246c7b4b75eb8b2..dc87d6eb72dcd616205625a2ff5158450b06a4f8 100644 (file)
@@ -1,14 +1,16 @@
 % parmesan13.mf
 % part of LilyPond's pretty-but-neat music font
 
-design_size := 17.82;
+staffsize#:=17.82pt#;
 
 input feta-autometric;
+fet_beginfont("parmesan", 18);
 
 test := 0;
 
 input parmesan-generic;
 
+fet_endfont("parmesan");
 
 end.
 
index d14251edcedf0a0bfdc039b8ffb3bde45c0ffe90..8cda6b2a3aa39836c3cda2c1d8edaca67d5dbd13 100644 (file)
@@ -1,14 +1,16 @@
 % parmesan20.mf
 % part of LilyPond's pretty-but-neat music font
 
-design_size := 20;
+staffsize#:=20pt#;
 
 input feta-autometric;
+fet_beginfont("parmesan", 20);
 
 test := 0;
 
 input parmesan-generic;
 
+fet_endfont("parmesan");
 
 end.
 
index 39b643732ba8de336441350d1c1331486db98988..4ab3732714e6e18cec3699896371797a41e6c181 100644 (file)
@@ -1,14 +1,16 @@
 % parmesan23.mf
 % part of LilyPond's pretty-but-neat music font
 
-design_size := 22.45;
+staffsize#:=22.45pt#;
 
 input feta-autometric;
+fet_beginfont("parmesan", 23);
 
 test := 0;
 
 input parmesan-generic;
 
+fet_endfont("parmesan");
 
 end.
 
index 1be6fb51914144b15f02dc793f3874cb395329d5..3b86b2232db34aac0155bffeeabe4fba62ceb929 100644 (file)
@@ -1,14 +1,16 @@
 % parmesan26.mf
 % part of LilyPond's pretty-but-neat music font
 
-design_size := 25.20;
+staffsize#:=25.20pt#;
 
 input feta-autometric;
+fet_beginfont("parmesan", 26);
 
 test := 0;
 
 input parmesan-generic;
 
+fet_endfont("parmesan");
 
 end.
 
index 45ea6d10e989e4cb7d36d7a3922122f17a7e08b9..45e68d4f5c915b5131076c30f6ee3a91de3dfa08 100644 (file)
--- a/po/de.po
+++ b/po/de.po
 # German Translation of lilypond.
 # Copyright (C) 2003 Han-Wen Nienhuys, Jan Nieuwenhuizen
 # This file is distributed under the same license as the lilypond package.
-# Erwin Dieterich <bamse@gmx.de>, 1999
-# Roland Stigge <stigge@antcom.de>, 2003, 2004
+# Roland Stigge <stigge@antcom.de>, 2003.
+# (ersetzt die Ãœbersetzung von 1999 von Erwin Dieterich <bamse@gmx.de>)
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: lilypond 2.2.0\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-03-31 16:22+0200\n"
-"PO-Revision-Date: 2004-04-03 10:45+0200\n"
+"Project-Id-Version: lilypond 1.7.26\n"
+"POT-Creation-Date: 2003-07-18 14:45+0200\n"
+"PO-Revision-Date: 2003-07-21 14:15+0200\n"
 "Last-Translator: Roland Stigge <stigge@antcom.de>\n"
 "Language-Team: German <de@li.org>\n"
 "MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
 
+#. this is where special info is often stored
+#. ###############################################################
+#. lilylib.py -- options and stuff
+#.
+#. source file of the GNU LilyPond music typesetter
+#.
+#. (c)  1998--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+#. Jan Nieuwenhuizen <janneke@gnu.org>
+#. ##  subst:\(^\|[^._a-z]\)\(abspath\|identify\|warranty\|progress\|warning\|error\|exit\|getopt_args\|option_help_str\|options_help_str\|help\|setup_temp\|read_pipe\|system\|cleanup_temp\|strip_extension\|cp_to_dir\|mkdir_p\|init\) *(
+#. ##  replace:\1ly.\2 (
+#. ## subst: \(help_summary\|keep_temp_dir_p\|option_definitions\|original_dir\|program_name\|pseudo_filter_p\|temp_dir\|verbose_p\)
+#. ###############################################################
+#. Users of python modules should include this snippet
+#. and customize variables below.
+#. We'll suffer this path init stuff as long as we don't install our
+#. python packages in <prefix>/lib/pythonx.y (and don't kludge around
+#. it as we do with teTeX on Red Hat Linux: set some environment var
+#. (PYTHONPATH) in profile)
+#. If set, LILYPONDPREFIX must take prevalence
+#. if datadir is not set, we're doing a build and LILYPONDPREFIX
+#. Customize these
+#. lilylib globals
 #: lilylib.py:60
 msgid "lilylib module"
 msgstr "Modul lilylib"
 
-#: lilylib.py:63 lilypond-book.py:84 lilypond.py:127 midi2ly.py:100
-#: mup2ly.py:75 old-lilypond-book.py:129 main.cc:140
+#: lilylib.py:63 lilypond-book.py:131 lilypond.py:128 midi2ly.py:100
+#: mup2ly.py:75 main.cc:111
 msgid "print this help"
-msgstr "diese Hilfe ausgeben"
+msgstr "diese Hilfe"
 
-#: lilylib.py:110 midi2ly.py:136 mup2ly.py:130
-#, python-format
+#. ###############################################################
+#. Handle bug in Python 1.6-2.1
+#.
+#. there are recursion limits for some patterns in Python 1.6 til 2.1.
+#. fix this by importing pre instead. Fix by Mats.
+#. Attempt to fix problems with limited stack size set by Python!
+#. Sets unlimited stack size. Note that the resource module only
+#. is available on UNIX.
+#: lilylib.py:114 midi2ly.py:136 mup2ly.py:130 main.cc:188 main.cc:200
+#, c-format, python-format
 msgid "Copyright (c) %s by"
 msgstr "Copyright (c) %s bei"
 
-#: lilylib.py:114 midi2ly.py:141 mup2ly.py:135
+#: lilylib.py:114
+msgid " 1998--2003"
+msgstr "1998--2003"
+
+#: lilylib.py:118
 msgid "Distributed under terms of the GNU General Public License."
 msgstr "Vertrieben unter den Bedingungen der GNU General Public License."
 
-#: lilylib.py:116 midi2ly.py:142 mup2ly.py:136
+#: lilylib.py:120
 msgid "It comes with NO WARRANTY."
 msgstr "Es wird OHNE GARANTIE ausgeliefert."
 
-#: lilylib.py:123 warn.cc:25
-#, c-format, python-format
-msgid "warning: %s"
-msgstr "Warnung: %s"
+#: lilylib.py:127 midi2ly.py:150 mup2ly.py:144 input.cc:88
+msgid "warning: "
+msgstr "Warnung: "
 
-#: lilylib.py:126 warn.cc:31
-#, c-format, python-format
-msgid "error: %s"
-msgstr "Fehler: %s"
+#. lots of midi files use plain text for lyric events
+#. FIXME: read from stdin when files[0] = '-'
+#: lilylib.py:130 midi2ly.py:165 midi2ly.py:1018 midi2ly.py:1083 mup2ly.py:147
+#: mup2ly.py:161 input.cc:93
+msgid "error: "
+msgstr "Fehler: "
 
-#: lilylib.py:130
+#: lilylib.py:134
 #, python-format
 msgid "Exiting (%d)..."
 msgstr "Beende (%d)..."
 
-#: lilylib.py:190 midi2ly.py:223 mup2ly.py:219
+#: lilylib.py:194 midi2ly.py:224 mup2ly.py:220
 #, python-format
 msgid "Usage: %s [OPTIONS]... FILE"
-msgstr "Aufruf: %s [OPTIONEN]... DATEI"
+msgstr "Aufruf: %s [OPTIONS]... DATEI"
 
-#: lilylib.py:194 midi2ly.py:227 mup2ly.py:223 main.cc:205
-#, c-format
+#: lilylib.py:198 midi2ly.py:228 mup2ly.py:224 main.cc:166
 msgid "Options:"
 msgstr "Optionen:"
 
-#: lilylib.py:198 midi2ly.py:231 mup2ly.py:227 main.cc:209
+#: lilylib.py:202 midi2ly.py:232 mup2ly.py:228 main.cc:172
 #, c-format, python-format
 msgid "Report bugs to %s."
 msgstr "Melden Sie Fehler an %s."
 
-#: lilylib.py:218
-#, python-format
-msgid "Binary %s has version %s, looking for version %s"
-msgstr "Binärdatei %s hat Version %s, bei Suche nach Version %s"
-
-#: lilylib.py:252
+#: lilylib.py:228
 #, python-format
 msgid "Opening pipe `%s'"
-msgstr "Öffne Pipe `%s'"
+msgstr "Öffne Pipe `%s'"
 
-#: lilylib.py:267 lilypond-book.py:767
+#. successful pipe close returns 'None'
+#: lilylib.py:240
 #, python-format
 msgid "`%s' failed (%d)"
 msgstr "`%s' gescheitert (%d)"
 
-#: lilylib.py:272 lilylib.py:331 lilypond-book.py:768 lilypond.py:530
-#: old-lilypond-book.py:228
+#: lilylib.py:242 lilylib.py:289 lilypond-book.py:231 lilypond.py:512
 msgid "The error log is as follows:"
 msgstr "Das Fehlerprotokoll lautet wie folgt:"
 
-#: lilylib.py:303 midi2ly.py:259 mup2ly.py:255
+#: lilylib.py:262 midi2ly.py:260 mup2ly.py:256
 #, python-format
 msgid "Invoking `%s'"
 msgstr "Rufe `%s' auf"
 
-#: lilylib.py:305
+#: lilylib.py:264
 #, python-format
 msgid "Running %s..."
 msgstr "Starte %s..."
 
-#: lilylib.py:324
+#: lilylib.py:282
 #, python-format
 msgid "`%s' failed (%s)"
 msgstr "`%s' gescheitert (%s)"
 
-#: lilylib.py:327 midi2ly.py:265 mup2ly.py:263
+#: lilylib.py:285 midi2ly.py:266 mup2ly.py:264
 msgid "(ignored)"
 msgstr "(ignoriert)"
 
-#: lilylib.py:345 midi2ly.py:275 mup2ly.py:273
+#: lilylib.py:299 midi2ly.py:276 mup2ly.py:274
 #, python-format
 msgid "Cleaning %s..."
-msgstr "Räume %s auf..."
+msgstr "Räume %s auf..."
 
-#: lilylib.py:509
+#. Duh.  Python style portable: cp *.EXT OUTDIR
+#. system ('cp *.%s %s' % (ext, outdir), 1)
+#. Python < 1.5.2 compatibility
+#.
+#. On most platforms, this is equivalent to
+#. `normpath(join(os.getcwd()), PATH)'.  *Added in Python version 1.5.2*
+#. tex needs lots of memory, more than it gets by default on Debian
+#. TODO: * prevent multiple addition.
+#. * clean TEXINPUTS, MFINPUTS, TFMFONTS,
+#. as these take prevalence over $TEXMF
+#. and thus may break tex run?
+#. $TEXMF is special, previous value is already taken care of
+#. # -sOutputFile does not work with bbox?
+#. # todo:
+#. # have better algorithm for deciding when to crop page,
+#. # and when to show full page
+#: lilylib.py:458
 msgid "Removing output file"
-msgstr "Lösche Ausgabedatei"
+msgstr "Lösche Ausgabedatei"
 
-#: lilypond-book.py:69
-msgid ""
-"Process LilyPond snippets in hybrid HTML, LaTeX or texinfo document.\n"
-"Example usage:\n"
-"\n"
-"   lilypond-book --filter=\"tr '[a-z]' '[A-Z]'\" BOOK\n"
-"   lilypond-book --filter=\"convert-ly --no-version --from=2.0.0 -\" BOOK\n"
-"   lilypond-book --process='lilypond-bin -I include' BOOK\n"
-"\n"
-msgstr ""
-"LilyPond-Auszüge in gemischtem HTML-, LaTeX- oder texinfo-Dokument verarbeiten.\n"
-"Beispiel-Aufrufe:\n"
-"\n"
-"   lilypond-book --filter=\"tr '[a-z]' '[A-Z]'\" BUCH\n"
-"   lilypond-book --filter=\"convert-ly --no-version --from=2.0.0 -\" BUCH\n"
-"   lilypond-book --process='lilypond-bin -I include' BUCH\n"
-"\n"
+#. !@PYTHON@
+#. once upon a rainy monday afternoon.
+#.
+#. ...
+#.
+#. (not finished.)
+#. ABC standard v1.6:  http://www.gre.ac.uk/~c.walshaw/abc2mtex/abc.txt
+#.
+#. Enhancements  (Roy R. Rankin)
+#.
+#. Header section moved to top of lilypond file
+#. handle treble, treble-8, alto, and bass clef
+#. Handle voices (V: headers) with clef and part names, multiple voices
+#. Handle w: lyrics with multiple verses
+#. Handle key mode names for minor, major, phrygian, ionian, locrian, aeolian,
+#. mixolydian, lydian, dorian
+#. Handle part names from V: header
+#. Tuplets handling fixed up
+#. Lines starting with |: not discarded as header lines
+#. Multiple T: and C: header entries handled
+#. Accidental maintained until next bar check
+#. Silent rests supported
+#. articulations fermata, upbow, downbow, ltoe, accent, tenuto supported
+#. Chord strings([-^]"string") can contain a '#'
+#. Header fields enclosed by [] in notes string processed
+#. W: words output after tune as abc2ps does it (they failed before)
+#. Enhancements (Laura Conrad)
+#.
+#. Barring now preserved between ABC and lilypond
+#. the default placement for text in abc is above the staff.
+#. %%LY now supported.
+#. \breve and \longa supported.
+#. M:none doesn't crash lily.
+#. Limitations
+#.
+#. Multiple tunes in single file not supported
+#. Blank T: header lines should write score and open a new score
+#. Not all header fields supported
+#. ABC line breaks are ignored
+#. Block comments generate error and are ignored
+#. Postscript commands are ignored
+#. lyrics not resynchronized by line breaks (lyrics must fully match notes)
+#. %%LY slyrics can't be directly before a w: line.
+#. ???
+#. TODO:
+#.
+#. Convert to new chord styles.
+#.
+#. UNDEF -> None
+#.
+#. uGUHGUHGHGUGH
+#. UGH
+#. treble8 is used by abctab2ps; -8va is used by barfly,
+#. and by my patch to abc2ps. If there's ever a standard
+#. about this we'll support that.
+#. find keywork
+#. assume that Q takes the form "Q:1/4=120"
+#. There are other possibilities, but they are deprecated
+#. outf.write ("\t\t\\consists Staff_margin_engraver\n")
+#. pitch manipulation. Tuples are (name, alteration).
+#. 0 is (central) C. Alteration -1 is a flat, Alteration +1 is a sharp
+#. pitch in semitones.
+#. abc to lilypond key mode names
+#. semitone shifts for key mode names
+#. latex does not like naked #'s
+#. latex does not like naked "'s
+#. break lyrics to words and put "'s around words containing numbers and '"'s
+#. escape "
+#. _ causes probs inside ""
+#. _ to ' _ '
+#. split words with -
+#. unless \-
+#. ~ to space('_')
+#. * to to space
+#. latex does not like naked #'s
+#. put numbers and " and ( into quoted string
+#. insure space between lines
+#. title
+#. strip trailing blanks
+#. Meter
+#. KEY
+#. seperate clef info
+#. there may or may not be a space
+#. between the key letter and the mode
+#. ugh.
+#. ugh.
+#. Notes
+#. Origin
+#. Reference Number
+#. Area
+#. History
+#. Book
+#. Composer
+#. Default note length
+#. Voice
+#. Words
+#. vocals
+#. tempo
+#. we use in this order specified accidental, active accidental for bar,
+#. active accidental for key
+#. (num /  den)  / defaultlen < 1/base
+#. return (str, num,den,dots)
+#. ignore slide
+#. ignore roll
+#. s7m2 input doesnt care about spaces
+#.
+#. remember accidental for rest of bar
+#.
+#. get accidental set in this bar or UNDEF if not set
+#. WAT IS ABC EEN ONTZETTENDE PROGRAMMEERPOEP  !
+#. failed; not a note!
+#. escape '#'s
+#.
+#. |] thin-thick double bar line
+#. || thin-thin double bar line
+#. [| thick-thin double bar line
+#. :| left repeat
+#. |: right repeat
+#. :: left-right repeat
+#. |1 volta 1
+#. |2 volta 2
+#. first try the longer one
+#. bracket escape
+#. the nobarlines option is necessary for an abc to lilypond translator for
+#. exactly the same reason abc2midi needs it: abc requires the user to enter
+#. the note that will be printed, and MIDI and lilypond expect entry of the
+#. pitch that will be played.
+#.
+#. In standard 19th century musical notation, the algorithm for translating
+#. between printed note and pitch involves using the barlines to determine
+#. the scope of the accidentals.
+#.
+#. Since ABC is frequently used for music in styles that do not use this
+#. convention, such as most music written before 1700, or ethnic music in
+#. non-western scales, it is necessary to be able to tell a translator that
+#. the barlines should not affect its interpretation of the pitch.
+#. write other kinds of appending  if we ever need them.
+#. add comments to current voice
+#. Try nibbling characters off until the line doesn't change.
+#. dump_global (outf)
+#. !@PYTHON@
+#.
+#. convert-ly.py -- Update old LilyPond input files (fix name?)
+#.
+#. source file of the GNU LilyPond music typesetter
+#.
+#. (c)  1998--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+#. Jan Nieuwenhuizen <janneke@gnu.org>
+#. TODO
+#. use -f and -t for -s output
+#. NEWS
+#. 0.2
+#. - rewrite in python
+#. Did we ever have \mudela-version?  I doubt it.
+#. lilypond_version_re_str = '\\\\version *\"(.*)\"'
+#. ###########################
+#. need new a namespace
+#. raise FatalConversionError()
+#. need new a namespace
+#. harmful to current .lys
+#. str = re.sub ('\\\\key([^;]+);', '\\\\accidentals \\1;', str)
+#. raise FatalConversionError()
+#. raise FatalConversionError()
+#. raise FatalConversionError()
+#. TODO: lots of other syntax change should be done here as well
+#. Ugh, but meaning of \stemup changed too
+#. maybe we should do \stemup -> \stemUp\slurUp\tieUp ?
+#. I don't know exactly when these happened...
+#. ugh, we loose context setting here...
+#. (lacks capitalisation slur -> Slur)
+#. # dynamic..
+#. TODO: add lots of these
+#. ugh
+#. old fix
+#. Make sure groups of more than one ; have space before
+#. them, so that non of them gets removed by next rule
+#. Only remove ; that are not after spaces, # or ;
+#. Otherwise  we interfere with Scheme comments,
+#. which is badbadbad.
+#. 40 ?
+#. ###############################
+#. END OF CONVERSIONS
+#. ###############################
+#. !@PYTHON@
+#. info mostly taken from looking at files. See also
+#. http://lilypond.org/wiki/?EnigmaTransportFormat
+#. This supports
+#.
+#. * notes
+#. * rests
+#. * ties
+#. * slurs
+#. * lyrics
+#. * articulation
+#. * grace notes
+#. * tuplets
+#.
+#. todo:
+#. * slur/stem directions
+#. * voices (2nd half of frame?)
+#. * more intelligent lyrics
+#. * beams (better use autobeam?)
+#. * more robust: try entertainer.etf (freenote)
+#. * dynamics
+#. * empty measures (eg. twopt03.etf from freenote)
+#.
+#. uGUHGUHGHGUGH
+#. notename 0 == central C
+#. represent pitches as (notename, alteration), relative to C-major scale
+#. a fifth up
+#. should cache this.
+#. flag1 isn't all that interesting.
+#. 3: '>',
+#. 18: '\arpeggio' ,
+#. do grace notes.
+#. ugh.
+#. we don't attempt voltas since they fail easily.
+#. and g.repeat_bar == '|:' or g.repeat_bar == ':|:' or g.bracket:
+#. 4 layers.
+#. let's not do this: this really confuses when eE happens to be before  a ^text.
+#. if last_tag and last_indices:
+#. etf_file_dict[last_tag][last_indices].append (l)
+#. # do it
+#. staff-spec
+#. should use \addlyrics ?
+#. !@PYTHON@
+#. vim: set noexpandtab:
+#. This is was the idea for handling of comments:
+#. Multiline comments, @ignore .. @end ignore is scanned for
+#. in read_doc_file, and the chunks are marked as 'ignore', so
+#. lilypond-book will not touch them any more. The content of the
+#. chunks are written to the output file. Also 'include' and 'input'
+#. regex has to check if they are commented out.
+#.
+#. Then it is scanned for 'lilypond', 'lilypond-file' and 'lilypond-block'.
+#. These three regex's has to check if they are on a commented line,
+#. % for latex, @c for texinfo.
+#.
+#. Then lines that are commented out with % (latex) and @c (Texinfo)
+#. are put into chunks marked 'ignore'. This cannot be done before
+#. searching for the lilypond-blocks because % is also the comment character
+#. for lilypond.
+#.
+#. The the rest of the rexeces are searched for. They don't have to test
+#. if they are on a commented out line.
+#. ###############################################################
+#. Users of python modules should include this snippet
+#. and customize variables below.
+#. We'll suffer this path init stuff as long as we don't install our
+#. python packages in <prefix>/lib/pythonx.y (and don't kludge around
+#. it as we do with teTeX on Red Hat Linux: set some environment var
+#. (PYTHONPATH) in profile)
+#. If set, LILYPONDPREFIX must take prevalence
+#. if datadir is not set, we're doing a build and LILYPONDPREFIX
+#. Customize these
+#. if __name__ == '__main__':
+#. lilylib globals
+#. temp_dir = os.path.join (original_dir,  '%s.dir' % program_name)
+#. urg
+#. # FIXME
+#. # do -P or -p by default?
+#. #help_summary = _ ("Run LilyPond using LaTeX for titling")
+#: lilypond-book.py:120
+msgid "Process LilyPond snippets in hybrid html, LaTeX or texinfo document"
+msgstr "LilyPond-Teile in Mischdateien (HTML, LaTeX oder texinfo) verarbeiten"
 
-#. Bug in option parser: --output=foe is taken as an abbreviation
-#. for --output-format.
-#: lilypond-book.py:82 old-lilypond-book.py:123 main.cc:139
+#. another bug in option parser: --output=foe is taken as an abbreviation
+#. for --output-format
+#: lilypond-book.py:125 main.cc:110
 msgid "EXT"
 msgstr "ERW"
 
-#: lilypond-book.py:82 old-lilypond-book.py:123
+#: lilypond-book.py:125
 msgid "use output format EXT (texi [default], texi-html, latex, html)"
 msgstr "Ausgabeformat ERW (texi [Vorgabe], texi-html, latex, html) verwenden"
 
-#: lilypond-book.py:83
-msgid "FILTER"
-msgstr "FILTER"
-
-#: lilypond-book.py:83
-msgid "pipe snippets through FILTER [convert-ly -n -]"
-msgstr "Auszüge durch FILTER [convert-ly -n -] leiten (Pipe)"
+#: lilypond-book.py:126 lilypond-book.py:127 lilypond-book.py:129
+#: lilypond-book.py:130
+msgid "DIM"
+msgstr "GROE"
 
-#: lilypond-book.py:85 lilypond-book.py:87 lilypond.py:131
-#: old-lilypond-book.py:130 main.cc:142 main.cc:147
-msgid "DIR"
-msgstr "VERZ"
+#: lilypond-book.py:126
+msgid "default fontsize for music.  DIM is assumed to be in points"
+msgstr "Schriftgrößenvorgabe für Musik. Einheit für GROE: Punkte"
 
-#: lilypond-book.py:85
-msgid "add DIR to include path"
-msgstr "VERZ zum Einfügepfad hinzufügen"
+#: lilypond-book.py:127
+msgid "deprecated, use --default-music-fontsize"
+msgstr "veraltet, verwenden Sie --default-music-fontsize"
 
-#: lilypond-book.py:86
-msgid "COMMAND"
-msgstr "BEFEHL"
+#: lilypond-book.py:128
+msgid "OPT"
+msgstr "OPT"
 
-#: lilypond-book.py:86
-msgid "process ly_files using COMMAND FILE..."
-msgstr "ly_files mit BEFEHL DATEI... verarbeiten"
+#: lilypond-book.py:128
+msgid "pass OPT quoted to the lilypond command line"
+msgstr "OPT \"zitiert\" an die LilyPond-Kommandozeile Ã¼bergeben"
 
-#: lilypond-book.py:87
-msgid "write output to DIR"
-msgstr "Ausgabe in DATEI schreiben"
+#: lilypond-book.py:129
+msgid "force fontsize for all inline lilypond. DIM is assumed be to in points"
+msgstr "Schriftgröße für eingebettetes LilyPond erzwingen. Einheit für GROE: Punkte"
 
-#: lilypond-book.py:88 lilypond.py:149 midi2ly.py:105 mup2ly.py:78
-#: old-lilypond-book.py:140 main.cc:150
-msgid "be verbose"
-msgstr "wortreich sein"
+#: lilypond-book.py:130
+msgid "deprecated, use --force-music-fontsize"
+msgstr "veraltet, verwenden Sie --force-music-fontsize"
 
-#: lilypond-book.py:89 old-lilypond-book.py:141
-msgid "print version information"
-msgstr "Versionsinformation ausgeben"
+#: lilypond-book.py:132 lilypond.py:130 main.cc:113 main.cc:118
+msgid "DIR"
+msgstr "VERZ"
 
-#: lilypond-book.py:90 lilypond.py:151 midi2ly.py:107 mup2ly.py:80
-#: old-lilypond-book.py:142 main.cc:151
-msgid "show warranty and copyright"
-msgstr "Informationen zu Gewährleistung und Copyright anzeigen"
+#: lilypond-book.py:132
+msgid "include path"
+msgstr "Pfad einbeziehen"
 
-#: lilypond-book.py:373
-#, python-format
-msgid "deprecated ly-option used: %s"
-msgstr "veraltete ly-option verwendet: %s"
+#: lilypond-book.py:133
+msgid "write dependencies"
+msgstr "Schreib-Abhängigkeiten"
 
-#: lilypond-book.py:374
-#, python-format
-msgid "compatibility mode translation: %s"
-msgstr "Ãœbersetzung im Kompatibilitätsmodus: %s"
+#: lilypond-book.py:134
+msgid "PREF"
+msgstr "PRÄF"
 
-#: lilypond-book.py:394
-#, python-format
-msgid "ignoring unknown ly option: %s"
-msgstr "unbekannte Option ignoriert: %s"
+#: lilypond-book.py:134
+msgid "prepend PREF before each -M dependency"
+msgstr "stelle PRÄF den -M Abhängigkeiten voran"
 
-#: lilypond-book.py:448
-#, python-format
-msgid "file not found: %s"
-msgstr "Datei `%s' nicht gefunden"
+#: lilypond-book.py:135
+msgid "don't run lilypond"
+msgstr "LilyPond nicht aufrufen"
 
-#: lilypond-book.py:750
-#, python-format
-msgid "Opening filter `%s'"
-msgstr "Öffne Filter `%s'"
+#: lilypond-book.py:136
+msgid "don't generate pictures"
+msgstr "keine Bilder generieren"
 
-#: lilypond-book.py:862
-#, python-format
-msgid "cannot determine format for: %s"
-msgstr "Kann Format nicht finden für: %s"
+#: lilypond-book.py:137
+msgid "strip all lilypond blocks from output"
+msgstr "alle LilyPond-Blöcke aus der Ausgabe entfernen"
 
-#: lilypond-book.py:903
-msgid "Output would overwrite input file; use --output."
-msgstr "Ausgabe würde Eingabedatei Ã¼berschreiben; verwenden Sie --output."
+#: lilypond-book.py:138 lilypond-book.py:139 lilypond.py:135 lilypond.py:136
+#: midi2ly.py:102 main.cc:114 main.cc:117
+msgid "FILE"
+msgstr "DATEI"
 
-#: lilypond-book.py:910
-#, python-format
-msgid "Reading %s..."
-msgstr "%s lesen..."
+#: lilypond-book.py:138
+msgid "filename main output file"
+msgstr "Dateiname für Hauptausgabedatei"
 
-#: lilypond-book.py:924
-msgid "Dissecting..."
-msgstr "Zerlegen..."
+#: lilypond-book.py:139
+msgid "where to place generated files"
+msgstr "Ziel der generierten Dateien"
 
-#: lilypond-book.py:952
-msgid "Writing snippets..."
-msgstr "Schreibe Auszüge..."
+#: lilypond-book.py:140 lilypond.py:137
+msgid "RES"
+msgstr "AUFL"
 
-#: lilypond-book.py:957
-msgid "Processing..."
-msgstr "Verarbeiten..."
+#: lilypond-book.py:141 lilypond.py:138
+msgid "set the resolution of the preview to RES"
+msgstr "Auflösung der Vorschau auf AUFL setzen"
 
-#: lilypond-book.py:960
-msgid "All snippets are up to date..."
-msgstr "Alle Auszüge sind auf dem neuesten Stand..."
+#: lilypond-book.py:142 lilypond.py:148 midi2ly.py:105 mup2ly.py:78 main.cc:126
+msgid "be verbose"
+msgstr "wortreich"
 
-#: lilypond-book.py:963
-#, python-format
-msgid "Compiling %s..."
-msgstr "%s kompilieren..."
+#: lilypond-book.py:143
+msgid "print version information"
+msgstr "Versionsinformation ausgeben"
 
-#: lilypond-book.py:971
-#, python-format
-msgid "Processing include: %s"
-msgstr "Verarbeite Einfügung: %s"
+#: lilypond-book.py:144 lilypond.py:150 midi2ly.py:107 mup2ly.py:80 main.cc:127
+msgid "show warranty and copyright"
+msgstr "Gewährleistung und Copyright zeigen"
+
+#. format specific strings, ie. regex-es for input, and % strings for output
+#. global variables
+#. lilypond_binary = 'valgrind --suppressions=/home/hanwen/usr/src/guile-1.6.supp  --num-callers=10 /home/hanwen/usr/src/lilypond/lily/out/lilypond'
+#. only use installed binary  when we're installed too.
+#. only use installed binary  when we're installed too.
+#. ###############################################################
+#. Dimension handling for LaTeX.
+#.
+#. Ugh.  (La)TeX writes progress and error messages on stdout
+#. Redirect to stderr
+#: lilypond-book.py:230
+msgid "LaTeX failed."
+msgstr "LaTeX scheiterte."
 
-#: lilypond-book.py:987 lilypond.py:693 midi2ly.py:1017
-#: old-lilypond-book.py:1570
+#. URG see lilypond
+#. Convert numeric values, with or without specific dimension, to floats.
+#. Keep other strings
+#. ###############################################################
+#. How to output various structures.
+#. # maybe <hr> ?
+#. Verbatim text is always finished with \n.  FIXME: For HTML,
+#. this newline should be removed.
+#. Verbatim text is always finished with \n.  FIXME: For HTML,
+#. this newline should be removed.
+#. # Ugh we need to differentiate on origin:
+#. # lilypond-block origin wants an extra <p>, but
+#. # inline music doesn't.
+#. # possibly other center options?
+#. verbatim text is always finished with \n
+#. verbatim text is always finished with \n
+#. verbatim text is always finished with \n
+#. verbatim text is always finished with \n
+#. do some tweaking: @ is needed in some ps stuff.
+#.
+#. ugh, the <p> below breaks inline images...
+#. clumsy workaround for python 2.2 pre bug.
+#. ###############################################################
+#. Recognize special sequences in the input
+#. Warning: This uses extended regular expressions.  Tread with care.
+#.
+#. legenda
+#.
+#. (?P<name>regex) -- assign result of REGEX to NAME
+#. *? -- match non-greedily.
+#. (?m) -- multiline regex: make ^ and $ match at each line
+#. (?s) -- make the dot match all characters including newline
+#. why do we have distinction between @mbinclude and @include?
+#. # we'd like to catch and reraise a more
+#. # detailed error, but alas, the exceptions
+#. # changed across the 1.5/2.1 boundary.
+#. ughUGH not original options
+#. First we want to scan the \documentclass line
+#. it should be the first non-comment line.
+#. The only thing we really need to know about the \documentclass line
+#. is if there are one or two columns to begin with.
+#. Then we add everything before \begin{document} to
+#. paperguru.m_document_preamble so that we can later write this header
+#. to a temporary file in find_latex_dims() to find textwidth.
+#. this is not bulletproof..., it checks the first 10 chunks
+#. newchunks.extend (func (m))
+#. python 1.5 compatible:
+#. we have to check for verbatim before doing include,
+#. because we don't want to include files that are mentioned
+#. inside a verbatim environment
+#. ugh fix input
+#. # Hmm, we should hash only lilypond source, and skip the
+#. # %options are ...
+#. # comment line
+#. # todo: include path, but strip
+#. # first part of the path.
+#. format == 'html'
+#. ugh rename
+#. Count sections/chapters.
+#. # TODO: do something like
+#. # this for texinfo/latex as well ?
+#. ugh
+#. fixme: be sys-independent.
+#.
+#. Ugh, fixing up dependencies for .tex generation
+#.
+#. Ugh.  (La)TeX writes progress and error messages on stdout
+#. Redirect to stderr
+#. # There used to be code to write .tex dependencies, but
+#. # that is silly: lilypond-book has its own dependency scheme
+#. # to ensure that all lily-XXX.tex files are there
+#. # TODO: put file name in front of texidoc.
+#. #
+#. # what's this? Docme --hwn
+#. #
+#. #docme: why global?
+#. Do It.
+#. should chmod -w
+#: lilypond-book.py:1557 lilypond.py:673 midi2ly.py:1018
 #, python-format
 msgid "getopt says: `%s'"
 msgstr "getopt sagt: `%s'"
 
+#. HACK
+#. status = os.system ('lilypond -w')
+#: lilypond-book.py:1630 lilypond.py:777
+msgid "no files specified on command line"
+msgstr "Keine Dateien auf der Kommandozeile angegeben"
+
+#.
+#. Petr, ik zou willen dat ik iets zinvoller deed,
+#. maar wat ik kan ik doen, het verandert toch niets?
+#. --hwn 20/aug/99
+#. !@PYTHON@
+#.
+#. lilypond.py -- Run LilyPond, add titles to bare score, generate printable
+#. document
+#. Invokes: lilypond, latex (or pdflatex), dvips, ps2pdf, gs
+#.
+#. source file of the GNU LilyPond music typesetter
+#.
+#. (c)  1998--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+#. Jan Nieuwenhuizen <janneke@gnu.org>
+#. This is the third incarnation of lilypond.
+#.
+#. Earlier incarnations of lilypond were written by
+#. Jeffrey B. Reed<daboys@austin.rr.com> (Python version)
+#. Jan Arne Fagertun <Jan.A.Fagertun@@energy.sintef.no> (Bourne shell script)
+#.
+#. Note: gettext work best if we use ' for docstrings and "
+#. for gettextable strings.
+#. --> DO NOT USE ''' for docstrings.
+#. ###############################################################
+#. Users of python modules should include this snippet
+#. and customize variables below.
+#. We'll suffer this path init stuff as long as we don't install our
+#. python packages in <prefix>/lib/pythonx.y (and don't kludge around
+#. it as we do with teTeX on Red Hat Linux: set some environment var
+#. (PYTHONPATH) in profile)
+#. If set, LILYPONDPREFIX must take prevalence
+#. if datadir is not set, we're doing a build and LILYPONDPREFIX
+#. Customize these
+#. if __name__ == '__main__':
+#. lilylib globals
 #. # FIXME
 #. # do -P or -p by default?
 #. #help_summary = _ ("Run LilyPond using LaTeX for titling")
-#: lilypond.py:120
+#: lilypond.py:121
 msgid "Run LilyPond, add titles, generate printable document."
-msgstr "LilyPond aufrufen, Titel hinzufügen, druckbares Dokument erzeugen."
+msgstr "LilyPond aufrufen, Titel hinzufügen, druckbares Dokument erzeugen."
 
-#: lilypond.py:126
+#: lilypond.py:127 main.cc:115
 msgid "write Makefile dependencies for every input file"
-msgstr "Makefile-Abhängigkeiten für jede Eingabedatei schreiben"
+msgstr "Makefile-Abhängigkeiten für jede Eingabedatei schreiben"
 
-#: lilypond.py:128
+#: lilypond.py:129
 msgid "print even more output"
 msgstr "noch mehr Ausgabe erzeugen"
 
-#: lilypond.py:129 lilypond.py:136 midi2ly.py:102 old-lilypond-book.py:136
-#: old-lilypond-book.py:137 main.cc:143 main.cc:146
-msgid "FILE"
-msgstr "DATEI"
-
-#: lilypond.py:129
-msgid "find pfa fonts used in FILE"
-msgstr "PFA-Schriftarten, welche in DATEI verwendet werden, finden"
-
 #: lilypond.py:130
-msgid "make HTML file with links to all output"
-msgstr "HTML-Datei mit Querverweisen in die gesamte Ausgabe erzeugen"
-
-#: lilypond.py:131
 msgid "add DIR to LilyPond's search path"
-msgstr "VERZ zu LilyPond's Suchpfad hinzufügen"
+msgstr "VERZ zu LilyPond's Suchpfad hinzufügen"
 
-#: lilypond.py:133
+#: lilypond.py:132
 #, python-format
 msgid "keep all output, output to directory %s.dir"
 msgstr "Alle Ausgaben aufbewahren, ins Verzeichnis %s.dir ausgeben"
 
-#: lilypond.py:134
+#: lilypond.py:133
 msgid "don't run LilyPond"
 msgstr "LilyPond nicht aufrufen"
 
-#: lilypond.py:135 main.cc:145
+#: lilypond.py:134 main.cc:116
 msgid "produce MIDI output only"
 msgstr "nur MIDI-Ausgabe erzeugen"
 
-#: lilypond.py:136 midi2ly.py:102 mup2ly.py:76 main.cc:146
-msgid "write output to FILE"
-msgstr "Ausgabe in DATEI schreiben"
-
-#: lilypond.py:137 old-lilypond-book.py:138
-msgid "RES"
-msgstr "AUFL"
-
-#: lilypond.py:138 old-lilypond-book.py:139
-msgid "set the resolution of the preview to RES"
-msgstr "Auflösung der Vorschau auf AUFL setzen"
+#: lilypond.py:136
+msgid "find pfa fonts used in FILE"
+msgstr "PFA-Schriftarten, welche in DATEI verwendet werden, finden"
 
 #: lilypond.py:139
-msgid "do not generate PDF output"
-msgstr "keine PDF-Ausgabe erzeugen"
+msgid "generate PostScript output"
+msgstr "PostScript-Ausgabe erzeugen"
 
 #: lilypond.py:140
-msgid "do not generate PostScript output"
-msgstr "keine PostScript-Ausgabe erzeugen"
+msgid "generate PNG page images"
+msgstr "PNG Dateien für Seiten erzeugen"
 
 #: lilypond.py:141
-msgid "generate PDF output"
-msgstr "PDF-Ausgabe erzeugen"
+msgid "generate PS.GZ"
+msgstr "ps.gz-Ausgabe erzeugen"
 
 #: lilypond.py:142
-msgid "generate PostScript output"
-msgstr "PostScript-Ausgabe erzeugen"
+msgid "generate PDF output"
+msgstr "PDF-Ausgabe erzeugen"
 
 #: lilypond.py:143
-msgid "use pdflatex to generate PDF output"
+msgid "use pdflatex to generate PDF output"
 msgstr "pdflatex verwenden, um PDF-Ausgabe zu erzeugen"
 
-#: lilypond.py:144
-msgid "generate PNG page images"
-msgstr "PNG-Dateien für Seiten erzeugen"
-
+#. FIXME: preview, picture; to indicate creation of a PNG?
 #: lilypond.py:145
 msgid "make a picture of the first system"
 msgstr "ein Bild des ersten Systems erzeugen"
 
 #: lilypond.py:146
-msgid "generate PS.GZ"
-msgstr "ps.gz-Ausgabe erzeugen"
+msgid "make HTML file with links to all output"
+msgstr "HTML-Datei mit Querverweisen in die gesamte Ausgabe erzeugen"
 
 #: lilypond.py:147
-msgid "run in safe-mode"
-msgstr "im sicheren Modus laufen"
-
-#: lilypond.py:148
 msgid "KEY=VAL"
 msgstr "KEY=VAL"
 
-#: lilypond.py:148
+#: lilypond.py:147
 msgid "change global setting KEY to VAL"
 msgstr "globale Einstellung von KEY auf VAL setzen"
 
-#: lilypond.py:150 midi2ly.py:106 mup2ly.py:79 main.cc:149
+#: lilypond.py:149 midi2ly.py:106 mup2ly.py:79 main.cc:125
 msgid "print version number"
 msgstr "Versionsnummer ausgeben"
 
-#: lilypond.py:234
+#. other globals
+#. Pdftex support
+#. # yuk.
+#. lilypond_binary = 'valgrind --suppressions=%(home)s/usr/src/guile-1.6.supp --num-callers=10 %(home)s/usr/src/lilypond/lily/out/lilypond '% { 'home' : '/home/hanwen' }
+#. only use installed binary  when we're installed too.
+#. init to empty; values here take precedence over values in the file
+#. # TODO: change name.
+#. for geometry v3
+#. Output formats that lilypond should create
+#. what a name.
+#. ly.warning (_ ("invalid value: %s") % `val`)
+#. ly.warning (_ ("invalid value: %s") % `val`)
+#: lilypond.py:232
 #, python-format
 msgid "no such setting: `%s'"
 msgstr "keine solche Einstellung: `%s'"
 
-#: lilypond.py:284
+#. 2 == user interrupt.
+#: lilypond.py:274
 #, python-format
 msgid "LilyPond crashed (signal %d)."
-msgstr "LilyPond abgestürzt (Signal %d)."
+msgstr "LilyPond abgestürzt (Signal %d)."
 
-#: lilypond.py:285
+#: lilypond.py:275
 msgid "Please submit a bug report to bug-lilypond@gnu.org"
 msgstr "Bitte senden Sie einen Fehlerbericht an bug-lilypond@gnu.org"
 
-#: lilypond.py:291
+#: lilypond.py:281
 #, python-format
 msgid "LilyPond failed on input file %s (exit status %d)"
-msgstr "LilyPond scheiterte an der Eingabedatei %s (Rückgabewert %d)."
+msgstr "LilyPond scheiterte an der Eingabedatei %s (Rückgabewert %d)."
 
-#: lilypond.py:294
+#: lilypond.py:284
 #, python-format
 msgid "LilyPond failed on an input file (exit status %d)"
-msgstr "LilyPond scheiterte an der Eingabedatei (Rückgabewert %d)."
+msgstr "LilyPond scheiterte an der Eingabedatei (Rückgabewert %d)."
 
-#: lilypond.py:295
+#: lilypond.py:285
 msgid "Continuing..."
 msgstr "Setze fort..."
 
-#: lilypond.py:306
+#. urg
+#: lilypond.py:296
 #, python-format
 msgid "Analyzing %s..."
 msgstr "Analysiere %s..."
 
-#: lilypond.py:364
+#. search only the first 10k
+#: lilypond.py:354
 #, python-format
 msgid "no LilyPond output found for `%s'"
-msgstr "keine LilyPond-Ausgabe für `%s' gefunden"
+msgstr "keine LilyPond-Ausgabe für `%s' gefunden"
 
-#: lilypond.py:431
+#. The final \n seems important here. It ensures that the footers and taglines end up on the right page.
+#. TODO: should set textheight (enlarge) depending on papersize.
+#: lilypond.py:397
 #, python-format
 msgid "invalid value: `%s'"
-msgstr "ungültiger Wert: `%s'"
+msgstr "ungültiger Wert: `%s'"
 
-#: lilypond.py:529
+#. set sane geometry width (a4-width) for linewidth = -1.
+#. who the hell is 597 ?
+#. Ugh.  (La)TeX writes progress and error messages on stdout
+#. Redirect to stderr
+#: lilypond.py:511
 msgid "LaTeX failed on the output file."
 msgstr "LaTeX scheiterte an der Ausgabedatei"
 
-#: lilypond.py:586
+#. make a preview by rendering only the 1st line
+#. of each score
+#: lilypond.py:568
 msgid ""
 "Trying create PDF, but no PFA fonts found.\n"
 "Using bitmap fonts instead. This will look bad."
 msgstr ""
 "Versuche PDF zu erzeugen, finde jedoch keine PFA-Schriftarten.\n"
-"Verwende stattdessen Bitmap-Schriftarten. Das wird Ã¼bel aussehen."
+"Verwende stattdessen Bitmap-Schriftarten. Das wird Ã¼bel aussehen."
 
+#. ugh. Different targets?
+#. Added as functionality to lilypond, because lilypond may well need to do this
+#. in future too.
 #. no ps header?
-#: lilypond.py:635
+#: lilypond.py:615
 #, python-format
 msgid "not a PostScript file: `%s'"
 msgstr "Keine PostScript-Datei: `%s'"
 
-#: lilypond.py:680
+#. todo
+#: lilypond.py:660
 #, python-format
 msgid "Writing HTML menu `%s'"
-msgstr "Schreibe HTML-Menü `%s'..."
-
-#: lilypond.py:800
+msgstr "Schreibe HTML-Menü `%s'..."
+
+#. signal programming error
+#. Don't convert input files to abspath, rather prepend '.' to include
+#. path.
+#. As a neat trick, add directory part of first input file
+#. to include path.  That way you can do without the clumsy -I in:
+#. lilypond -I foe/bar/baz foo/bar/baz/baz.ly
+#: lilypond.py:769
 msgid "pseudo filter"
 msgstr "Pseudo-Filter"
 
-#: lilypond.py:803
+#: lilypond.py:772
 msgid "pseudo filter only for single input file"
-msgstr "Pseudo-Filter nur für einzelne Eingabedatei"
-
-#: lilypond.py:808 old-lilypond-book.py:1643
-msgid "no files specified on command line"
-msgstr "Keine Dateien auf der Kommandozeile angegeben"
+msgstr "Pseudo-Filter nur für einzelne Eingabedatei"
 
-#: lilypond.py:840
+#. Ugh, maybe make a setup () function
+#. hmmm. Wish I'd 've written comments when I wrote this.
+#. now it looks complicated.
+#: lilypond.py:806
 #, python-format
 msgid "filename should not contain spaces: `%s'"
 msgstr "Dateiname sollte keine Leerzeichen enthalten: `%s'"
 
-#: lilypond.py:880
+#. to be sure, add tmpdir *in front* of inclusion path.
+#. os.environ['TEXINPUTS'] =  tmpdir + ':' + os.environ['TEXINPUTS']
+#. We catch all exceptions, because we need to do stuff at exit:
+#. * copy any successfully generated stuff from tempdir and
+#. notify user of that
+#. * cleanout tempdir
+#. ## ARGH. This also catches python programming errors.
+#. ## this should only catch lilypond nonzero exit  status
+#. ## --hwn
+#. TODO: friendly message about LilyPond setup/failing?
+#.
+#: lilypond.py:845
 msgid "Running LilyPond failed. Rerun with --verbose for a trace."
-msgstr "LilyPond-Aufruf gescheitert. Versuchen Sie es erneut mit --verbose für ein Protokoll (Trace)."
-
-#: lilypond.py:921
+msgstr "LilyPond-Aufruf gescheitert. Versuchen Sie es erneut mit --verbose für ein Protokoll."
+
+#. Our LilyPond pseudo filter always outputs to 'lelie'
+#. have subsequent stages and use 'lelie' output.
+#. unless: add --tex, or --latex?
+#. TODO: friendly message about TeX/LaTeX setup,
+#. trying to run tex/latex by hand
+#: lilypond.py:886
 msgid "Failed to make PS file. Rerun with --verbose for a trace."
-msgstr "Erzeugung der PS-Datei gescheitert. Versuchen Sie es erneut mit --verbose für ein Protokoll."
+msgstr "Erzeugung der PS-Datei gescheitert. Versuchen Sie es erneut mit --verbose für ein Protokoll."
 
-#: lilypond.py:951
-msgid "Running LaTeX failed. Rerun with --verbose for a trace."
-msgstr "LaTeX-Aufruf gescheitert. Versuchen Sie es erneut mit --verbose für ein Protokoll."
+#. unless: add --tex, or --latex?
+#. TODO: friendly message about TeX/LaTeX setup,
+#. trying to run tex/latex by hand
+#: lilypond.py:916
+msgid "Running LaTeX falied. Rerun with --verbose for a trace."
+msgstr "LaTeX-Aufruf gescheitert. Versuchen Sie es erneut mit --verbose für ein Protokoll."
 
-#: lilypond.py:963 input-file-results.cc:74
+#. add DEP to targets?
+#: lilypond.py:926 input-file-results.cc:68
 #, c-format, python-format
 msgid "dependencies output to `%s'..."
-msgstr "Abhängigkeiten-Ausgabe nach `%s'..."
+msgstr "Abhängigkeiten-Ausgabe nach `%s'..."
 
-#: lilypond.py:974
+#: lilypond.py:937
 #, python-format
 msgid "%s output to <stdout>..."
 msgstr "Ausgabe von %s nach <stdout>..."
 
-#: lilypond.py:979 includable-lexer.cc:57 input-file-results.cc:217
-#: input-file-results.cc:224 lily-guile.cc:86
+#: lilypond.py:942 lilypond.py:968 includable-lexer.cc:57
+#: input-file-results.cc:191 input-file-results.cc:197 lily-guile.cc:86
 #, c-format, python-format
 msgid "can't find file: `%s'"
 msgstr "Kann Datei nicht finden: `%s'"
 
-#: lilypond.py:1002
+#. Hmm, if this were a function, we could call it the except: clauses
+#: lilypond.py:965
 #, python-format
 msgid "%s output to %s..."
 msgstr "Ausgabe von %s nach %s..."
 
-#: lilypond.py:1005
-#, python-format
-msgid "can't find file: `%s.%s'"
-msgstr "Kann Datei nicht finden: `%s.%s'"
-
+#. !@PYTHON@
+#.
+#. midi2ly.py -- LilyPond midi import script
+#.
+#. source file of the GNU LilyPond music typesetter
+#.
+#. (c)  1998--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+#. Jan Nieuwenhuizen <janneke@gnu.org>
+#. ###############################################################
+#. Users of python modules should include this snippet.
+#.
+#. This soon to be removed for: import lilypond.lilylib as ly
+#. ###############################################################
+#. ###############################################################
+#. ############### CONSTANTS
+#. ###############################################################
 #. temp_dir = os.path.join (original_dir,  '%s.dir' % program_name)
 #. original_dir = os.getcwd ()
 #. keep_temp_dir_p = 0
@@ -493,7 +939,7 @@ msgstr "MIDI nach LilyPond-Quelltext konvertieren."
 
 #: midi2ly.py:97
 msgid "print absolute pitches"
-msgstr "Absolute Tonhöhen ausgeben"
+msgstr "Absolute Tonhöhen ausgeben"
 
 #: midi2ly.py:98 midi2ly.py:103
 msgid "DUR"
@@ -501,11 +947,11 @@ msgstr "DAUER"
 
 #: midi2ly.py:98
 msgid "quantise note durations on DUR"
-msgstr "Notenlängen auf DAUER quantisieren"
+msgstr "Notenlängen auf DAUER quantisieren"
 
 #: midi2ly.py:99
 msgid "print explicit durations"
-msgstr "Explizite Notenlängen ausgeben"
+msgstr "Explizite Notenlängen ausgeben"
 
 #: midi2ly.py:101
 msgid "ALT[:MINOR]"
@@ -517,52 +963,120 @@ msgstr "Tonart setzen: VORZ=+Kreuze|-B's; MOLL=1"
 
 #: midi2ly.py:103
 msgid "quantise note starts on DUR"
-msgstr "Notenanfänge auf DAUER quantisieren"
+msgstr "Notenanfänge auf DAUER quantisieren"
 
 #: midi2ly.py:104
 msgid "DUR*NUM/DEN"
-msgstr "DAUER*ZÄHLER/NENNER"
+msgstr "DAUER*ZÄHLER/NENNER"
 
 # tuplet = Wertaufteilung nach: Peter Giger: Die Kunst des Rhythmus, Seite 25
 #: midi2ly.py:104
 msgid "allow tuplet durations DUR*NUM/DEN"
-msgstr "Wertaufteilungsdauern DAUER*ZÄHLER/NENNER erlauben"
+msgstr "Wertaufteilungsdauern DAUER*ZÄHLER/NENNER erlauben"
 
 #: midi2ly.py:108
 msgid "treat every text as a lyric"
 msgstr "Jeden Text als Liedtext behandeln"
 
-#: midi2ly.py:149 mup2ly.py:143 input.cc:88
-msgid "warning: "
-msgstr "Warnung: "
+#: midi2ly.py:136 mup2ly.py:130
+msgid " 2001--2003"
+msgstr " 2001--2003"
 
-#: midi2ly.py:164 midi2ly.py:1017 midi2ly.py:1082 mup2ly.py:146 mup2ly.py:160
-#: input.cc:93
-msgid "error: "
-msgstr "Fehler: "
+#: midi2ly.py:141 mup2ly.py:135
+msgid ""
+"\n"
+"Distributed under terms of the GNU General Public License. It comes with\n"
+"NO WARRANTY."
+msgstr ""
+"\n"
+"Vertrieben unter den Bedingungen der GNU General Public License\n"
+"und ohne GEWÄHRLEISTUNG."
 
-#: midi2ly.py:165 mup2ly.py:161
+#: midi2ly.py:166 mup2ly.py:162
 msgid "Exiting ... "
 msgstr "Beenden ... "
 
-#: midi2ly.py:263 mup2ly.py:260
+#: midi2ly.py:264 mup2ly.py:261
 #, python-format
 msgid "command exited with value %d"
-msgstr "Kommando mit Rückgabewert %d beendet"
-
-#: midi2ly.py:1001
+msgstr "Kommando mit Rückgabewert %d beendet"
+
+#. ###############################################################
+#. END Library
+#. ###############################################################
+#. hmm
+#. major scale: do-do
+#. minor scale: la-la  (= + 5) '''
+#. By tradition, all scales now consist of a sequence
+#. of 7 notes each with a distinct name, from amongst
+#. a b c d e f g.  But, minor scales have a wide
+#. second interval at the top - the 'leading note' is
+#. sharped. (Why? it just works that way! Anything
+#. else doesn't sound as good and isn't as flexible at
+#. saying things. In medieval times, scales only had 6
+#. notes to avoid this problem - the hexachords.)
+#. So, the d minor scale is d e f g a b-flat c-sharp d
+#. - using d-flat for the leading note would skip the
+#. name c and duplicate the name d.  Why isn't c-sharp
+#. put in the key signature? Tradition. (It's also
+#. supposedly based on the Pythagorean theory of the
+#. cycle of fifths, but that really only applies to
+#. major scales...)  Anyway, g minor is g a b-flat c d
+#. e-flat f-sharp g, and all the other flat minor keys
+#. end up with a natural leading note. And there you
+#. have it.
+#. John Sankey <bf250@freenet.carleton.ca>
+#.
+#. Let's also do a-minor: a b c d e f gis a
+#.
+#. --jcn
+#. as -> gis
+#. des -> cis
+#. ges -> fis
+#. g -> fisis
+#. d -> cisis
+#. a -> gisis
+#. b -> ces
+#. e -> fes
+#. f -> eis
+#. c -> bis
+#. # FIXME: compile fix --jcn
+#. TODO: move space
+#. fis cis gis dis ais eis bis
+#. bes es as des ges ces fes
+#. urg, we should be sure that we're in a lyrics staff
+#. all include ALL_NOTES_OFF
+#. ugh, must set key while parsing
+#. because Note init uses key
+#. Better do Note.calc () at dump time?
+#. last_lyric.clocks = t - last_time
+#. hmm
+#. urg, this will barf at meter changes
+#. urg LilyPond doesn't start at c4, but
+#. remembers from previous tracks!
+#. reference_note = Note (clocks_per_4, 4*12, 0)
+#. must be in \notes mode for parsing \skip
+#: midi2ly.py:1002
 #, python-format
 msgid "%s output to `%s'..."
 msgstr "%s nach `%s' ausgeben..."
 
-#: midi2ly.py:1032
+#: midi2ly.py:1033
 msgid "Example:"
 msgstr "Beispiel:"
 
-#: midi2ly.py:1082
+#: midi2ly.py:1083
 msgid "no files specified on command line."
 msgstr "Keine Dateien auf der Kommandozeile angegeben."
 
+#. !@PYTHON@
+#. mup2ly.py -- mup input converter
+#.
+#. source file of the GNU LilyPond music typesetter
+#.
+#. (c) 2001
+#. if set, LILYPONDPREFIX must take prevalence
+#. if datadir is not set, we're doing a build and LILYPONDPREFIX
 #: mup2ly.py:70
 msgid "Convert mup to LilyPond source."
 msgstr "mup nach LilyPond-Quelltext konvertieren."
@@ -575,105 +1089,96 @@ msgstr "austesten"
 msgid "define macro NAME [optional expansion EXP]"
 msgstr "Makro NAME [optionale Erweiterung EXP] definieren"
 
+#: mup2ly.py:76 main.cc:117
+msgid "write output to FILE"
+msgstr "Ausgabe in DATEI schreiben"
+
 #: mup2ly.py:77
 msgid "only pre-process"
 msgstr "nur vorverarbeiten"
 
-#: mup2ly.py:1075
+#. Duh.  Python style portable: cp *.EXT OUTDIR
+#. system ('cp *.%s %s' % (ext, outdir), 1)
+#. Python < 1.5.2 compatibility
+#.
+#. On most platforms, this is equivalent to
+#. `normpath(join(os.getcwd()), PATH)'.  *Added in Python version 1.5.2*
+#. if set, LILYPONDPREFIX must take prevalence
+#. if datadir is not set, we're doing a build and LILYPONDPREFIX
+#. ###############################################################
+#. END Library
+#.
+#. PMX cut and paste
+#.
+#. if not self.entries:
+#. #return '\n'
+#. #ugh ugh
+#. return '\n%s = {}\n\n' % self.idstring ()
+#. ugh
+#. def set_clef (self, letter):
+#. clstr = clef_table[letter]
+#. self.voices[0].add_nonchord (Clef (clstr))
+#. urg
+#. maybe use import copy?
+#. for i in self.pitches:
+#. ch.pitches.append (i)
+#. for i in self.scripts:
+#. ch.scripts.append (i)
+#. http://www.arkkra.com/doc/uguide/contexts.html
+#. #self.current_staffs = []
+#. duh
+#. FIXME: 1?
+#. FIXME: does key play any role in this?
+#. ch = self.current_voices[0].last_chord ()
+#. ch.basic_duration = self.current_voices[0].last_chord ().basic_duration
+#. ugh
+#. ch = self.current_voices[0].last_chord ()
+#. `;' is not a separator, chords end with ';'
+#. mup resets default duration and pitch each bar
+#. ugh: these (and lots more) should also be parsed in
+#. context staff.  we should have a class Staff_properties
+#. and parse/set all those.
+#. shortcut: set to official mup maximum (duh)
+#. self.set_staffs (40)
+#: mup2ly.py:1076
 #, python-format
 msgid "no such context: %s"
 msgstr "kein solcher Kontext: %s"
 
-#: mup2ly.py:1299
+#. hmm
+#. dig this: mup allows ifdefs inside macro bodies
+#. don't do nested multi-line defines
+#. duh: mup is strictly line-based, except for `define',
+#. which is `@' terminated and may span several lines
+#. don't define new macros in unactive areas
+#. To support nested multi-line define's
+#. process_function and macro_name, macro_body
+#. should become lists (stacks)
+#. The mup manual is undetermined on this
+#. and I haven't seen examples doing it.
+#.
+#. don't do nested multi-line define's
+#. writes to stdout for help2man
+#. don't call
+#. identify ()
+#. sys.stdout.flush ()
+#. handy emacs testing
+#. if not files:
+#. files = ['template.mup']
+#: mup2ly.py:1300
 #, python-format
 msgid "Processing `%s'..."
 msgstr "Verarbeite `%s'..."
 
-#: mup2ly.py:1318
+#: mup2ly.py:1319
 #, python-format
 msgid "Writing `%s'..."
 msgstr "Schreibe `%s'..."
 
-#. # FIXME
-#. # do -P or -p by default?
-#. #help_summary = _ ("Run LilyPond using LaTeX for titling")
-#: old-lilypond-book.py:118
-msgid "Process LilyPond snippets in hybrid HTML, LaTeX or texinfo document"
-msgstr "LilyPond-Teile in Mischdatei (HTML, LaTeX oder texinfo) verarbeiten"
-
-#: old-lilypond-book.py:124 old-lilypond-book.py:125 old-lilypond-book.py:127
-#: old-lilypond-book.py:128
-msgid "DIM"
-msgstr "GROE"
-
-#: old-lilypond-book.py:124
-msgid "default fontsize for music.  DIM is assumed to be in points"
-msgstr "Schriftgrößenvorgabe für Musik. Einheit für GROE: Punkte"
-
-#: old-lilypond-book.py:125
-msgid "deprecated, use --default-music-fontsize"
-msgstr "veraltet, verwenden Sie --default-music-fontsize"
-
-#: old-lilypond-book.py:126
-msgid "OPT"
-msgstr "OPT"
-
-#: old-lilypond-book.py:126
-msgid "pass OPT quoted to the lilypond command line"
-msgstr "OPT \"zitiert\" an die LilyPond-Kommandozeile Ã¼bergeben"
-
-#: old-lilypond-book.py:127
-msgid "force fontsize for all inline lilypond. DIM is assumed to be in points"
-msgstr "Schriftgröße für eingebettetes LilyPond erzwingen. Einheit für GROE: Punkte"
-
-#: old-lilypond-book.py:128
-msgid "deprecated, use --force-music-fontsize"
-msgstr "veraltet, verwenden Sie --force-music-fontsize"
-
-#: old-lilypond-book.py:130
-msgid "include path"
-msgstr "Pfad einbeziehen"
-
-#: old-lilypond-book.py:131
-msgid "write dependencies"
-msgstr "Schreib-Abhängigkeiten"
-
-#: old-lilypond-book.py:132
-msgid "PREF"
-msgstr "PRÄF"
-
-#: old-lilypond-book.py:132
-msgid "prepend PREF before each -M dependency"
-msgstr "stelle PRÄF den -M Abhängigkeiten voran"
-
-#: old-lilypond-book.py:133
-msgid "don't run lilypond"
-msgstr "LilyPond nicht aufrufen"
-
-#: old-lilypond-book.py:134
-msgid "don't generate pictures"
-msgstr "keine Bilder generieren"
-
-#: old-lilypond-book.py:135
-msgid "strip all lilypond blocks from output"
-msgstr "alle LilyPond-Blöcke aus der Ausgabe entfernen"
-
-#: old-lilypond-book.py:136
-msgid "filename main output file"
-msgstr "Dateiname für Hauptausgabedatei"
-
-#: old-lilypond-book.py:137
-msgid "where to place generated files"
-msgstr "Ziel der generierten Dateien"
-
-#: old-lilypond-book.py:227
-msgid "LaTeX failed."
-msgstr "LaTeX scheiterte."
-
 #: getopt-long.cc:146
 #, c-format
 msgid "option `%s' requires an argument"
-msgstr "Option `%s' benötigt ein Argument"
+msgstr "Option `%s' benötigt ein Argument"
 
 #: getopt-long.cc:150
 #, c-format
@@ -688,129 +1193,151 @@ msgstr "unerkannte Option: `%s'"
 #: getopt-long.cc:161
 #, c-format
 msgid "invalid argument `%s' to option `%s'"
-msgstr "ungültiges Argument `%s' für Option `%s'"
+msgstr "ungültiges Argument `%s' für Option `%s'"
 
-#: warn.cc:44
+#: warn.cc:25
 #, c-format
-msgid "programming error: %s"
-msgstr "Programmierfehler: %s"
+msgid "warning: %s\n"
+msgstr "Warnung: %s\n"
 
-#: warn.cc:45
-msgid "Continuing; crossing fingers"
-msgstr "Das Programm wird trotz aufgetretenem Fehler fortgesetzt."
+#: warn.cc:31
+#, c-format
+msgid "error: %s\n"
+msgstr "Fehler: %s\n"
 
-#: accidental.cc:219 key-signature-interface.cc:139
+#: warn.cc:44
+#, c-format
+msgid "programming error: %s (Continuing; cross thumbs)\n"
+msgstr "Programmierfehler: %s (setze fort; kreuze die Finger)\n"
+
+#: accidental.cc:202 key-signature-interface.cc:137
 #, c-format
 msgid "accidental `%s' not found"
 msgstr "Vorzeichen `%s' nicht gefunden"
 
-#: accidental-engraver.cc:167
+#: accidental-engraver.cc:171 new-accidental-engraver.cc:238
 #, c-format
 msgid "Accidental typesetting list must begin with context-name: %s"
 msgstr "Vorzeichensatzliste muss mit Kontextnamen beginnen: %s"
 
-#: accidental-engraver.cc:194
+#: accidental-engraver.cc:196 new-accidental-engraver.cc:263
+#, c-format
+msgid "unknown accidental typesetting: %s. Ignored"
+msgstr "Unbekanntes Vorzeichen: %s. Ignoriert"
+
+#: accidental-engraver.cc:212 new-accidental-engraver.cc:279
+#, c-format
+msgid "Symbol is not a parent context: %s. Ignored"
+msgstr "Symbol ist kein Elternkontext: %s. Ignoriert"
+
+#: accidental-engraver.cc:215 new-accidental-engraver.cc:282
 #, c-format
-msgid "ignoring unknown accidental: %s"
-msgstr "unbekannte Option ignoriert: %s"
+msgid "Accidental typesetting must be pair or context-name: %s"
+msgstr "Vorzeichensatz paarweise oder mit Kontextname erwartet: %s"
 
-#: accidental-engraver.cc:211
+#: afm.cc:66
 #, c-format
-msgid "Accidental rule must be pair or context-name; Found %s"
-msgstr "Vorzeichensatz paarweise oder mit Kontextname erwartet; %s gefunden"
+msgid "can't find character number: %d"
+msgstr "Kann Zeichennummer nicht finden: %d"
 
-#: afm.cc:145
+#: afm.cc:81
+#, c-format
+msgid "can't find character called: `%s'"
+msgstr "Kann Zeichen nicht finden: `%s'"
+
+#: afm.cc:142
 #, c-format
 msgid "Error parsing AFM file: `%s'"
 msgstr "Fehler beim Analysieren der AFM-Datei: `%s'"
 
-#: all-font-metrics.cc:100
+#: all-font-metrics.cc:95
 #, c-format
 msgid "checksum mismatch for font file: `%s'"
-msgstr "Prüfsummenfehler für Schriftartdatei: `%s'"
+msgstr "Prüfsummenfehler für Schriftartdatei: `%s'"
 
-#: all-font-metrics.cc:102
+#: all-font-metrics.cc:97
 #, c-format
 msgid "does not match: `%s'"
 msgstr "Passt nicht: `%s'"
 
-#: all-font-metrics.cc:107
-msgid "Rebuild all .afm files, and remove all .pk and .tfm files."
-msgstr "Bauen Sie alle .afm-Dateien neu, und löschen Sie alle .pk- und .tfm-Dateien."
-
-#: all-font-metrics.cc:109
-msgid "Rerun with -V to show font paths."
-msgstr "Starten Sie erneut mit -V um Suchpfade für Schriftarten anzuzeigen"
+#: all-font-metrics.cc:102
+msgid " Rebuild all .afm files, and remove all .pk and .tfm files.  Rerun with -V to show font paths."
+msgstr " Bauen Sie alle .afm-Dateien neu, und löschen Sie alle .pk- und .tfm-Dateien. Starten sie erneut mit -V um die Schriftartverzeichnisse zu zeigen."
 
-#: all-font-metrics.cc:111
-msgid "A script for removing font-files is delivered with the source-code:"
-msgstr "Ein Skript zum Entfernen von Schriftartdateien wird mit dem Quellcode ausgeliefert:"
+#: all-font-metrics.cc:103
+msgid ""
+"A script for removing font-files is delivered with the source-code,\n"
+"in buildscripts/clean-fonts.sh"
+msgstr ""
+"Mit buildscripts/clean-fonts.sh wird beim Quellcode ein Skript mitgeliefert,\n"
+"womit Schriftartdateien gelöscht werden können"
 
-#: all-font-metrics.cc:192
+#: all-font-metrics.cc:169
 #, c-format
 msgid "can't find font: `%s'"
 msgstr "Kann Schriftart nicht finden: `%s'"
 
-#: all-font-metrics.cc:193
+#: all-font-metrics.cc:170
 msgid "Loading default font"
 msgstr "Lade Standardschriftart"
 
-#: all-font-metrics.cc:208
+#: all-font-metrics.cc:185
 #, c-format
 msgid "can't find default font: `%s'"
 msgstr "Kann Standardschriftart nicht finden: `%s'"
 
-#: all-font-metrics.cc:209 includable-lexer.cc:59 input-file-results.cc:218
+#: all-font-metrics.cc:186 includable-lexer.cc:59 input-file-results.cc:192
 #, c-format
 msgid "(search path: `%s')"
 msgstr "(Suchpfad: `%s')"
 
-#: all-font-metrics.cc:210
+#: all-font-metrics.cc:187
 msgid "Giving up"
 msgstr "Gebe auf"
 
-#: auto-change-iterator.cc:62 change-iterator.cc:61
+#: auto-change-iterator.cc:43 change-iterator.cc:60
+#: part-combine-music-iterator.cc:120
 msgid "Can't switch translators, I'm there already"
-msgstr "Kann Ãœbersetzer nicht Ã¤ndern, ist bereits geschehen"
+msgstr "Kann Ãœbersetzer nicht Ã¤ndern, ist bereits geschehen"
 
-#: bar-check-iterator.cc:68
+#: bar-check-iterator.cc:51
 #, c-format
 msgid "barcheck failed at: %s"
-msgstr "Taktüberprüfung gescheitert bei: %s"
+msgstr "Taktüberprüfung gescheitert bei: `%s'"
 
-#: beam.cc:151
+#: beam.cc:146
 msgid "beam has less than two visible stems"
-msgstr "Balken hat weniger als zwei sichtbare Notenhälse"
+msgstr "Balken hat weniger als zwei sichtbare Notenhälse"
 
-#: beam.cc:156
-msgid "removing beam with less than two stems"
-msgstr "Balken mit weniger als zwei Notenhälsen wird entfernt"
+#: beam.cc:151
+msgid "Beam has less than two stems. Removing beam."
+msgstr "Balken hat weniger als zwei Notenhälse. Entferne Notenhals."
 
-#: beam.cc:1040
-msgid "no viable initial configuration found: may not find good beam slope"
-msgstr "Keine funktionsfähige Anfangskonfiguration gefunden: Es kann evtl. keine optimale Balkenneigung gefunden werden"
+#: beam.cc:976
+msgid "Not sure that we can find a nice beam slope (no viable initial configuration found)."
+msgstr "Kann wahrscheinlich keine optimale Balkenneigung ermitteln (keine funktionsfähige Anfangskonfiguration gefunden)"
 
-#: beam-engraver.cc:139
+#: beam-engraver.cc:176
 msgid "already have a beam"
 msgstr "habe bereits einen Balken"
 
-#: beam-engraver.cc:212
+#: beam-engraver.cc:259
 msgid "unterminated beam"
 msgstr "unbegrenzter Balken"
 
-#: beam-engraver.cc:245 chord-tremolo-engraver.cc:179
+#: beam-engraver.cc:292 chord-tremolo-engraver.cc:197
 msgid "stem must have Rhythmic structure"
 msgstr "Notenhals muss rhythmische Struktur aufweisen"
 
-#: beam-engraver.cc:259
+#: beam-engraver.cc:306
 msgid "stem doesn't fit in beam"
 msgstr "Notenhals passt nicht zum Balken"
 
-#: beam-engraver.cc:260
+#: beam-engraver.cc:307
 msgid "beam was started here"
 msgstr "Balken wurde hier begonnen"
 
-#: break-align-interface.cc:214
+#: break-align-interface.cc:173
 #, c-format
 msgid "No spacing entry from %s to `%s'"
 msgstr "Kein Leerraumeintrag von %s nach `%s'"
@@ -818,7 +1345,7 @@ msgstr "Kein Leerraumeintrag von %s nach `%s'"
 #: change-iterator.cc:22
 #, c-format
 msgid "can't change `%s' to `%s'"
-msgstr "kann nicht `%s' nach `%s' Ã¤ndern"
+msgstr "kann nicht `%s' nach `%s' Ã¤ndern"
 
 #.
 #. We could change the current translator's id, but that would make
@@ -826,33 +1353,33 @@ msgstr "kann nicht `%s' nach `%s' Ã¤ndern"
 #.
 #. last->translator_id_string_  = get_change ()->change_to_id_string_;
 #.
-#: change-iterator.cc:87
+#: change-iterator.cc:79
 msgid "I'm one myself"
 msgstr "Ich bin selbst einer"
 
-#: change-iterator.cc:90
+#: change-iterator.cc:82
 msgid "none of these in my family"
 msgstr "keiner davon befindet sich in meiner Familie"
 
-#: chord-tremolo-engraver.cc:100
+#: chord-tremolo-engraver.cc:98
 #, c-format
 msgid "Chord tremolo with %d elements. Must have two elements."
-msgstr "Akkordtremolo mit %d Elementen. Benötigt zwei Elemente."
+msgstr "Akkordtremolo mit %d Elementen. Benötigt zwei Elemente."
 
-#: chord-tremolo-engraver.cc:141
+#: chord-tremolo-engraver.cc:157
 msgid "unterminated chord tremolo"
 msgstr "unbegrenztes Akkord-Tremolo"
 
-#: chord-tremolo-iterator.cc:64
+#: chord-tremolo-iterator.cc:69
 msgid "no one to print a tremolos"
-msgstr "niemand vorhanden für Tremoloausgabe"
+msgstr "niemand vorhanden für Tremoloausgabe"
 
 #: clef.cc:64
 #, c-format
 msgid "clef `%s' not found"
-msgstr "Schlüssel `%s' nicht gefunden"
+msgstr "Schlüssel `%s' not found"
 
-#: cluster.cc:123
+#: cluster.cc:131
 #, c-format
 msgid "unknown cluster style `%s'"
 msgstr "unbekannter Gruppierungsstil: `%s'"
@@ -872,22 +1399,7 @@ msgstr "Abstand=%f"
 msgid "Coherent_ligature_engraver: setting `spacing-increment = 0.01': ptr=%ul"
 msgstr "Coherent_ligature_engraver: setze `spacing-increment = 0.01': ptr=%ul"
 
-#: context.cc:180
-#, c-format
-msgid "Cannot find or create `%s' called `%s'"
-msgstr "kann `%s' (`%s' genannt) weder finden noch erzeugen"
-
-#: context.cc:217
-#, c-format
-msgid "can't find or create: `%s'"
-msgstr "Kann `%s' weder finden noch erzeugen"
-
-#: context-def.cc:115
-#, c-format
-msgid "Program has no such type: `%s'"
-msgstr "Das Programm hat keinen solchen Typen: `%s'"
-
-#: custos.cc:85
+#: custos.cc:92
 #, c-format
 msgid "custos `%s' not found"
 msgstr "custos `%s' nicht gefunden"
@@ -896,66 +1408,64 @@ msgstr "custos `%s' nicht gefunden"
 msgid "NaN"
 msgstr "NaN"
 
-#: dynamic-engraver.cc:183 span-dynamic-performer.cc:86
+#: dynamic-engraver.cc:204 span-dynamic-performer.cc:82
 msgid "can't find start of (de)crescendo"
 msgstr "kann den Anfang des (De-) Crescendos nicht finden"
 
-#: dynamic-engraver.cc:193
-msgid "already have a decrescendo"
-msgstr "habe bereits ein Decrescendo"
-
-#: dynamic-engraver.cc:195
+#: dynamic-engraver.cc:216
 msgid "already have a crescendo"
 msgstr "habe bereits ein Crescendo"
 
-#: dynamic-engraver.cc:198
+#: dynamic-engraver.cc:217
+msgid "already have a decrescendo"
+msgstr "habe bereits ein Decrescendo"
+
+#: dynamic-engraver.cc:220
 msgid "Cresc started here"
 msgstr "Crescendo begann hier"
 
-#: dynamic-engraver.cc:305
+#: dynamic-engraver.cc:323
 msgid "unterminated (de)crescendo"
 msgstr "unbegrenztes (De-) Crescendo"
 
 #: event.cc:49
 #, c-format
 msgid "Transposition by %s makes alteration larger than two"
-msgstr "Transponieren um %s erzeugt Vorzeichen größer zwei"
+msgstr "Transponieren um %s erzeugt Vorzeichen größer zwei"
 
-#: event.cc:72
-#, c-format
-msgid "octave check failed; expected %s, found: %s"
-msgstr "Oktavenüberprüfung gescheitert; %s erwartet, %s gefunden"
-
-#: event-chord-iterator.cc:56 output-property-music-iterator.cc:29
+#: event-chord-iterator.cc:76 output-property-music-iterator.cc:27
 #, c-format
 msgid "Junking event: `%s'"
 msgstr "Ignoriere Anforderung: `%s'"
 
-#: extender-engraver.cc:143 extender-engraver.cc:153
+#: extender-engraver.cc:94
 msgid "unterminated extender"
 msgstr "unbegrenzte Erweiterung"
 
-#: folded-repeat-iterator.cc:65
+#: extender-engraver.cc:106
+msgid "Nothing to connect extender to on the left.  Ignoring extender event."
+msgstr "Nichts vorhanden, um die Erweiterung nach links zu verbinden. Ignoriere Erweiterungsanforderung."
+
+#: folded-repeat-iterator.cc:88
 msgid "no one to print a repeat brace"
 msgstr "niemand zur Erzeugung einer Wiederholung"
 
-#: glissando-engraver.cc:102
+#: font-interface.cc:239
+msgid "couldn't find any font satisfying "
+msgstr "konnte keine passende Schriftart finden für "
+
+#: glissando-engraver.cc:100
 msgid "Unterminated glissando."
 msgstr "unbegrenztes Glissando."
 
-#: global-context.cc:151
-#, c-format
-msgid "can't find `%s' context"
-msgstr "kann Kontext `%s' nicht finden"
-
-#: gourlay-breaking.cc:195
+#: gourlay-breaking.cc:188
 #, c-format
 msgid "Optimal demerits: %f"
 msgstr "Optimale Bewertung: %f"
 
-#: gourlay-breaking.cc:200
+#: gourlay-breaking.cc:193
 msgid "No feasible line breaking found"
-msgstr "Keine praktikablen Zeilenumbrüche gefunden"
+msgstr "Keine praktikablen Zeilenumbrüche gefunden"
 
 #: gregorian-ligature-engraver.cc:59
 #, c-format
@@ -965,7 +1475,20 @@ msgstr "\\%s ignoriert"
 #: gregorian-ligature-engraver.cc:64
 #, c-format
 msgid "implied \\%s added"
-msgstr "implizites \\%s hinzugefügt"
+msgstr "implizites \\%s hinzugefügt"
+
+#.
+#. Todo: do something sensible. The grob-pq-engraver is not water
+#. tight, and stuff like tupletSpannerDuration confuses it.
+#.
+#: grob-pq-engraver.cc:130
+#, c-format
+msgid ""
+"Skipped something?\n"
+"Grob %s ended before I expected it to end."
+msgstr ""
+"Etwas Ã¼bersehen?\n"
+"Grob %s endet bevor dies erwartet wurde."
 
 #: hairpin.cc:98
 msgid "decrescendo too small"
@@ -975,78 +1498,78 @@ msgstr "Decrescendo zu kurz"
 msgid "crescendo too small"
 msgstr "Crescendo zu kurz"
 
-#: horizontal-bracket-engraver.cc:57
+#: horizontal-bracket-engraver.cc:64
 msgid "Don't have that many brackets."
 msgstr "Habe nicht so viele Klammern."
 
-#: horizontal-bracket-engraver.cc:66
+#: horizontal-bracket-engraver.cc:73
 msgid "Conflicting note group events."
 msgstr "Notengruppen im Konflikt gefunden."
 
-#: hyphen-engraver.cc:96
-msgid "removing unterminated hyphen"
-msgstr "unbegrenzter Bindestrich wird entfernt"
-
-#: hyphen-engraver.cc:110
-msgid "unterminated hyphen; removing"
-msgstr "unbegrenzter Bindestrich; entfernt"
+#: hyphen-engraver.cc:87
+msgid "unterminated hyphen"
+msgstr "unbegrenzter Bindestrich"
 
-#: includable-lexer.cc:50
-msgid "include files are not allowed"
-msgstr "eingefügte Dateien sind nicht erlaubt"
+#: hyphen-engraver.cc:99
+msgid "Nothing to connect hyphen to on the left.  Ignoring hyphen event."
+msgstr "Nichts vorhanden, um den Bindestrich nach links zu verbinden. Ignoriere Bindestrichanforderung."
 
 #: input.cc:99
 msgid "non fatal error: "
 msgstr "nicht-schwerwiegender Fehler: "
 
-#: input.cc:107 source-file.cc:147 source-file.cc:240
+#: input.cc:107 source-file.cc:146 source-file.cc:239
 msgid "position unknown"
 msgstr "Position unbekannt"
 
-#: input-file-results.cc:78 source-file.cc:55
+#: input-file-results.cc:72 source-file.cc:54 streams.cc:38
 #, c-format
 msgid "can't open file: `%s'"
-msgstr "Kann Datei nicht Ã¶ffnen: `%s'"
+msgstr "Kann Datei nicht Ã¶ffnen: `%s'"
 
-#: input-file-results.cc:142
+#: input-file-results.cc:132
+msgid "Score contains errors; will not process it"
+msgstr "Noten enthalten Fehler; keine weitere Verarbeitung"
+
+#: input-file-results.cc:172
 #, c-format
-msgid "Now processing `%s'"
-msgstr "`%s' wird jetzt verarbeitet"
+msgid "Now processing: `%s'"
+msgstr "Bearbeite: `%s'"
 
-#: key-performer.cc:90
+#: key-performer.cc:96
 msgid "FIXME: key change merge"
-msgstr "FIXME: Mischen der Tonartänderungen"
+msgstr "FIXME: Mischen der Tonartänderungen"
 
-#: kpath.cc:75
+#: kpath.cc:76
 #, c-format
-msgid "kpathsea can not find TFM file: `%s'"
-msgstr "kpathsea konnte TFM-Datei `%s' nicht finden"
+msgid "Kpathsea couldn't find TFM file `%s'"
+msgstr "Kpathsea konnte TFM-Datei `%s' nicht finden"
 
-#: ligature-engraver.cc:152
+#: ligature-engraver.cc:159
 msgid "can't find start of ligature"
 msgstr "kann den Anfang der Bindung nicht finden"
 
-#: ligature-engraver.cc:158
+#: ligature-engraver.cc:165
 msgid "no right bound"
 msgstr "keine rechte Begrenzung"
 
-#: ligature-engraver.cc:184
+#: ligature-engraver.cc:191
 msgid "already have a ligature"
 msgstr "habe bereits eine Bindung"
 
-#: ligature-engraver.cc:200
+#: ligature-engraver.cc:207
 msgid "no left bound"
 msgstr "keine linke Begrenzung"
 
-#: ligature-engraver.cc:255
+#: ligature-engraver.cc:258
 msgid "unterminated ligature"
 msgstr "unbegrenzte Bindung"
 
-#: ligature-engraver.cc:279
-msgid "ignoring rest: ligature may not contain rest"
-msgstr "Pause wird ignoriert: Bindung darf keine Pause enthalten"
+#: ligature-engraver.cc:282
+msgid "ligature may not contain rest; ignoring rest"
+msgstr "Bindung darf keine Pause enthalten; ignoriere Pause"
 
-#: ligature-engraver.cc:280
+#: ligature-engraver.cc:283
 msgid "ligature was started here"
 msgstr "Bindung wurde hier begonnen"
 
@@ -1055,272 +1578,292 @@ msgstr "Bindung wurde hier begonnen"
 msgid "(load path: `%s')"
 msgstr "(lade Pfad: `%s')"
 
-#: lily-guile.cc:584
+#: lily-guile.cc:576
 #, c-format
 msgid "Can't find property type-check for `%s' (%s)."
-msgstr "Kann keine Eigenschafts-Typprüfung für `%s' (%s) finden."
+msgstr "Kann keine Eigenschafts-Typprüfung für `%s' (%s) finden."
 
-#: lily-guile.cc:587
+#: lily-guile.cc:579
 msgid "Perhaps you made a typing error?"
-msgstr "Ist Ihnen vielleicht ein Tippfehler unterlaufen?"
+msgstr "Ist Ihnen vielleicht einen Tippfehler unterlaufen?"
 
-#: lily-guile.cc:593
+#: lily-guile.cc:585
 msgid "Doing assignment anyway."
-msgstr "Führe Zuweisung trotzdem durch."
+msgstr "Führe Zuweisung trotzdem durch."
 
-#: lily-guile.cc:607
+#: lily-guile.cc:599
 #, c-format
 msgid "Type check for `%s' failed; value `%s' must be of type `%s'"
-msgstr "Typprüfung für `%s' gescheitert; Wert `%s' muss vom Typ `%s' sein"
+msgstr "Typprüfung für `%s' gescheitert; Wert `%s' muss vom Typ `%s' sein"
 
-#: lookup.cc:169
+#: lookup.cc:173
 msgid "round filled box horizontal extent smaller than blot; decreasing blot"
 msgstr "Breite des abgerundeten Kastens kleiner als Kreisdurchmesser; verkleinere Kreis"
 
-#: lookup.cc:174
+#: lookup.cc:178
 msgid "round filled box vertical extent smaller than blot; decreasing blot"
-msgstr "Höhe des abgerundeten Kastens kleiner als Kreisdurchmesser; verkleinere Kreis"
+msgstr "Höhe des abgerundeten Kastens kleiner als Kreisdurchmesser; verkleinere Kreis"
 
-#: main.cc:100
-msgid ""
-"This program is free software.  It is covered by the GNU General Public\n"
-"License and you are welcome to change it and/or distribute copies of it\n"
-"under certain conditions.  Invoke as `lilypond-bin --warranty' for more\n"
-"information.\n"
-msgstr ""
-"Dieses Programm ist Freie Software. Sie wird von der GNU General Public License\n"
-"geschützt, und Sie können sie gerne Ã¤ndern und/oder Kopien unter den\n"
-"gleichen Bedingungen weitergeben. Rufen Sie `lilypond-bin --warranty' für weitere\n"
-"Informationen auf.\n"
+#: lyric-phrasing-engraver.cc:311
+msgid "lyrics found without any matching notehead"
+msgstr "Liedtext ohne passenden Notenkopf gefunden"
 
-#: main.cc:106
-msgid ""
-"    This program is free software; you can redistribute it and/or\n"
-"modify it under the terms of the GNU General Public License version 2\n"
-"as published by the Free Software Foundation.\n"
-"\n"
-"    This program is distributed in the hope that it will be useful,\n"
-"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
-"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n"
-"General Public License for more details.\n"
-"\n"
-"    You should have received a copy (refer to the file COPYING) of the\n"
-"GNU General Public License along with this program; if not, write to\n"
-"the Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n"
-"Boston, MA 02111-1307, USA.\n"
-msgstr ""
-"    Dieses Programm ist Freie Software; Sie können es unter den\n"
-"Bedingungen der GNU General Public License Version 2, wie von der\n"
-"Free Software Foundation veröffentlicht, weitergeben und/oder modifizieren.\n"
-"\n"
-"    Dieses Programm wird in der Hoffnung, dass es nützlich sein wird,\n"
-"herausgegeben. Es wird jedoch KEINE GARANTIE Ã¼bernommen. Selbst die\n"
-"implizite Garantie der MARKTGÄNGIGKEIT oder TAUGLICHKEIT FÃœR EINEN\n"
-"BESTIMMTEN ZWECK kann nicht gewährleistet werden. Siehe GNU General Public\n"
-"License für weitere Details.\n"
-"\n"
-"    Sie sollten eine Kopie (siehe Datei COPYING) der GNU General Public\n"
-"License zusammen mit diesem Programm erhalten haben. Falls nicht, schreiben\n"
-"Sie bitte an die Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n"
-"Boston, MA 02111-1307, USA.\n"
+#: lyric-phrasing-engraver.cc:317
+msgid "Huh? Melismatic note found to have associated lyrics."
+msgstr "Hä? Melismatische Note ohne assoziierten Liedtext gefunden."
 
-#: main.cc:135
+#: main.cc:106
 msgid "EXPR"
 msgstr "AUSD"
 
-#: main.cc:136
+#: main.cc:107
 msgid "set options, use -e '(ly-option-usage)' for help"
-msgstr "Optionen setzen, benutzen Sie -e '(ly-option-usage)' für Hilfe"
+msgstr "Optionen setzen, benutzen Sie -e '(ly-option-usage)' für Hilfe"
 
-#: main.cc:139
+#: main.cc:110
 msgid "use output format EXT"
 msgstr "Ausgabeformat EXT benutzen"
 
-#: main.cc:141
+#: main.cc:112
 msgid "FIELD"
 msgstr "FELD"
 
-#: main.cc:141
+#: main.cc:112
 msgid "write header field to BASENAME.FIELD"
 msgstr "Header-Feld in BASISNAME.FELD schreiben"
 
-#: main.cc:142
+#: main.cc:113
 msgid "add DIR to search path"
-msgstr "VERZ zum Suchpfad hinzufügen"
+msgstr "VERZ zum Suchpfad hinzufügen"
 
-#: main.cc:143
+#: main.cc:114
 msgid "use FILE as init file"
-msgstr "DATEI als Anfangsdatei verwenden"
+msgstr "benutze DATEI als Anfangsdatei"
 
-#: main.cc:144
-msgid "write Makefile dependencies"
-msgstr "Makefile-Abhängigkeiten schreiben"
-
-#: main.cc:147
+#: main.cc:118
 msgid "prepend DIR to dependencies"
-msgstr "stelle VERZ den Abhängigkeiten voran"
+msgstr "stelle VERZ den Abhängigkeiten voran"
 
-#: main.cc:148
-msgid "run in safe mode"
-msgstr "im sicheren Modus laufen lassen"
+#.
+#. should audit again.
+#.
+#: main.cc:123
+msgid "inhibit file output naming and exporting"
+msgstr "verhindere Dateiausgabe-Benennung und -Export"
 
-#: main.cc:171
+#. No version number or newline here. It confuses help2man.
+#: main.cc:155
 #, c-format
+msgid "Usage: %s [OPTIONS]... FILE..."
+msgstr "Aufruf: %s [OPTIONS]... DATEI..."
+
+#: main.cc:157
+msgid "Typeset music and or play MIDI from FILE."
+msgstr "Musiksatz und/oder MIDI-Aufführung aus DATEI."
+
+#: main.cc:160
 msgid ""
-"Copyright (c) %s by\n"
-"%s  and others."
+"LilyPond is a music typesetter.  It produces beautiful sheet music\n"
+"using a high level description file as input.  LilyPond is part of \n"
+"the GNU Project.\n"
 msgstr ""
-"Copyright (c) %s bei\n"
-"%s und anderen."
+"LilyPond ist ein Musiksatzprogramm. Es erzeugt ansprechende Notenblätter\n"
+"mit Hilfe einer Hochsprachen-Beschreibungsdatei als Eingabe. LilyPond\n"
+"ist ein Teil des GNU-Projektes.\n"
 
-#. No version number or newline here.  It confuses help2man.
-#: main.cc:197
+#: main.cc:182
 #, c-format
-msgid "Usage: %s [OPTIONS]... FILE..."
-msgstr "Aufruf: %s [OPTIONEN]... DATEI..."
+msgid ""
+"This is free software.  It is covered by the GNU General Public License,\n"
+"and you are welcome to change it and/or distribute copies of it under\n"
+"certain conditions.  Invoke as `%s --warranty' for more information.\n"
+msgstr ""
+"Dies ist freie Software. Sie wird von der GNU General Public License\n"
+"geschützt, und Sie können sie gerne Ã¤ndern und/oder Kopien unter den\n"
+"gleichen Bedingungen weitergeben. Rufen Sie `%s --warranty' für weitere\n"
+"Informationen auf.\n"
 
-#: main.cc:199
-#, c-format
-msgid "Typeset music and/or produce MIDI from FILE."
-msgstr "Musiksatz und/oder MIDI aus DATEI erzeugen."
+#: main.cc:198
+msgid "GNU LilyPond -- The music typesetter"
+msgstr "GNU LilyPond -- Das Musiksatzprogramm"
 
-#: main.cc:201
-#, c-format
-msgid "LilyPond produces beautiful music notation."
-msgstr "LilyPond erzeugt ansprechende Musiknotation."
+#: main.cc:206
+msgid ""
+"    This program is free software; you can redistribute it and/or\n"
+"modify it under the terms of the GNU General Public License version 2\n"
+"as published by the Free Software Foundation.\n"
+"\n"
+"    This program is distributed in the hope that it will be useful,\n"
+"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n"
+"General Public License for more details.\n"
+"\n"
+"    You should have received a copy (refer to the file COPYING) of the\n"
+"GNU General Public License along with this program; if not, write to\n"
+"the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,\n"
+"USA.\n"
+msgstr ""
+"    Dieses Programm ist Freie Software; Sie können es unter den\n"
+"Bedingungen der GNU General Public License Version 2, wie von der\n"
+"Free Software Foundation veröffentlicht, weitergeben und/oder modifizieren.\n"
+"\n"
+"    Dieses Programm wird in der Hoffnung, dass es nützlich sein wird,\n"
+"herausgegeben. Es wird jedoch KEINE GARANTIE Ã¼bernommen. Selbst die\n"
+"implizite Garantie der MARKTGÄNGIGKEIT oder TAUGLICHKEIT FÃœR EINEN\n"
+"BESTIMMTEN ZWECK kann nicht gewährleistet werden. Siehe GNU General Public\n"
+"License für weitere Details.\n"
+"\n"
+"    Sie sollten eine Kopie (siehe Datei COPYING) der GNU General Public\n"
+"License zusammen mit diesem Programm erhalten haben. Falls nicht, schreiben\n"
+"Sie bitte an die Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n"
+"Boston, MA 02111-1307, USA.\n"
 
-#: main.cc:203
+#: mensural-ligature.cc:153
 #, c-format
-msgid "For more information, see %s"
-msgstr "Für weitere Informationen, siehe %s"
+msgid "Mensural_ligature:thickness undefined on flexa %d; assuming 1.4"
+msgstr "Mensural_ligature: Dicke undefiniert bei flexa %d; nehme 1.4 an"
 
-#: main.cc:369
+#: mensural-ligature.cc:169
 #, c-format
-msgid "This option is for developers only."
-msgstr "Diese Option existiert nur für Entwickler."
+msgid "Mensural_ligature:delta-pitch undefined on flexa %d; assuming 0"
+msgstr "Mensural_ligature: delta-pitch undefiniert bei flexa %d; nehme 0 an"
 
-#: main.cc:370
+#: mensural-ligature.cc:182
 #, c-format
-msgid "Read the sources for more information."
-msgstr "Lesen Sie die Quellen für weitere Informationen."
+msgid "Mensural_ligature:flexa-width undefined on flexa %d; assuming 2.0"
+msgstr "Mensural_ligature: flexa-width undefiniert bei flexa %d; nehme 2.0 an"
 
-#: mensural-ligature.cc:183
+#: mensural-ligature.cc:215
 msgid "Mensural_ligature:unexpected case fall-through"
 msgstr "Mensural_ligature: Unbehandelter case-Zweig"
 
-#: mensural-ligature.cc:193
+#: mensural-ligature.cc:225
 msgid "Mensural_ligature: (join_left == 0)"
 msgstr "Mensural_ligature: (join_left == 0)"
 
-#: mensural-ligature-engraver.cc:248 mensural-ligature-engraver.cc:383
+#: mensural-ligature-engraver.cc:248 mensural-ligature-engraver.cc:397
 msgid "unexpected case fall-through"
 msgstr "unbehandelter case-Zweig"
 
 #: mensural-ligature-engraver.cc:259
 msgid "ligature with less than 2 heads -> skipping"
-msgstr "Bindung mit weniger als 2 Notenköpfen -> Ã¼berspringen"
+msgstr "Bindung mit weniger als 2 Notenköpfen -> Ã¼berspringen"
 
 #: mensural-ligature-engraver.cc:279
 msgid "can not determine pitch of ligature primitive -> skipping"
-msgstr "kann Tonhöhe der Bindung nicht ermitteln -> Ã¼berspringen"
+msgstr "kann Tonhöhe der Bindung nicht ermitteln -> Ã¼berspringen"
 
 #: mensural-ligature-engraver.cc:302
 msgid "prime interval within ligature -> skipping"
-msgstr "Halbtonsprung unter Bindung -> Ã¼berspringen"
+msgstr "Halbtonsprung unter Bindung -> Ã¼berspringen"
 
 #: mensural-ligature-engraver.cc:312
 msgid "mensural ligature: duration none of L, B, S -> skipping"
-msgstr "Mensural_ligature: Dauer weder L, B noch S -> Ã¼berspringen"
+msgstr "Mensural_ligature: Dauer weder L, B noch S -> Ã¼berspringen"
 
-#: midi-item.cc:153
+#: midi-item.cc:148
 #, c-format
-msgid "no such MIDI instrument: `%s'"
-msgstr "kein solches MIDI-Instrument: `%s'"
+msgid "no such instrument: `%s'"
+msgstr "kein solches Instrument: `%s'"
 
-#: midi-item.cc:257
-msgid "silly pitch"
-msgstr "sinnlose Tonhöhe"
+#: midi-item.cc:238
+msgid "silly duration"
+msgstr "sinnlose Dauer"
 
-#: midi-item.cc:273
-#, c-format
-msgid "Experimental: temporarily fine tuning (of %d cents) a channel."
-msgstr "Experimentell: temporäre Feinabstimmung (von %d Hundertsteln) des Kanals."
+#: midi-item.cc:251
+msgid "silly pitch"
+msgstr "sinnlose Tonhöhe"
 
-#: midi-stream.cc:40
+#: music-output-def.cc:111
 #, c-format
-msgid "could not write file: `%s'"
-msgstr "Datei konnte nicht geschrieben werden: %s"
+msgid "can't find `%s' context"
+msgstr "kann Kontext `%s' nicht finden"
 
-#: my-lily-lexer.cc:185
+#: my-lily-lexer.cc:169
 #, c-format
 msgid "Identifier name is a keyword: `%s'"
-msgstr "Bezeichnername ist ein Schlüsselwort: `%s'"
+msgstr "Bezeichnername ist ein Schlüsselwort: `%s'"
 
-#: my-lily-lexer.cc:207
+#: my-lily-lexer.cc:191
 #, c-format
 msgid "error at EOF: %s"
 msgstr "Fehler am Dateiende (EOF): %s"
 
-#: my-lily-parser.cc:45
+#: my-lily-parser.cc:44
 msgid "Parsing..."
 msgstr "Analysiere..."
 
-#: my-lily-parser.cc:57
+#: my-lily-parser.cc:54
 msgid "Braces don't match"
 msgstr "Klammern passen nicht zueinander"
 
 #.
 #. music for the softenon children?
 #.
-#: new-fingering-engraver.cc:155
+#: new-fingering-engraver.cc:143
 msgid "music for the martians."
-msgstr "Musik für Marsmenschen."
-
-#: new-fingering-engraver.cc:235
-msgid "Fingerings are also not down?! Putting them down anyway."
-msgstr "Fingersatz ist auch nicht unten?! Er wird trotzdem hinuntergesetzt."
+msgstr "Musik für Marsmenschen."
 
-#: new-lyric-combine-music-iterator.cc:172
-#, c-format
-msgid "cannot find Voice: %s"
-msgstr "Stimme kann nicht gefunden werden: %s"
+#: new-tie-engraver.cc:166 tie-engraver.cc:217
+msgid "lonely tie"
+msgstr "einsamer Bindebogen"
 
-#: note-collision.cc:384
+#: note-collision.cc:340
 msgid "Too many clashing notecolumns.  Ignoring them."
-msgstr "Zu viele kollidierende Notenspalten. Diese werden ignoriert."
+msgstr "Zu viele kollidierende Notenspalten. Ignoriere diese."
 
-#: note-head.cc:139
+#: note-head.cc:127
 #, c-format
 msgid "note head `%s' not found"
 msgstr "Notenkopf `%s' nicht gefunden"
 
-#: paper-def.cc:73
+#: paper-def.cc:96
 #, c-format
 msgid "paper output to `%s'..."
 msgstr "Papierausgabe in `%s'..."
 
-#: paper-score.cc:72
+#: paper-score.cc:78
 #, c-format
 msgid "Element count %d (spanners %d) "
 msgstr "Elementanzahl: %d (Klammern: %d)"
 
-#: paper-score.cc:76
+#: paper-score.cc:83
 msgid "Preprocessing graphical objects..."
 msgstr "Vorverarbeitung der grafischen Elemente..."
 
-#: parse-scm.cc:81
-msgid "GUILE signaled an error for the expression beginning here"
-msgstr "GUILE signalisierte einen Fehler für den hier beginnenden Ausdruck"
+#: paper-score.cc:116
+msgid "Outputting Score, defined at: "
+msgstr "Notenausgabe, definiert bei: "
+
+#: parse-scm.cc:79
+msgid "GUILE signaled an error for the expression begining here"
+msgstr "GUILE signalisierte einen Fehler für den hier beginnenden Ausdruck"
+
+#.
+#. We could change the current translator's id, but that would make
+#. errors hard to catch
+#.
+#. last->translator_id_string_  = get_change ()->change_to_id_string_;
+#.
+#: part-combine-music-iterator.cc:139
+#, c-format
+msgid "I'm one myself: `%s'"
+msgstr "Ich bin selbst einer: '%s'"
+
+#: part-combine-music-iterator.cc:142
+#, c-format
+msgid "none of these in my family: `%s'"
+msgstr "Keiner davon befindet sich in meiner Familie: `%s'"
 
-#: percent-repeat-engraver.cc:110
+#: percent-repeat-engraver.cc:109
 msgid "Don't know how to handle a percent repeat of this length."
-msgstr "Kenne kein Verfahren, eine Prozent-Wiederholung dieser Länge zu behandeln"
+msgstr "Kenne kein Verfahren, eine Prozent-Wiederholung dieser Länge zu behandeln"
 
-#: percent-repeat-engraver.cc:164
+#: percent-repeat-engraver.cc:163
 msgid "unterminated percent repeat"
 msgstr "unbegrenzte Prozentwiederholung"
 
-#: percent-repeat-iterator.cc:53
+#: percent-repeat-iterator.cc:65
 msgid "no one to print a percent"
 msgstr "nichts bekannt, ein Prozent auszugeben"
 
@@ -1328,140 +1871,123 @@ msgstr "nichts bekannt, ein Prozent auszugeben"
 msgid "Track ... "
 msgstr "Spur ... "
 
-#: performance.cc:94
+#: performance.cc:83
 msgid "Creator: "
 msgstr "Erzeuger: "
 
-#: performance.cc:114
+#: performance.cc:103
 msgid "at "
-msgstr "bei "
+msgstr ", "
 
-#: performance.cc:172
+#: performance.cc:114
+#, c-format
+msgid "from musical definition: %s"
+msgstr "von der musikalischen Vorgabe: %s"
+
+#: performance.cc:169
 #, c-format
 msgid "MIDI output to `%s'..."
 msgstr "MIDI-Ausgabe nach `%s'..."
 
-#: phrasing-slur-engraver.cc:105
+#: phrasing-slur-engraver.cc:123
 msgid "unterminated phrasing slur"
 msgstr "nicht beendeter Phrasierungsbogen"
 
-#: phrasing-slur-engraver.cc:123
+#: phrasing-slur-engraver.cc:141
 msgid "can't find start of phrasing slur"
 msgstr "kann Anfang des Phrasierungsbogens nicht finden"
 
-#: piano-pedal-engraver.cc:238
-msgid "Need 3 strings for piano pedals. No pedal made. "
-msgstr "3 Striche für Piano-Pedal benötigt. Kein Pedal erzeugt. "
-
-#: piano-pedal-engraver.cc:253 piano-pedal-engraver.cc:268
-#: piano-pedal-performer.cc:82
+#: piano-pedal-engraver.cc:235 piano-pedal-engraver.cc:250
+#: piano-pedal-engraver.cc:305 piano-pedal-performer.cc:82
 #, c-format
 msgid "can't find start of piano pedal: `%s'"
-msgstr "kann keinen Anfang für Pedal finden: `%s'"
+msgstr "kann keinen Anfang für Pedal finden: `%s'"
 
-#: piano-pedal-engraver.cc:321
-#, c-format
-msgid "can't find start of piano pedal bracket: `%s'"
-msgstr "kann keinen Anfang für Piano-Pedal finden: `%s'"
+#: piano-pedal-engraver.cc:410
+msgid "unterminated pedal bracket"
+msgstr "unbegrenzte Pedalklammer"
 
-#: property-iterator.cc:94
+#: property-iterator.cc:97
 #, c-format
 msgid "Not a grob name, `%s'."
-msgstr "Kein Name für grafische Objekte (grob): `%s'."
+msgstr "Kein Name für grafische Objekte (grob): `%s'."
 
-#: quote-iterator.cc:181
+#: rest.cc:139
 #, c-format
-msgid "In quotation: junking event %s"
-msgstr "Event %s in Zitat verworfen"
-
-#: relative-octave-check.cc:25
-msgid "Failed octave check, got: "
-msgstr "Oktavprüfung gescheitert, Rückgabe: "
-
-#: rest.cc:137
-#, c-format
-msgid "rest `%s' not found"
-msgstr "Pause `%s' nicht gefunden"
-
-#: rest-collision.cc:145
-msgid "rest direction not set.  Cannot resolve collision."
-msgstr "Pausenrichtung nicht gesetzt. Kollision kann nicht aufgelöst werden."
+msgid "rest `%s' not found, "
+msgstr "Pause `%s' nicht gefunden, "
 
-#: rest-collision.cc:193
+#: rest-collision.cc:199
 msgid "too many colliding rests"
 msgstr "zu viele kollidierende Pausen"
 
-#: scm-option.cc:52
-#, c-format
+#: scm-option.cc:45
 msgid "lilypond -e EXPR means:"
 msgstr "lilypond -e AUSD bedeutet:"
 
-#: scm-option.cc:54
-#, c-format
+#: scm-option.cc:47
 msgid "  Evalute the Scheme EXPR before parsing any .ly files."
-msgstr "  Das Schema AUSD vor der Analyse aller .ly-Dateien auswerten"
+msgstr "  Werte das Schema AUSD vor der Analyse aller .ly-Dateien aus"
 
-#: scm-option.cc:56
-#, c-format
+#: scm-option.cc:49
 msgid "  Multiple -e options may be given, they will be evaluated sequentially."
-msgstr "  Mehrere -e Optionen dürfen angegeben werden, sie werden sequentiell ausgewertet"
+msgstr "  Mehrere -e Optionen dürfen angegeben werden, sie werden sequentiell ausgewertet"
 
-#: scm-option.cc:58
-#, c-format
+#: scm-option.cc:51
 msgid "  The function ly-set-option allows for access to some internal variables."
-msgstr "  Die Funktion ly-set-option erlaubt Zugriff auf interne Variablen."
+msgstr "  Die Funktion ly-set-option erlaubt Zugriff auf interne Variablen"
 
-#: scm-option.cc:60
-#, c-format
-msgid "Usage: lilypond-bin -e \"(ly-set-option SYMBOL VAL)\""
-msgstr "Aufruf: lilypond-bin -e \"(ly-set-option SYMBOL WERT)\""
+#: scm-option.cc:53
+msgid "Usage: lilypond -e \"(ly-set-option SYMBOL VAL)\""
+msgstr "Aufruf: lilypond -e \"(ly-set-option SYMBOL WERT)\""
 
-#: scm-option.cc:62
-#, c-format
+#: scm-option.cc:55
 msgid "Where SYMBOL VAL pair is any of:"
-msgstr "Wobei das (SYMBOL,WERT)-Paar folgendermaßen definiert ist:"
+msgstr "Wobei das (SYMBOL,WERT)-Paar folgendermaßen definiert ist:"
 
-#: scm-option.cc:143 scm-option.cc:176
+#: scm-option.cc:128
 msgid "Unknown internal option!"
 msgstr "Unbekannte interne Option!"
 
-#: score.cc:125
-msgid "Interpreting music... "
-msgstr "Interpretation der Musik..."
+#: score.cc:85
+msgid "Interpreting music..."
+msgstr "Interpretiere Musik..."
 
-#: score.cc:135
+#: score.cc:97
 msgid "Need music in a score"
-msgstr "Benötige Musik in der Partitur"
+msgstr "Benötige Musik in der Partitur"
 
-#: score.cc:145
+#. should we? hampers debugging.
+#: score.cc:111
+msgid "Errors found/*, not processing score*/"
+msgstr "Fehler gefunden/*, verarbeite die Noten nicht*/"
+
+#: score.cc:118
 #, c-format
 msgid "elapsed time: %.2f seconds"
 msgstr "verstrichene Zeit: %.2f Sekunden"
 
-#: score-engraver.cc:103
+#: score-engraver.cc:99
 #, c-format
 msgid "can't find `%s'"
 msgstr "kann `%s' nicht finden"
 
-#: score-engraver.cc:104
+#: score-engraver.cc:100
 msgid "Fonts have not been installed properly.  Aborting"
-msgstr "Schriftarten wurden nicht ordnungsgemäß installiert. Abbruch"
+msgstr "Schriftarten wurden nicht ordnungsgemäß installiert. Abbruch"
 
-#: score-engraver.cc:189
+#: score-engraver.cc:205
 #, c-format
 msgid "unbound spanner `%s'"
 msgstr "ungebundene Klammer `%s'"
 
-#: script-engraver.cc:96
-msgid "Don't know how to interpret articulation:"
-msgstr "Unbekannte Artikulation:"
-
-#: script-engraver.cc:97
-msgid "Scheme encoding: "
-msgstr "Schemakodierung: "
+#: script-engraver.cc:90
+#, c-format
+msgid "Don't know how to interpret articulation `%s'"
+msgstr "Unbekannte Artikulation: `%s'"
 
 #. this shouldn't happen, but let's continue anyway.
-#: separation-item.cc:53 separation-item.cc:97
+#: separation-item.cc:53 separation-item.cc:101
 msgid "Separation_item:  I've been drinking too much"
 msgstr "Separation_item:  Habe zu viel getrunken"
 
@@ -1470,81 +1996,94 @@ msgstr "Separation_item:  Habe zu viel getrunken"
 msgid "No spring between column %d and next one"
 msgstr "Kein (dynamischer) Abstand zwischen Spalte %d und Nachfolger"
 
-#: slur-engraver.cc:121
+#: slur-engraver.cc:141
 msgid "unterminated slur"
 msgstr "unbegrenzter Bogen"
 
 #. How to shut up this warning, when Voice_devnull_engraver has
 #. eaten start event?
-#: slur-engraver.cc:139
+#: slur-engraver.cc:159
 msgid "can't find start of slur"
 msgstr "kann den Anfang des Bogens nicht finden"
 
-#: source-file.cc:68
+#: source-file.cc:67
 #, c-format
 msgid "Huh?  Got %d, expected %d characters"
-msgstr "Hä? %d Zeichen erhalten, %d erwartet"
+msgstr "Hä? %d Zeichen erhalten, %d erwartet"
 
-#: spacing-spanner.cc:385
+#: spacing-spanner.cc:379
 #, c-format
-msgid "Global shortest duration is %s"
-msgstr "Kleinste globale Zeiteinheit ist %s"
+msgid "Global shortest duration is %s\n"
+msgstr "Kleinste globale Zeiteinheit ist %s\n"
 
 #: spring-smob.cc:32
 #, c-format
 msgid "#<spring smob d= %f>"
 msgstr "#<spring smob d= %f>"
 
-#: stem.cc:119
+#: staff-symbol.cc:61
+msgid "staff symbol: indentation yields beyond end of line"
+msgstr "Staff_symbol: Einrückung reicht Ã¼ber das Zeilenende hinaus"
+
+#: stem.cc:118
 msgid "Weird stem size; check for narrow beams"
-msgstr "Eigenartige Notenhalslänge; Ã¼berprüfen Sie auf enge Balken"
+msgstr "Eigenartige Notenhalslänge; Ã¼berprüfen Sie auf enge Balken"
 
-#: stem.cc:648
+#: stem.cc:611
 #, c-format
 msgid "flag `%s' not found"
-msgstr "Fähnchen `%s' nicht gefunden"
+msgstr "Fähnchen `%s' nicht gefunden"
 
-#: stem.cc:661
+#: stem.cc:624
 #, c-format
 msgid "flag stroke `%s' not found"
-msgstr "Fähnchenstrich `%s' nicht gefunden"
+msgstr "Fähnchenstrich `%s' nicht gefunden"
 
-#: stem-engraver.cc:97
+#: stem-engraver.cc:96
 msgid "tremolo duration is too long"
 msgstr "Tremolodauer ist zu lang"
 
-#: stem-engraver.cc:128
+#: stem-engraver.cc:124
 #, c-format
 msgid "Adding note head to incompatible stem (type = %d)"
-msgstr "Füge Notenkopf zu inkompatiblem Hals (Typ = %d) hinzu"
+msgstr "Füge Notenkopf zu inkompatiblem Hals (Typ = %d) hinzu"
 
-#: stem-engraver.cc:129
+#: stem-engraver.cc:125
 msgid "Don't you want polyphonic voices instead?"
 msgstr "Wollen Sie nicht stattdessen Mehrstimmigkeit?"
 
-#: system.cc:181
+#: streams.cc:34
+#, c-format
+msgid "can't create directory: `%s'"
+msgstr "Kann Verzeichnis nicht erstellen: `%s'"
+
+#: streams.cc:48
+msgid "Error syncing file (disk full?)"
+msgstr "Fehler bei Dateisynchronisation (Platte voll?)"
+
+#: system.cc:125
 #, c-format
 msgid "Element count %d."
 msgstr "Elementanzahl: %d."
 
-#: system.cc:335
+#: system.cc:372
 #, c-format
-msgid "Grob count %d"
-msgstr "Anzahl der grafischen Objekte (grob): %d"
+msgid "Grob count %d "
+msgstr "Anzahl der grafischen Objekte (grob): %d "
 
-#: system.cc:349
+#: system.cc:386
 msgid "Calculating line breaks..."
-msgstr "Berechne Zeilenumbrüche..."
+msgstr "Berechne Zeilenumbrüche..."
 
-#: text-spanner-engraver.cc:65
+#: text-spanner-engraver.cc:81
 msgid "can't find start of text spanner"
 msgstr "kann den Anfang der Textklammer nicht finden"
 
-#: text-spanner-engraver.cc:79
+#: text-spanner-engraver.cc:95
 msgid "already have a text spanner"
 msgstr "habe bereits eine Textklammer"
 
-#: text-spanner-engraver.cc:143
+#: text-spanner-engraver.cc:164
 msgid "unterminated text spanner"
 msgstr "unbegrenzte Textklammer"
 
@@ -1565,20 +2104,20 @@ msgstr "TFM Header von `%s' hat nur %u Wort(e)"
 msgid "%s: TFM file has %u parameters, which is more than the %u I can handle"
 msgstr "%s: TFM-Datei hat %u Parameter - mehr als die Maximalzahl %u"
 
-#: tie-engraver.cc:164
-msgid "lonely tie"
-msgstr "einsamer Bindebogen"
+#: tie-performer.cc:159
+msgid "No ties were created!"
+msgstr "Es wurden keine Bindebögen erzeugt!"
 
-#: time-scaled-music-iterator.cc:24
+#: time-scaled-music-iterator.cc:25
 msgid "no one to print a tuplet start bracket"
-msgstr "nichts für die Ausgabe einer Ã¶ffnenden Wertaufteilungsklammer vorhanden"
+msgstr "niemand für die Ausgabe einer Ã¶ffnenden Wertaufteilungsklammer vorhanden"
 
 #. If there is no such symbol, we default to the numbered style.
 #. (Here really with a warning!)
-#: time-signature.cc:95
+#: time-signature.cc:87
 #, c-format
 msgid "time signature symbol `%s' not found; reverting to numbered style"
-msgstr "Taktart `%s' nicht gefunden; Rückkehr zum nummerierten Stil"
+msgstr "Taktart `%s' nicht gefunden; kehre zum nummerierten Stil zurück"
 
 #.
 #. Todo: should make typecheck?
@@ -1593,310 +2132,196 @@ msgstr "Seltsame Taktart gefunden: %d/%d."
 #: translator-ctors.cc:53
 #, c-format
 msgid "unknown translator: `%s'"
-msgstr "unbekannter Ãœbersetzer: `%s'"
+msgstr "unbekannter Ãœbersetzer: `%s'"
 
-#: translator-group.cc:108
+#: translator-def.cc:105
+msgid "Program has no such type"
+msgstr "Das Programm hat keinen solchen Typen"
+
+#: translator-def.cc:111
+#, c-format
+msgid "Already contains: `%s'"
+msgstr "Bereits enthalten: `%s'"
+
+#: translator-def.cc:112
+#, c-format
+msgid "Not adding translator: `%s'"
+msgstr "Füge Ãœbersetzer `%s' nicht hinzu"
+
+#: translator-def.cc:229
 #, c-format
 msgid "can't find: `%s'"
 msgstr "kann `%s' nicht finden"
 
-#: tuplet-bracket.cc:448
-msgid "Killing tuplet bracket across linebreak."
-msgstr "Wertaufteilungsklammer Ã¼ber Zeilenumbruch hinweg."
+#: translator-group.cc:158
+#, c-format
+msgid "can't find or create `%s' called `%s'"
+msgstr "kann `%s' (`%s' genannt) weder finden noch erzeugen"
+
+#: translator-group.cc:230
+#, c-format
+msgid "can't find or create: `%s'"
+msgstr "Kann `%s' weder finden noch erzeugen"
 
-#: vaticana-ligature.cc:92
+#: vaticana-ligature.cc:49
 msgid "ascending vaticana style flexa"
 msgstr "aufsteigender Vaticana-Stil flexa"
 
-#: vaticana-ligature.cc:181
-msgid "Vaticana_ligature: zero join (delta_pitch == 0)"
-msgstr "Vaticana_ligature: nichts zusammengefügt (delta_pitch == 0)"
+#: vaticana-ligature.cc:219
+msgid "Vaticana_ligature:thickness undefined; assuming 1.4"
+msgstr "Vaticana_ligature: Dicke undefiniert; nehme 1.4 an"
 
-#: vaticana-ligature-engraver.cc:342
-#, c-format
-msgid "ignored prefix (es) `%s' of this head according to restrictions of the selected ligature style"
-msgstr "Vorzeichen (es) `%s' dieses Kopfes gemäß den Einschränkungen des ausgewählten Bindungs-Stils ignoriert"
+#: vaticana-ligature.cc:233
+msgid "Vaticana_ligature:x-offset undefined; assuming 0.0"
+msgstr "Vaticana_ligature: x-offset undefiniert; nehme 0.0 an"
+
+#: vaticana-ligature.cc:258
+msgid "Vaticana_ligature: (delta_pitch == 0)"
+msgstr "Vaticana_ligature: (delta_pitch == 0)"
+
+#: vaticana-ligature.cc:271
+msgid "Vaticana_ligature:delta-pitch -> ignoring join"
+msgstr "Vaticana_ligature:delta-pitch -> ignoriere Kombination"
 
-#: vaticana-ligature-engraver.cc:572
+#: vaticana-ligature-engraver.cc:477
 #, c-format
 msgid "Vaticana_ligature_engraver: setting `spacing-increment = %f': ptr=%ul"
 msgstr "Vaticana_ligature_engraver: setze `spacing-increment = %f': ptr=%ul"
 
-#: volta-engraver.cc:140
+#: volta-engraver.cc:112
 msgid "No volta spanner to end"
 msgstr "Kein Wiederholungskasten zu beenden"
 
-#: volta-engraver.cc:151
+#: volta-engraver.cc:123
 msgid "Already have a volta spanner.  Stopping that one prematurely."
-msgstr "Habe bereits einen Wiederholungskasten. Beende diesen frühzeitig."
+msgstr "Habe bereits einen Wiederholungskasten. Beende diesen frühzeitig."
 
-#: volta-engraver.cc:155
+#: volta-engraver.cc:127
 msgid "Also have a stopped spanner.  Giving up."
 msgstr "Habe auch einen beendeten Kasten. Gebe auf."
 
-#: parser.yy:114
-msgid "Tag must be symbol or list of symbols."
-msgstr "Markierung muss Symbol oder Liste von Symbolen sein."
-
-#: parser.yy:513
+#: parser.yy:480
 msgid "Identifier should have alphabetic characters only"
 msgstr "Ein Bezeichner sollte nur aus alphabetischen Zeichen bestehen"
 
-#: parser.yy:776
+#: parser.yy:779
 msgid "More alternatives than repeats.  Junking excess alternatives."
-msgstr "Mehr Alternativen als Wiederholungen. Verwerfe Ã¼berschüssige Alternativen."
-
-#: parser.yy:857 parser.yy:864
-msgid "\\applycontext takes function argument"
-msgstr "\\applycontext benötigt Funktionsargument"
+msgstr "Mehr Alternativen als Wiederholungen. Verwerfe Ã¼berschüssige Alternativen."
 
-#: parser.yy:1014
-msgid "\\apply takes function argument"
-msgstr "\\apply benötigt Funktionsargument"
+#: parser.yy:861 parser.yy:868
+msgid "\applycontext takes function argument"
+msgstr "\applycontext benötigt Funktionsargument"
 
-#: parser.yy:1377
-msgid "Can't find music"
-msgstr "Musik kann nicht gefunden werden"
+#: parser.yy:877
+msgid "Second argument must be a symbol"
+msgstr "Das zweite Argument muss ein Symbol sein"
 
-#: parser.yy:1495
-msgid "Second argument must be pitch list."
-msgstr "Das zweite Argument muss eine Tonhöhenliste sein."
+#: parser.yy:882
+msgid "First argument must be a procedure taking one argument"
+msgstr "Das erste Argument muss eine Prozedur sein, welche ein Argument erwartet"
 
-#: parser.yy:1532 parser.yy:1537 parser.yy:2070
-msgid "Have to be in Lyric mode for lyrics"
-msgstr "Muss in Liedtextmodus sein um Liedtext setzen zu können"
+#: parser.yy:1009
+msgid "\apply takes function argument"
+msgstr "\apply benötigt Funktionsargument"
 
-#: parser.yy:1622
+#: parser.yy:1501
 msgid "Expecting string as script definition"
 msgstr "Erwarte String als Skriptdefinition"
 
-#: parser.yy:1829 parser.yy:1884
+#: parser.yy:1598
+msgid "Expecting musical-pitch value"
+msgstr "Erwarte musikalischen Tonhöhenwert"
+
+#: parser.yy:1609
+msgid "Must have duration object"
+msgstr "Brauche Dauer-Objekt"
+
+#: parser.yy:1618 parser.yy:1626
+msgid "Have to be in Lyric mode for lyrics"
+msgstr "Muss in Liedtextmodus sein um Liedtext setzen zu können"
+
+#: parser.yy:1798 parser.yy:1853
 #, c-format
 msgid "not a duration: %d"
-msgstr "keine gültige Dauer: %d"
+msgstr "keine gültige Dauer: %d"
 
-#: parser.yy:1980
+#: parser.yy:1949
 msgid "Have to be in Note mode for notes"
-msgstr "Muss im Notenmodus sein, um Noten setzen zu können"
+msgstr "Muss im Notenmodus sein um Noten setzen zu können"
 
-#: parser.yy:2085
+#: parser.yy:2032
 msgid "Have to be in Chord mode for chords"
-msgstr "Muss im Akkordmodus sein, um Akkorde setzen zu können"
+msgstr "Muss im Akkordmodus sein um Akkorde setzen zu können"
 
-#: parser.yy:2232
+#: parser.yy:2171
 msgid "need integer number arg"
-msgstr "benötige ein Ganzzahlargument"
+msgstr "benötige ein Ganzzahlargument"
 
-#: parser.yy:2383
+#: parser.yy:2316
 msgid "Suspect duration found following this beam"
-msgstr "Fehlerverdächtige Dauer nach diesem Balken gefunden"
+msgstr "Fehlerverdächtige Dauer nach diesem Balken gefunden"
 
-#: lexer.ll:184
-#, c-format
-msgid "input renamed to: `%s'"
-msgstr "Eingabe umbenannt in `%s'"
-
-#: lexer.ll:210
+#: lexer.ll:186
 msgid "EOF found inside a comment"
 msgstr "EOF innerhalb eines Kommentares gefunden"
 
-#: lexer.ll:225
-msgid "\\maininput not allowed outside init files"
-msgstr "\\maininput ist außerhalb von Init-Dateien nicht erlaubt"
+#: lexer.ll:200
+msgid "\\maininput disallowed outside init files"
+msgstr "\\maininput ist außerhalb von Init-Dateien nicht erlaubt"
 
-#: lexer.ll:249
+#: lexer.ll:224
 #, c-format
 msgid "wrong or undefined identifier: `%s'"
-msgstr "falscher oder ungültiger Bezeichner: `%s'"
+msgstr "falscher oder ungültiger Bezeichner: `%s'"
 
 #. backup rule
-#: lexer.ll:258
+#: lexer.ll:233
 msgid "Missing end quote"
-msgstr "Fehlendes schließendes Anführungszeichen"
+msgstr "Fehlendes schließendes Anführungszeichen"
+
+#. backup rule
+#: lexer.ll:255 lexer.ll:259
+msgid "white expected"
+msgstr "weiß erwartet"
+
+#: lexer.ll:268
+msgid "Can't evaluate Scheme in safe mode"
+msgstr "Kann Schema nicht im Sicherheitsmodus auswerten"
 
-#: lexer.ll:400
+#: lexer.ll:397 lexer.ll:487
 msgid "Brace found at end of lyric.  Did you forget a space?"
 msgstr "Klammer am Ende von Liedtext gefunden. Haben Sie ein Leerzeichen vergessen?"
 
-#: lexer.ll:501
-msgid "Brace found at end of markup.  Did you forget a space?"
-msgstr "Klammer am Ende des Auszugs gefunden. Haben Sie ein Leerzeichen vergessen?"
-
-#: lexer.ll:584
+#: lexer.ll:574
 #, c-format
 msgid "invalid character: `%c'"
-msgstr "Ungültiges Zeichen: `%c'"
+msgstr "Ungültiges Zeichen: `%c'"
 
-#: lexer.ll:656 lexer.ll:657
+#: lexer.ll:651
 #, c-format
 msgid "unknown escaped string: `\\%s'"
-msgstr "Ungültige Fluchtsequenz: `\\%s'"
+msgstr "Ungültige Fluchtsequenz: `\\%s'"
 
-#: lexer.ll:754 lexer.ll:755
+#: lexer.ll:742
 #, c-format
 msgid "Incorrect lilypond version: %s (%s, %s)"
 msgstr "Falsche lilypond Version: %s (%s, %s)"
 
-#: lexer.ll:755 lexer.ll:756
+#: lexer.ll:743
 msgid "Consider updating the input with the convert-ly script"
-msgstr "Erwägen Sie die Aktualisierung der Eingabe mit dem Skript convert-ly"
-
-#~ msgid " 1998--2003"
-#~ msgstr "1998--2003"
-
-#~ msgid "write ouput to FILE"
-#~ msgstr "Ausgabe in DATEI schreiben"
-
-#~ msgid " 2001--2003"
-#~ msgstr " 2001--2003"
-
-#~ msgid ""
-#~ "\n"
-#~ "Distributed under terms of the GNU General Public License. It comes with\n"
-#~ "NO WARRANTY."
-#~ msgstr ""
-#~ "\n"
-#~ "Vertrieben unter den Bedingungen der GNU General Public License\n"
-#~ "und ohne GEWÄHRLEISTUNG."
-
-#~ msgid "unknown accidental typesetting: %s. Ignored"
-#~ msgstr "Unbekanntes Vorzeichen: %s. Ignoriert"
-
-#~ msgid "Symbol is not a parent context: %s. Ignored"
-#~ msgstr "Symbol ist kein Elternkontext: %s. Ignoriert"
-
-#~ msgid "can't find character number: %d"
-#~ msgstr "Zeichennummer kann nicht gefunden werden: %d"
-
-#~ msgid "can't find character called: `%s'"
-#~ msgstr "Zeichen kann nicht gefunden werden: `%s'"
-
-#~ msgid "Beam has less than two stems. Removing beam."
-#~ msgstr "Balken hat weniger als zwei Notenhälse. Notenhals wird entfernt."
-
-#~ msgid "Not sure that we can find a nice beam slope (no viable initial configuration found)."
-#~ msgstr "Es kann wahrscheinlich keine optimale Balkenneigung ermittelt werden (keine funktionsfähige Anfangskonfiguration gefunden)"
-
-#~ msgid "Nothing to connect extender to on the left.  Ignoring extender event."
-#~ msgstr "Nichts vorhanden, um die Erweiterung nach links zu verbinden. Erweiterungsanforderung wird ignoriert."
-
-#~ msgid "couldn't find any font satisfying "
-#~ msgstr "konnte keine passende Schriftart finden für "
-
-#~ msgid ""
-#~ "Skipped something?\n"
-#~ "Grob %s ended before I expected it to end."
-#~ msgstr ""
-#~ "Etwas Ã¼bersehen?\n"
-#~ "Grob %s endet, bevor dies erwartet wurde."
-
-#~ msgid "Nothing to connect hyphen to on the left.  Ignoring hyphen event."
-#~ msgstr "Nichts vorhanden, um den Bindestrich nach links zu verbinden. Bindestrichanforderung wird ignoriert."
-
-#~ msgid "Score contains errors; will not process it"
-#~ msgstr "Noten enthalten Fehler; keine weitere Verarbeitung"
-
-#~ msgid "lyrics found without any matching notehead"
-#~ msgstr "Liedtext ohne passenden Notenkopf gefunden"
-
-#~ msgid "Huh? Melismatic note found to have associated lyrics."
-#~ msgstr "Hä? Melismatische Note ohne assoziierten Liedtext gefunden."
-
-#~ msgid "inhibit file output naming and exporting"
-#~ msgstr "Dateiausgabe-Benennung und -Export wird verhindert"
-
-#~ msgid ""
-#~ "LilyPond is a music typesetter.  It produces beautiful sheet music\n"
-#~ "using a high level description file as input.  LilyPond is part of \n"
-#~ "the GNU Project.\n"
-#~ msgstr ""
-#~ "LilyPond ist ein Musiksatzprogramm. Es erzeugt ansprechende Notenblätter\n"
-#~ "mit Hilfe einer Hochsprachen-Beschreibungsdatei als Eingabe. LilyPond\n"
-#~ "ist ein Teil des GNU-Projektes.\n"
-
-#~ msgid "GNU LilyPond -- The music typesetter"
-#~ msgstr "GNU LilyPond -- Das Musiksatzprogramm"
-
-#~ msgid "Mensural_ligature:thickness undefined on flexa %d; assuming 1.4"
-#~ msgstr "Mensural_ligature: Dicke undefiniert bei flexa %d; nehme 1.4 an"
-
-#~ msgid "Mensural_ligature:delta-pitch undefined on flexa %d; assuming 0"
-#~ msgstr "Mensural_ligature: delta-pitch undefiniert bei flexa %d; nehme 0 an"
-
-#~ msgid "Mensural_ligature:flexa-width undefined on flexa %d; assuming 2.0"
-#~ msgstr "Mensural_ligature: flexa-width undefiniert bei flexa %d; nehme 2.0 an"
-
-#~ msgid "silly duration"
-#~ msgstr "sinnlose Dauer"
-
-#~ msgid "Outputting Score, defined at: "
-#~ msgstr "Notenausgabe, definiert bei: "
-
-#~ msgid "I'm one myself: `%s'"
-#~ msgstr "Ich bin selbst einer: '%s'"
-
-#~ msgid "none of these in my family: `%s'"
-#~ msgstr "Keiner davon befindet sich in meiner Familie: `%s'"
-
-#~ msgid "from musical definition: %s"
-#~ msgstr "von der musikalischen Vorgabe: %s"
-
-#~ msgid "unterminated pedal bracket"
-#~ msgstr "unbegrenzte Pedalklammer"
-
-#~ msgid "Errors found/*, not processing score*/"
-#~ msgstr "Fehler gefunden/*, die Noten werden nicht verarbeitet*/"
-
-#~ msgid "staff symbol: indentation yields beyond end of line"
-#~ msgstr "Staff_symbol: Einrückung reicht Ã¼ber das Zeilenende hinaus"
-
-#~ msgid "Error syncing file (disk full?)"
-#~ msgstr "Datei konnte nicht synchronisiert (geschrieben) werden. (Platte voll?)"
-
-#~ msgid "No ties were created!"
-#~ msgstr "Es wurden keine Bindebögen erzeugt!"
-
-#~ msgid "Already contains: `%s'"
-#~ msgstr "Bereits enthalten: `%s'"
-
-#~ msgid "Not adding translator: `%s'"
-#~ msgstr "Füge Ãœbersetzer `%s' nicht hinzu"
-
-#~ msgid "Vaticana_ligature:thickness undefined; assuming 1.4"
-#~ msgstr "Vaticana_ligature: Dicke undefiniert; 1.4 wird angenommen"
-
-#~ msgid "Vaticana_ligature:x-offset undefined; assuming 0.0"
-#~ msgstr "Vaticana_ligature: x-offset undefiniert; 0.0 wird angenommen"
-
-#~ msgid "Vaticana_ligature:delta-pitch -> ignoring join"
-#~ msgstr "Vaticana_ligature:delta-pitch -> Kombination wird ignoriert"
-
-#~ msgid "First argument must be a procedure taking one argument"
-#~ msgstr "Das erste Argument muss eine Prozedur sein, welche ein Argument erwartet"
-
-#~ msgid "Expecting musical-pitch value"
-#~ msgstr "Erwarte musikalischen Tonhöhenwert"
-
-#~ msgid "Must have duration object"
-#~ msgstr "Brauche Dauer-Objekt"
-
-#~ msgid "white expected"
-#~ msgstr "weiß erwartet"
-
-#~ msgid "Can't evaluate Scheme in safe mode"
-#~ msgstr "Kann Schema nicht im Sicherheitsmodus auswerten"
+msgstr "Erwägen Sie die Aktualisierung der Eingabe mit dem Skript convert-ly"
 
 #~ msgid "Run LilyPond using LaTeX for titling"
 #~ msgstr "LilyPond zum Kacheln mit LaTeX aufrufen"
 
 #~ msgid "Fetch and rebuild from latest source package"
-#~ msgstr "Holen Sie das neueste Quelltextpaket und bauen Sie neu"
+#~ msgstr "Hole neuestes Quelltextpaket und baue neu"
 
 #~ msgid "unpack and build in DIR [%s]"
 #~ msgstr "Auspacken und bauen in VERZ [%s]"
 
 #~ msgid "execute COMMAND, subtitute:"
-#~ msgstr "KOMMANDO ausführen, ersetzen:"
+#~ msgstr "KOMMANDO ausführen, ersetzen:"
 
 #~ msgid "%b: build root"
 #~ msgstr "%b: Arbeitsverzeichnis"
@@ -1920,25 +2345,31 @@ msgstr "Erwägen Sie die Aktualisierung der Eingabe mit dem Skript convert-ly"
 #~ msgstr "Bei Misserfolg EMAIL[,EMAIL] benachrichtgen"
 
 #~ msgid "remove previous build"
-#~ msgstr "Vorheriges Kompilat löschen"
+#~ msgstr "Vorheriges Kompilat löschen"
 
 #~ msgid "fetch and build URL [%s]"
-#~ msgstr "URL [%s] holen und bauen"
+#~ msgstr "Hole und baue URL [%s]"
+
+#~ msgid "Listing `%s'..."
+#~ msgstr "Liste `%s' auf..."
 
 #~ msgid "latest is: %s"
 #~ msgstr "Neuestes ist: %s"
 
+#~ msgid "relax, %s is up to date"
+#~ msgstr "Seien Sie unbesorgt, %s ist auf dem neuesten Stand"
+
 #~ msgid "Fetching `%s'..."
-#~ msgstr "`%s' wird geholt..."
+#~ msgstr "Hole `%s'..."
 
 #~ msgid "Building `%s'..."
-#~ msgstr "`%s' wird gebaut..."
+#~ msgstr "Baue `%s'..."
 
 #~ msgid "invalid subtraction: not part of chord: %s"
-#~ msgstr "ungültige Subtraktion: nicht Teil des Akkordes: %s"
+#~ msgstr "ungültige Subtraktion: nicht Teil des Akkordes: %s"
 
 #~ msgid "invalid inversion pitch: not part of chord: %s"
-#~ msgstr "ungültige Umkehrungstonhöhe: nicht Teil des Akkordes: %s"
+#~ msgstr "ungültige Umkehrungstonhöhe: nicht Teil des Akkordes: %s"
 
 #~ msgid "This was the other key definition."
 #~ msgstr "Das war die andere Tonartdefinition"
@@ -1947,7 +2378,7 @@ msgstr "Erwägen Sie die Aktualisierung der Eingabe mit dem Skript convert-ly"
 #~ msgstr ", bei "
 
 #~ msgid "Pitch arguments out of range"
-#~ msgstr "Tonhöhenargumente außerhalb des Wertebereiches"
+#~ msgstr "Tonhöhenargumente außerhalb des Wertebereiches"
 
 #~ msgid "(left_head == 0)"
 #~ msgstr "(left_head == 0)"
@@ -1962,29 +2393,22 @@ msgstr "Erwägen Sie die Aktualisierung der Eingabe mit dem Skript convert-ly"
 #~ msgstr "undefinierter right_head"
 
 #~ msgid "junking lonely porrectus"
-#~ msgstr "einsames Porrectus wird ignoriert"
+#~ msgstr "ignoriere einsamen Porrectus"
 
 #~ msgid "porrectus style undefined; using mensural"
-#~ msgstr "Porrectus-Stil undefiniert; Mensuralnotation wird verwendet"
+#~ msgstr "Porrectus-Stil undefiniert; verwende Mensuralnotation"
 
 #~ msgid "stack size cur %d, max %d\n"
-#~ msgstr "Kellergröße: %d, maximal %d\n"
+#~ msgstr "Kellergröße: %d, maximal %d\n"
 
 #~ msgid "Putting slur over rest."
-#~ msgstr "Platziere Bogen Ã¼ber der Pause."
+#~ msgstr "Platziere Bogen Ã¼ber der Pause."
 
 #~ msgid "Slur over rest?"
-#~ msgstr "Bogen Ã¼ber der Pause?"
+#~ msgstr "Bogen Ã¼ber der Pause?"
 
 #~ msgid "Text_spanner too small"
 #~ msgstr "Textklammer zu klein"
 
 #~ msgid "Can't specify direction for this request"
-#~ msgstr "Es kann keine Richtung für diese Anforderung angegeben werden"
-
-#~ msgid ""
-#~ "\n"
-#~ "Renamed input to `%s'\n"
-#~ msgstr ""
-#~ "\n"
-#~ "Eingabe `%s' umbenannt\n"
+#~ msgstr "Kann keine Richtung für diese Anforderung angeben"
index e77c563363c23d27bf2cf4d0a8997846d2c5c8fb..db9804d7674f9d6f6247ed9eb664d56703daea5b 100644 (file)
--- a/po/fi.po
+++ b/po/fi.po
@@ -6,9 +6,8 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: lilypond 2.3.1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-04-15 23:37+0300\n"
+"Project-Id-Version: lilypond 1.7.27\n"
+"POT-Creation-Date: 2003-07-23 0:40+0300\n"
 "PO-Revision-Date: 2003-07-23 13:37+0300\n"
 "Last-Translator: Heikki Junes <hjunes@cc.hut.fi>\n"
 "Language-Team: Finnish <fi@li.org>\n"
@@ -16,381 +15,812 @@ msgstr ""
 "Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
 
+#. this is where special info is often stored
+#. ###############################################################
+#. lilylib.py -- options and stuff
+#.
+#. source file of the GNU LilyPond music typesetter
+#.
+#. (c)  1998--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+#. Jan Nieuwenhuizen <janneke@gnu.org>
+#. ##  subst:\(^\|[^._a-z]\)\(abspath\|identify\|warranty\|progress\|warning\|error\|exit\|getopt_args\|option_help_str\|options_help_str\|help\|setup_temp\|read_pipe\|system\|cleanup_temp\|strip_extension\|cp_to_dir\|mkdir_p\|init\) *(
+#. ##  replace:\1ly.\2 (
+#. ## subst: \(help_summary\|keep_temp_dir_p\|option_definitions\|original_dir\|program_name\|pseudo_filter_p\|temp_dir\|verbose_p\)
+#. ###############################################################
+#. Users of python modules should include this snippet
+#. and customize variables below.
+#. We'll suffer this path init stuff as long as we don't install our
+#. python packages in <prefix>/lib/pythonx.y (and don't kludge around
+#. it as we do with teTeX on Red Hat Linux: set some environment var
+#. (PYTHONPATH) in profile)
+#. If set, LILYPONDPREFIX must take prevalence
+#. if datadir is not set, we're doing a build and LILYPONDPREFIX
+#. Customize these
+#. lilylib globals
 #: lilylib.py:60
 msgid "lilylib module"
 msgstr "lilylib moduuli"
 
-#: lilylib.py:63 lilypond-book.py:84 lilypond.py:108 midi2ly.py:100
-#: mup2ly.py:75 main.cc:127
+#: lilylib.py:63 lilypond-book.py:131 lilypond.py:128 midi2ly.py:100
+#: mup2ly.py:75 main.cc:111
 msgid "print this help"
-msgstr "näytä tämä opaste"
+msgstr "näytä tämä opastus"
 
-#: lilylib.py:110 midi2ly.py:136 mup2ly.py:130
-#, python-format
+#. ###############################################################
+#. Handle bug in Python 1.6-2.1
+#.
+#. there are recursion limits for some patterns in Python 1.6 til 2.1.
+#. fix this by importing pre instead. Fix by Mats.
+#. Attempt to fix problems with limited stack size set by Python!
+#. Sets unlimited stack size. Note that the resource module only
+#. is available on UNIX.
+#: lilylib.py:114 midi2ly.py:136 mup2ly.py:130 main.cc:188 main.cc:200
+#, c-format, python-format
 msgid "Copyright (c) %s by"
 msgstr "Copyright (c) %s by"
 
-#: lilylib.py:114 midi2ly.py:141 mup2ly.py:135
+#: lilylib.py:114
+msgid " 1998--2003"
+msgstr "1998--2003"
+
+#: lilylib.py:118
 msgid "Distributed under terms of the GNU General Public License."
 msgstr "Levitettävissä ehdoilla GNU General Public License."
 
-#: lilylib.py:116 midi2ly.py:142 mup2ly.py:136
+#: lilylib.py:120
 msgid "It comes with NO WARRANTY."
 msgstr "Se toimitetaan ILMAN TAKUUTA."
 
-#: lilylib.py:123 warn.cc:25
-msgid "warning: %s"
-msgstr "varoitus: %s"
+#: lilylib.py:127 midi2ly.py:150 mup2ly.py:144 input.cc:88
+msgid "warning: "
+msgstr "varoitus: "
 
-#: lilylib.py:126 warn.cc:31
-msgid "error: %s"
-msgstr "virhe: %s"
+#. lots of midi files use plain text for lyric events
+#. FIXME: read from stdin when files[0] = '-'
+#: lilylib.py:130 midi2ly.py:165 midi2ly.py:1018 midi2ly.py:1083 mup2ly.py:147
+#: mup2ly.py:161 input.cc:93
+msgid "error: "
+msgstr "virhe: "
 
-#: lilylib.py:130
+#: lilylib.py:134
 #, python-format
 msgid "Exiting (%d)..."
 msgstr "Lopetetaan (%d)..."
 
-#: lilylib.py:190 midi2ly.py:223 mup2ly.py:219
+#: lilylib.py:194 midi2ly.py:224 mup2ly.py:220
 #, python-format
 msgid "Usage: %s [OPTIONS]... FILE"
 msgstr "Käyttö: %s [OPTIOT]... TIEDOSTO"
 
-#: lilylib.py:194 midi2ly.py:227 mup2ly.py:223 main.cc:190
-#, c-format
+#: lilylib.py:198 midi2ly.py:228 mup2ly.py:224 main.cc:166
 msgid "Options:"
 msgstr "Optiot:"
 
-#: lilylib.py:198 midi2ly.py:231 mup2ly.py:227 main.cc:194
+#: lilylib.py:202 midi2ly.py:232 mup2ly.py:228 main.cc:172
 #, c-format, python-format
 msgid "Report bugs to %s."
 msgstr "Raportoi virheet osoitteeseen %s."
 
-#: lilylib.py:218
-#, python-format
-msgid "Binary %s has version %s, looking for version %s"
-msgstr "Binääritiedosto %s on versiota %s, etsitään versiota %s"
-
-#: lilylib.py:252
+#: lilylib.py:228
 #, python-format
 msgid "Opening pipe `%s'"
 msgstr "Avataan putki `%s'"
 
-#: lilylib.py:267 lilypond-book.py:767
+#. successful pipe close returns 'None'
+#: lilylib.py:240
 #, python-format
 msgid "`%s' failed (%d)"
 msgstr "`%s' epäonnistui (%d)"
 
-#: lilylib.py:272 lilylib.py:331 lilypond-book.py:768 lilypond.py:463
+#: lilylib.py:242 lilylib.py:289 lilypond-book.py:231 lilypond.py:512
 msgid "The error log is as follows:"
 msgstr "Virheloki on seuraava:"
 
-#: lilylib.py:303 midi2ly.py:259 mup2ly.py:255
+#: lilylib.py:262 midi2ly.py:260 mup2ly.py:256
 #, python-format
 msgid "Invoking `%s'"
 msgstr "Kutsutaan `%s'"
 
-#: lilylib.py:305
+#: lilylib.py:264
 #, python-format
 msgid "Running %s..."
 msgstr "Ajetaan %s..."
 
-#: lilylib.py:324
+#: lilylib.py:282
 #, python-format
 msgid "`%s' failed (%s)"
 msgstr "`%s' epäonnistui (%s)"
 
-#: lilylib.py:327 midi2ly.py:265 mup2ly.py:263
+#: lilylib.py:285 midi2ly.py:266 mup2ly.py:264
 msgid "(ignored)"
 msgstr "(sivuutetaan)"
 
-#: lilylib.py:345 midi2ly.py:275 mup2ly.py:273
+#: lilylib.py:299 midi2ly.py:276 mup2ly.py:274
 #, python-format
 msgid "Cleaning %s..."
 msgstr "Siivotaan pois %s..."
 
-#: lilylib.py:509
+#. Duh.  Python style portable: cp *.EXT OUTDIR
+#. system ('cp *.%s %s' % (ext, outdir), 1)
+#. Python < 1.5.2 compatibility
+#.
+#. On most platforms, this is equivalent to
+#. `normpath(join(os.getcwd()), PATH)'.  *Added in Python version 1.5.2*
+#. tex needs lots of memory, more than it gets by default on Debian
+#. TODO: * prevent multiple addition.
+#. * clean TEXINPUTS, MFINPUTS, TFMFONTS,
+#. as these take prevalence over $TEXMF
+#. and thus may break tex run?
+#. $TEXMF is special, previous value is already taken care of
+#. # -sOutputFile does not work with bbox?
+#. # todo:
+#. # have better algorithm for deciding when to crop page,
+#. # and when to show full page
+#: lilylib.py:458
 msgid "Removing output file"
 msgstr "Poistetaan tulostustiedosto"
 
-#: lilypond-book.py:69
-msgid ""
-"Process LilyPond snippets in hybrid HTML, LaTeX or texinfo document.\n"
-"Example usage:\n"
-"\n"
-"   lilypond-book --filter=\"tr '[a-z]' '[A-Z]'\" BOOK\n"
-"   lilypond-book --filter=\"convert-ly --no-version --from=2.0.0 -\" BOOK\n"
-"   lilypond-book --process='lilypond-bin -I include' BOOK\n"
-"\n"
-msgstr ""
-"Prosessoi HTML, LaTeX, tai texinfo -documenttiin sisällytetyt LilyPond palaset.\n"
-"Example usage:\n"
-"\n"
-"   lilypond-book --filter=\"tr '[a-z]' '[A-Z]'\" BOOK\n"
-"   lilypond-book --filter=\"convert-ly --no-version --from=2.0.0 -\" BOOK\n"
-"   lilypond-book --process='lilypond-bin -I include' BOOK\n"
-"\n"
+#. !@PYTHON@
+#. once upon a rainy monday afternoon.
+#.
+#. ...
+#.
+#. (not finished.)
+#. ABC standard v1.6:  http://www.gre.ac.uk/~c.walshaw/abc2mtex/abc.txt
+#.
+#. Enhancements  (Roy R. Rankin)
+#.
+#. Header section moved to top of lilypond file
+#. handle treble, treble-8, alto, and bass clef
+#. Handle voices (V: headers) with clef and part names, multiple voices
+#. Handle w: lyrics with multiple verses
+#. Handle key mode names for minor, major, phrygian, ionian, locrian, aeolian,
+#. mixolydian, lydian, dorian
+#. Handle part names from V: header
+#. Tuplets handling fixed up
+#. Lines starting with |: not discarded as header lines
+#. Multiple T: and C: header entries handled
+#. Accidental maintained until next bar check
+#. Silent rests supported
+#. articulations fermata, upbow, downbow, ltoe, accent, tenuto supported
+#. Chord strings([-^]"string") can contain a '#'
+#. Header fields enclosed by [] in notes string processed
+#. W: words output after tune as abc2ps does it (they failed before)
+#. Enhancements (Laura Conrad)
+#.
+#. Barring now preserved between ABC and lilypond
+#. the default placement for text in abc is above the staff.
+#. %%LY now supported.
+#. \breve and \longa supported.
+#. M:none doesn't crash lily.
+#. Limitations
+#.
+#. Multiple tunes in single file not supported
+#. Blank T: header lines should write score and open a new score
+#. Not all header fields supported
+#. ABC line breaks are ignored
+#. Block comments generate error and are ignored
+#. Postscript commands are ignored
+#. lyrics not resynchronized by line breaks (lyrics must fully match notes)
+#. %%LY slyrics can't be directly before a w: line.
+#. ???
+#. TODO:
+#.
+#. Convert to new chord styles.
+#.
+#. UNDEF -> None
+#.
+#. uGUHGUHGHGUGH
+#. UGH
+#. treble8 is used by abctab2ps; -8va is used by barfly,
+#. and by my patch to abc2ps. If there's ever a standard
+#. about this we'll support that.
+#. find keywork
+#. assume that Q takes the form "Q:1/4=120"
+#. There are other possibilities, but they are deprecated
+#. outf.write ("\t\t\\consists Staff_margin_engraver\n")
+#. pitch manipulation. Tuples are (name, alteration).
+#. 0 is (central) C. Alteration -1 is a flat, Alteration +1 is a sharp
+#. pitch in semitones.
+#. abc to lilypond key mode names
+#. semitone shifts for key mode names
+#. latex does not like naked #'s
+#. latex does not like naked "'s
+#. break lyrics to words and put "'s around words containing numbers and '"'s
+#. escape "
+#. _ causes probs inside ""
+#. _ to ' _ '
+#. split words with -
+#. unless \-
+#. ~ to space('_')
+#. * to to space
+#. latex does not like naked #'s
+#. put numbers and " and ( into quoted string
+#. insure space between lines
+#. title
+#. strip trailing blanks
+#. Meter
+#. KEY
+#. seperate clef info
+#. there may or may not be a space
+#. between the key letter and the mode
+#. ugh.
+#. ugh.
+#. Notes
+#. Origin
+#. Reference Number
+#. Area
+#. History
+#. Book
+#. Composer
+#. Default note length
+#. Voice
+#. Words
+#. vocals
+#. tempo
+#. we use in this order specified accidental, active accidental for bar,
+#. active accidental for key
+#. (num /  den)  / defaultlen < 1/base
+#. return (str, num,den,dots)
+#. ignore slide
+#. ignore roll
+#. s7m2 input doesnt care about spaces
+#.
+#. remember accidental for rest of bar
+#.
+#. get accidental set in this bar or UNDEF if not set
+#. WAT IS ABC EEN ONTZETTENDE PROGRAMMEERPOEP  !
+#. failed; not a note!
+#. escape '#'s
+#.
+#. |] thin-thick double bar line
+#. || thin-thin double bar line
+#. [| thick-thin double bar line
+#. :| left repeat
+#. |: right repeat
+#. :: left-right repeat
+#. |1 volta 1
+#. |2 volta 2
+#. first try the longer one
+#. bracket escape
+#. the nobarlines option is necessary for an abc to lilypond translator for
+#. exactly the same reason abc2midi needs it: abc requires the user to enter
+#. the note that will be printed, and MIDI and lilypond expect entry of the
+#. pitch that will be played.
+#.
+#. In standard 19th century musical notation, the algorithm for translating
+#. between printed note and pitch involves using the barlines to determine
+#. the scope of the accidentals.
+#.
+#. Since ABC is frequently used for music in styles that do not use this
+#. convention, such as most music written before 1700, or ethnic music in
+#. non-western scales, it is necessary to be able to tell a translator that
+#. the barlines should not affect its interpretation of the pitch.
+#. write other kinds of appending  if we ever need them.
+#. add comments to current voice
+#. Try nibbling characters off until the line doesn't change.
+#. dump_global (outf)
+#. !@PYTHON@
+#.
+#. convert-ly.py -- Update old LilyPond input files (fix name?)
+#.
+#. source file of the GNU LilyPond music typesetter
+#.
+#. (c)  1998--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+#. Jan Nieuwenhuizen <janneke@gnu.org>
+#. TODO
+#. use -f and -t for -s output
+#. NEWS
+#. 0.2
+#. - rewrite in python
+#. Did we ever have \mudela-version?  I doubt it.
+#. lilypond_version_re_str = '\\\\version *\"(.*)\"'
+#. ###########################
+#. need new a namespace
+#. raise FatalConversionError()
+#. need new a namespace
+#. harmful to current .lys
+#. str = re.sub ('\\\\key([^;]+);', '\\\\accidentals \\1;', str)
+#. raise FatalConversionError()
+#. raise FatalConversionError()
+#. raise FatalConversionError()
+#. TODO: lots of other syntax change should be done here as well
+#. Ugh, but meaning of \stemup changed too
+#. maybe we should do \stemup -> \stemUp\slurUp\tieUp ?
+#. I don't know exactly when these happened...
+#. ugh, we loose context setting here...
+#. (lacks capitalisation slur -> Slur)
+#. # dynamic..
+#. TODO: add lots of these
+#. ugh
+#. old fix
+#. Make sure groups of more than one ; have space before
+#. them, so that non of them gets removed by next rule
+#. Only remove ; that are not after spaces, # or ;
+#. Otherwise  we interfere with Scheme comments,
+#. which is badbadbad.
+#. 40 ?
+#. ###############################
+#. END OF CONVERSIONS
+#. ###############################
+#. !@PYTHON@
+#. info mostly taken from looking at files. See also
+#. http://lilypond.org/wiki/?EnigmaTransportFormat
+#. This supports
+#.
+#. * notes
+#. * rests
+#. * ties
+#. * slurs
+#. * lyrics
+#. * articulation
+#. * grace notes
+#. * tuplets
+#.
+#. todo:
+#. * slur/stem directions
+#. * voices (2nd half of frame?)
+#. * more intelligent lyrics
+#. * beams (better use autobeam?)
+#. * more robust: try entertainer.etf (freenote)
+#. * dynamics
+#. * empty measures (eg. twopt03.etf from freenote)
+#.
+#. uGUHGUHGHGUGH
+#. notename 0 == central C
+#. represent pitches as (notename, alteration), relative to C-major scale
+#. a fifth up
+#. should cache this.
+#. flag1 isn't all that interesting.
+#. 3: '>',
+#. 18: '\arpeggio' ,
+#. do grace notes.
+#. ugh.
+#. we don't attempt voltas since they fail easily.
+#. and g.repeat_bar == '|:' or g.repeat_bar == ':|:' or g.bracket:
+#. 4 layers.
+#. let's not do this: this really confuses when eE happens to be before  a ^text.
+#. if last_tag and last_indices:
+#. etf_file_dict[last_tag][last_indices].append (l)
+#. # do it
+#. staff-spec
+#. should use \addlyrics ?
+#. !@PYTHON@
+#. vim: set noexpandtab:
+#. This is was the idea for handling of comments:
+#. Multiline comments, @ignore .. @end ignore is scanned for
+#. in read_doc_file, and the chunks are marked as 'ignore', so
+#. lilypond-book will not touch them any more. The content of the
+#. chunks are written to the output file. Also 'include' and 'input'
+#. regex has to check if they are commented out.
+#.
+#. Then it is scanned for 'lilypond', 'lilypond-file' and 'lilypond-block'.
+#. These three regex's has to check if they are on a commented line,
+#. % for latex, @c for texinfo.
+#.
+#. Then lines that are commented out with % (latex) and @c (Texinfo)
+#. are put into chunks marked 'ignore'. This cannot be done before
+#. searching for the lilypond-blocks because % is also the comment character
+#. for lilypond.
+#.
+#. The the rest of the rexeces are searched for. They don't have to test
+#. if they are on a commented out line.
+#. ###############################################################
+#. Users of python modules should include this snippet
+#. and customize variables below.
+#. We'll suffer this path init stuff as long as we don't install our
+#. python packages in <prefix>/lib/pythonx.y (and don't kludge around
+#. it as we do with teTeX on Red Hat Linux: set some environment var
+#. (PYTHONPATH) in profile)
+#. If set, LILYPONDPREFIX must take prevalence
+#. if datadir is not set, we're doing a build and LILYPONDPREFIX
+#. Customize these
+#. if __name__ == '__main__':
+#. lilylib globals
+#. temp_dir = os.path.join (original_dir,  '%s.dir' % program_name)
+#. urg
+#. # FIXME
+#. # do -P or -p by default?
+#. #help_summary = _ ("Run LilyPond using LaTeX for titling")
+#: lilypond-book.py:120
+msgid "Process LilyPond snippets in hybrid html, LaTeX or texinfo document"
+msgstr "Prossoi LilyPond-osioita sekarakenteisessa html, LaTeX tai texinfo -dokumentissa"
 
-#. Bug in option parser: --output=foe is taken as an abbreviation
-#. for --output-format.
-#: lilypond-book.py:82 main.cc:126
+#. another bug in option parser: --output=foe is taken as an abbreviation
+#. for --output-format
+#: lilypond-book.py:125 main.cc:110
 msgid "EXT"
 msgstr "EXT"
 
-#: lilypond-book.py:82
+#: lilypond-book.py:125
 msgid "use output format EXT (texi [default], texi-html, latex, html)"
-msgstr ""
-"tulostusmuotona käytetään formaattia EXT (texi [oletus], texi-html, latex, "
-"html)"
+msgstr "tulostusmuotona käytetään formaattia EXT (texi [oletus], texi-html, latex, html)"
 
-#: lilypond-book.py:83
-msgid "FILTER"
-msgstr "FILTER"
+#: lilypond-book.py:126 lilypond-book.py:127 lilypond-book.py:129
+#: lilypond-book.py:130
+msgid "DIM"
+msgstr "DIM"
 
-#: lilypond-book.py:83
-msgid "pipe snippets through FILTER [convert-ly -n -]"
-msgstr "putkita palaset kohteen FILTER läpi [convert-ly -n -]"
+#: lilypond-book.py:126
+msgid "default fontsize for music.  DIM is assumed to be in points"
+msgstr "oletusfonttikoko musiikille.  DIM ilmoitetaan pisteinä"
 
-#: lilypond-book.py:85 lilypond-book.py:87 lilypond.py:112 main.cc:129
-msgid "DIR"
-msgstr "HAKEMISTO"
-
-#: lilypond-book.py:85
-msgid "add DIR to include path"
-msgstr "lisää HAKEMISTO hakupolkuun"
+#: lilypond-book.py:127
+msgid "deprecated, use --default-music-fontsize"
+msgstr "vanhentunut, käytä --default-music-fontsize"
 
-#: lilypond-book.py:86
-msgid "COMMAND"
-msgstr "KOMENTO"
+#: lilypond-book.py:128
+msgid "OPT"
+msgstr "OPT"
 
-#: lilypond-book.py:86
-msgid "process ly_files using COMMAND FILE..."
-msgstr "prosessoi ly_tiedostot käyttäen komentoa COMMAND FILE..."
+#: lilypond-book.py:128
+msgid "pass OPT quoted to the lilypond command line"
+msgstr "syötä OPT lainausmerkeissä lilypond-komentoriville"
 
-#: lilypond-book.py:87
-msgid "write output to DIR"
-msgstr "tulosta polkuun HAKEMISTO"
+#: lilypond-book.py:129
+msgid "force fontsize for all inline lilypond. DIM is assumed be to in points"
+msgstr "pakota fonttikoko kullekin LilyPond-osiolle. DIM oletetaan olevan pisteinä"
 
-#: lilypond-book.py:88 lilypond.py:130 midi2ly.py:105 mup2ly.py:78 main.cc:135
-msgid "be verbose"
-msgstr "tulosta runsaasti käsittelytietoa"
+#: lilypond-book.py:130
+msgid "deprecated, use --force-music-fontsize"
+msgstr "vanhentunut, käytä --force-music-fontsize"
 
-#: lilypond-book.py:89
-msgid "print version information"
-msgstr "tulosta versioinformaatio"
+#: lilypond-book.py:132 lilypond.py:130 main.cc:113 main.cc:118
+msgid "DIR"
+msgstr "DIR"
 
-#: lilypond-book.py:90 lilypond.py:132 midi2ly.py:107 mup2ly.py:80 main.cc:136
-msgid "show warranty and copyright"
-msgstr "näytä takuu ja copyright"
+#: lilypond-book.py:132
+msgid "include path"
+msgstr "sisällytä polku"
 
-#: lilypond-book.py:373
-#, python-format
-msgid "deprecated ly-option used: %s"
-msgstr "vanhentunut ly-optio käytössä: %s"
+#: lilypond-book.py:133
+msgid "write dependencies"
+msgstr "kirjoita riippuvuudet"
 
-#: lilypond-book.py:374
-#, python-format
-msgid "compatibility mode translation: %s"
-msgstr "yhteensopivuusmuodon käännös: %s"
+#: lilypond-book.py:134
+msgid "PREF"
+msgstr "PREF"
 
-#: lilypond-book.py:394
-#, python-format
-msgid "ignoring unknown ly option: %s"
-msgstr "sivuutetaan tuntematon ly -optio: %s"
+#: lilypond-book.py:134
+msgid "prepend PREF before each -M dependency"
+msgstr "laita PREF kunkin -M riippuvuuden eteen"
 
-#: lilypond-book.py:448
-msgid "file not found: %s"
-msgstr "tiedostoa %s ei löydy"
+#: lilypond-book.py:135
+msgid "don't run lilypond"
+msgstr "jätä suorittamatta lilypond"
 
-#: lilypond-book.py:750
-msgid "Opening filter `%s'"
-msgstr "Avataan filtteri `%s'"
+#: lilypond-book.py:136
+msgid "don't generate pictures"
+msgstr "jätä tuottamatta kuvat"
 
-#: lilypond-book.py:862
-msgid "cannot determine format for: %s"
-msgstr "ei löytynyt oletusfonttia: %s"
+#: lilypond-book.py:137
+msgid "strip all lilypond blocks from output"
+msgstr "riisu kaikki lilypond -osiot tulostuksesta"
 
-#: lilypond-book.py:903
-msgid "Output would overwrite input file; use --output."
-msgstr "Tuloste kirjautuisi syötetiedoston päälle; käytä --output."
+#: lilypond-book.py:138 lilypond-book.py:139 lilypond.py:135 lilypond.py:136
+#: midi2ly.py:102 main.cc:114 main.cc:117
+msgid "FILE"
+msgstr "TIEDOSTO"
 
-#: lilypond-book.py:910
-msgid "Reading %s..."
-msgstr "Luetaan %s..."
+#: lilypond-book.py:138
+msgid "filename main output file"
+msgstr "tiedostonimi päätulostustiedostolle"
 
-#: lilypond-book.py:924
-msgid "Dissecting..."
-msgstr "Analysoidaan..."
+#: lilypond-book.py:139
+msgid "where to place generated files"
+msgstr "tuotettujen tiedostojen sijoituspaikka"
 
-#: lilypond-book.py:952
-msgid "Writing snippets..."
-msgstr "Kirjoitetaan palasia..."
+#: lilypond-book.py:140 lilypond.py:137
+msgid "RES"
+msgstr "RES"
 
-#: lilypond-book.py:957
-msgid "Processing..."
-msgstr "Prosessoidaan..."
+#: lilypond-book.py:141 lilypond.py:138
+msgid "set the resolution of the preview to RES"
+msgstr "aseta esikatselulle tarkkuus RES"
 
-#: lilypond-book.py:960
-msgid "All snippets are up to date..."
-msgstr "Kaikki palaset on päivitetty"
+#: lilypond-book.py:142 lilypond.py:148 midi2ly.py:105 mup2ly.py:78 main.cc:126
+msgid "be verbose"
+msgstr "ole runsassanainen"
 
-#: lilypond-book.py:963
-msgid "Compiling %s..."
-msgstr "Kootaan %s..."
+#: lilypond-book.py:143
+msgid "print version information"
+msgstr "tulosta versioinformaatio"
 
-#: lilypond-book.py:971
-msgid "Processing include: %s"
-msgstr "Prosessoidaan sisällytetävä: %s"
+#: lilypond-book.py:144 lilypond.py:150 midi2ly.py:107 mup2ly.py:80 main.cc:127
+msgid "show warranty and copyright"
+msgstr "näytä takuu ja copyright"
 
-#: lilypond-book.py:987 lilypond.py:612 midi2ly.py:1017
+#. format specific strings, ie. regex-es for input, and % strings for output
+#. global variables
+#. lilypond_binary = 'valgrind --suppressions=/home/hanwen/usr/src/guile-1.6.supp  --num-callers=10 /home/hanwen/usr/src/lilypond/lily/out/lilypond'
+#. only use installed binary  when we're installed too.
+#. only use installed binary  when we're installed too.
+#. ###############################################################
+#. Dimension handling for LaTeX.
+#.
+#. Ugh.  (La)TeX writes progress and error messages on stdout
+#. Redirect to stderr
+#: lilypond-book.py:230
+msgid "LaTeX failed."
+msgstr "LaTeX epäonnistui."
+
+#. URG see lilypond
+#. Convert numeric values, with or without specific dimension, to floats.
+#. Keep other strings
+#. ###############################################################
+#. How to output various structures.
+#. # maybe <hr> ?
+#. Verbatim text is always finished with \n.  FIXME: For HTML,
+#. this newline should be removed.
+#. Verbatim text is always finished with \n.  FIXME: For HTML,
+#. this newline should be removed.
+#. # Ugh we need to differentiate on origin:
+#. # lilypond-block origin wants an extra <p>, but
+#. # inline music doesn't.
+#. # possibly other center options?
+#. verbatim text is always finished with \n
+#. verbatim text is always finished with \n
+#. verbatim text is always finished with \n
+#. verbatim text is always finished with \n
+#. do some tweaking: @ is needed in some ps stuff.
+#.
+#. ugh, the <p> below breaks inline images...
+#. clumsy workaround for python 2.2 pre bug.
+#. ###############################################################
+#. Recognize special sequences in the input
+#. Warning: This uses extended regular expressions.  Tread with care.
+#.
+#. legenda
+#.
+#. (?P<name>regex) -- assign result of REGEX to NAME
+#. *? -- match non-greedily.
+#. (?m) -- multiline regex: make ^ and $ match at each line
+#. (?s) -- make the dot match all characters including newline
+#. why do we have distinction between @mbinclude and @include?
+#. # we'd like to catch and reraise a more
+#. # detailed error, but alas, the exceptions
+#. # changed across the 1.5/2.1 boundary.
+#. ughUGH not original options
+#. First we want to scan the \documentclass line
+#. it should be the first non-comment line.
+#. The only thing we really need to know about the \documentclass line
+#. is if there are one or two columns to begin with.
+#. Then we add everything before \begin{document} to
+#. paperguru.m_document_preamble so that we can later write this header
+#. to a temporary file in find_latex_dims() to find textwidth.
+#. this is not bulletproof..., it checks the first 10 chunks
+#. newchunks.extend (func (m))
+#. python 1.5 compatible:
+#. we have to check for verbatim before doing include,
+#. because we don't want to include files that are mentioned
+#. inside a verbatim environment
+#. ugh fix input
+#. # Hmm, we should hash only lilypond source, and skip the
+#. # %options are ...
+#. # comment line
+#. # todo: include path, but strip
+#. # first part of the path.
+#. format == 'html'
+#. ugh rename
+#. Count sections/chapters.
+#. # TODO: do something like
+#. # this for texinfo/latex as well ?
+#. ugh
+#. fixme: be sys-independent.
+#.
+#. Ugh, fixing up dependencies for .tex generation
+#.
+#. Ugh.  (La)TeX writes progress and error messages on stdout
+#. Redirect to stderr
+#. # There used to be code to write .tex dependencies, but
+#. # that is silly: lilypond-book has its own dependency scheme
+#. # to ensure that all lily-XXX.tex files are there
+#. # TODO: put file name in front of texidoc.
+#. #
+#. # what's this? Docme --hwn
+#. #
+#. #docme: why global?
+#. Do It.
+#. should chmod -w
+#: lilypond-book.py:1557 lilypond.py:673 midi2ly.py:1018
 #, python-format
 msgid "getopt says: `%s'"
 msgstr "getopt sanoo: `%s'"
 
+#. HACK
+#. status = os.system ('lilypond -w')
+#: lilypond-book.py:1630 lilypond.py:777
+msgid "no files specified on command line"
+msgstr "tiedostoja ei määritelty komentorivillä"
+
+#.
+#. Petr, ik zou willen dat ik iets zinvoller deed,
+#. maar wat ik kan ik doen, het verandert toch niets?
+#. --hwn 20/aug/99
+#. !@PYTHON@
+#.
+#. lilypond.py -- Run LilyPond, add titles to bare score, generate printable
+#. document
+#. Invokes: lilypond, latex (or pdflatex), dvips, ps2pdf, gs
+#.
+#. source file of the GNU LilyPond music typesetter
+#.
+#. (c)  1998--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+#. Jan Nieuwenhuizen <janneke@gnu.org>
+#. This is the third incarnation of lilypond.
+#.
+#. Earlier incarnations of lilypond were written by
+#. Jeffrey B. Reed<daboys@austin.rr.com> (Python version)
+#. Jan Arne Fagertun <Jan.A.Fagertun@@energy.sintef.no> (Bourne shell script)
+#.
+#. Note: gettext work best if we use ' for docstrings and "
+#. for gettextable strings.
+#. --> DO NOT USE ''' for docstrings.
+#. ###############################################################
+#. Users of python modules should include this snippet
+#. and customize variables below.
+#. We'll suffer this path init stuff as long as we don't install our
+#. python packages in <prefix>/lib/pythonx.y (and don't kludge around
+#. it as we do with teTeX on Red Hat Linux: set some environment var
+#. (PYTHONPATH) in profile)
+#. If set, LILYPONDPREFIX must take prevalence
+#. if datadir is not set, we're doing a build and LILYPONDPREFIX
+#. Customize these
+#. if __name__ == '__main__':
+#. lilylib globals
 #. # FIXME
 #. # do -P or -p by default?
 #. #help_summary = _ ("Run LilyPond using LaTeX for titling")
-#: lilypond.py:103
-msgid "Run LilyPond, generate printable document."
-msgstr "Aja LilyPond, tuota tulostettava dokumentti."
+#: lilypond.py:121
+msgid "Run LilyPond, add titles, generate printable document."
+msgstr "Aja LilyPond, lisää otsikot, tuota tulostettava dokumentti."
 
-#: lilypond.py:109
+#: lilypond.py:127 main.cc:115
+msgid "write Makefile dependencies for every input file"
+msgstr "kirjoita Makefile -riippuvuudet kullekin tulostustiedostolle"
+
+#: lilypond.py:129
 msgid "print even more output"
 msgstr "kirjoita vieläpä enemmän tulostetta"
 
-#: lilypond.py:110 lilypond.py:117 midi2ly.py:102 main.cc:130 main.cc:132
-msgid "FILE"
-msgstr "TIEDOSTO"
-
-#: lilypond.py:110
-msgid "find pfa fonts used in FILE"
-msgstr "etsi pfa fontit joita käytettiin tiedostossa TIEDOSTO"
-
-#: lilypond.py:111
-msgid "make HTML file with links to all output"
-msgstr "tee HTML -tiedosto johon on linkitetty kaikki tulosteet"
-
-#: lilypond.py:112
+#: lilypond.py:130
 msgid "add DIR to LilyPond's search path"
-msgstr "lisää HAKEMISTO LilyPondin hakupolkuun"
+msgstr "lisää DIR LilyPondin hakupolkuun"
 
-#: lilypond.py:114
+#: lilypond.py:132
 #, python-format
 msgid "keep all output, output to directory %s.dir"
 msgstr "säilytä kaikki tulosteet, kirjoita hakemistoon %s.dir"
 
-#: lilypond.py:115
+#: lilypond.py:133
 msgid "don't run LilyPond"
 msgstr "jätä ajamatta LilyPond"
 
-#: lilypond.py:116 main.cc:131
+#: lilypond.py:134 main.cc:116
 msgid "produce MIDI output only"
 msgstr "tuota vain MIDI -tuloste"
 
-#: lilypond.py:117 midi2ly.py:102 mup2ly.py:76 main.cc:132
+#: lilypond.py:135 midi2ly.py:102
 msgid "write output to FILE"
 msgstr "tulosta tiedostoon TIEDOSTO"
 
-#: lilypond.py:118
-msgid "RES"
-msgstr "RES"
+#: lilypond.py:136
+msgid "find pfa fonts used in FILE"
+msgstr "etsi pfa fontit joita käytettiin tiedostossa TIEDOSTO"
 
-#: lilypond.py:119
-msgid "set the resolution of the preview to RES"
-msgstr "aseta esikatselulle tarkkuus RES"
+#: lilypond.py:139
+msgid "generate PostScript output"
+msgstr "tuota PostScript -tuloste"
 
-#: lilypond.py:120
-msgid "do not generate PDF output"
-msgstr "älä tuota PDF -tulostetta"
+#: lilypond.py:140
+msgid "generate PNG page images"
+msgstr "tuota PNG -kuvat sivuista"
 
-#: lilypond.py:121
-msgid "do not generate PostScript output"
-msgstr "älä tuota PostScript -tulostetta"
+#: lilypond.py:141
+msgid "generate PS.GZ"
+msgstr "tuota PS.GZ"
 
-#: lilypond.py:122
+#: lilypond.py:142
 msgid "generate PDF output"
 msgstr "tuota PDF -tuloste"
 
-#: lilypond.py:123
-msgid "generate PostScript output"
-msgstr "tuota PostScript -tuloste"
-
 # käytä pdflatex:ia tuottaaksesi PDF -tulosteen
-#: lilypond.py:124
-msgid "use pdflatex to generate PDF output"
+#: lilypond.py:143
+msgid "use pdflatex to generate PDF output"
 msgstr "käytä pdflatex:ia tuottaaksesi PDF -tulosteen"
 
-#: lilypond.py:125
-msgid "generate PNG page images"
-msgstr "tuota PNG -kuvat sivuista"
-
-#: lilypond.py:126
+#. FIXME: preview, picture; to indicate creation of a PNG?
+#: lilypond.py:145
 msgid "make a picture of the first system"
 msgstr "tee kuva ensimmäisestä kokonaisuudesta"
 
-#: lilypond.py:127
-msgid "generate PS.GZ"
-msgstr "tuota PS.GZ"
-
-#: lilypond.py:128
-msgid "run in safe-mode"
-msgstr "aja turvamoodissa"
+#: lilypond.py:146
+msgid "make HTML file with links to all output"
+msgstr "tee HTML -tiedosto johon on linkitetty kaikki tulosteet"
 
-#: lilypond.py:129
+#: lilypond.py:147
 msgid "KEY=VAL"
 msgstr "KEY=VAL"
 
-#: lilypond.py:129
+#: lilypond.py:147
 msgid "change global setting KEY to VAL"
 msgstr "vaihda globaali asetus KEY arvoksi VAL"
 
-#: lilypond.py:131 midi2ly.py:106 mup2ly.py:79 main.cc:134
+#: lilypond.py:149 midi2ly.py:106 mup2ly.py:79 main.cc:125
 msgid "print version number"
 msgstr "tulosta versionumero"
 
-#: lilypond.py:201
+#. other globals
+#. Pdftex support
+#. # yuk.
+#. lilypond_binary = 'valgrind --suppressions=%(home)s/usr/src/guile-1.6.supp --num-callers=10 %(home)s/usr/src/lilypond/lily/out/lilypond '% { 'home' : '/home/hanwen' }
+#. only use installed binary  when we're installed too.
+#. init to empty; values here take precedence over values in the file
+#. # TODO: change name.
+#. for geometry v3
+#. Output formats that lilypond should create
+#. what a name.
+#. ly.warning (_ ("invalid value: %s") % `val`)
+#. ly.warning (_ ("invalid value: %s") % `val`)
+#: lilypond.py:232
 #, python-format
 msgid "no such setting: `%s'"
 msgstr "asetusta ei löydy: `%s'"
 
-#: lilypond.py:245
+#. 2 == user interrupt.
+#: lilypond.py:274
 #, python-format
 msgid "LilyPond crashed (signal %d)."
 msgstr "LilyPond kaatui (signaali %d)."
 
-#: lilypond.py:246
+#: lilypond.py:275
 msgid "Please submit a bug report to bug-lilypond@gnu.org"
 msgstr "Ole hyvä ja lähetä virheraportti osoitteeseen bug-lilypond@gnu.org"
 
-#: lilypond.py:252
+#: lilypond.py:281
 #, python-format
 msgid "LilyPond failed on input file %s (exit status %d)"
 msgstr "LilyPond epäonnistui syöttötiedoston %s kohdalla (lopetustila %d)."
 
-#: lilypond.py:255
+#: lilypond.py:284
 #, python-format
 msgid "LilyPond failed on an input file (exit status %d)"
 msgstr "LilyPond epäonnistui syöttötiedoston kohdalla (lopetustila %d)."
 
-#: lilypond.py:256
+#: lilypond.py:285
 msgid "Continuing..."
 msgstr "Jatketaan..."
 
-#: lilypond.py:267
+#. urg
+#: lilypond.py:296
 #, python-format
 msgid "Analyzing %s..."
 msgstr "Analysoidaan %s..."
 
-#: lilypond.py:321
+#. search only the first 10k
+#: lilypond.py:354
 #, python-format
 msgid "no LilyPond output found for `%s'"
 msgstr "`%s' jäi ilman LilyPond -tulostetta"
 
-#: lilypond.py:462
+#. The final \n seems important here. It ensures that the footers and taglines end up on the right page.
+#. TODO: should set textheight (enlarge) depending on papersize.
+#: lilypond.py:397
+#, python-format
+msgid "invalid value: `%s'"
+msgstr "epäkelpo arvo: `%s'"
+
+#. set sane geometry width (a4-width) for linewidth = -1.
+#. who the hell is 597 ?
+#. Ugh.  (La)TeX writes progress and error messages on stdout
+#. Redirect to stderr
+#: lilypond.py:511
 msgid "LaTeX failed on the output file."
 msgstr "LaTeX epäonnistui tulostustiedossa."
 
-#: lilypond.py:507
+#. make a preview by rendering only the 1st line
+#. of each score
+#: lilypond.py:568
 msgid ""
 "Trying create PDF, but no PFA fonts found.\n"
 "Using bitmap fonts instead. This will look bad."
@@ -398,70 +828,113 @@ msgstr ""
 "Yritetään tuottaa PDF, mutta PFA fontteja ei löytynyt.\n"
 "Käytetään bittikarttafonttejan niiden sijasta. Tulos ei näytä hyvältä."
 
+#. ugh. Different targets?
+#. Added as functionality to lilypond, because lilypond may well need to do this
+#. in future too.
 #. no ps header?
-#: lilypond.py:554
+#: lilypond.py:615
 #, python-format
 msgid "not a PostScript file: `%s'"
 msgstr "ei ole PostScript-tiedosto: `%s'"
 
-#: lilypond.py:599
+#. todo
+#: lilypond.py:660
 #, python-format
 msgid "Writing HTML menu `%s'"
 msgstr "Kirjoitetan HTML-valikko `%s'..."
 
-#: lilypond.py:717
+#. signal programming error
+#. Don't convert input files to abspath, rather prepend '.' to include
+#. path.
+#. As a neat trick, add directory part of first input file
+#. to include path.  That way you can do without the clumsy -I in:
+#. lilypond -I foe/bar/baz foo/bar/baz/baz.ly
+#: lilypond.py:769
 msgid "pseudo filter"
 msgstr "valefiltteri"
 
-#: lilypond.py:720
+#: lilypond.py:772
 msgid "pseudo filter only for single input file"
 msgstr "valefiltteroi ain yksi tulostetiedosto"
 
-#: lilypond.py:725
-msgid "no files specified on command line"
-msgstr "tiedostoja ei määritelty komentorivillä"
-
-#: lilypond.py:757
+#. Ugh, maybe make a setup () function
+#. hmmm. Wish I'd 've written comments when I wrote this.
+#. now it looks complicated.
+#: lilypond.py:806
 #, python-format
 msgid "filename should not contain spaces: `%s'"
 msgstr "tiedostoniemessä ei saa olla välilyöntejä: `%s'"
 
-#: lilypond.py:797
+#. to be sure, add tmpdir *in front* of inclusion path.
+#. os.environ['TEXINPUTS'] =  tmpdir + ':' + os.environ['TEXINPUTS']
+#. We catch all exceptions, because we need to do stuff at exit:
+#. * copy any successfully generated stuff from tempdir and
+#. notify user of that
+#. * cleanout tempdir
+#. ## ARGH. This also catches python programming errors.
+#. ## this should only catch lilypond nonzero exit  status
+#. ## --hwn
+#. TODO: friendly message about LilyPond setup/failing?
+#.
+#: lilypond.py:845
 msgid "Running LilyPond failed. Rerun with --verbose for a trace."
-msgstr ""
-"LilyPond -ajo epäonnistui. Aja uudelleen lisäten --verbose jäljitystä varten."
-
-#: lilypond.py:838
+msgstr "LilyPond -ajo epäonnistui. Aja uudelleen lisäten --verbose jäljitystä varten."
+
+#. Our LilyPond pseudo filter always outputs to 'lelie'
+#. have subsequent stages and use 'lelie' output.
+#. unless: add --tex, or --latex?
+#. TODO: friendly message about TeX/LaTeX setup,
+#. trying to run tex/latex by hand
+#: lilypond.py:886
 msgid "Failed to make PS file. Rerun with --verbose for a trace."
-msgstr ""
-"PS -tiedoston tuotto epäonnistui. Aja uudelleen lisäten --verbose "
-"jäljitystä varten."
+msgstr "Epäonnistui PS -tiedoston tuottamisessa. Aja uudelleen lisäten --verbose jäljitystä varten."
 
-#: lilypond.py:868
-msgid "Running LaTeX failed. Rerun with --verbose for a trace."
-msgstr ""
-"LaTeX -ajo epäonnistui. Aja uudelleen lisäten --verbose jäljitystä varten."
+#. unless: add --tex, or --latex?
+#. TODO: friendly message about TeX/LaTeX setup,
+#. trying to run tex/latex by hand
+#: lilypond.py:916
+msgid "Running LaTeX falied. Rerun with --verbose for a trace."
+msgstr "LaTeX -ajo epäonnistui. Aja uudelleen lisäten --verbose jäljitystä varten."
 
-#: lilypond.py:882
+#. add DEP to targets?
+#: lilypond.py:926 input-file-results.cc:68
+#, c-format, python-format
+msgid "dependencies output to `%s'..."
+msgstr "riippuvuuksien tulosteet paikkaan `%s'"
+
+#: lilypond.py:937
 #, python-format
 msgid "%s output to <stdout>..."
 msgstr "%s -tuloste paikkaan <stdout>..."
 
-#: lilypond.py:887 includable-lexer.cc:57 kpath.cc:134 lily-guile.cc:86
-#: my-lily-parser.cc:235
+#: lilypond.py:942 lilypond.py:968 includable-lexer.cc:57
+#: input-file-results.cc:191 input-file-results.cc:197 lily-guile.cc:86
 #, c-format, python-format
 msgid "can't find file: `%s'"
 msgstr "tiedostoa ei löydy: `%s'"
 
-#: lilypond.py:910
+#. Hmm, if this were a function, we could call it the except: clauses
+#: lilypond.py:965
 #, python-format
 msgid "%s output to %s..."
 msgstr "%s -tuloste paikkaan %s..."
 
-#: lilypond.py:913
-msgid "can't find file: `%s.%s'"
-msgstr "tiedostoa ei löydy: `%s'"
-
+#. !@PYTHON@
+#.
+#. midi2ly.py -- LilyPond midi import script
+#.
+#. source file of the GNU LilyPond music typesetter
+#.
+#. (c)  1998--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+#. Jan Nieuwenhuizen <janneke@gnu.org>
+#. ###############################################################
+#. Users of python modules should include this snippet.
+#.
+#. This soon to be removed for: import lilypond.lilylib as ly
+#. ###############################################################
+#. ###############################################################
+#. ############### CONSTANTS
+#. ###############################################################
 #. temp_dir = os.path.join (original_dir,  '%s.dir' % program_name)
 #. original_dir = os.getcwd ()
 #. keep_temp_dir_p = 0
@@ -511,37 +984,105 @@ msgstr "salli tupletti -pituudet PIT*OSOITTAJA/NIMITT
 msgid "treat every text as a lyric"
 msgstr "käsittele kaikki tekstit lyriikkana"
 
-#: midi2ly.py:149 mup2ly.py:143 input.cc:88
-msgid "warning: "
-msgstr "varoitus: "
+#: midi2ly.py:136 mup2ly.py:130
+msgid " 2001--2003"
+msgstr " 2001--2003"
 
-#: midi2ly.py:164 midi2ly.py:1017 midi2ly.py:1082 mup2ly.py:146 mup2ly.py:160
-#: input.cc:93
-msgid "error: "
-msgstr "virhe: "
+#: midi2ly.py:141 mup2ly.py:135
+msgid ""
+"\n"
+"Distributed under terms of the GNU General Public License. It comes with\n"
+"NO WARRANTY."
+msgstr ""
+"\n"
+"Levitetään ehdolla GNU General Public License\n"
+"ja ilman TAKUUTA."
 
-#: midi2ly.py:165 mup2ly.py:161
+#: midi2ly.py:166 mup2ly.py:162
 msgid "Exiting ... "
 msgstr "Lopettaa ... "
 
-#: midi2ly.py:263 mup2ly.py:260
+#: midi2ly.py:264 mup2ly.py:261
 #, python-format
 msgid "command exited with value %d"
 msgstr "komento lopetettiin tilassa %d"
 
-#: midi2ly.py:1001
+#. ###############################################################
+#. END Library
+#. ###############################################################
+#. hmm
+#. major scale: do-do
+#. minor scale: la-la  (= + 5) '''
+#. By tradition, all scales now consist of a sequence
+#. of 7 notes each with a distinct name, from amongst
+#. a b c d e f g.  But, minor scales have a wide
+#. second interval at the top - the 'leading note' is
+#. sharped. (Why? it just works that way! Anything
+#. else doesn't sound as good and isn't as flexible at
+#. saying things. In medieval times, scales only had 6
+#. notes to avoid this problem - the hexachords.)
+#. So, the d minor scale is d e f g a b-flat c-sharp d
+#. - using d-flat for the leading note would skip the
+#. name c and duplicate the name d.  Why isn't c-sharp
+#. put in the key signature? Tradition. (It's also
+#. supposedly based on the Pythagorean theory of the
+#. cycle of fifths, but that really only applies to
+#. major scales...)  Anyway, g minor is g a b-flat c d
+#. e-flat f-sharp g, and all the other flat minor keys
+#. end up with a natural leading note. And there you
+#. have it.
+#. John Sankey <bf250@freenet.carleton.ca>
+#.
+#. Let's also do a-minor: a b c d e f gis a
+#.
+#. --jcn
+#. as -> gis
+#. des -> cis
+#. ges -> fis
+#. g -> fisis
+#. d -> cisis
+#. a -> gisis
+#. b -> ces
+#. e -> fes
+#. f -> eis
+#. c -> bis
+#. # FIXME: compile fix --jcn
+#. TODO: move space
+#. fis cis gis dis ais eis bis
+#. bes es as des ges ces fes
+#. urg, we should be sure that we're in a lyrics staff
+#. all include ALL_NOTES_OFF
+#. ugh, must set key while parsing
+#. because Note init uses key
+#. Better do Note.calc () at dump time?
+#. last_lyric.clocks = t - last_time
+#. hmm
+#. urg, this will barf at meter changes
+#. urg LilyPond doesn't start at c4, but
+#. remembers from previous tracks!
+#. reference_note = Note (clocks_per_4, 4*12, 0)
+#. must be in \notes mode for parsing \skip
+#: midi2ly.py:1002
 #, python-format
 msgid "%s output to `%s'..."
 msgstr "%s -tuloste paikkaan `%s'..."
 
-#: midi2ly.py:1032
+#: midi2ly.py:1033
 msgid "Example:"
 msgstr "Esimerkki:"
 
-#: midi2ly.py:1082
+#: midi2ly.py:1083
 msgid "no files specified on command line."
 msgstr "tiedostoja ei annettu komentorivillä."
 
+#. !@PYTHON@
+#. mup2ly.py -- mup input converter
+#.
+#. source file of the GNU LilyPond music typesetter
+#.
+#. (c) 2001
+#. if set, LILYPONDPREFIX must take prevalence
+#. if datadir is not set, we're doing a build and LILYPONDPREFIX
 #: mup2ly.py:70
 msgid "Convert mup to LilyPond source."
 msgstr "Muunna mup LilyPond-muotoon."
@@ -558,17 +1099,80 @@ msgstr "m
 msgid "only pre-process"
 msgstr "vain esiprosessointi"
 
-#: mup2ly.py:1075
+#. Duh.  Python style portable: cp *.EXT OUTDIR
+#. system ('cp *.%s %s' % (ext, outdir), 1)
+#. Python < 1.5.2 compatibility
+#.
+#. On most platforms, this is equivalent to
+#. `normpath(join(os.getcwd()), PATH)'.  *Added in Python version 1.5.2*
+#. if set, LILYPONDPREFIX must take prevalence
+#. if datadir is not set, we're doing a build and LILYPONDPREFIX
+#. ###############################################################
+#. END Library
+#.
+#. PMX cut and paste
+#.
+#. if not self.entries:
+#. #return '\n'
+#. #ugh ugh
+#. return '\n%s = {}\n\n' % self.idstring ()
+#. ugh
+#. def set_clef (self, letter):
+#. clstr = clef_table[letter]
+#. self.voices[0].add_nonchord (Clef (clstr))
+#. urg
+#. maybe use import copy?
+#. for i in self.pitches:
+#. ch.pitches.append (i)
+#. for i in self.scripts:
+#. ch.scripts.append (i)
+#. http://www.arkkra.com/doc/uguide/contexts.html
+#. #self.current_staffs = []
+#. duh
+#. FIXME: 1?
+#. FIXME: does key play any role in this?
+#. ch = self.current_voices[0].last_chord ()
+#. ch.basic_duration = self.current_voices[0].last_chord ().basic_duration
+#. ugh
+#. ch = self.current_voices[0].last_chord ()
+#. `;' is not a separator, chords end with ';'
+#. mup resets default duration and pitch each bar
+#. ugh: these (and lots more) should also be parsed in
+#. context staff.  we should have a class Staff_properties
+#. and parse/set all those.
+#. shortcut: set to official mup maximum (duh)
+#. self.set_staffs (40)
+#: mup2ly.py:1076
 #, python-format
 msgid "no such context: %s"
 msgstr "kontekstia ei ole: %s"
 
-#: mup2ly.py:1299
+#. hmm
+#. dig this: mup allows ifdefs inside macro bodies
+#. don't do nested multi-line defines
+#. duh: mup is strictly line-based, except for `define',
+#. which is `@' terminated and may span several lines
+#. don't define new macros in unactive areas
+#. To support nested multi-line define's
+#. process_function and macro_name, macro_body
+#. should become lists (stacks)
+#. The mup manual is undetermined on this
+#. and I haven't seen examples doing it.
+#.
+#. don't do nested multi-line define's
+#. writes to stdout for help2man
+#. don't call
+#. identify ()
+#. sys.stdout.flush ()
+#. handy emacs testing
+#. if not files:
+#. files = ['template.mup']
+#: mup2ly.py:1300
 #, python-format
 msgid "Processing `%s'..."
 msgstr "Prosessoidaan `%s'..."
 
-#: mup2ly.py:1318
+#: mup2ly.py:1319
 #, python-format
 msgid "Writing `%s'..."
 msgstr "Kirjoitetaan `%s'..."
@@ -593,39 +1197,61 @@ msgstr "tunnistamaton optio: `%s'"
 msgid "invalid argument `%s' to option `%s'"
 msgstr "epäkelpo argumentti `%s' optiolle `%s'"
 
+#: warn.cc:25
+#, c-format
+msgid "warning: %s\n"
+msgstr "varoitus: %s\n"
+
+#: warn.cc:31
+#, c-format
+msgid "error: %s\n"
+msgstr "virhe: %s\n"
+
 #: warn.cc:44
-msgid "programming error: %s"
-msgstr "ohjelmointivirhe: %s"
+#, c-format
+msgid "programming error: %s (Continuing; cross thumbs)\n"
+msgstr "ohjelmointivirhe: %s (jatketaan; risti kädet)\n"
 
-#: warn.cc:45
-msgid "Continuing; crossing fingers"
-msgstr "Jatketaan; ristitään kädet"
+#: accidental.cc:202 key-signature-interface.cc:137
+#, c-format
+msgid "accidental `%s' not found"
+msgstr "korotusmerkkiä `%s' ei löydy"
 
-#: accidental-engraver.cc:167
+#: accidental-engraver.cc:171 new-accidental-engraver.cc:238
 #, c-format
 msgid "Accidental typesetting list must begin with context-name: %s"
 msgstr "Korotusmerkkien ladontalista täytyy alkaa konteksti-nimellä: %s"
 
-#: accidental-engraver.cc:194
+#: accidental-engraver.cc:196 new-accidental-engraver.cc:263
 #, c-format
-msgid "ignoring unknown accidental: %s"
-msgstr "sivutetaan tuntematan etumerkki: %s"
+msgid "unknown accidental typesetting: %s. Ignored"
+msgstr "tuntematan kortusmerkkien ladonta: %s. Sivuutetaan"
 
-#: accidental-engraver.cc:211
-msgid "Accidental rule must be pair or context-name; Found %s"
+#: accidental-engraver.cc:212 new-accidental-engraver.cc:279
+#, c-format
+msgid "Symbol is not a parent context: %s. Ignored"
+msgstr "Symboli ei ole yläkonteksti: %s. Sivuutetaan"
+
+#: accidental-engraver.cc:215 new-accidental-engraver.cc:282
+#, c-format
+msgid "Accidental typesetting must be pair or context-name: %s"
 msgstr "Korotusmerkkien ladonta täytyy olla pari tai konteksti-nimi: %s"
 
-#: accidental.cc:219 key-signature-interface.cc:139
+#: afm.cc:66
 #, c-format
-msgid "accidental `%s' not found"
-msgstr "korotusmerkkiä `%s' ei löydy"
+msgid "can't find character number: %d"
+msgstr "ei löytynyt merkkiä: %d"
+
+#: afm.cc:81
+#, c-format
+msgid "can't find character called: `%s'"
+msgstr "ei löytynyt merkkiä nimeltä: `%s'"
 
-#: afm.cc:144
+#: afm.cc:142
 #, c-format
 msgid "Error parsing AFM file: `%s'"
 msgstr "Virhe jäsennettäessä AFM-tiedostoa: `%s'"
 
-#. FIXME: broken sentence
 #: all-font-metrics.cc:95
 #, c-format
 msgid "checksum mismatch for font file: `%s'"
@@ -636,86 +1262,84 @@ msgstr "virhesumma ei t
 msgid "does not match: `%s'"
 msgstr "ei täsmää: `%s'"
 
-#: all-font-metrics.cc:103
-msgid "Rebuild all .afm files, and remove all .pk and .tfm files."
-msgstr ""
-"Uudista kaikki .afm -tiedosto, ja poista kaikki .pk ja .tfm -tiedostot."
-
-#: all-font-metrics.cc:105
-msgid "Rerun with -V to show font paths."
-msgstr "Aja uudelleen lisäten -V nähdäksesi fonttipolut."
+#: all-font-metrics.cc:102
+msgid " Rebuild all .afm files, and remove all .pk and .tfm files.  Rerun with -V to show font paths."
+msgstr " Uudista kaikki .afm -tiedosto, ja poista kaikki .pk ja .tfm -tiedostot.  Aja uudelleen lisäten -V nähdäksesi fonttipolut."
 
-#: all-font-metrics.cc:107
-msgid "A script for removing font-files is delivered with the source-code:"
+#: all-font-metrics.cc:103
+msgid ""
+"A script for removing font-files is delivered with the source-code,\n"
+"in buildscripts/clean-fonts.sh"
 msgstr ""
-"Skripti fonttitiedostojen poistamista varten toimitetaan lähdekoodin "
-"mukana:"
+"Skripti fonttitiedostojen poistamista varten toimitetaan lähde-koodin mukaan,\n"
+"tiedostossa buildscripts/clean-fonts.sh"
 
-#: all-font-metrics.cc:184
+#: all-font-metrics.cc:169
 #, c-format
 msgid "can't find font: `%s'"
 msgstr "ei löytynyt fonttia: `%s'"
 
-#: all-font-metrics.cc:185
+#: all-font-metrics.cc:170
 msgid "Loading default font"
 msgstr "Ladataan oletusfontti"
 
-#: all-font-metrics.cc:200
+#: all-font-metrics.cc:185
 #, c-format
 msgid "can't find default font: `%s'"
 msgstr "ei löytynyt oletusfonttia: `%s'"
 
-#: all-font-metrics.cc:201 includable-lexer.cc:59 my-lily-parser.cc:229
+#: all-font-metrics.cc:186 includable-lexer.cc:59 input-file-results.cc:192
 #, c-format
 msgid "(search path: `%s')"
 msgstr "(hakupolku: `%s')"
 
-#: all-font-metrics.cc:202
+#: all-font-metrics.cc:187
 msgid "Giving up"
 msgstr "Luovutetaan"
 
-#: auto-change-iterator.cc:62 change-iterator.cc:61
+#: auto-change-iterator.cc:43 change-iterator.cc:60
+#: part-combine-music-iterator.cc:120
 msgid "Can't switch translators, I'm there already"
-msgstr "Ei voitu muuttaa kääntäjää, sellainen on jo valittuna"
+msgstr "Ei voitu muuttaa kääntää, on jo valittuna"
 
-#: bar-check-iterator.cc:68
+#: bar-check-iterator.cc:51
 #, c-format
 msgid "barcheck failed at: %s"
 msgstr "tahtiviivan tarkistus epäonnistui kohdassa: %s"
 
-#: beam-engraver.cc:139
+#: beam.cc:146
+msgid "beam has less than two visible stems"
+msgstr "palkissa on vähemmän kuin kaksi pystyviivaa"
+
+#: beam.cc:151
+msgid "Beam has less than two stems. Removing beam."
+msgstr "Palkissa on vähemmän kuin kaksi pystyviivaa. Poistetaan palkki."
+
+#: beam.cc:976
+msgid "Not sure that we can find a nice beam slope (no viable initial configuration found)."
+msgstr "Ei ole varma löydetäänko sopivaa palkin kaltevuutta (ei löytynyt toimivaa alkuasetusta)"
+
+#: beam-engraver.cc:176
 msgid "already have a beam"
 msgstr "palkki löytyi jo"
 
-#: beam-engraver.cc:212
+#: beam-engraver.cc:259
 msgid "unterminated beam"
 msgstr "päättymätön palkki"
 
-#: beam-engraver.cc:245 chord-tremolo-engraver.cc:179
+#: beam-engraver.cc:292 chord-tremolo-engraver.cc:197
 msgid "stem must have Rhythmic structure"
 msgstr "varrella on oltava Rhytmic -rakenne"
 
-#: beam-engraver.cc:259
+#: beam-engraver.cc:306
 msgid "stem doesn't fit in beam"
 msgstr "varsi ei sovi palkkiin"
 
-#: beam-engraver.cc:260
+#: beam-engraver.cc:307
 msgid "beam was started here"
 msgstr "palkki aloitettiin täältä"
 
-#: beam.cc:151
-msgid "beam has less than two visible stems"
-msgstr "palkissa on vähemmän kuin kaksi näkyvää pystyviivaa"
-
-#: beam.cc:156
-msgid "removing beam with less than two stems"
-msgstr "poistetaan palkki jolla olisi vähemmän kuin kaksi pystyviivaa"
-
-#: beam.cc:1040
-msgid "no viable initial configuration found: may not find good beam slope"
-msgstr "toimivaa alkuasettelua ei löytynyt: hyvää palkkikaltevuuta ei löytyne"
-
-#: break-align-interface.cc:214
+#: break-align-interface.cc:173
 #, c-format
 msgid "No spacing entry from %s to `%s'"
 msgstr "Ei välistyksen syöttöä paikasta %s paikkaan `%s'"
@@ -729,35 +1353,35 @@ msgstr "ei voitu vaihtaa `%s' tilalle `%s'"
 #. We could change the current translator's id, but that would make
 #. errors hard to catch
 #.
-#. last->translator_id_string ()  = get_change ()->change_to_id_string ();
+#. last->translator_id_string_  = get_change ()->change_to_id_string_;
 #.
-#: change-iterator.cc:93
+#: change-iterator.cc:79
 msgid "I'm one myself"
 msgstr "Olen yksinäni"
 
-#: change-iterator.cc:96
+#: change-iterator.cc:82
 msgid "none of these in my family"
 msgstr "ei yksikään näistä perheessäni"
 
-#: chord-tremolo-engraver.cc:100
+#: chord-tremolo-engraver.cc:98
 #, c-format
 msgid "Chord tremolo with %d elements. Must have two elements."
 msgstr "Sointutremolo %d:lla elementillä. Täytyy olla kaksi elementtiä."
 
-#: chord-tremolo-engraver.cc:141
+#: chord-tremolo-engraver.cc:157
 msgid "unterminated chord tremolo"
 msgstr "päättymätön sointutremolo"
 
-#: chord-tremolo-iterator.cc:64
+#: chord-tremolo-iterator.cc:69
 msgid "no one to print a tremolos"
-msgstr "tremoloa ei voitu tulostaa"
+msgstr "ei ketään joka voisi tulostaan tremolon"
 
 #: clef.cc:64
 #, c-format
 msgid "clef `%s' not found"
 msgstr "avainta `%s' ei löydy"
 
-#: cluster.cc:123
+#: cluster.cc:131
 #, c-format
 msgid "unknown cluster style `%s'"
 msgstr "tuntematon klusterityyli: `%s'"
@@ -775,28 +1399,9 @@ msgstr "et
 #: coherent-ligature-engraver.cc:139
 #, c-format
 msgid "Coherent_ligature_engraver: setting `spacing-increment = 0.01': ptr=%ul"
-msgstr ""
-"Coherent_ligature_engraver: asetetaan `spacing-increment = 0.01': ptr=%ul"
-
-#: context-def.cc:115
-msgid "Program has no such type: `%s'"
-msgstr "Ohjelmalla ei ole sellaista tyyppiä: `%s'"
+msgstr "Coherent_ligature_engraver: asetetaan `spacing-increment = 0.01': ptr=%ul"
 
-#: context-def.cc:316
-#, c-format
-msgid "can't find: `%s'"
-msgstr "ei löytynyt `%s'"
-
-#: context.cc:164
-msgid "Cannot find or create `%s' called `%s'"
-msgstr "ei löydetty tai ei luotu `%s' nimeltä `%s'"
-
-#: context.cc:201
-#, c-format
-msgid "can't find or create: `%s'"
-msgstr "ei löydetty tai ei luotu: `%s'"
-
-#: custos.cc:85
+#: custos.cc:92
 #, c-format
 msgid "custos `%s' not found"
 msgstr "custos `%s' ei löytynyt"
@@ -805,64 +1410,62 @@ msgstr "custos `%s' ei l
 msgid "NaN"
 msgstr "NaN"
 
-#: dynamic-engraver.cc:183 span-dynamic-performer.cc:86
+#: dynamic-engraver.cc:204 span-dynamic-performer.cc:82
 msgid "can't find start of (de)crescendo"
 msgstr "ei löytynyt alkua (de)crescendolle"
 
-#: dynamic-engraver.cc:193
-msgid "already have a decrescendo"
-msgstr "decresendo jo käytössä"
-
-#: dynamic-engraver.cc:195
+#: dynamic-engraver.cc:216
 msgid "already have a crescendo"
 msgstr "crescendo jo käytössä"
 
-#: dynamic-engraver.cc:198
+#: dynamic-engraver.cc:217
+msgid "already have a decrescendo"
+msgstr "decresendo jo käytössä"
+
+#: dynamic-engraver.cc:220
 msgid "Cresc started here"
 msgstr "Cresc aloitettiin tästä"
 
-#: dynamic-engraver.cc:305
+#: dynamic-engraver.cc:323
 msgid "unterminated (de)crescendo"
 msgstr "päätymätön (de)crescendo"
 
-#: event-chord-iterator.cc:56 output-property-music-iterator.cc:29
-#, c-format
-msgid "Junking event: `%s'"
-msgstr "Hylätään tapahtuma: `%s'"
-
 #: event.cc:49
 #, c-format
 msgid "Transposition by %s makes alteration larger than two"
 msgstr "Transponointi %s tekee muutokset suuremmaksi kuin kaksi"
 
-#: event.cc:72
+#: event-chord-iterator.cc:76 output-property-music-iterator.cc:27
 #, c-format
-msgid "octave check failed; expected %s, found: %s"
-msgstr "oktaavitarkistus epäonnistua; oletetttin %s, löydettiin: %s"
+msgid "Junking event: `%s'"
+msgstr "Hylätään tapahtuma: `%s'"
 
-#: extender-engraver.cc:143 extender-engraver.cc:153
+#: extender-engraver.cc:94
 msgid "unterminated extender"
 msgstr "päättymätön pidennys"
 
-#: folded-repeat-iterator.cc:65
+#: extender-engraver.cc:106
+msgid "Nothing to connect extender to on the left.  Ignoring extender event."
+msgstr "Pidennystä ei voitu liittää vasemmalle.  Hylätään pidennystapahtuma.\""
+
+#: folded-repeat-iterator.cc:88
 msgid "no one to print a repeat brace"
 msgstr "kukaan ei voinut tulostaa toistoa"
 
-#: glissando-engraver.cc:102
+#: font-interface.cc:239
+msgid "couldn't find any font satisfying "
+msgstr "mikään fontti ei tuottanut toivottua tulosta"
+
+#: glissando-engraver.cc:100
 msgid "Unterminated glissando."
 msgstr "Päättymätön glissando."
 
-#: global-context.cc:151
-#, c-format
-msgid "can't find `%s' context"
-msgstr "ei löytynyt kontekstia `%s'"
-
-#: gourlay-breaking.cc:195
+#: gourlay-breaking.cc:188
 #, c-format
 msgid "Optimal demerits: %f"
 msgstr "Optimaalinen heikennys: %f"
 
-#: gourlay-breaking.cc:200
+#: gourlay-breaking.cc:193
 msgid "No feasible line breaking found"
 msgstr "Ei löytynyt sopivaa viivan katkaisukohtaa"
 
@@ -876,14 +1479,18 @@ msgstr "\\%s sivuutettiin"
 msgid "implied \\%s added"
 msgstr "lisättiin vihjattu \\%s"
 
-#: grob-interface.cc:73
-msgid "Unknown interface `%s'"
-msgstr "tuntematon klusterityyli: `%s'"
-
-#: grob-interface.cc:84
+#.
+#. Todo: do something sensible. The grob-pq-engraver is not water
+#. tight, and stuff like tupletSpannerDuration confuses it.
+#.
+#: grob-pq-engraver.cc:130
 #, c-format
-msgid "Grob `%s' has no interface for property `%s'"
-msgstr "Ladokkeella `%s' ei ole rajapintaa ominaisuudella `%s'"
+msgid ""
+"Skipped something?\n"
+"Grob %s ended before I expected it to end."
+msgstr ""
+"Jotain ohitettiin?\n"
+"Piirto %s loppui ennen kuin sen oletettiin loppuvan."
 
 #: hairpin.cc:98
 msgid "decrescendo too small"
@@ -893,71 +1500,78 @@ msgstr "liian lyhyt decrescendo"
 msgid "crescendo too small"
 msgstr "liian lyhyt crescendo"
 
-#: horizontal-bracket-engraver.cc:57
+#: horizontal-bracket-engraver.cc:64
 msgid "Don't have that many brackets."
 msgstr "Ei ole käytössä niin monia sulkeita."
 
-#: horizontal-bracket-engraver.cc:66
+#: horizontal-bracket-engraver.cc:73
 msgid "Conflicting note group events."
 msgstr "Ristiriitainen nuottiryhmä -tapaus."
 
-#: hyphen-engraver.cc:96
-msgid "removing unterminated hyphen"
-msgstr "päättymätön tavuviiva"
-
-#: hyphen-engraver.cc:110
-msgid "unterminated hyphen; removing"
+#: hyphen-engraver.cc:87
+msgid "unterminated hyphen"
 msgstr "päättymätön tavuviiva"
 
-#: includable-lexer.cc:50
-msgid "include files are not allowed"
-msgstr "sisällytettävät tiedostot eivät ole sallittuja"
+#: hyphen-engraver.cc:99
+msgid "Nothing to connect hyphen to on the left.  Ignoring hyphen event."
+msgstr "Mitään ei voitu liittää tavuviivan vasemmalle puolelle.  Sivutetaan tavutus."
 
 #: input.cc:99
 msgid "non fatal error: "
 msgstr "ei-keskeyttävä virhe:"
 
-#: input.cc:107 source-file.cc:141 source-file.cc:234
+#: input.cc:107 source-file.cc:146 source-file.cc:239
 msgid "position unknown"
 msgstr "sijainti tuntematon:"
 
-#: key-performer.cc:90
+#: input-file-results.cc:72 source-file.cc:54 streams.cc:38
+#, c-format
+msgid "can't open file: `%s'"
+msgstr "tiedostoa ei voitu avata: `%s'"
+
+#: input-file-results.cc:132
+msgid "Score contains errors; will not process it"
+msgstr "Viivastossa on virheitä; sitä ei prosessoida"
+
+#: input-file-results.cc:172
+#, c-format
+msgid "Now processing: `%s'"
+msgstr "Prosessoidaan: `%s'"
+
+#: key-performer.cc:96
 msgid "FIXME: key change merge"
 msgstr "KORJATTAVA: sävellajin vaihdon sulautuma"
 
-#: kpath.cc:83
-msgid "kpathsea can not find TFM file: `%s'"
-msgstr "Kpathsea ei löytänyt TFM-tiedostoa `%s'"
-
-#: kpath.cc:129
-msgid "kpathsea can not find file: `%s'"
+#: kpath.cc:76
+#, c-format
+msgid "Kpathsea couldn't find TFM file `%s'"
 msgstr "Kpathsea ei löytänyt TFM-tiedostoa `%s'"
 
-#: ligature-engraver.cc:152
+#: ligature-engraver.cc:159
 msgid "can't find start of ligature"
 msgstr "ei löytynyt alkua ligature:lle"
 
-#: ligature-engraver.cc:158
+#: ligature-engraver.cc:165
 msgid "no right bound"
 msgstr "ei oikeata reunaa"
 
-#: ligature-engraver.cc:184
+#: ligature-engraver.cc:191
 msgid "already have a ligature"
 msgstr "ligature löytyi jo"
 
-#: ligature-engraver.cc:200
+#: ligature-engraver.cc:207
 msgid "no left bound"
 msgstr "ei vasenta reunaa"
 
-#: ligature-engraver.cc:255
+#: ligature-engraver.cc:258
 msgid "unterminated ligature"
 msgstr "päättymätön ligature"
 
-#: ligature-engraver.cc:279
-msgid "ignoring rest: ligature may not contain rest"
+#: ligature-engraver.cc:282
+msgid "ligature may not contain rest; ignoring rest"
 msgstr "ligature ei voi sisältää taukoa; sivuutetaan tauko"
 
-#: ligature-engraver.cc:280
+#: ligature-engraver.cc:283
 msgid "ligature was started here"
 msgstr "ligature alkoi tästä"
 
@@ -966,146 +1580,168 @@ msgstr "ligature alkoi t
 msgid "(load path: `%s')"
 msgstr "(hakupolku: `%s')"
 
-#: lily-guile.cc:549
+#: lily-guile.cc:576
 #, c-format
 msgid "Can't find property type-check for `%s' (%s)."
 msgstr "Ei löytynyt tyyppitarkistusta ominaisuudelle `%s' (%s)."
 
-#: lily-guile.cc:552
+#: lily-guile.cc:579
 msgid "Perhaps you made a typing error?"
-msgstr "Olet tainnut tehdä näppäilyvirheen?"
+msgstr "Tekinet näppäilyvirheen?"
 
-#: lily-guile.cc:558
+#: lily-guile.cc:585
 msgid "Doing assignment anyway."
 msgstr "Tehdään tehtävä joka tapauksessa."
 
-#: lily-guile.cc:572
+#: lily-guile.cc:599
 #, c-format
 msgid "Type check for `%s' failed; value `%s' must be of type `%s'"
 msgstr "Tyypin `%s' tarkistus epäonnistui; arvon `%s' on oltava tyyppiä `%s'"
 
-#: lookup.cc:169
+#: lookup.cc:173
 msgid "round filled box horizontal extent smaller than blot; decreasing blot"
-msgstr ""
-"pyöristetyn, täytetyn laatikon horisontaali laajuus on pilkkua pienempi; "
-"pienennetään pilkkua"
+msgstr "pyöristetyn, täytetyn laatikon horisontaali laajuus on pilkkua pienempi; pienennetään pilkkua"
 
-#: lookup.cc:174
+#: lookup.cc:178
 msgid "round filled box vertical extent smaller than blot; decreasing blot"
-msgstr ""
-"pyöristetyn, täytetyn laatikon vertikaali laajuus on pilkkua pienempi; "
-"pienennetään pilkku"
+msgstr "pyöristetyn, täytetyn laatikon vertikaali laajuus on pilkkua pienempi; pienennetään pilkku"
 
-#: main.cc:87
-msgid ""
-"This program is free software.  It is covered by the GNU General Public\n"
-"License and you are welcome to change it and/or distribute copies of it\n"
-"under certain conditions.  Invoke as `lilypond-bin --warranty' for more\n"
-"information.\n"
-msgstr ""
-"Tämä on ilmaisohjelmisto. Siihen sovelletaan GNU General Public License,\n"
-"ja olet tervetullut muuttamaan ohjelmaa ja/tai levittämään siitä kopioita\n"
-"tietyillä ehdoilla. Suorita `%s --warranty' saadaksesi lisäinformaatiota.\n"
+#: lyric-phrasing-engraver.cc:311
+msgid "lyrics found without any matching notehead"
+msgstr "lyriikkaa löytyi ilman vastaavaa nuotinpäätä"
 
-#: main.cc:93
-msgid ""
-"    This program is free software; you can redistribute it and/or\n"
-"modify it under the terms of the GNU General Public License version 2\n"
-"as published by the Free Software Foundation.\n"
-"\n"
-"    This program is distributed in the hope that it will be useful,\n"
-"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
-"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n"
-"General Public License for more details.\n"
-"\n"
-"    You should have received a copy (refer to the file COPYING) of the\n"
-"GNU General Public License along with this program; if not, write to\n"
-"the Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n"
-"Boston, MA 02111-1307, USA.\n"
-msgstr ""
-"    Tämä ohjelma on vapaata lähdekoodia; voit levittää sitä ja/tai\n"
-"muokata sitä lisenssin GNU General Public License versio 2 ehdoilla, \n"
-"kuten Free Software Foundation on sen julkaissut.\n"
-"\n"
-"    Ohjelmaa levitetään siinä toivossa että se on hyödyllinen, mutta\n"
-"ILMAN MITÄÄN TAKUUTA; ilman että edes annettaisiin ymmärtää takeista\n"
-"KAUPAKSIKÄYVYYDESTÄ tai SOPIVUUDESTA TIETTYYN TARKOITUKSEEN.  Lisätietoja\n"
-"voit katsoa lisenssistä GNU General Public Licence.\n"
-"\n"
-"    Saat kopion (katso tiedosto COPYING) lisenssistä GNU General Public\n"
-"License ohjelman mukana; jos et saanut; kirjoita osoitteeseen\n"
-"Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n"
-"Boston, MA 02111-1307, USA.\n"
+#: lyric-phrasing-engraver.cc:317
+msgid "Huh? Melismatic note found to have associated lyrics."
+msgstr "Täh? Melismoitu nuotti ilman siihen liittyvään lyriikkaa."
 
-#: main.cc:122
+#: main.cc:106
 msgid "EXPR"
 msgstr "EXPR"
 
-#: main.cc:123
+#: main.cc:107
 msgid "set options, use -e '(ly-option-usage)' for help"
-msgstr "aseta optiot, käytä -e '(ly-option-usage)' saadaksesi opasteen"
+msgstr "aseta optiot, käytä -e '(ly-option-usage)' saadaksesi opastusta"
 
-#: main.cc:126
+#: main.cc:110
 msgid "use output format EXT"
 msgstr "käytä tulostemuotoa EXT"
 
-#: main.cc:128
+#: main.cc:112
 msgid "FIELD"
 msgstr "KENTTÄ"
 
-#: main.cc:128
+#: main.cc:112
 msgid "write header field to BASENAME.FIELD"
 msgstr "kirjoita otsakekenttä paikkaan PERUSNIMI.KENTTÄ"
 
-#: main.cc:129
+#: main.cc:113
 msgid "add DIR to search path"
-msgstr "lisää HAKEMISTO hakupolkuun"
+msgstr "lisää DIR hakupolkuun"
 
-#: main.cc:130
+#: main.cc:114
 msgid "use FILE as init file"
 msgstr "käytetään TIEDOSTO alustustiedostona"
 
-#: main.cc:133
-msgid "run in safe mode"
-msgstr "aja turvamoodissa"
+#: main.cc:118
+msgid "prepend DIR to dependencies"
+msgstr "lisää DIR riippuvuuksien alkuun"
 
-#: main.cc:156
-msgid ""
-"Copyright (c) %s by\n"
-"%s  and others."
-msgstr "Copyright (c) %s by"
+#.
+#. should audit again.
+#.
+#: main.cc:123
+msgid "inhibit file output naming and exporting"
+msgstr "estä tiedostotulosteen nimeäminen ja siirtotiedostoon kirjoittaminen"
 
-#. No version number or newline here.  It confuses help2man.
-#: main.cc:182
+#. No version number or newline here. It confuses help2man.
+#: main.cc:155
 #, c-format
 msgid "Usage: %s [OPTIONS]... FILE..."
 msgstr "Käyttö: %s [OPTIOT]... TIEDOSTO..."
 
-#: main.cc:184
-msgid "Typeset music and/or produce MIDI from FILE."
+#: main.cc:157
+msgid "Typeset music and or play MIDI from FILE."
 msgstr "Lado musiikki ja tai soita MIDI tiedostosta TIEDOSTO."
 
-#: main.cc:186
+#: main.cc:160
+msgid ""
+"LilyPond is a music typesetter.  It produces beautiful sheet music\n"
+"using a high level description file as input.  LilyPond is part of \n"
+"the GNU Project.\n"
+msgstr ""
+"LilyPond on musiikin ladontaohjelma. Se tuottaa kaunista nuottikuvaa\n"
+"käyttäen korkean tason kuvauskieltä syötteenä.  LilyPond on osa\n"
+"GNU Projektia.\n"
+
+#: main.cc:182
 #, c-format
-msgid "LilyPond produces beautiful music notation."
-msgstr "LilyPond tuottaa kaunista notaatiota musiikille."
+msgid ""
+"This is free software.  It is covered by the GNU General Public License,\n"
+"and you are welcome to change it and/or distribute copies of it under\n"
+"certain conditions.  Invoke as `%s --warranty' for more information.\n"
+msgstr ""
+"Tämä on ilmaisohjelmisto. Siihen sovelletaan GNU General Public License,\n"
+"ja olet tervetullut muuttamaan sitä ja/tai levittämään siitä kopioita\n"
+"tietyillä ehdoilla. Suorita `%s --warranty' saadaksesi lisäinformaatiota.\n"
+
+#: main.cc:198
+msgid "GNU LilyPond -- The music typesetter"
+msgstr "GNU LilyPond -- Musiikin ladontaohjelma"
+
+#: main.cc:206
+msgid ""
+"    This program is free software; you can redistribute it and/or\n"
+"modify it under the terms of the GNU General Public License version 2\n"
+"as published by the Free Software Foundation.\n"
+"\n"
+"    This program is distributed in the hope that it will be useful,\n"
+"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n"
+"General Public License for more details.\n"
+"\n"
+"    You should have received a copy (refer to the file COPYING) of the\n"
+"GNU General Public License along with this program; if not, write to\n"
+"the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,\n"
+"USA.\n"
+msgstr ""
+"    Tämä ohjelma on vapaata lähdekoodia; voit levittää sitä ja/tai\n"
+"muokata sitä lisenssin GNU General Public License versio 2 ehdoilla, \n"
+"kuten Free Software Foundation on sen julkaissut.\n"
+"\n"
+"    Ohjelmaa levitetään siinä toivossa että se on hyödyllinen, mutta\n"
+"ILMAN MITÄÄN TAKUUTA; ilman että edes annettaisiin ymmärtää takeista\n"
+"KAUPAKSIKÄYVYYDESTÄ tai SOPIVUUDESTA TIETTYYN TARKOITUKSEEN.  Lisätietoja\n"
+"voit katsoa lisenssistä GNU General Public Licence.\n"
+"\n"
+"    Saat kopion (katso tiedosto COPYING) lisenssistä GNU General Public\n"
+"License ohjelman mukana; jos et saanut; kirjoita osoitteeseen\n"
+"Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n"
+"Boston, MA 02111-1307, USA.\n"
 
-#: main.cc:188
+#: mensural-ligature.cc:153
 #, c-format
-msgid "For more information, see %s"
-msgstr "Lisätietoja varten, katso %s"
+msgid "Mensural_ligature:thickness undefined on flexa %d; assuming 1.4"
+msgstr "Mensural_ligature: paksuus määrittämättä kohdassa flexa %d; oletetaan 1.4"
 
-#: main.cc:348
+#: mensural-ligature.cc:169
 #, c-format
-msgid "This option is for developers only."
-msgstr "Tämä optio on vain kehittäjille."
+msgid "Mensural_ligature:delta-pitch undefined on flexa %d; assuming 0"
+msgstr "Mensural_ligature: delta-pitch määrittämättä kohdassa flexa %d; oletetaan 0"
 
-#: main.cc:349
+#: mensural-ligature.cc:182
 #, c-format
-msgid "Read the sources for more information."
-msgstr "Lue lähdekoodia saadaksesi lisäinformaatiota."
+msgid "Mensural_ligature:flexa-width undefined on flexa %d; assuming 2.0"
+msgstr "Mensural_ligature: flexa-width määrittämättä kohdassa flexa %d; oletetaan 2.0\""
+
+#: mensural-ligature.cc:215
+msgid "Mensural_ligature:unexpected case fall-through"
+msgstr "Mensural_ligature: odottamaton tapauksen raukeaminen"
+
+#: mensural-ligature.cc:225
+msgid "Mensural_ligature: (join_left == 0)"
+msgstr "Mensural_ligature: (join_left == 0)"
 
-#: mensural-ligature-engraver.cc:248 mensural-ligature-engraver.cc:383
+#: mensural-ligature-engraver.cc:248 mensural-ligature-engraver.cc:397
 msgid "unexpected case fall-through"
 msgstr "odottamaton tapauksen raukeaminen"
 
@@ -1125,249 +1761,233 @@ msgstr "priimi-intervalli ligatuurissa -> ohitetaan"
 msgid "mensural ligature: duration none of L, B, S -> skipping"
 msgstr "mensuraaliligatuuri: kesto ei ollut L, B tai S -> ohitetaan"
 
-#: mensural-ligature.cc:183
-msgid "Mensural_ligature:unexpected case fall-through"
-msgstr "Mensural_ligature: odottamaton tapauksen raukeaminen"
-
-#: mensural-ligature.cc:193
-msgid "Mensural_ligature: (join_left == 0)"
-msgstr "Mensural_ligature: (join_left == 0)"
-
-#: midi-item.cc:153
-msgid "no such MIDI instrument: `%s'"
+#: midi-item.cc:148
+#, c-format
+msgid "no such instrument: `%s'"
 msgstr "ei löytynyt instrumenttia: `%s'"
 
-#: midi-item.cc:257
+#: midi-item.cc:238
+msgid "silly duration"
+msgstr "sekava kesto"
+
+#: midi-item.cc:251
 msgid "silly pitch"
 msgstr "sekava Ã¤Ã¤nenkorkeus"
 
-#: midi-item.cc:273
+#: music-output-def.cc:111
 #, c-format
-msgid "Experimental: temporarily fine tuning (of %d cents) a channel."
-msgstr "Kokeellinen: viritetään väliaisesti (%d senttiä) kanavaa."
-
-#: midi-stream.cc:40
-msgid "could not write file: `%s'"
-msgstr "tiedostoa ei voitu avata: `%s'"
+msgid "can't find `%s' context"
+msgstr "ei löytynyt kontekstia `%s'"
 
-#: my-lily-lexer.cc:185
+#: my-lily-lexer.cc:169
 #, c-format
 msgid "Identifier name is a keyword: `%s'"
 msgstr "Tunnistenimi on avainsana: `%s'"
 
-#: my-lily-lexer.cc:205
+#: my-lily-lexer.cc:191
 #, c-format
 msgid "error at EOF: %s"
 msgstr "virhe tiedoston lopussa (EOF): %s"
 
-#: my-lily-parser.cc:57
+#: my-lily-parser.cc:44
 msgid "Parsing..."
 msgstr "Jäsennetään..."
 
-#: my-lily-parser.cc:69
+#: my-lily-parser.cc:54
 msgid "Braces don't match"
 msgstr "Aaltosulkumerkit eivät täsmää"
 
-#: my-lily-parser.cc:228
-msgid "can't find init file: `%s'"
-msgstr "tiedostoa ei löydy: `%s'"
-
-#: my-lily-parser.cc:243
-msgid "Now processing `%s'"
-msgstr "Prosessoidaan: `%s'"
-
 #.
 #. music for the softenon children?
 #.
-#: new-fingering-engraver.cc:155
+#: new-fingering-engraver.cc:143
 msgid "music for the martians."
 msgstr "musiikkia marsilaisille"
 
-#: new-fingering-engraver.cc:235
-msgid "Fingerings are also not down?! Putting them down anyway."
-msgstr "Sormitukset eivät myöskään ole alhaalla?! Laitetaan ne kuitnekin alas."
-
-#: new-lyric-combine-music-iterator.cc:172
-msgid "cannot find Voice: %s"
-msgstr "tiedostoa ei löydy: `%s'"
+#: new-tie-engraver.cc:166 tie-engraver.cc:217
+msgid "lonely tie"
+msgstr "yksinäinen sidos"
 
-#: note-collision.cc:384
+#: note-collision.cc:340
 msgid "Too many clashing notecolumns.  Ignoring them."
 msgstr "Liian monta törmäävää nuottisaraketta.  Sivuutetaan ne."
 
-#: note-head.cc:139
+#: note-head.cc:127
 #, c-format
 msgid "note head `%s' not found"
 msgstr "nuottipäätä `%s' ei löytynyt"
 
-#: paper-def.cc:79
+#: paper-def.cc:96
 #, c-format
 msgid "paper output to `%s'..."
 msgstr "paperituloste paikkaan `%s'..."
 
-#: paper-score.cc:71
+#: paper-score.cc:78
 #, c-format
 msgid "Element count %d (spanners %d) "
 msgstr "Elementtien määrä: %d (ladokkeita: %d)"
 
-#: paper-score.cc:75
+#: paper-score.cc:83
 msgid "Preprocessing graphical objects..."
 msgstr "Esiprosessoidaan graafisia kohteita..."
 
-#. prevent warning
-#: parse-scm.cc:81
-msgid "GUILE signaled an error for the expression beginning here"
+#: paper-score.cc:116
+msgid "Outputting Score, defined at: "
+msgstr "Tulostetaan viivasto, määrittelypaikasta: "
+
+#: parse-scm.cc:79
+msgid "GUILE signaled an error for the expression begining here"
 msgstr "GUILE aitoi virheen lausekkeelle, joka alkoi täältä"
 
-#: percent-repeat-engraver.cc:110
+#.
+#. We could change the current translator's id, but that would make
+#. errors hard to catch
+#.
+#. last->translator_id_string_  = get_change ()->change_to_id_string_;
+#.
+#: part-combine-music-iterator.cc:139
+#, c-format
+msgid "I'm one myself: `%s'"
+msgstr "Olen yksikseni: '%s'"
+
+#: part-combine-music-iterator.cc:142
+#, c-format
+msgid "none of these in my family: `%s'"
+msgstr "yksikään näistä ei ole perheestäni: `%s'"
+
+#: percent-repeat-engraver.cc:109
 msgid "Don't know how to handle a percent repeat of this length."
 msgstr "Ei tiedetä kuinka kohdella tämän mittaista prosenttitoistoa."
 
-#: percent-repeat-engraver.cc:164
+#: percent-repeat-engraver.cc:163
 msgid "unterminated percent repeat"
 msgstr "päättymätön prosenttitoisto"
 
-#: percent-repeat-iterator.cc:53
+#: percent-repeat-iterator.cc:65
 msgid "no one to print a percent"
 msgstr "kukaan ei voinut tulostaa prosenttia"
 
-#: performance.cc:50
+#: performance.cc:51
 msgid "Track ... "
 msgstr "Jälki ... "
 
-#: performance.cc:93
+#: performance.cc:83
 msgid "Creator: "
 msgstr "Tekijä: "
 
-#: performance.cc:113
+#: performance.cc:103
 msgid "at "
 msgstr "kohdassa "
 
-#: performance.cc:171
+#: performance.cc:114
+#, c-format
+msgid "from musical definition: %s"
+msgstr "musiikkimäärityksestä: %s"
+
+#: performance.cc:169
 #, c-format
 msgid "MIDI output to `%s'..."
 msgstr "MIDI-tuloste paikkaan `%s'..."
 
-#: phrasing-slur-engraver.cc:105
+#: phrasing-slur-engraver.cc:123
 msgid "unterminated phrasing slur"
 msgstr "päättymätön fraasikaari"
 
-#: phrasing-slur-engraver.cc:123
+#: phrasing-slur-engraver.cc:141
 msgid "can't find start of phrasing slur"
 msgstr "ei voitu löytää alkua fraasikaarelle"
 
-#: piano-pedal-engraver.cc:238
-msgid "Need 3 strings for piano pedals. No pedal made. "
-msgstr "Tarvitaan 3 merkkijonoa pianopedaalille. Pedaalitusta ei tehty."
-
-#: piano-pedal-engraver.cc:253 piano-pedal-engraver.cc:268
-#: piano-pedal-performer.cc:82
+#: piano-pedal-engraver.cc:235 piano-pedal-engraver.cc:250
+#: piano-pedal-engraver.cc:305 piano-pedal-performer.cc:82
 #, c-format
 msgid "can't find start of piano pedal: `%s'"
 msgstr "ei voitu löytää alkua pianopedaalille: `%s'"
 
-#: piano-pedal-engraver.cc:321
-msgid "can't find start of piano pedal bracket: `%s'"
-msgstr "ei voitu löytää alkua pianopedaalille: `%s'"
+#: piano-pedal-engraver.cc:410
+msgid "unterminated pedal bracket"
+msgstr "päättymätön pedaalisulkumerkki"
 
-#: property-iterator.cc:94
+#: property-iterator.cc:97
 #, c-format
 msgid "Not a grob name, `%s'."
 msgstr "Ei ollut nimi graafiselle objektille (grob): `%s'."
 
-#: quote-iterator.cc:181
-msgid "In quotation: junking event %s"
-msgstr "Hylätään tapahtuma: `%s'"
-
-#: relative-octave-check.cc:25
-msgid "Failed octave check, got: "
-msgstr "Oktaavitarkistus epäonnistui, saatiin:"
-
-#: rest-collision.cc:145
-msgid "rest direction not set.  Cannot resolve collision."
-msgstr "tauon suuntaa ei asetettu.  Ei voitu selvittää törmäystä."
+#: rest.cc:139
+#, c-format
+msgid "rest `%s' not found, "
+msgstr "taukoa `%s' ei löytynyt, "
 
-#: rest-collision.cc:193
+#: rest-collision.cc:199
 msgid "too many colliding rests"
 msgstr "liian monta törmäävää taukoa"
 
-#: rest.cc:137
-msgid "rest `%s' not found"
-msgstr "taukoa `%s' ei löytynyt, "
-
-#: scm-option.cc:52
-#, c-format
+#: scm-option.cc:45
 msgid "lilypond -e EXPR means:"
 msgstr "lilypond -e EXPR tarkoittaa:"
 
-#: scm-option.cc:54
-#, c-format
+#: scm-option.cc:47
 msgid "  Evalute the Scheme EXPR before parsing any .ly files."
-msgstr ""
-"  Evaluoidaan Scheme EXPR ennen kuin jäsennetään yhtäkään .ly -tiedostoista."
+msgstr "  Evaluoidaan skeema EXPR ennen kuin jäsennetään yhtäkään .ly -tiedostoista."
 
-#: scm-option.cc:56
-#, c-format
-msgid ""
-"  Multiple -e options may be given, they will be evaluated sequentially."
+#: scm-option.cc:49
+msgid "  Multiple -e options may be given, they will be evaluated sequentially."
 msgstr "  Useita -e optioita voidaan antaa, ne evaluoidaan peräkkäisinä"
 
-#: scm-option.cc:58
-#, c-format
-msgid ""
-"  The function ly-set-option allows for access to some internal variables."
+#: scm-option.cc:51
+msgid "  The function ly-set-option allows for access to some internal variables."
 msgstr "  Funktio ly-set-option sallii pääsyn joihinkin sisäisiin muuttujiin"
 
-#: scm-option.cc:60
-msgid "Usage: lilypond-bin -e \"(ly-set-option SYMBOL VAL)\""
+#: scm-option.cc:53
+msgid "Usage: lilypond -e \"(ly-set-option SYMBOL VAL)\""
 msgstr "Käyttö: lilypond -e \"(ly-set-option SYMBOLI ARVO)\""
 
-#: scm-option.cc:62
-#, c-format
+#: scm-option.cc:55
 msgid "Where SYMBOL VAL pair is any of:"
 msgstr "Missä (SYMBOLI,ARVO)-pari on jokin näistä:"
 
-#: scm-option.cc:143 scm-option.cc:176
+#: scm-option.cc:128
 msgid "Unknown internal option!"
 msgstr "Tuntematon sisäinen optio!"
 
-#: score-engraver.cc:103
+#: score.cc:85
+msgid "Interpreting music..."
+msgstr "Tulkitaan musiikkia..."
+
+#: score.cc:97
+msgid "Need music in a score"
+msgstr "Laita musiikkia viivastolle"
+
+#. should we? hampers debugging.
+#: score.cc:111
+msgid "Errors found/*, not processing score*/"
+msgstr "Virheitä löytyi/*, ei prosessoida viivastoa*/"
+
+#: score.cc:118
+#, c-format
+msgid "elapsed time: %.2f seconds"
+msgstr "kulunut aika: %.2f sekuntia"
+
+#: score-engraver.cc:99
 #, c-format
 msgid "can't find `%s'"
 msgstr "`%s' jäi löytymättä"
 
-#: score-engraver.cc:104
+#: score-engraver.cc:100
 msgid "Fonts have not been installed properly.  Aborting"
 msgstr "Fontteja ei oltu asennettu kunnolla. Keskeytetään"
 
-#: score-engraver.cc:189
+#: score-engraver.cc:205
 #, c-format
 msgid "unbound spanner `%s'"
 msgstr "sitomaton ladoke `%s'"
 
-#: score.cc:119
-msgid "Interpreting music... "
-msgstr "Tulkitaan musiikkia..."
-
-#: score.cc:129
-msgid "Need music in a score"
-msgstr "Laita musiikkia viivastolle"
-
-#: score.cc:139
+#: script-engraver.cc:90
 #, c-format
-msgid "elapsed time: %.2f seconds"
-msgstr "kulunut aika: %.2f sekuntia"
-
-#: script-engraver.cc:96
-msgid "Don't know how to interpret articulation:"
+msgid "Don't know how to interpret articulation `%s'"
 msgstr "Ei tiedetä kuinka tulkita artikulaatio: `%s'"
 
-#: script-engraver.cc:97
-msgid "Scheme encoding: "
-msgstr "Scheme koodaus: "
-
 #. this shouldn't happen, but let's continue anyway.
-#: separation-item.cc:53 separation-item.cc:97
+#: separation-item.cc:53 separation-item.cc:101
 msgid "Separation_item:  I've been drinking too much"
 msgstr "Separation_item:  Olen juonut liikaa"
 
@@ -1376,82 +1996,102 @@ msgstr "Separation_item:  Olen juonut liikaa"
 msgid "No spring between column %d and next one"
 msgstr "Ei jousta sarakkeen %d ja sitä seuraavan välillä"
 
-#: slur-engraver.cc:121
+#: slur-engraver.cc:141
 msgid "unterminated slur"
 msgstr "päättymätön kaari"
 
 #. How to shut up this warning, when Voice_devnull_engraver has
 #. eaten start event?
-#: slur-engraver.cc:139
+#: slur-engraver.cc:159
 msgid "can't find start of slur"
 msgstr "ei löytynyt alkua kaarelle"
 
-#: source-file.cc:50
-#, c-format
-msgid "can't open file: `%s'"
-msgstr "tiedostoa ei voitu avata: `%s'"
-
-#: source-file.cc:63
+#: source-file.cc:67
 #, c-format
 msgid "Huh?  Got %d, expected %d characters"
 msgstr "Täh?  Saatiin %d merkkiä, oletetun %d asemesta"
 
-#: spacing-spanner.cc:385
-msgid "Global shortest duration is %s"
-msgstr "Globaali lyhin kesto on %s"
-
-#: stem-engraver.cc:97
-msgid "tremolo duration is too long"
-msgstr "tremolon kesto on liian pitkä"
+#: spacing-spanner.cc:379
+#, c-format
+msgid "Global shortest duration is %s\n"
+msgstr "Globaali lyhin kesto on %s\n"
 
-#: stem-engraver.cc:128
+#: spring-smob.cc:32
 #, c-format
-msgid "Adding note head to incompatible stem (type = %d)"
-msgstr "Lisätään nuottipää sopimattomaan varteen (tyyppi = %d)"
+msgid "#<spring smob d= %f>"
+msgstr "#<spring smob d= %f>"
 
-#: stem-engraver.cc:129
-msgid "Don't you want polyphonic voices instead?"
-msgstr "Etkö haluaisi polyfonisia Ã¤Ã¤nisiä sen sijaan?"
+#: staff-symbol.cc:61
+msgid "staff symbol: indentation yields beyond end of line"
+msgstr "viivastosymboli: sisennys vie rivin lopun taakse"
 
-#: stem.cc:119
+#: stem.cc:118
 msgid "Weird stem size; check for narrow beams"
 msgstr "Outo varren koko; koeta lyhyempiä palkkeja"
 
-#: stem.cc:648
+#: stem.cc:611
 #, c-format
 msgid "flag `%s' not found"
 msgstr "lippua `%s' ei löydetty"
 
-#: stem.cc:661
+#: stem.cc:624
 #, c-format
 msgid "flag stroke `%s' not found"
 msgstr "lipun piirtoa `%s' ei löytynyt"
 
-#: system.cc:131
+#: stem-engraver.cc:96
+msgid "tremolo duration is too long"
+msgstr "tremolon kesto on liian pitkä"
+
+#: stem-engraver.cc:124
+#, c-format
+msgid "Adding note head to incompatible stem (type = %d)"
+msgstr "Lisätään nuottipää sopimattomaan varteen (tyyppi = %d)"
+
+#: stem-engraver.cc:125
+msgid "Don't you want polyphonic voices instead?"
+msgstr "Etkö haluaisi polyfonisia Ã¤Ã¤nisiä sen sijaan?"
+
+#: streams.cc:34
+#, c-format
+msgid "can't create directory: `%s'"
+msgstr "ei voitu tehdä hakemistoa: `%s'"
+
+#: streams.cc:48
+msgid "Error syncing file (disk full?)"
+msgstr "Virhe synkronisoitaessa tiedostoa (onko levy täysi?)"
+
+#: system.cc:125
 #, c-format
 msgid "Element count %d."
 msgstr "Elementtien määrä: %d."
 
-#: system.cc:272
-msgid "Grob count %d"
+#: system.cc:372
+#, c-format
+msgid "Grob count %d "
 msgstr "Graafisien objektien (grob) määrä: %d "
 
-#: system.cc:286
+#: system.cc:386
 msgid "Calculating line breaks..."
 msgstr "Lasketaan rivinvaihtoja..."
 
-#: text-spanner-engraver.cc:65
+#: text-spanner-engraver.cc:81
 msgid "can't find start of text spanner"
 msgstr "ei löydetty alkua tekstiladokkeelle"
 
-#: text-spanner-engraver.cc:79
+#: text-spanner-engraver.cc:95
 msgid "already have a text spanner"
 msgstr "tekstiladoke löytyi jo"
 
-#: text-spanner-engraver.cc:143
+#: text-spanner-engraver.cc:164
 msgid "unterminated text spanner"
 msgstr "päättymätön tekstiladoke"
 
+#: tfm.cc:83
+#, c-format
+msgid "can't find ascii character: %d"
+msgstr "ei löydetty ASCII-merkkiä: %d"
+
 #. Not using ngettext's plural feature here, as this message is
 #. more of a programming error.
 #: tfm-reader.cc:108
@@ -1462,22 +2102,23 @@ msgstr "TFM-otsakkeessa `%s' on vain %u sana(a)"
 #: tfm-reader.cc:142
 #, c-format
 msgid "%s: TFM file has %u parameters, which is more than the %u I can handle"
-msgstr ""
-"%s: TFM-tiedostossa on %u parametria, mikä on enemmän kuin maksimimäärä %u"
+msgstr "%s: TFM-tiedostossa on %u parametria, mikä on enemmän kuin maksimimäärä %u"
 
-#: tfm.cc:73
-#, c-format
-msgid "can't find ascii character: %d"
-msgstr "ei löydetty ASCII-merkkiä: %d"
+#: tie-performer.cc:159
+msgid "No ties were created!"
+msgstr "Sidoksia ei tehty!"
 
-#: tie-engraver.cc:164
-msgid "lonely tie"
-msgstr "yksinäinen sidos"
-
-#: time-scaled-music-iterator.cc:24
+#: time-scaled-music-iterator.cc:25
 msgid "no one to print a tuplet start bracket"
 msgstr "ketään ei löytynyt tulostamaan tupletin alkusulkua"
 
+#. If there is no such symbol, we default to the numbered style.
+#. (Here really with a warning!)
+#: time-signature.cc:87
+#, c-format
+msgid "time signature symbol `%s' not found; reverting to numbered style"
+msgstr "aikamerkintäsymbolia `%s' ei löytynyt; vaihdetaan numeroituun tyyliin"
+
 #.
 #. Todo: should make typecheck?
 #.
@@ -1488,406 +2129,188 @@ msgstr "ket
 msgid "Found strange time signature %d/%d."
 msgstr "Löydettiin outo aikamerkintä: %d/%d."
 
-#. If there is no such symbol, we default to the numbered style.
-#. (Here really with a warning!)
-#: time-signature.cc:95
-#, c-format
-msgid "time signature symbol `%s' not found; reverting to numbered style"
-msgstr "aikamerkintäsymbolia `%s' ei löytynyt; vaihdetaan numeroituun tyyliin"
-
 #: translator-ctors.cc:53
 #, c-format
 msgid "unknown translator: `%s'"
 msgstr "tuntematon tulkitsija: `%s'"
 
-#: tuplet-bracket.cc:448
-msgid "Killing tuplet bracket across linebreak."
-msgstr "Hävitetään rivinvaihdon yli olevat tuplettisulut."
+#: translator-def.cc:105
+msgid "Program has no such type"
+msgstr "Ohjelmalla ei ole sellaista tyyppiä"
 
-#: vaticana-ligature-engraver.cc:342
+#: translator-def.cc:111
 #, c-format
-msgid ""
-"ignored prefix (es) `%s' of this head according to restrictions of the "
-"selected ligature style"
-msgstr "sivuutetaan prefiksi (t) `%s' tälle nuottipäälle valitun "
-"ligatuurityylin mukaisesti"
+msgid "Already contains: `%s'"
+msgstr "Sisällytettiin jo: `%s'"
 
-#: vaticana-ligature-engraver.cc:572
+#: translator-def.cc:112
 #, c-format
-msgid "Vaticana_ligature_engraver: setting `spacing-increment = %f': ptr=%ul"
-msgstr ""
-"Vaticana_ligature_engraver: asetetaan `spacing-increment = %f': ptr=%ul"
+msgid "Not adding translator: `%s'"
+msgstr "Ei lisätty tulkitsijaa: `%s'"
+
+#: translator-def.cc:229
+#, c-format
+msgid "can't find: `%s'"
+msgstr "ei löytynyt `%s'"
 
-#: vaticana-ligature.cc:92
+#: translator-group.cc:158
+#, c-format
+msgid "can't find or create `%s' called `%s'"
+msgstr "ei löydetty tai ei luotu `%s' nimeltä `%s'"
+
+#: translator-group.cc:230
+#, c-format
+msgid "can't find or create: `%s'"
+msgstr "ei löydetty tai ei luotu: `%s'"
+
+#: vaticana-ligature.cc:49
 msgid "ascending vaticana style flexa"
 msgstr "laskeva vaticana-tyylinen flexa"
 
-#: vaticana-ligature.cc:181
-msgid "Vaticana_ligature: zero join (delta_pitch == 0)"
+#: vaticana-ligature.cc:219
+msgid "Vaticana_ligature:thickness undefined; assuming 1.4"
+msgstr "Vaticana_ligature: määrittämätön paksuus; oletetaan 1.4"
+
+#: vaticana-ligature.cc:233
+msgid "Vaticana_ligature:x-offset undefined; assuming 0.0"
+msgstr "Vaticana_ligature: x-offset määrittämätön; oletetaan 0.0"
+
+#: vaticana-ligature.cc:258
+msgid "Vaticana_ligature: (delta_pitch == 0)"
 msgstr "Vaticana_ligature: (delta_pitch == 0)"
 
-#: volta-engraver.cc:140
+#: vaticana-ligature.cc:271
+msgid "Vaticana_ligature:delta-pitch -> ignoring join"
+msgstr "Vaticana_ligature:delta-pitch -> sivuutetaan sidos"
+
+#: vaticana-ligature-engraver.cc:477
+#, c-format
+msgid "Vaticana_ligature_engraver: setting `spacing-increment = %f': ptr=%ul"
+msgstr "Vaticana_ligature_engraver: asetetaan `spacing-increment = %f': ptr=%ul"
+
+#: volta-engraver.cc:112
 msgid "No volta spanner to end"
 msgstr "Ei päätettävää volta-ladoketta"
 
-#: volta-engraver.cc:151
+#: volta-engraver.cc:123
 msgid "Already have a volta spanner.  Stopping that one prematurely."
 msgstr "Löytyi ja volta-ladoke.  Lopetetaan se ennenaikaisesti."
 
-#: volta-engraver.cc:155
+#: volta-engraver.cc:127
 msgid "Also have a stopped spanner.  Giving up."
 msgstr "Löytyi myös lopetettu ladoke.  Luovutetaan."
 
-#: parser.yy:79
-msgid "Tag must be symbol or list of symbols."
-msgstr "Merkinnän on oltava symboli tai lista symboleita."
-
-#: parser.yy:524 parser.yy:513
+#: parser.yy:480
 msgid "Identifier should have alphabetic characters only"
 msgstr "Tunnisteessa saa olla vain aakkosellisia merkkejä"
 
-#: parser.yy:806 parser.yy:776
+#: parser.yy:779
 msgid "More alternatives than repeats.  Junking excess alternatives."
-msgstr ""
-"Enemmän vaihtoehtoja kuin kertauksia.  Heitetään pois liialliset vaihtoehdot."
+msgstr "Enemmän vaihtoehtoja kuin kertauksia.  Heitetään pois liialliset vaihtoehdot."
 
-#: parser.yy:887 parser.yy:894 parser.yy:857 parser.yy:864
+#: parser.yy:861 parser.yy:868
 msgid "\\applycontext takes function argument"
 msgstr "\\applycontext vaati funktioargumentin"
 
-#: parser.yy:1044 parser.yy:1014
+#: parser.yy:877
+msgid "Second argument must be a symbol"
+msgstr "Toisen argumentin on oltava symboli"
+
+#: parser.yy:882
+msgid "First argument must be a procedure taking one argument"
+msgstr "Ensimmäisen argumentin on oltava aliohjelma, joka sa yhden argumentin"
+
+#: parser.yy:1009
 msgid "\\apply takes function argument"
 msgstr "\\apply vaatii funktioargumentin"
 
-#: parser.yy:1407 parser.yy:1377
-msgid "Can't find music"
-msgstr "Musiikkia ei löytynyt"
+#: parser.yy:1501
+msgid "Expecting string as script definition"
+msgstr "Oletetaan merkkijonon olevan skriptimäärittely"
+
+#: parser.yy:1598
+msgid "Expecting musical-pitch value"
+msgstr "Oletetaan musiikillinen nuottikorkeusarvo"
 
-#: parser.yy:1530 parser.yy:1500
-msgid "Second argument must be pitch list."
-msgstr "Toisen argumentin on oltava symboli"
+#: parser.yy:1609
+msgid "Must have duration object"
+msgstr "Täytyy olla kesto-objekti"
 
-#: parser.yy:1567 parser.yy:1572 parser.yy:2104 parser.yy:1537 parser.yy:1542
-#: parser.yy:2074
+#: parser.yy:1618 parser.yy:1626
 msgid "Have to be in Lyric mode for lyrics"
 msgstr "Täytyy olla Lyrics -moodissa lyriikkaa varten"
 
-#: parser.yy:1657 parser.yy:1627
-msgid "Expecting string as script definition"
-msgstr "Oletetaan merkkijonon olevan skriptimäärittely"
-
-#: parser.yy:1864 parser.yy:1918 parser.yy:1834 parser.yy:1888
+#: parser.yy:1798 parser.yy:1853
 #, c-format
 msgid "not a duration: %d"
 msgstr "ei ole kesto: %d"
 
-#: parser.yy:2014 parser.yy:1984
+#: parser.yy:1949
 msgid "Have to be in Note mode for notes"
 msgstr "Täytyy olla Note -moodissa nuotteja varten"
 
-#: parser.yy:2119 parser.yy:2089
+#: parser.yy:2032
 msgid "Have to be in Chord mode for chords"
 msgstr "Täytyy olla Chord -moodissa sointuja varten"
 
-#: parser.yy:2266 parser.yy:2236
+#: parser.yy:2171
 msgid "need integer number arg"
 msgstr "tarvitaan kokonaislukuargumentti"
 
-#: parser.yy:2414 parser.yy:2387
+#: parser.yy:2316
 msgid "Suspect duration found following this beam"
 msgstr "Epäilty kesto löytyi palkin jälkeen"
 
-#: lexer.ll:189 lexer.ll:190
-msgid "input renamed to: `%s'"
-msgstr "ei voitu tehdä hakemistoa: `%s'"
-
-#: lexer.ll:197 lexer.ll:198
-msgid "No quoted string found after \\encoding"
-msgstr "Lainausmerkittyä tekstiä ei löytynyt kohteen \\encoding jälkeen"
-
-#: lexer.ll:201 lexer.ll:202
-msgid "No quoted string found after \\version"
-msgstr "Lainausmerkittyä tekstiä ei löytynyt kohteen \\version jälkeen"
-
-#: lexer.ll:205 lexer.ll:206
-msgid "No quoted string found after \\renameinput"
-msgstr "Lainausmerkittyä tekstiä ei löytynyt kohteen \\renameinput jälkeen"
-
-#: lexer.ll:218 lexer.ll:219
+#: lexer.ll:186
 msgid "EOF found inside a comment"
 msgstr "EOF löytyi kommentin sisältä"
 
-#: lexer.ll:233 lexer.ll:234
-msgid "\\maininput not allowed outside init files"
+#: lexer.ll:200
+msgid "\\maininput disallowed outside init files"
 msgstr "\\maininput ei ole sallittu init-alustustiedoston ulkopuolella"
 
-#: lexer.ll:257 lexer.ll:258
+#: lexer.ll:224
 #, c-format
 msgid "wrong or undefined identifier: `%s'"
 msgstr "väärä tai määrittämätön tunniste: `%s'"
 
 #. backup rule
-#: lexer.ll:266 lexer.ll:267
+#: lexer.ll:233
 msgid "Missing end quote"
 msgstr "Puuttuva loppulainausmerkki"
 
-#: lexer.ll:408 lexer.ll:409
-msgid "Brace found at end of lyric.  Did you forget a space?"
-msgstr "Sulkumerkki löytyi lyriikan lopussa. Unohditko välilyönnin?"
+#. backup rule
+#: lexer.ll:255 lexer.ll:259
+msgid "white expected"
+msgstr "oletettiin välilyönti"
+
+#: lexer.ll:268
+msgid "Can't evaluate Scheme in safe mode"
+msgstr "Scheme ei evaluoitunut turvamoodissa"
 
-#: lexer.ll:510 lexer.ll:511
-msgid "Brace found at end of markup.  Did you forget a space?"
+#: lexer.ll:397 lexer.ll:487
+msgid "Brace found at end of lyric.  Did you forget a space?"
 msgstr "Sulkumerkki löytyi lyriikan lopussa. Unohditko välilyönnin?"
 
-#: lexer.ll:593 lexer.ll:594
+#: lexer.ll:574
 #, c-format
 msgid "invalid character: `%c'"
 msgstr "epäkelpo merkki: `%c'"
 
-#: lexer.ll:665 lexer.ll:667
+#: lexer.ll:651
 #, c-format
 msgid "unknown escaped string: `\\%s'"
 msgstr "tuntematon koodinvaihtomerkillinen merkkijono: `\\\\%s'"
 
-#: lexer.ll:763 lexer.ll:765
+#: lexer.ll:742
 #, c-format
 msgid "Incorrect lilypond version: %s (%s, %s)"
 msgstr "Epäkelpo lilypond versio: %s (%s, %s)"
 
-#: lexer.ll:764 lexer.ll:766
+#: lexer.ll:743
 msgid "Consider updating the input with the convert-ly script"
 msgstr "Harkitse syötteen päivittämistä convert-ly scriptillä"
 
-#~ msgid " 1998--2003"
-#~ msgstr "1998--2003"
-
-#~ msgid "Process LilyPond snippets in hybrid html, LaTeX or texinfo document"
-#~ msgstr ""
-#~ "Prossoi LilyPond-osioita sekarakenteisessa html, LaTeX tai texinfo -"
-#~ "dokumentissa"
-
-#~ msgid "DIM"
-#~ msgstr "DIM"
-
-#~ msgid "default fontsize for music.  DIM is assumed to be in points"
-#~ msgstr "oletusfonttikoko musiikille.  DIM ilmoitetaan pisteinä"
-
-#~ msgid "deprecated, use --default-music-fontsize"
-#~ msgstr "vanhentunut, käytä --default-music-fontsize"
-
-#~ msgid "OPT"
-#~ msgstr "OPT"
-
-#~ msgid "pass OPT quoted to the lilypond command line"
-#~ msgstr "syötä OPT lainausmerkeissä lilypond-komentoriville"
-
-#~ msgid ""
-#~ "force fontsize for all inline lilypond. DIM is assumed be to in points"
-#~ msgstr ""
-#~ "pakota fonttikoko kullekin LilyPond-osiolle. DIM oletetaan olevan pisteinä"
-
-#~ msgid "deprecated, use --force-music-fontsize"
-#~ msgstr "vanhentunut, käytä --force-music-fontsize"
-
-#~ msgid "include path"
-#~ msgstr "sisällytä polku"
-
-#~ msgid "write dependencies"
-#~ msgstr "kirjoita riippuvuudet"
-
-#~ msgid "PREF"
-#~ msgstr "PREF"
-
-#~ msgid "prepend PREF before each -M dependency"
-#~ msgstr "laita PREF kunkin -M riippuvuuden eteen"
-
-#~ msgid "don't run lilypond"
-#~ msgstr "jätä suorittamatta lilypond"
-
-#~ msgid "don't generate pictures"
-#~ msgstr "jätä tuottamatta kuvat"
-
-#~ msgid "strip all lilypond blocks from output"
-#~ msgstr "riisu kaikki lilypond -osiot tulostuksesta"
-
-#~ msgid "filename main output file"
-#~ msgstr "tiedostonimi päätulostustiedostolle"
-
-#~ msgid "where to place generated files"
-#~ msgstr "tuotettujen tiedostojen sijoituspaikka"
-
-#~ msgid "LaTeX failed."
-#~ msgstr "LaTeX epäonnistui."
-
-#~ msgid "write Makefile dependencies for every input file"
-#~ msgstr "kirjoita Makefile -riippuvuudet kullekin tulostustiedostolle"
-
-#~ msgid "invalid value: `%s'"
-#~ msgstr "epäkelpo arvo: `%s'"
-
-#~ msgid "dependencies output to `%s'..."
-#~ msgstr "riippuvuuksien tulosteet paikkaan `%s'"
-
-#~ msgid " 2001--2003"
-#~ msgstr " 2001--2003"
-
-#~ msgid ""
-#~ "\n"
-#~ "Distributed under terms of the GNU General Public License. It comes with\n"
-#~ "NO WARRANTY."
-#~ msgstr ""
-#~ "\n"
-#~ "Levitetään ehdolla GNU General Public License\n"
-#~ "ja ilman TAKUUTA."
-
-#~ msgid "unknown accidental typesetting: %s. Ignored"
-#~ msgstr "tuntematan kortusmerkkien ladonta: %s. Sivuutetaan"
-
-#~ msgid "Symbol is not a parent context: %s. Ignored"
-#~ msgstr "Symboli ei ole yläkonteksti: %s. Sivuutetaan"
-
-#~ msgid "can't find character number: %d"
-#~ msgstr "ei löytynyt merkkiä: %d"
-
-#~ msgid "can't find character called: `%s'"
-#~ msgstr "ei löytynyt merkkiä nimeltä: `%s'"
-
-#~ msgid "Beam has less than two stems. Removing beam."
-#~ msgstr "Palkissa on vähemmän kuin kaksi pystyviivaa. Poistetaan palkki."
-
-#~ msgid ""
-#~ "Not sure that we can find a nice beam slope (no viable initial "
-#~ "configuration found)."
-#~ msgstr ""
-#~ "Ei ole varma löydetäänko sopivaa palkin kaltevuutta (ei löytynyt toimivaa "
-#~ "alkuasetusta)"
-
-#~ msgid ""
-#~ "Nothing to connect extender to on the left.  Ignoring extender event."
-#~ msgstr ""
-#~ "Pidennystä ei voitu liittää vasemmalle.  Hylätään pidennystapahtuma.\""
-
-#~ msgid "couldn't find any font satisfying "
-#~ msgstr "mikään fontti ei tuottanut toivottua tulosta"
-
-#~ msgid ""
-#~ "Skipped something?\n"
-#~ "Grob %s ended before I expected it to end."
-#~ msgstr ""
-#~ "Jotain ohitettiin?\n"
-#~ "Piirto %s loppui ennen kuin sen oletettiin loppuvan."
-
-#~ msgid "Nothing to connect hyphen to on the left.  Ignoring hyphen event."
-#~ msgstr ""
-#~ "Mitään ei voitu liittää tavuviivan vasemmalle puolelle.  Sivutetaan "
-#~ "tavutus."
-
-#~ msgid "Score contains errors; will not process it"
-#~ msgstr "Viivastossa on virheitä; sitä ei prosessoida"
-
-#~ msgid "lyrics found without any matching notehead"
-#~ msgstr "lyriikkaa löytyi ilman vastaavaa nuotinpäätä"
-
-#~ msgid "Huh? Melismatic note found to have associated lyrics."
-#~ msgstr "Täh? Melismoitu nuotti ilman siihen liittyvään lyriikkaa."
-
-#~ msgid "prepend DIR to dependencies"
-#~ msgstr "lisää HAKEMISTO riippuvuuksien alkuun"
-
-#~ msgid "inhibit file output naming and exporting"
-#~ msgstr ""
-#~ "estä tiedostotulosteen nimeäminen ja siirtotiedostoon kirjoittaminen"
-
-#~ msgid ""
-#~ "LilyPond is a music typesetter.  It produces beautiful sheet music\n"
-#~ "using a high level description file as input.  LilyPond is part of \n"
-#~ "the GNU Project.\n"
-#~ msgstr ""
-#~ "LilyPond on musiikin ladontaohjelma. Se tuottaa kaunista nuottikuvaa\n"
-#~ "käyttäen korkean tason kuvauskieltä syötteenä.  LilyPond on osa\n"
-#~ "GNU Projektia.\n"
-
-#~ msgid "GNU LilyPond -- The music typesetter"
-#~ msgstr "GNU LilyPond -- Musiikin ladontaohjelma"
-
-#~ msgid "Mensural_ligature:thickness undefined on flexa %d; assuming 1.4"
-#~ msgstr ""
-#~ "Mensural_ligature: paksuus määrittämättä kohdassa flexa %d; oletetaan 1.4"
-
-#~ msgid "Mensural_ligature:delta-pitch undefined on flexa %d; assuming 0"
-#~ msgstr ""
-#~ "Mensural_ligature: delta-pitch määrittämättä kohdassa flexa %d; oletetaan "
-#~ "0"
-
-#~ msgid "Mensural_ligature:flexa-width undefined on flexa %d; assuming 2.0"
-#~ msgstr ""
-#~ "Mensural_ligature: flexa-width määrittämättä kohdassa flexa %d; oletetaan "
-#~ "2.0\""
-
-#~ msgid "silly duration"
-#~ msgstr "sekava kesto"
-
-#~ msgid "Outputting Score, defined at: "
-#~ msgstr "Tulostetaan viivasto, määrittelypaikasta: "
-
-#~ msgid "I'm one myself: `%s'"
-#~ msgstr "Olen yksikseni: '%s'"
-
-#~ msgid "none of these in my family: `%s'"
-#~ msgstr "yksikään näistä ei ole perheestäni: `%s'"
-
-#~ msgid "from musical definition: %s"
-#~ msgstr "musiikkimäärityksestä: %s"
-
-#~ msgid "unterminated pedal bracket"
-#~ msgstr "päättymätön pedaalisulkumerkki"
-
-#~ msgid "Errors found/*, not processing score*/"
-#~ msgstr "Virheitä löytyi/*, ei prosessoida viivastoa*/"
-
-#~ msgid "#<spring smob d= %f>"
-#~ msgstr "#<spring smob d= %f>"
-
-#~ msgid "staff symbol: indentation yields beyond end of line"
-#~ msgstr "viivastosymboli: sisennys vie rivin lopun taakse"
-
-#~ msgid "Error syncing file (disk full?)"
-#~ msgstr "Virhe synkronisoitaessa tiedostoa (onko levy täysi?)"
-
-#~ msgid "No ties were created!"
-#~ msgstr "Sidoksia ei tehty!"
-
-#~ msgid "Already contains: `%s'"
-#~ msgstr "Sisällytettiin jo: `%s'"
-
-#~ msgid "Not adding translator: `%s'"
-#~ msgstr "Ei lisätty tulkitsijaa: `%s'"
-
-#~ msgid "Vaticana_ligature:thickness undefined; assuming 1.4"
-#~ msgstr "Vaticana_ligature: määrittämätön paksuus; oletetaan 1.4"
-
-#~ msgid "Vaticana_ligature:x-offset undefined; assuming 0.0"
-#~ msgstr "Vaticana_ligature: x-offset määrittämätön; oletetaan 0.0"
-
-#~ msgid "Vaticana_ligature:delta-pitch -> ignoring join"
-#~ msgstr "Vaticana_ligature:delta-pitch -> sivuutetaan sidos"
-
-#~ msgid "First argument must be a procedure taking one argument"
-#~ msgstr ""
-#~ "Ensimmäisen argumentin on oltava aliohjelma, joka sa yhden argumentin"
-
-#~ msgid "Expecting musical-pitch value"
-#~ msgstr "Oletetaan musiikillinen nuottikorkeusarvo"
-
-#~ msgid "Must have duration object"
-#~ msgstr "Täytyy olla kesto-objekti"
-
-#~ msgid "white expected"
-#~ msgstr "oletettiin välilyönti"
-
-#~ msgid "Can't evaluate Scheme in safe mode"
-#~ msgstr "Scheme ei evaluoitunut turvamoodissa"
-
 #~ msgid "Run LilyPond using LaTeX for titling"
 #~ msgstr "Aja LilyPond käyttäen LaTeX:ia otsikoimiseen"
 
@@ -1895,7 +2318,7 @@ msgstr "Harkitse sy
 #~ msgstr "Hae ja käännä uudelleen viimeisestä lähdekoodipakkauksesta"
 
 #~ msgid "unpack and build in DIR [%s]"
-#~ msgstr "pura paketti ja käännä hakemistiin HAKEMISTO [%s]"
+#~ msgstr "pura paketti ja käännä hakemistiin DIR [%s]"
 
 #~ msgid "execute COMMAND, subtitute:"
 #~ msgstr "suorita KOMENTO, korvaa:"
@@ -1927,9 +2350,15 @@ msgstr "Harkitse sy
 #~ msgid "fetch and build URL [%s]"
 #~ msgstr "nouda ja laadi URL [%s]"
 
+#~ msgid "Listing `%s'..."
+#~ msgstr "Listataan `%s'..."
+
 #~ msgid "latest is: %s"
 #~ msgstr "viimeisin on: %s"
 
+#~ msgid "relax, %s is up to date"
+#~ msgstr "rentoudu, %s on päivitetty"
+
 #~ msgid "Fetching `%s'..."
 #~ msgstr "Noudetaan `%s'..."
 
index 96d4929c1b37890fbde9d1acf4f7cb9d3dbc4ca1..7003f6c3f0ad6597295500ae6f0a504ad78ef703 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
 # Messages français pour lilypond.
-# Copyright Â© 2004 Free Software Foundation, Inc.
+# Copyright Â© 2001 Free Software Foundation, Inc.
 # Michel Robitaille <robitail@IRO.UMontreal.CA>, traducteur depuis/since 1996.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: lilypond 2.2.0\n"
+"Project-Id-Version: lilypond 2.1.36\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-03-31 16:22+0200\n"
-"PO-Revision-Date: 2004-05-10 08:00-0500\n"
+"POT-Creation-Date: 2004-03-28 17:42+0200\n"
+"PO-Revision-Date: 2004-03-30 08:00-0500\n"
 "Last-Translator: Michel Robitaille <robitail@IRO.UMontreal.CA>\n"
 "Language-Team: French <traduc@traduc.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
 
+#. ###############################################################
+#. lilylib.py -- options and stuff
+#.
+#. source file of the GNU LilyPond music typesetter
+#.
+#. (c)  1998--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+#. Jan Nieuwenhuizen <janneke@gnu.org>
+#. ##  subst:\(^\|[^._a-z]\)\(abspath\|identify\|warranty\|progress\|warning\|error\|exit\|getopt_args\|option_help_str\|options_help_str\|help\|setup_temp\|read_pipe\|system\|cleanup_temp\|strip_extension\|cp_to_dir\|mkdir_p\|init\) *(
+#. ##  replace:\1ly.\2 (
+#. ## subst: \(help_summary\|keep_temp_dir_p\|option_definitions\|original_dir\|program_name\|pseudo_filter_p\|temp_dir\|verbose_p\)
+#. ###############################################################
+#. Users of python modules should include this snippet
+#. and customize variables below.
+#. We'll suffer this path init stuff as long as we don't install our
+#. python packages in <prefix>/lib/pythonx.y (and don't kludge around
+#. it as we do with teTeX on Red Hat Linux: set some environment var
+#. (PYTHONPATH) in profile)
+#. If set, LILYPONDPREFIX must take prevalence
+#. if datadir is not set, we're doing a build and LILYPONDPREFIX
+#. Customize these
+#. lilylib globals
 #: lilylib.py:60
 msgid "lilylib module"
 msgstr "module lilylib"
 
-#: lilylib.py:63 lilypond-book.py:84 lilypond.py:127 midi2ly.py:100
+#: lilylib.py:63 lilypond-book.py:83 lilypond.py:127 midi2ly.py:100
 #: mup2ly.py:75 old-lilypond-book.py:129 main.cc:140
 msgid "print this help"
 msgstr "afficher l'aide-mémoire"
 
+#. ###############################################################
+#. Handle bug in Python 1.6-2.1
+#.
+#. there are recursion limits for some patterns in Python 1.6 til 2.1.
+#. fix this by importing pre instead. Fix by Mats.
+#. Attempt to fix problems with limited stack size set by Python!
+#. Sets unlimited stack size. Note that the resource module only
+#. is available on UNIX.
 #: lilylib.py:110 midi2ly.py:136 mup2ly.py:130
 #, python-format
 msgid "Copyright (c) %s by"
 msgstr "Copyright (c) %s Ã©crit par"
 
-#: lilylib.py:114 midi2ly.py:141 mup2ly.py:135
+#: lilylib.py:110
+msgid " 1998--2003"
+msgstr " 1998--2003"
+
+#: lilylib.py:114
 msgid "Distributed under terms of the GNU General Public License."
 msgstr "Distribué selon les termes de la GNU General Public License."
 
-#: lilylib.py:116 midi2ly.py:142 mup2ly.py:136
+#: lilylib.py:116
 msgid "It comes with NO WARRANTY."
 msgstr "Le logiciel est distribué SANS GARANTIE."
 
-#: lilylib.py:123 warn.cc:25
-#, c-format, python-format
-msgid "warning: %s"
-msgstr "AVERTISSEMENT: %s"
+#: lilylib.py:123 midi2ly.py:150 mup2ly.py:144 input.cc:88
+msgid "warning: "
+msgstr "AVERTISSEMENT: "
 
-#: lilylib.py:126 warn.cc:31
-#, c-format, python-format
-msgid "error: %s"
-msgstr "Erreur: %s"
+#. lots of midi files use plain text for lyric events
+#. FIXME: read from stdin when files[0] = '-'
+#: lilylib.py:126 midi2ly.py:165 midi2ly.py:1018 midi2ly.py:1083 mup2ly.py:147
+#: mup2ly.py:161 input.cc:93
+msgid "error: "
+msgstr "Erreur: "
 
 #: lilylib.py:130
 #, python-format
 msgid "Exiting (%d)..."
 msgstr "Fin d'exécution (%d)... "
 
-#: lilylib.py:190 midi2ly.py:223 mup2ly.py:219
+#: lilylib.py:190 midi2ly.py:224 mup2ly.py:220
 #, python-format
 msgid "Usage: %s [OPTIONS]... FILE"
 msgstr "Usage: %s [OPTIONS]... FICHIER"
 
-#: lilylib.py:194 midi2ly.py:227 mup2ly.py:223 main.cc:205
-#, c-format
+#: lilylib.py:194 midi2ly.py:228 mup2ly.py:224 main.cc:205
 msgid "Options:"
 msgstr "Options:"
 
-#: lilylib.py:198 midi2ly.py:231 mup2ly.py:227 main.cc:209
+#: lilylib.py:198 midi2ly.py:232 mup2ly.py:228 main.cc:209
 #, c-format, python-format
 msgid "Report bugs to %s."
 msgstr "Rapporter toutes anomalies Ã  %s."
@@ -72,22 +104,25 @@ msgstr "Rapporter toutes anomalies 
 msgid "Binary %s has version %s, looking for version %s"
 msgstr "Binaire %s de version %s, recherche de la version %s"
 
+#. deal with "((latex ) >& 1 ) .." too
 #: lilylib.py:252
 #, python-format
 msgid "Opening pipe `%s'"
 msgstr "Ouverture du pipe `%s'"
 
-#: lilylib.py:267 lilypond-book.py:767
+#. successful pipe close returns 'None'
+#: lilylib.py:267 lilypond-book.py:724
 #, python-format
 msgid "`%s' failed (%d)"
 msgstr "`%s' Ã©chec (%d)"
 
-#: lilylib.py:272 lilylib.py:331 lilypond-book.py:768 lilypond.py:530
+#: lilylib.py:272 lilylib.py:331 lilypond-book.py:725 lilypond.py:530
 #: old-lilypond-book.py:228
 msgid "The error log is as follows:"
 msgstr "Le journal d'erreurs est comme suit:"
 
-#: lilylib.py:303 midi2ly.py:259 mup2ly.py:255
+#. Ugh. code dup
+#: lilylib.py:303 midi2ly.py:260 mup2ly.py:256
 #, python-format
 msgid "Invoking `%s'"
 msgstr "Invocation de Â« %s Â»"
@@ -102,161 +137,519 @@ msgstr "Ex
 msgid "`%s' failed (%s)"
 msgstr "`%s' a Ã©choué (%s)"
 
-#: lilylib.py:327 midi2ly.py:265 mup2ly.py:263
+#: lilylib.py:327 midi2ly.py:266 mup2ly.py:264
 msgid "(ignored)"
 msgstr "(ignoré)"
 
-#: lilylib.py:345 midi2ly.py:275 mup2ly.py:273
+#: lilylib.py:345 midi2ly.py:276 mup2ly.py:274
 #, python-format
 msgid "Cleaning %s..."
 msgstr "Nettoyage de %s..."
 
-#: lilylib.py:509
+#. Duh.  Python style portable: cp *.EXT OUTDIR
+#. system ('cp *.%s %s' % (ext, outdir), 1)
+#. Python < 1.5.2 compatibility
+#.
+#. On most platforms, this is equivalent to
+#. `normpath(join(os.getcwd()), PATH)'.  *Added in Python version 1.5.2*
+#. tex needs lots of memory, more than it gets by default on Debian
+#. TODO: * prevent multiple addition.
+#. * clean TEXINPUTS, MFINPUTS, TFMFONTS,
+#. as these take prevalence over $TEXMF
+#. and thus may break tex run?
+#. $TEXMF is special, previous value is already taken care of
+#. # -sOutputFile does not work with bbox?
+#. # todo:
+#. # have better algorithm for deciding when to crop page,
+#. # and when to show full page
+#. need to have margin, otherwise edges of letters will
+#. be cropped off.
+#: lilylib.py:508
 msgid "Removing output file"
 msgstr "Destruction du fichier de sortie"
 
+#. !@PYTHON@
+#. once upon a rainy monday afternoon.
+#.
+#. ...
+#.
+#. (not finished.)
+#. ABC standard v1.6:  http://www.gre.ac.uk/~c.walshaw/abc2mtex/abc.txt
+#.
+#. Enhancements  (Roy R. Rankin)
+#.
+#. Header section moved to top of lilypond file
+#. handle treble, treble-8, alto, and bass clef
+#. Handle voices (V: headers) with clef and part names, multiple voices
+#. Handle w: lyrics with multiple verses
+#. Handle key mode names for minor, major, phrygian, ionian, locrian, aeolian,
+#. mixolydian, lydian, dorian
+#. Handle part names from V: header
+#. Tuplets handling fixed up
+#. Lines starting with |: not discarded as header lines
+#. Multiple T: and C: header entries handled
+#. Accidental maintained until next bar check
+#. Silent rests supported
+#. articulations fermata, upbow, downbow, ltoe, accent, tenuto supported
+#. Chord strings([-^]"string") can contain a '#'
+#. Header fields enclosed by [] in notes string processed
+#. W: words output after tune as abc2ps does it (they failed before)
+#. Enhancements (Laura Conrad)
+#.
+#. Barring now preserved between ABC and lilypond
+#. the default placement for text in abc is above the staff.
+#. %%LY now supported.
+#. \breve and \longa supported.
+#. M:none doesn't crash lily.
+#. Limitations
+#.
+#. Multiple tunes in single file not supported
+#. Blank T: header lines should write score and open a new score
+#. Not all header fields supported
+#. ABC line breaks are ignored
+#. Block comments generate error and are ignored
+#. Postscript commands are ignored
+#. lyrics not resynchronized by line breaks (lyrics must fully match notes)
+#. %%LY slyrics can't be directly before a w: line.
+#. ???
+#. TODO:
+#.
+#. Convert to new chord styles.
+#.
+#. UNDEF -> None
+#.
+#. uGUHGUHGHGUGH
+#. UGH
+#. treble8 is used by abctab2ps; -8va is used by barfly,
+#. and by my patch to abc2ps. If there's ever a standard
+#. about this we'll support that.
+#. find keywork
+#. assume that Q takes the form "Q:1/4=120"
+#. There are other possibilities, but they are deprecated
+#. outf.write ("\t\t\\consists Staff_margin_engraver\n")
+#. pitch manipulation. Tuples are (name, alteration).
+#. 0 is (central) C. Alteration -1 is a flat, Alteration +1 is a sharp
+#. pitch in semitones.
+#. abc to lilypond key mode names
+#. semitone shifts for key mode names
+#. latex does not like naked #'s
+#. latex does not like naked "'s
+#. break lyrics to words and put "'s around words containing numbers and '"'s
+#. escape "
+#. _ causes probs inside ""
+#. _ to ' _ '
+#. split words with -
+#. unless \-
+#. ~ to space('_')
+#. * to to space
+#. latex does not like naked #'s
+#. put numbers and " and ( into quoted string
+#. insure space between lines
+#. title
+#. strip trailing blanks
+#. Meter
+#. KEY
+#. seperate clef info
+#. there may or may not be a space
+#. between the key letter and the mode
+#. ugh.
+#. ugh.
+#. Notes
+#. Origin
+#. Reference Number
+#. Area
+#. History
+#. Book
+#. Composer
+#. Default note length
+#. Voice
+#. Words
+#. vocals
+#. tempo
+#. we use in this order specified accidental, active accidental for bar,
+#. active accidental for key
+#. (num /  den)  / defaultlen < 1/base
+#. return (str, num,den,dots)
+#. ignore slide
+#. ignore roll
+#. s7m2 input doesnt care about spaces
+#.
+#. remember accidental for rest of bar
+#.
+#. get accidental set in this bar or UNDEF if not set
+#. WAT IS ABC EEN ONTZETTENDE PROGRAMMEERPOEP  !
+#. failed; not a note!
+#. escape '#'s
+#.
+#. |] thin-thick double bar line
+#. || thin-thin double bar line
+#. [| thick-thin double bar line
+#. :| left repeat
+#. |: right repeat
+#. :: left-right repeat
+#. |1 volta 1
+#. |2 volta 2
+#. first try the longer one
+#. bracket escape
+#. the nobarlines option is necessary for an abc to lilypond translator for
+#. exactly the same reason abc2midi needs it: abc requires the user to enter
+#. the note that will be printed, and MIDI and lilypond expect entry of the
+#. pitch that will be played.
+#.
+#. In standard 19th century musical notation, the algorithm for translating
+#. between printed note and pitch involves using the barlines to determine
+#. the scope of the accidentals.
+#.
+#. Since ABC is frequently used for music in styles that do not use this
+#. convention, such as most music written before 1700, or ethnic music in
+#. non-western scales, it is necessary to be able to tell a translator that
+#. the barlines should not affect its interpretation of the pitch.
+#. write other kinds of appending  if we ever need them.
+#. add comments to current voice
+#. Try nibbling characters off until the line doesn't change.
+#. dump_global (outf)
+#. !@PYTHON@
+#.
+#. convert-ly.py -- Update old LilyPond input files (fix name?)
+#.
+#. source file of the GNU LilyPond music typesetter
+#.
+#. (c) 1998--2004  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+#. Jan Nieuwenhuizen <janneke@gnu.org>
+#. TODO
+#. use -f and -t for -s output
+#. NEWS
+#. 0.2
+#. - rewrite in python
+#. Did we ever have \mudela-version?  I doubt it.
+#. lilypond_version_re_str = '\\\\version *\"(.*)\"'
+#. ###########################
+#. need new a namespace
+#. raise FatalConversionError()
+#. need new a namespace
+#. harmful to current .lys
+#. str = re.sub ('\\\\key([^;]+);', '\\\\accidentals \\1;', str)
+#. raise FatalConversionError()
+#. raise FatalConversionError()
+#. raise FatalConversionError()
+#. TODO: lots of other syntax change should be done here as well
+#. Ugh, but meaning of \stemup changed too
+#. maybe we should do \stemup -> \stemUp\slurUp\tieUp ?
+#. I don't know exactly when these happened...
+#. ugh, we loose context setting here...
+#. (lacks capitalisation slur -> Slur)
+#. # dynamic..
+#. TODO: add lots of these
+#. ugh
+#. old fix
+#. Make sure groups of more than one ; have space before
+#. them, so that non of them gets removed by next rule
+#. Only remove ; that are not after spaces, # or ;
+#. Otherwise  we interfere with Scheme comments,
+#. which is badbadbad.
+#. 40 ?
+#. # end of while <>
+#. add dash: -[, so that [<<a b>> c d] becomes
+#. <<a b>>-[ c d]
+#. and gets skipped by articulation_substitute
+#. this rule doesn't really work,
+#. too lazy to figure out why.
+#. str = re.sub (r'molecule', 'collage', str)
+#. molecule -> collage
+#. -1: remove .
+#. ###############################
+#. END OF CONVERSIONS
+#. ###############################
+#. !@PYTHON@
+#. info mostly taken from looking at files. See also
+#. http://lilypond.org/wiki/?EnigmaTransportFormat
+#. This supports
+#.
+#. * notes
+#. * rests
+#. * ties
+#. * slurs
+#. * lyrics
+#. * articulation
+#. * grace notes
+#. * tuplets
+#.
+#. todo:
+#. * slur/stem directions
+#. * voices (2nd half of frame?)
+#. * more intelligent lyrics
+#. * beams (better use autobeam?)
+#. * more robust: try entertainer.etf (freenote)
+#. * dynamics
+#. * empty measures (eg. twopt03.etf from freenote)
+#.
+#. uGUHGUHGHGUGH
+#. notename 0 == central C
+#. represent pitches as (notename, alteration), relative to C-major scale
+#. a fifth up
+#. minor scale
+#. should cache this.
+#. flag1 isn't all that interesting.
+#. 3: '>',
+#. 18: '\arpeggio' ,
+#. really only for 0, but we only know about 0 and 1
+#. do grace notes.
+#. ugh.
+#. we don't attempt voltas since they fail easily.
+#. and g.repeat_bar == '|:' or g.repeat_bar == ':|:' or g.bracket:
+#. 4 layers.
+#. let's not do this: this really confuses when eE happens to be before  a ^text.
+#. if last_tag and last_indices:
+#. etf_file_dict[last_tag][last_indices].append (l)
+#. # do it
+#. staff-spec
+#. should use \addlyrics ?
+#. !@PYTHON@
+#. ###############################################################
+#. Users of python modules should include this snippet
+#. and customize variables below.
+#. We'll suffer this path init stuff as long as we don't install our
+#. python packages in <prefix>/lib/pythonx.y (and don't kludge around
+#. it as we do with teTeX on Red Hat Linux: set some environment var
+#. (PYTHONPATH) in profile)
+#. If set, LILYPONDPREFIX must take prevalence
+#. if datadir is not set, we're doing a build and LILYPONDPREFIX
+#. Customize these
+#. if __name__ == '__main__':
+#. lilylib globals
 #: lilypond-book.py:69
 msgid ""
-"Process LilyPond snippets in hybrid HTML, LaTeX or texinfo document.\n"
-"Example usage:\n"
+"Process LilyPond snippets in hybrid HTML, LaTeX or texinfo document.  Example usage:\n"
 "\n"
 "   lilypond-book --filter=\"tr '[a-z]' '[A-Z]'\" BOOK\n"
 "   lilypond-book --filter=\"convert-ly --no-version --from=2.0.0 -\" BOOK\n"
 "   lilypond-book --process='lilypond-bin -I include' BOOK\n"
 "\n"
 msgstr ""
-"Traiter les snippets LilyPond dans un document hybride HTML, LaTeX ou TexInfo.\n"
-"Exemples d'usage:\n"
+"Traiter les snippets LilyPond dans un document hybride HTML, LaTeX ou TexInfo.  Exemple d'usage:\n"
 "\n"
-"   lilypond-book --filter=\"tr '[a-z]' '[A-Z]'\" LIVRE\n"
+"   lilypond-book --filter=\"tr '[a-z]' '[A-Z]'\" LIBRE\n"
 "   lilypond-book --filter=\"convert-ly --no-version --from=2.0.0 -\" LIVRE\n"
 "   lilypond-book --process='lilypond-bin -I include' LIVRE\n"
 "\n"
 
 #. Bug in option parser: --output=foe is taken as an abbreviation
 #. for --output-format.
-#: lilypond-book.py:82 old-lilypond-book.py:123 main.cc:139
+#: lilypond-book.py:81 old-lilypond-book.py:123 main.cc:139
 msgid "EXT"
 msgstr "EXT"
 
-#: lilypond-book.py:82 old-lilypond-book.py:123
+#: lilypond-book.py:81 old-lilypond-book.py:123
 msgid "use output format EXT (texi [default], texi-html, latex, html)"
 msgstr "utiliser le format de sortie EXT (texi (par défaut), texi-html, latex, html)"
 
-#: lilypond-book.py:83
+#: lilypond-book.py:82
 msgid "FILTER"
 msgstr "FILTRE"
 
-#: lilypond-book.py:83
+#: lilypond-book.py:82
 msgid "pipe snippets through FILTER [convert-ly -n -]"
 msgstr "ouvrir un pipe de snippets Ã  travers le FILTRE [convert-ly -n -]"
 
-#: lilypond-book.py:85 lilypond-book.py:87 lilypond.py:131
+#: lilypond-book.py:84 lilypond-book.py:86 lilypond.py:131
 #: old-lilypond-book.py:130 main.cc:142 main.cc:147
 msgid "DIR"
 msgstr "RÉP"
 
-#: lilypond-book.py:85
+#: lilypond-book.py:84
 msgid "add DIR to include path"
 msgstr "ajouter le RÉPERTOIRE Ã  inclure au chemin de recherche"
 
-#: lilypond-book.py:86
+#: lilypond-book.py:85
 msgid "COMMAND"
 msgstr "COMMANDE"
 
-#: lilypond-book.py:86
+#: lilypond-book.py:85
 msgid "process ly_files using COMMAND FILE..."
 msgstr "traitre ly_files en utilisant la COMMANDE FICHIER..."
 
-#: lilypond-book.py:87
+#: lilypond-book.py:86
 msgid "write output to DIR"
 msgstr "produire la sortie dans le RÉPERTOIRE"
 
-#: lilypond-book.py:88 lilypond.py:149 midi2ly.py:105 mup2ly.py:78
+#: lilypond-book.py:87 lilypond.py:149 midi2ly.py:105 mup2ly.py:78
 #: old-lilypond-book.py:140 main.cc:150
 msgid "be verbose"
 msgstr "passer en mode explicatif"
 
-#: lilypond-book.py:89 old-lilypond-book.py:141
+#: lilypond-book.py:88 old-lilypond-book.py:141
 msgid "print version information"
 msgstr "afficher les informations de version"
 
-#: lilypond-book.py:90 lilypond.py:151 midi2ly.py:107 mup2ly.py:80
+#: lilypond-book.py:89 lilypond.py:151 midi2ly.py:107 mup2ly.py:80
 #: old-lilypond-book.py:142 main.cc:151
 msgid "show warranty and copyright"
 msgstr "afficher la notice de garantie et du droit d'auteur"
 
-#: lilypond-book.py:373
+#. only use installed binary  when we're installed too.
+#. Recognize special sequences in the input
+#.
+#. (?P<name>regex) -- assign result of REGEX to NAME
+#. *? -- match non-greedily.
+#. (?m) -- multiline regex: make ^ and $ match at each line
+#. (?s) -- make the dot match all characters including newline
+#. don't do this: fucks up with @code{@{}
+#. 'verb': r'''(?P<code>@code{.*?})''',
+#. Hmm
+#. defaults
+#: lilypond-book.py:341
 #, python-format
 msgid "deprecated ly-option used: %s"
 msgstr "option ly-option dépréciée: %s"
 
-#: lilypond-book.py:374
+#: lilypond-book.py:342
 #, python-format
 msgid "compatibility mode translation: %s"
 msgstr "traduction en mode de compatibilité: %s"
 
-#: lilypond-book.py:394
+#: lilypond-book.py:362
 #, python-format
 msgid "ignoring unknown ly option: %s"
 msgstr "option ly inconnue et ignorée: %s"
 
-#: lilypond-book.py:448
+#. URGS
+#. 1 = central C
+#. BARF
+#. use lilypond-bin for latex (.lytex) books,
+#. and lilypond --preview for html, texinfo books?
+#. Ugh.  (La)TeX writes progress and error messages on stdout
+#. Redirect to stderr
+#. check if it really is EPS.
+#. Otherwise music glyphs disappear from 2nd and following pages.
+#. TODO: should run dvips -pp -E per page, then we get proper
+#. cropping as well.
+#. make non EPS.
+#: lilypond-book.py:416
 #, python-format
-msgid "file not found: %s"
-msgstr "fichier non repéré: %s"
-
-#: lilypond-book.py:750
+msgid "file not found: %s\n"
+msgstr "fichier non repéré: %s\n"
+
+#. TODO: something smart with target formats
+#. (ps, png) and m/ctimes
+#. TODO
+#. URGUGHUGHUGUGHU
+#. URG, makeinfo implicitely prepends dot to ext
+#. specifying no extension is most robust
+#. self.output_print_filename (TEXINFO)
+#. need par after image
+#. #  found = dict (map (lambda x: (x, None), types))
+#. # urg python2.1
+#. We want to search for multiple regexes, without searching
+#. the string multiple times for one regex.
+#. Hence, we use earlier results to limit the string portion
+#. where we search.
+#. Since every part of the string is traversed at most once for
+#. every type of snippet, this is linear.
+#. FIXME.
+#. Limiting the search space is a cute
+#. idea, but this *requires* to search
+#. for possible containing blocks
+#. first, at least long as we do not
+#. search for the start of blocks, but
+#. always/directly for the entire
+#. @block ... @end block.
+#: lilypond-book.py:707
 #, python-format
 msgid "Opening filter `%s'"
 msgstr "Filtre d'ouverture `%s'"
 
-#: lilypond-book.py:862
+#. need anything else besides textwidth?
+#. TEXINFO: '.texinfo',
+#. ugh
+#. FIXME
+#: lilypond-book.py:819
 #, python-format
 msgid "cannot determine format for: %s"
 msgstr "ne peut déterminer le format pour: %s"
 
-#: lilypond-book.py:903
+#. urg python interface to libkpathsea?
+#. only default to stdout when filtering
+#: lilypond-book.py:860
 msgid "Output would overwrite input file; use --output."
 msgstr "La sortie va Ã©craser le fichier d'entrée; utiliser --output"
 
-#: lilypond-book.py:910
+#: lilypond-book.py:867
 #, python-format
 msgid "Reading %s..."
 msgstr "Lecture en cours de %s..."
 
-#: lilypond-book.py:924
+#. FIXME: containing blocks must be first, see find_toplevel_snippets
+#. 'verb',
+#: lilypond-book.py:881
 msgid "Dissecting..."
 msgstr "Dissection en cours..."
 
-#: lilypond-book.py:952
+#. FIXME: @paper is usually not in chunk #0:
+#. \input texinfo @c -*-texinfo-*-
+#. bluntly search first K of source
+#. s = chunks[0].replacement_text ()
+#: lilypond-book.py:909
 msgid "Writing snippets..."
 msgstr "Écriture de snipplets..."
 
-#: lilypond-book.py:957
+#: lilypond-book.py:914
 msgid "Processing..."
 msgstr "Traitement..."
 
-#: lilypond-book.py:960
+#: lilypond-book.py:917
 msgid "All snippets are up to date..."
 msgstr "Tous les snipplets sont Ã  jour..."
 
-#: lilypond-book.py:963
+#: lilypond-book.py:920
 #, python-format
 msgid "Compiling %s..."
 msgstr "Compilation en cours %s..."
 
-#: lilypond-book.py:971
+#: lilypond-book.py:928
 #, python-format
 msgid "Processing include: %s"
 msgstr "Traitement d'inclustion: %s"
 
-#: lilypond-book.py:987 lilypond.py:693 midi2ly.py:1017
+#. ###############################################################
+#. # MAIN
+#. ###############################################################
+#: lilypond-book.py:944 lilypond.py:693 midi2ly.py:1018
 #: old-lilypond-book.py:1570
 #, python-format
 msgid "getopt says: `%s'"
 msgstr "getopt() indique: Â« %s Â»"
 
+#. !@PYTHON@
+#.
+#. lilypond.py -- Run LilyPond, add titles to bare score, generate printable
+#. document
+#. Invokes: lilypond-bin, latex (or pdflatex), dvips, ps2pdf, gs
+#.
+#. source file of the GNU LilyPond music typesetter
+#.
+#. (c) 1998--2004  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+#. Jan Nieuwenhuizen <janneke@gnu.org>
+#. This is the third incarnation of ly2dvi, now renamed lilypond.
+#.
+#. Earlier incarnations of lilypond were written by
+#. Jeffrey B. Reed<daboys@austin.rr.com> (Python version)
+#. Jan Arne Fagertun <Jan.A.Fagertun@@energy.sintef.no> (Bourne shell script)
+#.
+#. Note: gettext work best if we use ' for program/docstrings and "
+#. for gettextable strings.
+#. USE ''' for docstrings.
+#. ###############################################################
+#. Users of python modules should include this snippet
+#. and customize variables below.
+#. We'll suffer this path init stuff as long as we don't install our
+#. python packages in <prefix>/lib/pythonx.y (and don't kludge around
+#. it as we do with teTeX on Red Hat Linux: set some environment var
+#. (PYTHONPATH) in profile)
+#. If set, LILYPONDPREFIX must take prevalence
+#. if datadir is not set, we're doing a build and LILYPONDPREFIX
+#. Customize these
+#. if __name__ == '__main__':
+#. lilylib globals
 #. # FIXME
 #. # do -P or -p by default?
 #. #help_summary = _ ("Run LilyPond using LaTeX for titling")
@@ -331,7 +724,7 @@ msgid "generate PostScript output"
 msgstr "générer une sortie en format PostScript"
 
 #: lilypond.py:143
-msgid "use pdflatex to generate PDF output"
+msgid "use pdflatex to generate PDF output"
 msgstr "utiliser pdflatex pour générer la sortie en format PDF"
 
 #: lilypond.py:144
@@ -362,11 +755,24 @@ msgstr "modifier le param
 msgid "print version number"
 msgstr "afficher le numéro de version"
 
+#. other globals
+#. Pdftex support
+#. # yuk.
+#. lilypond_binary = 'valgrind --suppressions=%(home)s/usr/src/guile-1.6.supp --num-callers=10 %(home)s/usr/src/lilypond/lily/out/lilypond '% { 'home' : '/home/hanwen' }
+#. only use installed binary  when we're installed too.
+#. init to empty; values here take precedence over values in the file
+#. # TODO: change name.
+#. for geometry v3
+#. Output formats that lilypond should create
+#. what a name.
+#. ly.warning (_ ("invalid value: %s") % `val`)
+#. ly.warning (_ ("invalid value: %s") % `val`)
 #: lilypond.py:234
 #, python-format
 msgid "no such setting: `%s'"
 msgstr "pas de telle configuration: Â« %s Â»"
 
+#. 2 == user interrupt.
 #: lilypond.py:284
 #, python-format
 msgid "LilyPond crashed (signal %d)."
@@ -390,25 +796,35 @@ msgstr "
 msgid "Continuing..."
 msgstr "Poursuite..."
 
+#. urg
 #: lilypond.py:306
 #, python-format
 msgid "Analyzing %s..."
 msgstr "Analyse de %s..."
 
+#. search only the first 10k
 #: lilypond.py:364
 #, python-format
 msgid "no LilyPond output found for `%s'"
 msgstr "aucune sortie de Lilypond n'a Ã©té trouvée pour Â« %s Â»"
 
+#. The final \n seems important here. It ensures that the footers and taglines end up on the right page.
+#. TODO: should set textheight (enlarge) depending on papersize.
 #: lilypond.py:431
 #, python-format
 msgid "invalid value: `%s'"
 msgstr "valeur invalide: Â« %s Â»"
 
+#. set sane geometry width (a4-width) for linewidth = -1.
+#. who the hell is 597 ?
+#. Ugh.  (La)TeX writes progress and error messages on stdout
+#. Redirect to stderr
 #: lilypond.py:529
 msgid "LaTeX failed on the output file."
 msgstr "Échec de LaTex sur le fichier de sortie."
 
+#. make a preview by rendering only the 1st line
+#. of each score
 #: lilypond.py:586
 msgid ""
 "Trying create PDF, but no PFA fonts found.\n"
@@ -417,17 +833,27 @@ msgstr ""
 "Tentative de création du PDF mais aucune fonte PFA repérée.\n"
 "Utilisation des fontes bitmap Ã  la place. L'apparence sera moins bonne."
 
+#. ugh. Different targets?
+#. Added as functionality to lilypond, because lilypond may well need to do this
+#. in future too.
 #. no ps header?
 #: lilypond.py:635
 #, python-format
 msgid "not a PostScript file: `%s'"
 msgstr "n'est pas un fichier PostScript: Â« %s Â»"
 
+#. todo
 #: lilypond.py:680
 #, python-format
 msgid "Writing HTML menu `%s'"
 msgstr "Écriture du menu HTML Â« %s Â»"
 
+#. signal programming error
+#. Don't convert input files to abspath, rather prepend '.' to include
+#. path.
+#. As a neat trick, add directory part of first input file
+#. to include path.  That way you can do without the clumsy -I in:
+#. lilypond -I foe/bar/baz foo/bar/baz/baz.ly
 #: lilypond.py:800
 msgid "pseudo filter"
 msgstr "pseudo filtre"
@@ -436,27 +862,52 @@ msgstr "pseudo filtre"
 msgid "pseudo filter only for single input file"
 msgstr "pseudo filtre seulement pour le seul fichier d'entrée"
 
+#. HACK
+#. status = os.system ('lilypond -w')
 #: lilypond.py:808 old-lilypond-book.py:1643
 msgid "no files specified on command line"
 msgstr "aucun fichier spéficié sur la ligne de commande"
 
+#. Ugh, maybe make a setup () function
+#. hmmm. Wish I'd 've written comments when I wrote this.
+#. now it looks complicated.
 #: lilypond.py:840
 #, python-format
 msgid "filename should not contain spaces: `%s'"
 msgstr "le nom de fichier ne peut contenir des espaces: Â« %s Â»"
 
+#. to be sure, add tmpdir *in front* of inclusion path.
+#. os.environ['TEXINPUTS'] =  tmpdir + ':' + os.environ['TEXINPUTS']
+#. We catch all exceptions, because we need to do stuff at exit:
+#. * copy any successfully generated stuff from tempdir and
+#. notify user of that
+#. * cleanout tempdir
+#. ## ARGH. This also catches python programming errors.
+#. ## this should only catch lilypond nonzero exit  status
+#. ## --hwn
+#. TODO: friendly message about LilyPond setup/failing?
+#.
 #: lilypond.py:880
 msgid "Running LilyPond failed. Rerun with --verbose for a trace."
 msgstr "Échec d'exécution de LilyPond. Réxécuter avec --verbose pour obtenir une trace."
 
+#. Our LilyPond pseudo filter always outputs to 'lelie'
+#. have subsequent stages and use 'lelie' output.
+#. unless: add --tex, or --latex?
+#. TODO: friendly message about TeX/LaTeX setup,
+#. trying to run tex/latex by hand
 #: lilypond.py:921
 msgid "Failed to make PS file. Rerun with --verbose for a trace."
 msgstr "Échec de génération du fichier PS. Réexécuter avec --verbose pour obtenir une trace."
 
+#. unless: add --tex, or --latex?
+#. TODO: friendly message about TeX/LaTeX setup,
+#. trying to run tex/latex by hand
 #: lilypond.py:951
 msgid "Running LaTeX failed. Rerun with --verbose for a trace."
 msgstr "Échec de l'exécution de LaTeX. Ré-exécuter avec --verbose pour obtenir une trace."
 
+#. add DEP to targets?
 #: lilypond.py:963 input-file-results.cc:74
 #, c-format, python-format
 msgid "dependencies output to `%s'..."
@@ -473,6 +924,7 @@ msgstr "%s sortie vers <stdout>
 msgid "can't find file: `%s'"
 msgstr "ne peut repérer le fichier: Â« %s Â»"
 
+#. Hmm, if this were a function, we could call it the except: clauses
 #: lilypond.py:1002
 #, python-format
 msgid "%s output to %s..."
@@ -483,6 +935,22 @@ msgstr "%s sortie vers  %s..."
 msgid "can't find file: `%s.%s'"
 msgstr "ne peut repérer le fichier: Â« %s.%s Â»"
 
+#. !@PYTHON@
+#.
+#. midi2ly.py -- LilyPond midi import script
+#.
+#. source file of the GNU LilyPond music typesetter
+#.
+#. (c) 1998--2004  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+#. Jan Nieuwenhuizen <janneke@gnu.org>
+#. ###############################################################
+#. Users of python modules should include this snippet.
+#.
+#. This soon to be removed for: import lilypond.lilylib as ly
+#. ###############################################################
+#. ###############################################################
+#. ############### CONSTANTS
+#. ###############################################################
 #. temp_dir = os.path.join (original_dir,  '%s.dir' % program_name)
 #. original_dir = os.getcwd ()
 #. keep_temp_dir_p = 0
@@ -530,37 +998,104 @@ msgstr "permettre un tuplet de dur
 msgid "treat every text as a lyric"
 msgstr "traiter chaque texte comme des paroles"
 
-#: midi2ly.py:149 mup2ly.py:143 input.cc:88
-msgid "warning: "
-msgstr "AVERTISSEMENT: "
+#: midi2ly.py:136 mup2ly.py:130
+msgid " 2001--2004"
+msgstr " 2001--2004"
 
-#: midi2ly.py:164 midi2ly.py:1017 midi2ly.py:1082 mup2ly.py:146 mup2ly.py:160
-#: input.cc:93
-msgid "error: "
-msgstr "Erreur: "
+#: midi2ly.py:141 mup2ly.py:135
+msgid ""
+"\n"
+"Distributed under terms of the GNU General Public License. It comes with\n"
+"NO WARRANTY."
+msgstr ""
+"\n"
+"Distribué selon les termes de la GNU General Public License.  Le logiciel est fourni sans GARANTIE."
 
-#: midi2ly.py:165 mup2ly.py:161
+#: midi2ly.py:166 mup2ly.py:162
 msgid "Exiting ... "
 msgstr "Fin d'exécution... "
 
-#: midi2ly.py:263 mup2ly.py:260
+#: midi2ly.py:264 mup2ly.py:261
 #, python-format
 msgid "command exited with value %d"
 msgstr "fin de la commande avec l'état %d"
 
-#: midi2ly.py:1001
+#. ###############################################################
+#. END Library
+#. ###############################################################
+#. hmm
+#. major scale: do-do
+#. minor scale: la-la  (= + 5) '''
+#. By tradition, all scales now consist of a sequence
+#. of 7 notes each with a distinct name, from amongst
+#. a b c d e f g.  But, minor scales have a wide
+#. second interval at the top - the 'leading note' is
+#. sharped. (Why? it just works that way! Anything
+#. else doesn't sound as good and isn't as flexible at
+#. saying things. In medieval times, scales only had 6
+#. notes to avoid this problem - the hexachords.)
+#. So, the d minor scale is d e f g a b-flat c-sharp d
+#. - using d-flat for the leading note would skip the
+#. name c and duplicate the name d.  Why isn't c-sharp
+#. put in the key signature? Tradition. (It's also
+#. supposedly based on the Pythagorean theory of the
+#. cycle of fifths, but that really only applies to
+#. major scales...)  Anyway, g minor is g a b-flat c d
+#. e-flat f-sharp g, and all the other flat minor keys
+#. end up with a natural leading note. And there you
+#. have it.
+#. John Sankey <bf250@freenet.carleton.ca>
+#.
+#. Let's also do a-minor: a b c d e f gis a
+#.
+#. --jcn
+#. as -> gis
+#. des -> cis
+#. ges -> fis
+#. g -> fisis
+#. d -> cisis
+#. a -> gisis
+#. b -> ces
+#. e -> fes
+#. f -> eis
+#. c -> bis
+#. # FIXME: compile fix --jcn
+#. TODO: move space
+#. fis cis gis dis ais eis bis
+#. bes es as des ges ces fes
+#. urg, we should be sure that we're in a lyrics staff
+#. all include ALL_NOTES_OFF
+#. ugh, must set key while parsing
+#. because Note init uses key
+#. Better do Note.calc () at dump time?
+#. last_lyric.clocks = t - last_time
+#. hmm
+#. urg, this will barf at meter changes
+#. urg LilyPond doesn't start at c4, but
+#. remembers from previous tracks!
+#. reference_note = Note (clocks_per_4, 4*12, 0)
+#. must be in \notes mode for parsing \skip
+#: midi2ly.py:1002
 #, python-format
 msgid "%s output to `%s'..."
 msgstr "%s produites dans Â« %s Â»..."
 
-#: midi2ly.py:1032
+#: midi2ly.py:1033
 msgid "Example:"
 msgstr "Exemple:"
 
-#: midi2ly.py:1082
+#: midi2ly.py:1083
 msgid "no files specified on command line."
 msgstr "aucun fichier spéficié sur la ligne de commande."
 
+#. !@PYTHON@
+#. mup2ly.py -- mup input converter
+#.
+#. source file of the GNU LilyPond music typesetter
+#.
+#. (c) 2001
+#. if set, LILYPONDPREFIX must take prevalence
+#. if datadir is not set, we're doing a build and LILYPONDPREFIX
 #: mup2ly.py:70
 msgid "Convert mup to LilyPond source."
 msgstr "Convertir le source du format mup en format LilyPond"
@@ -577,27 +1112,141 @@ msgstr "d
 msgid "only pre-process"
 msgstr "pré-traitement seulement"
 
-#: mup2ly.py:1075
+#. Duh.  Python style portable: cp *.EXT OUTDIR
+#. system ('cp *.%s %s' % (ext, outdir), 1)
+#. Python < 1.5.2 compatibility
+#.
+#. On most platforms, this is equivalent to
+#. `normpath(join(os.getcwd()), PATH)'.  *Added in Python version 1.5.2*
+#. if set, LILYPONDPREFIX must take prevalence
+#. if datadir is not set, we're doing a build and LILYPONDPREFIX
+#. ###############################################################
+#. END Library
+#.
+#. PMX cut and paste
+#.
+#. if not self.entries:
+#. #return '\n'
+#. #ugh ugh
+#. return '\n%s = {}\n\n' % self.idstring ()
+#. ugh
+#. def set_clef (self, letter):
+#. clstr = clef_table[letter]
+#. self.voices[0].add_nonchord (Clef (clstr))
+#. urg
+#. maybe use import copy?
+#. for i in self.pitches:
+#. ch.pitches.append (i)
+#. for i in self.scripts:
+#. ch.scripts.append (i)
+#. http://www.arkkra.com/doc/uguide/contexts.html
+#. #self.current_staffs = []
+#. duh
+#. FIXME: 1?
+#. FIXME: does key play any role in this?
+#. ch = self.current_voices[0].last_chord ()
+#. ch.basic_duration = self.current_voices[0].last_chord ().basic_duration
+#. ugh
+#. ch = self.current_voices[0].last_chord ()
+#. `;' is not a separator, chords end with ';'
+#. mup resets default duration and pitch each bar
+#. ugh: these (and lots more) should also be parsed in
+#. context staff.  we should have a class Staff_properties
+#. and parse/set all those.
+#. shortcut: set to official mup maximum (duh)
+#. self.set_staffs (40)
+#: mup2ly.py:1076
 #, python-format
 msgid "no such context: %s"
 msgstr "pas de tel contexte: %s"
 
-#: mup2ly.py:1299
+#. hmm
+#. dig this: mup allows ifdefs inside macro bodies
+#. don't do nested multi-line defines
+#. duh: mup is strictly line-based, except for `define',
+#. which is `@' terminated and may span several lines
+#. don't define new macros in unactive areas
+#. To support nested multi-line define's
+#. process_function and macro_name, macro_body
+#. should become lists (stacks)
+#. The mup manual is undetermined on this
+#. and I haven't seen examples doing it.
+#.
+#. don't do nested multi-line define's
+#. writes to stdout for help2man
+#. don't call
+#. identify ()
+#. sys.stdout.flush ()
+#. handy emacs testing
+#. if not files:
+#. files = ['template.mup']
+#: mup2ly.py:1300
 #, python-format
 msgid "Processing `%s'..."
 msgstr "Traitement de Â« %s Â»..."
 
-#: mup2ly.py:1318
+#: mup2ly.py:1319
 #, python-format
 msgid "Writing `%s'..."
 msgstr "Écriture de Â« %s Â»..."
 
+#. duh
+#. !@PYTHON@
+#. musedata = musedata.stanford.edu
+#. musedata = COBOL for musicians.
+#. TODO
+#.
+#. * clefs,
+#. * keys,
+#. * staffs,
+#. * multiple voices (they use `Backspace' (shudder)
+#. * tuplets
+#.
+#.
+#. I completely forgot how this was supposed to work --hwn 5/2002
+#.
+#.
+#. uGUHGUHGHGUGH
+#. musedata license (argh)
+#. ignore sound & print
+#. !@PYTHON@
+#. vim: set noexpandtab:
+#. This is was the idea for handling of comments:
+#. Multiline comments, @ignore .. @end ignore is scanned for
+#. in read_doc_file, and the chunks are marked as 'ignore', so
+#. lilypond-book will not touch them any more. The content of the
+#. chunks are written to the output file. Also 'include' and 'input'
+#. regex has to check if they are commented out.
+#.
+#. Then it is scanned for 'lilypond', 'lilypond-file' and 'lilypond-block'.
+#. These three regex's has to check if they are on a commented line,
+#. % for latex, @c for texinfo.
+#.
+#. Then lines that are commented out with % (latex) and @c (Texinfo)
+#. are put into chunks marked 'ignore'. This cannot be done before
+#. searching for the lilypond-blocks because % is also the comment character
+#. for lilypond.
+#.
+#. The the rest of the rexeces are searched for. They don't have to test
+#. if they are on a commented out line.
+#. ###############################################################
+#. Users of python modules should include this snippet
+#. and customize variables below.
+#. We'll suffer this path init stuff as long as we don't install our
+#. python packages in <prefix>/lib/pythonx.y (and don't kludge around
+#. it as we do with teTeX on Red Hat Linux: set some environment var
+#. (PYTHONPATH) in profile)
+#. If set, LILYPONDPREFIX must take prevalence
+#. if datadir is not set, we're doing a build and LILYPONDPREFIX
+#. Customize these
+#. if __name__ == '__main__':
+#. lilylib globals
 #. # FIXME
 #. # do -P or -p by default?
 #. #help_summary = _ ("Run LilyPond using LaTeX for titling")
 #: old-lilypond-book.py:118
-msgid "Process LilyPond snippets in hybrid HTML, LaTeX or texinfo document"
-msgstr "Traiter les snippets LilyPond dans un document hybride en HTML, LaTeX ou texinfo"
+msgid "Process LilyPond snippets in hybrid html, LaTeX or texinfo document"
+msgstr "Traiter les fragments dans un document hybride en html, LaTeX ou texinfo"
 
 #: old-lilypond-book.py:124 old-lilypond-book.py:125 old-lilypond-book.py:127
 #: old-lilypond-book.py:128
@@ -664,6 +1313,16 @@ msgstr "nom du fichier principal de sortie"
 msgid "where to place generated files"
 msgstr "où seront placés les fichiers générés"
 
+#. format specific strings, ie. regex-es for input, and % strings for output
+#. global variables
+#. lilypond_binary = 'valgrind --suppressions=/home/hanwen/usr/src/guile-1.6.supp  --num-callers=10 /home/hanwen/usr/src/lilypond/lily/out/lilypond'
+#. only use installed binary  when we're installed too.
+#. only use installed binary  when we're installed too.
+#. ###############################################################
+#. Dimension handling for LaTeX.
+#.
+#. Ugh.  (La)TeX writes progress and error messages on stdout
+#. Redirect to stderr
 #: old-lilypond-book.py:227
 msgid "LaTeX failed."
 msgstr "Échec de LaTeX"
@@ -688,14 +1347,20 @@ msgstr "option non reconnue: 
 msgid "invalid argument `%s' to option `%s'"
 msgstr "argument invalide Â« %s Â» pour l'option Â« %s Â»"
 
-#: warn.cc:44
+#: warn.cc:25
+#, c-format
+msgid "warning: %s\n"
+msgstr "AVERTISSEMENT: %s\n"
+
+#: warn.cc:31
 #, c-format
-msgid "programming error: %s"
-msgstr "erreur de programmation: %s"
+msgid "error: %s\n"
+msgstr "Erreur: %s\n"
 
-#: warn.cc:45
-msgid "Continuing; crossing fingers"
-msgstr "Poursuite; croisons les doigts"
+#: warn.cc:44
+#, c-format
+msgid "programming error: %s (Continuing; crossing fingers)\n"
+msgstr "Erreur de programmation: %s (Poursuite; croisons les doigts)\n"
 
 #: accidental.cc:219 key-signature-interface.cc:139
 #, c-format
@@ -709,8 +1374,8 @@ msgstr "Liste de mise en page accidentelle doit d
 
 #: accidental-engraver.cc:194
 #, c-format
-msgid "ignoring unknown accidental: %s"
-msgstr "option inconnue et accidentelle: %s"
+msgid "unknown accidental typesetting: %s. Ignored"
+msgstr "mise en page accidentelle inconnue: %s. Ignorée"
 
 #: accidental-engraver.cc:211
 #, c-format
@@ -733,37 +1398,41 @@ msgid "does not match: `%s'"
 msgstr "ne concorde pas: Â« %s Â»"
 
 #: all-font-metrics.cc:107
-msgid "Rebuild all .afm files, and remove all .pk and .tfm files."
-msgstr "Reconstruire tous les fichiers .afm et enlever tous les fichiers .pk et .tfm."
-
-#: all-font-metrics.cc:109
-msgid "Rerun with -V to show font paths."
-msgstr "Ré-exécuter avec l'option -V pour afficher les chemins vers les fontes."
+msgid ""
+" Rebuild all .afm files, and remove all .pk and .tfm files.\n"
+"Rerun with -V to show font paths.\n"
+msgstr ""
+" Reconstruire tous les fichiers .afm et enlever tous les fichiers .pk et .tfm.\n"
+"Ré-exécuter avec l'option -V pour afficher les chemins vers les fontes\n"
 
-#: all-font-metrics.cc:111
-msgid "A script for removing font-files is delivered with the source-code:"
-msgstr "Un script pour enlever les fichiers de fontes est livré avec le code source:"
+#: all-font-metrics.cc:108
+msgid ""
+"A script for removing font-files is delivered with the source-code,\n"
+"in buildscripts/clean-fonts.sh"
+msgstr ""
+"Un script pour enlever les fichiers de fontes est livré avec le code source,\n"
+"dans buildscripts/clean-fonts.sh"
 
-#: all-font-metrics.cc:192
+#: all-font-metrics.cc:188
 #, c-format
 msgid "can't find font: `%s'"
 msgstr "ne peut repérer la fonte: Â« %s Â»"
 
-#: all-font-metrics.cc:193
+#: all-font-metrics.cc:189
 msgid "Loading default font"
 msgstr "Chargement de la fonte par défaut"
 
-#: all-font-metrics.cc:208
+#: all-font-metrics.cc:204
 #, c-format
 msgid "can't find default font: `%s'"
 msgstr "ne peut reprérer la fonte par défaut: Â« %s Â»"
 
-#: all-font-metrics.cc:209 includable-lexer.cc:59 input-file-results.cc:218
+#: all-font-metrics.cc:205 includable-lexer.cc:59 input-file-results.cc:218
 #, c-format
 msgid "(search path: `%s')"
 msgstr "(chemin de recherche: Â« %s Â»)"
 
-#: all-font-metrics.cc:210
+#: all-font-metrics.cc:206
 msgid "Giving up"
 msgstr "Abandon"
 
@@ -781,12 +1450,12 @@ msgid "beam has less than two visible stems"
 msgstr "faisceau a moins que deux queues visibles"
 
 #: beam.cc:156
-msgid "removing beam with less than two stems"
-msgstr "retrait du faisceau ayant moins que deux tiges"
+msgid "Beam has less than two stems. Removing beam."
+msgstr "faisceau a moins de deux queues. Retrait du faisceau."
 
-#: beam.cc:1040
-msgid "no viable initial configuration found: may not find good beam slope"
-msgstr "pas de configuration initiale viable repérée: peut ne pas repérer une pente de faisceau"
+#: beam.cc:1041
+msgid "Not sure that we can find a nice beam slope (no viable initial configuration found)."
+msgstr "Pas certain que l'on puisse repérer un joli pente dans le faisceau (configuration initiale viable non repérée)"
 
 #: beam-engraver.cc:139
 msgid "already have a beam"
@@ -796,7 +1465,7 @@ msgstr "faisceau d
 msgid "unterminated beam"
 msgstr "faisceau non terminé"
 
-#: beam-engraver.cc:245 chord-tremolo-engraver.cc:179
+#: beam-engraver.cc:245 chord-tremolo-engraver.cc:191
 msgid "stem must have Rhythmic structure"
 msgstr "la queue doit avoir une structure rythmiique"
 
@@ -824,11 +1493,11 @@ msgstr "ne peut changer de 
 #.
 #. last->translator_id_string_  = get_change ()->change_to_id_string_;
 #.
-#: change-iterator.cc:87
+#: change-iterator.cc:80
 msgid "I'm one myself"
 msgstr "J'en suis un moi-même"
 
-#: change-iterator.cc:90
+#: change-iterator.cc:83
 msgid "none of these in my family"
 msgstr "aucun de ceux-ci dans ma famille"
 
@@ -837,7 +1506,7 @@ msgstr "aucun de ceux-ci dans ma famille"
 msgid "Chord tremolo with %d elements. Must have two elements."
 msgstr "Accord de tremolo avec %d Ã©léments. Doit avoir 2 Ã©léments."
 
-#: chord-tremolo-engraver.cc:141
+#: chord-tremolo-engraver.cc:153
 msgid "unterminated chord tremolo"
 msgstr "accord de tremolo non terminé"
 
@@ -919,10 +1588,9 @@ msgstr "(de)crescendo n'est pas termin
 msgid "Transposition by %s makes alteration larger than two"
 msgstr "Transposition faite par %s crée des altérations plus grande que deux"
 
-#: event.cc:72
-#, c-format
-msgid "octave check failed; expected %s, found: %s"
-msgstr "vérification de l'octave a Ã©choué; attendait %s, a obtenu: %s"
+#: event.cc:69 relative-octave-check.cc:25
+msgid "Failed octave check, got: "
+msgstr "échec de la vérification de l'octave, a obtenu: "
 
 #: event-chord-iterator.cc:56 output-property-music-iterator.cc:29
 #, c-format
@@ -981,13 +1649,9 @@ msgstr "N'a pas autant de crochets."
 msgid "Conflicting note group events."
 msgstr "Événements de groupe de notes conflictuels."
 
-#: hyphen-engraver.cc:96
-msgid "removing unterminated hyphen"
-msgstr "retrait du trait d'union non terminé"
-
-#: hyphen-engraver.cc:110
+#: hyphen-engraver.cc:96 hyphen-engraver.cc:110
 msgid "unterminated hyphen; removing"
-msgstr "retrait du trait d'union non terminé"
+msgstr "trait d'union non terminé; a Ã©té enlevé"
 
 #: includable-lexer.cc:50
 msgid "include files are not allowed"
@@ -1015,9 +1679,9 @@ msgstr "
 msgid "FIXME: key change merge"
 msgstr "FIXME: changement de fusion de clés"
 
-#: kpath.cc:75
+#: kpath.cc:76
 #, c-format
-msgid "kpathsea can not find TFM file: `%s'"
+msgid "Kpathsea couldn't find TFM file `%s'"
 msgstr "Kpathsea ne peut repérer le fichier TFM: Â« %s Â»"
 
 #: ligature-engraver.cc:152
@@ -1041,8 +1705,8 @@ msgid "unterminated ligature"
 msgstr "ligature non terminée"
 
 #: ligature-engraver.cc:279
-msgid "ignoring rest: ligature may not contain rest"
-msgstr "le reste est ignoré: la ligature ne peut contenir le reste"
+msgid "ligature may not contain rest; ignoring rest"
+msgstr "ligature ne peut contenir une pause; pause ignorée"
 
 #: ligature-engraver.cc:280
 msgid "ligature was started here"
@@ -1176,27 +1840,24 @@ msgid "Usage: %s [OPTIONS]... FILE..."
 msgstr "Usage: %s [OPTIONS]... FICHIER..."
 
 #: main.cc:199
-#, c-format
+#, fuzzy
 msgid "Typeset music and/or produce MIDI from FILE."
 msgstr "Composer la musique et/ou jouer en format MIDI Ã  partir du FICHIER"
 
 #: main.cc:201
-#, c-format
 msgid "LilyPond produces beautiful music notation."
 msgstr "LilyPond produit une jolie notation musicale"
 
 #: main.cc:203
 #, c-format
-msgid "For more information, see %s"
+msgid "For more information, see %s,"
 msgstr "Pour plus d'informations, voir %s"
 
 #: main.cc:369
-#, c-format
 msgid "This option is for developers only."
 msgstr "Cette option n'est disponible que pour les développeurs seulement."
 
 #: main.cc:370
-#, c-format
 msgid "Read the sources for more information."
 msgstr "Lire les fichiers source pour plus d'information."
 
@@ -1240,12 +1901,11 @@ msgstr "ton bizarre"
 #: midi-item.cc:273
 #, c-format
 msgid "Experimental: temporarily fine tuning (of %d cents) a channel."
-msgstr "Expérimental: mise au point fine temporaire (de %d cents) du canal."
+msgstr ""
 
 #: midi-stream.cc:40
-#, c-format
-msgid "could not write file: `%s'"
-msgstr "ne peut Ã©crire dans le fichier: Â« %s Â»"
+msgid "Could not write file. Disk full?"
+msgstr "Ne peut Ã©crire dans le fichier. Disque plein?"
 
 #: my-lily-lexer.cc:185
 #, c-format
@@ -1274,12 +1934,12 @@ msgstr "musique pour les martiens."
 
 #: new-fingering-engraver.cc:235
 msgid "Fingerings are also not down?! Putting them down anyway."
-msgstr "Les doigtés ne sont pas aussi abaissées?! On les abaisse de toutes manières."
+msgstr ""
 
 #: new-lyric-combine-music-iterator.cc:172
-#, c-format
-msgid "cannot find Voice: %s"
-msgstr "ne peut repérer les Voix: %s"
+#, fuzzy, c-format
+msgid "cannot find Voice: %s\n"
+msgstr "ne peut repérer le fichier: Â« %s Â»"
 
 #: note-collision.cc:384
 msgid "Too many clashing notecolumns.  Ignoring them."
@@ -1347,7 +2007,7 @@ msgstr "ne peut rep
 
 #: piano-pedal-engraver.cc:238
 msgid "Need 3 strings for piano pedals. No pedal made. "
-msgstr "Nécessite 3 cordes pour les pédales du piano. Aucune pédale n'a Ã©té créée."
+msgstr ""
 
 #: piano-pedal-engraver.cc:253 piano-pedal-engraver.cc:268
 #: piano-pedal-performer.cc:82
@@ -1356,9 +2016,9 @@ msgid "can't find start of piano pedal: `%s'"
 msgstr "ne peut repérer le début de la pédale de piano: Â« %s Â»"
 
 #: piano-pedal-engraver.cc:321
-#, c-format
+#, fuzzy, c-format
 msgid "can't find start of piano pedal bracket: `%s'"
-msgstr "ne peut repérer le début du crochet de la pédale de piano: Â« %s Â»"
+msgstr "ne peut repérer le début de la pédale de piano: Â« %s Â»"
 
 #: property-iterator.cc:94
 #, c-format
@@ -1370,50 +2030,40 @@ msgstr "N'est pas un nom de type grob, 
 msgid "In quotation: junking event %s"
 msgstr "Entre guillemets: Ã©vénement rebut Â« %s Â»"
 
-#: relative-octave-check.cc:25
-msgid "Failed octave check, got: "
-msgstr "échec de la vérification de l'octave, a obtenu: "
-
-#: rest.cc:137
+#: rest.cc:140
 #, c-format
-msgid "rest `%s' not found"
-msgstr "reste Â« %s Â» non repéré"
+msgid "rest `%s' not found"
+msgstr "symbole `%s' non repéré, "
 
 #: rest-collision.cc:145
 msgid "rest direction not set.  Cannot resolve collision."
-msgstr "le reste de la direction n'a pas Ã©té initialisé. Ne peut résoudre la collision."
+msgstr ""
 
 #: rest-collision.cc:193
 msgid "too many colliding rests"
 msgstr "trop de pauses en collision"
 
 #: scm-option.cc:52
-#, c-format
 msgid "lilypond -e EXPR means:"
 msgstr "lilypond -e EXPRESSION signifie:"
 
 #: scm-option.cc:54
-#, c-format
 msgid "  Evalute the Scheme EXPR before parsing any .ly files."
 msgstr "Evaluer l'EXPRESSION Scheme avant d'analyser les fichiers .ly"
 
 #: scm-option.cc:56
-#, c-format
 msgid "  Multiple -e options may be given, they will be evaluated sequentially."
 msgstr "Les options multiples -e peuvent Ãªtre fournis, elles seront Ã©valuées séquentiellement."
 
 #: scm-option.cc:58
-#, c-format
 msgid "  The function ly-set-option allows for access to some internal variables."
 msgstr "L'option de la fonction ly-set-option permet l'accès Ã  quelques variables internes."
 
 #: scm-option.cc:60
-#, c-format
-msgid "Usage: lilypond-bin -e \"(ly-set-option SYMBOL VAL)\""
-msgstr "Usage: lilypond-bin -e \"(ly-set-option SYMBOLE VALEUR)\""
+msgid "Usage: lilypond -e \"(ly-set-option SYMBOL VAL)\""
+msgstr "Usage: lilypond -e \"(ly-set-option SYMBOLE VALEUR)\""
 
 #: scm-option.cc:62
-#, c-format
 msgid "Where SYMBOL VAL pair is any of:"
 msgstr "Où la paire SYMBOLE VALEUR peut prendre les options suivantes:"
 
@@ -1481,10 +2131,10 @@ msgstr "ne peut rep
 msgid "Huh?  Got %d, expected %d characters"
 msgstr "Euh?  Obtenu %d caractères, on s'attendait Ã  %d"
 
-#: spacing-spanner.cc:385
+#: spacing-spanner.cc:386
 #, c-format
-msgid "Global shortest duration is %s"
-msgstr "La plus courte durée globale est %s"
+msgid "Global shortest duration is %s\n"
+msgstr "La plus petite durée globale est %s\n"
 
 #: spring-smob.cc:32
 #, c-format
@@ -1509,12 +2159,12 @@ msgstr "force du fanion `%s' non rep
 msgid "tremolo duration is too long"
 msgstr "durée du tremolo est trop longue"
 
-#: stem-engraver.cc:128
+#: stem-engraver.cc:126
 #, c-format
 msgid "Adding note head to incompatible stem (type = %d)"
 msgstr "Ajout d'une note de tête Ã  une hampe incompatible (type = %d)"
 
-#: stem-engraver.cc:129
+#: stem-engraver.cc:127
 msgid "Don't you want polyphonic voices instead?"
 msgstr "Ne désirez-vous pas de voix polyphoniques Ã  la place?"
 
@@ -1525,8 +2175,8 @@ msgstr "
 
 #: system.cc:335
 #, c-format
-msgid "Grob count %d"
-msgstr "Compteur grob %d"
+msgid "Grob count %d "
+msgstr "Éléments de type grob dénombrés %d."
 
 #: system.cc:349
 msgid "Calculating line breaks..."
@@ -1598,7 +2248,7 @@ msgstr "ne peut trouver: 
 
 #: tuplet-bracket.cc:448
 msgid "Killing tuplet bracket across linebreak."
-msgstr "Abandon des accolades de tuples Ã  travers le bris de ligne."
+msgstr ""
 
 #: vaticana-ligature.cc:92
 msgid "ascending vaticana style flexa"
@@ -1642,131 +2292,107 @@ msgstr "L'identificateur doit contenir des caract
 msgid "More alternatives than repeats.  Junking excess alternatives."
 msgstr "Plus d'alternatives que de répétitions. Rebuts dépasse la limite des alternatives."
 
-#: parser.yy:857 parser.yy:864
+#: parser.yy:856 parser.yy:863
 msgid "\\applycontext takes function argument"
 msgstr "\\applycontext nécessite un argument de fonction"
 
-#: parser.yy:1014
+#: parser.yy:1013
 msgid "\\apply takes function argument"
 msgstr "\\apply nécessite un argument de fonction"
 
-#: parser.yy:1377
+#: parser.yy:1376
 msgid "Can't find music"
 msgstr "ne peut trouver la musique"
 
-#: parser.yy:1495
+#: parser.yy:1494
+#, fuzzy
 msgid "Second argument must be pitch list."
-msgstr "Le second argument doit Ãªtre une liste de tons."
+msgstr "Le second argument doit Ãªtre un symbole"
 
-#: parser.yy:1532 parser.yy:1537 parser.yy:2070
+#: parser.yy:1531 parser.yy:1536 parser.yy:2069
 msgid "Have to be in Lyric mode for lyrics"
 msgstr "Doit Ãªtre en mode Lyric pour les paroles"
 
-#: parser.yy:1622
+#: parser.yy:1621
 msgid "Expecting string as script definition"
 msgstr "Chaîne attendue comme définition de script"
 
-#: parser.yy:1829 parser.yy:1884
+#: parser.yy:1828 parser.yy:1883
 #, c-format
 msgid "not a duration: %d"
 msgstr "n'est pas une durée: %d"
 
-#: parser.yy:1980
+#: parser.yy:1979
 msgid "Have to be in Note mode for notes"
 msgstr "Doit Ãªtre en mode Note pour les notes"
 
-#: parser.yy:2085
+#: parser.yy:2084
 msgid "Have to be in Chord mode for chords"
 msgstr "Doit Ãªtre en mode Chord pour les choeurs"
 
-#: parser.yy:2232
+#: parser.yy:2231
 msgid "need integer number arg"
 msgstr "A besoin d'un nombre entier pour l'argument"
 
-#: parser.yy:2383
+#: parser.yy:2382
 msgid "Suspect duration found following this beam"
 msgstr "Durée suspecte repéré après ce faisceau"
 
-#: lexer.ll:184
+#: lexer.ll:183
 #, c-format
-msgid "input renamed to: `%s'"
-msgstr "l'entrée a Ã©té renommée Ã : Â« %s Â»"
+msgid ""
+"\n"
+"Renamed input to `%s'\n"
+msgstr ""
+"\n"
+"L'entrée a Ã©té renommé Ã  Â« %s Â»\n"
 
-#: lexer.ll:210
+#: lexer.ll:208
 msgid "EOF found inside a comment"
 msgstr "Fin de fichier (EOF) Ã  l'intérieur du commentaire"
 
-#: lexer.ll:225
+#: lexer.ll:223
 msgid "\\maininput not allowed outside init files"
 msgstr "\\maininput n,est pas permis en dehord des fichiers init"
 
-#: lexer.ll:249
+#: lexer.ll:247
 #, c-format
 msgid "wrong or undefined identifier: `%s'"
 msgstr "identificateur erroné ou non défini: Â« %s Â»"
 
 #. backup rule
-#: lexer.ll:258
+#: lexer.ll:256
 msgid "Missing end quote"
 msgstr "Caractère de fin de citation manquant"
 
-#: lexer.ll:400
+#: lexer.ll:398
 msgid "Brace found at end of lyric.  Did you forget a space?"
 msgstr "Accolade repérée Ã  la fin des paroles. Avez-vous oublié un espace?"
 
-#: lexer.ll:501
+#: lexer.ll:499
+#, fuzzy
 msgid "Brace found at end of markup.  Did you forget a space?"
-msgstr "Accolade repérée Ã  la fin du marquage. Avez-vous oublié un espace?"
+msgstr "Accolade repérée Ã  la fin des paroles. Avez-vous oublié un espace?"
 
-#: lexer.ll:584
+#: lexer.ll:582
 #, c-format
 msgid "invalid character: `%c'"
 msgstr "caractère invalide: Â« %c Â»"
 
-#: lexer.ll:656 lexer.ll:657
+#: lexer.ll:654
 #, c-format
 msgid "unknown escaped string: `\\%s'"
 msgstr "chaîne d'échappement inconnue: Â« \\%s Â»"
 
-#: lexer.ll:754 lexer.ll:755
+#: lexer.ll:752
 #, c-format
 msgid "Incorrect lilypond version: %s (%s, %s)"
 msgstr "Version de lilypond incorrecte: %s (%s, %s)"
 
-#: lexer.ll:755 lexer.ll:756
+#: lexer.ll:753
 msgid "Consider updating the input with the convert-ly script"
 msgstr "Considérer la mise Ã  jour de l'entrée Ã  l'aide du script convert-ly"
 
-#~ msgid " 1998--2003"
-#~ msgstr " 1998--2003"
-
-#~ msgid " 2001--2004"
-#~ msgstr " 2001--2004"
-
-#~ msgid ""
-#~ "\n"
-#~ "Distributed under terms of the GNU General Public License. It comes with\n"
-#~ "NO WARRANTY."
-#~ msgstr ""
-#~ "\n"
-#~ "Distribué selon les termes de la GNU General Public License.  Le logiciel est fourni sans GARANTIE."
-
-#~ msgid "unknown accidental typesetting: %s. Ignored"
-#~ msgstr "mise en page accidentelle inconnue: %s. Ignorée"
-
-#~ msgid "Beam has less than two stems. Removing beam."
-#~ msgstr "faisceau a moins de deux queues. Retrait du faisceau."
-
-#~ msgid "Not sure that we can find a nice beam slope (no viable initial configuration found)."
-#~ msgstr "Pas certain que l'on puisse repérer un joli pente dans le faisceau (configuration initiale viable non repérée)"
-
-#~ msgid ""
-#~ "\n"
-#~ "Renamed input to `%s'\n"
-#~ msgstr ""
-#~ "\n"
-#~ "L'entrée a Ã©té renommé Ã  Â« %s Â»\n"
-
 #~ msgid "verbose"
 #~ msgstr "mode explicatif"
 
@@ -1855,6 +2481,9 @@ msgstr "Consid
 #~ msgid "staff symbol: indentation yields beyond end of line"
 #~ msgstr "symbole staff: l'indentation a cédé avant la fin de la ligne"
 
+#~ msgid "can't create directory: `%s'"
+#~ msgstr "ne peut créer le répertoire: Â« %s Â»"
+
 #~ msgid "No ties were created!"
 #~ msgstr "Aucun lien n'a Ã©té créé!"
 
@@ -2008,6 +2637,9 @@ msgstr "Consid
 #~ msgid "<stdin>"
 #~ msgstr "<stdin>"
 
+#~ msgid "programming error: "
+#~ msgstr "erreur de programmation: "
+
 #~ msgid "can't find start of beam"
 #~ msgstr "ne peut repérer le début du faisceau"
 
index 7b371de8e1279f7b10dc6f93e7a794dc963209fc..e04c4abfb984f96921b8b97b789142d7d9bfeeb6 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-04-03 19:27+0200\n"
+"POT-Creation-Date: 2004-03-31 16:22+0200\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"
@@ -21,7 +21,7 @@ msgid "lilylib module"
 msgstr ""
 
 #: lilylib.py:63 lilypond-book.py:84 lilypond.py:127 midi2ly.py:100
-#: mup2ly.py:75 old-lilypond-book.py:129 main.cc:139
+#: mup2ly.py:75 old-lilypond-book.py:129 main.cc:140
 msgid "print this help"
 msgstr ""
 
@@ -58,12 +58,12 @@ msgstr ""
 msgid "Usage: %s [OPTIONS]... FILE"
 msgstr ""
 
-#: lilylib.py:194 midi2ly.py:227 mup2ly.py:223 main.cc:204
+#: lilylib.py:194 midi2ly.py:227 mup2ly.py:223 main.cc:205
 #, c-format
 msgid "Options:"
 msgstr ""
 
-#: lilylib.py:198 midi2ly.py:231 mup2ly.py:227 main.cc:208
+#: lilylib.py:198 midi2ly.py:231 mup2ly.py:227 main.cc:209
 #, c-format, python-format
 msgid "Report bugs to %s."
 msgstr ""
@@ -129,7 +129,7 @@ msgstr ""
 
 #. Bug in option parser: --output=foe is taken as an abbreviation
 #. for --output-format.
-#: lilypond-book.py:82 old-lilypond-book.py:123 main.cc:138
+#: lilypond-book.py:82 old-lilypond-book.py:123 main.cc:139
 msgid "EXT"
 msgstr ""
 
@@ -146,7 +146,7 @@ msgid "pipe snippets through FILTER [convert-ly -n -]"
 msgstr ""
 
 #: lilypond-book.py:85 lilypond-book.py:87 lilypond.py:131
-#: old-lilypond-book.py:130 main.cc:141 main.cc:146
+#: old-lilypond-book.py:130 main.cc:142 main.cc:147
 msgid "DIR"
 msgstr ""
 
@@ -167,7 +167,7 @@ msgid "write output to DIR"
 msgstr ""
 
 #: lilypond-book.py:88 lilypond.py:149 midi2ly.py:105 mup2ly.py:78
-#: old-lilypond-book.py:140 main.cc:149
+#: old-lilypond-book.py:140 main.cc:150
 msgid "be verbose"
 msgstr ""
 
@@ -176,7 +176,7 @@ msgid "print version information"
 msgstr ""
 
 #: lilypond-book.py:90 lilypond.py:151 midi2ly.py:107 mup2ly.py:80
-#: old-lilypond-book.py:142 main.cc:150
+#: old-lilypond-book.py:142 main.cc:151
 msgid "show warranty and copyright"
 msgstr ""
 
@@ -267,7 +267,7 @@ msgid "print even more output"
 msgstr ""
 
 #: lilypond.py:129 lilypond.py:136 midi2ly.py:102 old-lilypond-book.py:136
-#: old-lilypond-book.py:137 main.cc:142 main.cc:145
+#: old-lilypond-book.py:137 main.cc:143 main.cc:146
 msgid "FILE"
 msgstr ""
 
@@ -292,11 +292,11 @@ msgstr ""
 msgid "don't run LilyPond"
 msgstr ""
 
-#: lilypond.py:135 main.cc:144
+#: lilypond.py:135 main.cc:145
 msgid "produce MIDI output only"
 msgstr ""
 
-#: lilypond.py:136 midi2ly.py:102 mup2ly.py:76 main.cc:145
+#: lilypond.py:136 midi2ly.py:102 mup2ly.py:76 main.cc:146
 msgid "write output to FILE"
 msgstr ""
 
@@ -352,7 +352,7 @@ msgstr ""
 msgid "change global setting KEY to VAL"
 msgstr ""
 
-#: lilypond.py:150 midi2ly.py:106 mup2ly.py:79 main.cc:148
+#: lilypond.py:150 midi2ly.py:106 mup2ly.py:79 main.cc:149
 msgid "print version number"
 msgstr ""
 
@@ -709,7 +709,7 @@ msgstr ""
 msgid "Accidental rule must be pair or context-name; Found %s"
 msgstr ""
 
-#: afm.cc:154
+#: afm.cc:145
 #, c-format
 msgid "Error parsing AFM file: `%s'"
 msgstr ""
@@ -816,11 +816,11 @@ msgstr ""
 #.
 #. last->translator_id_string_  = get_change ()->change_to_id_string_;
 #.
-#: change-iterator.cc:93
+#: change-iterator.cc:87
 msgid "I'm one myself"
 msgstr ""
 
-#: change-iterator.cc:96
+#: change-iterator.cc:90
 msgid "none of these in my family"
 msgstr ""
 
@@ -957,16 +957,6 @@ msgstr ""
 msgid "implied \\%s added"
 msgstr ""
 
-#: grob-interface.cc:73
-#, c-format
-msgid "Unknown interface `%s'"
-msgstr ""
-
-#: grob-interface.cc:84
-#, c-format
-msgid "Grob `%s' has no interface for property `%s'"
-msgstr ""
-
 #: hairpin.cc:98
 msgid "decrescendo too small"
 msgstr ""
@@ -1081,7 +1071,7 @@ msgstr ""
 msgid "round filled box vertical extent smaller than blot; decreasing blot"
 msgstr ""
 
-#: main.cc:99
+#: main.cc:100
 msgid ""
 "This program is free software.  It is covered by the GNU General Public\n"
 "License and you are welcome to change it and/or distribute copies of it\n"
@@ -1089,7 +1079,7 @@ msgid ""
 "information.\n"
 msgstr ""
 
-#: main.cc:105
+#: main.cc:106
 msgid ""
 "    This program is free software; you can redistribute it and/or\n"
 "modify it under the terms of the GNU General Public License version 2\n"
@@ -1106,47 +1096,47 @@ msgid ""
 "Boston, MA 02111-1307, USA.\n"
 msgstr ""
 
-#: main.cc:134
+#: main.cc:135
 msgid "EXPR"
 msgstr ""
 
-#: main.cc:135
+#: main.cc:136
 msgid "set options, use -e '(ly-option-usage)' for help"
 msgstr ""
 
-#: main.cc:138
+#: main.cc:139
 msgid "use output format EXT"
 msgstr ""
 
-#: main.cc:140
+#: main.cc:141
 msgid "FIELD"
 msgstr ""
 
-#: main.cc:140
+#: main.cc:141
 msgid "write header field to BASENAME.FIELD"
 msgstr ""
 
-#: main.cc:141
+#: main.cc:142
 msgid "add DIR to search path"
 msgstr ""
 
-#: main.cc:142
+#: main.cc:143
 msgid "use FILE as init file"
 msgstr ""
 
-#: main.cc:143
+#: main.cc:144
 msgid "write Makefile dependencies"
 msgstr ""
 
-#: main.cc:146
+#: main.cc:147
 msgid "prepend DIR to dependencies"
 msgstr ""
 
-#: main.cc:147
+#: main.cc:148
 msgid "run in safe mode"
 msgstr ""
 
-#: main.cc:170
+#: main.cc:171
 #, c-format
 msgid ""
 "Copyright (c) %s by\n"
@@ -1154,32 +1144,32 @@ msgid ""
 msgstr ""
 
 #. No version number or newline here.  It confuses help2man.
-#: main.cc:196
+#: main.cc:197
 #, c-format
 msgid "Usage: %s [OPTIONS]... FILE..."
 msgstr ""
 
-#: main.cc:198
+#: main.cc:199
 #, c-format
 msgid "Typeset music and/or produce MIDI from FILE."
 msgstr ""
 
-#: main.cc:200
+#: main.cc:201
 #, c-format
 msgid "LilyPond produces beautiful music notation."
 msgstr ""
 
-#: main.cc:202
+#: main.cc:203
 #, c-format
 msgid "For more information, see %s"
 msgstr ""
 
-#: main.cc:368
+#: main.cc:369
 #, c-format
 msgid "This option is for developers only."
 msgstr ""
 
-#: main.cc:369
+#: main.cc:370
 #, c-format
 msgid "Read the sources for more information."
 msgstr ""
@@ -1274,7 +1264,7 @@ msgstr ""
 msgid "note head `%s' not found"
 msgstr ""
 
-#: paper-def.cc:89
+#: paper-def.cc:73
 #, c-format
 msgid "paper output to `%s'..."
 msgstr ""
@@ -1288,8 +1278,7 @@ msgstr ""
 msgid "Preprocessing graphical objects..."
 msgstr ""
 
-#. prevent warning
-#: parse-scm.cc:82
+#: parse-scm.cc:81
 msgid "GUILE signaled an error for the expression beginning here"
 msgstr ""
 
@@ -1619,60 +1608,60 @@ msgstr ""
 msgid "Also have a stopped spanner.  Giving up."
 msgstr ""
 
-#: parser.yy:80
+#: parser.yy:114
 msgid "Tag must be symbol or list of symbols."
 msgstr ""
 
-#: parser.yy:510
+#: parser.yy:513
 msgid "Identifier should have alphabetic characters only"
 msgstr ""
 
-#: parser.yy:773
+#: parser.yy:776
 msgid "More alternatives than repeats.  Junking excess alternatives."
 msgstr ""
 
-#: parser.yy:854 parser.yy:861
+#: parser.yy:857 parser.yy:864
 msgid "\\applycontext takes function argument"
 msgstr ""
 
-#: parser.yy:1011
+#: parser.yy:1014
 msgid "\\apply takes function argument"
 msgstr ""
 
-#: parser.yy:1374
+#: parser.yy:1377
 msgid "Can't find music"
 msgstr ""
 
-#: parser.yy:1497
+#: parser.yy:1495
 msgid "Second argument must be pitch list."
 msgstr ""
 
-#: parser.yy:1534 parser.yy:1539 parser.yy:2071
+#: parser.yy:1532 parser.yy:1537 parser.yy:2070
 msgid "Have to be in Lyric mode for lyrics"
 msgstr ""
 
-#: parser.yy:1624
+#: parser.yy:1622
 msgid "Expecting string as script definition"
 msgstr ""
 
-#: parser.yy:1831 parser.yy:1885
+#: parser.yy:1829 parser.yy:1884
 #, c-format
 msgid "not a duration: %d"
 msgstr ""
 
-#: parser.yy:1981
+#: parser.yy:1980
 msgid "Have to be in Note mode for notes"
 msgstr ""
 
-#: parser.yy:2086
+#: parser.yy:2085
 msgid "Have to be in Chord mode for chords"
 msgstr ""
 
-#: parser.yy:2233
+#: parser.yy:2232
 msgid "need integer number arg"
 msgstr ""
 
-#: parser.yy:2384
+#: parser.yy:2383
 msgid "Suspect duration found following this beam"
 msgstr ""
 
index 30f42c63b187ba278e7fc0af855de69f1abedf86..2553892e9da22aa7d1cb20aa08b61ce1dcddea75 100644 (file)
--- a/po/nl.po
+++ b/po/nl.po
@@ -9,18 +9,19 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: lilypond 2.2.0\n"
+"Project-Id-Version: lilypond 2.1.36\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2004-03-31 16:22+0200\n"
-"PO-Revision-Date: 2004-04-11 11:01+0200\n"
+"PO-Revision-Date: 2004-03-31 16:21+0200\n"
 "Last-Translator: Jan Nieuwenhuizen <janneke@gnu.org>\n"
-"Language-Team: Dutch <vertaling@nl.linux.org>\n"
+"Language-Team: Dutch <nl@li.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Date: 2001-05-09 23:29+0200\n"
 "From:  <janneke@gnu.org>\n"
-"Xgettext-Options: --c++ --default-domain=lilypond --join --output-dir=../po --add-comments --keyword=_\n"
+"Xgettext-Options: --c++ --default-domain=lilypond --join --output-dir=../po "
+"--add-comments --keyword=_\n"
 "Files: bow.cc int.cc\n"
 
 #: lilylib.py:60
@@ -138,7 +139,8 @@ msgstr ""
 "Verwerk LilyPond snippers in hybride HTML, LaTeX of texinfo dokument.\n"
 "Gebruiksvoorbeeld:\n"
 "   lilypond-book --filter=\\\"tr '[a-z]' '[A-Z]'\\\" BOEK\\n\"\n"
-"   lilypond-book --filter=\\\"convert-ly --no-version --from=2.0.0 -\\\" BOEK\\n\n"
+"   lilypond-book --filter=\\\"convert-ly --no-version --from=2.0.0 -\\\" BOEK"
+"\\n\n"
 "   lilypond-book --process='lilypond-bin -I invoeging' BOEK\\n\"\n"
 
 #. Bug in option parser: --output=foe is taken as an abbreviation
@@ -455,15 +457,19 @@ msgstr "bestandsnaam mag geen spaties bevatten: `%s'"
 
 #: lilypond.py:880
 msgid "Running LilyPond failed. Rerun with --verbose for a trace."
-msgstr "Draaien van LilyPond gefaald. Draai opnieuw met --verbose voor een foutpad."
+msgstr ""
+"Draaien van LilyPond gefaald. Draai opnieuw met --verbose voor een foutpad."
 
 #: lilypond.py:921
 msgid "Failed to make PS file. Rerun with --verbose for a trace."
-msgstr "Gefaald in het maken van een PS bestand.  Draai opnieuw met --verbose voor een foutpad."
+msgstr ""
+"Gefaald in het maken van een PS bestand.  Draai opnieuw met --verbose voor "
+"een foutpad."
 
 #: lilypond.py:951
 msgid "Running LaTeX failed. Rerun with --verbose for a trace."
-msgstr "Draaien van LaTeX gefaald.  Draai opnieuw met --verbose voor een foutpad."
+msgstr ""
+"Draaien van LaTeX gefaald.  Draai opnieuw met --verbose voor een foutpad."
 
 #: lilypond.py:963 input-file-results.cc:74
 #, c-format, python-format
@@ -750,7 +756,9 @@ msgstr "Draai opnieuw met -V voor het tonen van fontpaden."
 
 #: all-font-metrics.cc:111
 msgid "A script for removing font-files is delivered with the source-code:"
-msgstr "Een script ter verwijdering van fontbestanden is meegeleverd bij de bron-code:"
+msgstr ""
+"Een script ter verwijdering van fontbestanden is meegeleverd bij de bron-"
+"code:"
 
 #: all-font-metrics.cc:192
 #, c-format
@@ -759,12 +767,12 @@ msgstr "kan font niet vinden: `%s'"
 
 #: all-font-metrics.cc:193
 msgid "Loading default font"
-msgstr "Laden van standaardfont"
+msgstr "Laad verstek font"
 
 #: all-font-metrics.cc:208
 #, c-format
 msgid "can't find default font: `%s'"
-msgstr "kan standaardfont niet vinden: `%s'"
+msgstr "kan verstekfont niet vinden: `%s'"
 
 #: all-font-metrics.cc:209 includable-lexer.cc:59 input-file-results.cc:218
 #, c-format
@@ -794,7 +802,9 @@ msgstr "verwijderen van waardestreep met minder dan twee stokken"
 
 #: beam.cc:1040
 msgid "no viable initial configuration found: may not find good beam slope"
-msgstr "geen werkbare initiële configuratie gevonden: kan wellicht geen goede waardestreephelling kunnen vinden"
+msgstr ""
+"geen werkbare initiële configuratie gevonden: kan wellicht geen goede "
+"waardestreephelling kunnen vinden"
 
 #: beam-engraver.cc:139
 msgid "already have a beam"
@@ -1081,11 +1091,14 @@ msgstr "Type contole gefaald voor `%s'; waarde `%s' moet type hebben: `%s'"
 
 #: lookup.cc:169
 msgid "round filled box horizontal extent smaller than blot; decreasing blot"
-msgstr "rond gevulde doos horizontale afmetingen kleiner dan blot; verkleinen van blot"
+msgstr ""
+"rond gevulde doos horizontale afmetingen kleiner dan blot; verkleinen van "
+"blot"
 
 #: lookup.cc:174
 msgid "round filled box vertical extent smaller than blot; decreasing blot"
-msgstr "rond gevulde doos vertikale afmetingen kleiner dan blot; verkleinen van blot"
+msgstr ""
+"rond gevulde doos vertikale afmetingen kleiner dan blot; verkleinen van blot"
 
 #: main.cc:100
 msgid ""
@@ -1409,13 +1422,18 @@ msgstr "  Evalueer de Scheme EXPR alvorens enig .ly bestand te ontleden."
 
 #: scm-option.cc:56
 #, c-format
-msgid "  Multiple -e options may be given, they will be evaluated sequentially."
-msgstr "  Verscheidene -e opties mogen worden gegeven, deze zullen sequentieel worden geëvalueerd."
+msgid ""
+"  Multiple -e options may be given, they will be evaluated sequentially."
+msgstr ""
+"  Verscheidene -e opties mogen worden gegeven, deze zullen sequentieel "
+"worden geëvalueerd."
 
 #: scm-option.cc:58
 #, c-format
-msgid "  The function ly-set-option allows for access to some internal variables."
-msgstr "  De functie ly-set-option verschaft toegang tot bepaalde interne variabelen."
+msgid ""
+"  The function ly-set-option allows for access to some internal variables."
+msgstr ""
+"  De functie ly-set-option verschaft toegang tot bepaalde interne variabelen."
 
 #: scm-option.cc:60
 #, c-format
@@ -1569,7 +1587,8 @@ msgstr "TFM kop van `%s' heeft slechts %u woord(en)"
 #: tfm-reader.cc:142
 #, c-format
 msgid "%s: TFM file has %u parameters, which is more than the %u I can handle"
-msgstr "%s: TFM bestand heeft %u parameters, wat meer is dan de %u die ik aan kan"
+msgstr ""
+"%s: TFM bestand heeft %u parameters, wat meer is dan de %u die ik aan kan"
 
 #: tie-engraver.cc:164
 msgid "lonely tie"
@@ -1584,7 +1603,7 @@ msgstr "niemand om een x-ool start haak af te drukken"
 #: time-signature.cc:95
 #, c-format
 msgid "time signature symbol `%s' not found; reverting to numbered style"
-msgstr "maatsoortsymbool `%s' niet gevonden; val terug op numerieke stijl"
+msgstr "maatsoortsymbool `%s' niet gevondend; val terug op numerieke stijl"
 
 #.
 #. Todo: should make typecheck?
@@ -1620,15 +1639,19 @@ msgstr "Vaticana_ligature: nulsamenvoeging (delta_pitch == 0)"
 
 #: vaticana-ligature-engraver.cc:342
 #, c-format
-msgid "ignored prefix (es) `%s' of this head according to restrictions of the selected ligature style"
+msgid ""
+"ignored prefix (es) `%s' of this head according to restrictions of the "
+"selected ligature style"
 msgstr ""
-"negeren van voorvoegsel (es) `%s' van dit bolletje volgens restricties van de\n"
+"negeren van voorvoegsel (es) `%s' van dit bolletje volgens restricties van "
+"de\n"
 "geselecteerde ligatuurstijl"
 
 #: vaticana-ligature-engraver.cc:572
 #, c-format
 msgid "Vaticana_ligature_engraver: setting `spacing-increment = %f': ptr=%ul"
-msgstr "Vaticana_ligature_engraver: instelling `spacing-increment = %f': ptr=%ul"
+msgstr ""
+"Vaticana_ligature_engraver: instelling `spacing-increment = %f': ptr=%ul"
 
 #: volta-engraver.cc:140
 msgid "No volta spanner to end"
@@ -1652,7 +1675,8 @@ msgstr "Identifier mag uitsluitend alfabetische tekens hebben"
 
 #: parser.yy:776
 msgid "More alternatives than repeats.  Junking excess alternatives."
-msgstr "Meer alternatieven dan herhalingen.  Schroot overvloedige alternatieven."
+msgstr ""
+"Meer alternatieven dan herhalingen.  Schroot overvloedige alternatieven."
 
 #: parser.yy:857 parser.yy:864
 msgid "\\applycontext takes function argument"
@@ -1748,9 +1772,3 @@ msgstr "Verkeerde lilypond versie: %s (%s, %s)"
 #: lexer.ll:755 lexer.ll:756
 msgid "Consider updating the input with the convert-ly script"
 msgstr "Overweeg het actualiseren van de invoer met het convert-ly script"
-
-#~ msgid "Unknown interface `%s'"
-#~ msgstr "onbekende interface `%s'"
-
-#~ msgid "Grob `%s' has no interface for property `%s'"
-#~ msgstr "Grob `%s' heeft geen interface voor eigenschap `%s'"
index edd8448155b9180914a47431e81cb10e090f4b95..b4116e2b21276363c483052fb4b85d47852856f0 100644 (file)
@@ -9,9 +9,18 @@
 % To let gs load fonts from builddir, do:
 % export GS_LIB=$(pwd)/mf/out:/usr/share/texmf/fonts/type1/bluesky/cm
 
+/staff-line-thickness lilypondpaperlinethickness def
+/staff-height lilypondpaperstaffheight def
+/line-width lilypondpaperlinewidth def
+
+/lily-output-units 2.83464  def  %% milimeter
+% /lily-output-units 0.996264  def  %% true points.
+
+/output-scale lilypondpaperoutputscale lily-output-units mul def
 
 /set-ps-scale-to-lily-scale { output-scale output-scale scale } bind def
 
+/paper-size { lilypondpaperpapersize } bind def
 
 /init-paper {
        gsave
     end
 } bind def
 
+/start-page
+{
+} bind def
+
+/stop-page
+{
+    showpage
+} bind def
+
+/stop-last-page
+{
+} bind def
+
 /start-system % x y
 {
     gsave
index 25b3f2db7b1503916e6390be800114325952b249..39374dae2176cb367932fd987dbaa60ef9256aee 100644 (file)
@@ -3,6 +3,8 @@
 % Functions for direct and embedded PostScript
 
 
+/blot-diameter { lilypondpaperblotdiameter } bind def
+
 /set_tex_dimen {
        cvr def     
 } bind def
 % Nice rectangle with rounded corners
 /draw_box % breapth width depth height
 {
-%      currentdict /testing known {
+       currentdict /testing known {
                %% real thin lines for testing
                /blot 0.005 def
-%      }{
-%              /blot blot-diameter def
-%      } ifelse
+       }{
+               /blot blot-diameter def
+       } ifelse
 
        0 setlinecap
        blot setlinewidth
        0 360 arc closepath fill stroke
 } bind def
 
-/draw_white_dot % x1 y2 R
-{
-%      0 360 arc fill stroke
-       0 360 arc closepath % fill stroke 
-gsave
- 1 setgray fill 
-grestore 
-%      0 360 arc closepath % fill stroke 
-  0.05 setlinewidth 0 setgray stroke
-} bind def
-
 /draw_dashed_line % dash thickness dx dy
 { 
        1 setlinecap 
index df6ee12a6178a0202b7aee3f98a1cd98bcb99ddf..b3dde26a20795792a3899d1dae072ed203750b71 100644 (file)
@@ -129,8 +129,7 @@ def exit (i):
        if __main__.verbose_p:
                raise _ ('Exiting (%d)...') % i
        else:
-               print 'ex thoto' , i 
-               sys.exit (i)
+               sys.exit (1)
                
 def getopt_args (opts):
        '''Construct arguments (LONG, SHORT) for getopt from  list of options.'''
@@ -277,7 +276,7 @@ def read_pipe (cmd, mode = 'r'):
                if error_log_file:
                        os.unlink (error_log_file)
 
-               exit (1)
+               exit (status)
                
        if __main__.verbose_p:
                progress ('\n')
@@ -333,7 +332,7 @@ Exit status of CMD '''
                                sys.stderr.write (open (error_log_file).read ())
                        if error_log_file:
                                os.unlink (error_log_file)
-                       exit (1)
+                       exit (status)
 
        if error_log_file:
                os.unlink (error_log_file)
@@ -434,7 +433,6 @@ def print_environment ():
        for (k,v) in os.environ.items ():
                sys.stderr.write ("%s=\"%s\"\n" % (k, v)) 
 
-BOUNDING_BOX_RE = '^%%BoundingBox: (-?[0-9]+) (-?[0-9]+) (-?[0-9]+) (-?[0-9]+)'
 def get_bbox (filename):
        bbox = filename + '.bbox'
        ## -sOutputFile does not work with bbox?
@@ -442,7 +440,8 @@ def get_bbox (filename):
              (filename, bbox)
        system (cmd, progress_p = 1)
        box = open (bbox).read ()
-       m = re.match (BOUNDING_BOX_RE, box)
+       m = re.match ('^%%BoundingBox: ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)',
+                     box)
        gr = []
        if m:
                gr = map (string.atoi, m.groups ())
@@ -457,22 +456,15 @@ def make_ps_images (ps_name, resolution = 90):
        base = re.sub (r'\.e?ps', '', ps_name)
        
        header = open (ps_name).read (1024)
-
-       match = re.match (BOUNDING_BOX_RE, header)
-       bbox = []
-       if match:
-               bbox = map (string.atoi, match.groups ())
-
        multi_page = re.search ('\n%%Pages: ', header)
        cmd = ''
 
        if multi_page == None:
-
-               if bbox == []:
-                       bbox = get_bbox (ps_name)
-                       
+               bbox = get_bbox (ps_name)
                trans_ps = ps_name + '.trans.ps'
                output_file = re.sub (r'\.e?ps', '.png', ps_name)
+       
+
 
                # need to have margin, otherwise edges of letters will
                # be cropped off.
@@ -516,8 +508,3 @@ def make_ps_images (ps_name, resolution = 90):
                os.unlink (png)
                error (_ ("Removing output file"))
                exit (1)
-
-
-       cmd = r'''gs -s  -sDEVICE=pnggray  -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=%s -dNOPAUSE -r%d %s -c quit''' % (output_file,
-                                                                                                                                     resolution, ps_name)
-
index fc2906cacdb707e91ab86163b2a70209abfb572f..f815a2ecba4c8f90bfd28d1b5b224a3180036cab 100644 (file)
@@ -18,6 +18,7 @@ midi.parse (s)
 
 */
 
+#include "config.h"
 #include <Python.h>
 
 #if 0
index 104793b86ffe57ea54dd63060cd4de6f161d15f0..4d7b19e24781f469381243377cbc931bd03aff9b 100644 (file)
@@ -16,8 +16,8 @@
         (acc  (ly:music-property fig-music 'alteration))
         (acc-markup #f)
         (fig-markup
-         (if (markup? fig)
-             fig
+         (if (string? fig)
+             (make-number-markup (make-simple-markup fig))
              (if align-accs (make-simple-markup " ")
                  (if (not (eq? acc '()))
                      (make-simple-markup "")
index c464392c665c84ab796203c1d10da2c306febd28..2890451ba5dafca48475b1dabc3b5e01fde425a5 100644 (file)
@@ -105,6 +105,8 @@ beaming patterns from stem to stem inside a beam.")
 called before line breaking, but after splitting breakable items at
 potential line breaks.")
      (between-cols ,pair? "Where to attach a loose column to")
+     (between-system-string ,string? "string
+ to dump between two systems. Useful for forcing page breaks.")
      (bracket-thick ,number? "width of a system start bracket.")
      (break-align-symbol ,symbol? "This key is used for aligning and
 spacing breakable items.")
@@ -228,10 +230,8 @@ flag.")
      (stroke-style ,string? "set to \"grace\" to turn stroke through flag on.")
      (flag-width-function ,procedure? "Procedure that computes the width of a half-beam (a non-connecting beam.).")
      (font-family ,symbol? "The font family is the broadest category for selecting text fonts. Options include: @code{sans}, @code{roman} ")
-     (font-encoding ,symbol? "The font encoding is the broadest
-category for selecting a font. Options include: @code{fetaMusic},
-@code{fetaNumber}, @code{TeX-text}, @code{TeX-math}, @code{fetaBraces},
-@code{fetaDynamic}")
+     (font-encoding ,symbol? "The font encoding is the broadest category for selecting a font. Options include: @code{music}, @code{number}, @code{text},
+@code{math}, @code{braces}, @code{dynamic}")
      (font-name ,string? "Specifies a file name (without extension) of
 the font to load.  This setting override selection using
 @code{font-family}, @code{font-series} and @code{font-shape}.")
@@ -349,15 +349,11 @@ pairs.}")
 
      (padding ,ly:dimension? "Add this much extra space between
 objects that are next to each other.")
-     (page-penalty ,number? "Penalty for page break at
-this column.  10000 or more means forbid linebreak, -10000 or less
-means force page break.  Other values influence page breaking decisions
+     (penalty ,number? "Penalty for breaking at
+this column. 10000 or more means forbid linebreak, -10000 or less
+means force linebreak.  Other values influence linebreaking decisions
 as a real penalty.")
-     (penalty ,number? "Penalty for line break at
-this column.  10000 or more means forbid line break, -10000 or less
-means force line break.  Other values influence line breaking decisions
-as a real penalty.")
-
+     
      (pitch-max ,ly:pitch? "Top pitch for ambitus.")
      (pitch-min ,ly:pitch? "Bottom pitch for ambitus.")
 
index dff0c8b851b579c32cf1f2da667c07f11e0fb88b..171219a8d2d7adf4b28bac30e0c763189b1bbff9 100644 (file)
                          (print-function . ,Percent_repeat_item_interface::double_percent)
                          (breakable . #t)
                          (slope . 1.0)
-                         (font-encoding . fetaMusic)
+                         (font-encoding . music)
                          (width . 2.0)
                          (thickness . 0.48)
                          (break-align-symbol . staff-bar)
        (no-spacing-rods . #t)
        (script-priority . 100)
        (font-series . bold)
-       (font-encoding . fetaDynamic)
+       (font-encoding . dynamic)
        (font-shape . italic)
        (self-alignment-Y . 0)
        (meta . ((interfaces . (font-interface text-interface self-alignment-interface  dynamic-interface script-interface item-interface))))
        (self-alignment-X . 0)
        (self-alignment-Y . 0)
        (script-priority . 100)
-       (font-encoding . fetaNumber)
+       (font-encoding . number)
        (font-size . -5)                ; don't overlap when next to heads.
        (meta . ((interfaces . (finger-interface font-interface text-script-interface text-interface side-position-interface self-alignment-interface item-interface ))))
        ))
        (thick-thickness . 6.6)
        (hair-thickness . 2.0)
        (padding . 1)
-       (font-encoding . fetaMusic)
+       (font-encoding . music)
        (meta . ((interfaces . (multi-measure-rest-interface multi-measure-interface rest-interface font-interface staff-symbol-referencer-interface))))
        ))
     
        (direction . 1)
        (padding . 1.3)
        (staff-padding . 1.3)
-       (font-encoding . fetaNumber)
+       (font-encoding . number)
        (meta . ((interfaces . (side-position-interface multi-measure-interface self-alignment-interface font-interface spanner-interface text-interface))))
        ))
     (MultiMeasureRestText
        (print-function . ,Multi_measure_rest::percent)
        (slope . 1.0)
        (thickness . 0.48)
-       (font-encoding . fetaMusic)
+       (font-encoding . music)
        (meta . ((interfaces . (multi-measure-rest-interface  spanner-interface font-interface percent-repeat-interface))))
        ))
 
        ;; (script-priority . 0) priorities for scripts, see script.scm
        (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
        (before-line-breaking-callback . ,Script_interface::before_line_breaking)
-       (font-encoding . fetaMusic)
+       (font-encoding . music)
        (meta . ((interfaces . (script-interface side-position-interface font-interface item-interface ))))
        ))
 
        (glyph . "brace")
        (print-function . ,System_start_delimiter::print)
        (collapse-height . 5.0)
-       (font-encoding . fetaBraces)
+       (font-encoding . braces)
        (Y-extent-callback . #f)
        (meta . ((interfaces . (system-start-delimiter-interface font-interface))))
        ))
        (print-function . ,Volta_bracket_interface::print)
        (direction . 1)
        (padding . 1)
-       (font-encoding . fetaNumber)
+       (font-encoding . number)
        (Y-offset-callbacks . (,Side_position_interface::aligned_side))
        (thickness . 1.6)  ;  linethickness
        (height . 2.0) ; staffspace;
index 1acf6f7e8b6767e9078f8ae18571bca411de4eca..046dee06f6d68bfebfb479ba2a175e9d8de42d09 100644 (file)
 ;;     syntax, description and example. 
 
 
-(def-markup-command (stencil paper props stil) (ly:stencil?)
-  "Stencil as markup"
-  stil)
-
-
-(def-markup-command (score paper props score) (ly:score?)
-  (let*
-      ((systems (ly:score-embedded-format score paper))
-       (1st (vector-ref systems 0))
-       (stencil (ly:paper-system-stencil 1st)) )
-
-    (ly:stencil-align-to! stencil Y CENTER)
-    (display (ly:stencil-extent stencil X))
-    (display (ly:stencil-extent stencil Y))
-;    (set! stencil (ly:stencil-translate-axis stencil -20 X))
-;    (set! stencil (ly:stencil-translate-axis stencil 20 Y))
-    stencil))
-
+(def-markup-command (word paper props str) (string?)
+  "A single word."
+  (interpret-markup paper props str))
+  
 (def-markup-command (simple paper props str) (string?)
-  "A simple text string; @code{\\markup @{ foo @}} is equivalent with
+  "A simple text-string; @code{\\markup @{ foo @}} is equivalent with
 @code{\\markup @{ \\simple #\"foo\" @}}."
-    (interpret-markup paper props str))
-
-(def-markup-command (encoded-simple paper props sym str) (symbol? string?)
-  "A text string, encoded with encoding @var{sym}. "
-  (Text_item::interpret_string paper
-                              props sym str))
+    (interpret-markup paper props
+                     (make-word-markup str)))
 
-;; TODO: use font recoding.
-;;                   (make-line-markup
-;;                    (map make-word-markup (string-tokenize str)))))
+; todo: use font recoding.
+;                    (make-line-markup
+;                     (map make-word-markup (string-tokenize str)))))
 
 (define-public empty-markup
   (make-simple-markup ""))
@@ -69,9 +51,9 @@
                           (if (= word-count 1) 2 (- word-count 1)))))
        (line-stencils (if (= word-count 1)
                           (map (lambda (x) (interpret-markup paper props x))
-                               (list (make-simple-markup "")
-                                     (make-stencil-markup (car stencils))
-                                     (make-simple-markup "")))
+                               (list (make-word-markup "")
+                                     (car markups)
+                                     (make-word-markup "")))
                                stencils)))
     (stack-stencil-line fill-space line-stencils)))
   
@@ -90,11 +72,9 @@ determines the space between each markup in @var{args}."
 
 (def-markup-command (combine paper props m1 m2) (markup? markup?)
   "Print two markups on top of each other."
-  (let*
-      ((s1 (interpret-markup paper props m1))
-       (s2 (interpret-markup paper props m2)))
-            
-    (ly:stencil-add s1 s2)))
+  (ly:stencil-add
+   (interpret-markup paper props m1)
+   (interpret-markup paper props m2)))
 
 (def-markup-command (finger paper props arg) (markup?)
   "Set the argument as small numbers."
@@ -143,7 +123,7 @@ Use @code{\\fontsize} otherwise."
   "Set font family to @code{number}, which yields the font used for
 time signatures and fingerings.  This font only contains numbers and
 some punctuation. It doesn't have any letters.  "
-  (interpret-markup paper (prepend-alist-chain 'font-encoding 'fetaNumber props) arg))
+  (interpret-markup paper (prepend-alist-chain 'font-encoding 'number props) arg))
 
 (def-markup-command (roman paper props arg) (markup?)
   "Set font family to @code{roman}."
@@ -187,7 +167,7 @@ some punctuation. It doesn't have any letters.  "
 normal words (like ``pi@`{u}'') should be done in a different font.  The
 recommend font for this is bold and italic"
   (interpret-markup
-   paper (prepend-alist-chain 'font-encoding 'fetaDynamic props) arg))
+   paper (prepend-alist-chain 'font-encoding 'dynamic props) arg))
 
 (def-markup-command (italic paper props arg) (markup?)
   "Use italic @code{font-shape} for @var{arg}. "
@@ -294,7 +274,7 @@ accordingly."
 See @usermanref{The Feta font} for  a complete listing of the possible glyphs.
 "
   (ly:find-glyph-by-name
-   (ly:paper-get-font paper (cons '((font-encoding . fetaMusic))
+   (ly:paper-get-font paper (cons '((font-encoding . music))
                                   props))
    glyph-name))
 
@@ -356,7 +336,7 @@ and/or @code{extra-offset} properties. "
   "Construct a note symbol, with stem.  By using fractional values for
 @var{dir}, you can obtain longer or shorter stems."
   
-  (let* ((font (ly:paper-get-font paper (cons '((font-encoding . fetaMusic)) props)))
+  (let* ((font (ly:paper-get-font paper (cons '((font-encoding . music)) props)))
          (stemlen (max 3 (- log 1)))
          (headgl (ly:find-glyph-by-name
                   font
index 6e1940b94abe09ab8c5bb4e4ccb039a23e1116e7..52d28ed17c256cd1caa4d43b2e6e232ba52e3300 100644 (file)
@@ -15,7 +15,8 @@
        ))
   (set-object-property! symbol 'music-type? type?)
   (set-object-property! symbol 'music-doc description)
-  symbol)
+  symbol )
+
 
 (define-public all-music-properties
   (map
@@ -73,8 +74,7 @@ e.g. @code{\\tag #'part ...} could tag a piece of music as only being active in
                  "This pitch was octavated by how many octaves?
 For chord inversions, this is negative.")
      (origin ,ly:input-location? "where was this piece of music defined?")
-     (page-penalty ,number? "Penalty for page break hint.")
-     (penalty ,number? "Penalty for line break hint.")
+     (penalty ,number? "Penalty for break hint.")
      (pitch ,ly:pitch? "the pitch of this note")
      (pitch-alist ,list? "list of pitches jointly forming the scale of a key signature")
      (pop-first ,boolean? "Do a revert before we try to do a override on some grob property.")
@@ -105,7 +105,7 @@ translation property")
                          "Change to what kind of state? Options are
 solo1, solo2 and unisono")
 
-     (figure ,markup? "a `figure' (which may be
+     (figure ,string? "a `figure' (which may be
 a string) for figured bass")
      (alteration ,number? "alteration for figured bass")
      (bracket-start ,boolean? "start a bracket
index bb6c47b3e7199b7cd32e5c00597cb034849f7a15..68f6357b588c431999c24d022b6ac4b0f8bc8434 100644 (file)
@@ -102,7 +102,9 @@ c8-[ c c-] c8")
        ))
     (BreakEvent
      . (
-   (description .  "Create a line break, Syntax: \\break or page break, Syntax: \\pagebreak.")
+   (description .  "Creates a line break.  
+
+Syntax: \\break.")
 
        (internal-class-name . "Event")
        (types . (general-music break-event event))
index 85e6219f784895f3d4644f1ec96107b1b81c9c88..8924af01c62ee755e4fa5f38853956a01088161a 100644 (file)
@@ -6,7 +6,8 @@
 ;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
 
 (use-modules
- (ice-9 regex))
+ (ice-9 regex)
+ )
 
 (define (dashify-underscores str)
    (regexp-substitute/global #f "_" str 'pre "-" 'post))
   (string-append
    "@defun " (symbol->string name)  " " (format-c-header c-header) "\n"
    doc-string
-   "\n@end defun\n\n"))
+   "\n@end defun\n\n")
+   )
 
 (define all-scheme-functions
    (hash-fold
     (lambda (key val prior)
-      (cons (cons key val)  prior))
+      (cons (cons key val)  prior)
+      )
     '() (ly:get-all-function-documentation)))
 
 (define (all-scheme-functions-doc)
   (let*
-      ((fdocs (map (lambda (x)
+      (
+
+       (fdocs (map (lambda (x)
                (document-scheme-function (car x) (cadr x) (cddr x))
                )
              all-scheme-functions)
         )
-       (sfdocs (sort fdocs string<?))) 
+       (sfdocs (sort fdocs string<?))
+       )
+
+
     (make <texi-node>
       #:name "Scheme functions"
       #:desc "Primitive functions exported by LilyPond"
       #:text
-      (apply string-append sfdocs)) 
+      (apply string-append sfdocs)
+       ) 
   ))
 
 
index ad02d4f3eded0dfd14ec4e3498555e7244a35e52..77c5d5228a2d1414d3eb75b327bfa18ce4b99fdc 100644 (file)
@@ -7,7 +7,8 @@
 
 (define (doc-markup-function func)
   (let*
-      ((doc-str  (procedure-documentation func) )
+      (
+       (doc-str  (procedure-documentation func) )
        (f-name (symbol->string (procedure-name  func)))
        (c-name (regexp-substitute/global #f "-markup$" f-name  'pre "" 'post))
        (sig (object-property func 'markup-signature))
index 222ee0985164ac90413bd6c08454c2dfc39a469c..5ebdc811beeafd8699fb255416f945740be96753 100644 (file)
@@ -74,7 +74,7 @@
 
      (if in-which-contexts
         (let*
-            ((paper-alist (ly:output-description $defaultpaper))
+            ((paper-alist (My_lily_parser::paper_description))
              (context-description-alist (map cdr paper-alist))
              (contexts
               (apply append
     ))
 
 ;; Second level, part of Context description
+
 (define name->engraver-table (make-vector 61 '()))
 (map
  (lambda (x)
 (define (all-contexts-doc)
   (let* (
         (paper-alist
-         (sort (ly:output-description $defaultpaper)
+         (sort (My_lily_parser::paper_description)
                (lambda (x y) (symbol<? (car x) (car y)))))
         (names (sort (map symbol->string (map car paper-alist)) string<?))
         (contexts (map cdr paper-alist))
   (make <texi-node>
     #:name "Engravers"
     #:desc "All separate engravers"
-    #:text "See @usermanref{Modifying context plug-ins}."
     #:children
     (map engraver-doc all-engravers-list)))
 
diff --git a/scm/encoding.scm b/scm/encoding.scm
deleted file mode 100644 (file)
index 45f10bc..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-;;;; encoding.scm -- font encoding
-;;;;
-;;;;  source file of the GNU LilyPond music typesetter
-;;;; 
-;;;; (c) 2004 Jan Nieuwenhuizen <janneke@gnu.org>
-
-;; WIP
-;; encoding.ly:
-;; #(display (reencode-string "adobe" "latin1" "hellö fóebär"))
-;;
-
-
-(define-public (read-encoding-file filename)
-  "Read .enc file, return (COMMAND-NAME . VECTOR-OF-SYMBOLS)."
-  (let* ((raw (ly:kpathsea-gulp-file filename))
-        (string (regexp-substitute/global #f "%[^\n]*" raw 'pre "" 'post))
-        (command (match:substring
-               (string-match "/([^ \t\n\r]*)[ \t\n\r]+[[]" string) 1))
-        (encoding (match:substring (string-match "[[](.*)[]]" string) 1))
-        (ps-lst (string-tokenize encoding))
-        (lst (map (lambda (x) (string->symbol (substring x 1))) ps-lst))
-        (vector (list->vector lst)))
-    (cons command vector)))
-
-(define (make-encoding-table encoding-vector)
-  "Return a hash table mapping names to chars. ENCODING-VECTOR is a
-vector of symbols."
-
-  (let* ((h (make-hash-table 256)))
-    
-    (for-each
-     (lambda (i)
-       (hash-set! h (vector-ref encoding-vector i)
-                 (integer->char i)))
-     (iota 256))
-
-    h))
-
-(define-public (reencode-string mapping str)
-  "Apply MAPPING, a vector of [0..256) -> char, to STR"
-  (string-map (lambda (chr)
-               (vector-ref mapping (char->integer chr)))
-             str))
-
-(define-public (make-encoding-mapping input-encoding output-encoding)
-  "Contruct a mapping by applying output-encoding after input-encoding "
-  (list->vector
-   (map
-    (lambda (byte)
-      (let ((new-char (hash-ref
-                      output-encoding (vector-ref input-encoding byte) #f)))
-                      ;;input-encoding (vector-ref output-encoding byte) #f)))
-
-       ;; substitute space for unknown characters.
-       (if (char? new-char)
-           new-char
-           #\ )))
-    (iota 256))))
-
-
-(define (get-coding-from-file filename)
-  "Read FILENAME, return a list containing encoding vector and table"
-   (let* ((coding (read-encoding-file filename))
-         (com (car coding))
-         (vec (cdr coding))
-         (tab (make-encoding-table vec)))
-    (list com vec tab)))
-
-;; coding-alist maps NAME -> (list FILENAME COMMAND VECTOR TAB)
-(define coding-alist
-  
-  (map (lambda (x)
-        (cons (car x)
-              (cons (cdr x) (delay (get-coding-from-file (cdr x))))))
-       
-       '(
-        ;; teTeX
-        ("TeX-typewriter-text" . "09fbbfac.enc") ;; cmtt10
-        ("TeX-math-symbols" . "10037936.enc") ;; cmbsy
-        ("ASCII-caps-and-digits" . "1b6d048e.enc") ;; cminch
-        ("TeX-math-italic" . "aae443f0.enc")  ;; cmmi10
-        ("TeX-extended-ASCII" . "d9b29452.enc")
-        ("TeX-text" . "cmr.enc")
-        ("TeX-text-without-f-ligatures" . "0ef0afca.enc")
-        ("Extended-TeX-Font-Encoding---Latin" . "tex256.enc")
-        ("AdobeStandardEncoding" . "8a.enc")
-
-        ;; aliases
-        ("T1" . "tex256.enc")
-        ("adobe" . "8a.enc")
-        ("latin1" . "cork.enc")
-        
-        ;; LilyPond.
-        ("fetaBraces" . "feta-braces-a.enc")
-        ("fetaNumber" . "feta-nummer10.enc")
-        ("fetaMusic" . "feta20.enc")
-        ("parmesanMusic" . "parmesan20.enc"))
-       ))
-
-(define (get-coding coding-name)
-  (let ((entry (assoc-get coding-name coding-alist)))
-    (cons (car entry) (force (cdr entry)))))
-
-(define-public (get-coding-filename coding-name)
-  (car (get-coding coding-name)))
-
-(define-public (get-coding-command coding-name)
-  (cadr (get-coding coding-name)))
-
-(define-public (get-coding-vector coding-name)
-  (caddr (get-coding coding-name)))
-
-(define-public (get-coding-table coding-name)
-  (cadddr (get-coding coding-name)))
index c599bb34a30414f9111745bfff72f54ba88a4373..ffe7b00ce544b5dc95170c4d83bc5fe70bf6b305 100644 (file)
@@ -65,6 +65,7 @@
     (display "} } \n"))
 
 
+
 (define default-qualifier-order
   '(font-encoding font-family font-shape font-series))
 
        ((qual (font-qualifier node))
         (def (font-default node))
         (val (chain-assoc-get qual alist-chain def))
-        (desired-child (hashq-ref (font-children node) val)))
+        (desired-child (hashq-ref (font-children node) val))
+        )
 
     (if desired-child
        (g-lookup-font desired-child alist-chain)
 (define (lookup-font node alist-chain)
   (g-lookup-font node alist-chain))
 
-;
-; Each size family is a vector of fonts, loaded with a delay.
-; The vector should be sorted according to ascending design size.
-;
-
-(define-public (add-music-fonts node factor)
-  (for-each
-   (lambda (x)
-     (add-font node
-              (list (cons 'font-encoding (car x)))
-              (cons (* factor (cadr x))
-                    (caddr x))))
-   `((fetaNumber 10
-            #(,(delay (ly:font-load "feta-nummer4"))
-              ,(delay (ly:font-load "feta-nummer6"))
-              ,(delay (ly:font-load "feta-nummer8"))
-              ,(delay (ly:font-load "feta-nummer10"))
-              ,(delay (ly:font-load "feta-nummer12"))
-              ,(delay (ly:font-load "feta-nummer16"))))
-     (fetaDynamic 14.0  #(,(delay (ly:font-load "feta-din6"))
-                     ,(delay (ly:font-load "feta-din8"))
-                     ,(delay (ly:font-load "feta-din10"))
-                     ,(delay (ly:font-load "feta-din12"))
-                     ,(delay (ly:font-load "feta-din14"))
-                     ,(delay (ly:font-load "feta-din17"))
-                     ))
-     (fetaMusic 20.0
-           #(,(delay (ly:make-virtual-font
-                      (ly:font-load "feta11")
-                      (ly:font-load "parmesan11")))
-             ,(delay (ly:make-virtual-font
-                      (ly:font-load "feta13")
-                      (ly:font-load "parmesan13")))
-             ,(delay (ly:make-virtual-font
-                      (ly:font-load "feta14")
-                      (ly:font-load "parmesan14")))
-             ,(delay (ly:make-virtual-font
-                      (ly:font-load "feta16")
-                      (ly:font-load "parmesan16")))
-             ,(delay (ly:make-virtual-font
-                      (ly:font-load "feta18")
-                      (ly:font-load "parmesan18")))
-             ,(delay (ly:make-virtual-font
-                      (ly:font-load "feta20")
-                      (ly:font-load "parmesan20")))
-             ,(delay (ly:make-virtual-font
-                      (ly:font-load "feta23")
-                      (ly:font-load "parmesan23")))
-             ,(delay (ly:make-virtual-font
-                      (ly:font-load "feta26")
-                      (ly:font-load "parmesan26")))
-             ))
-     
-     (fetaBraces 15 #(,(delay
-                    (ly:make-virtual-font
-                     (ly:font-load "feta-braces-a")
-                     (ly:font-load "feta-braces-b")
-                     (ly:font-load "feta-braces-c")
-                     (ly:font-load "feta-braces-d")
-                     (ly:font-load "feta-braces-e")
-                     (ly:font-load "feta-braces-f")
-                     (ly:font-load "feta-braces-g")
-                     (ly:font-load "feta-braces-h")
-                     (ly:font-load "feta-braces-i"))
-                    ))))))
-       
-
-(define-public (add-cmr-fonts node factor)
-  (add-font
-   node
-   '((font-encoding . TeX-math))
-   `(,(* factor 10) . #(,(delay (ly:font-load "msam10")))))
-  
-  (for-each
-   (lambda (x)
-     (add-font
-      node
-      `((font-encoding . TeX-text)
-       (font-series . ,(vector-ref (car x) 2))
-       (font-shape . ,(vector-ref (car x) 1))
-       (font-family . ,(vector-ref (car x) 0)))
-      (cons (* factor (cadr x))
-           (cddr x))
-      ))
-   `((#(roman upright medium) .
-      (10.0 . #(,(delay (ly:font-load "cmr6"))
-               ,(delay (ly:font-load "cmr8")) 
-               ,(delay (ly:font-load "cmr10"))
-               ,(delay (ly:font-load "cmr17"))
-               )))
-
-     (#(roman upright bold) .
-      (10.0 . #(,(delay (ly:font-load "cmbx6"))
-               ,(delay (ly:font-load "cmbx8"))
-               ,(delay (ly:font-load "cmbx10"))
-               ,(delay (ly:font-load "cmbx12"))
-               )))
-     
-     (#(roman italic medium) .
-      (10.0 . #(,(delay (ly:font-load "cmti7"))
-               ,(delay (ly:font-load "cmti10"))
-               ,(delay (ly:font-load "cmti12"))
-               )))
-     (#(roman italic bold) .
-      (10.0 . #(,(delay (ly:font-load "cmbxti8"))
-               ,(delay (ly:font-load "cmbxti10"))
-               ,(delay (ly:font-load "cmbxti14"))
-               )))
-     
-     (#(roman caps medium) .
-      (10.0 . #(,(delay (ly:font-load "cmcsc10")))))
-
-     (#(roman upright bold-narrow ) .
-      (10.0 . #(,(delay (ly:font-load "cmb10"))
-               )))
-     
-     (#(sans upright medium) .
-      (10.0  . #(,(delay (ly:font-load "cmss8"))
-                ,(delay (ly:font-load "cmss10"))
-                ,(delay (ly:font-load "cmss12"))
-                ,(delay (ly:font-load "cmss17"))
-                )))
-     (#(typewriter upright medium) .
-      (10.0 . #(,(delay (ly:font-load "cmtt8"))
-               ,(delay (ly:font-load "cmtt10"))
-               ,(delay (ly:font-load "cmtt12"))
-               )))))
-
-  ;; lmodern: super-cm using metapost
-  ;; lm.map: Reencoding, at fontlevel for TeX ?:
-  ;; cork-lmb10 LMRomanDemi10-Regular "enccorklm ReEncodeFont" <cork-lm.enc <lmb10.pf
-  
-  (for-each
-   (lambda (x)
-     (add-font
-      node
-      `((font-encoding . latin1)
-       (font-series . ,(vector-ref (car x) 2))
-       (font-shape . ,(vector-ref (car x) 1))
-       (font-family . ,(vector-ref (car x) 0)))
-      (cons (* factor (cadr x))
-           (cddr x))
-      ))
-
-;;; super-cm, aka lmodern (on Debian) seems rather broken:
-;;; * no usable TFM files  (no lmr10.tfm, only cork-lmr10.tfm)
-;;; * broken AFM files:
-;;;    - invalid keyword 'Generated'
-;;;    - lists FontEncoding Fontspecific  -- duh
-;;; revert to ec-fonts-mftraced for now
-;;; make this easily switchable?
-   
-;;;    `((#(roman upright medium) .
-;;;       (10.0 . #(,(delay (ly:font-load "lmr6"))
-;;;            ,(delay (ly:font-load "lmr8")) 
-;;;            ,(delay (ly:font-load "lmr10"))
-;;;            ,(delay (ly:font-load "lmr17")))))
-
-;;;      (#(roman upright bold) .
-;;;       (10.0 . #(,(delay (ly:font-load "lmbx6"))
-;;;            ,(delay (ly:font-load "lmbx8"))
-;;;            ,(delay (ly:font-load "lmbx10"))
-;;;            ,(delay (ly:font-load "lmbx12")))))
-     
-;;;      (#(roman italic medium) .
-;;;       (10.0 . #(,(delay (ly:font-load "lmri7"))
-;;;            ,(delay (ly:font-load "lmri10"))
-;;;            ,(delay (ly:font-load "lmri12")))))
-;;;      (#(roman italic bold) .
-;;;       (10.0 . #(,(delay (ly:font-load "lmbi8"))
-;;;            ,(delay (ly:font-load "lmbi10"))
-;;;            ,(delay (ly:font-load "lmbi14")))))
-     
-;;;      (#(roman caps medium) .
-;;;       (10.0 . #(,(delay (ly:font-load "lmcs10")))))
-
-;;;      (#(roman upright bold-narrow ) .
-;;;       (10.0 . #(,(delay (ly:font-load "lmb10")))))
-     
-;;;      (#(sans upright medium) .
-;;;       (10.0  . #(,(delay (ly:font-load "lmss8"))
-;;;             ,(delay (ly:font-load "lmss10"))
-;;;             ,(delay (ly:font-load "lmss12"))
-;;;             ,(delay (ly:font-load "lmss17")))))
-;;;      (#(sans upright bold) .
-;;;       (10.0  . #(,(delay (ly:font-load "lmssbx10")))))
-     
-;;;      (#(typewriter upright medium) .
-;;;       (10.0 . #(,(delay (ly:font-load "lmtt8"))
-;;;            ,(delay (ly:font-load "lmtt10"))
-;;;            ,(delay (ly:font-load "lmtt12"))))))))
-   `((#(roman upright medium) .
-      (10.0 . #(,(delay (ly:font-load "ecrm6"))
-               ,(delay (ly:font-load "ecrm8")) 
-               ,(delay (ly:font-load "ecrm10"))
-               ,(delay (ly:font-load "ecrm17"))))) 
-     (#(roman upright bold) .
-      (10.0 . #(,(delay (ly:font-load "ecbx6"))
-               ,(delay (ly:font-load "ecbx8"))
-               ,(delay (ly:font-load "ecbx10"))
-               ,(delay (ly:font-load "ecbx12"))))) 
-     (#(roman italic medium) .
-      (10.0 . #(,(delay (ly:font-load "ecti7"))
-               ,(delay (ly:font-load "ecti10"))
-               ,(delay (ly:font-load "ecti12")))))
-     (#(roman italic bold) .
-      (10.0 . #(,(delay (ly:font-load "ecbi8"))
-               ,(delay (ly:font-load "ecbi10"))
-               ,(delay (ly:font-load "ecbi14")))))
-     ;; duplicate entry?
-     ;;(#(roman caps medium) .
-     ;; (10.0 . #(,(delay (ly:font-load "eccc10")))))
-     (#(roman caps medium) .
-      (10.0 . #(,(delay (ly:font-load "ecsc10")))))
-     (#(roman upright bold-narrow ) .
-      (10.0 . #(,(delay (ly:font-load "ecrb10")))))
-     (#(sans upright medium) .
-      (10.0  . #(,(delay (ly:font-load "ecss8"))
-                ,(delay (ly:font-load "ecss10"))
-                ,(delay (ly:font-load "ecss12"))
-                ,(delay (ly:font-load "ecss17")))))
-     (#(typewriter upright medium) .
-      (10.0 . #(,(delay (ly:font-load "ectt8"))
-               ,(delay (ly:font-load "ectt10"))
-               ,(delay (ly:font-load "ectt12"))))))))
-
-
-  
-
-;; (display (make-font-tree 1.0))
-
-;; Century Schoolbook fonts filenames on Debian/Sid
-(define-public (add-century-schoolbook-fonts node factor)
-  
-  (add-font node
-           '((font-family . roman)
-             (font-shape . upright)
-             (font-series . medium)
-             (font-encoding . latin1))
-           `(10.0 . #(,(delay (ly:font-load "c059013l")))))
-  
-  (add-font node
-           '((font-family . roman)
-             (font-shape . italic)
-             (font-series . medium)
-             (font-encoding . latin1))
-           `(10.0 . #(,(delay (ly:font-load "c059033l")))))
-  
-  (add-font node
-           '((font-family . roman)
-             (font-shape . upright)
-             (font-series . bold)
-             (font-encoding . latin1))
-           `(10.0 . #(,(delay (ly:font-load "c059016l")))))
-  
-  (add-font node
-           '((font-family . roman)
-             (font-shape . italic)
-             (font-series . bold)
-             (font-encoding . latin1))
-           `(10.0 . #(,(delay (ly:font-load "c059036l")))))
-  )
-
-
-(define-public (make-cmr-tree factor)
-
-  (let
-      ((n (make-font-tree-node 'font-encoding 'fetaMusic)))
 
-    (add-music-fonts n factor)
-    (add-cmr-fonts n factor)
-    n
-  ))
-
-
-(define-public (make-century-schoolbook-tree factor)
-
-  (let
-      ((n (make-font-tree-node 'font-encoding 'fetaMusic)))
-
-    (add-music-fonts n factor)
-    (add-century-schoolbook-fonts n factor)
-    n
-  ))
 
+(define-public (make-font-tree factor)
+  (let*
+      ((n (make-font-tree-node 'font-encoding 'music))
+       )
+    
+    (for-each
+     (lambda (x)
+       (add-font n
+                (list (cons 'font-encoding (car x)))
+                (cons (* factor (cadr x))
+                      (caddr x))))
+     '((number 10
+              #((3.82  . "feta-nummer4")
+                (5.5  . "feta-nummer6")
+                (8.0  . "feta-nummer8")
+                (10.0  . "feta-nummer10")
+                (12.0  . "feta-nummer12")
+                (16.0  . "feta-nummer16")))
+       (dynamic 14.0  #((6.0 . "feta-din6")
+                       (8.0 . "feta-din8")
+                       (10.0 . "feta-din10")
+                       (12.0 . "feta-din12")
+                       (14.0 . "feta-din14")
+                       (17.0 . "feta-din17")
+                       ))
+       (math 10 #((10.0 . "msam10")))
+       (music 20.0
+             #((11.22 . ("feta11" "parmesan11"))
+               (12.60 . ("feta13" "parmesan13"))
+               (14.14 . ("feta14" "parmesan14"))
+               (15.87 . ("feta16" "parmesan16"))
+               (17.82 . ("feta18" "parmesan18"))
+               (20.0 . ("feta20" "parmesan20"))
+               (22.45 . ("feta23" "parmesan23"))
+               (25.20 . ("feta26" "parmesan26"))
+               ))
+       (braces 10 #((10.0 . ("feta-braces00"
+                            "feta-braces10"
+                            "feta-braces20"
+                            "feta-braces30"
+                            "feta-braces40"
+                            "feta-braces50"
+                            "feta-braces60"
+                            "feta-braces70"
+                            "feta-braces80"))
+                   ))))
+
+    (for-each
+     (lambda (x)
+       (add-font
+       n
+       `((font-encoding . text)
+         (font-series . ,(vector-ref (car x) 2))
+         (font-shape . ,(vector-ref (car x) 1))
+         (font-family . ,(vector-ref (car x) 0)))
+       (cons (* factor (cadr x))
+             (cddr x))
+       ))
+     '((#(roman upright medium) .
+       (10.0 . #((6.0 . "cmr6")
+                 (8.0 . "cmr8") 
+                 (10.0 . "cmr10")
+                 (17.0 . "cmr17")
+                 )))
+
+       (#(roman upright bold) .
+       (10.0 . #((6.0 . "cmbx6")
+                 (8.0 . "cmbx8")
+                 (10.0 . "cmbx10")
+                 (12.0 . "cmbx12")
+                 )))
+       
+       (#(roman italic medium) .
+       (10.0 . #((7.0 . "cmti7")
+                 (10.0 . "cmti10")
+                 (12.0 . "cmti12")
+                 )))
+       (#(roman italic bold) .
+       (10.0 . #((8.0 . "cmbxti8")
+                 (10.0 . "cmbxti10")
+                 (14.0 . "cmbxti14")
+                 )))
+       
+       (#(roman caps medium) .
+       (10.0 . #((10.0 . "cmcsc10"))))
 
+       (#(roman upright bold-narrow ) .
+       (10.0 . #((10.0 . "cmb10")
+                 )))
+       
+       (#(sans upright medium) .
+       (10.0  . #((8.0 . "cmss8")
+                  (10.0 . "cmss10")
+                  (12.0 . "cmss12")
+                  (17.0 . "cmss17")
+                  )))
+       (#(typewriter upright medium) .
+       (10.0 . #((8.0 .  "cmtt8")
+                 (10.0 . "cmtt10")
+                 (12.0 . "cmtt12")
+                 )))
+       ))
+    n))
+
+; (display (make-font-tree 1.0))
 
 (define-public (magstep x)
   (exp (* (/ x 6) (log 2))))
diff --git a/scm/framework-gnome.scm b/scm/framework-gnome.scm
deleted file mode 100644 (file)
index 031cb3c..0000000
+++ /dev/null
@@ -1,307 +0,0 @@
-;;;; framework-gnome.scm --
-;;;;
-;;;;  source file of the GNU LilyPond music typesetter
-;;;; 
-;;;; (c)  2004 Jan Nieuwenhuizen <janneke@gnu.org>
-
-;;;; See output-gnome.scm for usage information.
-
-
-(define-module (scm framework-gnome))
-
-(use-modules (guile) (oop goops) (lily))
-
-(use-modules
- (ice-9 regex)
- (gnome gtk)
- (gnome gtk gdk-event))
-;; the name of the module will change to canvas rsn
-(if (resolve-module '(gnome gw canvas))
-    (use-modules (gnome gw canvas))
-    (use-modules (gnome gw libgnomecanvas)))
-
-(define-public (output-framework-gnome outputter book scopes fields basename)
-  (newline (current-error-port))
-  
-;   ;; Hmm, 
-;   (let ((port (ly:outputter-get-output-port outputter)))
-;     (remove port)
-;     (close port))
-
-  (gnome-main book))
-
-
-;; WTF? -- jcn
-;; Yay, I *finally* found it!
-(define-public output-framework output-framework-gnome)
-
-(define SCROLLBAR-SIZE 20)
-(define BUTTON-HEIGHT 25)
-(define PANELS-HEIGHT 80)
-
-(define PIXELS-PER-UNIT 2)
-(define OUTPUT-SCALE (* 2.5 PIXELS-PER-UNIT))
-(define-public output-scale OUTPUT-SCALE)
-
-(define (stderr string . rest)
-  ;; debugging
-  (if #f
-      (begin
-       (apply format (cons (current-error-port) (cons string rest)))
-       (force-output (current-error-port)))))
-
-(define-class <gnome-outputter> ()
-  (page-stencils ;;#:init-value '#()
-   #:init-keyword #:page-stencils #:accessor page-stencils)
-  (window #:init-value (make <gtk-window> #:type 'toplevel) #:accessor window)
-  (scrolled #:init-value (make <gtk-scrolled-window>) #:accessor scrolled)
-  (canvas #:init-value #f #:accessor canvas)
-  (page-number #:init-value 0 #:accessor page-number)
-  (pixels-per-unit #:init-value PIXELS-PER-UNIT #:accessor pixels-per-unit)
-  (text-items #:init-value '() #:accessor text-items)
-  (location #:init-value #f #:accessor location)
-  (item-locations #:init-value (make-hash-table 31) #:accessor item-locations)
-  (window-width #:init-keyword #:window-width #:accessor window-width)
-  (window-height #:init-keyword #:window-height #:accessor window-height)
-  (canvas-width #:init-keyword #:canvas-width #:accessor canvas-width)
-  (canvas-height #:init-keyword #:canvas-height #:accessor canvas-height))
-
-(define-method (initialize (go <gnome-outputter>))
-  (let* ((button (make <gtk-button> #:label "Exit"))
-        (next (make <gtk-button> #:label "Next"))
-        (prev (make <gtk-button> #:label "Previous"))
-        (vbox (make <gtk-vbox> #:homogeneous #f))
-        (hbox (make <gtk-hbox> #:homogeneous #f)))
-
-    (set-size-request (window go) (window-width go) (window-height go))
-    
-    (set-size-request (scrolled go) (window-width go) (- (window-height go)
-                                                        BUTTON-HEIGHT
-                                                        SCROLLBAR-SIZE))
-
-    (new-canvas go)
-
-    (add (window go) vbox)
-    (add vbox (scrolled go))
-    
-    (add (scrolled go) (canvas go))
-
-    ;; buttons
-    (add vbox hbox)
-    (set-size-request hbox (window-width go) BUTTON-HEIGHT)
-
-    ;; hmm?  These are broken when using <gnome-outputter>.
-    ;;(set-child-packing vbox hbox #f #f 0 'end)
-    ;;(set-child-packing hbox button #f #f 0 'end)
-    
-    (set-size-request button (quotient (window-width go) 2) BUTTON-HEIGHT)
-
-    
-    (add hbox next)
-    (add hbox prev)
-    (add hbox button)
-
-    ;; signals
-    (gtype-instance-signal-connect
-     button 'clicked (lambda (b) (gtk-main-quit)))
-    (gtype-instance-signal-connect
-     next 'clicked (lambda (b) (dump-page go (1+ (page-number go)))))
-    (gtype-instance-signal-connect
-     prev 'clicked (lambda (b) (dump-page go (1- (page-number go)))))
-    (gtype-instance-signal-connect
-     (window go) 'key-press-event key-press-event)
-    
-    (show-all (window go))))
-
-
-(define-public global-go #f)
-
-(define (gnome-main book)
-  (let* ((book-paper (ly:paper-book-book-paper book))
-        (hsize (ly:output-def-lookup book-paper 'hsize))
-        (vsize (ly:output-def-lookup book-paper 'vsize))
-        (page-width (inexact->exact (ceiling (* OUTPUT-SCALE hsize))))
-        (page-height (inexact->exact (ceiling (* OUTPUT-SCALE vsize))))
-        ;;(page-width (inexact->exact (ceiling hsize)))
-        ;;(page-height (inexact->exact (ceiling vsize)))
-
-        (screen-width (gdk-screen-width))
-        (screen-height (gdk-screen-height))
-         (desktop-height (- screen-height PANELS-HEIGHT))
-
-        (go (make <gnome-outputter>
-              #:page-stencils (list->vector (ly:paper-book-pages book))
-              #:canvas-width page-width
-              #:canvas-height page-height
-              #:window-width
-              ;; huh, *2 -- pixels-per-unit?
-              (min (+ SCROLLBAR-SIZE (* page-width 2)) screen-width)
-              #:window-height
-              (min (+ BUTTON-HEIGHT SCROLLBAR-SIZE (* page-height 2))
-                   desktop-height))))
-
-    ;; ugh.  The GOOPS doc promises this is called automagically.
-    (initialize go)
-
-    (map ly:pango-add-afm-decoder
-        '("lilypond-feta"
-          "lilypond-braces"
-          "lilypond-dyn"
-          "lilypond-parmesan"))
-
-    (dump-page go 0)
-
-    ;; ugh
-    (set! global-go go)
-    
-    (gtk-main)))
-
-(define (dump-page go number)
-  (if (or (not (page-stencils go))
-         (< number 0)
-         (>= number (vector-length (page-stencils go))))
-      (stderr "No such page: ~S\n" (1+ number))
-      
-      (let ((old-canvas (canvas go)))
-       (new-canvas go)
-       (set! (page-number go) number)
-       
-       ;; no destroy method for gnome-canvas-text?
-       ;;(map destroy (gtk-container-get-children main-canvas))
-       ;;(map destroy text-items)
-
-       (set! (text-items go) '())
-       (stderr "page-stencil ~S: ~S\n"
-               (page-number go)                
-               (vector-ref (page-stencils go) (page-number go)))
-       
-       (ly:interpret-stencil-expression 
-        ;; ;;(vector-ref (page-stencils go) (page-number go))
-        (ly:stencil-expr (vector-ref (page-stencils go) (page-number go)))
-        gnome-output-expression go '(0 . 0))
-
-       (if old-canvas (destroy old-canvas))
-       (add (scrolled go) (canvas go))
-       (show (canvas go)))))
-
-(define x-editor #f)
-(define (get-x-editor)
-  (if (not x-editor)
-      (set! x-editor (getenv "XEDITOR")))
-  x-editor)
-
-(define ifs #f)
-(define (get-ifs)
-  (if (not ifs)
-      (set! ifs (getenv "IFS")))
-  (if (not ifs)
-      (set! ifs "      "))
-  ifs)
-      
-(define (spawn-editor location)
-  (let* ((line (car location))
-        (column (cadr location))
-        (file-name (caddr location))
-        (template (substring (get-x-editor) 0))
-        
-        ;; Adhere to %l %c %f?
-        (command
-         (regexp-substitute/global
-          #f "%l" (regexp-substitute/global
-                   #f "%c"
-                   (regexp-substitute/global
-                    #f "%f" template 'pre file-name 'post)
-                   'pre (number->string column)
-                   'post)
-          'pre (number->string line) 'post)))
-    
-    (stderr "spawning: ~s\n" command)
-    (if (= (primitive-fork) 0)
-       (let ((command-list (string-split command #\ )));; (get-ifs))))
-         (apply execlp command-list)
-         (primitive-exit)))))
-         
-(define location-callback spawn-editor)
-
-;;(define (item-event item event . data)
-(define-public (item-event item event . data)
-  (case (gdk-event:type event)
-    ((enter-notify) (gobject-set-property item 'fill-color "red"))
-    ((leave-notify) (gobject-set-property item 'fill-color "black"))
-    ((button-press)
-     
-     ;;FIXME
-     (let ((location (hashq-ref (item-locations global-go) item #f)))
-
-       (if location
-          (location-callback location)
-          (stderr "no location\n"))))
-    ((2button-press) (gobject-set-property item 'fill-color "red")))
-  #t)
-
-(define (scale-canvas factor)
-  (set! pixels-per-unit (* pixels-per-unit factor))
-  (set-pixels-per-unit main-canvas pixels-per-unit)
-  (for-each
-   (lambda (x)
-     (let ((scale (gobject-get-property x 'scale))
-          (points (gobject-get-property x 'size-points)))
-       ;;(gobject-set-property x 'scale pixels-per-unit)
-       (gobject-set-property x 'size-points (* points factor))))
-     text-items))
-
-(define (key-press-event item event . data)
-  (let ((keyval (gdk-event-key:keyval event))
-       (mods (gdk-event-key:modifiers event)))
-    (cond ((and (or (eq? keyval gdk:q)
-                   (eq? keyval gdk:w))
-               (equal? mods '(control-mask modifier-mask)))
-          (gtk-main-quit))
-         ((and #t ;;(null? mods)
-               (eq? keyval gdk:plus))
-          (scale-canvas 2))
-         ((and #t ;; (null? mods)
-               (eq? keyval gdk:minus))
-          (scale-canvas 0.5))
-         ((or (eq? keyval gdk:Page-Up)
-              (eq? keyval gdk:BackSpace))
-          ;;FIXME
-          (dump-page global-go (1- (page-number global-go))))
-         ((or (eq? keyval gdk:Page-Down)
-              (eq? keyval gdk:space))
-          ;;FIXME
-          (dump-page global-go (1+ (page-number global-go)))))
-    #f))
-
-(define (new-canvas go)
-  (set! (canvas go) (make <gnome-canvas>))
-  (set-size-request (canvas go) (window-width go) (window-height go))
-  (set-scroll-region (canvas go) 0 0 (canvas-width go) (canvas-height go))
-  (set-pixels-per-unit (canvas go) (pixels-per-unit go))
-  (make <gnome-canvas-rect>
-    #:parent (root (canvas go))
-    #:x2 (canvas-width go) #:y2 (canvas-height go)
-    #:fill-color "white"))
-
-(define output-gnome-module #f)
-(define (get-output-gnome-module go)
-  (if (not output-gnome-module)
-      (let ((m  (resolve-module '(scm output-gnome))))
-       (module-define! m 'canvas-root (lambda () (root (canvas go))))
-       (module-define! m 'output-scale output-scale)
-       (set! output-gnome-module m)))
-  output-gnome-module)
-  
-(define-public (gnome-output-expression go expr)
-  (let* ((m (get-output-gnome-module go))
-        (result (eval expr m)))
-    (cond
-     ((and (pair? result)
-          (eq? (car result) 'location))
-      (set! (location go) (cdr result)))
-     ((is-a? result <gnome-canvas-item>)
-      (gtype-instance-signal-connect result 'event item-event)
-      (if (location go)
-         (hashq-set! (item-locations go) result (location go)))))))
-
diff --git a/scm/framework-ps.scm b/scm/framework-ps.scm
deleted file mode 100644 (file)
index 7753ec0..0000000
+++ /dev/null
@@ -1,264 +0,0 @@
-;;;; framework-ps.scm --
-;;;;
-;;;;  source file of the GNU LilyPond music typesetter
-;;;;
-;;;; (c)  2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
-(define-module (scm framework-ps))
-
-(use-modules (ice-9 regex)
-            (ice-9 string-fun)
-            (ice-9 format)
-            (guile)
-            (srfi srfi-1)
-            (srfi srfi-13)
-            (lily))
-
-(define-public (ps-font-command font . override-coding)
-  (let* ((name (ly:font-filename font))
-        (magnify (ly:font-magnification font))
-        (coding-alist (ly:font-encoding-alist font))
-        (input-encoding (assoc-get 'input-name coding-alist))
-        (font-encoding (assoc-get 'output-name coding-alist))
-        (coding-command (if (null? override-coding)
-                            (if (equal? input-encoding font-encoding)
-                                #f font-encoding)
-                            (car override-coding))))
-
-    ;; FIXME:  now feta stuff has feta* input-encoding (again?)
-    ;;(format (current-error-port) "FONT: ~S, ~S\n" name font-encoding)
-    ;;(format (current-error-port) "INPUT: ~S\n" input-encoding)
-    (if (and coding-command
-            (or
-             (equal? (substring coding-command 0 4) "feta")
-             (equal? (substring coding-command 0 8) "parmesan")
-
-            ))
-       (set! coding-command #f))
-
-    (string-append
-     "magfont" (string-encode-integer (hashq  name 1000000))
-     "m" (string-encode-integer (inexact->exact (round (* 1000 magnify))))
-     (if (not coding-command) "" (string-append "e" coding-command)))))
-
-(define (tex-font? fontname)
-  (or
-   (equal? (substring fontname 0 2) "cm")
-   (equal? (substring fontname 0 2) "ec")))
-
-(define (load-fonts bookpaper)
-  (let* ((fonts (ly:bookpaper-fonts bookpaper))
-        (font-names (uniq-list (sort (map ly:font-filename fonts) string<?)))
-        (pfas (map
-               (lambda (x)
-                 (ly:kpathsea-gulp-file (string-append x ".pfa")))
-               (filter string? font-names))))
-    (string-join pfas "\n")))
-
-(define (define-fonts bookpaper)
-
-  (define font-list (ly:bookpaper-fonts bookpaper))
-  (define (define-font command fontname scaling)
-    (string-append
-     "/" command " { /" fontname " findfont "
-     (ly:number->string scaling) " output-scale div scalefont } bind def\n"))
-
-  (define (reencode-font plain encoding command)
-    (let ((coding-vector (get-coding-command encoding)))
-      (string-append
-       plain " " coding-vector " /" command " reencode-font\n"
-       "/" command "{ /" command " findfont 1 scalefont } bind def\n")))
-
-  (define (guess-ps-fontname basename)
-
-    "We do not have the FontName, try to guess is from basename."
-    (cond
-     (#t basename)
-     ((tex-font? basename)
-      ;; FIXME: we need proper Fontmap for the bluesky CM*, EC* fonts.
-      ;; Only the fonts that we trace in mf/ are in our own FontMap.
-      (string-append basename ".pfb"))
-     (else (string-append basename ".pfa"))))
-
-  (define (font-load-command font)
-    (let* ((specced-font-name (ly:font-name font))
-          (fontname (if specced-font-name
-                        specced-font-name
-                        (guess-ps-fontname (ly:font-filename font))))
-       
-          (coding-alist (ly:font-encoding-alist font))
-          (input-encoding (assoc-get 'input-name coding-alist))
-          (font-encoding (assoc-get 'output-name coding-alist))
-          (command (ps-font-command font))
-          ;; FIXME -- see (ps-font-command )
-          (plain (ps-font-command font #f))
-          (designsize (ly:font-design-size font))
-          (magnification (* (ly:font-magnification font)))
-          (ops (ly:output-def-lookup bookpaper 'outputscale))
-          (scaling (* ops magnification designsize)))
-
-      (string-append
-       (define-font plain fontname scaling)
-       (if (or (equal? input-encoding font-encoding)
-              ;; guh
-              (equal? font-encoding "fetaBraces")
-              (equal? font-encoding "fetaNumber")
-              (equal? font-encoding "fetaMusic")
-              (equal? font-encoding "parmesanMusic"))
-              ""
-          (reencode-font plain input-encoding command)))))
-
-  (define (font-load-encoding encoding)
-    (let ((filename (get-coding-filename encoding)))
-      (ly:kpathsea-gulp-file filename)))
-
-  (let* ((encoding-list (map (lambda (x)
-                              (assoc-get 'input-name
-                                         (ly:font-encoding-alist x)))
-                            font-list))
-        (encodings (uniq-list (sort-list (filter string? encoding-list)
-                                         string<?))))
-
-    (string-append
-     (apply string-append (map font-load-encoding encodings))
-     (apply string-append
-           (map (lambda (x) (font-load-command x)) font-list)))))
-
-;; FIXME: duplicated in other output backends
-;; FIXME: silly interface name
-(define (output-variables paper)
-  ;; FIXME: duplicates output-paper's scope-entry->string, mostly
-  (define (value->string  val)
-    (cond
-     ((string? val) (string-append "(" val ")"))
-     ((symbol? val) (symbol->string val))
-     ((number? val) (number->string val))
-     (else "")))
-
-  (define (output-entry ps-key ly-key)
-    (string-append
-     "/" ps-key " "
-     (value->string (ly:output-def-lookup paper ly-key)) " def \n"))
-
-  (string-append
-   "/lily-output-units 2.83464  def  %% milimeter \n"
-   "% /lily-output-units 0.996264  def  %% true points.\n"
-   (output-entry "staff-line-thickness" 'linethickness)
-   (output-entry "line-width" 'linewidth)
-   (output-entry "paper-size" 'papersize)
-   (output-entry "staff-height" 'staffheight)  ;junkme.
-   "/output-scale "
-   (number->string (ly:output-def-lookup paper 'outputscale))
-   " lily-output-units mul def \n"))
-
-(define (header paper page-count classic?)
-  (string-append
-   "%!PS-Adobe-3.0\n"
-   "%%Creator: creator time-stamp \n"))
-
-(define (dump-page outputter page page-number page-count)
-  (ly:outputter-dump-string outputter
-   (string-append
-    "%%Page: "
-    (number->string page-number) " " (number->string page-count) "\n"
-    "0 0 start-system { "
-    "set-ps-scale-to-lily-scale "
-    "\n"))
-  (ly:outputter-dump-stencil outputter page)
-  (ly:outputter-dump-string outputter "} stop-system \nshowpage\n"))
-
-(define-public (output-framework outputter book scopes fields basename)
-  (let* ((bookpaper (ly:paper-book-book-paper book))
-        (pages (ly:paper-book-pages book))
-        (page-number 0)
-        (page-count (length pages)))
-  (for-each
-   (lambda (x)
-     (ly:outputter-dump-string outputter x))
-   (list
-    (header bookpaper
-           (length pages)
-           #f)
-
-    "%%Pages: " (number->string page-count) "\n"
-    "%%PageOrder: Ascend\n"
-    "%%DocumentPaperSizes: " (ly:output-def-lookup bookpaper 'papersize) "\n"
-
-    (output-variables bookpaper)
-    (ly:gulp-file "music-drawing-routines.ps")
-    (ly:gulp-file "lilyponddefs.ps")
-    (load-fonts bookpaper)
-    (define-fonts bookpaper)))
-
-  (for-each
-   (lambda (page)
-     (set! page-number (1+ page-number))
-     (dump-page outputter page page-number page-count))
-   pages)
-  (ly:outputter-dump-string outputter "%%Trailer\n%%EOF\n")))
-
-(define-public (output-classic-framework outputter book scopes fields
-                                           basename)
-  (let* ((bookpaper (ly:paper-book-book-paper book))
-        (lines (ly:paper-book-lines book))
-        (y 0.0)
-        ;; What the F*** is 2.83463?
-        (scale (* 2.83464 (ly:output-def-lookup bookpaper 'outputscale)))
-        (total-y
-         (apply + (map (lambda (z) (ly:paper-system-extent z Y)) lines)))
-        (x-ext '(-8 . 0))
-        (lineno 0))
-
-    (define (dump-line outputter system)
-      (let ((stil (ly:paper-system-stencil system)))
-       
-       (ly:outputter-dump-string
-        outputter
-        (string-append
-         " 0.0 "
-         (ly:number->string y)
-         " start-system {\n set-ps-scale-to-lily-scale\n"))
-       (set! y (+ y (ly:paper-system-extent system Y)))
-       (ly:outputter-dump-stencil outputter stil)
-       (ly:outputter-dump-string
-        outputter
-        "} stop-system\n")))
-
-    (define (to-pt x)
-      (inexact->exact (round (* scale x))))
-
-    (define (bbox llx lly urx ury)
-      (string-append
-       "%%BoundingBox: "
-       (ly:number->string (to-pt llx)) " "
-       (ly:number->string (to-pt lly)) " "
-       (ly:number->string (to-pt urx)) " "
-       (ly:number->string (to-pt ury)) "\n"))
-
-    (for-each
-     (lambda (ell)
-       (set! x-ext (interval-union x-ext
-                                  (cons 0.0 (ly:paper-system-extent ell X)))))
-     lines)
-
-  (for-each
-   (lambda (x)
-     (ly:outputter-dump-string outputter x))
-   (list
-    "%!PS-Adobe-2.0 EPSF-2.0\n"
-    "%%Creator: LilyPond \n"
-
-;;    (bbox (car x-ext) 0 (cdr x-ext) total-y)    ; doesn't work well
-
-    "%%EndComments\n"
-    (output-variables bookpaper)
-    (ly:gulp-file "music-drawing-routines.ps")
-    (ly:gulp-file "lilyponddefs.ps")
-    (load-fonts bookpaper)
-    (define-fonts bookpaper)))
-
-;; ;   page-number page-count))
-  (for-each
-   (lambda (line) (set! lineno (1+ lineno)) (dump-line outputter line))
-   lines)
-  (ly:outputter-dump-string outputter "\n")))
diff --git a/scm/framework-tex.scm b/scm/framework-tex.scm
deleted file mode 100644 (file)
index 8fa0c17..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-;;;; framework-tex.scm --
-;;;;
-;;;;  source file of the GNU LilyPond music typesetter
-;;;;
-;;;; (c)  2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
-(define-module (scm framework-tex)
-  #:export (output-framework-tex           
-           output-classic-framework-tex
-))
-
-(use-modules (ice-9 regex)
-            (ice-9 string-fun)
-            (ice-9 format)
-            (guile)
-            (srfi srfi-13)
-            (lily))
-
-(define-public (sanitize-tex-string s) ;; todo: rename
-   (if (ly:get-option 'safe)
-      (regexp-substitute/global #f "\\\\"
-                               (regexp-substitute/global #f "([{}])" "bla{}" 'pre  "\\" 1 'post )
-                               'pre "$\\backslash$" 'post)
-      
-      s))
-
-(define (symbol->tex-key sym)
-  (regexp-substitute/global
-   #f "_" (sanitize-tex-string (symbol->string sym)) 'pre "X" 'post) )
-
-(define (tex-number-def prefix key number)
-  (string-append
-   "\\def\\" prefix (symbol->tex-key key) "{" number "}%\n"))
-
-(define-public (tex-font-command font)
-  (string-append
-   "magfont"
-   (string-encode-integer
-    (hashq (ly:font-filename font) 1000000))
-   "m"
-   (string-encode-integer
-    (inexact->exact (round (* 1000 (ly:font-magnification font)))))))
-
-(define (font-load-command bookpaper font)
-  (string-append
-   "\\font\\" (tex-font-command font) "="
-   (ly:font-filename font)
-   " scaled "
-   (ly:number->string (inexact->exact
-                      (round (* 1000
-                         (ly:font-magnification font)
-                         (ly:bookpaper-outputscale bookpaper)))))
-   "\n"))
-
-
-(define (define-fonts bookpaper)
-  (string-append
-   "\\def\\lilypondpaperunit{mm}" ;; UGH. FIXME.
-   (tex-number-def "lilypondpaper" 'outputscale
-                  (number->string (exact->inexact
-                                   (ly:bookpaper-outputscale bookpaper))))
-   (tex-string-def "lilypondpaper" 'papersize
-                  (eval 'papersize (ly:output-def-scope bookpaper)))
-
-   (apply string-append
-         (map (lambda (x) (font-load-command bookpaper x))
-              (ly:bookpaper-fonts bookpaper)))))
-
-(define (header-to-file fn key val)
-  (set! key (symbol->string key))
-  (if (not (equal? "-" fn))
-      (set! fn (string-append fn "." key)))
-  (display
-   (format "Writing header field `~a' to `~a'..."
-          key
-          (if (equal? "-" fn) "<stdout>" fn)
-          )
-   (current-error-port))
-  (if (equal? fn "-")
-      (display val)
-      (display val (open-file fn "w")))
-  (display "\n" (current-error-port))
-  "")
-
-(define (output-scopes  scopes fields basename)
-  (define (output-scope scope)
-    (apply
-     string-append
-     (module-map
-      (lambda (sym var)
-       (let ((val (if (variable-bound? var) (variable-ref var) ""))
-             )
-         
-         (if (and (memq sym fields) (string? val))
-             (header-to-file basename sym val))
-         ""))
-      scope)))
-  (apply string-append (map output-scope scopes)))
-
-(define (tex-string-def prefix key str)
-  (if (equal? "" (sans-surrounding-whitespace (sanitize-tex-string str)))
-      (string-append "\\let\\" prefix (symbol->tex-key key) "\\undefined%\n")
-      (string-append "\\def\\" prefix (symbol->tex-key key)
-                    "{" (sanitize-tex-string str) "}%\n")))
-
-(define (header creator time-stamp bookpaper page-count classic?)
-  (let ((scale (ly:output-def-lookup bookpaper 'outputscale)))
-
-    (string-append
-     "% Generated by " creator "\n"
-     "% at " time-stamp "\n"
-     (if classic?
-        (tex-string-def "lilypond" 'classic "1")
-        "")
-
-     (tex-string-def
-      "lilypondpaper" 'linewidth
-      (ly:number->string (* scale (ly:output-def-lookup bookpaper 'linewidth))))
-
-     (tex-string-def
-      "lilypondpaper" 'interscoreline
-      (ly:number->string
-       (* scale (ly:output-def-lookup bookpaper 'interscoreline)))))))
-
-(define (header-end)
-  (string-append
-   "\\def\\scaletounit{ "
-   (number->string (cond
-                   ((equal? (ly:unit) "mm") (/ 72.0 25.4))
-                   ((equal? (ly:unit) "pt") (/ 72.0 72.27))
-                   (else (error "unknown unit" (ly:unit)))))
-   " mul }%\n"
-   "\\ifx\\lilypondstart\\undefined\n"
-   "  \\input lilyponddefs\n"
-   "\\fi\n"
-   "\\outputscale = \\lilypondpaperoutputscale\\lilypondpaperunit\n"
-   "\\lilypondstart\n"
-   "\\lilypondspecial\n"
-   "\\lilypondpostscript\n"))
-
-(define (dump-page putter page last?)
-  (ly:outputter-dump-string
-   putter
-   "\n\\vbox to 0pt{%\n\\leavevmode\n\\lybox{0}{0}{0}{0}{%\n")
-  (ly:outputter-dump-stencil putter page)
-  (ly:outputter-dump-string
-   putter
-   (if last?
-       "}\\vss\n}\n\\vfill\n"
-       "}\\vss\n}\n\\vfill\\lilypondpagebreak\n")))
-
-(define-public (output-framework outputter book scopes fields basename)
-  (let* ((bookpaper (ly:paper-book-book-paper book))
-        (pages (ly:paper-book-pages book))
-        (last-page (car (last-pair pages)))
-        )
-    (for-each
-     (lambda (x)
-       (ly:outputter-dump-string outputter x))
-     (list
-      (header "creator" "timestamp" bookpaper (length pages) #f)
-      (define-fonts bookpaper)
-      (header-end)))
-    
-    (for-each
-     (lambda (page) (dump-page outputter page (eq? last-page page)))
-     pages)
-    (ly:outputter-dump-string outputter "\\lilypondend\n")))
-
-(define (dump-line putter line last?)
-  (ly:outputter-dump-string
-   putter
-   (string-append "\\leavevmode\n\\lybox{0}{0}{0}{"
-                 (ly:number->string (ly:paper-system-extent line Y))
-                 "}{"))
-
-  (ly:outputter-dump-stencil putter (ly:paper-system-stencil line))
-  (ly:outputter-dump-string
-   putter
-   (if last?
-       "}%\n"
-       "}\\interscoreline\n")))
-
-(define-public (output-classic-framework
-               outputter book scopes fields basename)
-  (let* ((bookpaper (ly:paper-book-book-paper book))
-        (lines (ly:paper-book-lines book))
-        (last-line (car (last-pair lines))))
-    (for-each
-     (lambda (x)
-       (ly:outputter-dump-string outputter x))
-     (list
-      ;;FIXME
-      (header "creator" "timestamp" bookpaper (length lines) #f)
-      "\\def\\lilypondclassic{1}%\n"
-      (output-scopes scopes fields basename)
-      (define-fonts bookpaper)
-      (header-end)))
-
-    (for-each
-     (lambda (line) (dump-line outputter line (eq? line last-line))) lines)
-    (ly:outputter-dump-string outputter "\\lilypondend\n")))
-
-
-(define-public (output-preview-framework
-               outputter book scopes fields basename)
-  (let* ((bookpaper (ly:paper-book-book-paper book))
-        (lines (ly:paper-book-lines book)))
-    (for-each
-     (lambda (x)
-       (ly:outputter-dump-string outputter x))
-     (list
-      ;;FIXME
-      (header "creator" "timestamp" bookpaper (length lines) #f)
-      "\\def\\lilypondclassic{1}%\n"
-      (output-scopes scopes fields basename)
-      (define-fonts bookpaper)
-      (header-end)))
-
-    (dump-line outputter (car lines) #t)
-    (ly:outputter-dump-string outputter "\\lilypondend\n")))
diff --git a/scm/fret-diagrams.scm b/scm/fret-diagrams.scm
deleted file mode 100644 (file)
index a5e4985..0000000
+++ /dev/null
@@ -1,628 +0,0 @@
-;;;; fret-diagrams.scm -- 
-;;;;
-;;;;  source file of the GNU LilyPond music typesetter
-;;;; 
-;;;; (c) 2004 Carl D. Sorensen <c_sorensen@byu.edu>
-
-(define ly:paper-lookup ly:output-def-lookup) ; compat for 2.3, remove  when using 2.2
-(define fontify-text-white fontify-text)  ;  temporary until fontify-text-white works properly (see draw-dots for usage)
-
-;;TODO -- Change font interface from name, magnification to family, weight, size
-;      Right now, using the desired interface gives an error, so we use name, magnification
-
-(define (fret-parse-marking-list marking-list fret-count)
-   (let* ((fret-range (list 1 fret-count))
-          (barre-list '())
-          (dot-list '())
-          (xo-list '())
-          (output-alist '()))
-      (let parse-item ((mylist marking-list))
-          (if (not (null? mylist))
-              (let* ((my-item (car mylist)) (my-code (car my-item)))
-                 (cond
-                     ((or (eq? my-code 'open)(eq? my-code 'mute))
-                        (set! xo-list (cons* my-item xo-list)))
-                     ((eq? my-code 'barre)
-                        (set! barre-list (cons* (cdr my-item) barre-list)))
-                     ((eq? my-code 'place-fret)
-                        (set! dot-list (cons* (cdr my-item) dot-list))))
-                 (parse-item (cdr mylist)))))
-               ; calculate fret-range
-               (let ((maxfret 0) (minfret 99))
-                    (let updatemax ((fret-list dot-list))
-                        (if (null?  fret-list)
-                           '()
-                           (let ((fretval (second (car fret-list))))
-                               (if (> fretval maxfret) (set! maxfret fretval))
-                               (if (< fretval minfret) (set! minfret fretval))
-                               (updatemax (cdr fret-list)))))
-                    (if (> maxfret fret-count)
-                        (set! fret-range (list minfret
-                             (let ((upfret (- (+ minfret fret-count) 1)))
-                                  (if (> maxfret upfret) maxfret upfret)))))
-                    ; subtract fret from dots
-                    (set! dot-list (subtract-base-fret (- (car fret-range) 1) dot-list)))
-               (acons 'fret-range fret-range
-               (acons 'barre-list barre-list
-               (acons 'dot-list dot-list
-               (acons 'xo-list xo-list '()))))))
-   
-(define (subtract-base-fret base-fret dot-list)
-"Subtract @var{base-fret} from every fret in @var{dot-list}"  
-  (if (null? dot-list)
-      '()
-      (let ((this-list (car dot-list)))
-      (cons* (list (car this-list) (- (second this-list) base-fret) (if (null? (cddr this-list))
-                                                                    '()
-                                                                    (third this-list)))
-             (subtract-base-fret base-fret (cdr dot-list))))))
-
-(define (draw-strings string-count fret-range th size)
-"Draw the strings (vertical lines) for a fret diagram with @var{string-count} strings and frets as indicated
-   in @var{fret-range}.  Line thickness is given by @var{th}, fret & string spacing by @var{size}. "
-  (let* ((fret-count (+ (- (cadr fret-range) (car fret-range)) 1))
-         (sl (* (+ fret-count 1) size))
-         (sth (* size th))
-         (half-thickness (* sth 0.5))
-         (gap (- size sth))
-         (string-stencil (ly:make-stencil (list 'draw-line sth 0 0 0 sl)
-                         (cons (- half-thickness) half-thickness)
-                         (cons (- half-thickness) (+ sl half-thickness)))))
-    (if (= string-count 1)
-         string-stencil
-        (ly:stencil-combine-at-edge
-         (draw-strings (- string-count 1) fret-range th size) X RIGHT
-         string-stencil
-         gap 0))))
-
-(define (draw-fret-lines fret-count string-count th size)
- "Draw @var{fret-count} frets (horizontal lines) for a fret diagram with @var{string-count} strings.
-   Line thickness is given by @var{th}, fret & string spacing by @var{size}. "
-   (let* ((fret-length (* (- string-count 1) size))
-          (sth (* size th))
-          (half-thickness (* sth 0.5))
-          (gap (- size sth))
-          (fret-line (ly:make-stencil (list 'draw-line sth half-thickness size (- fret-length half-thickness) size)
-                          (cons 0 fret-length)
-                          (cons (- size half-thickness) (+  size half-thickness)))))
-       (if (= fret-count 1)
-         fret-line
-         (ly:stencil-combine-at-edge fret-line Y UP
-          (draw-fret-lines (- fret-count 1) string-count th size)
-          gap 0))))
-          
-(define (draw-thick-top-fret props string-count th size)
- "Draw a thick top fret for a fret diagram whose base fret is not 1."
-   (let* ((sth (* th size))
-          (top-fret-thick (* sth (chain-assoc-get 'top-fret-thickness props 3.0)))
-          (top-half-thick (* top-fret-thick 0.5))
-          (half-thick (* sth 0.5))
-          (x1 half-thick)
-          (x2 (+ half-thick (* size (- string-count 1))))
-          (y1 0)
-          (y2 top-fret-thick)
-          (x-extent (cons (- x1) x2))
-          (y-extent (cons 0 y2)))
-          (ly:make-stencil (list 'round-filled-box x1 x2 y1 y2 th)
-                            x-extent y-extent)))           
-(define (draw-frets paper props fret-range string-count th size)
- "Draw the frets (horizontal lines) for a fret diagram with @var{string-count} strings and frets as indicated
-   in @var{fret-range}.  Line thickness is given by @var{th}, fret & string spacing by @var{size}. "
-  (let* ((top-fret-thick (* th (chain-assoc-get 'top-fret-thickness props 3.0)))
-         (fret-count (+ (- (cadr fret-range) (car fret-range)) 1))
-         (fret-length (* (- string-count 1) size))
-         (half-thickness (* th 0.5))
-         (base-fret (car fret-range)))
-       (ly:stencil-combine-at-edge
-          (draw-fret-lines fret-count string-count th size) Y UP
-             (if (= base-fret 1)
-                 (draw-thick-top-fret props string-count th size)
-                 (draw-fret-lines 1 string-count th size)) 
-                 (- size th) 0))) 
-                 
-
-(define (centered-text-stencil procedure font text)
-"Create a centered text stencil of @var{text} in font @var{font} using stencil creation procedure @var{procedure}"
-;UGH -- version check is necessary because 2.3 is not available on cygwin, so CDS development
-;   needs 2.2 compatible ly:stencil-align-to!
-;   Once 2.3 is built on cygwin, version check can go (fret-diagrams.scm is not part of dist for 2.2)
-(let* ((text-stencil (procedure font text)))
-     (if (= (cadr (ly:version)) 3)
-        (begin
-          (ly:stencil-align-to! text-stencil Y 0)
-          (ly:stencil-align-to! text-stencil X 0)
-          text-stencil)
-        (ly:stencil-align-to (ly:stencil-align-to text-stencil X 0) Y 0))))
-
-(define (draw-dots paper props string-count fret-range size finger-code dot-circle-font-mag dot-position dot-radius dot-list)
-  "Make dots for fret diagram."
-;TODO -- move away from name,magnification font spec to family, size
-;  Note -- family, size doesn't work with fontify-text procedure; need to fix that before we can make the switch
-  (let* ((scale-dot-radius (* size dot-radius))
-         (dot-color (chain-assoc-get 'dot-color props 'black))
-         (finger-xoffset (chain-assoc-get 'finger-xoffset props -0.25))
-         (finger-yoffset (chain-assoc-get 'finger-yoffset props (- size)))
-;part of deprecated font interface 
-         (label-font-name (chain-assoc-get 'label-font-name props "cmss8"))
-         (white-dot-font-mag (* scale-dot-radius (chain-assoc-get 'white-dot-font-mag props 1.8))) 
-         (dot-label-font-mag (* scale-dot-radius (chain-assoc-get 'dot-label-font-mag props 1.2)))
-         (string-label-font-mag (* size (chain-assoc-get 'string-label-font-mag props 0.6)))
-         (fret-count (+ (- (cadr fret-range) (car fret-range) 1)))
-         (mypair (car dot-list))
-         (restlist (cdr dot-list))
-         (xpos (* size (- string-count (car mypair))))
-;TODO -- figure out what 4 is and get rid of it
-;UGH -- 4?
-         (ypos (* size (+ 4 (- fret-count (cadr mypair) dot-position ))))
-         (extent (cons (- scale-dot-radius) scale-dot-radius))
-         (finger (caddr mypair))
-         (finger (if (number? finger) (number->string finger) finger))
-; desired font interface
-          (string-label-font (ly:paper-get-font paper `(((font-family . sans)(font-encoding . latin1)(font-series . medium) (font-shape . upright)
-                                        (font-size . ,(stepmag (* size string-label-font-mag)))))))
-; deprecated font interface
-;         (string-label-font (ly:paper-get-font paper `(((font-magnification . ,string-label-font-mag)
-;                                                        (font-name . ,label-font-name)))))
-; desired font interface
-          (dot-label-font (ly:paper-get-font paper `(((font-family . sans)(font-encoding . latin1)(font-series . medium) (font-shape . upright)
-                                        (font-size . ,(stepmag (* size dot-label-font-mag)))))))
-; deprecated font interface
-;         (dot-label-font (ly:paper-get-text-font paper `(((font-magnification . ,dot-label-font-mag)
-;                                                     (font-name . ,label-font-name)))))
-; desired font interface
-          (dot-circle-font (ly:paper-get-font paper `(((font-family . sans)(font-encoding . latin1)(font-series . medium) (font-shape . upright)
-                                        (font-size . ,(stepmag (* size dot-circle-font-mag)))))))
-; deprecated font interface
-;         (dot-circle-font (ly:paper-get-font paper `(((font-magnification . ,dot-circle-font-mag)
-;                                                      (font-name . ,label-font-name)))))
-; deprecated font interface
-         (white-dot-font (ly:paper-get-font paper `(((font-magnification . ,white-dot-font-mag)
-                                                      (font-name . ,label-font-name)))))
-         (dotstencil  (if (eq? dot-color 'white)
-                          (begin
-                          (ly:make-stencil (list 'white-dot 0 0 scale-dot-radius) extent extent))
-                          (ly:make-stencil (list 'dot 0 0 scale-dot-radius ) extent extent)))
-         (positioned-dot (ly:stencil-translate-axis
-                           (ly:stencil-translate-axis dotstencil xpos X)
-                           ypos Y))
-         (labeled-dot-stencil 
-                 (if (or (eq? finger '())(eq? finger-code 'none))
-                     positioned-dot
-                 (if (eq? finger-code 'in-dot)
-                    (let*  ((dot-proc (if (eq? dot-color 'white) 'white-dot 'dot))
-                            (text-proc (if (eq? dot-color 'white) fontify-text fontify-text-white)))
-                     (ly:stencil-add 
-                        (ly:stencil-translate-axis 
-                          (ly:stencil-translate-axis 
-                              (centered-text-stencil text-proc dot-label-font finger) xpos X)
-                              ypos Y)
-                        (ly:stencil-translate-axis
-                           (ly:stencil-translate-axis 
-                              (ly:make-stencil (list dot-proc 0 0 scale-dot-radius) extent extent)
-                               xpos X)
-                           ypos Y)))
-                 (if (eq? finger-code 'below-string) 
-                     (ly:stencil-add 
-                         positioned-dot
-                         (ly:stencil-translate-axis 
-                             (ly:stencil-translate-axis 
-                                 (centered-text-stencil fontify-text string-label-font finger) xpos  X)
-                             (* size finger-yoffset) Y))
-                     ;unknown finger-code
-                     positioned-dot)))))
-    (if (null? restlist) 
-        labeled-dot-stencil
-        (ly:stencil-add 
-            (draw-dots paper props string-count fret-range size finger-code dot-circle-font-mag
-                          dot-position dot-radius restlist)
-            labeled-dot-stencil))))
-
-(define (draw-xo paper props string-count fret-range size xo-list) 
-"Put open and mute string indications on diagram, as contained in @var{xo-list}."
-;TODO -- Move away from name,mag font spec to family, size
-    (let* ((fret-count (+ (- (cadr fret-range) (car fret-range) 1)))
-           (xo-font-mag (* size (chain-assoc-get 'xo-font-magnification props 0.5)))
-           (xo-font-name (chain-assoc-get 'xo-font-name props "cmss8"))
-           (xo-horizontal-offset (* size (chain-assoc-get 'xo-horizontal-offset props -0.35)))
-; desired font interface
-;           (font (ly:paper-get-font paper `(((font-family . sans)(font-series . medium) (font-shape . upright)
-;                                        (font-size . ,(stepmag (* size xo-font-mag)))))))
-; deprecated font interface
-           (font (ly:paper-get-font paper `(((font-magnification . ,xo-font-mag)
-                                             (font-name . ,xo-font-name)))))
-           (mypair (car xo-list))
-           (restlist (cdr xo-list))
-           (glyph-string (if (eq? (car mypair) 'mute) "X" "O"))
-           (xpos (+ (* (- string-count (cadr mypair)) size) xo-horizontal-offset ))
-           (glyph-stencil (ly:stencil-translate-axis (fontify-text font glyph-string) xpos X)))
-      (if (null? restlist)
-          glyph-stencil
-          (ly:stencil-add
-            (draw-xo paper props string-count fret-range size restlist)
-            glyph-stencil))))
-
-(define (make-bezier-sandwich-list left right bottom height thickness)
-" Make the argument list for a horizontal bezier sandwich from @var{left} to @var{right} with a bottom at @var{bottom}, 
-  a height of @var{height}, and a thickness of @var{thickness}."
-   (let* ((width (+ (- right left) 1))
-          (x1 (+ (* width thickness) left))
-          (x2 (- right (* width thickness)))
-          (bottom-control-point-height (+ bottom (- height thickness)))
-          (top-control-point-height (+ bottom height)))
-           ; order of points is: left cp low, right cp low, right end low, left end low
-           ;                     right cp high, left cp high, left end high, right end high.
-       (list (cons x1 bottom-control-point-height) (cons x2 bottom-control-point-height) (cons right bottom) (cons left bottom)
-             (cons x2 top-control-point-height) (cons x1 top-control-point-height) (cons left bottom) (cons right bottom))))
-
-(define (draw-barre paper props string-count fret-range size finger-code dot-circle-font-mag dot-position dot-radius barre-list)
-   "Create barre indications for a fret diagram"
-   (if (not (null? barre-list))
-     (let* ((string1 (caar barre-list))
-            (string2 (cadar barre-list))
-            (fret    (caddar barre-list))
-            (barre-vertical-offset (chain-assoc-get 'barre-vertical-offset props 0.5))
-            ; 2 is 1 for empty fret at bottom of figure + 1 for interval (top-fret - fret + 1) -- not an arbitrary constant
-            (bottom (+ (* size (- (+ 2 (- (cadr fret-range) fret))dot-position) ) (* size barre-vertical-offset dot-radius)))
-            (left (* size (- string-count string1)))
-            (right (* size (- string-count string2)))
-            (bezier-thick (chain-assoc-get 'bezier-thickness props 0.1))
-            (bezier-height (chain-assoc-get 'bezier-height props 0.5))
-            (bezier-list (make-bezier-sandwich-list left right bottom (* size bezier-height) (* size bezier-thick)))
-            (sandwich-stencil (ly:make-stencil (list 'bezier-sandwich `(quote ,bezier-list) (* size bezier-thick) )
-                                  (cons 0 right)
-                                  (cons 0 (+ bottom (* size bezier-height))))))
-        (if (not (null? (cdr barre-list)))
-            (ly:stencil-add sandwich-stencil
-                 (draw-barre paper props string-count fret-range size finger-code dot-circle-font-mag
-                      dot-position dot-radius (cdr barre-list)))
-            sandwich-stencil ))))
-
-  
-(define (stepmag mag)
-"Calculate the font step necessary to get a desired magnification"
-(* 6 (/ (log mag) (log 2))))
-
-(define (label-fret paper props string-count fret-range size)
-   "Label the base fret on a fret diagram"
-;TODO -- move away from name,magnification font spec to family, size
-   (let* ((base-fret (car fret-range))
-          (label-font-mag (chain-assoc-get 'fret-label-font-magnification props 0.7))
-;          (label-horizontal-offset (chain-assoc-get 'fret-label-horizontal-offset props -0.5))
-          (label-vertical-offset (chain-assoc-get 'fret-label-vertical-offset props -0.2))
-          (fret-count (+ (- (cadr fret-range) (car fret-range)) 1))
-; desired font interface
-;          (font (ly:paper-get-font paper `(((font-family . sans)(font-series . medium) (font-shape . upright)
-;                                        (font-size . ,(stepmag (* size label-font-mag))))))))
-; deprecated font interface
-          (font (ly:paper-get-font paper `(((font-magnification . ,label-font-mag)
-                                                      (font-name . "cmss8"))))))          
-       (ly:stencil-translate-axis (fontify-text font (format #f "~(~:@r~)" base-fret)) 
-                       (* size (+ fret-count label-vertical-offset)) Y)))
-(def-markup-command (fret-diagram-verbose paper props marking-list)
-  (list?)
-;TODO -- put table in doc string
-  "Make a fret diagram containing the symbols indicated in @var{marking-list}
-  
-  Syntax: \\fret-diagram   marking-list
-  
-  For example,
-  
-  @verbatim
-   \\markup \\fret-diagram #'((mute 6) (mute 5) (open 4) (place-fret 3 2) (place-fret 2 3) (place-fret 1 2))
-  @end verbatim 
-  
-  will produce a standard D chord diagram without fingering indications.
-  
-Possible elements in @var{marking-list}:
-@table @asis
-@item (mute string-number)
-Place a small 'x' at the top of string @var{string-number}
-
-@item (open string-number)
-Place a small 'o' at the top of string @var{string-number}
-
-@item (barre start-string end-string fret-number)
-Place a barre indicator (much like a tie) from string @var{start-string}to string @var{end-string} at fret @var{fret-number}
-
-@item (place-fret string-number fret-number finger-value)
-Place a fret playing indication on string @var{string-number} at fret @var{fret-number} with an optional 
-fingering label @var{finger-value}.  By default, the fret playing indicator is a solid dot.  This can be
-changed by setting the value of the variable @var{dot-color}.  If the @var{finger} 
-part of the place-fret element is present, @var{finger-value} will be displayed according to the setting of the variable
-@var{finger-code}.  There is no limit to the number of fret indications per string.
-@end table
-"
-   (make-fret-diagram paper props marking-list))
-   
-(define (make-fret-diagram paper props marking-list)
-" Make a fret diagram markup"
-  (let* (
-         ; note:  here we get items from props that are needed in this routine, or that are needed in more than one
-         ; of the procedures called from this routine.  If they're only used in one of the sub-procedure, they're 
-         ; obtained in that procedure
-         
-         (size (chain-assoc-get 'size props 1.0)) ; needed for everything
-;TODO -- get string-count directly from length of stringTunings; requires FretDiagram engraver, which is not yet available
-;TODO -- adjust padding for fret label?  it appears to be too close to dots
-         (string-count (chain-assoc-get 'string-count props 6)) ; needed for everything
-         (fret-count (chain-assoc-get 'fret-count props 4)) ; needed for everything
-         (dot-position (chain-assoc-get 'dot-position props 0.6)) ; needed for both draw-dots and draw-barre
-         (dot-radius (chain-assoc-get 'dot-radius props 0.25))  ; needed for both draw-dots and draw-barre
-         (finger-code (chain-assoc-get 'finger-code props 'none))  ; needed for both draw-dots and draw-barre
-         (dot-circle-font-mag (* size (chain-assoc-get 'dot-circle-font-mag props .75))) ; needed for both draw-dots and draw-barre
-         (th (* (ly:paper-lookup paper 'linethickness)
-                (chain-assoc-get 'thickness props 0.5))) ; needed for both draw-frets and draw-strings
-                
-         (alignment (chain-assoc-get 'alignment props -0.4)) ; needed only here
-         (xo-padding (* th (chain-assoc-get 'xo-padding props 2))) ; needed only here
-
-         (parameters (fret-parse-marking-list marking-list fret-count))
-         (dot-list (cdr (assoc 'dot-list parameters)))
-         (xo-list (cdr (assoc 'xo-list parameters)))
-         (fret-range (cdr (assoc 'fret-range parameters)))
-         (barre-list (cdr (assoc 'barre-list parameters)))
-         (fret-diagram-stencil (ly:stencil-add
-                            (draw-strings string-count fret-range th size)
-                            (draw-frets paper props fret-range string-count th size))))
-         (if (not (null? barre-list))
-             (set! fret-diagram-stencil (ly:stencil-add
-                                    (draw-barre paper props string-count fret-range size finger-code dot-circle-font-mag 
-                                                dot-position dot-radius barre-list)
-                                    fret-diagram-stencil)))
-         (if (not (null? dot-list))
-             (set! fret-diagram-stencil (ly:stencil-add
-                                    (draw-dots paper props string-count fret-range size finger-code dot-circle-font-mag
-                                          dot-position dot-radius dot-list)
-                                    fret-diagram-stencil)))
-         (if (not (null? xo-list))
-             (set! fret-diagram-stencil (ly:stencil-combine-at-edge
-                                    fret-diagram-stencil Y UP
-                                    (draw-xo paper props string-count fret-range size xo-list) xo-padding 0)))
-         (if (> (car fret-range) 1) 
-             (set! fret-diagram-stencil
-                   (ly:stencil-combine-at-edge fret-diagram-stencil X RIGHT
-                                              (label-fret paper props string-count fret-range size) 0 0)))
-         (ly:stencil-align-to! fret-diagram-stencil X alignment)
-         fret-diagram-stencil))
-         
-(def-markup-command (fret-diagram paper props definition-string)
-  (string?)
-;TODO -- put table in doc string
-  "Syntax: \\fret-diagram definition-string
-  
-eg: \\markup \\fret-diagram #\"s:0.75;6-x;5-x;4-o;3-2;2-3;1-2;\"
-
-for fret spacing 3/4 of staff space, D chord diagram
-
-Syntax rules for @var{definition-string}:
-@itemize @minus
-      
-@item
-Diagram items are separated by semicolons.
-
-@item
-Possible items:
-
-@itemize @bullet
-@item
-s:number -- set the fret spacing of the diagram (in staff spaces). Default 1
-
-@item
-t:number -- set the line thickness (in staff spaces).  Default 0.05
-
-@item
-h:number -- set the height of the diagram in frets.  Default 4
-
-@item
-w:number -- set the width of the diagram in strings.  Default 6
-
-@item
-f:number -- set fingering label type (0 = none, 1 = in circle on string, 2 = below string)  Default 0
-
-@item
-d:number -- set radius of dot, in terms of fret spacing.  Default 0.25
-
-@item
-p:number -- set the position of the dot in the fret space. 0.5 is centered; 1 is on lower fret bar,
-0 is on upper fret bar.  Default 0.6 
-
-@item
-c:string1-string2-fret -- include a barre mark from string1 to string2 on fret
-      
-@item
-string-fret -- place a dot on string at fret.  If fret is o, string is identified
-as open.  If fret is x, string is identified as muted.
-
-@item
-string-fret-fingering -- place a dot on string at fret, and label with fingering as 
-defined by f: code.
-
-@end itemize
-
-@item
-Note:  There is no limit to the number of fret indications per string.
-@end itemize
-    
-"
-;       (define new-props (acons 'size size '()))
-;       (set! props (cons new-props props))
-       (let ((definition-list (fret-parse-definition-string props definition-string)))
-       (make-fret-diagram paper (car definition-list) (cdr definition-list))))
-
-(define (fret-parse-definition-string props definition-string)
- "parse a fret diagram string and return a pair containing:
-  props, modified as necessary by the definition-string
-  a fret-indication list with the appropriate values"
-   (let* ((fret-count 4)
-          (string-count 6)
-   ;       (thickness 0.05)
-   ;       (finger-code 0)
-   ;       (dot-size 0.25)
-   ;       (dot-position 0.6)
-          (fret-range (list 1 fret-count))
-          (barre-list '())
-          (dot-list '())
-          (xo-list '())
-          (output-list '())
-          (new-props '())
-          (items (string-split definition-string #\;)))
-      (let parse-item ((myitems items))
-          (if (not (null?  (cdr myitems))) 
-              (let ((test-string (car myitems)))
-                 (case (car (string->list (substring test-string 0 1))) 
-                    ((#\s) (let ((size (get-numeric-from-key test-string)))
-                                (set! new-props (acons 'size size new-props))))
-                    ((#\f) (let* ((finger-code (get-numeric-from-key test-string))
-                                  (finger-id (case finger-code
-                                     ((0) 'none)
-                                     ((1) 'in-dot) 
-                                     ((2) 'below-string))))
-                                (set! new-props
-                                   (acons 'finger-code finger-id new-props))))
-                    ((#\c) (set! output-list (cons-fret (cons 'barre (numerify (string-split (substring test-string 2) #\-)))
-                                            output-list)))
-                    ((#\h) (let ((fret-count (get-numeric-from-key test-string)))
-                                (set! new-props (acons 'fret-count fret-count new-props))))
-                    ((#\w) (let ((string-count (get-numeric-from-key test-string)))
-                                (set! new-props (acons 'string-count string-count new-props))))
-                    ((#\d) (let ((dot-size (get-numeric-from-key test-string)))
-                                (set! new-props (acons 'dot-radius dot-size new-props))))
-                    ((#\p) (let ((dot-position (get-numeric-from-key test-string)))
-                                (set! new-props (acons 'dot-position dot-position new-props))))
-                    (else 
-                       (let ((this-list (string-split test-string #\-)))
-                           (if (string->number (cadr this-list))
-                              (set! output-list (cons-fret (cons 'place-fret (numerify this-list)) output-list))
-                              (if (equal? (cadr this-list) "x" )
-                                  (set! output-list (cons-fret (list 'mute (string->number (car this-list))) output-list))
-                                  (set! output-list (cons-fret (list 'open (string->number (car this-list))) output-list)))))))
-                 (parse-item (cdr myitems)))))
-                 (if (eq? new-props '())
-                 `(,props . ,output-list)
-                 `(,(cons new-props props) . ,output-list))))
-
-(define (cons-fret new-value old-list)
-"  Put together a fret-list in the format desired by parse-string "
-  (if (eq? old-list '())
-      (list new-value)
-      (cons* new-value old-list)))
-                 
-(define (get-numeric-from-key keystring)
- "Get the numeric value from a key  of the form k:val"
-    (string->number (substring keystring 2  (string-length keystring) )))
-  
-(define (numerify mylist)
- "Convert string values to numeric or character"
-     (if (null? mylist)
-         '()
-         (let ((numeric-value (string->number (car mylist))))
-             (if numeric-value
-                (cons* numeric-value (numerify (cdr mylist)))
-                (cons* (car (string->list (car mylist))) (numerify (cdr mylist)))))))
-           
-(def-markup-command (fret-diagram-terse paper props definition-string)
-  (string?)
-;TODO -- put table in doc string
-  "Make a fret diagram markup using terse string-based syntax.
-
-Syntax: \\fret-diagram-terse definition-string
-
-eg: \\markup \\fret-diagram #\"x;x;o;2;3;2;\" for a D chord diagram.
-
-Syntax rules for @var{definition-string}:
-@itemize @bullet
-
-@item    
-Strings are terminated by semicolons; the number of semicolons 
-is the number of strings in the diagram.
-
-@item
-Mute strings are indicated by \"x\".
-
-@item
-Open strings are indicated by \"o\".
-
-@item
-A number indicates a fret indication at that fret.
-
-@item
-If there are multiple fret indicators desired on a string, they
-should be separated by spaces.
-
-@item
-Fingerings are given by following the fret number with a \"-\",
-followed by the finger indicator, e.g. 3-2 for playing the third
-fret with the second finger.
-
-@item
-Where a barre indicator is desired, follow the fret (or fingering) symbol
-with \"-(\" to start a barre and \"-)\" to end the barre.
-@end itemize"
-;TODO -- change syntax to fret\string-finger
-       (let ((definition-list (fret-parse-terse-definition-string props definition-string)))
-       (make-fret-diagram paper (car definition-list) (cdr definition-list))))
-
-(define (fret-parse-terse-definition-string props definition-string)
- "parse a fret diagram string that uses terse syntax; return a pair containing:
-    props, modified to include the string-count determined by the definition-string
-    a fret-indication list with the appropriate values"
-;TODO -- change syntax to  fret\string-finger
-;TODO -- fix bug that doesn't allow multiple indications per string
-   (let* ((barre-start-list '())
-          (output-list '())
-          (new-props '())
-          (items (string-split definition-string #\;))
-          (string-count (- (length items) 1)))
-      (let parse-item ((myitems items))
-          (if (not (null?  (cdr myitems))) 
-              (let* ((test-string (car myitems))
-                    (current-string (- (length myitems) 1))
-                    (indicators (string-split test-string #\ )))
-                    (let parse-indicators ((myindicators indicators))
-                       (if (not (eq? '() myindicators))
-                           (let* ((this-list (string-split (car myindicators) #\-))
-                                  (max-element-index (- (length this-list) 1))
-                                  (last-element (car (list-tail this-list max-element-index)))
-                                  (fret (if (string->number (car this-list)) (string->number (car this-list)) (car this-list))))
-                               (if (equal? last-element "(") ; here I add ) to balance parentheses for my editor
-                                   (begin
-                                     (set! barre-start-list (cons-fret (list current-string fret) barre-start-list))
-                                     (set! this-list (list-head this-list max-element-index))))
-                               (if (equal? last-element ")") ; here I add ( to balance parentheses for my editor
-                                   (let* ((this-barre (get-sub-list fret barre-start-list))
-                                          (insert-index (- (length this-barre) 1)))
-                                     (set! output-list (cons-fret (cons* 'barre (car this-barre) current-string (cdr this-barre)) 
-                                                                  output-list))
-                                     (set! this-list (list-head this-list  max-element-index))))
-                               (if (number? fret)
-                                   (set! output-list (cons-fret (cons* 'place-fret current-string (drop-paren (numerify this-list))) output-list))
-                                   (if (equal? (car this-list) "x" )
-                                       (set! output-list (cons-fret (list 'mute current-string) output-list))
-                                       (set! output-list (cons-fret (list 'open current-string) output-list))))
-                               (parse-indicators (cdr myindicators)))))
-                 (parse-item (cdr myitems)))))
-                 (set! new-props (acons 'string-count string-count new-props))
-                 
-                 `(,(cons new-props props) . ,output-list)))
-
-(define (drop-paren item-list)
-" drop a final parentheses from a fret indication list resulting from a terse string specification of barre."
-     (if (> (length item-list) 0)
-         (let* ((max-index (- (length item-list) 1))
-            (last-element (car (list-tail item-list max-index))))
-            (if (or (equal? last-element ")") (equal? last-element "("))
-              (list-head item-list max-index) 
-              item-list))
-          item-list))
-          
-(define (get-sub-list value master-list)
-" Get a sub-list whose cadr is equal to @var{value} from @var{master-list}"
-    (if (eq? master-list '())
-      #f
-      (let ((sublist (car master-list)))
-           (if (equal? (cadr sublist) value)
-               sublist
-               (get-sub-list value (cdr master-list))))))
index e082e897f3acc5b6fa22e10ecfdcf9f2baef94e8..7528e0efee3538de87bf6147e2f146f26aa0f249 100644 (file)
@@ -7,7 +7,6 @@
 
 ;;; Library functions
 
-
 (if (defined? 'set-debug-cell-accesses!)
     (set-debug-cell-accesses! #f))
 
             (srfi srfi-1)  ; lists
             (srfi srfi-13)) ; strings
 
+(define-public safe-module (make-safe-module))
+
 (define-public (myd k v) (display k) (display ": ") (display v) (display ", "))
 
 ;;; General settings
 ;;; debugging evaluator is slower.  This should
 ;;; have a more sensible default.
 
+
 (if (ly:get-option 'verbose)
     (begin
       (debug-enable 'debug)
       (debug-enable 'backtrace)
-      (read-enable 'positions)))
+      (read-enable 'positions) ))
+
 
 (define-public (line-column-location line col file)
   "Print an input location, including column number ."
   (string-append (number->string line) ":"
-                (number->string col) " " file))
+                (number->string col) " " file)
+  )
 
 (define-public (line-location line col file)
   "Print an input location, without column number ."
-  (string-append (number->string line) " " file))
+  (string-append (number->string line) " " file)
+  )
 
 (define-public point-and-click #f)
 
-(define-public parser #f)
-
 (define-public (lilypond-version)
   (string-join
    (map (lambda (x) (if (symbol? x)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; lily specific variables.
-
 (define-public default-script-alist '())
 
+(define-public safe-mode? #f)
 
-;; parser stuff.
-(define-public (print-music-as-book parser music)
-  (let* ((score (ly:music-scorify music))
-        (head  (ly:parser-lookup parser '$globalheader))
-        (book (ly:score-bookify score head)))
-    (ly:parser-print-book parser book)))
-
-(define-public (print-score-as-book parser score)
-  (let*
-      ((head  (ly:parser-lookup parser '$globalheader))
-       (book (ly:score-bookify score head)))
-    
-    (ly:parser-print-book parser book)))
-
-(define-public (print-score parser score)
-  (let* ((head  (ly:parser-lookup parser '$globalheader))
-       (book (ly:score-bookify score head)))
-    (ly:parser-print-score parser book)))
-               
-(define-public default-toplevel-music-handler print-music-as-book)
-(define-public default-toplevel-book-handler ly:parser-print-book)
-(define-public default-toplevel-score-handler print-score-as-book)
-
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Unassorted utility functions.
 
 
 ;;;;;;;;;;;;;;;;
 ; alist
+(define (uniqued-alist  alist acc)
+  (if (null? alist) acc
+      (if (assoc (caar alist) acc)
+         (uniqued-alist (cdr alist) acc)
+         (uniqued-alist (cdr alist) (cons (car alist) acc)))))
+
+
 (define-public (assoc-get key alist . default)
   "Return value if KEY in ALIST, else DEFAULT (or #f if not specified)."
   (let ((entry (assoc key alist)))
     (if (pair? entry)
        (cdr entry)
-       (if (pair? default) (car default) #f))))
+       (if (pair? default) (car default) #f)
+       )))
 
-(define-public (uniqued-alist alist acc)
+(define-public (uniqued-alist  alist acc)
   (if (null? alist) acc
       (if (assoc (caar alist) acc)
          (uniqued-alist (cdr alist) acc)
@@ -364,7 +354,10 @@ L1 is copied, L2 not.
   (not (= l r)))
 
 (define-public (ly:load x)
-  (let* ((fn (%search-load-path x)))
+  (let* (
+        (fn (%search-load-path x))
+
+        )
     (if (ly:get-option 'verbose)
        (format (current-error-port) "[~A]" fn))
     (primitive-load fn)))
@@ -372,56 +365,45 @@ L1 is copied, L2 not.
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;  output
+(use-modules
+            ;(scm output-sketch)
+            ;(scm output-sodipodi)
+            ;(scm output-pdftex)
+
+            )
 
-   
-;;(define-public (output-framework) (write "hello\n"))
 
 (define output-tex-module
   (make-module 1021 (list (resolve-interface '(scm output-tex)))))
 (define output-ps-module
   (make-module 1021 (list (resolve-interface '(scm output-ps)))))
-
+(define-public (tex-output-expression expr port)
+  (display (eval expr output-tex-module) port))
 (define-public (ps-output-expression expr port)
   (display (eval expr output-ps-module) port))
 
-;; TODO: generate this list by registering the stencil expressions
-;;       stencil expressions should have docstrings.
-(define-public (ly:all-stencil-expressions)
-  "Return list of stencil expressions."
-  '(
-    beam
-    bezier-sandwich
-    blank
-    bracket
-    char
-    dashed-line
-    dashed-slur
-    dot
-    draw-line
-    ez-ball
-    filledbox
-    horizontal-line
-    polygon
-    repeat-slash
-    round-filled-box
-    symmetric-x-triangle
-    text
-    tuplet
-    white-dot
-    zigzag-line
+(define output-alist
+  `(
+    ("tex" . ("TeX output. The default output form." ,tex-output-expression))
+    ("scm" . ("Scheme dump: debug scheme stencil expressions" ,write))
+;    ("sketch" . ("Bare bones Sketch output." ,sketch-output-expression))
+;    ("sodipodi" . ("Bare bones Sodipodi output." ,sodipodi-output-expression))
+;    ("pdftex" . ("PDFTeX output. Was last seen nonfunctioning." ,pdftex-output-expression))
     ))
 
-;; TODO: generate this list by registering the output-backend-commands
-;;       output-backend-commands should have docstrings.
-(define-public (ly:all-output-backend-commands)
-  "Return list of output backend commands."
-  '(
-    comment
-    define-origin
-    no-origin
-    placebox
-    unknown
-    ))
+
+(define (document-format-dumpers)
+  (map
+   (lambda (x)
+     (display (string-append  (pad-string-to 5 (car x)) (cadr x) "\n"))
+     output-alist)
+   ))
+
+(define-public (find-dumper format)
+  (let ((d (assoc format output-alist)))
+    (if (pair? d)
+       (caddr d)
+       (scm-error "Could not find dumper for format ~s" format))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; other files.
@@ -442,31 +424,24 @@ L1 is copied, L2 not.
        "define-music-properties.scm"
        "auto-beam.scm"
        "chord-name.scm"
-
-       "ly-from-scheme.scm"
        
        "define-context-properties.scm"
        "translation-functions.scm"
        "script.scm"
        "midi.scm"
+
        "beam.scm"
        "clef.scm"
        "slur.scm"
        "font.scm"
-       "encoding.scm"
        
-       "fret-diagrams.scm"
        "define-markup-commands.scm"
        "define-grob-properties.scm"
        "define-grobs.scm"
        "define-grob-interfaces.scm"
+
        "page-layout.scm"
-       "titling.scm"
-       
        "paper.scm"
-
-       ; last:
-       "safe-lily.scm"
        ))
 
 
@@ -540,23 +515,7 @@ L1 is copied, L2 not.
                 " ")
                "\n")))
           protects))
-     outfile)))
+     outfile)
 
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
-
-(define-public (lilypond-main files)
-  "Entry point for LilyPond."
-  (let* ((failed '())
-        (handler (lambda (key arg) (set! failed (cons arg failed)))))
-    (for-each
-     (lambda (f) (catch 'ly-file-failed (lambda () (ly:parse-file f)) handler))
-     files)
-
-    (if (pair? failed)
-       (begin
-         (display
-          (string-append "\n *** Failed files: " (string-join failed) "\n"))
-         (exit 1))
-       (exit 0))))
+    ))
 
diff --git a/scm/ly-from-scheme.scm b/scm/ly-from-scheme.scm
deleted file mode 100644 (file)
index f7928db..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-;;;; ly-from-scheme.scm -- parsing LilyPond music expressions from scheme
-;;;;
-;;;;  source file of the GNU LilyPond music typesetter
-;;;; 
-;;;; (c) 2004  Nicolas Sceaux  <nicolas.sceaux@free.fr>
-;;;;           Jan Nieuwenhuizen <janneke@gnu.org>
-
-(define gen-lily-sym
-  ;; Generate a lilyvartmpXX symbol, that may be (hopefully) unique.
-  (let ((var-idx -1))
-    (lambda ()
-      (set! var-idx (1+ var-idx))
-      (string->symbol (format #f "lilyvartmp~a"
-                              (list->string (map (lambda (chr)
-                                                   (integer->char (+ (char->integer #\a) (- (char->integer chr)
-                                                                                            (char->integer #\0)))))
-                                                 (string->list (number->string var-idx)))))))))
-
-(define-public (ly:parse-string-result str parser module)
-  "Parse `str', which is supposed to contain a music expression."
-  (let ((music-sym (gen-lily-sym)))
-    (ly:parser-parse-string
-     parser
-     (format #f "
-~a = { ~a }
-#(ly:export '~a)
-#(module-define! (resolve-module '~a) '~a ~a)
-"
-             music-sym str music-sym (module-name module) music-sym music-sym))
-  (eval `,music-sym module)))
-
-(define-public (read-lily-expression chr port)
-  "Read a #{ lily music expression #} from port and return
-the scheme music expression. The $ character may be used to introduce
-scheme forms, typically symbols. $$ may be used to simply write a `$'
-character."
-  (let ((bindings '()))
-    (define (create-binding! val)
-      "Create a new symbol, bind it to `val' and return it."
-      (let ((tmp-symbol (gen-lily-sym)))
-        (set! bindings (cons (cons tmp-symbol val) bindings))
-        tmp-symbol))
-    (define (remove-dollars! form)
-      "Generate a form where `$variable' and `$ value' mottos are replaced
-      by new symbols, which are binded to the adequate values."
-      (cond (;; $variable
-             (and (symbol? form)
-                  (string=? (substring (symbol->string form) 0 1) "$")
-                  (not (string=? (substring (symbol->string form) 1 2) "$")))
-             (create-binding! (string->symbol (substring (symbol->string form) 1))))
-            (;; atom
-             (not (pair? form)) form)
-            (;; ($ value ...)
-             (eqv? (car form) '$)
-             (cons (create-binding! (cadr form)) (remove-dollars! (cddr form))))
-            (else ;; (something ...)
-             (cons (remove-dollars! (car form)) (remove-dollars! (cdr form))))))
-    (let ((lily-string (call-with-output-string
-                        (lambda (out)
-                          (do ((c (read-char port) (read-char port)))
-                             ((and (char=? c #\#)
-                                   (char=? (peek-char port) #\})) ;; we stop when #} is encoutered
-                              (read-char port))
-                           (cond
-                            ;; a $form expression
-                            ((and (char=? c #\$) (not (char=? (peek-char port) #\$)))
-                             (format out "\\~a" (create-binding! (read port))))
-                            ;; just a $ character
-                            ((and (char=? c #\$) (char=? (peek-char port) #\$))
-                             (display (read-char port) out))  ;; pop the second $
-                            ;; a #scheme expression
-                            ((char=? c #\#)
-                             (format out "#~a" (remove-dollars! (read port))))
-                            ;; other caracters
-                            (else
-                             (display c out))))))))
-      `(let ((parser-clone (ly:clone-parser parser)))
-         ,@(map (lambda (binding)
-                  `(ly:parser-define parser-clone ',(car binding) ,(cdr binding)))
-                (reverse bindings))
-         (ly:parse-string-result ,lily-string parser-clone (current-module))))))
-
-(read-hash-extend #\{ read-lily-expression)
index e63f9579a26e522ab711538d40da66fe69ce5acc..d80760d66907019c8d9815a12c3ecc27d69aa1a3 100644 (file)
@@ -1,11 +1,11 @@
-;;;; music-functions.scm --
+;;;; music-functions.scm -- implement Scheme output routines for PostScript
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;; 
 ;;;; (c)  1998--2004 Jan Nieuwenhuizen <janneke@gnu.org>
-;;;;                 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
-;; (use-modules (ice-9 optargs)) 
+(use-modules (ice-9 optargs)) 
 
 ;;; ly:music-property with setter
 ;;; (ly:music-property my-music 'elements)
 
 (define-public (unfold-repeats music)
   "
-This function replaces all repeats  with unfold repeats. "
+This function replaces all repeats  with unfold repeats. It was 
+written by Rune Zedeler. "
   
   (let ((es (ly:music-property music 'elements))
        (e  (ly:music-property music 'element))
        (n  (ly:music-name music)))
     (if (equal? n "Repeated_music")
-       (begin
+       (let*
+           ((seq-arg? (memq 'sequential-music
+                                                  (ly:music-property e 'types))))
          
          (if (equal? (ly:music-property music 'iterator-ctor)
                      Chord_tremolo_iterator::constructor)
-             (let*
-                 ((seq-arg? (memq 'sequential-music
-                                  (ly:music-property e 'types)))
-                  (count  (ly:music-property music 'repeat-count))
-                  (dot-shift (if (= 0 (remainder count 3))
-                                 -1 0))
-                  )
-
-               (if (= 0 -1)
-                   (set! count (* 2 (quotient count 3))))
-               
+             (begin
                (shift-duration-log music (+ (if seq-arg? 1 0)
-                                            (ly:intlog2 count)) dot-shift)
-               
+                                            (ly:intlog2 (ly:music-property music 'repeat-count))) 0)
                (if seq-arg?
                    (ly:music-compress e (ly:make-moment (length (ly:music-property e 'elements)) 1)))
                ))
@@ -374,10 +366,9 @@ of beat groupings "
 (define-public (set-time-signature num den . rest)
   (ly:export (apply make-time-signature-set `(,num ,den . ,rest))))
 
-(define-public (make-penalty-music pen page-pen)
+(define-public (make-penalty-music pen)
   (make-music 'BreakEvent
-             'penalty pen
-             'page-penalty page-pen))
+             'penalty pen))
 
 (define-public (make-articulation name)
   (make-music 'ArticulationEvent
@@ -580,27 +571,6 @@ without context specification. Called  from parser."
     (if (vector? props)
        (vector-reverse-map execute-1 props))))
 
-
-
-(defmacro-public def-grace-function (start stop)
-  `(def-music-function (location music) (ly:music?)
-     (make-music 'GraceMusic
-                'origin location
-                'element (make-music 'SequentialMusic
-                                     'elements (list (ly:music-deep-copy ,start)
-                                                     music
-                                                     (ly:music-deep-copy ,stop))))))
-
-(defmacro-public def-music-function (args signature . body)
-  "Helper macro for `ly:make-music-function'.
-Syntax:
-  (def-music-function (location arg1 arg2 ...) (arg1-type? arg2-type? ...)
-    ...function body...)
-"
-  `(ly:make-music-function (list ,@signature)
-                          (lambda (,@args)
-                            ,@body)))
-
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; switch it on here, so parsing and init isn't checked (too slow!)
 ;;
@@ -744,3 +714,5 @@ use GrandStaff as a context. "
       (else
        (ly:warn (string-append "Unknown accidental style: " (symbol->string style)))
        (make-sequential-music '()))))))
+
+
index 44067bae691b54d631a47d045312bbcbe6fed507..2d3632cdf86e731d82c751000d8bc8f937922245 100644 (file)
@@ -175,11 +175,8 @@ e.g. (make-COMMAND-markup arg1 arg2 ...), and the rest expression."
          ;; expr === ((#:COMMAND arg1 ...) ...)
          (receive (m r) (compile-markup-expression (car expr))
                   (values m (cdr expr))))
-        ((and (pair? expr)
-              (string? (car expr))) ;; expr === ("string" ...)
-         (values `(make-simple-markup ,(car expr)) (cdr expr)))
         (else
-         ;; expr === (symbol ...) or ((funcall ...) ...)
+         ;; expr === (symbol ...) or ("string" ...) or ((funcall ...) ...)
          (values (car expr)
                  (cdr expr)))))
 
@@ -415,7 +412,6 @@ Also set markup-signature and markup-keyword object properties."
 
 
 (define-public (stack-stencil-line space stencils)
-  "DOCME"
   (if (and (pair? stencils)
           (ly:stencil? (car stencils)))
       
diff --git a/scm/output-gnome.scm b/scm/output-gnome.scm
deleted file mode 100644 (file)
index 025b10a..0000000
+++ /dev/null
@@ -1,249 +0,0 @@
-;;;; output-gnome.scm -- implement GNOME canvas output
-;;;;
-;;;;  source file of the GNU LilyPond music typesetter
-;;;; 
-;;;; (c)  2004 Jan Nieuwenhuizen <janneke@gnu.org>
-
-;;; TODO:
-;;;
-;;;  * Figure out and fix font scaling and character placement
-;;;  * EC font package: add missing X font directories and AFMs
-;;;  * User-interface, keybindings
-;;;  * Implement missing stencil functions
-;;;  * Implement missing commands
-;;;  * More information in stencils, e.g., location and grob tag.
-;;;  * Embedded Lily:
-;;;    - allow GnomeCanvas or `toplevel' GtkWindow to be created
-;;;      outside of LilyPond
-;;;    - lilylib.
-;;;  * Release schedule and packaging of dependencies.  This hack
-;;;    depends on several CVS and TLA development sources.
-
-;;; You need:
-;;;
-;;;   * guile-1.6.4 (NOT CVS -- we are working on this)
-;;;   * Rotty's g-wrap--tng TLA, possibly Janneke's if you have libffi-3.4.
-;;;   * guile-gnome TLA
-;;;   * pango CVS (ie, > 2004-06-12)
-;;;
-;;; See also: guile-gtk-general@gnu.org
-
-;;; Try it
-;;;
-;;;   * If you are using GUILE CVS, recompile LilyPond with GUILE 1.6.
-
-;;;     [If for some unknown or funny reason you do not want to
-;;;      overwrite your lilypond-bin with GUILE CVS, you can
-;;;      reconfigure a new configuration, say g16:
-"
-PATH=/usr/bin/:$PATH ./configure --enable-config=g16 && make conf=g16
-"
-;;;     ]
-;;;
-;;;   * Install gnome/gtk development stuff
-;;;
-;;;   * Install g-wrap and guile-gnome, see buildscripts/guile-gnome.sh
-;;;  
-;;;   * Setup environment
-"
-export GUILE_LOAD_PATH=$HOME/usr/pkg/g-wrap/share/guile/site:$HOME/usr/pkg/g-wrap/share/guile/site/g-wrap:$HOME/usr/pkg/guile-gnome/share/guile
-export LD_LIBRARY_PATH=$HOME/usr/pkg/g-wrap/lib:$HOME/usr/pkg/guile-gnome/lib
-export XEDITOR='/usr/bin/emacsclient --no-wait +%l:%c %f'
-"
-;;;  * Also for GNOME point-and-click, you need to set XEDITOR and add
-"
-#(ly:set-point-and-click 'line-column)
-"
-;;;    to your .ly; then click an object on the canvas.
-;;;
-;;;  * Run lily:
-"
-lilypond-bin -fgnome input/simple-song.ly
-"
-
-
-(debug-enable 'backtrace)
-
-(define-module (scm output-gnome))
-(define this-module (current-module))
-
-(use-modules
- (guile)
- (srfi srfi-13)
- (lily)
- (gnome gtk))
-
-
-;; The name of the module will change to `canvas' rsn
-(if (resolve-module '(gnome gw canvas))
-    (use-modules (gnome gw canvas))
-    (use-modules (gnome gw libgnomecanvas)))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; globals
-
-;; junkme
-(define system-origin '(0 . 0))
-
-;;; set by framework-gnome.scm
-(define canvas-root #f)
-(define output-scale #f)
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; helper functions
-
-(define (stderr string . rest)
-  ;; debugging
-  (if #f
-      (begin
-       (apply format (cons (current-error-port) (cons string rest)))
-       (force-output (current-error-port)))))
-
-(define (utf8 i)
-  (cond
-   ((< i #x80) (make-string 1 (integer->char i)))
-   ((< i #x800) (list->string
-                (map integer->char
-                     (list (+ #xc0 (quotient i #x40))
-                           (+ #x80 (modulo i #x40))))))
-   ((< i #x10000)
-    (let ((x (quotient i #x1000))
-         (y (modulo i #x1000)))
-      (list->string
-       (map integer->char
-           (list (+ #xe0 x)
-                 (+ #x80 (quotient y #x40))
-                 (+ #x80 (modulo y #x40)))))))
-   (else FIXME)))
-  
-(define (custom-utf8 i)
-  (if (< i 80)
-      (utf8 i)
-      (utf8 (+ #xee00 i))))
-
-(define (draw-rectangle x1 y1 x2 y2 color width-units)
-  (make <gnome-canvas-rect>
-    #:parent (canvas-root) #:x1 x1 #:y1 y1 #:x2 x2 #:y2 y2
-    #:fill-color color #:width-units width-units))
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; stencil outputters
-;;;
-
-;;; catch-all for missing stuff
-;;; comment this out to see find out what functions you miss :-)
-(define (dummy . foo) #f)
-(map (lambda (x) (module-define! this-module x dummy))
-     (append
-      (ly:all-stencil-expressions)
-      (ly:all-output-backend-commands)))
-
-
-
-(define (char font i)
-  (text font (utf8 i)))
-
-(define (placebox x y expr)
-  (stderr "item: ~S\n" expr)
-  (let ((item expr))
-    ;;(if item
-    ;; FIXME ugly hack to skip #unspecified ...
-    (if (and item (not (eq? item (if #f #f))))
-       (begin
-         (move item
-               (* output-scale (+ (car system-origin) x))
-               (* output-scale (- (car system-origin) y)))
-         (affine-relative item output-scale 0 0 output-scale 0 0)
-         item)
-       #f)))
-
-(define (round-filled-box breapth width depth height blot-diameter)
-  ;; FIXME: no rounded corners on rectangle...
-  ;; FIXME: blot?
-  (draw-rectangle (- breapth) depth width (- height) "black" blot-diameter))
-
-(define (pango-font-name font)
-  (cond
-   ((equal? (ly:font-name font) "GNU-LilyPond-feta-20")
-    "lilypond-feta, regular 32")
-   (else
-    ;; FIXME
-    "ecrm12")))
-    ;;(ly:font-name font))))
-    ;;(ly:font-filename font))))
-
-(define (pango-font-size font)
-  (let* ((designsize (ly:font-design-size font))
-        (magnification (* (ly:font-magnification font)))
-        
-        ;; experimental sizing:
-        ;; where does factor come from?
-        ;;
-        ;; 0.435 * (12 / 20) = 0.261
-        ;; 2.8346456692913/ 0.261 = 10.86071137659501915708
-        ;;(ops (* 0.435 (/ 12 20) (* output-scale pixels-per-unit)))
-        ;; for size-points
-        (ops 2.61)
-        
-        (scaling (* ops magnification designsize)))
-    (stderr "OPS:~S\n" ops)
-    (stderr "scaling:~S\n" scaling)
-    (stderr "magnification:~S\n" magnification)
-    (stderr "design:~S\n" designsize)
-    
-    scaling))
-
-;;font-name: "GNU-LilyPond-feta-20"
-;;font-filename: "feta20"
-;;pango-font-name: "lilypond-feta, regular 32"
-;;OPS:2.61
-;;scaling:29.7046771653543
-;;magnification:0.569055118110236
-;;design:20.0
-
-(define (text font string)
-  (stderr "font-name: ~S\n" (ly:font-name font))
-  ;; TODO s/filename/file-name/
-  (stderr "font-filename: ~S\n" (ly:font-filename font))
-  
-  (stderr "pango-font-name: ~S\n" (pango-font-name font))
-  (stderr "pango-font-size: ~S\n" (pango-font-size font))
-  
-  (make <gnome-canvas-text>
-    #:parent (canvas-root)
-    
-    ;; experimental text placement corrections.
-    ;; UGHR?  What happened to tex offsets?  south-west?
-    ;; is pango doing something 'smart' wrt baseline ?
-    #:anchor 'south-west
-    #:x 0.003 #:y 0.123
-    
-    ;;#:anchor 'west
-    ;;#:x 0.015 #:y -3.71
-    
-    #:font (pango-font-name font)
-    
-    #:size-points (pango-font-size font)
-    ;;#:size ...
-    #:size-set #t
-    
-    ;;apparently no effect :-(
-    ;;#:scale 1.0
-    ;;#:scale-set #t
-    
-    #:fill-color "black"
-    #:text string))
-
-(define (filledbox a b c d)
-  (round-filled-box a b c d 0.001))
-
-;; WTF is this in every backend?
-(define (horizontal-line x1 x2 thickness)
-  (filledbox (- x1) (- x2 x1) (* .5 thickness) (* .5 thickness)))
-
-(define (define-origin file line col)
-  (if (procedure? point-and-click)
-      (list 'location line col file)))
index d034cf6ef9b24398242fecdeffc5aa47b3950f10..3c55c436593a1809e15cd78c77ae3e8095961c02 100644 (file)
@@ -20,7 +20,7 @@
       (list-ref tuning
                 (- string 1) ; remove 1 because list index starts at 0 and guitar string at 1.
                 )
-      ))
+      ) ) 
 
 (define-public (hammer-print-function grob)
   (let* ((note-collums (ly:grob-property grob 'note-columns))
@@ -42,7 +42,7 @@
           (paper (ly:grob-paper grob))
           (text (interpret-markup
                  paper
-                 (ly:grob-alist-chain grob (ly:output-def-lookup paper 'text-font-defaults))
+                 (ly:grob-alist-chain grob (ly:paper-lookup paper 'text-font-defaults))
                  letter)))
     
       (let ((x (/ (- (cdr (ly:stencil-extent slur 0)) 
 
 
 (define-public (make-stencil-boxer line-thick x-padding y-padding callback)
-  "Makes a routine that adds a box around the grob parsed as argument"
+   "Makes a routine that adds a box around the grob parsed as argument"
   (define (stencil-boxer grob)
-    (let*
-       (
-        (mol    (callback grob))
-        (x-ext (interval-widen (ly:stencil-extent mol 0) x-padding))
-        (y-ext (interval-widen (ly:stencil-extent mol 1) y-padding))
-        (x-rule (make-filled-box-stencil (interval-widen x-ext line-thick)
-                                         (cons 0 line-thick)))
-        (y-rule (make-filled-box-stencil (cons 0 line-thick) y-ext))
-        )
-
-      (set! mol (ly:stencil-combine-at-edge mol 0 1 y-rule x-padding))
-      (set! mol (ly:stencil-combine-at-edge mol 0 -1 y-rule x-padding))
-      (set! mol (ly:stencil-combine-at-edge mol 1 1 x-rule 0))  
-      (set! mol (ly:stencil-combine-at-edge mol 1 -1 x-rule 0))
-      
-      mol))
-  stencil-boxer)
+  (let*
+   (
+    (mol    (callback grob))
+    (x-ext (interval-widen (ly:stencil-extent mol 0) x-padding))
+    (y-ext (interval-widen (ly:stencil-extent mol 1) y-padding))
+    (x-rule (make-filled-box-stencil (interval-widen x-ext line-thick)
+                              (cons 0 line-thick)))
+    (y-rule (make-filled-box-stencil (cons 0 line-thick) y-ext))
+    )
+    
+    (set! mol (ly:stencil-combine-at-edge mol 0 1 y-rule x-padding))
+    (set! mol (ly:stencil-combine-at-edge mol 0 -1  y-rule x-padding))
+    (set! mol (ly:stencil-combine-at-edge mol 1 1  x-rule 0))  
+    (set! mol (ly:stencil-combine-at-edge mol 1 -1 x-rule 0))
+    
+    mol
+ ))
+ stencil-boxer
+ )
 
 (define-public (arg->string arg)
   (cond ((number? arg) (ly:inexact->string arg 10))
 ;;  (* (/ 72.27 25.40) x))
 
 ;; do nothing in .scm output
+(define-public (comment s) "")
 
 (define-public (ly:numbers->string lst)
   (string-join (map ly:number->string lst) " "))
index 691e8f3c558e2a9267208a0c2312d8ac6080c99a..81ffdb0489e43b9988fef02f43ba45c800066e32 100644 (file)
@@ -60,6 +60,9 @@
                   (lineto 0 (/ thick 2))
                   (closefill))))
 
+(define (comment s) 
+  (string-append "% " s "\n"))
+
 (define (brack-traject pair ds alpha)
   (let ((alpha-rad (* alpha (/ 3.141592654 180))))
     (cons (+ (car pair) (* (cos alpha-rad) ds))
                   (rlineto (- xwid) 0)
                   (closefill))))
 
+(define (end-output) "")
 
 (define (experimental-on) "")
 
index 09d448c1f682613e4d9c243e191acba014f6af7c..d7e6e259dda4acd730b8a6daf4160d71d09e58c5 100644 (file)
     (string-append "\\embeddedpdf{" (get-output-string os) "}")))
 
 
+(define (comment s)
+  (simple-format #f "% ~a\n" s))
+
+(define (end-output) 
+  (begin
+                                       ; uncomment for some stats about lily memory      
+                                       ;               (display (gc-stats))
+    (string-append "%\n\\lilypondend\n"
+                                       ; Put GC stats here.
+                  )))
 
 (define (experimental-on)
   "")
 
 (define (repeat-slash w a t)
   (embedded-pdf (list 'repeat-slash w a t)))
+(define (fontify name-mag-pair exp)
+  (string-append (select-font name-mag-pair)
+                exp))
 
 
 (define (tex-encoded-fontswitch name-mag)
 
 ;; FIXME: explain ploblem: need to do something to make this really safe.  
 (define (output-tex-string s)
-  (if (ly:get-option 'safe)
-      (regexp-substitute/global #f "\\\\"
-                               (regexp-substitute/global #f "\\([{}]\\)" s 'pre "\\1" 'post)
-                                'pre "$\\backslash$" 'post)
-      
+  (if safe-mode?
+      (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post)
       s))
 
 (define (lily-def key val)
index 5b00dfe908cc434f6dbd725c29401ecea5237650..f3f2cc97b5f8e7e29aa82d5746eee6f28526c702 100644 (file)
@@ -1,4 +1,4 @@
-;;;; output-ps.scm -- implement Scheme output interface for PostScript
+;;;; output-ps.scm -- implement Scheme output routines for PostScript
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;; 
@@ -9,7 +9,11 @@
 ;;;;       input/test/title-markup.ly
 ;;;; 
 ;;;; TODO:
-;;;;   * %% Papersize in (header ...)
+;;;;   * papersize in header
+;;;;   * special characters, encoding.
+;;;;     + implement encoding switch (switches?  input/output??),
+;;;;     + move encoding definitions to ENCODING.ps files, or
+;;;;     + find out which program's PS(?) encoding code we can use?
 ;;;;   * text setting, kerning.
 ;;;;   * document output-interface
 
 
 (define-module (scm output-ps)
   #:re-export (quote)
-  #:export (unknown
+  #:export (define-fonts
+            unknown
+            output-paper-def
+            output-scopes
+            select-font
             blank
             dot
-            white-dot
             beam
             bracket
             dashed-slur
             symmetric-x-triangle
             ez-ball
             comment
+            end-output
+            experimental-on
             repeat-slash
+            header-end
+            header
             placebox
             bezier-sandwich
+            start-system
+            stop-system
+            stop-last-system
             horizontal-line
             filledbox
             round-filled-box
             tuplet
             polygon
             draw-line
+            between-system-string
             define-origin
             no-origin
-            ))
-
-
+            start-page
+            stop-page
+            )
+)
 (use-modules (guile)
             (ice-9 regex)
-            (srfi srfi-1)
             (srfi srfi-13)
-            (scm framework-ps)
             (lily))
 
+;;; Global vars
+;; alist containing fontname -> fontcommand assoc (both strings)
+(define page-count 0)
+(define page-number 0)
+(define font-name-alist '())
 
-;;(map export
-;;   (append (ly:all-stencil-expressions) (ly:all-output-backend-commands)))
-
-;; huh?
-;;(write (ly:all-output-backend-commands))
-;;(write (ly:all-stencil-expressions))
+;; /lilypondpaperoutputscale 1.75729901757299 def
+;;/lily-output-units 2.83464  def  %% milimeter
+;;/output-scale lilypondpaperoutputscale lily-output-units mul def
+;;
+;; output-scale = 1.75729901757299 * 2.83464 = 4.9813100871731003736
 
+(define OUTPUT-SCALE 4.98)
+(define TOP-MARGIN 0)
 
 ;;; helper functions, not part of output interface
 (define (escape-parentheses s)
   (cons (+ (car a) (car b))
        (+ (cdr a) (cdr b))))
 
+;; WIP
+(define font-encoding-alist
+  '(("ecrm12" . "ISOLatin1Encoding")
+    ("ecmb12" . "ISOLatin1Encoding")))
+                
 (define (ps-encoding text)
   (escape-parentheses text))
 
 ;; FIXME: lily-def
-(define-public (ps-string-def prefix key val)
+(define (ps-string-def prefix key val)
   (string-append "/" prefix (symbol->string key) " ("
                 (escape-parentheses val)
                 ") def\n"))
               (ly:number->string (exact->inexact val)))))
     (string-append "/" prefix (symbol->string key) " " s " def\n")))
 
+(define (tex-font? fontname)
+  (equal? (substring fontname 0 2) "cm"))
+
 
 ;;;
 ;;; Lily output interface, PostScript implementation --- cleanup and docme
     (list arch_angle arch_width arch_height height arch_thick thick))
    " draw_bracket"))
 
-(define (char font i)
+(define (char i)
   (string-append 
-    (ps-font-command font) " setfont " 
    "(\\" (ly:inexact->string i 8) ") show" ))
 
+(define (comment s)
+  (string-append "% " s "\n"))
+
 (define (dashed-line thick on off dx dy)
   (string-append 
    (ly:number->string dx) " "
    (ly:number->string (* 10 thick))
    " ] 0 draw_dashed_slur"))
 
-; todo: merge with tex-font-command?
+(define (define-fonts internal-external-name-mag-pairs)
 
+  (define (fontname->designsize fontname)
+    (let ((i (string-index fontname char-numeric?)))
+      (string->number (substring fontname i))))
+  
+  (define (define-font command fontname scaling)
+    (string-append
+     "/" command " { /" fontname " findfont "
+     (ly:number->string scaling) " output-scale div scalefont } bind def\n"))
 
+  (define (reencode-font raw encoding command)
+    (string-append
+     raw " " encoding " /" command " reencode-font\n"
+     "/" command "{ /" command " findfont 1 scalefont } bind def\n"))
+         
+  ;; frobnicate NAME to jibe with external definitions.
+  (define (possibly-mangle-fontname fontname)
+    (cond
+     ((tex-font? fontname)
+      ;; FIXME: we need proper Fontmap for CM fonts, like so:
+      ;; /CMR10 (cmr10.pfb); 
+      ;; (string-upcase fontname)
+      (string-append fontname ".pfb"))
+     ((or (equal? (substring fontname 0 4) "feta")
+         (equal? (substring fontname 0 4) "parm"))
+      (regexp-substitute/global
+       #f "(feta|parmesan)([a-z-]*)([0-9]+)"
+       fontname 'pre "GNU-LilyPond-" 1 2 "-" 3 'post))
+     (else fontname)))
+                        
+  ;;  (define (font-load-command name-mag command)
+  (define (font-load-command lst)
+    (let* ((key-name-size (car lst))
+          (value (cdr lst))
+          (value-name-size (car value))
+          (command (cdr value))
+          (fontname (car value-name-size))
+          (mangled (possibly-mangle-fontname fontname))
+          (encoding (assoc-get fontname font-encoding-alist))
+          (designsize (fontname->designsize fontname))
+          (fontsize (cdr value-name-size))
+          (scaling (* fontsize designsize)))
+
+      (if
+       #f
+       (begin
+        (newline)
+        (format (current-error-port) "key-name-size ~S\n" key-name-size)
+        (format (current-error-port) "value ~S\n" value)
+        (format (current-error-port) "value-name-size ~S\n" value-name-size)
+        (format (current-error-port) "command ~S\n" command)
+        (format (current-error-port) "designsize ~S\n" designsize)
+        (format (current-error-port) "fontname ~S\n" fontname)
+        (format (current-error-port) "mangled ~S\n" mangled)
+        (format (current-error-port) "fontsize ~S\n" fontsize)
+        (format (current-error-port) "scaling ~S\n" scaling)))
+      
+      (if encoding
+         ;; FIXME: should rather tag encoded font
+         (let ((raw (string-append command "-raw")))
+           (string-append
+            (define-font raw mangled scaling)
+            (reencode-font raw encoding command)))
+         (define-font command mangled scaling))))
+  
+  (define (ps-encoded-fontswitch name-mag-pair)
+    (let* ((key (car name-mag-pair))
+          (value (cdr name-mag-pair))
+          (fontname (car value))
+          (scaling (cdr value)))
+      (cons key (cons value
+                     (string-append
+                      "lilyfont" fontname "-" (ly:number->string scaling))))))
+
+  (set! font-name-alist
+       (map ps-encoded-fontswitch internal-external-name-mag-pairs))
+  (apply string-append (map font-load-command font-name-alist)))
 
 (define (define-origin file line col) "")
 
    (ly:numbers->string
     (list x y radius)) " draw_dot"))
 
-(define (white-dot x y radius)
-  (string-append
-   " "
-   (ly:numbers->string
-    (list x y radius)) " draw_white_dot"))
-
 (define (draw-line thick x1 y1 x2 y2)
   (string-append 
    "1 setlinecap 1 setlinejoin "
    (ly:number->string x2) " "
    (ly:number->string y2) " lineto stroke"))
 
+(define (end-output)
+  "\nend-lilypond-output\n")
+
 (define (ez-ball ch letter-col ball-col)
   (string-append
    " (" ch ") "
    " /Helvetica-Bold " ;; ugh
    " draw_ez_ball"))
 
-(define (filledbox breapth width depth height) ; FIXME : use draw_round_box
+(define (filledbox breapth width depth height) 
   (string-append (ly:numbers->string (list breapth width depth height))
                 " draw_box"))
 
-;; WTF is this in every backend?
+(define (fontify name-mag-pair exp)
+
+  (define (select-font name-mag-pair)
+    (let ((c (assoc name-mag-pair font-name-alist)))
+      
+      (if c
+         (string-append (cddr c) " setfont ")
+         (begin
+           (ly:warn
+            (format "Programming error: No such font: ~S" name-mag-pair))
+           ""))))
+  
+  (string-append (select-font name-mag-pair) exp))
+
+(define (header creator time-stamp page-count-)
+  (set! page-count page-count-)
+  (set! page-number 0)
+  (string-append
+   "%!PS-Adobe-3.0\n"
+   "%%Creator: " creator " " time-stamp "\n"
+   "%%Pages: " (number->string page-count) "\n"
+   "%%PageOrder: Ascend\n"
+   ;; FIXME: TODO get from paper
+   ;; "%%DocumentPaperSizes: a6\n"
+   ;;(string-append "GNU LilyPond (" (lilypond-version) "), ")
+   ;;     (strftime "%c" (localtime (current-time))))
+   ;; FIXME: duplicated in every backend
+   (ps-string-def
+    "lilypond" 'tagline
+    (string-append "Engraved by LilyPond (version " (lilypond-version) ")"))))
+
+(define (header-end)
+  (string-append
+   (ly:gulp-file "lilyponddefs.ps")
+   (ly:gulp-file "music-drawing-routines.ps")))
+
 (define (horizontal-line x1 x2 th)
-  (draw-line th x1 0 x2 0))
+  (draw-line th x1  0 x2 0))
 
 (define (lily-def key val)
   (let ((prefix "lilypondpaper"))
 
 (define (no-origin) "")
 
-
+;; FIXME: duplictates output-scopes, duplicated in other backends
+;; FIXME: silly interface name
+(define (output-paper-def pd)
+  (let ((prefix "lilypondpaper"))
+    
+    (define (scope-entry->string key var)
+      (let ((val (variable-ref var)))
+       (cond
+        ((string? val) (ps-string-def prefix key val))
+        ((number? val) (ps-number-def prefix key val))
+        (else ""))))
+      
+    (apply
+     string-append
+     (module-map scope-entry->string (ly:output-def-scope pd)))))
+
+;; FIXME: duplicated in other output backends
+;; FIXME: silly interface name
+(define (output-scopes paper scopes fields basename)
+  (let ((prefix "lilypond"))
+
+    ;; FIXME: duplicates output-paper's scope-entry->string, mostly
+    (define (scope-entry->string key var)
+      (if (variable-bound? var)
+         (let ((val (variable-ref var)))
+           (if (and (memq key fields) (string? val))
+               (header-to-file basename key val))
+           (cond
+            ((string? val) (ps-string-def prefix key val))
+            ((number? val) (ps-number-def prefix key val))
+            (else "")))
+         ""))
+    
+    (define (output-scope scope)
+      (apply string-append (module-map scope-entry->string scope)))
+
+    (string-append (apply string-append (map output-scope scopes)))))
+
+;; hmm, looks like recursing call is always last statement, does guile
+;; think so too?
+(define (output-stencil port expr offset)
+  (if (pair? expr)
+      (let ((head (car expr)))
+       (cond
+        ((ly:input-location? head)
+         (display (apply define-origin (ly:input-location head)) port)
+         (output-stencil port (cadr expr) offset))
+        ((eq? head 'no-origin)
+         (display (expression->string head) port)
+         (output-stencil port (cadr expr) offset))
+        ((eq? head 'translate-stencil)
+         (output-stencil port (caddr expr) (offset-add offset (cadr expr))))
+        ((eq? head 'combine-stencil)
+         (output-stencil port (cadr expr) offset)
+         (output-stencil port (caddr expr) offset))
+        (else
+         (display (placebox (car offset) (cdr offset)
+                            (expression->string expr)) port))))))
 
 (define (placebox x y s) 
   (string-append 
     (ly:numbers->string
      (list x y width height blotdiam)) " draw_round_box"))
 
+(define (new-start-system origin dim)
+  (string-append
+   "\n" (ly:number-pair->string origin) " start-system\n"
+   "{\n"
+   "set-ps-scale-to-lily-scale\n"))
 
-(define (stem breapth width depth height) ; FIXME: use draw_round_box.
+(define (stem breapth width depth height) 
   (string-append
    (ly:numbers->string (list breapth width depth height))
    " draw_box" ))
 
+(define (stop-system)
+  "} stop-system\n")
+
+(define stop-last-system stop-system)
+
 (define (symmetric-x-triangle thick w h)
   (string-append
    (ly:numbers->string (list h w thick))
    " draw_symmetric_x_triangle"))
 
-(define (text font s)
-  (let*
-      
-      (
-       ;; ugh, we should find a better way to
-       ;; extract the hsbw for /space from the font.
-       
-       (space-length (cdar (ly:text-dimension font "t"))) 
-       (commands '())
-       (add-command (lambda (x) (set! commands (cons x commands)))) )
-
-    (string-fold
-     (lambda (chr word)
-       "Translate space as into moveto, group the rest in words."
-       (if (and (< 0 (string-length word))
-               (equal? #\space  chr))
-          (add-command 
-           (string-append "(" (ps-encoding word) ") show\n")))
-
-       (if (equal? #\space  chr)
-          (add-command  (string-append (number->string space-length) " 0.0 rmoveto ")) )
-       
-       (if (equal? #\space  chr)
-          ""
-          (string-append word (make-string 1 chr))))
-     ""
-     (string-append  s " "))
+(define (text s)
+;;  (string-append "(" (escape-parentheses s) ") show "))
+  (string-append "(" (ps-encoding s) ") show"))
 
-    (string-append
-     (ps-font-command font) " setfont "
-     (string-join (reverse commands)))
-    ))
-  
 (define (unknown) 
   "\n unknown\n")
 
     (ly:number->string dx) " "
     (ly:number->string dy)
     " draw_zigzag_line"))
+
+(define (start-page)
+  (set! page-number (+ page-number 1))
+  (string-append
+   "%%Page: " (number->string page-number) " " (number->string page-count) "\n"
+  "start-page\n"))
+
+(define (stop-page last?)
+  (if last?
+      "\nstop-last-page\n"
+      "\nstop-page\n"))
index afe39c407605954d5d8b46a966b3f2a5d689d4a2..398c52da5c1dbb66fee37732b39d436be96bd451 100644 (file)
@@ -48,6 +48,7 @@
 ; ((eq? keyword 'dashed-line thick on off dx dy)
 ; ((eq? keyword 'dashed-slur thick dash l)
 ; ((eq? keyword 'define-origin a b c ) "")
+; ((eq? keyword 'end-output)
 ; ((eq? keyword 'experimental-on) "")
 ; ((eq? keyword 'ez-ball ch letter-col ball-col)
 ; ((eq? keyword 'filledbox x y breapth width depth height)
 (define font-count 0)
 (define current-font "")
 
+(define (fontify x y name-mag-pair exp)
+  (string-append (select-font name-mag-pair)
+                (apply (eval (car exp) this-module)
+                       (append (list x y) (cdr exp)))))
+;;              (if (string? exp) exp "")))
+
 (define (define-fonts x) "")
 
 (define (font-def x)
index 9875a1938c66feb42862f31679c6a3dd64d65601..5d79103a5f6f6f9fe58f2ae52d238570e8bd08c5 100644 (file)
 
 ;;; and should intercept: 
 ;;;
+;;;    fontify
 ;;;    lily-def
 ;;;    header-end
 ;;;    define-fonts
 ;;;    no-origin
 ;;;    start-system
+;;;    end-output
 ;;;    header
 ;;;    comment
 ;;;    stop-last-system
@@ -60,6 +62,7 @@
     (cond
      ((eq? keyword 'some-func) "")
      ;;((eq? keyword 'placebox) (dispatch (cadddr expr)))
+     ;;((eq? keyword 'fontify) (dispatch (caddr expr)))
      (else
       (if (module-defined? this-module keyword)
          (apply (eval keyword this-module) (cdr expr))
 
 ;; Global vars
 
-;;; Global vars
-(define page-count 0)
-(define page-number 0)
-
-;;(define output-scale 2.83464566929134)
-(define output-scale (* 2 2.83464566929134))
+(define output-scale 1)
 (define system-y 0)
 ;; huh?
 (define urg-line-thickness 0)
    ((equal? (ly:unit) "pt") (/ 72.0  72.27))
    (else (error "unknown unit" (ly:unit)))))
 
+;; alist containing fontname -> fontcommand assoc (both strings)
+;;(define font-name-alist '())
+
 ;; Helper functions
+
+
 (define (tagify tag string . attribute-alist)
   (string-append
    "<" tag
            `(d . ,(string-append (svg-bezier first #f)
                                  (svg-bezier second first-c0))))))
   
-(define (char font i)
-  (tagify "tspan"
-         (dispatch `(fontify ,font ,(ascii->upm-string i)))))
+(define (char i)
+  (if #t
+      ;;(tagify "tspan" (format #f "&#xe0~2,'0x;" i))
+      (tagify "tspan" (ascii->upm-string i))
+      (begin
+       (format #t "can't display char: ~x\n" i)
+       " ")))
 
-(define (nchar font i)
-  (format (current-error-port) "can't display char: ~x\n" i)
-  " ")
 
 (define (comment s)
   (string-append "<!-- " s " -->\n"))
 
-(define (define-fonts paper font-list)
-  (comment (format #f "Fonts used: ~S" font-list)))
+(define (define-fonts internal-external-name-mag-pairs)
+  (comment (format #f "Fonts used: ~S" internal-external-name-mag-pairs)))
+
+(define (end-output)
+  "</g></svg>")
+
+;;TODO
+;(define (horizontal-line x1 x2 th)
+;  (draw-line th x1  0 x2 0))
 
 (define (filledbox breapth width depth height)
   (round-filled-box breapth width depth height line-thickness))
     ("cmr8" . ,(string-append
                  font-cruft
                  "font-family:cmr;font-style:normal;font-size:8;"))
-    ("ecrm10" . ,(string-append
-                 font-cruft
-                 "font-family:ecmr;font-style:normal;font-size:10;"))
     ("feta13" . ,(string-append
                  font-cruft
                  "font-family:LilyPond-Feta;font-style:-Feta;font-size:13;"))
                      font-cruft
                      "font-family:LilyPond-Parmesan;font-style:-Parmesan;font-size:20;"))))
 
-(define (get-font font)
-  (let* ((name (ly:font-filename font))
-        (magnify (ly:font-magnification font)))
-    ;; name-mag-pair: (quote ("feta20" . 0.569055118110236))"feta20"(quote ("feta20" . 0.569055118110236))
-    (let ((font-string (assoc-get name font-alist)))
-      (if (not font-string)
-         (begin
-           (format #t "font not found: ~S\n" font)
-           (cdr (assoc "feta20" font-alist)))
-         font-string))))
+(define (get-font name-mag-pair)
+  ;; name-mag-pair: (quote ("feta20" . 0.569055118110236))"feta20"(quote ("feta20" . 0.569055118110236))
+  (let ((f (assoc (caadr name-mag-pair) font-alist)))
+    (if (pair? f)
+       (cdr f)
+       (begin
+         (format #t "font not found: ~s\n" (caadr name-mag-pair))
+         (cdr (assoc "feta20" font-alist))))))
+
+(define (fontify name-mag-pair expr)
+  (string-append
+   (tagify "text" (dispatch expr) (cons 'style (get-font name-mag-pair)))))
 
 (define (header-end)
   (comment "header-end"))
 
-(define (header creator time-stamp paper page-count- classic?)
+(define (header creator generate)
   (string-append
    xml-header
    (comment creator)
-   (comment time-stamp)
+   (comment generate)
    svg-header))
   
-;; FIXME: duplicated in other output backends
-;; FIXME: silly interface name
-(define (output-scopes paper scopes fields basename)
-  (format (current-error-port) "TODO: FIX ps/tex/interface\n"))
-
-;; FIXME: duplictates output-scopes, duplicated in other backends
-;; FIXME: silly interface name
-(define (output-paper-def pd)
-  (format (current-error-port) "TODO: FIX ps/tex/interface\n"))
 
 (define (lily-def key val)
   (cond
 
 
 (define (placebox x y expr)
-  (tagify "g"
-         ;; FIXME -- JCN
-         ;;(dispatch expr)
-         expr
+  (tagify "g" (dispatch expr)
          `(transform .
                      ,(string-append
                        "translate("
 
   
 ;; TODO: use height, set scaling?
-(define (start-system origin dim)
-;;(define (start-system width height)
+(define (start-system width height)
   (let ((y system-y))
-    (set! system-y (+ system-y (cdr dim)))
+    ;;"<g transform='translate(50,-250)'>
+    (set! system-y (+ system-y height))
+    ;;(format #f "<g transform='translate(0,~1,'~f)'>" y)))
     (string-append
      "\n"
      (comment "start-system")
      (format #f "<g transform='translate(0.0,~f)'>\n" (* output-scale y)))))
 
-(define (stop-system last?)
+(define (stop-system)
   (string-append
    "\n"
    (comment "stop-system")
    "</g>\n"))
 
-(define (fontify font expr)
-  (string-append
-;;   (tagify "text" (dispatch expr) (cons 'style (get-font font)))))
-   (tagify "text" expr (cons 'style (get-font font)))))
-
-(define (text font s)
-  (tagify "tspan"
-         (apply string-append
-                (map (lambda (x) (ascii->upm-string (char->integer x)))
-                     (string->list s)))
-         (cons 'style (get-font font))))
-
-(define (ntext font s)
-  ;;  (fontify font
-  ;; to unicode or not?
-  (tagify "tspan" (dispatch `(fontify ,font ,s))))
-
-(define (start-page)
-  (set! page-number (+ page-number 1))
-  (comment "start-page"))
-
-(define (stop-page last?)
-  (comment "stop-page"))
-
-;; WTF is this in every backend?
-(define (horizontal-line x1 x2 th)
-;;  (draw-line th x1 0 x2 0))
-  (filledbox (- x1) (- x2 x1) (* .5 th) (* .5 th)))
+(define stop-last-system stop-system)
 
+(define (text s)
+  ;; to unicode or not?
+  (if #t
+      (tagify "tspan" s)
+      (tagify "tspan"
+             (apply string-appendb
+                    (map (lambda (x) (ascii->upm-string (char->integer x)))
+                         (string->list s))))))
index 74f2943d38795933f38a6ef777b5b51b9eb81807..7f8259d4a4417569d963b9cb4bd93e5e3c7eba50 100644 (file)
@@ -3,27 +3,19 @@
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;; 
 ;;;; (c)  1998--2004 Jan Nieuwenhuizen <janneke@gnu.org>
-;;;;                 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;;;                  Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
 
 ;; (debug-enable 'backtrace)
-
-;; The public interface is tight.
-;; It has to be, because user-code is evalled with this module.
-
-;; ***It should also be clean, well defined, documented and reviewed***
-
-;; To be reasonably safe, you probably do not want to use the TeX
-;; backend anyway, but rather the PostScript backend.  You may want
-;; to run gs in a uml sandbox too.
-
-
 (define-module (scm output-tex)
   #:re-export (quote)
-  #:export (unknown
+  #:export (define-fonts
+            unknown
+            output-paper-def
+            output-scopes
+            select-font
             blank
             dot
-            white-dot
             beam
             bracket
             dashed-slur
             symmetric-x-triangle
             ez-ball
             comment
+            end-output
+            experimental-on
             repeat-slash
+            header-end
+            header
             placebox
             bezier-sandwich
+            start-system
+            stop-system
+            stop-last-system
             horizontal-line
             filledbox
             round-filled-box
             tuplet
             polygon
             draw-line
+            between-system-string
             define-origin
             no-origin
-            ))
+            start-page
+            stop-page
+            )
+)
 
 (use-modules (ice-9 regex)
             (ice-9 string-fun)
             (ice-9 format)
             (guile)
             (srfi srfi-13)
-            (scm framework-tex)
             (lily))
 
 ;;;;;;;;
 ;;;;;;;; DOCUMENT ME!
 ;;;;;;;;
 
-
-
-(define (unknown) 
+(define font-name-alist  '())
+
+(define (tex-encoded-fontswitch name-mag)
+  (let* ((iname-mag (car name-mag))
+        (ename-mag (cdr name-mag)))
+
+    (cons iname-mag
+         (cons ename-mag
+               (string-append  "magfont"
+                         (string-encode-integer
+                          (hashq (car ename-mag) 1000000))
+                         "m"
+                         (string-encode-integer
+                          (inexact->exact (round (* 1000 (cdr ename-mag))))))))))
+
+(define-public (define-fonts internal-external-name-mag-pairs)
+  (set! font-name-alist (map tex-encoded-fontswitch
+                            internal-external-name-mag-pairs))
+  (apply string-append
+        (map (lambda (x)
+               (font-load-command (car x) (cdr x)))
+             (map cdr font-name-alist))))
+
+;;
+;; urg, how can exp be #unspecified?  -- in sketch output
+;;
+;; set! returns #<unspecified>  --hwn
+;;
+(define-public (fontify name-mag-pair exp)
+  (string-append (select-font name-mag-pair)
+                exp))
+
+
+(define-public (unknown) 
   "%\n\\unknown\n")
 
-
+(define (symbol->tex-key sym)
+  (regexp-substitute/global
+   #f "_" (output-tex-string (symbol->string sym)) 'pre "X" 'post) )
+
+(define (tex-string-def prefix key str)
+  (if (equal? "" (sans-surrounding-whitespace (output-tex-string str)))
+      (string-append "\\let\\" prefix (symbol->tex-key key) "\\undefined%\n")
+      (string-append "\\def\\" prefix (symbol->tex-key key) "{"  (output-tex-string str) "}%\n")
+      ))
+
+(define (tex-number-def prefix key number)
+  (string-append "\\def\\" prefix (symbol->tex-key key) "{" number "}%\n"))
+
+(define (output-paper-def pd)
+  (apply
+   string-append
+   (module-map
+    (lambda (sym var)
+      (let ((val (variable-ref var))
+           (key (symbol->tex-key sym)))
+
+       (cond
+        ((string? val)
+         (tex-string-def "lilypondpaper" sym val))
+        ((number? val)
+         (tex-number-def "lilypondpaper" sym
+                         (if (integer? val)
+                             (number->string val)
+                             (number->string (exact->inexact val)))))
+        (else ""))))
+      
+    (ly:output-def-scope pd))))
+
+(define (output-scopes paper scopes fields basename)
+  (define (output-scope scope)
+    (apply
+     string-append
+     (module-map
+     (lambda (sym var)
+       (let ((val (variable-ref var))
+            ;;(val (if (variable-bound? var) (variable-ref var) '""))
+            (tex-key (symbol->string sym)))
+        
+        (if (and (memq sym fields) (string? val))
+            (header-to-file basename sym val))
+
+        (cond
+         ((string? val)
+          (tex-string-def "lilypond" sym val))
+         ((number? val)
+          (tex-number-def "lilypond" sym
+                          (if (integer? val)
+                              (number->string val)
+                              (number->string (exact->inexact val)))))
+         (else ""))))
+     scope)))
+  
+  (apply string-append
+        (map output-scope scopes)))
+
+(define (select-font name-mag-pair)
+  (let ((c (assoc name-mag-pair font-name-alist)))
+    (if c
+       (string-append "\\" (cddr c))
+       (begin
+         (ly:warn
+          (format "Programming error: No such font: ~S" name-mag-pair))
+         ""))))
 
 (define (blank)
   "")
 (define (dot x y radius)
   (embedded-ps (list 'dot x y radius)))
 
-(define (white-dot x y radius)
-  (embedded-ps (list 'white-dot x y radius)))
-
 (define (beam width slope thick blot)
   (embedded-ps (list 'beam  width slope thick blot)))
 
 (define (dashed-slur thick dash l)
   (embedded-ps (list 'dashed-slur thick dash `(quote ,l))))
 
-(define (char font i)
-  (string-append "\\" (tex-font-command font)
-                "\\char" (ly:inexact->string i 10) " "))
+(define (char i)
+  (string-append "\\char" (ly:inexact->string i 10) " "))
 
 (define (dashed-line thick on off dx dy)
   (embedded-ps (list 'dashed-line  thick on off dx dy)))
 (define (symmetric-x-triangle t w h)
   (embedded-ps (list 'symmetric-x-triangle t w h)))
 
+(define (font-load-command name-mag command)
+  (string-append
+   "\\font\\" command "="
+   (car name-mag)
+   " scaled "
+   (ly:number->string (inexact->exact (round (* 1000 (cdr name-mag)))))
+   "\n"))
 
 (define (ez-ball c l b)
   (embedded-ps (list 'ez-ball  c  l b)))
 
-
+(define (header-to-file fn key val)
+  (set! key (symbol->string key))
+  (if (not (equal? "-" fn))
+      (set! fn (string-append fn "." key))
+      )
+  (display
+   (format "writing header field `~a' to `~a'..."
+          key
+          (if (equal? "-" fn) "<stdout>" fn)
+          )
+   (current-error-port))
+  (if (equal? fn "-")
+      (display val)
+      (display val (open-file fn "w"))
+  )
+  (display "\n" (current-error-port))
+  ""
+  )
 
 (define (embedded-ps expr)
   (let ((ps-string
           (lambda () (ps-output-expression expr (current-output-port))))))
     (string-append "\\embeddedps{" ps-string "}")))
   
+(define (comment s)
+  (string-append "% " s "\n"))
+
+(define (end-output) 
+  (begin
+    ;; uncomment for some stats about lily memory        
+    ;; (display (gc-stats))
+    (string-append
+     "\\lilypondend\n"
+     ;; Put GC stats here.
+     )))
+
+(define (experimental-on)
+  "")
 
 (define (repeat-slash w a t)
   (embedded-ps (list 'repeat-slash  w a t)))
 
-
+(define (header-end)
+  (string-append
+   "\\def\\scaletounit{ "
+   (number->string (cond
+                    ((equal? (ly:unit) "mm") (/ 72.0  25.4))
+                    ((equal? (ly:unit) "pt") (/ 72.0  72.27))
+                    (else (error "unknown unit" (ly:unit)))
+                    ))
+   " mul }%\n"
+   "\\ifx\\lilypondstart\\undefined\n"
+   "  \\input lilyponddefs\n"
+   "\\fi\n"
+   "\\outputscale = \\lilypondpaperoutputscale\\lilypondpaperunit\n"
+   "\\lilypondstart\n"
+   "\\lilypondspecial\n"
+   "\\lilypondpostscript\n"))
+
+(define (header creator time-stamp page-count)
+  (string-append
+   "% Generated by " creator "\n"
+   "% at " time-stamp "\n"
+   ;; FIXME: duplicated in every backend
+   "\\def\\lilypondtagline{Engraved by LilyPond (version "
+   (lilypond-version)")}\n"))
+
+(define (invoke-char s i)
+  (string-append 
+   "\n\\" s "{" (ly:inexact->string i 10) "}" ))
+
+;; FIXME: explain ploblem: need to do something to make this really safe.  
+(define-public (output-tex-string s)
+  (if safe-mode?
+      (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post)
+      s))
+
+(define (lily-def key val)
+  (let ((tex-key
+        (regexp-substitute/global
+             #f "_" (output-tex-string key) 'pre "X" 'post))
+        
+       (tex-val (output-tex-string val)))
+    (if (equal? (sans-surrounding-whitespace tex-val) "")
+       (string-append "\\let\\" tex-key "\\undefined\n")
+       (string-append "\\def\\" tex-key "{" tex-val "}%\n"))))
 
 (define (number->dim x)
   (string-append
    (ly:number->string x) " \\outputscale "))
 
 (define (placebox x y s) 
-  (string-append
-   "\\lyitem{" (ly:number->string x) "}{" (ly:number->string y) "}{" s "}%\n"))
+  (string-append "\\lyitem{"
+                (ly:number->string y) "}{"
+                (ly:number->string x) "}{"
+                s "}%\n"))
 
 (define (bezier-sandwich l thick)
   (embedded-ps (list 'bezier-sandwich  `(quote ,l) thick)))
 
-;; WTF is this in every backend?
+(define (start-system wd ht)
+  (string-append "\\leavevmode\n"
+                "\\scoreshift = " (number->dim (* ht 0.5)) "\n"
+                "\\lilypondifundefined{lilypondscoreshift}%\n"
+                "  {}%\n"
+                "  {\\advance\\scoreshift by -\\lilypondscoreshift}%\n"
+                "\\lybox{"
+                (ly:number->string wd) "}{"
+                (ly:number->string ht) "}{%\n"))
+
+(define (stop-system) 
+  "}%\n%\n\\interscoreline\n%\n")
+(define (stop-last-system)
+  "}%\n")
+
 (define (horizontal-line x1 x2 th)
-  (filledbox (- x1) (- x2 x1) (* .5 th) (* .5 th)))
+  (filledbox (- x1)  (- x2 x1) (* .5 th)  (* .5 th )))
 
 (define (filledbox breapth width depth height)
   (if (and #f (defined? 'ps-testing))
 (define (round-filled-box x y width height blotdiam)
   (embedded-ps (list 'round-filled-box  x y width height blotdiam)))
 
-(define (text font s)
-  (let*
-      ((mapping #f)       ;; (assoc-get  'char-mapping (ly:font-encoding-alist font))))
-
-
-       ;; TODO: we'd better do this for PS only
-       ;; LaTeX gets in the way, and we need to remap
-       ;; nonprintable chars.
-       
-       (input-enc-name #f) ;; (assoc-get 'input-name (ly:font-encoding-alist font) ))
-       )
-
-    (string-append "\\hbox{\\" (tex-font-command font)
-                  (if (string? input-enc-name)
-                      (string-append "\\inputencoding{" input-enc-name "}")
-                      "{}")
-                  (sanitize-tex-string
-                   (if (vector? mapping)
-                       (reencode-string mapping s)
-                       s))
-                  "}")))
-
+(define (text s)
+  (string-append "\\hbox{" (output-tex-string s) "}"))
 
 (define (tuplet ht gapx dx dy thick dir)
   (embedded-ps (list 'tuplet  ht gapx dx dy thick dir)))
 (define (draw-line thick fx fy tx ty)
   (embedded-ps (list 'draw-line thick fx fy tx ty)))
 
+;; TODO: this should be a default, which is overriden in PS
+(define (between-system-string string)
+  string
+  )
 (define (define-origin file line col)
   (if (procedure? point-and-click)
       (string-append "\\special{src:" ;;; \\string ? 
                     (point-and-click line col file)
                     "}" )
-      ""))
+      "")
+  )
 
 ;; no-origin not yet supported by Xdvi
 (define (no-origin) "")
+
+(define (start-page)
+  "\n%\\vbox{\n")
+
+(define (stop-page last?)
+  (if last?
+      "\n%}\n"
+      "\n%}\n\\newpage\n"))
index 1a00c37bdc92dc301b86f3e8d2eb91d2b1961866..80270ec48f22a8f1846d47973414fe67f81b4d35 100644 (file)
-;;; page-layout.scm -- page breaking and page layout
-;;;
-;;;;  source file of the GNU LilyPond music typesetter
+;;;; page-layout.scm -- page layout functions
 ;;;;
+;;;;  source file of the GNU LilyPond music typesetter
+;;;; 
 ;;;; (c) 2004 Jan Nieuwenhuizen <janneke@gnu.org>
-;;;;          Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
-(use-modules (oop goops describe)
-            (oop goops))
+(define (ly:modules-lookup modules sym)
+  (let ((v (module-variable (car modules) sym)))
+    (if (and v (variable-bound? v) (variable-ref v))
+       (variable-ref v)
+       (if (module? (cdr modules)) (ly:modules-lookup (cdr modules) sym)))))
 
+(define (page-properties paper)
+  (list (append `((linewidth . ,(ly:paper-get-number
+                                paper 'linewidth)))
+               (ly:paper-lookup paper 'text-font-defaults))))
 
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(define-public (book-title paper scopes)
+  "Generate book title from header strings."
+  
+  (define (get sym)
+    (let ((x (ly:modules-lookup scopes sym)))
+      (if (and x (not (unspecified? x))) x "")))
+  
+  (let ((props (page-properties paper)))
+    
+    (interpret-markup
+     paper props
+     (markup
+      #:column
+      (#:override '(baseline-skip . 4)
+      #:column
+      (#:fill-line
+       (#:normalsize (get 'dedication))
+       #:fill-line
+       (#:huge #:bigger #:bigger #:bigger #:bigger #:bold (get 'title))
+       #:override '(baseline-skip . 3)
+       #:column
+       (#:fill-line
+       (#:large #:bigger #:bigger #:bold (get 'subtitle))
+       #:fill-line (#:bigger #:bigger #:bold (get 'subsubtitle)))
+       #:override '(baseline-skip . 5)
+       #:column ("")
+       #:override '(baseline-skip . 2.5)
+       #:column
+       (#:fill-line
+       (#:bigger (get 'poet) #:large #:bigger #:caps (get 'composer))
+       #:fill-line (#:bigger (get 'texttranslator) #:bigger (get 'opus))
+       #:fill-line
+       (#:bigger (get 'meter) #:bigger (get 'arranger))
+       ""
+       #:fill-line (#:large #:bigger (get 'instrument))
+       " "
+       #:fill-line (#:large #:bigger #:caps (get 'piece) ""))))))))
+
+(define-public (user-title paper markup)
+  "Generate book title from header markup."
+  (if (markup? markup)
+      (let ((props (page-properties paper))
+           (baseline-skip (chain-assoc-get 'baseline-skip props 2)) )
+       (stack-lines DOWN 0 BASELINE-SKIP
+                    (list (interpret-markup paper props markup))))))
+
+(define-public (score-title paper scopes)
+  "Generate score title from header strings."
+  
+  (define (get sym)
+    (let ((x (ly:modules-lookup scopes sym)))
+      (if (and x (not (unspecified? x))) x "")))
+  
+  (let ((props (page-properties paper)))
+    
+    (interpret-markup
+     paper props
+     (markup
+      #:column
+      (#:override '(baseline-skip . 4)
+      #:column
+      (#:fill-line
+       ("" (get 'opus))
+       #:fill-line (#:large #:bigger #:caps (get 'piece) "")))))))
 
-(define-class <optimally-broken-page-node> ()
-  (prev #:init-value '() #:accessor node-prev #:init-keyword #:prev)
-  (page #:init-value 0 #:accessor node-page-number #:init-keyword #:pageno)
-  (penalty #:init-value 0 #:accessor node-penalty #:init-keyword #:penalty)
-  (lines #:init-value 0 #:accessor node-lines #:init-keyword #:lines))
+(define-public (make-header paper page-number)
+  (let ((props (page-properties paper) ))
+    (interpret-markup paper props
+                     (markup #:fill-line
+                             ("" #:bold (number->string page-number))))))
+
+(define-public (make-footer paper page-number)
+  (let ((props (page-properties paper)))
 
-(define-method (display (node <optimally-broken-page-node>) port)
-  (map (lambda (x) (display x port))
-       (list
-       "Page " (node-page-number node)
-       " Lines: " (node-lines node)
-       " Penalty " (node-penalty node)
-       "\n")))
+    (interpret-markup paper props
+                   (markup #:fill-line ("" (number->string page-number))))))
 
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (define TAGLINE
   (string-append "Engraved by LilyPond (version " (lilypond-version) ")"))
 
-;; TODO: take <optimally-broken-page-node> iso. page-number
-;; for all of these functions ?
+(define-public (make-tagline paper scopes)
+  (let* ((props (page-properties paper))
+        (tagline-var (ly:modules-lookup scopes 'tagline))
+        (tagline (if (markup? tagline-var) tagline-var TAGLINE)))
 
-(define-public (plain-header paper scopes page-number last?)
-  "Standard header for a part: page number --outside--  and instrument--centered."
+    (cond ((string? tagline)
+          (if (not (equal? tagline ""))
+              (interpret-markup paper props
+                                (markup #:fill-line (tagline "")))))
+         ((markup? tagline) (interpret-markup paper props tagline)))))
 
-  (let* ((props (page-properties paper) )
-        (pnum (markup #:bold (number->string page-number)))
-        (instr (ly:modules-lookup scopes 'instrument))
-        (line (list "" (if (markup? instr) instr "") pnum)))
+(define-public (make-copyright paper scopes)
+  (let ((props (page-properties paper))
+       (copyright (ly:modules-lookup scopes 'copyright)))
+    
+    (cond ((string? copyright)
+          (if (not (equal? copyright ""))
+              (interpret-markup paper props
+                                (markup #:fill-line (copyright "")))))
+         ((markup? copyright) (interpret-markup paper props copyright)))))
 
-    (if (even? page-number)
-       (set! line (reverse line)))
 
-    (if (< 1 page-number)
-       (interpret-markup
-        paper props (make-fill-line-markup line))
-       '())
-    ))
+;;; optimal page breaking
 
+;;; This is not optimal page breaking, this is optimal distribution of
+;;; lines over pages; line breaks are a given.
 
-;; TODO: add publisher ID on non-first page.
-(define-public (plain-footer paper scopes page-number last?)
-  "Standard footer. Empty, save for first (copyright) and last (tagline) page."
-  
-  (let*
-      ((props (page-properties paper))
-       (copyright (ly:modules-lookup scopes 'copyright))
-       (tagline-var (ly:modules-lookup scopes 'tagline))
-       (tagline (if (markup? tagline-var) tagline-var TAGLINE))
-       (stencil #f))
-
-    (if last?
-       (set! stencil
-             (ly:stencil-combine-at-edge
-              stencil Y DOWN (interpret-markup paper props tagline)
-              0.0
-              )))
-
-    (if (and (= 1 page-number)
-            (markup? copyright))
-
-       (set! stencil
-             (ly:stencil-combine-at-edge
-              stencil Y DOWN (interpret-markup paper props copyright)
-              0.0
-              )))
-
-    stencil))
+;;; TODO:
+;;;    - user tweaking:
+;;;       + \pagebreak, \nopagebreak
+;;;       + #pages?
+;;;    - short circut SCORE=-1 (dismiss path)
+;;;    - density scoring
+
+
+(use-modules (oop goops describe))
+
+(define-class <break-node> ()
+  (prev #:init-value '() #:accessor node-prev #:init-keyword #:prev)
+  (line #:init-value 'barf #:accessor node-line #:init-keyword #:line)
+  (page #:init-value 0 #:accessor node-page #:init-keyword #:page)
+  (score #:init-value 0 #:accessor node-score #:init-keyword #:score)
+  (height #:init-value 0 #:accessor node-height #:init-keyword #:height))
+
+(define INFINITY 1e9)
+
+(define (robust-paper-line-number line)
+  (if (null? line) 0
+      (ly:paper-line-number line)))
   
-(define (page-headfoot paper scopes number sym sepsym dir last?)
-  "Create a stencil including separating space."
-  (let*
-      ((header-proc (ly:output-def-lookup paper sym))
-       (sep (ly:output-def-lookup paper sepsym))
-       (stencil (ly:make-stencil "" '(0 . 0) '(0 . 0)))
-       (head-stencil
-       (if (procedure? header-proc)
-           (header-proc paper scopes number last?)
-           #f)))
-
-    (if (and (number? sep) (ly:stencil? head-stencil))
-       (set! head-stencil
-             (ly:stencil-combine-at-edge
-              stencil Y  dir head-stencil
-              sep 0.0)))
-
-    head-stencil))
-
-(define-public (default-page-music-height paper scopes number last?)
-  "Printable area for music and titles; matches default-page-make-stencil." 
-  (let*
-      ((h (- (ly:output-def-lookup paper 'vsize)
-            (ly:output-def-lookup paper 'top-margin)
-            (ly:output-def-lookup paper 'bottom-margin)))
-       (head (page-headfoot paper scopes number 'make-header 'head-sep UP last?))
-       (foot (page-headfoot paper scopes number 'make-footer 'foot-sep DOWN last?)))
-    (- h (if (ly:stencil? head)
-            (interval-length (ly:stencil-extent head Y))
-            0)
-       (if (ly:stencil? foot)
-          (interval-length (ly:stencil-extent foot Y))
-          0))
-    ))
-
-
-(define-public (default-page-make-stencil lines paper scopes number last? )
-  "Construct a stencil representing the page from LINES.  "
-  (let*
-     ((top-margin  (ly:output-def-lookup paper 'top-margin))
-      
-      ;; TODO: naming vsize/hsize not analogous to TeX.
-      
-      (hsize (ly:output-def-lookup paper 'hsize))
-      (left-margin (/ (- hsize
-                        (ly:output-def-lookup paper 'linewidth)) 2))
-      (vsize (ly:output-def-lookup paper 'vsize))
-      (bottom-edge (- vsize
-                     (ly:output-def-lookup paper 'bottom-margin)))
-                    
-      (head (page-headfoot paper scopes number 'make-header 'head-sep UP last?))
-      (foot (page-headfoot paper scopes number 'make-footer 'foot-sep DOWN last?))
-      (line-stencils (map ly:paper-system-stencil lines))
-      (height-proc (ly:output-def-lookup paper 'page-music-height))
-      (music-height (height-proc paper scopes number last?))
-      (ragged (ly:output-def-lookup paper 'raggedbottom))
-      (ragged-last   (ly:output-def-lookup paper 'raggedlastbottom))
-      (ragged-bottom (or (eq? #t ragged)
-                        (and last? (eq? #t ragged-last))))
-
-      (spc-left (-  music-height
-                  (apply + (map (lambda (x)
-                                  (interval-length (ly:stencil-extent x Y)))
-                       line-stencils))))
-      (stretchable-lines (remove ly:paper-system-title? (cdr lines)))
-      (stretch (if (or (null? stretchable-lines)
-                      (> spc-left (/ music-height 2))
-                      ragged-bottom)
-                  0.0
-                  (/ spc-left (length stretchable-lines))))
-
-      (page-stencil (ly:make-stencil '()
-                   (cons left-margin hsize)
-                   (cons (- top-margin) 0)))
-      (was-title #t))
-
-    (set! page-stencil (ly:stencil-combine-at-edge
-         page-stencil Y DOWN head 0. 0.))
-
-    (for-each
-     (lambda (l)
-       (set! page-stencil
-            (ly:stencil-combine-at-edge
-             page-stencil Y DOWN (ly:paper-system-stencil l)
-             (if was-title
-                 0.0
-                 stretch)
-             ))
-
-       (set! was-title (ly:paper-system-title? l)))
-     lines)
-
-    (if (ly:stencil? foot)
-       (set! page-stencil
-             (ly:stencil-add
-              page-stencil
-              (ly:stencil-translate
-               foot
-               (cons 0
-                     (+ (- bottom-edge) (- (car (ly:stencil-extent foot Y)))))
-               ))))
-
-    (ly:stencil-translate page-stencil (cons left-margin 0))
-  ))
+(define (robust-line-height line)
+  (if (null? line) 0
+      (ly:paper-line-height line)))
   
+(define (robust-line-number node)
+  (if (null? node) 0
+      (robust-paper-line-number (node-line node))))
 
+(define (robust-break-score node)
+  (let ((line (node-line node)))
+    (if (null? line) 0
+       (ly:paper-line-break-score line))))
 
+(define (make-node prev line page score . height)
+  (make <break-node> #:prev prev #:line line #:page page #:score score
+       #:height (if (null? height) 0 (car height))))
 
-;;; optimal page breaking
+;; max density %
+(define MAX-CRAMP 0.05)
 
-;;; This is not optimal page breaking, this is optimal distribution of
-;;; lines over pages; line breaks are a given.
-
-; TODO:
-;
-; - density scoring
-; - separate function for word-wrap style breaking?
-; - raggedbottom? raggedlastbottom? 
-
-(define-public (ly:optimal-page-breaks
-               lines paper-book)
-  "Return pages as a list starting with 1st page. Each page is a list
-of lines. "
-
-  (define (make-node prev lines page-num penalty)
-    (make <optimally-broken-page-node>
-      #:prev prev
-      #:lines lines
-      #:pageno page-num
-      #:penalty penalty))
-
-  (define MAXPENALTY 1e9)
-  (define bookpaper (ly:paper-book-book-paper paper-book))
-  (define scopes (ly:paper-book-scopes paper-book))
-  (define (line-height line)
-    (ly:paper-system-extent line Y))
+(define-public (ly:optimal-page-breaks lines book-height text-height
+                                      first-diff last-diff)
 
   ;; FIXME: may need some tweaking: square, cubic
-  (define (height-penalty available used)
-    ;; FIXME, simplistic
-    (let* ((left (- available used))
-          ;; scale-independent
-          (relative (abs (/ left available))))
-      (if (negative? left)
-
-         ;; too full, penalise more
-         (* 10 (1+ relative) relative)
-         
-         ;; Convexity: two half-empty pages is better than 1 completely
-         ;; empty page
-         (* (1+ relative) relative))))
-
-  (define (page-height page-number last?)
-    (let
-       ((p (ly:output-def-lookup bookpaper 'page-music-height)))
-
-      (if (procedure? p)
-         (p bookpaper scopes page-number last?)
-         10000)))
+  (define (height-score available used)
+    (let* ((empty (- available used))
+          (norm-empty (* empty (/ 100 available))))
+      (if (< norm-empty 0)
+         (if (> (* -1 (/ empty available)) MAX-CRAMP)
+             ;; cannot fill more than MAX-CRAMP
+             -1
+             ;; overfull page is still worse by a power
+             ;; -- which means it never happens
+             ;; let's try a factor 2
+             ;;(* -1 norm-empty norm-empty norm-empty))
+             (* 2 norm-empty norm-empty))
+         (* norm-empty norm-empty))))
+
+  (define (page-height page-number page-count)
+    (let ((h text-height))
+      (if (= page-number 1)
+         (set! h (+ h first-diff)))
+      (if (= page-number page-count)
+         ;;(> page-number (/ book-height text-height))
+       (set! h (+ h last-diff)))
+      h))
 
-  
   (define (cumulative-height lines)
-    (apply + (map line-height lines)))
-
-  (define (get-path node done)
-    "Follow NODE.PREV, and return as an ascending list of pages. DONE
-is what have collected so far, and has ascending page numbers."
-    (if (is-a? node <optimally-broken-page-node>)
-       (get-path (node-prev node) (cons node done))
-       done))
-
-  (define (combine-penalties user page prev)
-    (+ prev page user))
-
-  (define (walk-paths done-lines best-paths current-lines  last? current-best)
-    "Return the best optimal-page-break-node that contains
-CURRENT-LINES.  DONE-LINES.reversed ++ CURRENT-LINES is a consecutive
-ascending range of lines, and BEST-PATHS contains the optimal breaks
-corresponding to DONE-LINES.
-
-CURRENT-BEST is the best result sofar, or #f."
-
-    (let* ((this-page-num (if (null? best-paths)
-                             1
-                             (1+ (node-page-number (car best-paths)))))
-          (prev-penalty (if (null? best-paths)
-                            0.0
-                            (node-penalty (car best-paths))))
-          (page-height (page-height this-page-num last?))
-          (space-used (cumulative-height current-lines))
-          (this-page-penalty (height-penalty  page-height space-used))
-          (user-penalty (ly:paper-system-break-penalty (car current-lines)))
-          (total-penalty (combine-penalties
-                          user-penalty this-page-penalty prev-penalty))
-          (better? (or
-                    (not current-best)
-                    (< total-penalty (node-penalty current-best))))
-          (new-best (if better?
-                        (make-node (if (null? best-paths)
-                                       #f
-                                       (car best-paths))
-                                   current-lines
-                                   this-page-num total-penalty)
-                        current-best)))
-
-      (if #f ;; debug
-         (display
-          (list
-           "user pen " user-penalty " prev-penalty "
-           prev-penalty "\n"
-           "better? " better? " total-penalty " total-penalty "\n"
-           "height " page-height " spc used: " space-used "\n"
-           "pen " this-page-penalty " lines: " current-lines "\n")))
-
-      (if (and (pair? done-lines)
-              ;; if this page is too full, adding another line won't help
-              (< this-page-penalty MAXPENALTY))
-         (walk-paths (cdr done-lines) (cdr best-paths)
-                     (cons (car done-lines) current-lines)
-                     last? new-best)
-         new-best)))
-
-  (define (walk-lines done best-paths todo)
-    "Return the best page breaking as a single
-<optimal-page-break-node> for optimally breaking TODO ++
-DONE.reversed. BEST-PATHS is a list of break nodes corresponding to
-DONE."
-    (if (null? todo)
-       (car best-paths)
-       (let* ((this-line (car todo))
-              (last? (null? (cdr todo)))
-              (next (walk-paths done best-paths (list this-line) last? #f)))
-       
-         (walk-lines (cons this-line done)
-                     (cons next best-paths)
-                     (cdr todo)))))
-
-  (define (line-number node)
-    (ly:paper-system-number (car (node-lines node))))
-
-  (let* ((best-break-node (walk-lines '() '() lines))
-        (break-nodes (get-path best-break-node '()))
-        )
-
-    (if (ly:get-option 'verbose)
-       (begin
-         (format (current-error-port) "breaks: ~S\n" (map line-number break-nodes))
-         (force-output (current-error-port))))
+    (apply + (map robust-line-height lines)))
 
-    
-    ; create stencils.
-    
-    (map (lambda (node)
-          ((ly:output-def-lookup bookpaper 'page-make-stencil)
-           (node-lines node)
-           bookpaper
-           scopes
-           (node-page-number node)
-           (eq? node best-break-node)))
-        break-nodes)))
+  (define (get-path node)
+    (if (null? node) '() (cons node (get-path (node-prev node)))))
 
+  (define (add-scores . lst)
+    (if (null? (filter (lambda (x) (> 0 x)) lst)) (apply + lst) -1))
 
+  (define (density-variance nodes)
+    (define (sqr x) (* x x))
+    (define (density node)
+      (let ((p (page-height (node-page node) (node-page (car nodes))))
+           (h (node-height node)))
+       (if (and p h) (/ h p) 0)))
+    
+    (let* ((height-nodes (reverse
+                         ;; reverse makes for handier debugging
+                         (filter (lambda (x) (> (node-height x) 0)) nodes)))
+          (densities (map density height-nodes))
+          (p-heights (map (lambda (x) (page-height (node-page x)
+                                                   (node-page (car nodes))))
+                          height-nodes))
+          (heights (map node-height height-nodes))
+          (mean (/ (apply + densities) (length densities)))
+          (diff (map (lambda (x) (- x mean)) densities))
+          (var (map sqr (map (lambda (x) (* (car p-heights) x)) diff))))
+      (apply + var)))
+
+  (define (walk-paths best node lines nodes paths)
+    (let* ((height (cumulative-height lines))
+          (next-page (+ (if (null? paths) 0 (node-page (car paths))) 1))
+          (page (page-height (node-page node) next-page))
+          (hh (make-node '() (node-line node) 0 0 height))
+          (break-score (robust-break-score node))
+          (density-score (if (null? paths) 0
+                             ;; TODO: find out why we need density
+                             ;;       use other height-score parameters?
+                             ;; See: input/test/page-breaks.ly
+                             (* 1 (density-variance
+                                   (cons hh (get-path (car paths)))))))
+          (page-score (height-score page height))
+          (this-score (add-scores page-score break-score density-score))
+          (path-score (if (null? paths) 0 (node-score (car paths))))
+          (score (add-scores path-score this-score)))
+
+      (if (and (>= score 0)
+              (or (<= score (node-score best))
+                  (= (node-score best) -1)))
+         (begin
+           (set! (node-score best) score)
+           (set! (node-page best) next-page)
+           (set! (node-height best) height)
+           (set! (node-prev best) (car paths))))
+
+      (if (or (null? nodes)
+             ;; short circuit
+             (and (= path-score -1)
+                  (> (- (/ height page) 1) MAX-CRAMP)))
+         best
+         (walk-paths best (car nodes)
+                     (cons (node-line (car paths)) lines)
+                     (cdr nodes) (cdr paths)))))
+
+  (define (walk-lines lines nodes paths)
+    (if (null? (cdr lines))
+       paths
+       (let* ((prev (node-prev (car nodes)))
+              (this (make-node prev (car lines) 0 INFINITY))
+              (next (make-node this (cadr lines) 0 0))
+              (best (walk-paths this prev (list (node-line (car nodes)))
+                                (cddr nodes) paths)))
+         (walk-lines (cdr lines) (cons next nodes) (cons best paths)))))
+  
+  (let* ((dummy (make-node '() '() 0 0))
+        (this (make-node dummy (car lines) 0 0))
+        (result (walk-lines lines (list this dummy) (list dummy)))
+        (path (get-path (car result)))
+        ;; CDR: junk dummy node
+        (breaks (cdr (reverse (map robust-line-number path)))))
+
+    (format (current-error-port) "ESTIMATE: ~S\n"
+           (/ book-height text-height))
+    (format (current-error-port) "breaks: ~S\n" breaks)
+    ;; TODO: if solution is bad return no breaks and revert to
+    ;;       ragged bottom
+    (force-output (current-error-port))
+    (list->vector breaks)))
index 163d836245e9e9d37132cb2e4dad10aecf1b1fc5..ae0ca635b5b3c7c7e9df0164e5ea83d475cf4185 100644 (file)
         (ss (/ sz 4))
         (pt (eval 'pt m)) 
         (mm (eval 'mm m)))
-
-    (module-define! m 'outputscale ss)
-    (module-define! m 'fonts (make-cmr-tree (/  sz (* 20 pt))))
+   
+    (module-define! m 'fonts (make-font-tree (/  sz (* 20 pt))))
+    
     (module-define! m 'staffheight sz)
     (module-define! m 'staff-space ss)
     (module-define! m 'staffspace ss)
 
+
     ;; !! synchronize with feta-params.mf
     (module-define! m 'linethickness (+ (* 0.3 pt) (* 0.04 ss)))
+    (module-define! m 'outputscale ss)
     (module-define! m 'ledgerlinethickness (+ (* 0.5 pt) (/ ss 10)))
     (module-define! m 'blotdiameter (* 0.35 pt))
-    (module-define! m 'interscoreline (* 4 mm))
-
-    (module-define! m 'dimension-variables
-                   '(pt mm cm in staffheight staff-space
-                        linewidth indent hsize vsize
-                        staffspace linethickness ledgerlinethickness
-                        blotdiameter interscoreline))
-    ))
+    (module-define! m 'interscoreline (* 4 mm))))
 
 (define-public (set-global-staff-size sz)
   "Set the default staff size, where SZ is thought to be in PT."
   (let* ((old-mod (current-module))
-        (pap (eval '$defaultbookpaper old-mod))
-        (in-paper? (or (module-defined? old-mod 'is-bookpaper)
-                       (module-defined? old-mod 'is-paper)))
+        (pap (eval '$defaultpaper old-mod))
+
 
-        ; maybe not necessary.
-        ; but let's be paranoid. Maybe someone still refers to the
-        ; old one. 
+        ;; Huh? Why is it necessary to clone object? 
         (new-paper (ly:output-def-clone pap))
-        
         (new-scope (ly:output-def-scope new-paper)))
     
-    (if in-paper?
-       (ly:warn "Not in toplevel scope"))
     (set-current-module new-scope)
     (paper-set-staff-size (* sz (eval 'pt new-scope)))
     (set-current-module old-mod)
-    (module-define! old-mod '$defaultbookpaper new-paper)))
+    (module-define! old-mod '$defaultpaper new-paper)))
 
 (define paper-alist
   '(("a6" . (cons (* 105 mm) (* 148.95 mm)))
     (module-define! m 'head-sep (* 4 mm))
     (module-define! m 'foot-sep (* 4 mm))))
 
+
+
 (define (internal-set-paper-size module name)
   (let* ((entry (assoc name paper-alist))
-        (is-bookpaper? (module-defined? module 'is-bookpaper))
+        (is-paper? (module-defined? module '$is-paper))
         (mm (eval 'mm module)))
     
     (cond
-     ((not is-bookpaper?)
+     ((not is-paper?)
       (ly:warning "This is not a \\paper {} object:")
       (display module))
      ((pair? entry)
     ))
 
 (define-public (set-default-paper-size name)
-  (internal-set-paper-size (ly:output-def-scope (eval '$defaultbookpaper (current-module)))
+  (internal-set-paper-size (ly:output-def-scope (eval '$defaultpaper (current-module)))
                           name))
 
 (define-public (set-paper-size name)
-  (if (module-defined? (current-module) 'is-paper)
+  (if (module-defined? (current-module) '$is-paper)
       (internal-set-paper-size (current-module) name)
 
       ;;; TODO: should raise (generic) exception with throw, and catch
       ;;; that in parse-scm.cc
       (ly:warn "Must use #(set-paper-size .. ) within \\paper { ... }")))
-
-(define-public (scale-paper pap scale)
-  (let*
-      ((new-pap (ly:output-def-clone pap))
-       (dim-vars (ly:output-def-lookup pap 'dimension-variables))
-       (scope (ly:output-def-scope new-pap)))
-
-    (for-each
-     (lambda (v)
-       (define val (ly:output-def-lookup pap v))
-       (if (number? val)
-          (module-define! scope v
-                          (/ val scale))
-
-          ;; spurious warnings, eg. for hsize, vsize. 
-;         (ly:warn (format "not a number, ~S = ~S " v  val))
-          ))
-     
-     dim-vars)
-
-    new-pap
-  ))
index 69180a978a5f6ca8dbcd4bb0eba79b6132d13ccd..0997a29b8afa2233d825c0f54f8a63904262527f 100644 (file)
@@ -374,11 +374,7 @@ the mark when there are no spanners active."
              (cond ((not (equal? (configuration now-state) 'apart))
                     current-idx)
                    ((> siln 0) start-idx)
-                   ((not solo-state)
-                    (put-range type start-idx current-idx)
-                    current-idx)
-                   ((and
-                     (null? (span-state solo-state)))
+                   ((and (null? (span-state solo-state)))
                     ;;
                     ;; This includes rests. This isn't a problem: long rests
                     ;; will be shared with the silent voice, and be marked
diff --git a/scm/safe-lily.scm b/scm/safe-lily.scm
deleted file mode 100644 (file)
index 10e88ad..0000000
+++ /dev/null
@@ -1,289 +0,0 @@
-;;;; safe-lily.scm -- 
-;;;;
-;;;; source file of the GNU LilyPond music typesetter
-;;;; 
-;;;; (c)  2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
-(define safe-objects
-  (map
-   (lambda (sym)
-     (cons sym (primitive-eval sym)))
-   '(ly:add-interface
-     ly:add-moment
-     ly:all-grob-interfaces
-     ly:all-output-backend-commands
-     ly:all-stencil-expressions
-     ly:bracket
-     ly:context-find
-     ly:context-id
-     ly:context-name
-     ly:context-parent
-     ly:context-property
-     ly:context-property-where-defined
-     ly:context-pushpop-property
-     ly:context-set-property!
-     ly:context-unset-property
-     ly:context?
-     ly:dimension?
-     ly:dir?
-     ly:div-moment
-     ly:duration-dot-count
-     ly:duration-factor
-     ly:duration-log
-     ly:duration<?
-     ly:duration?
-     ly:export
-     ly:find-glyph-by-name
-     ly:font-design-size
-     ly:font-encoding-alist
-     ly:font-filename
-     ly:font-magnification
-     ly:font-metric?
-     ly:font-name
-     ly:format-output
-     ly:get-all-function-documentation
-     ly:get-all-translators
-     ly:get-default-font
-     ly:get-glyph
-     ly:get-option
-     ly:grob-alist-chain
-     ly:grob-extent
-     ly:grob-original
-     ly:grob-paper
-     ly:grob-parent
-     ly:grob-pq-less?
-     ly:grob-property
-     ly:grob-script-priority-less
-     ly:grob-set-property!
-     ly:grob-staff-position
-     ly:grob-suicide
-     ly:grob-system
-     ly:grob-translate-axis!
-     ly:grob?
-     ly:input-location
-     ly:input-location?
-     ly:input-message
-     ly:intlog2
-     ly:item-break-dir
-     ly:item?
-     ly:iterator?
-     ly:make-bare-music
-     ly:make-duration
-     ly:make-moment
-     ly:make-music-function
-     ly:make-pitch
-     ly:make-stencil
-     ly:moment<?
-     ly:moment?
-     ly:mul-moment
-     ly:music-compress
-     ly:music-deep-copy
-     ly:music-duration-compress
-     ly:music-duration-length
-     ly:music-length
-     ly:music-list?
-     ly:music-mutable-properties
-     ly:music-name
-     ly:music-property
-     ly:music-scorify
-     ly:music-set-property!
-     ly:music-transpose
-     ly:music?
-     ly:my-lily-parser?
-     ly:number->string
-     ly:option-usage
-     ly:output-def-clone
-     ly:output-def-scope
-     ly:output-description
-     ly:paper-book?
-     ly:paper-def?
-     ly:paper-get-font
-     ly:paper-get-number
-     ly:paper-system-break-penalty
-     ly:paper-system-extent
-     ly:paper-system-number
-     ly:paper-system-stencil
-     ly:paper-system?
-     ly:output-def-lookup
-     ly:parse-string
-     ly:parser-parse-string
-     ly:parser-print-book
-     ly:parser-print-score
-     ly:pitch-alteration
-     ly:pitch-diff
-     ly:pitch-notename
-     ly:pitch-octave
-     ly:pitch-quartertones
-     ly:pitch-semitones
-     ly:pitch-steps
-     ly:pitch-transpose
-     ly:pitch<?
-     ly:pitch?
-     ly:round-filled-box
-     ly:run-translator
-     ly:set-option
-     ly:score-bookify
-     ly:set-point-and-click
-     ly:spanner-broken-into
-     ly:spanner-get-bound
-     ly:spanner?
-     ly:stencil-add
-     ly:stencil-align-to!
-     ly:stencil-combine-at-edge
-     ly:stencil-expr
-     ly:stencil-extent
-     ly:stencil-moved-to-edge
-     ly:stencil-set-extent!
-     ly:stencil-translate
-     ly:stencil-translate-axis
-     ly:stencil?
-     ly:text-dimension
-     ly:translator-description
-     ly:translator-name
-     ly:translator?
-     ly:transpose-key-alist
-     ly:unit
-     ly:version
-     ly:warn
-
-     ;; need these for parsing init files:
-     ;; todo: should have a macro define-safe-public
-     DOUBLE-FLAT
-     THREE-Q-FLAT
-     FLAT
-     SEMI-FLAT
-     NATURAL
-     SEMI-SHARP
-     SHARP
-     THREE-Q-SHARP
-     DOUBLE-SHARP
-     SEMI-TONE
-     START
-     STOP
-     alist->hash-table
-     default-chord-modifier-list
-     sequential-music-to-chord-exceptions
-     make-music
-     make-articulation
-     make-event-chord
-     make-penalty-music
-     make-span-event
-     set-start-grace-properties
-     set-stop-grace-properties
-     set-default-paper-size
-     set-part-combine-listener
-     context-spec-music
-     make-voice-props-revert
-     make-voice-props-set
-     chord-name->german-markup
-     note-name->german-markup
-     default-toplevel-music-handler
-     default-toplevel-book-handler
-     default-toplevel-score-handler
-
-     Accidental_interface::after_line_breaking
-     Accidental_interface::print
-     Ambitus::print
-     Arpeggio::print
-     Arpeggio::brew_chord_bracket
-     Arpeggio::width_callback
-     Axis_group_interface::group_extent_callback
-     Bar_line::before_line_breaking
-     Bar_line::get_staff_bar_size
-     Bar_line::print
-     Beam::after_line_breaking
-     Beam::before_line_breaking
-     Beam::check_concave
-     Beam::least_squares
-     Beam::print
-     Beam::quanting
-     Beam::shift_region_to_valid
-     Beam::slope_damping
-     Beam::space_function
-     Break_align_interface::alignment_callback
-     Breathing_sign::offset_callback
-     Chord_name::after_line_breaking
-     Clef::before_line_breaking
-     Clef::print
-     Cluster::print
-     Cluster_beacon::height
-     Custos::print
-     Dot_column::side_position
-     Dots::print
-     Hairpin::print
-     Hara_kiri_group_spanner::force_hara_kiri_callback
-     Hara_kiri_group_spanner::y_extent
-     Horizontal_bracket::print
-     Hyphen_spanner::print
-     Hyphen_spanner::set_spacing_rods
-     Key_signature_interface::print
-     Line_spanner::after_line_breaking
-     Line_spanner::print
-     Lyric_extender::print
-     Measure_grouping::print
-     Mensural_ligature::brew_ligature_primitive
-     Mensural_ligature::print
-     Multi_measure_rest::percent
-     Multi_measure_rest::print
-     Multi_measure_rest::set_spacing_rods
-     Note_head::extent
-     Note_head::print
-     Note_head::brew_ez_stencil
-     Ottava_bracket::print
-     Paper_column::before_line_breaking
-     Paper_column::print
-     Percent_repeat_item_interface::beat_slash
-     Percent_repeat_item_interface::double_percent
-     Piano_pedal_bracket::print
-     Rest::after_line_breaking
-     Rest::extent_callback
-     Rest::polyphonic_offset_callback
-     Rest::print
-     Script_column::before_line_breaking
-     Script_interface::before_line_breaking
-     Script_interface::print
-     Self_alignment_interface::aligned_on_parent
-     Self_alignment_interface::aligned_on_self
-     Self_alignment_interface::centered_on_other_axis_parent
-     Self_alignment_interface::centered_on_parent
-     Separating_group_spanner::set_spacing_rods
-     Side_position_interface::aligned_on_support_refpoints
-     Side_position_interface::aligned_side
-     Slur::after_line_breaking
-     Slur::height
-     Slur::print
-     Spacing_spanner::set_springs
-     Span_bar::before_line_breaking
-     Span_bar::get_bar_size
-     Span_bar::print
-     Span_bar::width_callback
-     Spanner::set_spacing_rods
-     Staff_symbol::print
-     Staff_symbol_referencer::callback
-     Stem::before_line_breaking
-     Stem::dim_callback
-     Stem::height
-     Stem::off_callback
-     Stem::print
-     Stem_tremolo::height
-     Stem_tremolo::print
-     Sustain_pedal::print
-     System_start_delimiter::after_line_breaking
-     System_start_delimiter::print
-     Text_item::print
-     Text_spanner::print
-     Tie::print
-     Tie_column::after_line_breaking
-     Time_signature::print
-     Tuplet_bracket::after_line_breaking
-     Tuplet_bracket::before_line_breaking
-     Tuplet_bracket::print
-     Vaticana_ligature::brew_ligature_primitive
-     Vaticana_ligature::print
-     Volta_bracket_interface::print
-     )))
-
-(define-public (make-safe-lilypond-module)
-  (let* ((m (make-safe-module)))
-    (for-each (lambda (p) (module-define! m (car p) (cdr p))) safe-objects)
-    m))
index b77a3c83443d504836887fafa2a169883f0a6263..bad27138e5e47d5e6126c79e4dbab32374b373f1 100644 (file)
@@ -5,7 +5,7 @@
 ;;;; (c)  2003--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
 (define-public (stack-stencils axis dir padding stils)
-  "Stack stencils STILS in direction AXIS, DIR, using PADDING."
+  "Stack stencils STILS in direction AXIS,DIR, using PADDING."
   (if (null? stils)
       '()
       (if (pair? stils)
           (stack-lines dir padding baseline (cdr stils))
           padding baseline))))
 
+(define-public (fontify-text font-metric text)
+  "Set TEXT with font FONT-METRIC, returning a stencil."
+  (let* ((b  (ly:text-dimension font-metric text)))
+    (ly:make-stencil
+     (ly:fontify-atom font-metric `(text ,text)) (car b) (cdr b))))
+
 (define-public (bracketify-stencil stil axis thick protusion padding)
   "Add brackets around STIL, producing a new stencil."
 
@@ -74,10 +80,3 @@ encloses the contents.
     (set! stil (ly:stencil-combine-at-edge stil Y -1 x-rule 0.0))
     
     stil))
-
-(define-public (fontify-text font-metric text)
-  "Set TEXT with font FONT-METRIC, returning a stencil."
-  (let* ((b  (ly:text-dimension font-metric text)))
-    (ly:make-stencil
-     `(text ,font-metric ,text) (car b) (cdr b))))
-
diff --git a/scm/titling.scm b/scm/titling.scm
deleted file mode 100644 (file)
index 0082f34..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-;;;; titling.scm -- titling functions
-;;;;
-;;;;  source file of the GNU LilyPond music typesetter
-;;;;
-;;;; (c) 2004 Jan Nieuwenhuizen <janneke@gnu.org>
-;;;;          Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
-(define-public (page-properties paper)
-  (list (append `((linewidth . ,(ly:paper-get-number
-                                paper 'linewidth)))
-               (ly:output-def-lookup paper 'text-font-defaults))))
-
-;;;;;;;;;;;;;;;;;;
-                                       ; titling.
-(define-public (default-book-title paper scopes)
-  "Generate book title from header strings."
-
-
-  (define (get sym)
-    (let ((x (ly:modules-lookup scopes sym)))
-      (if (markup? x) x "")))
-  (define (has sym)
-    (markup?  (ly:modules-lookup scopes sym)))
-
-  (let ((props (page-properties paper)))
-
-    (interpret-markup
-     paper props
-     (make-override-markup
-      '(baseline-skip . 4)
-      (make-column-markup
-       (append
-       (if (has 'dedication)
-           (list (markup #:fill-line
-                         (#:normalsize (get 'dedication))))
-           '())
-       (if (has 'title)
-           (list
-            (markup (#:fill-line
-                     (#:huge #:bigger #:bigger #:bigger #:bigger #:bold
-                             (get 'title)))))
-           '())
-       (if (or (has 'subtitle) (has 'subsubtitle))
-           (list
-            (make-override-markup
-             '(baseline-skip . 3)
-             (make-column-markup
-              (list
-               (markup #:fill-line
-                       (#:large #:bigger #:bigger #:bold (get 'subtitle)))
-               (markup #:fill-line (#:bigger #:bigger #:bold
-                                             (get 'subsubtitle)))
-               (markup #:override '(baseline-skip . 5)
-                       #:column ("")))
-
-              ))
-            )
-           '())
-       
-       (list
-        (make-override-markup
-         '(baseline-skip . 2.5)
-         (make-column-markup
-          (append
-           (if (or (has 'poet) (has 'composer))
-               (list (markup #:fill-line
-                             (#:bigger (get 'poet)
-                                       #:large #:bigger #:caps
-                                       (get 'composer))))
-               '())
-           (if (or (has 'texttranslator) (has 'opus))
-               (list
-                (markup
-                 #:fill-line
-                 (#:bigger (get 'texttranslator) #:bigger (get 'opus))))
-               '())
-           (if (or (has 'meter) (has 'arranger))
-               (list
-                (markup #:fill-line
-                        (#:bigger (get 'meter) #:bigger (get 'arranger))))
-               '())
-           (if (has 'instrument)
-               (list
-                ""
-                (markup #:fill-line (#:large #:bigger (get 'instrument))))
-               '())
-;;; piece is done in the score-title
-;;;         (if (has 'piece)
-;;;             (list ""
-;;;                   (markup #:fill-line (#:large #:bigger #:caps (get 'piece) "")))
-;;;             '())
-           ))))))))))
-
-
-(define-public (default-user-title paper markup)
-  "Generate book title from header markup."
-  (if (markup? markup)
-      (let ((props (page-properties paper))
-           (baseline-skip (chain-assoc-get 'baseline-skip props 2)) )
-       (stack-lines DOWN 0 BASELINE-SKIP
-                    (list (interpret-markup paper props markup))))))
-
-(define-public (default-score-title paper scopes)
-  "Generate score title from header strings."
-
-  (define (get sym)
-    (let ((x (ly:modules-lookup scopes sym)))
-      (if (markup? x) x "")))
-
-  (define (has sym)
-    (markup? (ly:modules-lookup scopes sym)))
-
-  (let ((props (page-properties paper)))
-    (interpret-markup
-     paper props
-     (make-override-markup
-      '(baseline-skip . 4)
-      (make-column-markup
-       (append
-       (if (has 'opus)
-           ;; opus, again?
-           (list (markup #:fill-line ("" (get 'opus))))
-           '())
-       (if (has 'piece)
-           (list
-            (markup #:fill-line (#:large #:bigger #:caps (get 'piece) "")))
-           '())))))))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
index 2e6181b16637760589d8e4ec854ef45e3fba6800..df73f4079355c43941af61566d32808dcc35f30c 100644 (file)
 # \breve and \longa supported.
 # M:none doesn't crash lily.
 
-# Enhancements (Guy Gascoigne-Piggford)
-#
-# Add support for maintaining ABC's notion of beaming, this is selectable
-# from the command line with a -b or --beam option.
-# Fixd a problem where on cygwin empty lines weren't being correctly identifed
-# and so were complaining, but still generating the correct output.
-
 # Limitations
 #
 # Multiple tunes in single file not supported
 
 #TODO:
 #
-# * lilylib
-# * GNU style messages:  warning:FILE:LINE:
-# * l10n
-# 
 # Convert to new chord styles.
 #
 # UNDEF -> None
@@ -83,7 +72,6 @@ import os
 UNDEF = 255
 state = UNDEF
 strict = 0
-preserve_beams = 0
 voice_idx_dict = {}
 header = {}
 header['footnotes'] = ''
@@ -114,65 +102,65 @@ def error (msg):
        
        
 def check_clef(s):
-       if not s:
-               return ''
-       if re.match('-8va', s) or re.match('treble8', s):
-               # treble8 is used by abctab2ps; -8va is used by barfly,
-               # and by my patch to abc2ps. If there's ever a standard
-               # about this we'll support that.
-               s = s[4:]
-               state.base_octave = -1
-               voices_append("\\clef \"G_8\"\n")
-       elif re.match('^treble', s):
-               s = s[6:]
-               if re.match ('^-8', s):
-                       s = s[2:]
-                       state.base_octave = -2
-                       voices_append("\\clef \"G_8\"\n")
-               else:
-                       state.base_octave = 0
-                       voices_append("\\clef treble\n")
-       elif re.match('^alto', s):
-               s = s[4:]
-               state.base_octave = -1
-               voices_append ("\\clef alto\n" )
-       elif re.match('^bass',s ):
-               s = s[4:]
-               state.base_octave = -2
-               voices_append ("\\clef bass\n" )
-               return s
+      if not s:
+              return ''
+      if re.match('-8va', s) or re.match('treble8', s):
+             # treble8 is used by abctab2ps; -8va is used by barfly,
+             # and by my patch to abc2ps. If there's ever a standard
+             # about this we'll support that.
+             s = s[4:]
+             state.base_octave = -1
+             voices_append("\\clef \"G_8\"\n")
+      elif re.match('^treble', s):
+              s = s[6:]
+              if re.match ('^-8', s):
+                      s = s[2:]
+                      state.base_octave = -2
+                      voices_append("\\clef \"G_8\"\n")
+              else:
+                      state.base_octave = 0
+                      voices_append("\\clef treble\n")
+      elif re.match('^alto', s):
+              s = s[4:]
+              state.base_octave = -1
+              voices_append ("\\clef alto\n" )
+      elif re.match('^bass',s ):
+              s = s[4:]
+              state.base_octave = -2
+              voices_append ("\\clef bass\n" )
+      return s
 
 def select_voice (name, rol):
        if not voice_idx_dict.has_key (name):
-               state_list.append(Parser_state())
-               voices.append ('')
-               slyrics.append ([])
-               voice_idx_dict[name] = len (voices) -1
+             state_list.append(Parser_state())
+             voices.append ('')
+             slyrics.append ([])
+             voice_idx_dict[name] = len (voices) -1
        __main__.current_voice_idx =  voice_idx_dict[name]
        __main__.state = state_list[current_voice_idx]
        while rol != '':
-               m = re.match ('^([^ \t=]*)=(.*)$', rol) # find keywork
-               if m:
-                       keyword = m.group(1)
-                       rol = m.group (2)
-                       a = re.match ('^("[^"]*"|[^ \t]*) *(.*)$', rol)
-                       if a:
-                               value = a.group (1)
-                               rol = a.group ( 2)
-                               if keyword == 'clef':
-                                       check_clef(value)
-                               elif keyword == "name":
-                                       value = re.sub ('\\\\','\\\\\\\\', value)
-                                       ## < 2.2
-                                       ##voices_append ("\\property Staff.instrument = %s\n" % value )
-                                       voices_append ("\\set Staff.instrument = %s\n" % value )
-                                       
-                                       __main__.part_names = 1
-                               elif keyword == "sname" or keyword == "snm":
-                                       ##voices_append ("\\property Staff.instr = %s\n" % value )
-                                       voices_append ("\\set Staff.instr = %s\n" % value )
-               else:
-                       break
+             m = re.match ('^([^ \t=]*)=(.*)$', rol) # find keywork
+             if m:
+                     keyword = m.group(1)
+                     rol = m.group (2)
+                     a = re.match ('^("[^"]*"|[^ \t]*) *(.*)$', rol)
+                     if a:
+                             value = a.group (1)
+                             rol = a.group ( 2)
+                             if keyword == 'clef':
+                                     check_clef(value)
+                             elif keyword == "name":
+                                     value = re.sub ('\\\\','\\\\\\\\', value)
+                                     voices_append ("\\set Staff.instrument = %s\n" % value )
+                                     __main__.part_names = 1
+                             elif keyword == "sname" or keyword == "snm":
+                                     voices_append ("\\set Staff.instr = %s\n" % value )
+
+             else:
+                     break
+
+       return
+
 
 def dump_header (outf,hdr):
        outf.write ('\\header {\n')
@@ -195,9 +183,7 @@ def dump_default_bar (outf):
        """
        Nowadays abc2ly outputs explicits barlines (?)
        """
-       ## < 2.2
-       ##outf.write ("\n\\property Score.defaultBarType = \"empty\"\n")
-       outf.write ("\n\\set Score.defaultBarType = \"empty\"\n")
+       outf.write ("\n\\set Score.defaultBarType=\"empty\"\n")
 
 
 def dump_slyrics (outf):
@@ -257,7 +243,7 @@ def dump_score (outf):
         \notes <<
 """)
 
-       ks = voice_idx_dict.keys ();
+       ks  = voice_idx_dict.keys ();
        ks.sort ()
        for k in  ks:
                if re.match('[1-9]', k):
@@ -402,11 +388,8 @@ key_lookup = {     # abc to lilypond key mode names
 }
 
 def lily_key (k):
-       orig = "" + k
-       # UGR
        k = string.lower (k)
        key = k[0]
-       #UGH
        k = k[1:]
        if k and k[0] == '#':
                key = key + 'is'
@@ -418,27 +401,24 @@ def lily_key (k):
                return '%s \\major' % key
 
        type = k[0:3]
-       if not key_lookup.has_key (type):
-               #ugh, use lilylib, say WARNING:FILE:LINE:
-               sys.stderr.write ("abc2ly:warning:")
-               sys.stderr.write ("ignoring unknown key: `%s'" % orig)
-               sys.stderr.write ('\n')
-               return 0
-       return ("%s \\%s" % ( key, key_lookup[type]))
-
-def shift_key (note, acc, shift):
-       s = semitone_pitch((note, acc))
-       s = (s + shift + 12) % 12
-       if s <= 4:
-               n = s / 2
-               a = s % 2
-       else:
-               n = (s + 1) / 2
-               a = (s + 1) % 2
-       if a:
-               n = n + 1
-               a = -1
-       return (n,a)
+       if key_lookup.has_key(type):
+               return("%s \\%s" % ( key, key_lookup[type]))
+       sys.stderr.write("Unknown key type `%s' ignored\n" % type)
+       return key
+
+def shift_key (note, acc , shift):
+        s = semitone_pitch((note, acc))
+        s = (s + shift + 12) % 12
+        if s <= 4:
+                n = s / 2
+                a = s % 2
+        else:
+                n = (s + 1) / 2
+                a = (s + 1) % 2
+        if a:
+                n = n + 1
+                a = -1
+        return (n,a)
 
 key_shift = { # semitone shifts for key mode names
        'm'   : 3,
@@ -527,7 +507,6 @@ def try_parse_tuplet_begin (str, state):
 def  try_parse_group_end (str, state):
        if str and str[0] in HSPACE:
                str = str[1:]
-               close_beam_state(state)
        return str
        
 def header_append (key, a):
@@ -548,31 +527,13 @@ def stuff_append (stuff, idx, a):
        else:
                stuff [idx] = wordwrap(a, stuff[idx])
 
-# ignore wordwrap since we are adding to the previous word
-def stuff_append_back(stuff, idx, a):
-       if not stuff:
-               stuff.append (a)
-       else:
-               point = len(stuff[idx])-1
-               while stuff[idx][point] is ' ':
-                       point = point - 1
-               point = point +1
-               stuff[idx] = stuff[idx][:point] + a + stuff[idx][point:]
+
 
 def voices_append(a):
        if current_voice_idx < 0:
                select_voice ('default', '')
        stuff_append (voices, current_voice_idx, a)
 
-# word wrap really makes it hard to bind beams to the end of notes since it
-# pushes out whitespace on every call. The _back functions do an append
-# prior to the last space, effectively tagging whatever they are given
-# onto the last note
-def voices_append_back(a):
-       if current_voice_idx < 0:
-               select_voice ('default', '')
-       stuff_append_back(voices, current_voice_idx, a)
-
 def repeat_prepend():
        global repeat_state
        if current_voice_idx < 0:
@@ -644,12 +605,12 @@ def try_parse_header_line (ln, state):
                        if a == 'C':
                                if not state.common_time:
                                        state.common_time = 1
-                                       voices_append ("\\property Staff.TimeSignature \\override #\'style = #'C\n")
+                                       voices_append ("\\override Staff.TimeSignature #\'style = #'C\n")
                                a = '4/4'
                        if a == 'C|':
                                if not state.common_time:
                                        state.common_time = 1
-                                       voices_append ("\\property Staff.TimeSignature \\override #\'style = #'C\n")
+                                       voices_append ("\\override Staff.TimeSignature #\'style = #'C\n")
                                a = '2/2'
                        if not length_specified:
                                set_default_len_from_time_sig (a)
@@ -671,16 +632,12 @@ def try_parse_header_line (ln, state):
                                        else:
                                                key_info = m.group(1)
                                                clef_info = m.group(2)
-                                       __main__.global_key  = compute_key (key_info)
-                                       k = lily_key (key_info)
-                                       if k:
-                                               voices_append ('\\key %s' % k)
+                                       __main__.global_key  = compute_key (key_info)# ugh.
+                                       voices_append ('\\key %s' % lily_key(key_info))
                                        check_clef(clef_info)
                                else:
-                                       __main__.global_key  = compute_key (a)
-                                       k = lily_key (a)
-                                       if k:
-                                               voices_append ('\\key %s \\major' % k)
+                                       __main__.global_key  = compute_key (a)# ugh.
+                                       voices_append ('\\key %s \\major' % lily_key(a))
                if g == 'N': # Notes
                        header ['footnotes'] = header['footnotes'] +  '\\\\\\\\' + a
                if g == 'O': # Origin
@@ -787,7 +744,6 @@ class Parser_state:
                self.plus_chord = 0
                self.base_octave = 0
                self.common_time = 0
-               self.parsing_beam = 0
 
 
 
@@ -924,12 +880,6 @@ def clear_bar_acc(state):
                del state.in_acc[k]
        
 
-# if we are parsing a beam, close it off
-def close_beam_state(state):
-       if state.parsing_beam and preserve_beams:
-               state.parsing_beam = 0
-               voices_append_back( ']' )
-
                
 # WAT IS ABC EEN ONTZETTENDE PROGRAMMEERPOEP  !
 def try_parse_note (str, parser_state):
@@ -951,7 +901,7 @@ def try_parse_note (str, parser_state):
                if c == '_':
                        acc = -1
 
-       octave = parser_state.base_octave
+        octave = parser_state.base_octave
        if str[0] in "ABCDEFG":
                str = string.lower (str[0]) + str[1:]
                octave = octave - 1
@@ -1016,19 +966,13 @@ def try_parse_note (str, parser_state):
        if slur_end:
                voices_append ('-)' *slur_end )
 
-       if preserve_beams and \
-          str[0] in '^=_ABCDEFGabcdefg' and \
-          not parser_state.parsing_beam and \
-          not parser_state.parsing_tuplet:
-               parser_state.parsing_beam = 1
-               voices_append_back( '[' )
-               
+
+
        return str
 
-def junk_space (str,state):
-       while str and str[0] in '\t\n\r ':
+def junk_space (str):
+       while str and str[0] in '\t\n ':
                str = str[1:]
-               close_beam_state(state)
 
        return str
 
@@ -1049,8 +993,7 @@ def try_parse_guitar_chord (str, state):
                if str:
                        str = str[1:]
                gc = re.sub('#', '\\#', gc)     # escape '#'s
-               state.next_articulation = ("%c\"%s\"" % (position, gc)) \
-                                         + state.next_articulation
+               state.next_articulation = ("%c\"%s\"" % (position ,gc)) + state.next_articulation
        return str
 
 def try_parse_escape (str):
@@ -1152,7 +1095,6 @@ def try_parse_bar (str,state):
                state.next_bar = '|\n'
                str = str[1:]
                clear_bar_acc(state)
-               close_beam_state(state)
        
        if bs <> None or state.next_bar != '':
                if state.parsing_tuplet:
@@ -1161,7 +1103,6 @@ def try_parse_bar (str,state):
                
        if bs <> None:
                clear_bar_acc(state)
-               close_beam_state(state)
                voices_append (bs)
                if do_curly != '':
                        voices_append("} }")
@@ -1264,15 +1205,12 @@ def try_parse_comment (str):
 #write other kinds of appending  if we ever need them.                 
        return str
 
-lineno = 0
 happy_count = 100
 def parse_file (fn):
        f = open (fn)
        ls = f.readlines ()
-       ls = map (lambda x: re.sub ("\r$", '', x), ls)
 
        select_voice('default', '')
-       global lineno
        lineno = 0
        sys.stderr.write ("Line ... ")
        sys.stderr.flush ()
@@ -1310,7 +1248,7 @@ def parse_file (fn):
                        ln = try_parse_tuplet_begin (ln, state)
                        ln = try_parse_group_end (ln, state)
                        ln = try_parse_grace_delims (ln, state)
-                       ln = junk_space (ln, state)
+                       ln = junk_space (ln)
 
                if ln:
                        error ("%s: %d: Huh?  Don't understand\n" % (fn, lineno))
@@ -1333,7 +1271,6 @@ Options:
   -o, --output=FILE   set output filename to FILE
   -v, --version       show version information
   -s, --strict        be strict about succes
-  -b, --beams         preserve ABC's notion of beams
   
 This program converts ABC music files (see
 http://www.gre.ac.uk/~c.walshaw/abc2mtex/abc.txt) to LilyPond input.
@@ -1350,7 +1287,7 @@ def print_version ():
 
 
 
-(options, files) = getopt.getopt (sys.argv[1:], 'vo:hsb', ['help','version', 'output=', 'strict', 'beams'])
+(options, files) = getopt.getopt (sys.argv[1:], 'vo:hs', ['help','version', 'output=', 'strict'])
 out_filename = ''
 
 for opt in options:
@@ -1366,8 +1303,6 @@ for opt in options:
                strict = 1
        elif o == '--output' or o == '-o':
                out_filename = a
-       elif o == '--beams' or o == '-b':
-               preserve_beams = 1
        else:
                print o
                raise getopt.error
@@ -1388,7 +1323,7 @@ for f in files:
        outf = open (out_filename, 'w')
 
 #      dump_global (outf)
-       dump_header (outfheader)
+       dump_header (outf ,header)
        dump_slyrics (outf)
        dump_voices (outf)
        dump_score (outf)
index 965d6d6978de39bbf9e8d75bbbab1ca4208132b2..9c8f35f254b3c582130f5c188373cd3fdcf6371d 100644 (file)
@@ -1625,7 +1625,7 @@ def conv (str):
        def func(match):
                return "#'font-size = #%d" % (2*string.atoi (match.group (1))) 
                
-       str =re.sub (r"#'font-relative-size\s*=\s*#\+?([0-9-]+)", func, str)
+       str =re.sub (r"#'font-relative-size\s*=\s*#([0-9-]+)", func, str)
        str =re.sub (r"#'font-family\s*=\s*#'ancient",
                     r"#'font-family = #'music", str)
        
@@ -1989,7 +1989,7 @@ def conv (str):
                elif o >= 0:
                        str += "'" * (o + 1)
                        
-               return '\\transposition %s ' % str
+               return '\\tuning %s ' % str
 
        
        str = re.sub (r"\\set ([A-Za-z]+\s*\.\s*)?transposing\s*=\s*#([-0-9]+)",
@@ -2082,39 +2082,6 @@ def conv (str):
 conversions.append (((2,2, 0), conv,
                     '''clean up version. '''))
 
-def conv (str):
-       return re.sub (r'\\apply\b', r'\\applymusic', str)
-
-conversions.append (((2, 3, 1), conv,
-                    '''\\apply -> \\applymusic'''))
-
-def conv (str):
-       str = re.sub (r'\\OrchestralScoreContext', '\\Score', str)
-       def func(m):
-               if m.group(1) not in ['RemoveEmptyStaff',
-                                     'AncientRemoveEmptyStaffContext',
-                                     'EasyNotation']:
-                       return '\\' + m.group (1)
-               else:
-                       return m.group (0)
-               
-               
-       str = re.sub (r'\\([a-zA-Z]+)Context\b', func, str)
-
-       str = re.sub ('ly:paper-lookup', 'ly:output-def-lookup', str)
-       return str
-
-conversions.append (((2, 3, 2), conv,
-                    '''\\FooContext -> \\Foo'''))
-
-def conv (str):
-       str = re.sub (r'\\notes\b', '', str)
-       
-       return str
-
-conversions.append (((2, 3, 4), conv,
-                    '''remove \\notes'''))
-
 ################################
 #      END OF CONVERSIONS      
 ################################
index 1e0aa741f9b5b79d5028da7add73f5835d2d8bc0..610f81815cf7d6969f3a5fc5549669695964e9f0 100644 (file)
@@ -1,6 +1,12 @@
 #!@PYTHON@
 
 '''
+TODO:
+      ly-options: intertext, quote ?
+      --linewidth?
+      eps in latex?
+      check latex parameters, twocolumn, multicolumn?
+      
 Example usage:
 
 test:
@@ -12,16 +18,10 @@ convert-ly on book:
 classic lilypond-book:
      lilypond-book --process="lilypond-bin" BOOK.tely
 
-TODO:
-    *  ly-options: intertext ?
-    *  --linewidth?
-    *  eps in latex / eps by lilypond-bin -fps ?
-    *  check latex parameters, twocolumn, multicolumn?
-      
-    *  Converting from lilypond-book source, substitute:
-       @mbinclude foo.itely -> @include foo.itely
-       \mbinput -> \input
-
+   must substitute:
+     @mbinclude foo.itely -> @include foo.itely
+     \mbinput -> \input
+     
 '''
 
 import __main__
@@ -101,7 +101,10 @@ if '@bindir@' == ('@' + 'bindir@') or not os.path.exists (lilypond_binary):
 use_hash_p = 1
 format = 0
 output_name = 0
-latex_filter_cmd = 'latex "\\nonstopmode \input /dev/stdin"'
+# Ugh, hard coded file name! Unfortunately tempfile.mktemp doesn't 
+# give a useful file in Cygwin. Also, the original version, 
+# 'latex "\\nonstopmode \input /dev/stdin"' doesn't work in Cygwin.
+latex_filter_cmd = 'cat > lily-tmp.tex; latex "\\nonstopmode \input lily-tmp.tex";rm lily-tmp.tex'
 filter_cmd = 0
 process_cmd = lilypond_binary
 default_ly_options = {}
@@ -204,7 +207,7 @@ ly_options = {
     indent = 0.0\mm''',
        NOTIME : r'''
     \context {
-        \Staff
+        \StaffContext
         \remove Time_signature_engraver
     }''',
        QUOTE : r'''
@@ -296,18 +299,17 @@ output = {
        },
        }
 
-PREAMBLE_LY = r'''%%%% Generated by %(program_name)s
-%%%% Options: [%(option_string)s]
-#(define toplevel-score-handler ly:parser-print-score)
+PREAMBLE_LY = r'''%% Generated by %(program_name)s
+%% Options: [%(option_string)s]
 %(preamble_string)s
 \paper {%(paper_string)s
 }
 ''' 
 
-FRAGMENT_LY = r'''
-    %(notes_string)s{
+FRAGMENT_LY = r'''\score{
+    \notes%(notes_string)s{
         %(code)s    }
-'''
+}'''
 FULL_LY = '%(code)s'
 
 texinfo_linewidths = {
@@ -327,11 +329,11 @@ def classic_lilypond_book_compatibility (o):
        m = re.match ('([0-9]+)pt', o)
        if m:
                return 'staffsize=%s' % m.group (1)
-       m = re.match ('indent=([-.0-9]+)(cm|in|mm|pt|staffspace)', o)
+       m = re.match ('indent=([-.0-9]+)(cm|in|mm|pt)', o)
        if m:
                f = float (m.group (1))
                return 'indent=%f\\%s' % (f, m.group (2))
-       m = re.match ('linewidth=([-.0-9]+)(cm|in|mm|pt|staffspace)', o)
+       m = re.match ('linewidth=([-.0-9]+)(cm|in|mm|pt)', o)
        if m:
                f = float (m.group (1))
                return 'linewidth=%f\\%s' % (f, m.group (2))
@@ -347,7 +349,7 @@ def compose_ly (code, options):
        if QUOTE in options and LINEWIDTH in options:
                options.remove (LINEWIDTH)
 
-       m = re.search (r'''\\(header|score)''', code)
+       m = re.search (r'''\\score''', code)
        if not m and (not options \
                      or not NOFRAGMENT in options or FRAGMENT in options):
                if RAGGEDRIGHT not in options:
@@ -421,7 +423,7 @@ def to_eps (file):
        # Redirect to stderr
        cmd = '(( %s  >&2 ) >&- )' % cmd
        ly.system (cmd)
-       ly.system ('dvips -Ppdf -u+ec-mftrace.map -u+lilypond.map -E -o %s.eps %s' \
+       ly.system ('dvips -Ppdf -u+lilypond.map -E -o %s.eps %s' \
                   % (file, file))
 
 
@@ -436,7 +438,7 @@ def to_eps (file):
                if re.search ("^%%Pages: ", f.readline ()):
 
                        # make non EPS.
-                       ly.system ('dvips -Ppdf -u+ec-mftrace.map -u+lilypond.map -o %s.eps %s' \
+                       ly.system ('dvips -Ppdf -u+lilypond.map -o %s.eps %s' \
                                   % (file, file))
                        break
        
@@ -795,12 +797,9 @@ def process_snippets (cmd, snippets):
 
        if format == HTML or format == TEXINFO:
                for i in names:
-                       if not os.path.exists (i + '.eps') and os.path.exists (i + '.tex'):
+                       if os.path.exists (i + '.tex'):
                                to_eps (i)
                                ly.make_ps_images (i + '.eps', resolution=110)
-#                      elif os.path.exists (i + '.ps'):
-#                              ly.make_ps_images (i + '.ps', resolution=110)
-
 
 LATEX_DOCUMENT = r'''
 %(preamble)s
index 6e2bf6c5d5d775d73e14e0582228377c827be036..fb71ee72d43263652cb260c5ff408f8bce8ba592 100644 (file)
@@ -1,19 +1,18 @@
 #!@PYTHON@
-# lilypond.py -- frontend for lilypond-bin
 #
+# lilypond.py -- Run LilyPond, add titles to bare score, generate printable
+#              document
+#              Invokes: lilypond-bin, latex (or pdflatex), dvips, ps2pdf, gs
+# 
 # source file of the GNU LilyPond music typesetter
 # 
 # (c) 1998--2004  Han-Wen Nienhuys <hanwen@cs.uu.nl>
 #                 Jan Nieuwenhuizen <janneke@gnu.org>
-#
-# Run lilypond-bin, generate printable document
-# Invokes: lilypond-bin, latex (or pdflatex), dvips, ps2pdf, gs
-# 
 
-# This is the third incarnation of ly2dvi, renamed to lilypond.
+# This is the third incarnation of ly2dvi, now renamed lilypond.
 #
-# Earlier incarnations of ly2dvi were written by
-# Jeffrey B. Reed<daboys@austin.rr.com> (Python versioan)
+# Earlier incarnations of lilypond were written by
+# Jeffrey B. Reed<daboys@austin.rr.com> (Python version)
 # Jan Arne Fagertun <Jan.A.Fagertun@@energy.sintef.no> (Bourne shell script)
 #
 
@@ -25,8 +24,6 @@
 '''
 TODO:
 
-  * cleanup
-
   * figure out which set of command line options should make lilypond:
 
       na: create tex only?  
@@ -40,9 +37,34 @@ TODO:
 
      etc.
 
+  * move versatile taglines, 
+  
+     \header {
+        beginfooter=\mutopiaPD
+        endfooter=\tagline  -> 'lily was here <version>'
+     }
+
+     lilytagline (->lily was here), usertagline, copyright, lily-version
+     etc.
+
+  * head/header tagline/endfooter
+
   * dvi from lilypond .tex output?  This is hairy, because we create dvi
     from lilypond .tex *and* header output.
 
+  * multiple \score blocks?
+
+  * Introduce verbosity levels
+  
+     0  = QUIET: mute all command output, no lilypond progress
+     1  = BRIEF: mute all command output, only lilypond progress
+     2a = NORMAL: show only LilyPond command output, show lilypond progress
+     2b = NORMAL: show command output, show lilypond progress
+     3  = VERBOSE: show command output, run lilypond --verbose
+     4  = DEBUGGING: show all command output, run lilypond --verbose, print
+                   environment and all kinds of client side debugging stuff
+
+     Currently, we only have 1 and 4, but we kludge to have 2a and 4.
 '''
 
 import operator
@@ -84,8 +106,6 @@ global re;re = ly.re
 # lilylib globals
 program_name = 'lilypond'
 program_version = '@TOPLEVEL_VERSION@'
-# input without \book, use classic latex definitions
-classic_p = 0
 verbose_p = 0
 pseudo_filter_p = 0
 original_dir = os.getcwd ()
@@ -94,17 +114,16 @@ keep_temp_dir_p = 0
 preview_resolution = 90
 debug_p = 0
 
-TEX_PREAMBLE = '%%%% Generated by %(program_name)s (v%(program_version)s)' \
-              % vars ()
-
 ## FIXME
 ## do -P or -p by default?
 ##help_summary = _ ("Run LilyPond using LaTeX for titling")
-help_summary = _ ("Run LilyPond, generate printable document.")
+help_summary = _ ("Run LilyPond, add titles, generate printable document.")
 copyright = ('Han-Wen Nienhuys <hanwen@cs.uu.nl',
             'Jan Nieuwenhuizen <janneke@gnu.org')
 
 option_definitions = [
+       ('', 'd', 'dependencies',
+        _ ("write Makefile dependencies for every input file")),
        ('', 'h', 'help', _ ("print this help")),
        ('', '', 'debug', _ ("print even more output")),
        (_ ("FILE"), 'f', 'find-pfa', _ ("find pfa fonts used in FILE")),
@@ -136,9 +155,6 @@ option_definitions = [
 safe_mode_p = 0
 preview_p = 0
 page_images_p = 0
-
-# need global variable. sys.exit() raises an exception, which is handled
-# to do cleanups.
 lilypond_error_p = 0
 html_p = 0
 
@@ -158,19 +174,34 @@ if '@bindir@' == ('@' + 'bindir@') or not os.path.exists (lilypond_binary):
        lilypond_binary = 'lilypond-bin'
 
 
-## Init to empty; values here take precedence over values in the file
+layout_fields = ['dedication', 'title', 'subtitle', 'subsubtitle',
+         'footer', 'head', 'composer', 'arranger', 'instrument',
+         'opus', 'piece', 'metre', 'meter', 'poet', 'texttranslator']
+
+
+# init to empty; values here take precedence over values in the file
+
+## TODO: change name.
 extra_init = {
+       'fontencoding' : [],
+       'inputencoding' : ['latin1'],
        'language' : [],
        'latexheaders' : [],
-       'latexoptions' : [],
-       'latexpackages' :  [],
+       'latexpackages' :  ['geometry'],
+
+       # for geometry v3
+       'latexoptions' : ['compat2'],
+       
+       'papersize' : [],
+       'pagenumber' : [1],
+       'textheight' : [], 
        'linewidth' : [],
        'orientation' : [],
-       'papersize' : [],
        'unit' : ['pt'],
 }
 
-header_fields = extra_init.keys ()
+extra_fields = extra_init.keys ()
+fields = layout_fields + extra_fields
 
 include_path = ['.']
 lily_p = 1
@@ -181,6 +212,7 @@ output_name = ''
 # Output formats that lilypond should create
 targets = ['DVI', 'LATEX', 'MIDI', 'TEX', 'PDF', 'PS']
 
+track_dependencies_p = 0
 dependency_files = []
 
 #what a name.
@@ -208,26 +240,32 @@ def set_setting (dict, key, val):
 def escape_shell (x):
        return re.sub ("(\s|[`'\"\\\\])", r'\\\1',x)
 
+
 def run_lilypond (files, dep_prefix):
-       
        def make_include_option (x):
                return '-I %s' %   escape_shell (x)
-       
-       opts = ' ' + string.join (map (make_include_option, include_path))
-       
-       ## UGHr
+
+       opts = ''
+       opts = opts + ' ' + string.join (map (make_include_option, include_path))
        if pseudo_filter_p:
-               opts += ' --output=lelie'
+               opts = opts + ' --output=lelie'
        if paper_p:
-               opts += ' ' + string.join (map (lambda x : '--header=' + x,
-                                               header_fields))
+               opts = opts + ' ' + string.join (map (lambda x : '-H ' + x,
+                                                     fields))
        else:
                opts = opts + ' --no-paper'
+
        if pdftex_p:
                opts = opts + ' -f pdftex'              
+
        if safe_mode_p:
                opts = opts + ' --safe-mode'
 
+       if track_dependencies_p:
+               opts = opts + " --dependencies"
+               if dep_prefix:
+                       opts = opts + ' --dep-prefix=%s' % dep_prefix
+
        fs = string.join (map (escape_shell, files))
 
        global verbose_p
@@ -255,7 +293,7 @@ def run_lilypond (files, dep_prefix):
                if len (files) == 1:
                        ly.error (_ ("LilyPond failed on input file %s (exit status %d)") % (files[0], exit_status))
                        lilypond_error_p = 1
-                       ly.exit (1)
+                       ly.exit (status)
                else:
                        ly.error (_ ("LilyPond failed on an input file (exit status %d)") % exit_status)
                        ly.error (_ ("Continuing..."))
@@ -273,28 +311,32 @@ def analyse_lilypond_output (filename, extra):
 
        # search only the first 10k
        s = s[:10240]
-       for x in header_fields:
-               m = re.search (r'\\def\\lilypondpaper%s{([^}]*)}' % x, s)
+       for x in extra_fields:
+               m = re.search (r'\\def\\lilypondpaper%s{([^}]*)}'%x, s)
                if m:
                        set_setting (extra, x, m.group (1))
-
-       global classic_p
-       if s.find ('\\def\\lilypondclassic{1}') >= 0:
-               classic_p = 1
-       
        ly.progress ('\n')
 
 def find_tex_files_for_base (base, extra):
+       '''
+       Find the \header fields dumped from BASE.
+       '''
+       
+       headerfiles = {}
+       for f in layout_fields:
+               fn = base + '.' + f
+               if os.path.exists (fn):
+                       headerfiles[f] = fn
 
        if os.path.exists (base  +'.dep'):
                dependency_files.append (base + '.dep')
 
-       for f in header_fields:
+       for f in extra_fields:
                fn =base + '.' + f
                if os.path.exists (fn):
                        extra[f].append (open (fn).read ())
        
-       return (base + tex_extension, {})
+       return (base + tex_extension, headerfiles)
         
 
 def find_tex_files (files, extra):
@@ -327,7 +369,7 @@ def find_tex_files (files, extra):
 
 def one_latex_definition (defn, first):
        s = '\n'
-       for (k, v) in defn[1].items ():
+       for (k,v) in defn[1].items ():
                val = open (v).read ()
                if (string.strip (val)):
                        s += r'''\def\lilypond%s{%s}''' % (k, val)
@@ -335,43 +377,30 @@ def one_latex_definition (defn, first):
                        s += r'''\let\lilypond%s\relax''' % k
                s += '\n'
 
-       if classic_p and not first:
-               s += '\interscoreline'
-
-       s += '%%PREVIEW%%\n'
-       s += '\\input %s\n' % defn[0]
+       if first:
+               s += '\\def\\mustmakelilypondtitle{}\n'
+       else:
+               s += '\\def\\mustmakelilypondpiecetitle{}\n'
+               
+       s += '\\input %s\n' % defn[0] # The final \n seems important here. It ensures that the footers and taglines end up on the right page.
        return s
 
-               
-## FIXME: copied from tex/lilyponddefs.tex
-LATEX_PREAMBLE = '''
-%% Nullify [La]TeX page layout settings, page layout by LilyPond.
-\\topmargin-1in
-\\headheight0pt\\headsep0pt
-\\oddsidemargin-1in
-\\evensidemargin\oddsidemargin
-\\parindent 0pt'''
-
-CLASSIC_LATEX_PREAMBLE = '''
-%% FIXME: cannot do this, dimens in header part of lilypond output
-%% Center staves horizontally on page
-\\ifdim\\lypylinewidth\\lypyunit > 0pt
-\\hsize\\lypylinewidth\\lypyunit
-\\newdimen\\lypytempdim
-\\lypytempdim\\paperwidth
-\\advance\\lypytempdim-\\the\\hsize
-\\lypytempdim0.5\\lypytempdim
-\\advance\\lypytempdim -1in
-\\oddsidemargin\\lypytempdim
-\\evensidemargin\\lypytempdim
-\\fi
-\\parindent 0pt'''
 
+ly_paper_to_latexpaper = {
+       'letter' : 'letterpaper', 
+       'a3' : 'a3paper',
+       'a4' : 'a4paper',
+       'a5' : 'a5paper',
+       'a6' : 'a6paper',
+       'legal' : 'legalpaper', 
+       'tabloid' : 'papersize={11in,17in}', 
+}
+
+#TODO: should set textheight (enlarge) depending on papersize. 
 def global_latex_preamble (extra):
        '''construct preamble from EXTRA,'''
-       
-       s = TEX_PREAMBLE
-       s += '\n'
+       s = ""
+       s += '% generation tag\n'
 
        options = ''
 
@@ -383,19 +412,16 @@ def global_latex_preamble (extra):
        if safe_mode_p:
                s += '\\nofiles\n'
 
-       if classic_p:
-               if extra['linewidth']:
-                       s += '\\def\\lypylinewidth{%s}\n' \
-                            % extra['linewidth'][-1]
-               else:
-                       s += '\\let\\lypylinewidth\\texwidth\n'
-               s += '\\def\\lypyunit{%s}\n' % extra['unit'][-1]
+       s += '\\usepackage{%s}\n' % string.join (extra['latexpackages'], ',')
 
        if extra['language']:
-               s += '\\usepackage[%s]{babel}' % extra['language'][-1] + '\n'
+               s += r'\usepackage[%s]{babel}' % extra['language'][-1] + '\n'
+
+       if extra['fontencoding']:
+               s += '\\usepackage[%s]{fontenc}\n' % extra['fontencoding'][-1]
 
-       s += '\\usepackage{%s}\n' \
-               % string.join (extra['latexpackages'], ',')
+       if extra['inputencoding']:
+               s += '\\usepackage[%s]{inputenc}\n' % extra['inputencoding'][-1]
 
        if extra['latexheaders']:
                s += '\\include{%s}\n' \
@@ -403,36 +429,78 @@ def global_latex_preamble (extra):
 
        unit = extra['unit'][-1]
 
-       # FIXME, must (only) from lilypond-bin
+       papersize = ''
+       if extra['papersize']:
+               try:
+                       papersize = ly_paper_to_latexpaper[extra['papersize'][0]] + ','
+               except KeyError:
+                       ly.warning (_ ("invalid value: `%s'") % `extra['papersize'][0]`)
+                       pass
+
+       textheight = ''
+       if extra['textheight']:
+               textheight = ',textheight=%f%s' % (extra['textheight'][0], unit)
+
+       orientation = 'portrait'
+       if extra['orientation']:
+               orientation = extra['orientation'][0]
+
+       # set sane geometry width (a4-width) for linewidth = -1.
+       maxlw = max (extra['linewidth'] + [-1])
+       if maxlw < 0:
+               # who the hell is 597 ?
+               linewidth = '597pt'
+       else:
+               linewidth = '%d%s' % (maxlw, unit)
+       s += '\geometry{%swidth=%s%s,bottom=11mm,headsep=2mm,top=12mm,headheight=2mm,footskip=5mm,%s}\n' % (papersize, linewidth, textheight, orientation)
+
+
+       if 'twoside' in  extra['latexoptions'] :
+               s += '\geometry{twosideshift=4mm}\n'
+
        s += r'''
-\usepackage{inputenc}
-\pagestyle{empty}
-%%PREVIEW%%'''
+\input{titledefs}
+'''
        
-       if classic_p:
-               s += CLASSIC_LATEX_PREAMBLE
+       if extra['pagenumber'] and extra['pagenumber'][-1] and extra['pagenumber'][-1] != 'no':
+               s += '\setcounter{page}{%d}\n' % (extra['pagenumber'][-1])
+                s += '\\pagestyle{plain}\n'
        else:
-               s += LATEX_PREAMBLE
+               s += '\\pagestyle{empty}\n'
+
+
        return s
 
        
 def global_latex_definition (tfiles, extra):
        '''construct preamble from EXTRA, dump Latex stuff for each
 lily output file in TFILES after that, and return the Latex file constructed.  '''
+
+       
        s = global_latex_preamble (extra) + '\\begin{document}\n'
-       s += '\\parindent 0pt'
+       s += '\\parindent 0pt\n'
+       s += '\\thispagestyle{firstpage}\n'
 
        first = 1
        for t in tfiles:
                s += one_latex_definition (t, first)
                first = 0
-       s += '\\end{document}\n'
+
+
+       s += '\n\\thispagestyle{lastpage}\n'
+       s += '\\end{document}'
+
        return s
 
 def run_latex (files, outbase, extra):
+
        '''Construct latex file, for FILES and EXTRA, dump it into
-OUTBASE.latex.  Run LaTeX on it.
-'''
+OUTBASE.latex. Run LaTeX on it.
+
+RETURN VALUE
+
+None
+       '''
 
        latex_fn = outbase + '.latex'
        
@@ -475,8 +543,12 @@ OUTBASE.latex.  Run LaTeX on it.
                        preview_base = ly.strip_extension (score[0], '.tex')
                        preview_fn = preview_base + '.preview.tex'
                        s = global_latex_definition ((score,), extra)
-                       s = re.sub ('%%PREVIEW%%',
-                                   r'''\def\interscoreline{\endinput}''', s)
+                       s = re.sub ('thispagestyle{firstpage}',
+                                   r'''thispagestyle{empty}%
+                                   \\def\\interscoreline{\\endinput}''', s)
+                       s = re.sub ('thispagestyle{lastpage}',
+                                   r'''thispagestyle{empty}%
+                                   \\def\\interscoreline{\\endinput}''', s)
                        f = open (preview_fn, 'w')
                        f.write (s)
                        f.close ()
@@ -486,17 +558,23 @@ OUTBASE.latex.  Run LaTeX on it.
 
 
 def run_dvips (outbase, extra):
+
+
        '''Run dvips using the correct options taken from EXTRA,
 leaving a PS file in OUTBASE.ps
+
+RETURN VALUE
+
+None.
 '''
-       #FIXME: papersize, orientation must come from lilypond-bin
        opts = ''
        if extra['papersize']:
-               opts = ' -t%s' % extra['papersize'][0]
-               
+               opts = opts + ' -t%s' % extra['papersize'][0]
+
        if extra['orientation'] and extra['orientation'][0] == 'landscape':
                opts = opts + ' -tlandscape'
 
+
        if 'PDF' in targets:
                where = ly.read_pipe ('kpsewhich feta20.pfa').strip()
 
@@ -508,8 +586,7 @@ leaving a PS file in OUTBASE.ps
                                pass
 
                if pfa_file:
-                       #opts = opts + ' -Ppdf -G0 -u +lm.map -u +lilypond.map'
-                       opts = opts + ' -Ppdf -G0 -u +ec-mftrace.map -u +lilypond.map'
+                       opts = opts + ' -Ppdf -G0 -u +lilypond.map'
                else:
                        ly.warning (_ ('''Trying create PDF, but no PFA fonts found.
 Using bitmap fonts instead. This will look bad.'''))
@@ -520,7 +597,7 @@ Using bitmap fonts instead. This will look bad.'''))
        if preview_p:
                for score in find_tex_files (files, extra):
                        preview_base = ly.strip_extension (score[0], '.tex')
-                       cmd = 'dvips -E -Ppdf -u+ec-mftrace.map -u+lilypond.map -o%s %s' \
+                       cmd = 'dvips -E -Ppdf -u+lilypond.map -o%s %s' \
                              % (preview_base + '.preview.ps',
                                 preview_base + '.preview.dvi')
                        ly.system (cmd)
@@ -553,8 +630,10 @@ def find_file_in_path (path, name):
                if name in os.listdir (d):
                        return os.path.join (d, name)
 
+# Added as functionality to lilypond, because lilypond may well need to do this
+# in future too.
+PS = '%!PS-Adobe'
 def find_pfa_fonts (name):
-       PS = '%!PS-Adobe'
        s = open (name).read ()
        if s[:len (PS)] != PS:
                # no ps header?
@@ -582,7 +661,7 @@ def make_html_menu_file (html_file, files_found):
 
        pages = filter (lambda x : re.search ('page[0-9]+.png',  x),
                        files_found)
-       rest =  filter (lambda x : not re.search ('page[0-9]+.png',  x),
+       rest = filter (lambda x : not re.search ('page[0-9]+.png',  x),
                        files_found)
 
        preview = filter (lambda x: re.search ('.png$', x), rest)
@@ -678,6 +757,8 @@ for opt in options:
        elif o == '--set' or o == '-S':
                ss = string.split (a, '=')
                set_setting (extra_init, ss[0], ss[1])
+       elif o == '--dependencies' or o == '-d':
+               track_dependencies_p = 1
        elif o == '--verbose' or o == '-V':
                verbose_p = 1
        elif o == '--version' or o == '-v':
@@ -770,7 +851,7 @@ if 1:
                dep_prefix = 0
 
        reldir = os.path.dirname (output_name)
-       if outdir != '.' and targets:
+       if outdir != '.' and (track_dependencies_p or targets):
                ly.mkdir_p (outdir, 0777)
 
        tmpdir = ly.setup_temp ()
@@ -779,7 +860,7 @@ if 1:
                os.environ['openout_any'] = 'p'
 
        # to be sure, add tmpdir *in front* of inclusion path.
-       #os.environ['TEXINPUTS'] =  tmpdir + ':' + os.environ['TEXINPUTS']
+       #os.environ['TEXINPUTS'] = tmpdir + ':' + os.environ['TEXINPUTS']
        os.chdir (tmpdir)
 
        # We catch all exceptions, because we need to do stuff at exit:
@@ -794,6 +875,7 @@ if 1:
                        ### this should only catch lilypond nonzero exit  status
                        ### --hwn
 
+                       
                        # TODO: friendly message about LilyPond setup/failing?
                        #
                        targets = []
@@ -878,6 +960,15 @@ if 1:
                                   resolution = preview_resolution
                                   )
 
+       # add DEP to targets?
+       if track_dependencies_p:
+               depfile = os.path.join (outdir, outbase + '.dep')
+               generate_dependency_file (depfile, depfile)
+               if os.path.isfile (depfile):
+                       ly.progress (_ ("dependencies output to `%s'...") %
+                                    depfile)
+                       ly.progress ('\n')
+
        if pseudo_filter_p:
                main_target = 0
                for i in 'PDF', 'PS', 'PNG', 'DVI', 'LATEX':
index e6e1050bafdcc5bbcbee39cecaad14af6e4404ee..195b6330077856972c4c12a57a0bacf6ac918039 100644 (file)
@@ -1290,7 +1290,7 @@ if not files:
        files = ['-']
        
 for f in files:
-       h = None
+
        if f == '-':
                h = sys.stdin
        elif f and not os.path.isfile (f):
diff --git a/scripts/old-lilypond-book.py b/scripts/old-lilypond-book.py
new file mode 100644 (file)
index 0000000..2ce5834
--- /dev/null
@@ -0,0 +1,1656 @@
+#!@PYTHON@
+# vim: set noexpandtab:
+
+"""
+
+  TODO:
+  * junk --outdir for--output
+  * Figure out clean set of options.
+  *
+  * texinfo: add support for @pagesize
+
+  todo: dimension handling (all the x2y) is clumsy. (tca: Thats
+        because the values are taken directly from texinfo.tex,
+        geometry.sty and article.cls. Give me a hint, and I'll
+        fix it.)
+
+
+  TODO: magnification support should also work for texinfo -> html: eg. add as option to dvips.
+
+
+
+  This is a slightly hairy program. The general approach is as follows 
+  The input string is chopped up in chunks, i.e. ,  a list of tuples
+
+    with the format  (TAG_STR, MAIN_STR, OPTIONS, TODO, BASE)
+
+  This list is built step by step: first ignore and verbatim commands
+  are handled, delivering a list of chunks.
+  
+  then all chunks containing lilypond commands are chopped up
+
+  when all chunks have their final form, all bodies from lilypond blocks are 
+  extracted, and if applicable, written do disk and run through lilypond.
+  
+
+tags supported
+
+  ignore
+  lilypond
+  input
+  verb
+  verbatim
+  multicols
+  numcols
+  
+
+
+
+"""
+
+#  This is was the idea for handling of comments:
+#      Multiline comments, @ignore .. @end ignore is scanned for
+#      in read_doc_file, and the chunks are marked as 'ignore', so
+#      lilypond-book will not touch them any more. The content of the
+#      chunks are written to the output file. Also 'include' and 'input'
+#      regex has to check if they are commented out.
+#
+
+#      Then it is scanned for 'lilypond', 'lilypond-file' and 'lilypond-block'.
+#      These three regex's has to check if they are on a commented line,
+#      % for latex, @c for texinfo.
+#
+#      Then lines that are commented out with % (latex) and @c (Texinfo)
+#      are put into chunks marked 'ignore'. This cannot be done before
+#      searching for the lilypond-blocks because % is also the comment character
+#      for lilypond.
+#
+#      The the rest of the rexeces are searched for. They don't have to test
+#      if they are on a commented out line.
+
+import glob
+import stat
+import string
+
+
+################################################################
+# Users of python modules should include this snippet
+# and customize variables below.
+
+# We'll suffer this path init stuff as long as we don't install our
+# python packages in <prefix>/lib/pythonx.y (and don't kludge around
+# it as we do with teTeX on Red Hat Linux: set some environment var
+# (PYTHONPATH) in profile)
+
+# If set, LILYPONDPREFIX must take prevalence
+# if datadir is not set, we're doing a build and LILYPONDPREFIX
+import getopt, os, sys
+datadir = '@local_lilypond_datadir@'
+if not os.path.isdir (datadir):
+       datadir = '@lilypond_datadir@'
+if os.environ.has_key ('LILYPONDPREFIX') :
+       datadir = os.environ['LILYPONDPREFIX']
+       while datadir[-1] == os.sep:
+               datadir= datadir[:-1]
+
+sys.path.insert (0, os.path.join (datadir, 'python'))
+
+# Customize these
+#if __name__ == '__main__':
+
+import lilylib as ly
+global _;_=ly._
+global re;re = ly.re
+
+# lilylib globals
+program_version = '@TOPLEVEL_VERSION@'
+program_name = 'lilypond-book'
+verbose_p = 0
+pseudo_filter_p = 0
+original_dir = os.getcwd ()
+
+
+preview_resolution = 90
+
+## FIXME
+## do -P or -p by default?
+##help_summary = _ ("Run LilyPond using LaTeX for titling")
+help_summary = _ ("Process LilyPond snippets in hybrid HTML, LaTeX or texinfo document")
+copyright = ('Tom Cato Amundsen <tca@gnu.org>',
+            'Han-Wen Nienhuys <hanwen@cs.uu.nl>')
+
+option_definitions = [
+       (_ ("EXT"), 'f', 'format', _ ("use output format EXT (texi [default], texi-html, latex, html)")),
+       (_ ("DIM"),  '', 'default-music-fontsize', _ ("default fontsize for music.  DIM is assumed to be in points")),
+       (_ ("DIM"),  '', 'default-lilypond-fontsize', _ ("deprecated, use --default-music-fontsize")),
+       (_ ("OPT"), '', 'extra-options', _ ("pass OPT quoted to the lilypond command line")),
+       (_ ("DIM"), '', 'force-music-fontsize', _ ("force fontsize for all inline lilypond. DIM is assumed to be in points")),
+       (_ ("DIM"), '', 'force-lilypond-fontsize', _ ("deprecated, use --force-music-fontsize")),
+       ('', 'h', 'help', _ ("print this help")),
+       (_ ("DIR"), 'I', 'include', _ ("include path")),
+       ('', 'M', 'dependencies', _ ("write dependencies")),
+       (_ ("PREF"), '',  'dep-prefix', _ ("prepend PREF before each -M dependency")),
+       ('', 'n', 'no-lily', _ ("don't run lilypond")),
+       ('', '', 'no-pictures', _ ("don't generate pictures")),
+       ('', '', 'no-music', _ ("strip all lilypond blocks from output")),
+       (_ ("FILE"), 'o', 'outname', _ ("filename main output file")),
+       (_ ("FILE"), '', 'outdir', _ ("where to place generated files")),
+       (_ ('RES'), '', 'preview-resolution',
+        _ ("set the resolution of the preview to RES")),
+       ('', 'V', 'verbose', _ ("be verbose")),
+       ('', 'v', 'version', _ ("print version information")),
+       ('', 'w', 'warranty', _ ("show warranty and copyright")),
+       ]
+
+# format specific strings, ie. regex-es for input, and % strings for output
+
+# global variables
+
+include_path = [os.getcwd ()]
+
+#lilypond_binary = 'valgrind --suppressions=/home/hanwen/usr/src/guile-1.6.supp  --num-callers=10 /home/hanwen/usr/src/lilypond/lily/out/lilypond'
+
+lilypond_binary = os.path.join ('@bindir@', 'lilypond-bin')
+
+# only use installed binary  when we're installed too.
+if '@bindir@' == ('@' + 'bindir@') or not os.path.exists (lilypond_binary):
+       lilypond_binary = 'lilypond-bin'
+
+
+
+ly2dvi_binary = os.path.join ('@bindir@', 'ly2dvi')
+
+# only use installed binary  when we're installed too.
+if '@bindir@' == ('@' + 'bindir@') or not os.path.exists (lilypond_binary):
+       ly2dvi_binary = 'ly2dvi'
+
+
+
+g_extra_opts = ''
+g_here_dir = os.getcwd ()
+g_dep_prefix = ''
+g_outdir = ''
+g_force_music_fontsize = 0
+g_do_pictures = 1
+g_do_music = 1
+g_make_html = 0
+
+format = ''
+g_run_lilypond = 1
+no_match = 'a\ba'
+
+default_music_fontsize = 16
+default_text_fontsize = 12
+paperguru = None
+
+################################################################
+# Dimension handling for LaTeX.
+# 
+class LatexPaper:
+       def __init__ (self):
+               self.m_document_preamble = []
+               self.m_num_cols = 1
+               self.m_multicols = 1
+
+       def find_latex_dims (self):
+               if g_outdir:
+                       fname = os.path.join (g_outdir, "lily-tmp.tex")
+               else:
+                       fname = "lily-tmp.tex"
+               try:
+                       f = open (fname, "w")
+               except IOError:
+                       error ("Error creating temporary file '%s'" % fname)
+
+               for s in self.m_document_preamble:
+                       f.write (s)
+               f.write (r"""
+\begin{document}
+\typeout{---}
+\typeout{\columnsep \the\columnsep}
+\typeout{\textwidth \the\textwidth}
+\typeout{---}
+\end{document}
+               """)
+               f.close ()
+               re_dim = re.compile (r"\\(\w+)\s+(\d+\.\d+)")
+
+               cmd = "latex '\\nonstopmode \input %s'" % fname
+               # Ugh.  (La)TeX writes progress and error messages on stdout
+               # Redirect to stderr
+               cmd = '(( %s  >&2 ) >&- )' % cmd
+               status = ly.system (cmd, ignore_error = 1)
+               signal = 0xf & status
+               exit_status = status >> 8
+               
+               if status:
+                       ly.error (_ ("LaTeX failed."))
+                       ly.error (_ ("The error log is as follows:"))
+                       
+                       #URG see lilypond
+                       try:
+                               lns = open ('lily-tmp.log').readlines ()
+                       except:
+                               lns = ''
+                       countdown = -3
+                       for ln in lns:
+                               sys.stderr.write (ln)
+                               if re.match ('^!', ln):
+                                       countdown = 3
+
+                               if countdown == 0:
+                                       break
+
+                               if countdown > 0:
+                                       countdown = countdown -1
+
+                       sys.stderr.write ("  ... (further messages elided)...\n")
+                       sys.exit (1)
+
+               lns = open ('lily-tmp.log').readlines ()
+               for ln in lns:
+                       ln = string.strip (ln)
+                       m = re_dim.match (ln)
+                       if m:
+                               if m.groups ()[0] in ('textwidth', 'columnsep'):
+                                       self.__dict__['m_%s' % m.groups ()[0]] = float (m.groups ()[1])
+
+               try:
+                       os.remove (fname)
+                       os.remove (os.path.splitext (fname)[0]+".aux")
+                       os.remove (os.path.splitext (fname)[0]+".log")
+               except:
+                       pass
+
+               if not self.__dict__.has_key ('m_textwidth'):
+                       raise 'foo!'
+
+       def get_linewidth (self):
+               if self.m_num_cols == 1:
+                       w = self.m_textwidth
+               else:
+                       w = (self.m_textwidth - self.m_columnsep)/2
+               if self.m_multicols > 1:
+                       return (w - self.m_columnsep* (self.m_multicols-1)) \
+                          / self.m_multicols
+               return w
+
+
+class HtmlPaper:
+       def __init__ (self):
+               self.m_papersize = 'letterpaper'
+               self.m_fontsize = 12
+       def get_linewidth (self):
+               return html_linewidths[self.m_papersize][self.m_fontsize]
+
+class TexiPaper:
+       def __init__ (self):
+               self.m_papersize = 'letterpaper'
+               self.m_fontsize = 12
+       def get_linewidth (self):
+               return texi_linewidths[self.m_papersize][self.m_fontsize]
+
+def mm2pt (x):
+       return x * 2.8452756
+def in2pt (x):
+       return x * 72.26999
+def em2pt (x, fontsize = 10):
+       return {10: 10.00002, 11: 10.8448, 12: 11.74988}[fontsize] * x
+def ex2pt (x, fontsize = 10):
+       return {10: 4.30554, 11: 4.7146, 12: 5.16667}[fontsize] * x
+
+def pt2pt (x):
+       return x
+
+dimension_conversion_dict ={
+       'mm': mm2pt,
+       'cm': lambda x: mm2pt (10*x),
+       'in': in2pt,
+       'em': em2pt,
+       'ex': ex2pt,
+       'pt': pt2pt
+       }
+
+# Convert numeric values, with or without specific dimension, to floats.
+# Keep other strings
+def conv_dimen_to_float (value):
+       if type (value) == type (""):
+               m = re.match ("([0-9.]+)(cm|in|pt|mm|em|ex)",value)
+               if m:
+                       unit = m.group (2)
+                       num = string.atof (m.group (1))
+                       conv =  dimension_conversion_dict[m.group (2)]
+
+                       value = conv (num)
+
+               elif re.match ("^[0-9.]+$",value):
+                       value = float (value)
+
+       return value
+
+texi_linewidths = {
+       'afourpaper': {12: mm2pt (160)},
+       'afourwide': {12: in2pt (6.5)},
+       'afourlatex': {12: mm2pt (150)},
+       'smallbook': {12: in2pt (5)},
+       'letterpaper': {12: in2pt (6)}}
+
+html_linewidths = {
+       'afourpaper': {12: mm2pt (160)},
+       'afourwide': {12: in2pt (6.5)},
+       'afourlatex': {12: mm2pt (150)},
+       'smallbook': {12: in2pt (5)},
+       'letterpaper': {12: in2pt (6)}}
+
+
+################################################################
+# How to output various structures. 
+output_dict= {
+
+
+       'html' : {
+
+               'output-filename' : r'''
+<!-- %s >
+<a href="%s">
+<pre>%s</pre></a>:''',
+               'output-lilypond-fragment': '''<lilypond%s>
+\context Staff\context Voice{ %s }
+</lilypond>''',
+               'output-noinline': r'''
+<!-- generated: %(fn)s.png !-->
+''',
+               ## maybe <hr> ?
+               'pagebreak': None,
+               # Verbatim text is always finished with \n.  FIXME: For HTML,
+               # this newline should be removed.
+               'output-verbatim': r'''<pre>
+%s</pre>''',
+               # Verbatim text is always finished with \n.  FIXME: For HTML,
+               # this newline should be removed.
+               'output-small-verbatim': r'''<font size=-1><pre>
+%s</pre></font>''',
+               ## Ugh we need to differentiate on origin:
+               ## lilypond-block origin wants an extra <p>, but
+               ## inline music doesn't.
+               ## possibly other center options?
+               'output-html': r'''
+%(htmlimages)s''',
+               },
+
+
+       'latex': {
+
+               'output-lilypond-fragment' : r'''\begin[singleline,%s]{lilypond}
+    \context Voice{
+      %s
+    }
+\end{lilypond}''',
+               'output-filename' : r'''\verb+%s+:\\
+%% %s
+%% %s
+''',
+
+               # verbatim text is always finished with \n
+               'output-verbatim': r'''\begin{verbatim}
+%s\end{verbatim}
+''',
+               # verbatim text is always finished with \n
+               'output-small-verbatim': r'''{\small\begin{verbatim}
+%s\end{verbatim}}
+''',
+               'output-default-post': "\\def\postLilyPondExample{}\n",
+               'output-default-pre': "\\def\preLilyPondExample{}\n",
+               'usepackage-graphics': '\\usepackage{graphics}\n',
+               'output-eps': '\\noindent\includegraphics{%(fn)s}', 
+               'output-noinline': r'''
+%% generated: %(fn)s.eps
+''',
+               'output-latex-quoted': r'''{\preLilyPondExample
+\def\lilypondbook{}
+\input %(fn)s.tex
+\postLilyPondExample}''',
+               'output-latex-noquote': r'''{\parindent 0pt
+\preLilyPondExample
+\def\lilypondbook{}
+\input %(fn)s.tex
+\postLilyPondExample}''',
+               'pagebreak': r'\pagebreak',
+               },
+
+
+       'texi' : {
+
+
+               'output-filename' : r'''
+@ifnothtml
+@file{%s}:@*
+@end ifnothtml
+@ifhtml
+@uref{%s,@file{%s}}
+@end ifhtml
+''',
+               'output-lilypond-fragment': '''@lilypond[%s]
+\context Staff\context Voice{ %s }
+@end lilypond ''',
+               'output-noinline': r'''
+@c generated: %(fn)s.png
+''',
+               'pagebreak': None,
+               # verbatim text is always finished with \n
+               'output-small-verbatim': r'''@smallexample
+%s@end smallexample
+''',
+               # verbatim text is always finished with \n
+               'output-verbatim': r'''@example
+%s@end example
+''',
+               # do some tweaking: @ is needed in some ps stuff.
+               #
+               # ugh, the <p> below breaks inline images...
+               'output-texi-noquote': r'''@tex
+\catcode`\@=12
+\parindent 0pt
+\def\lilypondbook{}
+\input %(fn)s.tex
+\catcode`\@=0
+@end tex
+@html
+<p>%(htmlimages)s
+<p>
+@end html
+''',
+               'output-texi-quoted': r'''@quotation
+@tex
+\catcode`\@=12
+\def\lilypondbook{}
+\input %(fn)s.tex
+\catcode`\@=0
+@end tex
+@html
+<p>%(htmlimages)s
+<p>
+@end html
+@end quotation
+''',
+               }
+
+       }
+
+def output_verbatim (body, small):
+       global format
+       if format == 'html':
+               body = re.sub ('&', '&amp;', body)
+               body = re.sub ('>', '&gt;', body)
+               body = re.sub ('<', '&lt;', body)
+       elif format == 'texi':
+               # clumsy workaround for python 2.2 pre bug.
+               body = re.sub ('@', '@@', body)
+               body = re.sub ('{', '@{', body)
+               body = re.sub ('}', '@}', body)
+
+       if small:
+               key = 'output-small-verbatim'
+       else:
+               key = 'output-verbatim'
+       return get_output (key) % body
+
+
+################################################################
+# Recognize special sequences in the input 
+
+
+# Warning: This uses extended regular expressions.  Tread with care.
+#
+# legenda
+#
+# (?P<name>regex) -- assign result of REGEX to NAME
+# *? -- match non-greedily.
+# (?m) -- multiline regex: make ^ and $ match at each line
+# (?s) -- make the dot match all characters including newline
+re_dict = {
+       'html': {
+               'include':  no_match,
+               'input': no_match,
+               'header': no_match,
+               'preamble-end': no_match,
+               'landscape': no_match,
+               'verbatim': r'''(?s)(?P<code><pre>\s.*?</pre>\s)''',
+               'verb': r'''(?P<code><pre>.*?</pre>)''',
+               'lilypond-file': r'(?m)(?P<match><lilypondfile(?P<options>[^>]+)?>\s*(?P<filename>[^<]+)\s*</lilypondfile>)',
+               'lilypond' : '(?m)(?P<match><lilypond((?P<options>[^:]*):)(?P<code>.*?)/>)',
+               'lilypond-block': r'''(?ms)(?P<match><lilypond(?P<options>[^>]+)?>(?P<code>.*?)</lilypond>)''',
+               'option-sep' : '\s*',
+               'intertext': r',?\s*intertext=\".*?\"',
+               'multiline-comment': r"(?sm)\s*(?!@c\s+)(?P<code><!--\s.*?!-->)\s",
+               'singleline-comment': no_match,
+               'numcols': no_match,
+               'multicols': no_match,
+               'ly2dvi': r'(?m)(?P<match><ly2dvifile(?P<options>[^>]+)?>\s*(?P<filename>[^<]+)\s*</ly2dvifile>)',
+               },
+
+       'latex': {
+               'input': r'(?m)^[^%\n]*?(?P<match>\\mbinput{?([^}\t \n}]*))',
+               'include': r'(?m)^[^%\n]*?(?P<match>\\mbinclude{(?P<filename>[^}]+)})',
+               'option-sep' : ',\s*',
+               'header': r"\n*\\documentclass\s*(\[.*?\])?",
+               'preamble-end': r'(?P<code>\\begin\s*{document})',
+               'verbatim': r"(?s)(?P<code>\\begin\s*{verbatim}.*?\\end{verbatim})",
+               'verb': r"(?P<code>\\verb(?P<del>.).*?(?P=del))",
+               'lilypond-file': r'(?m)^[^%\n]*?(?P<match>\\lilypondfile\s*(\[(?P<options>.*?)\])?\s*\{(?P<filename>.+)})',
+               'lilypond' : r'(?m)^[^%\n]*?(?P<match>\\lilypond\s*(\[(?P<options>.*?)\])?\s*{(?P<code>.*?)})',
+               'lilypond-block': r"(?sm)^[^%\n]*?(?P<match>\\begin\s*(\[(?P<options>.*?)\])?\s*{lilypond}(?P<code>.*?)\\end{lilypond})",
+               'def-post-re': r"\\def\\postLilyPondExample",
+               'def-pre-re': r"\\def\\preLilyPondExample",
+               'usepackage-graphics': r"\usepackage\s*{graphics}",
+               'intertext': r',?\s*intertext=\".*?\"',
+               'multiline-comment': no_match,
+               'singleline-comment': r"(?m)^.*?(?P<match>(?P<code>^%.*$\n+))",
+               'numcols': r"(?P<code>\\(?P<num>one|two)column)",
+               'multicols': r"(?P<code>\\(?P<be>begin|end)\s*{multicols}({(?P<num>\d+)?})?)",
+               'ly2dvi': no_match,
+
+               },
+
+       # why do we have distinction between @mbinclude and @include?
+
+       'texi': {
+               'include':  '(?m)^[^%\n]*?(?P<match>@mbinclude\s+(?P<filename>\S*))',
+               'input': no_match,
+               'header': no_match,
+               'preamble-end': no_match,
+               'landscape': no_match,
+               'verbatim': r'''(?s)(?P<code>@example\s.*?@end example\s)''',
+               'verb': r'''(?P<code>@code{.*?})''',
+               'lilypond-file': '(?m)^(?P<match>@lilypondfile(\[(?P<options>[^]]*)\])?{(?P<filename>[^}]+)})',
+               'lilypond' : '(?m)^(?P<match>@lilypond(\[(?P<options>[^]]*)\])?{(?P<code>.*?)})',
+               'lilypond-block': r'''(?ms)^(?P<match>@lilypond(\[(?P<options>[^]]*)\])?\s(?P<code>.*?)@end lilypond)\s''',
+               'option-sep' : ',\s*',
+               'intertext': r',?\s*intertext=\".*?\"',
+               'multiline-comment': r"(?sm)^\s*(?!@c\s+)(?P<code>@ignore\s.*?@end ignore)\s",
+               'singleline-comment': r"(?m)^.*?(?P<match>(?P<code>@c.*$\n+))",
+               'numcols': no_match,
+               'multicols': no_match,
+               'ly2dvi': no_match,
+               }
+       }
+
+
+for r in re_dict.keys ():
+       olddict = re_dict[r]
+       newdict = {}
+       for k in olddict.keys ():
+               try:
+                       newdict[k] = re.compile (olddict[k])
+               except:
+                       print 'invalid regexp: %s' % olddict[k]
+
+                       ## we'd like to catch and reraise a more
+                       ## detailed error, but alas, the exceptions
+                       ## changed across the 1.5/2.1 boundary.
+
+                       raise "Invalid re"
+       re_dict[r] = newdict
+
+
+def uniq (list):
+       list.sort ()
+       s = list
+       list = []
+       for x in s:
+               if x not in list:
+                       list.append (x)
+       return list
+
+
+def get_output (name):
+       return  output_dict[format][name]
+
+def get_re (name):
+       return  re_dict[format][name]
+
+def bounding_box_dimensions (fname):
+       if g_outdir:
+               fname = os.path.join (g_outdir, fname)
+       try:
+               fd = open (fname)
+       except IOError:
+               error ("Error opening `%s'" % fname)
+       str = fd.read ()
+       s = re.search ('%%BoundingBox: ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)', str)
+       if s:
+
+               gs = map (lambda x: string.atoi (x), s.groups ())
+               return (int (gs[2] - gs[0] + 0.5),
+                       int (gs[3] - gs[1] + 0.5))
+       else:
+               return (0,0)
+
+def error (str):
+       sys.stderr.write ("\n\n" + str + "\nExiting ... \n\n")
+       raise 'Exiting.'
+
+
+def compose_full_body (body, opts):
+       '''Construct the lilypond code to send to LilyPond.
+       Add stuff to BODY using OPTS as options.'''
+       music_size = default_music_fontsize
+       if g_force_music_fontsize:
+               music_size = g_force_music_fontsize
+       indent = ''
+       linewidth = ''
+       notime = ''
+       for o in opts:
+               if not g_force_music_fontsize:
+                       m = re.match ('([0-9]+)pt', o)
+                       if m:
+                               music_size = string.atoi (m.group (1))
+
+               m = re.match ('indent=([-.0-9]+)(cm|in|mm|pt)', o)
+               if m:
+                       f = float (m.group (1))
+                       indent = 'indent = %f\\%s' % (f, m.group (2))
+
+               m = re.match ('linewidth=([-.0-9]+)(cm|in|mm|pt)', o)
+               if m:
+                       f = float (m.group (1))
+                       linewidth = 'linewidth = %f\\%s' % (f, m.group (2))
+
+       if re.search ('\\\\score', body):
+               is_fragment = 0
+       else:
+               is_fragment = 1
+       if 'fragment' in opts:
+               is_fragment = 1
+       if 'nofragment' in opts:
+               is_fragment = 0
+
+       if is_fragment and not 'multiline' in opts:
+               opts.append ('singleline')
+
+       if 'raggedright' in opts or  'singleline' in opts:
+               if not linewidth:
+                       linewidth = 'raggedright = ##t'
+               if not indent:
+                       indent = 'indent = 0.0\mm'
+       elif not linewidth:
+               global paperguru
+               l = paperguru.get_linewidth ()
+               linewidth = 'linewidth = %f\pt' % l
+
+       if 'noindent' in opts:
+               indent = 'indent = 0.0\mm'
+
+       if 'notime' in opts:
+               notime = r'''
+\translator {
+  \StaffContext
+  \remove Time_signature_engraver
+}
+'''
+
+       orig_name = ''
+       for o in opts:
+               m= re.search ('relative(.*)', o)
+               v = 0
+               if m:
+                       try:
+                               v = string.atoi (m.group (1))
+                       except ValueError:
+                               pass
+
+                       v = v + 1
+                       pitch = 'c'
+                       if v < 0:
+                               pitch = pitch + '\,' * v
+                       elif v > 0:
+                               pitch = pitch + '\'' * v
+
+                       body = '\\relative %s { %s }' % (pitch, body)
+               m =re.search ("filename=(.*)", o)
+               if m:
+                       orig_name = m.group (1)
+               
+       if is_fragment:
+               body = r'''
+\score {
+  \notes {
+%s
+  }
+}
+''' % body
+
+       opts = uniq (opts)
+       optstring = string.join (opts, ' ')
+       optstring = re.sub ('\n', ' ', optstring)
+       body = r'''
+%% Generated automatically by: lilypond-book.py
+%% options are %s
+#(set-global-staff-size %d)
+
+\paper  {
+  %s
+  %s
+  %s
+}
+''' % (optstring, music_size, linewidth, indent, notime) + body
+
+       if orig_name:
+               body = '\\renameinput \"%s\"\n%s' % (orig_name, body)
+       
+
+       # ughUGH not original options
+       return body
+
+def scan_html_preamble (chunks):
+       return
+
+def scan_latex_preamble (chunks):
+       # First we want to scan the \documentclass line
+       # it should be the first non-comment line.
+       # The only thing we really need to know about the \documentclass line
+       # is if there are one or two columns to begin with.
+       idx = 0
+       while 1:
+               if chunks[idx][0] == 'ignore':
+                       idx = idx + 1
+                       continue
+               m = get_re ('header').match (chunks[idx][1])
+               if not m:
+                       error ("Latex documents must start with a \documentclass command")
+               if m.group (1):
+                       options = re.split (r',\s*', m.group (1)[1:-1])
+               else:
+                       options = []
+               if 'twocolumn' in options:
+                       paperguru.m_num_cols = 2
+               break
+
+
+       # Then we add everything before \begin{document} to
+       # paperguru.m_document_preamble so that we can later write this header
+       # to a temporary file in find_latex_dims() to find textwidth.
+       while idx < len (chunks) and chunks[idx][0] != 'preamble-end':
+               if chunks[idx] == 'ignore':
+                       idx = idx + 1
+                       continue
+               paperguru.m_document_preamble.append (chunks[idx][1])
+               idx = idx + 1
+
+       if len (chunks) == idx:
+               error ("Didn't find end of preamble (\\begin{document})")
+
+       paperguru.find_latex_dims ()
+
+def scan_texi_preamble (chunks):
+       # this is not bulletproof..., it checks the first 10 chunks
+       for c in chunks[:10]:
+               if c[0] == 'input':
+                       for s in ('afourpaper', 'afourwide', 'letterpaper',
+                                 'afourlatex', 'smallbook'):
+                               if string.find (c[1], "@%s" % s) != -1:
+                                       paperguru.m_papersize = s
+
+
+def scan_preamble (chunks):
+       global format
+       if format == 'html':
+               scan_html_preamble (chunks)
+       elif format == 'latex':
+               scan_latex_preamble (chunks)
+       elif format == 'texi':
+               scan_texi_preamble (chunks)
+
+
+def completize_preamble (chunks):
+       global format
+       if format != 'latex':
+               return chunks
+       pre_b = post_b = graphics_b = None
+       for chunk in chunks:
+               if chunk[0] == 'preamble-end':
+                       break
+               if chunk[0] == 'input':
+                       m = get_re ('def-pre-re').search (chunk[1])
+                       if m:
+                               pre_b = 1
+               if chunk[0] == 'input':
+                       m = get_re ('def-post-re').search (chunk[1])
+                       if m:
+                               post_b = 1
+
+               if chunk[0] == 'input':
+                       m = get_re ('usepackage-graphics').search (chunk[1])
+                       if m:
+                               graphics_b = 1
+       x = 0
+       while x < len (chunks) and   chunks[x][0] != 'preamble-end':
+               x = x + 1
+
+       if x == len (chunks):
+               return chunks
+
+       if not pre_b:
+               chunks.insert (x, ('input', get_output ('output-default-pre')))
+       if not post_b:
+               chunks.insert (x, ('input', get_output ('output-default-post')))
+       if not graphics_b:
+               chunks.insert (x, ('input', get_output ('usepackage-graphics')))
+
+       return chunks
+
+
+read_files = []
+def find_file (name):
+       '''
+       Search the include path for NAME. If found, return the (CONTENTS, PATH) of the file.
+       '''
+
+       if name == '-':
+               return (sys.stdin.read (), '<stdin>')
+       f = None
+       nm = ''
+       for a in include_path:
+               try:
+                       nm = os.path.join (a, name)
+                       f = open (nm)
+                       global read_files
+                       read_files.append (nm)
+                       break
+               except IOError:
+                       pass
+       if f:
+               sys.stderr.write ("Reading `%s'\n" % nm)
+               return (f.read (), nm)
+       else:
+               error ("File not found `%s'\n" % name)
+               return ('', '')
+
+def do_ignore (match_object):
+       return [('ignore', match_object.group ('code'))]
+def do_preamble_end (match_object):
+       return [('preamble-end', match_object.group ('code'))]
+
+def make_verbatim (match_object):
+       return [('verbatim', match_object.group ('code'))]
+
+def make_verb (match_object):
+       return [('verb', match_object.group ('code'))]
+
+def do_include_file (m):
+       "m: MatchObject"
+       return [('input', get_output ('pagebreak'))] \
+            + read_doc_file (m.group ('filename')) \
+            + [('input', get_output ('pagebreak'))]
+
+def do_input_file (m):
+       return read_doc_file (m.group ('filename'))
+
+def make_lilypond (m):
+       if m.group ('options'):
+               options = m.group ('options')
+       else:
+               options = ''
+       return [('input', get_output ('output-lilypond-fragment') %
+                       (options, m.group ('code')))]
+
+def make_lilypond_file (m):
+       '''
+
+       Find @lilypondfile{bla.ly} occurences and substitute bla.ly
+       into a @lilypond .. @end lilypond block.
+
+       '''
+
+       if m.group ('options'):
+               options = get_re ('option-sep').split (m.group ('options'))
+       else:
+               options = []
+       (content, nm) = find_file (m.group ('filename'))
+       options.append ("filename=%s" % nm)
+       (path, base) = os.path.split (nm)
+       
+       if path not in include_path:
+               include_path.append (path)
+
+       return [('lilypond', content, options)]
+       
+
+def make_ly2dvi_block (m):
+       '''
+
+       Find <ly2dvifile .. >
+       '''
+
+       return [('ly2dvi', m.group ('filename'), m.group ('options'))]
+
+
+def make_lilypond_block (m):
+       if not g_do_music:
+               return []
+
+       if m.group ('options'):
+               options = get_re ('option-sep').split (m.group ('options'))
+       else:
+               options = []
+       options = filter (lambda s: s != '', options)
+       return [('lilypond', m.group ('code'), options)]
+
+
+def do_columns (m):
+       global format
+       if format != 'latex':
+               return []
+       if m.group ('num') == 'one':
+               return [('numcols', m.group ('code'), 1)]
+       if m.group ('num') == 'two':
+               return [('numcols', m.group ('code'), 2)]
+
+def do_multicols (m):
+       global format
+       if format != 'latex':
+               return []
+       if m.group ('be') == 'begin':
+               return [('multicols', m.group ('code'), int (m.group ('num')))]
+       else:
+               return [('multicols', m.group ('code'), 1)]
+       return []
+
+def chop_chunks (chunks, re_name, func, use_match=0):
+       newchunks = []
+       for c in chunks:
+               if c[0] == 'input':
+                       str = c[1]
+                       while str:
+                               m = get_re (re_name).search (str)
+                               if m == None:
+                                       newchunks.append (('input', str))
+                                       str = ''
+                               else:
+                                       if use_match:
+                                               newchunks.append (('input', str[:m.start ('match')]))
+                                       else:
+                                               newchunks.append (('input', str[:m.start (0)]))
+                                       #newchunks.extend (func (m))
+                                       # python 1.5 compatible:
+                                       newchunks = newchunks + func (m)
+                                       str = str [m.end (0):]
+               else:
+                       newchunks.append (c)
+       return newchunks
+
+def determine_format (str):
+       """
+
+       SIDE EFFECT! This sets FORMAT and PAPERGURU
+
+       """
+       
+       global format
+       if format == '':
+               html = re.search ('(?i)<[dh]tml', str[:200])
+               latex = re.search (r'''\\document''', str[:200])
+               texi = re.search ('@node|@setfilename', str[:200])
+
+               f = ''
+               g = None
+
+               if html and not latex and not texi:
+                       f = 'html'
+               elif latex and not html and not texi:
+                       f = 'latex'
+               elif texi and not html and not latex:
+                       f = 'texi'
+               else:
+                       error ("can't determine format, please specify")
+               format = f
+
+       global paperguru
+       if paperguru == None:
+               if format == 'html':
+                       g = HtmlPaper ()
+               elif format == 'latex':
+                       g = LatexPaper ()
+               elif format == 'texi':
+                       g = TexiPaper ()
+
+               paperguru = g
+
+
+def read_doc_file (filename):
+       '''Read the input file, find verbatim chunks and do \input and \include
+       '''
+       (str, path) = find_file (filename)
+       determine_format (str)
+
+       chunks = [('input', str)]
+
+       # we have to check for verbatim before doing include,
+       # because we don't want to include files that are mentioned
+       # inside a verbatim environment
+       chunks = chop_chunks (chunks, 'verbatim', make_verbatim)
+
+       chunks = chop_chunks (chunks, 'verb', make_verb)
+       chunks = chop_chunks (chunks, 'multiline-comment', do_ignore)
+       #ugh fix input
+       chunks = chop_chunks (chunks, 'include', do_include_file, 1)
+       chunks = chop_chunks (chunks, 'input', do_input_file, 1)
+       return chunks
+
+
+taken_file_names = {}
+
+def unique_file_name (body):
+       return 'lily-' + `abs (hash (body))`
+
+def schedule_lilypond_block (chunk):
+       '''Take the body and options from CHUNK, figure out how the
+       real .ly should look.  The .ly is written, and scheduled in
+       TODO.
+
+       Return: a single chunk.
+
+       The chunk pertaining to the lilypond output
+       has the format (TYPE_STR, MAIN_STR, OPTIONS, TODO, BASE), 
+       where TODO has format [basename, extension, extension, ... ]
+       '''
+
+       (type, body, opts) = chunk
+       assert type == 'lilypond'
+       file_body = compose_full_body (body, opts)
+       ## Hmm, we should hash only lilypond source, and skip the
+       ## %options are ...
+       ## comment line
+       basename = unique_file_name (file_body)
+       for o in opts:
+               m = re.search ('filename="(.*?)"', o)
+               if m:
+                       basename = m.group (1)
+                       if not taken_file_names.has_key (basename):
+                               taken_file_names[basename] = 0
+                       else:
+                               taken_file_names[basename] = taken_file_names[basename] + 1
+                               basename = basename + "-t%i" % taken_file_names[basename]
+       update_file (file_body, os.path.join (g_outdir, basename) + '.ly')
+       needed_filetypes = ['tex']
+
+       if format == 'html' or g_make_html:
+               needed_filetypes.append ('eps')
+               needed_filetypes.append ('png')
+       if 'eps' in opts and not ('eps' in needed_filetypes):
+               needed_filetypes.append ('eps')
+
+       pathbase = os.path.join (g_outdir, basename)
+       def must_rebuild (base, ext1, ext2):
+               
+               f2 = base + ext2
+               f1 = base + ext1
+               fp2 = base + '-page1' + ext2
+
+               isfile2 = os.path.isfile (f2)
+               
+               if not isfile2 and os.path.isfile (fp2):
+                       f2  = fp2
+                       isfile2 = os.path.isfile (fp2)
+                       
+               if (os.path.isfile (f2) and isfile2 and
+                   os.stat (f1)[stat.ST_MTIME] >
+                   os.stat (f2)[stat.ST_MTIME]) or \
+                   not isfile2:
+               
+                       return 1
+               
+       todo = []
+       if 'tex' in needed_filetypes and must_rebuild (pathbase, '.ly', '.tex'):
+               todo.append ('tex')
+       if 'eps' in needed_filetypes and must_rebuild (pathbase, '.tex', '.eps'):
+               todo.append ('eps')
+       if 'png' in needed_filetypes and must_rebuild (pathbase, '.eps', '.png'):
+               todo.append ('png')
+
+       return ('lilypond', body, opts, todo, basename)
+
+def format_lilypond_block (chunk):
+       """
+       
+       Figure out  what should be left MAIN_STR (meant
+       for the main file) from a lilypond chunk: process
+       verbatim, and other options. Return: multiple chunks.
+
+       
+       """
+
+       
+       return_chunks = []
+
+       (type, body, opts, todo, basename) = chunk
+       assert type == 'lilypond'
+
+
+       newbody = ''
+       filename_chunk = None 
+       if 'printfilename' in opts:
+               for o in opts:
+                       m= re.match ("filename=(.*)", o)
+                       if m:
+                               template = get_output ("output-filename")
+                               b =  basename + '.ly'
+                               human_base = os.path.basename (m.group (1))
+                                                 
+                               ## todo: include path, but strip 
+                               ## first part of the path.
+                               filename_chunk = ('input',  template % (human_base, b,human_base))
+                               break
+
+
+       if 'smallverbatim' in opts:
+               newbody += output_verbatim (body, 1)
+       elif 'verbatim' in opts:
+               newbody += output_verbatim (body, 0)
+
+       for o in opts:
+               m = re.search ('intertext="(.*?)"', o)
+               if m:
+                       newbody = newbody + "\n"
+                       if format == 'texi':
+                               newbody = newbody + "@noindent\n"
+                       elif format == 'latex':
+                               newbody = newbody + "\\noindent\n"
+                       newbody = newbody + m.group (1) + "\n"
+
+       if 'noinline' in opts:
+               s = 'output-noinline'
+       elif format == 'latex':
+               if 'quote' in opts:
+                       s = 'output-latex-quoted'
+               elif 'eps' in opts:
+                       s = 'output-eps'
+               else:
+                       s = 'output-latex-noquote'
+       elif format == 'texi':
+               if 'quote' in opts:
+                       s = 'output-texi-quoted'
+               else:
+                       s = 'output-texi-noquote'
+       else: # format == 'html'
+               s = 'output-html'
+
+       def html_pages (basename):
+               pat = os.path.join (g_outdir, "%s-page*.png"%  basename)
+               
+               files =  glob.glob (pat)
+               
+               
+               template = '''<img align="center" valign="center"
+               border="0" src="%s" alt="[picture of music]">'''
+
+               str = ''
+               if  files == []:
+                       files = [basename+'.png' ]
+               else:
+                       files = map (os.path.basename, files)
+                       
+               for f in  files:
+                       str += template % f
+
+               str = '<a href="%s.ly">%s</a>' % (basename, str)
+
+               return str
+
+       
+       newbody = newbody + get_output (s) % {'fn': basename,
+                                             'htmlimages': html_pages(basename)
+                                             }
+
+       if filename_chunk:
+               return_chunks += [filename_chunk]
+       
+       return_chunks += [('lilypond', newbody, opts, todo, basename)]
+       
+       return return_chunks
+
+def format_lilypond_output_bodies (chunks):
+       newchunks = []
+       for c in chunks:
+
+               if c[0] == 'lilypond':
+                       newchunks += format_lilypond_block (c)
+               else:
+                       newchunks.append (c)
+
+       return newchunks
+
+
+
+def process_lilypond_blocks (chunks):#ugh rename
+       newchunks = []
+       # Count sections/chapters.
+       for c in chunks:
+               if c[0] == 'lilypond':
+                       c = schedule_lilypond_block (c)
+               elif c[0] == 'numcols':
+                       paperguru.m_num_cols = c[2]
+               elif c[0] == 'multicols':
+                       paperguru.m_multicols = c[2]
+                       
+               newchunks.append (c)
+               
+       return newchunks
+
+def process_ly2dvi_blocks (chunks):
+       
+       def process_ly2dvi_block (chunk):
+               """
+
+Run ly2dvi script on filename specified in CHUNK.
+This is only supported for HTML output.
+
+In HTML output it will leave a download menu with ps/pdf/midi etc.  in
+a separate HTML file, and a title + preview in the main html file,
+linking to the menu.
+
+               """
+               (tag, name, opts) = chunk
+               assert format == 'html'
+               (content, original_name) = find_file (name)
+
+               original_name = os.path.basename (original_name)
+               
+               base = unique_file_name (content)
+               outname = base + '.ly'
+               changed = update_file (content, outname)
+
+               preview = base + ".preview.png"
+               preview_page = base + '-page1.png'
+               
+               if changed or not (os.path.isfile (preview) or
+                                  os.path.isfile (preview_page)):
+                       
+                       ly.system ('%s --preview --postscript --verbose %s ' % (ly2dvi_binary, base) ) 
+
+                       ly.make_ps_images (base + '.ps')
+                       ly.system ('gzip -9 - < %s.ps > %s.ps.gz' %  (base, base))
+                       
+               def size_str (fn):
+                       b = os.stat(fn)[stat.ST_SIZE]
+                       if b < 1024:
+                               return '%d bytes' % b
+                       elif b < (2 << 20):
+                               return '%d kb' % (b >> 10)
+                       else:
+                               return '%d mb' % (b >> 20)
+
+               exts = {
+                       'pdf' : "Print (PDF, %s)",
+                       'ps.gz' : "Print (gzipped PostScript, %s)",
+                       'png' : "View (PNG, %s)",
+                       'midi' : "Listen (MIDI, %s)",
+                       'ly' : "View source code (%s)", 
+                       }
+
+               menu = ''
+               page_files = glob.glob ('%s-page*.png' % base)
+
+               for p in page_files:
+                       p = p.strip()
+                       if os.path.isfile (p):
+                               sz = size_str (p)
+                               page = re.sub ('.*page([0-9])+.*', 'View page \\1 (PNG picture, %s)\n', p)
+                               page = page % sz
+                               menu += '<li><a href="%s">%s</a>' % (p, page) 
+
+               ext_order = ['ly', 'pdf', 'ps.gz', 'midi']
+               for e in ext_order:
+                       fn =   base +  '.' + e
+                       print 'checking,' , fn
+                       if not os.path.isfile (fn):
+                               continue
+
+                       entry = exts[e] % size_str (fn)
+
+                       ## TODO: do something like
+                       ## this for texinfo/latex as well ?
+                       
+                       menu += '<li><a href="%s">%s</a>\n\n' % (fn, entry)
+
+
+               explanatory_para = """The pictures are 90dpi
+anti-aliased snapshots of the printed output, in PNG format. Both  PDF and PS
+use scalable fonts and should look OK at any resolution."""
+               
+               separate_menu =r'''
+<title>LilyPond example %s</title>
+
+<h1>%s</h1>
+<p><img src="%s">
+<p>%s
+<p>
+<ul>%s</ul>''' % (original_name,original_name, preview, explanatory_para, menu)
+               
+               open (base + '.html','w'). write (separate_menu)
+
+               inline_menu = '<p/><a href="%s.html"><img alt="%s" src="%s"></a><p/>' % (base, original_name, preview)
+
+               return ('ly2dvi', inline_menu)
+
+       newchunks = []
+       for c in chunks:
+               if c[0] == 'ly2dvi':
+                       c = process_ly2dvi_block (c)
+               newchunks.append (c)
+
+       return newchunks
+
+def compile_all_files (chunks):
+       global foutn
+       eps = []
+       tex = []
+       png = []
+
+       for c in chunks:
+               if c[0] != 'lilypond':
+                       continue
+
+               base  = c[4]
+               exts = c[3]
+               for e in exts:
+                       if e == 'eps':
+                               eps.append (base)
+                       elif e == 'tex':
+                               #ugh
+                               if base + '.ly' not in tex:
+                                       tex.append (base + '.ly')
+                       elif e == 'png' and g_do_pictures:
+                               png.append (base)
+       d = os.getcwd ()
+       if g_outdir:
+               os.chdir (g_outdir)
+       if tex:
+               # fixme: be sys-independent.
+               def incl_opt (x):
+                       if g_outdir and x[0] != '/' :
+                               x = os.path.join (g_here_dir, x)
+                       return ' -I %s' % x
+
+               incs = map (incl_opt, include_path)
+               lilyopts = string.join (incs)
+               if do_deps:
+                       lilyopts += ' --dependencies'
+                       if g_outdir:
+                               lilyopts += ' --dep-prefix=' + g_outdir + '/'
+               lilyopts += ' --header=texidoc'
+               texfiles = string.join (tex)
+               cmd = string.join ((lilypond_binary, lilyopts, g_extra_opts,
+                                   texfiles))
+
+               ly.lilypond_version_check (lilypond_binary, '@TOPLEVEL_VERSION@')
+               
+               ly.system (cmd, ignore_error = 0, progress_p = 1)
+
+               #
+               # Ugh, fixing up dependencies for .tex generation
+               #
+               if do_deps:
+                       depfiles=map (lambda x: re.sub ('(.*)\.ly', '\\1.dep',
+                                                       x), tex)
+
+                       for i in depfiles:
+                               f =open (i)
+                               text=f.read ()
+                               f.close ()
+                               text=re.sub ('\n([^:\n]*):',
+                                            '\n' + foutn + ':', text)
+                               f = open (i, 'w')
+                               f.write (text)
+                               f.close ()
+
+       def to_eps (file):
+               cmd = r"latex '\nonstopmode \input %s'" % file
+               # Ugh.  (La)TeX writes progress and error messages on stdout
+               # Redirect to stderr
+               cmd = '(( %s  >&2 ) >&- )' % cmd
+               
+               ly.system (cmd)
+               ly.system ("dvips -Ppdf -u+lilypond.map -E -o %s.eps %s" % (file, file))
+       map (to_eps, eps)
+
+       for p in png:
+               ly.make_ps_images (p + '.eps', resolution=110)
+       os.chdir (d)
+
+
+def update_file (body, name):
+       '''
+       write the body if it has changed. Return whether BODY has changed.
+       '''
+       same = 0
+       try:
+               f = open (name)
+               fs = f.read (-1)
+               same = (fs == body)
+       except:
+               pass
+
+       if not same:
+               f = open (name , 'w')
+               f.write (body)
+               f.close ()
+
+       return not same
+
+
+def write_deps (fn, target, chunks):
+       global read_files
+       sys.stderr.write ('Writing `%s\'\n' % os.path.join (g_outdir, fn))
+       f = open (os.path.join (g_outdir, fn), 'w')
+       f.write ('%s%s: ' % (g_dep_prefix, target))
+       for d in read_files:
+               f.write ('%s ' %  d)
+
+
+       ## There used to be code to write .tex dependencies, but
+       ## that is silly: lilypond-book has its own dependency scheme
+       ## to ensure that all lily-XXX.tex files are there
+               
+
+       f.write ('\n')
+       f.close ()
+       read_files = []
+
+def check_texidoc (chunks):
+       ## TODO: put file name in front of texidoc. 
+       ##
+       n = []
+        for c in chunks:
+               if c[0] == 'lilypond':
+                       (type, body, opts, todo, basename) = c;
+                       pathbase = os.path.join (g_outdir, basename)
+                       if os.path.isfile (pathbase + '.texidoc') \
+                          and 'notexidoc' not in opts:
+                               n.append( ('input', '\n@include %s.texidoc\n\n' % basename))
+               n.append (c)
+       return n
+
+
+## what's this? Docme --hwn
+##
+def fix_epswidth (chunks):
+       newchunks = []
+       for c in chunks:
+               if c[0] != 'lilypond' or 'eps' not in c[2]:
+                       newchunks.append (c)
+                       continue
+
+               mag = 1.0
+               for o in c[2]:
+                       m  = re.match ('magnification=([0-9.]+)', o)
+                       if m:
+                               mag = string.atof (m.group (1))
+
+               def replace_eps_dim (match, lmag = mag):
+                       filename = match.group (1)
+                       dims = bounding_box_dimensions (filename)
+
+                       return '%fpt' % (dims[0] *lmag)
+
+               body = re.sub (r'''\\lilypondepswidth{(.*?)}''', replace_eps_dim, c[1])
+               newchunks.append (('lilypond', body, c[2], c[3], c[4]))
+
+       return newchunks
+
+
+##docme: why global?
+foutn=""
+
+def do_file (input_filename):
+       chunks = read_doc_file (input_filename)
+       chunks = chop_chunks (chunks, 'ly2dvi', make_ly2dvi_block, 1)
+       chunks = chop_chunks (chunks, 'lilypond', make_lilypond, 1)
+       chunks = chop_chunks (chunks, 'lilypond-file', make_lilypond_file, 1)
+       chunks = chop_chunks (chunks, 'lilypond-block', make_lilypond_block, 1)
+       chunks = chop_chunks (chunks, 'singleline-comment', do_ignore, 1)
+       chunks = chop_chunks (chunks, 'preamble-end', do_preamble_end)
+       chunks = chop_chunks (chunks, 'numcols', do_columns)
+       chunks = chop_chunks (chunks, 'multicols', do_multicols)
+       
+       scan_preamble (chunks)
+       chunks = process_lilypond_blocks (chunks)
+       chunks = process_ly2dvi_blocks (chunks)
+       
+       # Do It.
+       global g_run_lilypond
+       if g_run_lilypond:
+               compile_all_files (chunks)
+               chunks = fix_epswidth (chunks)
+
+
+       chunks = format_lilypond_output_bodies (chunks)
+       global format
+       if format == 'texi':
+               chunks = check_texidoc (chunks)
+
+
+       x = 0
+       chunks = completize_preamble (chunks)
+
+       global foutn
+
+       if outname:
+               my_outname = outname
+       elif input_filename == '-' or input_filename == "/dev/stdin":
+               my_outname = '-'
+       else:
+               my_outname = os.path.basename (os.path.splitext (input_filename)[0]) + '.' + format
+       my_depname = my_outname + '.dep'
+
+       if my_outname == '-' or my_outname == '/dev/stdout':
+               fout = sys.stdout
+               foutn = "<stdout>"
+               global do_deps
+               do_deps = 0
+       else:
+               foutn = os.path.join (g_outdir, my_outname)
+               sys.stderr.write ("Writing `%s'\n" % foutn)
+               fout = open (foutn, 'w')
+       for c in chunks:
+               fout.write (c[1])
+       fout.close ()
+       # should chmod -w
+
+       if do_deps:
+               write_deps (my_depname, foutn, chunks)
+
+outname = ''
+try:
+       (sh, long) = ly.getopt_args (option_definitions)
+       (options, files) = getopt.getopt (sys.argv[1:], sh, long)
+       
+except getopt.error, msg:
+       sys.stderr.write ('\n')
+       ly.error (_ ("getopt says: `%s\'" % s))
+       sys.stderr.write ('\n')
+       ly.help ()
+       ly.exit (2)
+
+do_deps = 0
+for opt in options:
+       o = opt[0]
+       a = opt[1]
+
+       if o == '--include' or o == '-I':
+               include_path.append (a)
+       elif o == '--version' or o == '-v':
+               ly.identify (sys.stdout)
+               sys.exit (0)
+       elif o == '--verbose' or o == '-V':
+               verbose_p = 1
+       elif o == '--format' or o == '-f':
+               format = a
+               if a == 'texi-html':
+                       format = 'texi'
+                       g_make_html = 1
+       elif o == '--outname' or o == '-o':
+               if len (files) > 1:
+                       #HACK
+                       sys.stderr.write ("lilypond-book is confused by --outname on multiple files")
+                       sys.exit (1)
+               outname = a
+       elif o == '--help' or o == '-h':
+               ly.help ()
+               sys.exit (0)
+       elif o == '--no-lily' or o == '-n':
+               g_run_lilypond = 0
+       elif o == '--preview-resolution':
+               preview_resolution = string.atoi (a)
+       elif o == '--dependencies' or o == '-M':
+               do_deps = 1
+       elif o == '--default-music-fontsize':
+               default_music_fontsize = string.atoi (a)
+       elif o == '--default-lilypond-fontsize':
+               print "--default-lilypond-fontsize is deprecated, use --default-music-fontsize"
+               default_music_fontsize = string.atoi (a)
+       elif o == '--extra-options':
+               g_extra_opts = a
+       elif o == '--force-music-fontsize':
+               g_force_music_fontsize = string.atoi (a)
+       elif o == '--force-lilypond-fontsize':
+               print "--force-lilypond-fontsize is deprecated, use --default-lilypond-fontsize"
+               g_force_music_fontsize = string.atoi (a)
+       elif o == '--dep-prefix':
+               g_dep_prefix = a
+       elif o == '--no-pictures':
+               g_do_pictures = 0
+       elif o == '--no-music':
+               g_do_music = 0
+       elif o == '--outdir':
+               g_outdir = a
+       elif o == '--warranty' or o == '-w':
+               #status = os.system ('lilypond -w')
+               if 1 or status:
+                       ly.warranty ()
+               sys.exit (0)
+
+ly.identify (sys.stderr)
+
+if g_outdir:
+       if os.path.isfile (g_outdir):
+               error ("outdir is a file: %s" % g_outdir)
+       if not os.path.exists (g_outdir):
+               os.mkdir (g_outdir)
+               
+if not files:
+       ly.help ()
+       ly.error (_ ("no files specified on command line"))
+       ly.exit (2)
+
+ly.setup_environment ()
+
+
+for input_filename in files:
+       do_file (input_filename)
+
+
+#
+# Petr, ik zou willen dat ik iets zinvoller deed,
+# maar wat ik kan ik doen, het verandert toch niets?
+#   --hwn 20/aug/99
index a592a8ab0d08cd772fcd7369a6b524c053ddbe71..e1d0b37af1be6b7ebeab8fcd6faf3265069d9285 100644 (file)
@@ -1014,91 +1014,3 @@ AC_DEFUN(STEPMAKE_WARN, [
 ])
 
 
-dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
-dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
-dnl also defines GSTUFF_PKG_ERRORS on error
-AC_DEFUN(PKG_CHECK_MODULES, [
-  succeeded=no
-
-  if test -z "$PKG_CONFIG"; then
-    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-  fi
-
-  if test "$PKG_CONFIG" = "no" ; then
-     echo "*** The pkg-config script could not be found. Make sure it is"
-     echo "*** in your path, or set the PKG_CONFIG environment variable"
-     echo "*** to the full path to pkg-config."
-     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
-  else
-     PKG_CONFIG_MIN_VERSION=0.9.0
-     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
-        AC_MSG_CHECKING(for $2)
-
-        if $PKG_CONFIG --exists "$2" ; then
-            AC_MSG_RESULT(yes)
-            succeeded=yes
-
-            AC_MSG_CHECKING($1_CFLAGS)
-            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
-            AC_MSG_RESULT($$1_CFLAGS)
-
-            AC_MSG_CHECKING($1_LIBS)
-            $1_LIBS=`$PKG_CONFIG --libs "$2"`
-            AC_MSG_RESULT($$1_LIBS)
-        else
-            $1_CFLAGS=""
-            $1_LIBS=""
-            ## If we have a custom action on failure, don't print errors, but 
-            ## do set a variable so people can do so.
-            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
-            ifelse([$4], ,echo $$1_PKG_ERRORS,)
-        fi
-
-        AC_SUBST($1_CFLAGS)
-        AC_SUBST($1_LIBS)
-     else
-        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
-        echo "*** See http://www.freedesktop.org/software/pkgconfig"
-     fi
-  fi
-
-  if test $succeeded = yes; then
-     ifelse([$3], , :, [$3])
-  else
-     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
-  fi
-])
-
-
-AC_DEFUN(STEPMAKE_FREETYPE2, [
-    PKG_CHECK_MODULES(FREETYPE2, freetype2 >= 0, have_freetype2=true, true)
-    if $have_freetype2 ; then
-       AC_DEFINE(HAVE_FREETYPE2)
-       AC_SUBST(FREETYPE2_CFLAGS)
-       AC_SUBST(FREETYPE2_LIBS)
-    fi
-])
-
-AC_DEFUN(STEPMAKE_GTK2, [
-    PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.4.0, have_gtk2=true, true)
-    if $have_gtk2 ; then
-       AC_DEFINE(HAVE_GTK2)
-       AC_SUBST(GTK2_CFLAGS)
-       AC_SUBST(GTK2_LIBS)
-    fi
-])
-
-AC_DEFUN(STEPMAKE_PANGO, [
-    PKG_CHECK_MODULES(PANGO, pango >= 1.5.0, have_pango_cvs=true, true)
-    if $have_pango_cvs ; then
-       AC_DEFINE(HAVE_PANGO_CVS)
-       PANGO_CFLAGS="$PANGO_CFLAGS $GTK2_CFLAGS"
-       PANGO_LIBS="$PANGO_LIBS $GTK2_LIBS"
-       CPPFLAGS="$PANGO_CFLAGS $CPPFLAGS"
-       LIBS="$PANGO_LIBS $LIBS"
-       AC_CHECK_HEADERS([pango/pangofc-fontmap.h])
-       AC_CHECK_FUNCS([pango_fc_font_map_add_decoder_find_func])
-       AC_SUBST(PANGO_CFLAGS)
-       AC_SUBST(PANGO_LIBS)
-fi
-])
index 6678367b65a4f46648ecb5b9b2db2aacd61a60a2..ef2afec2d7bc561455fa1dbc2675aec486c3a472 100755 (executable)
@@ -3,9 +3,6 @@
 
 srcdir=`dirname $0`
 
-case $1 in
-    --noconf*) NOCONFIGURE=true;;
-esac
 
 if [ ! -f aclocal.m4 -o stepmake/aclocal.m4 -nt aclocal.m4 ]; then
     echo "stepmake/aclocal.m4 is newer. Copying file." 
index f1e29c02d7bf4dafec7dbd441ea76afe27c52287..e35a064f4370a70f933c2f01c6e31b993fae6612 100644 (file)
@@ -73,9 +73,6 @@ TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_
 endif
 
 
-# no local settings in the build process.
-LANG=
-export LANG
 
 # clean file lists:
 #
index d3c4fc07c675c2fb66f720c9af621933664aebb1..8a4522a2e72048a8fe547e359ee2afc80d890ccf 100644 (file)
       \string"
       lyscale\lilypondpaperoutputscale\lilypondspace ##1}
   }
+
+  \lilypondifundefined{lilypondpaperblotdiameterps}
+    {\lilypondsetdimen{lilypondpaperblotdiameter}}
+    {}
 }
 
 \gdef\lilypondexperimentalfeatures{}
index a64e8e01efb210a42106a4d9dcc8704fdaec04b8..5cc6d4ffcf95e3b7b6172efe765fad235816cfaa 100644 (file)
@@ -1,36 +1,37 @@
-%%% lilyponddefs.tex -- TeX macros for LilyPond output.
-%%%
-%%%  source file of the GNU LilyPond music typesetter
-%%% 
-%%% (c)  1998--2004 Jan Nieuwenhuizen <janneke@gnu.org>
-%%%                 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-%%%                 Mats Bengtsson <mats.bengtsson@s3.kth.se>
-%%%
-%% Avoid \par while reading this file.
+% lilyponddefs.tex
+%
+% Include file for LilyPond.
+%
+% This file defines various macros to acommodate lilypond output.
+%
+% It should run with plain TeX, LaTeX, pdftex, and texinfo.
+%
+% To avoid interferences, lilyponddefs.tex should be loaded within a group.
+% To load it only once, most of the definitions must be global.
+%
+% The overall structure of a file created by LilyPond is as follows:
+%
+%   <lilypond parameter definitions>
+%   \ifx\lilypondstart \undefined
+%     \input lilyponddefs
+%   \fi
+%   \lilypondstart
+%   <font setup and note output>
+%   \lilypondend
+%
+% No footers and headers are provided for the stand-alone run (i.e., for
+% directly saying `latex <LilyPond output>'.
+%
+%
+% Avoid \par while reading this file.
 \edef\lilyponddefsELC{\the\endlinechar}%
 \endlinechar -1\relax
 
-%% This runs with plain TeX, LaTeX, pdftex, and texinfo.
-%%
-%% To avoid interferences, lilyponddefs.tex must be loaded within a group.
-%% It is loaded only once, so the definitions must be global.
-%%
-%% The overall structure of a file created by LilyPond is as follows:
-%%
-%%   <lilypond parameter definitions>
-%%   \ifx\lilypondstart \undefined
-%%     \input lilyponddefs
-%%   \fi
-%%   \lilypondstart
-%%   <font setup and note output>
-%%   \lilypondend
-
-\newdimen\lytempdim
-\newdimen\outputscale
-
-%% Handy macros from the LaTeX manual.
+% the next three macros are taken from LaTeX
 \long\gdef\lilypondfirst#1#2{#1}
+
 \long\gdef\lilypondsecond#1#2{#2}
+
 \gdef\lilypondifundefined#1{
   \expandafter\ifx\csname#1\endcsname\relax
     \expandafter\lilypondfirst
 \gdef\lilypondstart{
   \begingroup
   \catcode `\@=11\relax
-  %% \@nodocument is defined as \relax after `\begin{document}'
+  % \@nodocument is defined as \relax after `\begin{document}'
   \lilypondifundefined{@nodocument}
     {
-      %% either plain TeX or texinfo or not at the beginning of LaTeX input
-      \def\x{\endgroup}}
+      % either plain TeX or texinfo or not at the beginning of LaTeX input
+      \def\x{\endgroup}
+    }
     {
-      %% FIXME: a4
-      %% provide a proper LaTeX preamble (for A4 paper format)
+      % provide a proper LaTeX preamble (for A4 paper format)
       \def\x{
         \endgroup
         \def\lilyponddocument{}
         \documentclass[a4paper]{article}
-        %% safe-mode
-        \nofiles
-        \usepackage{inputenc}
+       \nofiles
         \pagestyle{empty}
-        \lilypondifundefined{lilypondclassic}
-        {
-          %% Nullify [La]TeX page layout settings, page layout by LilyPond.
-          \topmargin-1in
-          \headheight0pt\headsep0pt
-          \oddsidemargin-1in
-          \evensidemargin\oddsidemargin
-        }
-        {
-          %% Center staves horizontally on page
-          \ifdim\lilypondpaperlinewidth\lilypondpaperunit > 0pt
+        % \begin is defined as \outer in texinfo, thus we use \csname
+        \csname begin\endcsname{document}
+        % center staves horizontally on page
+        \ifdim\lilypondpaperlinewidth\lilypondpaperunit > 0pt
           \hsize\lilypondpaperlinewidth\lilypondpaperunit
-          \lytempdim \paperwidth
-          \advance\lytempdim -\the\hsize
-          \lytempdim 0.5\lytempdim
-          \advance\lytempdim -1in
-          \oddsidemargin \lytempdim
-          \evensidemargin \lytempdim
-          \fi
-        }
+          % we abuse \scoreshift temporarily
+          \scoreshift \paperwidth
+          \advance\scoreshift -\the\hsize
+          \scoreshift 0.5\scoreshift
+          \advance\scoreshift -1in
+          \oddsidemargin \scoreshift
+          \evensidemargin \scoreshift
+        \fi
         \parindent 0pt
-        %% TEXINFO workaround: \begin is defined as \outer, use \csname.
-        \csname begin\endcsname{document}}}
-  \x}
+      }
+    }
+
+  \x
+
+  \lilypondifundefined{mustmakelilypondtitle}
+    {}
+    {\makelilypondtitle}
+
+  \lilypondifundefined{mustmakelilypondpiecetitle}
+    {}
+    {\makelilypondpiecetitle}
+}
 
 \gdef\lilypondend{
   \lilypondifundefined{lilypondbook}
-  {\lilypondifundefined{lilypondpaperlastpagefill}
-    {\vskip 0pt plus\lilypondpaperinterscorelinefill00 fill}
-    {}}
-  {}
+    {\lilypondifundefined{lilypondpaperlastpagefill}
+      {\vskip 0pt plus \lilypondpaperinterscorelinefill00 fill}
+      {}
+    }
+    {}
+
   \begingroup
   \lilypondifundefined{lilyponddocument}
-    {\def\x{\endgroup}}
-    {\def\x{\endgroup\csname end\endcsname{document}}}
-  \x}
+    {
+      \def\x{\endgroup}
+    }
+    {
+      \def\x{
+        \endgroup
+        \csname end\endcsname{document}
+      }
+    }
+
+  \x
+}
 
-%% Inversed \loop ... \repeat macro
+% this is an inversed \loop ... \repeat macro
 \def\lilypondloop#1\lilypondrepeat{
   \def\lilypondbody{#1}
   \lilyponditerate
   \lilypondnext
 }
 
-%% Allow overriding of pagebreak
-\lilypondifundefined{lilypondpagebreak}
-{
-  \lilypondifundefined{@nodocument}
-  {\gdef\lilypondpagebreak{\eject}}
-  {\gdef\lilypondpagebreak{\newpage}}
-  }
-  {}
-      
-%% Include \special only once.
+% the following macro is executed only once
 \gdef\lilypondspecial{
   \special{header=music-drawing-routines.ps}
   \gdef\lilypondspecial{}
 }
 
-%% The feta characters.
+% the feta characters
 \input feta20
 
 \global\font\fetasixteen = feta16
 \gdef\fetafont{\fetasixteen}
 \gdef\fetachar#1{\hbox{\fetasixteen#1}}
 
-\gdef\topalign#1{\vbox to 0pt{\hbox{#1}\vss}}
-\gdef\leftalign#1{\hbox to 0pt{#1\hss}}
+\gdef\botalign#1{
+  \vbox to 0pt{\vss #1}
+}
+\gdef\leftalign#1{
+  \hbox to 0pt{#1\hss}
+}
 
 \gdef\lyitem#1#2#3{
-  \topalign{\raise#2\outputscale\leftalign{\kern#1\outputscale#3}}}
+  \botalign{
+    \hbox{\raise #1\outputscale
+          \leftalign{\kern #2\outputscale #3}}
+  }
+}
 
-\gdef\lybox#1#2#3#4#5{
-  \lytempdim\baselineskip
-  \advance\lytempdim-#4\outputscale
-  \raise\lytempdim
-  \vbox to#4\outputscale{
-    \leftalign{\kern#1\outputscale\lower#2\outputscale\topalign{#5}}
-    \vss}}
+\gdef\lybox#1#2#3{
+  \hbox to #1\outputscale {
+    \lower\scoreshift \vbox to #2\outputscale {
+      \hbox{#3}
+      \vss
+    }
+    \hss
+  }
+}
 
 \gdef\lyvrule#1#2#3#4{
-  \kern#1\outputscale
-  \vrule width #2\outputscale depth #3\outputscale height #4\outputscale}
+  \kern #1\outputscale
+  \vrule width #2\outputscale depth #3\outputscale height #4\outputscale
+}
+
+% Attempt to keep lilypiecetitle together with the piece:
+%
+% TODO: figure this out.
+\gdef\myfilbreak{}%\par\vfil\penalty200\vfilneg}
 
-%% FIXME: 'interscoreline' and 'lilypondPAPERinterscoreline
 \lilypondifundefined{lilypondpaperinterscorelinefill}
   {\gdef\lilypondpaperinterscorelinefill{0}}
   {\gdef\lilypondpaperinterscorelinefill{1}}
 
-%% Allow overriding of interscoreline, e.g. for lilypond.py's --preview
+%% Allow overriding of interscoreline, eg for lilypond --preview
 \lilypondifundefined{interscoreline}
-{
-  \lilypondifundefined{lilypondclassic}
-  {\gdef\interscoreline{}}
-  {\gdef\interscoreline{
-      \vskip\lilypondpaperinterscoreline\lilypondpaperunit
-      plus \lilypondpaperinterscorelinefill fill}}
-}
-{}
+{\gdef\interscoreline{
+  \vskip \lilypondpaperinterscoreline \lilypondpaperunit
+    plus \lilypondpaperinterscorelinefill fill
+}}{}
 
-%% Include postscript definitions unless using PDFTeX,
-%% in that case use pdf definitions.
-%% MiKTeX workaround: use \csname.
+% Are we using PDFTeX?  If so, use pdf definitions.
+% MiKTeX checks \pdfoutput the wrong way, thus we use \csname.
 \lilypondifundefined{lilypondpostscript}
-{\lilypondifundefined{pdfoutput}
-  {\input lily-ps-defs }
-  {\pdfoutput = 1
-    \input lily-pdf-defs }}
-{}
+  {
+    \lilypondifundefined{pdfoutput}
+      {\input lily-ps-defs }
+      {
+        \pdfoutput = 1
+        \input lily-pdf-defs %
+      }
+  }
+  {}
+
+\newdimen\outputscale
+\newdimen\scoreshift
 
-%% Restore newline functionality (disabled to avoid \par).
+% Restore newline functionality (disabled to avoid \par).
 \endlinechar \lilyponddefsELC
 \endinput
 
-%% end lilyponddefs.tex
+% EOF