]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' of /home/jcharles/GIT/Lily/. into translation
authorJean-Charles Malahieude <lilyfan@orange.fr>
Sat, 9 Aug 2014 09:44:55 +0000 (11:44 +0200)
committerJean-Charles Malahieude <lilyfan@orange.fr>
Sat, 9 Aug 2014 09:44:55 +0000 (11:44 +0200)
430 files changed:
Documentation/contributor.texi
Documentation/contributor/issues.itexi
Documentation/contributor/lsr-work.itexi
Documentation/contributor/programming-work.itexi
Documentation/contributor/release-work.itexi
Documentation/de/notation/rhythms.itely
Documentation/de/texidocs/alternative-bar-numbering.texidoc
Documentation/de/texidocs/glissandi-can-skip-grobs.texidoc
Documentation/de/texidocs/strict-beat-beaming.texidoc
Documentation/es/notation/rhythms.itely
Documentation/essay.tely
Documentation/extending.tely
Documentation/extending/programming-interface.itely
Documentation/fr/notation/rhythms.itely
Documentation/it/notation/rhythms.itely
Documentation/ja/notation/rhythms.itely
Documentation/learning.tely
Documentation/music-glossary.tely
Documentation/notation.tely
Documentation/notation/notation-appendices.itely
Documentation/notation/rhythms.itely
Documentation/notation/spacing.itely
Documentation/snippets/adding-indicators-to-staves-which-get-split-after-a-break.ly
Documentation/snippets/beam-grouping-in-7-8-time.ly [deleted file]
Documentation/snippets/changing-the-tuplet-number.ly
Documentation/snippets/correction-wanted.snippet-list [deleted file]
Documentation/snippets/entering-several-tuplets-using-only-one--times-command.ly [deleted file]
Documentation/snippets/entering-several-tuplets-using-only-one--tuplet-command.ly [new file with mode: 0644]
Documentation/snippets/expressive-headword.ly
Documentation/snippets/extending-glissandi-across-repeats.ly
Documentation/snippets/fingering-symbols-for-wind-instruments.ly
Documentation/snippets/fretted-headword.ly
Documentation/snippets/generating-custom-flags.ly
Documentation/snippets/glissandi-can-skip-grobs.ly
Documentation/snippets/guitar-slides.ly
Documentation/snippets/hammer-on-and-pull-off-using-chords.ly
Documentation/snippets/hammer-on-and-pull-off-using-voices.ly
Documentation/snippets/hammer-on-and-pull-off.ly
Documentation/snippets/heavily-customized-polymetric-time-signatures.ly
Documentation/snippets/horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly
Documentation/snippets/how-to-print-two-rehearsal-marks-above-and-below-the-same-barline-method-1.ly
Documentation/snippets/incipit.ly
Documentation/snippets/inserting-score-fragments-above-a-staff,-as-markups.ly
Documentation/snippets/jazz-combo-template.ly
Documentation/snippets/keyboard-headword.ly
Documentation/snippets/making-glissandi-breakable.ly
Documentation/snippets/merging-multi-measure-rests-in-a-polyphonic-part.ly
Documentation/snippets/new/entering-several-tuplets-using-only-one--times-command.ly [deleted file]
Documentation/snippets/new/expressive-headword.ly [deleted file]
Documentation/snippets/new/extending-glissandi-across-repeats.ly [deleted file]
Documentation/snippets/new/fretted-headword.ly [deleted file]
Documentation/snippets/new/generating-custom-flags.ly [deleted file]
Documentation/snippets/new/glissandi-can-skip-grobs.ly [deleted file]
Documentation/snippets/new/guitar-slides.ly [deleted file]
Documentation/snippets/new/hammer-on-and-pull-off-using-chords.ly [deleted file]
Documentation/snippets/new/hammer-on-and-pull-off-using-voices.ly [deleted file]
Documentation/snippets/new/hammer-on-and-pull-off.ly [deleted file]
Documentation/snippets/new/heavily-customized-polymetric-time-signatures.ly [deleted file]
Documentation/snippets/new/horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly [deleted file]
Documentation/snippets/new/how-to-print-two-rehearsal-marks-above-and-below-the-same-barline-method-1.ly [deleted file]
Documentation/snippets/new/incipit.ly [deleted file]
Documentation/snippets/new/inserting-score-fragments-above-a-staff,-as-markups.ly [deleted file]
Documentation/snippets/new/jazz-combo-template.ly [deleted file]
Documentation/snippets/new/keyboard-headword.ly [deleted file]
Documentation/snippets/new/making-glissandi-breakable.ly [deleted file]
Documentation/snippets/new/merging-multi-measure-rests-in-a-polyphonic-part.ly [deleted file]
Documentation/snippets/new/numbering-groups-of-measures.ly [deleted file]
Documentation/snippets/new/numbers-as-easy-note-heads.ly [deleted file]
Documentation/snippets/new/pitches-headword.ly [deleted file]
Documentation/snippets/new/positioning-multi-measure-rests.ly [deleted file]
Documentation/snippets/new/printing-hairpins-in-various-styles.ly [deleted file]
Documentation/snippets/new/quoting-another-voice-with-transposition.ly [deleted file]
Documentation/snippets/new/redefining-grace-note-global-defaults.ly [deleted file]
Documentation/snippets/new/score-for-diatonic-accordion.ly [deleted file]
Documentation/snippets/new/strict-beat-beaming.ly [deleted file]
Documentation/snippets/new/string-number-extender-lines.ly [deleted file]
Documentation/snippets/new/using-a-tick-as-the-breath-mark-symbol.ly [deleted file]
Documentation/snippets/new/using-alternative-flag-styles.ly [deleted file]
Documentation/snippets/new/using-an-extra-voice-for-breaks.ly [deleted file]
Documentation/snippets/new/using-grace-note-slashes-with-normal-heads.ly [deleted file]
Documentation/snippets/new/vertically-aligned-dynamics-and-textscripts.ly [deleted file]
Documentation/snippets/new/woodwind-diagrams-key-lists.ly [deleted file]
Documentation/snippets/numbering-groups-of-measures.ly
Documentation/snippets/numbers-as-easy-note-heads.ly
Documentation/snippets/pitches-headword.ly
Documentation/snippets/positioning-multi-measure-rests.ly
Documentation/snippets/printing-hairpins-in-various-styles.ly
Documentation/snippets/quoting-another-voice-with-transposition.ly
Documentation/snippets/recorder-fingering-chart.ly
Documentation/snippets/redefining-grace-note-global-defaults.ly
Documentation/snippets/rhythms.snippet-list
Documentation/snippets/score-for-diatonic-accordion.ly
Documentation/snippets/strict-beat-beaming.ly
Documentation/snippets/string-number-extender-lines.ly
Documentation/snippets/syntax-and-expressions.snippet-list
Documentation/snippets/using-a-tick-as-the-breath-mark-symbol.ly
Documentation/snippets/using-alternative-flag-styles.ly
Documentation/snippets/using-an-extra-voice-for-breaks.ly
Documentation/snippets/using-grace-note-slashes-with-normal-heads.ly
Documentation/snippets/vertically-aligned-dynamics-and-textscripts.ly
Documentation/snippets/woodwind-diagrams-key-lists.ly
Documentation/usage.tely
Documentation/web.texi
Documentation/web/introduction.itexi
Documentation/web/news-front.itexi
Documentation/web/news.itexi
VERSION
input/regression/display-lily-tests.ly
input/regression/incipit.ly
input/regression/magnifyMusic-tablature-double-stems.ly [new file with mode: 0644]
input/regression/magnifyMusic-text-interface.ly [new file with mode: 0644]
input/regression/magnifyStaff-tablature-double-stems.ly [new file with mode: 0644]
input/regression/magnifyStaff-text-interface.ly [new file with mode: 0644]
lily/accidental-engraver.cc
lily/accidental-placement.cc
lily/accidental.cc
lily/align-interface.cc
lily/all-font-metrics.cc
lily/ambitus-engraver.cc
lily/arpeggio.cc
lily/articulations.cc
lily/audio-item.cc
lily/auto-beam-engraver.cc
lily/auto-change-iterator.cc
lily/axis-group-engraver.cc
lily/axis-group-interface-scheme.cc
lily/axis-group-interface.cc
lily/balloon-engraver.cc
lily/balloon.cc
lily/bar-check-iterator.cc
lily/beam-collision-engraver.cc
lily/beam-engraver.cc
lily/beam-quanting.cc
lily/beam.cc
lily/bend-engraver.cc
lily/book-scheme.cc
lily/book.cc
lily/break-align-engraver.cc
lily/break-alignment-interface.cc
lily/break-substitution.cc
lily/breathing-sign.cc
lily/chord-name-engraver.cc
lily/chord-name.cc
lily/clef-engraver.cc
lily/clef.cc
lily/cluster-engraver.cc
lily/cluster.cc
lily/coherent-ligature-engraver.cc
lily/completion-note-heads-engraver.cc
lily/completion-rest-engraver.cc
lily/constrained-breaking.cc
lily/context-def.cc
lily/context-mod-scheme.cc
lily/context-scheme.cc
lily/context.cc
lily/custos-engraver.cc
lily/custos.cc
lily/dispatcher-scheme.cc
lily/dispatcher.cc
lily/dot-column-engraver.cc
lily/dot-column.cc
lily/dots-engraver.cc
lily/dots.cc
lily/drum-note-performer.cc
lily/duration-scheme.cc
lily/dynamic-align-engraver.cc
lily/dynamic-engraver.cc
lily/enclosing-bracket.cc
lily/engraver-group.cc
lily/engraver-scheme.cc
lily/engraver.cc
lily/episema-engraver.cc
lily/event-chord-iterator.cc
lily/figured-bass-continuation.cc
lily/figured-bass-engraver.cc
lily/fingering-column.cc
lily/fingering-engraver.cc
lily/flag.cc
lily/font-interface.cc
lily/font-metric-scheme.cc
lily/font-metric.cc
lily/font-select.cc
lily/footnote-engraver.cc
lily/forbid-break-engraver.cc
lily/function-documentation.cc
lily/global-context-scheme.cc
lily/global-context.cc
lily/grace-engraver.cc
lily/grace-music.cc
lily/grace-spacing-engraver.cc
lily/gregorian-ligature-engraver.cc
lily/grid-line-interface.cc
lily/grid-point-engraver.cc
lily/grob-array-scheme.cc
lily/grob-array.cc
lily/grob-info.cc
lily/grob-pq-engraver.cc
lily/grob-scheme.cc
lily/grob.cc
lily/hairpin.cc
lily/hara-kiri-group-spanner.cc
lily/horizontal-bracket.cc
lily/include/audio-item.hh
lily/include/book.hh
lily/include/box.hh
lily/include/context-def.hh
lily/include/context-mod.hh
lily/include/context.hh
lily/include/dispatcher.hh
lily/include/duration.hh
lily/include/engraver.hh
lily/include/font-metric.hh
lily/include/global-context.hh
lily/include/grob-array.hh
lily/include/grob.hh
lily/include/input.hh
lily/include/item.hh
lily/include/lily-guile-macros.hh
lily/include/lily-parser.hh
lily/include/listener.hh
lily/include/moment.hh
lily/include/music-iterator.hh
lily/include/music-output.hh
lily/include/music.hh
lily/include/output-def.hh
lily/include/page-marker.hh
lily/include/paper-book.hh
lily/include/paper-outputter.hh
lily/include/paper-score.hh
lily/include/performance.hh
lily/include/performer.hh
lily/include/pitch.hh
lily/include/prob.hh
lily/include/score.hh
lily/include/smobs.hh
lily/include/spanner.hh
lily/include/spring.hh
lily/include/stencil.hh
lily/include/stream-event.hh
lily/include/translator-group.hh
lily/include/translator.hh
lily/include/translator.icc
lily/input-scheme.cc
lily/input-smob.cc
lily/instrument-name-engraver.cc
lily/item-scheme.cc
lily/item.cc
lily/keep-alive-together-engraver.cc
lily/key-signature-interface.cc
lily/kievan-ligature-engraver.cc
lily/laissez-vibrer-engraver.cc
lily/ledger-line-engraver.cc
lily/ledger-line-spanner.cc
lily/lexer.ll
lily/ligature-engraver.cc
lily/lily-lexer.cc
lily/lily-parser-scheme.cc
lily/lily-parser.cc
lily/line-spanner.cc
lily/listener.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/measure-grouping-engraver.cc
lily/measure-grouping-spanner.cc
lily/melody-spanner.cc
lily/mensural-ligature-engraver.cc
lily/mensural-ligature.cc
lily/metronome-engraver.cc
lily/midi-control-function-performer.cc
lily/midi-item.cc
lily/moment-scheme.cc
lily/moment.cc
lily/multi-measure-rest-engraver.cc
lily/multi-measure-rest.cc
lily/music-iterator.cc
lily/music-scheme.cc
lily/music-sequence.cc
lily/music-wrapper-iterator.cc
lily/music-wrapper.cc
lily/music.cc
lily/new-fingering-engraver.cc
lily/note-collision.cc
lily/note-column-scheme.cc
lily/note-column.cc
lily/note-head-scheme.cc
lily/note-head.cc
lily/note-heads-engraver.cc
lily/note-name-engraver.cc
lily/note-performer.cc
lily/note-spacing-engraver.cc
lily/note-spacing.cc
lily/open-type-font-scheme.cc
lily/ottava-bracket.cc
lily/ottava-engraver.cc
lily/output-def-scheme.cc
lily/output-def.cc
lily/page-breaking-scheme.cc
lily/page-breaking.cc
lily/page-layout-problem-scheme.cc
lily/page-layout-problem.cc
lily/page-turn-engraver.cc
lily/pango-font-scheme.cc
lily/paper-book-scheme.cc
lily/paper-book.cc
lily/paper-column-engraver.cc
lily/paper-column.cc
lily/paper-def.cc
lily/paper-outputter-scheme.cc
lily/paper-score-scheme.cc
lily/paper-score.cc
lily/paper-system-scheme.cc
lily/parser.yy
lily/part-combine-iterator.cc
lily/partial-iterator.cc
lily/percent-repeat-engraver.cc
lily/percent-repeat-item.cc
lily/performance-scheme.cc
lily/performance.cc
lily/performer-group.cc
lily/performer.cc
lily/piano-pedal-align-engraver.cc
lily/piano-pedal-bracket.cc
lily/piano-pedal-engraver.cc
lily/pitch-scheme.cc
lily/pitch.cc
lily/pitched-trill-engraver.cc
lily/pointer-group-interface-scheme.cc
lily/pointer-group-interface.cc
lily/prob-scheme.cc
lily/prob.cc
lily/property-iterator.cc
lily/pure-from-neighbor-interface.cc
lily/quote-iterator.cc
lily/relative-octave-check.cc
lily/repeat-tie-engraver.cc
lily/repeated-music.cc
lily/rest-collision-engraver.cc
lily/rest-collision.cc
lily/rest-engraver.cc
lily/rest.cc
lily/rhythmic-head.cc
lily/rhythmic-music-iterator.cc
lily/score-performer.cc
lily/score-scheme.cc
lily/score.cc
lily/script-column.cc
lily/script-interface.cc
lily/self-alignment-interface.cc
lily/semi-tie-column.cc
lily/semi-tie.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/slur-proto-engraver.cc
lily/slur-scoring.cc
lily/slur.cc
lily/spaceable-grob.cc
lily/spacing-basic.cc
lily/spacing-determine-loose-columns.cc
lily/spacing-engraver.cc
lily/spacing-interface.cc
lily/spacing-loose-columns.cc
lily/spacing-spanner.cc
lily/span-bar-stub-engraver.cc
lily/spanner-scheme.cc
lily/spanner.cc
lily/spring-smob.cc
lily/staff-grouper-interface.cc
lily/staff-symbol-engraver.cc
lily/staff-symbol-referencer-scheme.cc
lily/staff-symbol-referencer.cc
lily/staff-symbol.cc
lily/stem-engraver.cc
lily/stem-tremolo.cc
lily/stem.cc
lily/stencil-integral.cc
lily/stencil-scheme.cc
lily/stream-event-scheme.cc
lily/stream-event.cc
lily/sustain-pedal.cc
lily/system-start-delimiter-engraver.cc
lily/system-start-delimiter.cc
lily/system.cc
lily/tab-tie-follow-engraver.cc
lily/tempo-performer.cc
lily/text-engraver.cc
lily/text-interface.cc
lily/text-spanner-engraver.cc
lily/tie-column.cc
lily/tie-engraver.cc
lily/tie-formatting-problem.cc
lily/tie.cc
lily/time-signature.cc
lily/timing-translator.cc
lily/translator-ctors.cc
lily/translator-dispatch-list.cc
lily/translator-group.cc
lily/translator-scheme.cc
lily/translator.cc
lily/trill-spanner-engraver.cc
lily/tuplet-bracket.cc
lily/tuplet-engraver.cc
lily/tuplet-iterator.cc
lily/tuplet-number.cc
lily/unfolded-repeat-iterator.cc
lily/vaticana-ligature-engraver.cc
lily/vaticana-ligature.cc
lily/vertical-align-engraver.cc
lily/volta-bracket.cc
lily/volta-engraver.cc
ly/Welcome-to-LilyPond-MacOS.ly
ly/Welcome_to_LilyPond.ly
ly/music-functions-init.ly
po/lilypond.pot
scm/define-context-properties.scm
scm/define-grob-properties.scm
scm/define-grobs.scm
scm/define-music-display-methods.scm
scm/documentation-generate.scm
scm/font.scm
scm/music-functions.scm
scm/output-lib.scm
scm/parser-clef.scm
scripts/auxiliar/fixcc.py

index f7dc2dd6e817d29ca1403c9fcf8cc145b6cbf2c8..90cd32d444241cb86878e70d5c9377f0a953824b 100644 (file)
@@ -23,7 +23,12 @@ should only read the sections which are relevant to them.  For more
 information about different jobs, see @rweb{Help us}.
 @end macro
 
-@c `Contributor's Guide' was born 2007-09-15 with git commit 48f3356...
+@c `Contributor’s Guide' was born 2007-09-15 with this commit:
+@c Add developers resources page
+@c author: John Mandereau
+@c commit: 135a5beef5c4cf893d02947cdfcb5bb90c854486
+@c   file: Documentation/devel.html.in
+
 @macro copyrightDeclare
 Copyright @copyright{} 2007--2014 by the authors.
 @end macro
index 8fe73428eefb6b50f452ae211661ee47b77b943c..7cf14faea891b27661316e93fd93285452e3b3d2 100644 (file)
@@ -186,13 +186,13 @@ the currently-active Bug Squad member(s) can handle the message.
 @subsubheading Daily schedule
 
 @example
-Monday:    Eluze
-Tuesday:   Ralph Palmer
+Monday: Eluze
+Tuesday:
 Wednesday: Marek Klein
-Thursday:  Eluze
+Thursday: Eluze
 Friday:
-Saturday:  Colin Campbell
-Sunday:    Federico Bruni
+Saturday: Colin Campbell
+Sunday:
 @end example
 
 
index 31bf9c4168654f90690832625d3a08716550513e..9f4c6dcdfe65957bc8bb4c128be0fc23c656b383 100644 (file)
@@ -394,23 +394,8 @@ convert-ly -e -t2.14.2 *.ly
 
 @item
 There might be no conversion rule for some old commands. To make
-an initial check for possible problems you can run the following
-script on a copy of the @file{all} subdirectory:
-
-@example
-#!/bin/bash
-
-for LILYFILE in *.ly
-do
-  STEM=$(basename "$LILYFILE" .ly)
-  echo "running $LILYFILE..."
-  convert-ly -e -t<version> "$LILYFILE" >& "$STEM".txt
-done
-
-grep refer *.txt
-grep smart *.txt
-TODO: better script
-@end example
+an initial check for possible problems you can run the
+script at the end of this list on a copy of the @file{all} subdirectory.
 
 @item
 Copy relevant snippets (i.e. snippets whose version is equal to
@@ -475,29 +460,54 @@ step by step.
 @end enumerate
 
 
-Below is a shell script to run all @file{.ly} files in a directory
-and redirect terminal output to text files, which are then
-searched for the word "failed" to see which snippets do not compile.
+Below is a shell script to run LilyPond on all @file{.ly} files in a directory.
+If the script is run with a -s parameter, it runs silently except for reporting
+failed files.  If run with -c it also runs @code{convert-ly} prior to running
+LilyPond.
 
 @smallexample
 #!/bin/bash
 
-for LILYFILE in *.ly
+while getopts sc opt; do
+    case $opt in
+        s)
+            silent=true
+            ;;
+        c)
+            convert=true
+            ;;
+    esac
+done
+param=$@
+if [ $silent ]; then
+    param=$@{param:3@}
+fi
+if [ $convert ]; then
+    param=$@{param:3@}
+fi
+filter=$@{param:-"*.ly"@}
+
+for LILYFILE in $filter
 do
-  STEM=$(basename "$LILYFILE" .ly)
-  echo "running $LILYFILE..."
-  lilypond --format=png -ddelete-intermediate-files "$LILYFILE" >& "$STEM".txt
+    STEM=$(basename "$LILYFILE" .ly)
+    if [ $convert ]; then
+        if [ $silent ]; then
+            $LILYPOND_BUILD_DIR/out/bin/convert-ly -e "$LILYFILE" >& "$STEM".con.txt
+        else
+            $LILYPOND_BUILD_DIR/out/bin/convert-ly -e "$LILYFILE"
+        fi
+    fi
+    if [ ! $silent ]; then
+        echo "running $LILYFILE..."
+    fi
+    $LILYPOND_BUILD_DIR/out/bin/lilypond --format=png "$LILYFILE" >& "$STEM".txt
+    RetVal=$?
+    if [ $RetVal -gt 0 ]; then
+       echo "$LILYFILE failed"
+    fi
 done
-
-grep failed *.txt
-TODO: better script
 @end smallexample
 
-Sometimes @code{grep failed *.txt} will not discover all
-problematic files. In addition you may want to use:
+Output from LilyPond is in @file{filename.txt} and convert-ly in
+@file{filename.con.txt}.
 
-@example
-grep ERROR *.txt
-grep error *.txt
-grep warning *.txt
-@end example
index 447f553ea4cf2b1f57e5c736f4794aee06392112..a02910b768f1af603cc4508b46c9e92efb379327 100644 (file)
@@ -2149,7 +2149,7 @@ Test whether the type of @var{s} is [type].
 often than not, the code checks Lilypond specific C++-implemented
 types using
 
-@subsubheading [type *] unsmob_[type] (SCM s)
+@subsubheading [Type *] Type::unsmob (SCM s)
 
 This tries converting a Scheme object to a pointer of the desired
 kind.  If the Scheme object is of the wrong type, a pointer value
index 8227763e40d08f819ede3f958451a49aba6c6736..aa918760adb8282c5f2ba7c9fd5d862c1a690c93 100644 (file)
@@ -137,8 +137,6 @@ Commit, push, switch back to master (or wherever else):
 
 @example
 git commit -m "Release: bump VERSION_DEVEL." VERSION
-git commit -m "Release: bump VERSION_DEVEL." ly/Welcome_to_LilyPond.ly
-git commit -m "Release: bump VERSION_DEVEL." ly/Welcome-to-LilyPond-MacOS.ly
 git commit -m "PO: update template." po/lilypond.pot
 git commit -m "Release: update news." Documentation/web/
 git commit -m "Release: bump Welcome versions." ly/Wel*.ly
index e1d0ea5e935b7cbe332e8f22ba2622100e86b766..b3499a7101069e395ee9449bbb535a6027397559 100644 (file)
@@ -268,7 +268,7 @@ zu setzen, siehe @ref{Tondauern skalieren}.
 @funindex tupletSpannerDuration
 
 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
-{entering-several-tuplets-using-only-one--times-command.ly}
+{entering-several-tuplets-using-only-one--tuplet-command.ly}
 
 @cindex Triolennummer, Änderung
 
index b84d88a3d97c61fb0c4eeba968f1f5efc4d72142..bcf5947fcb48bcc61b3083ed6e9e66b587529d6e 100644 (file)
@@ -1,5 +1,5 @@
 
-%% Translation of GIT committish: fc1ca638e0b5f66858b9b7a073ceefc1eccb3ed2
+%% Translation of GIT committish: ebe492ca408fb0d9abf80b94c56197eef8dc2f09
 
   texidocde = "Zwei alternative Methoden können eingestellt werden,
   die die Taktnummerierung beeinflussen, insbesondere bei Wiederholungen."
index 640df117ee63c98307529e3027db42634bf2afcc..8799c79097ada33712407751798c1450a2fee8d6 100644 (file)
@@ -1,4 +1,4 @@
-%% Translation of GIT committish: fc1ca638e0b5f66858b9b7a073ceefc1eccb3ed2
+%% Translation of GIT committish: ebe492ca408fb0d9abf80b94c56197eef8dc2f09
   texidocde = "@code{NoteColumn}-Grobs können bei Glissandos übersprungen werden."
   doctitlede = "Glissando kann Grobs überspringen"
 
index 7189134e466947c57ed895bba53b7ef40e70fac2..0574da5141702a172a718d170c2d177c8e0e9454 100644 (file)
@@ -1,4 +1,4 @@
-%% Translation of GIT committish: fc1ca638e0b5f66858b9b7a073ceefc1eccb3ed2
+%% Translation of GIT committish: ebe492ca408fb0d9abf80b94c56197eef8dc2f09
 
   texidocde = "
 Sekundäre Balken können in die Richtung gesetzt werden, die ihrer rhythmischen
index 3401297548c0f805cd91113b66500c99332ce385..a2ccb6670bb665f0c2a55f12f6ef80efbec6ea8f 100644 (file)
@@ -271,7 +271,7 @@ grupo especial, véase @ref{Escalar las duraciones}.
 @funindex tupletSpannerDuration
 
 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
-{entering-several-tuplets-using-only-one--times-command.ly}
+{entering-several-tuplets-using-only-one--tuplet-command.ly}
 
 @cindex grupos de valoración especial, modificación del número
 
index 2bd95e7571f6c9c339c30c55983ada3b59c6a2aa..c379ace6013a066f9724b967bec74ece5fed9b8d 100644 (file)
@@ -18,7 +18,12 @@ This essay discusses automatic music engraving functions within
 LilyPond version @version{}.
 @end macro
 
-@c `Essay' was born 2002-06-03 with git commit e38f5fc...
+@c `Essay' was born 2002-06-03 with this commit:
+@c tremolo segfault
+@c author: Han-Wen Nienhuys
+@c commit: 29262ca70c3d5209126150752fd3d804bef8e9a3
+@c   file: Documentation/user/introduction.itely
+
 @macro copyrightDeclare
 Copyright @copyright{} 2002--2014 by the authors.
 @end macro
index 3a65c0d30b9e31fea905b9162cf639883b427a68..d75e8c1290092b1f70dd059dcdf2a3da1805d390 100644 (file)
@@ -18,9 +18,14 @@ This file explains how to extend the functionality of
 LilyPond version @version{}.
 @end macro
 
-@c `Extending' was born 2003-04-23 with git commit c08f6e8...
+@c `Extending' was born 2004-03-07 with this commit:
+@c * Documentation/user/changing-defaults.itely (Changing defaults):
+@c author: Han-Wen Nienhuys
+@c commit: c53d0cabdf9361e448cdd02a338aa5d696f4f466
+@c   file: Documentation/user/programming-interface.itely
+
 @macro copyrightDeclare
-Copyright @copyright{} 2003--2014 by the authors.
+Copyright @copyright{} 2004--2014 by the authors.
 @end macro
 
 @set FDL
index 9c4cbe7805fd2eace8878c056101853a9f15ffc7..be580034424071d97736417ecff76010be2b3fdb 100644 (file)
@@ -1375,38 +1375,6 @@ can by found in the Internals Reference or the file 'define-grobs.scm':
 @}
 @end example
 
-If routines with multiple arguments must be called, the current grob
-can be inserted with a grob closure.  Here is a setting from
-@code{RehearsalMark},
-
-@example
-`(X-offset .
-   ,(ly:make-simple-closure
-     `(,+
-        ,(ly:make-simple-closure
-          (list ly:break-alignable-interface::self-align-callback))
-        ,(ly:make-simple-closure
-          (list ly:self-alignment-interface::x-aligned-on-self)))))
-@end example
-
-@noindent
-In this example, both @code{ly:break-alignable-interface::self-align-callback} and
-@code{ly:self-alignment-interface::x-aligned-on-self} are called
-with the grob as argument.  The results are added with the @code{+}
-function.  To ensure that this addition is properly executed, the whole
-thing is enclosed in @code{ly:make-simple-closure}.
-
-In fact, using a single procedure as property value is equivalent to
-
-@example
-(ly:make-simple-closure (ly:make-simple-closure (list @var{proc})))
-@end example
-
-@noindent
-The inner @code{ly:make-simple-closure} supplies the grob as argument
-to @var{proc}, the outer ensures that result of the function is
-returned, rather than the @code{simple-closure} object.
-
 From within a callback, the easiest method for evaluating a markup is
 to use grob-interpret-markup.  For example:
 
index 0d82de628faaa3663b35c04e46653e6f0647f767..c02b794315e76fb1d02ebadd937078e1baf1d028 100644 (file)
@@ -289,7 +289,7 @@ comme indiqué au chapitre @ref{Changement d'échelle des durées}.
 @funindex tupletSpannerDuration
 
 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
-{entering-several-tuplets-using-only-one--times-command.ly}
+{entering-several-tuplets-using-only-one--tuplet-command.ly}
 
 @cindex n-olet, modification du chiffre
 
index e134f9b733ab5f9391e70e3f2dca22691fd41e1a..3336269490b9d8b77fe832aa50f004f947bbb421 100644 (file)
@@ -270,7 +270,7 @@ irregolare, si veda @ref{Scaling durations}.
 @funindex tupletSpannerDuration
 
 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
-{entering-several-tuplets-using-only-one--times-command.ly}
+{entering-several-tuplets-using-only-one--tuplet-command.ly}
 
 @cindex gruppo irregolare, modifiche del numero del
 @cindex numero del gruppo irregolare, modifiche del
index 7317cd0ef6b09a5accfb34c690670ca854ade2d4..5bdb2758c00451e0653a42ba06fc9c004c31b10c 100644 (file)
@@ -258,7 +258,7 @@ c4 \tuplet 5/4 { f8 e f \tuplet 3/2 { e[ f g] } } f4
 @funindex tupletSpannerDuration
 
 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
-{entering-several-tuplets-using-only-one--times-command.ly}
+{entering-several-tuplets-using-only-one--tuplet-command.ly}
 
 @cindex Tuplet number changes (連符の数の変更)
 
index c602d27799462a42a719bff8e957d6fad9db474d..b00e8074f204b52f77b8981549b007f5f1892eed 100644 (file)
@@ -18,9 +18,14 @@ This file provides an introduction to LilyPond version
 @version{}.
 @end macro
 
-@c `Learning Manual' was born 1999-10-10 with git commit b9abaac...
+@c `Learning Manual' was born 1998-08-14 with this commit:
+@c release: 1.0.2
+@c author: Han-Wen Nienhuys
+@c commit: a3a44f9f3c581b6824b3a65f9039656693e09bbf
+@c   file: Documentation/tex/tutorial.yo
+
 @macro copyrightDeclare
-Copyright @copyright{} 1999--2014 by the authors.
+Copyright @copyright{} 1998--2014 by the authors.
 @end macro
 
 @set FDL
index cb71b40241268d319ba5caeae06c14bc45971c80..f772b3df2317bbef9e95de3b5eefafbed3ae94be 100644 (file)
@@ -12,7 +12,12 @@ terms used in the documentation manuals for LilyPond version
 @version{}.
 @end macro
 
-@c `Music Glossary' was born 1999-10-04 with git commit 280a0bb...
+@c `Music Glossary' was born 1999-10-04 with this commit:
+@c lilypond-1.2.12
+@c author: fred
+@c commit: be4e46f61b1a8dec0922e0fd849c626beb6ab9be
+@c   file: Documentation/user/glossary.texi
+
 @macro copyrightDeclare
 Copyright @copyright{} 1999--2014 by the authors
 @end macro
index e770728ccafc386f5d536899b0029b61ac34af5c..bdbf5cff55487843ddfdc36d28e7d89b9172a87e 100644 (file)
@@ -20,9 +20,14 @@ the reader is familiar with the material in the
 @rlearningnamed{Top, Learning Manual}.
 @end macro
 
-@c `Notation Reference' was born 1999-10-11 with git commit 940dda0...
+@c `Notation Reference' was born 1998-08-14 with this commit:
+@c release: 1.0.2
+@c author: Han-Wen Nienhuys
+@c commit: a3a44f9f3c581b6824b3a65f9039656693e09bbf
+@c   file: Documentation/tex/refman.yo
+
 @macro copyrightDeclare
-Copyright @copyright{} 1999--2014 by the authors.
+Copyright @copyright{} 1998--2014 by the authors.
 @end macro
 
 
index d4e6806d884eda779c10f30dbecf17ea0ad04f79..91d7d81998c5d91e752f46265130cbbb07fc768c 100644 (file)
@@ -1509,54 +1509,10 @@ for more readability.
 @appendixsec List of articulations
 
 
-@cindex accent
-@cindex accentus
-@cindex circulus
-@cindex coda
-@cindex downbow
-@cindex downmordent
-@cindex downprall
-@cindex espressivo
-@cindex fermata
-@cindex flageolet
-@cindex halfopen
-@cindex ictus
-@cindex lheel
-@cindex lineprall
-@cindex longfermata
-@cindex ltoe
-@cindex marcato
-@cindex mordent
-@cindex open
-@cindex portato
-@cindex prall
-@cindex pralldown
-@cindex prallmordent
-@cindex prallprall
-@cindex prallup
-@cindex reverseturn
-@cindex rheel
-@cindex rtoe
-@cindex segno
-@cindex semicirculus
-@cindex shortfermata
-@cindex signumcongruentiae
-@cindex snappizzicato
-@cindex staccatissimo
-@cindex staccato
-@cindex stopped
-@cindex tenuto
-@cindex thumb
-@cindex trill
-@cindex turn
-@cindex upbow
-@cindex upmordent
-@cindex upprall
-@cindex varcoda
-@cindex verylongfermata
-
-The following scripts are available in the Feta font and may be
-attached to notes (eg. @samp{f\accent}).
+The following lists show all the scripts in the Feta font that may be
+attached to notes (eg. @samp{f\accent} or @samp{f->}).  Each example
+shows the script in the @emph{up}, @emph{down} and @emph{neutral}
+positions respectively.
 
 @c Articulations and ornamentations
 @c Fingering instructions (for "thumb")
@@ -1577,209 +1533,350 @@ attached to notes (eg. @samp{f\accent}).
 * Ancient scripts::
 @end menu
 
+@ignore
+The @multitable @columnfraction value discrepancy between the first and
+the remaining columns is deliberate; it seems (at least visually
+anyway) the gap (after building the documentation) between first and
+second column examples was always larger than between the remaining
+columns - JL
+@end ignore
+
+@cindex accent
+@cindex espressivo
+@cindex marcato
+@cindex portato
+@cindex staccatissimo
+@cindex staccato
+@cindex tenuto
+@cindex thumb
 
 @node Articulation scripts
 @unnumberedsubsec Articulation scripts
 
-@multitable @columnfractions .25 .25 .25 .25
-
-@headitem
-Example
-@tab
-Output
-@tab
-Example
-@tab
-Output
+@multitable @columnfractions .22 .25 .25 .25
 
 @item
-@code{\accent}
-@tab
-@lilypond[notime,ragged-right,relative=2]
-f\accent e,_\accent
+@code{\accent} or @code{->}
+@lilypond[notime,relative=2]
+f^\accent e,_\accent b'\accent
 @end lilypond
 @tab
 @code{\espressivo}
-@tab
-@lilypond[notime,ragged-right,relative=2]
-f\espressivo e,_\espressivo
+@lilypond[notime,relative=2]
+f^\espressivo e,_\espressivo b'\espressivo
 @end lilypond
-
-@item
-@code{\marcato}
 @tab
-@lilypond[notime,ragged-right,relative=2]
-f\marcato e,_\marcato
+@code{\marcato} or @code{-^}
+@lilypond[notime,relative=2]
+f^\marcato e,_\marcato b'\marcato
 @end lilypond
 @tab
-@code{\portato}
-@tab
-@lilypond[notime,ragged-right,relative=2]
-f\portato e,_\portato
+@code{\portato} or @code{-_}
+@lilypond[notime,relative=2]
+f^\portato e,_\portato b'\portato
 @end lilypond
 
 @item
-@code{\staccatissimo}
-@tab
-@lilypond[notime,ragged-right,relative=2]
-f\staccatissimo e,_\staccatissimo
+@code{\staccatissimo} @* or @code{-!}
+@lilypond[notime,relative=2]
+f^\staccatissimo e,_\staccatissimo b'\staccatissimo
 @end lilypond
 @tab
-@code{\staccato}
-@tab
-@lilypond[notime,ragged-right,relative=2]
-f\staccato e,_\staccato
+@code{\staccato} or @code{-.}
+@lilypond[notime,relative=2]
+f^\staccato e,_\staccato b'\staccato
 @end lilypond
-
-@item
-@code{\tenuto}
 @tab
-@lilypond[notime,ragged-right,relative=2]
-f\tenuto e,_\tenuto
+@code{\tenuto} or @code{--}
+@lilypond[notime,relative=2]
+f^\tenuto e,_\tenuto b'\tenuto
 @end lilypond
 
 @end multitable
 
+@cindex prall
+@cindex prallup
+@cindex pralldown
+@cindex upprall
+@cindex downprall
+@cindex prallprall
+@cindex lineprall
+@cindex prallmordent
+@cindex mordent
+@cindex upmordent
+@cindex downmordent
+@cindex trill
+@cindex turn
+@cindex reverseturn
 
 @node Ornament scripts
 @unnumberedsubsec Ornament scripts
 
-@multitable @columnfractions .25 .25 .25 .25
+@multitable @columnfractions .22 .25 .25 .25
 
-@headitem
-Example
+@item
+@code{\prall}
+@lilypond[notime,relative=2]
+f^\prall e,_\prall b'\prall
+@end lilypond
 @tab
-Output
+@code{\prallup}
+@lilypond[notime,relative=2]
+f^\prallup e,_\prallup b'\prallup
+@end lilypond
 @tab
-Example
+@code{\pralldown}
+@lilypond[notime,relative=2]
+f^\pralldown e,_\pralldown b'\pralldown
+@end lilypond
 @tab
-Output
+@code{\upprall}
+@lilypond[notime,relative=2]
+f^\upprall e,_\upprall b'\upprall
+@end lilypond
 
 @item
-@code{\prall}
+@code{\downprall}
+@lilypond[notime,relative=2]
+f^\downprall e,_\downprall b'\downprall
+@end lilypond
 @tab
-@lilypond[notime,ragged-right,relative=2]
-f\prall e,_\prall
+@code{\prallprall}
+@lilypond[notime,relative=2]
+f^\prallprall e,_\prallprall b'\prallprall
 @end lilypond
 @tab
-@code{\mordent}
+@code{\lineprall}
+@lilypond[notime,relative=2]
+f^\lineprall e,_\lineprall b'\lineprall
+@end lilypond
 @tab
-@lilypond[notime,ragged-right,relative=2]
-f\mordent e,_\mordent
+@code{\prallmordent}
+@lilypond[notime,relative=2]
+f^\prallmordent e,_\prallmordent b'\prallmordent
 @end lilypond
 
 @item
-@code{\prallmordent}
+@code{\mordent}
+@lilypond[notime,relative=2]
+f^\mordent e,_\mordent b'\mordent
+@end lilypond
 @tab
-@lilypond[notime,ragged-right,relative=2]
-f\prallmordent e,_\prallmordent
+@code{\upmordent}
+@lilypond[notime,relative=2]
+f^\upmordent e,_\upmordent b'\upmordent
 @end lilypond
 @tab
-@code{\turn}
+@code{\downmordent}
+@lilypond[notime,relative=2]
+f^\downmordent e,_\downmordent b'\downmordent
+@end lilypond
 @tab
-@lilypond[notime,ragged-right,relative=2]
-f\turn e,_\turn
+@code{\trill}
+@lilypond[notime,relative=2]
+f^\trill e,_\trill b'\trill
 @end lilypond
 
 @item
-@code{\upprall}
-@tab
-@lilypond[notime,ragged-right,relative=2]
-f\upprall e,_\upprall
+@code{\turn}
+@lilypond[notime,relative=2]
+f^\turn e,_\turn b'\reverseturn
 @end lilypond
 @tab
-@code{\downprall}
-@tab
-@lilypond[notime,ragged-right,relative=2]
-f\downprall e,_\downprall
+@code{\reverseturn}
+@lilypond[notime,relative=2]
+f^\reverseturn e,_\reverseturn b'\reverseturn
 @end lilypond
 
+@end multitable
+
+@cindex fermata
+@cindex shortfermata
+@cindex longfermata
+@cindex verylongfermata
+
+@node Fermata scripts
+@unnumberedsubsec Fermata scripts
+
+@multitable @columnfractions .22 .25 .25 .25
+
 @item
-@code{\upmordent}
+@code{\shortfermata}
+@lilypond[notime,relative=2]
+f^\shortfermata e,_\shortfermata b'\shortfermata
+@end lilypond
 @tab
-@lilypond[notime,ragged-right,relative=2]
-f\upmordent e,_\upmordent
+@code{\fermata}
+@lilypond[notime,relative=2]
+f^\fermata e,_\fermata b'\fermata
 @end lilypond
 @tab
-@code{\downmordent}
+@code{\longfermata}
+@lilypond[notime,relative=2]
+f^\longfermata e,_\longfermata b'\longfermata
+@end lilypond
 @tab
-@lilypond[notime,ragged-right,relative=2]
-f\downmordent e,_\downmordent
+@code{\verylongfermata}
+@lilypond[notime,relative=2]
+f^\verylongfermata e,_\verylongfermata b'\verylongfermata
 @end lilypond
 
+@end multitable
+
+@cindex upbow
+@cindex downbow
+@cindex flageolet
+@cindex open
+@cindex halfopen
+@cindex lheel
+@cindex rheel
+@cindex ltoe
+@cindex rtoe
+@cindex snappizzicato
+@cindex stopped
+
+@node Instrument-specific scripts
+@unnumberedsubsec Instrument-specific scripts
+
+@multitable @columnfractions .22 .25 .25 .25
+
 @item
-@code{\lineprall}
+@code{\upbow}
+@lilypond[notime,relative=2]
+f^\upbow e,_\upbow b'\upbow
+@end lilypond
 @tab
-@lilypond[notime,ragged-right,relative=2]
-f\lineprall e,_\lineprall
+@code{\downbow}
+@lilypond[notime,relative=2]
+f^\downbow e,_\downbow b'\downbow
 @end lilypond
 @tab
-@code{\prallprall}
+@code{\flageolet}
+@lilypond[notime,relative=2]
+f^\flageolet e,_\flageolet b'\flageolet
+@end lilypond
 @tab
-@lilypond[notime,ragged-right,relative=2]
-f\prallprall e,_\prallprall
+@code{\open}
+@lilypond[notime,relative=2]
+f^\open e,_\open b'\open
 @end lilypond
 
 @item
-@code{\pralldown}
+@code{\halfopen}
+@lilypond[notime,relative=2]
+f^\halfopen e,_\halfopen b'\halfopen
+@end lilypond
 @tab
-@lilypond[notime,ragged-right,relative=2]
-f\pralldown e,_\pralldown
+@code{\lheel}
+@lilypond[notime,relative=2]
+f^\lheel e,_\lheel b'\lheel
 @end lilypond
 @tab
-@code{\prallup}
+@code{\rheel}
+@lilypond[notime,relative=2]
+f^\rheel e,_\rheel b'\rheel
+@end lilypond
 @tab
-@lilypond[notime,ragged-right,relative=2]
-f\prallup e,_\prallup
+@code{\ltoe}
+@lilypond[notime,relative=2]
+f^\ltoe e,_\ltoe b'\ltoe
 @end lilypond
 
 @item
-@code{\reverseturn}
-@tab
-@lilypond[notime,ragged-right,relative=2]
-f\reverseturn e,_\reverseturn
+@code{\rtoe}
+@lilypond[notime,relative=2]
+f^\rtoe e,_\rtoe b'\rtoe
 @end lilypond
 @tab
-@code{\trill}
+@code{\snappizzicato}
+@lilypond[notime,relative=2]
+f^\snappizzicato e,_\snappizzicato b'\snappizzicato
+@end lilypond
 @tab
-@lilypond[notime,ragged-right,relative=2]
-f\trill e,_\trill
+@code{\stopped} or @code{-+}
+@lilypond[notime,relative=2]
+f^\stopped e,_\stopped b'\stopped
 @end lilypond
 
 @end multitable
 
-@node Fermata scripts
-@unnumberedsubsec Fermata scripts
+@cindex segno
+@cindex coda
+@cindex varcoda
 
-@lilypond[quote]
-\include "script-chart.ly"
-\new RhythmicStaff { \scriptStaff #fermatas }
-@end lilypond
+@node Repeat sign scripts
+@unnumberedsubsec Repeat sign scripts
 
-@node Instrument-specific scripts
-@unnumberedsubsec Instrument-specific scripts
+@multitable @columnfractions .22 .25 .25 .25
 
-@lilypond[quote]
-\include "script-chart.ly"
-\new RhythmicStaff { \scriptStaff #instrument-specific }
+@item
+@code{\segno}
+@lilypond[notime,relative=2]
+f^\segno e,_\segno b'\segno
+@end lilypond
+@tab
+@code{\coda}
+@lilypond[notime,relative=2]
+f^\coda e,_\coda b'\coda
+@end lilypond
+@tab
+@code{\varcoda}
+@lilypond[notime,relative=2]
+f^\varcoda e,_\varcoda b'\varcoda
 @end lilypond
 
-@node Repeat sign scripts
-@unnumberedsubsec Repeat sign scripts
+@end multitable
 
-@lilypond[quote]
-\include "script-chart.ly"
-\new RhythmicStaff { \scriptStaff #repeats }
-@end lilypond
+@cindex accentus
+@cindex circulus
+@cindex ictus
+@cindex semicirculus
+@cindex signumcongruentiae
 
 @node Ancient scripts
 @unnumberedsubsec Ancient scripts
 
-@lilypond[quote]
-\include "script-chart.ly"
+@multitable @columnfractions .22 .25 .25 .25
+
+@item
+@code{\accentus}
+@lilypond[notime]
 \include "gregorian.ly"
-\new VaticanaStaff { \scriptStaffAncient #ancient }
+\new VaticanaStaff { e'^\accentus s4 f_\accentus s4 b\accentus}
 @end lilypond
+@tab
+@code{\circulus}
+@lilypond[notime]
+\include "gregorian.ly"
+\new VaticanaStaff { e'^\circulus s4 f_\circulus s4 b\circulus  }
+@end lilypond
+@tab
+@code{\ictus}
+@lilypond[notime]
+\include "gregorian.ly"
+\new VaticanaStaff { e'^\ictus s4 f_\ictus s4 b\ictus}
+@end lilypond
+
+@item
+@code{\semicirculus}
+@lilypond[notime]
+\include "gregorian.ly"
+\new VaticanaStaff {
+  e'^\semicirculus s4 f_\semicirculus s4 b\semicirculus
+}
+@end lilypond
+@tab
+@code{\signumcongruentiae}
+@lilypond[notime]
+\include "gregorian.ly"
+\new VaticanaStaff {
+  e'^\signumcongruentiae s4
+  f_\signumcongruentiae s4
+  b\signumcongruentiae
+}
+@end lilypond
+
+@end multitable
 
 
 @node Percussion notes
index 92ace48df055b1038425756ebcf9d86dc3d9bfc6..77b2d7ecc319e40f35a4f1fd9cba234ee48f047f 100644 (file)
@@ -273,7 +273,7 @@ To modify the duration of notes without printing a tuplet bracket, see
 @funindex tupletSpannerDuration
 
 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
-{entering-several-tuplets-using-only-one--times-command.ly}
+{entering-several-tuplets-using-only-one--tuplet-command.ly}
 
 @cindex Tuplet number changes
 
index b2da6c861b26921356eda5d4693a56ebcffe418a..b4b3d7a80b95d8705c505be54fdddf6c6eb884c7 100644 (file)
@@ -1493,9 +1493,9 @@ how to modify them.
 @menu
 * Manual page breaking::
 * Optimal page breaking::
-* Optimal page turning::
 * Minimal page breaking::
 * One-line page breaking::
+* Optimal page turning::
 @end menu
 
 
index bdaf405cafd6c2ef33e206fcc8e27861870f9605..4faff7b0bb3ff80d38b47e59de253cb93e9767e8 100644 (file)
   lsrtags = "staff-notation, symbols-and-glyphs, vocal-music"
 
   texidoc = "
-This snippet defines the @code{\\splitStaffBarLine} command, which adds
-arrows in north-east and south-east directions at a bar line, to denote
-that several voices sharing a staff will each continue on a staff of
-their own in the next system.
+This snippet defines the @code{\\splitStaffBarLine},
+@code{convUpStaffBarLine} and @code{convDownStaffBarLine} commands.
+These add arrows at a bar line, to denote that several voices sharing a
+staff will each continue on a staff of their own in the next system, or
+that voices split in this way recombine.
 
 "
   doctitle = "Adding indicators to staves which get split after a break"
 } % begin verbatim
 
 #(define-markup-command (arrow-at-angle layout props angle-deg length fill)
-  (number? number? boolean?)
-  (let* (
-      (PI-OVER-180 (/ (atan 1 1) 34))
-      (degrees->radians (lambda (degrees) (* degrees PI-OVER-180)))
-      (angle-rad (degrees->radians angle-deg))
-      (target-x (* length (cos angle-rad)))
-      (target-y (* length (sin angle-rad))))
-    (interpret-markup layout props
-      (markup
-      #:translate (cons (/ target-x 2) (/ target-y 2))
-      #:rotate angle-deg
-      #:translate (cons (/ length -2) 0)
-      #:concat (#:draw-line (cons length 0)
-      #:arrow-head X RIGHT fill)))))
+   (number? number? boolean?)
+   (let* (
+           (PI-OVER-180 (/ (atan 1 1) 34))
+           (degrees->radians (lambda (degrees) (* degrees PI-OVER-180)))
+           (angle-rad (degrees->radians angle-deg))
+           (target-x (* length (cos angle-rad)))
+           (target-y (* length (sin angle-rad))))
+     (interpret-markup layout props
+       (markup
+        #:translate (cons (/ target-x 2) (/ target-y 2))
+        #:rotate angle-deg
+        #:translate (cons (/ length -2) 0)
+        #:concat (#:draw-line (cons length 0)
+                   #:arrow-head X RIGHT fill)))))
+
+
+splitStaffBarLineMarkup = \markup \with-dimensions #'(0 . 0) #'(0 . 0) {
+  \combine
+  \arrow-at-angle #45 #(sqrt 8) ##t
+  \arrow-at-angle #-45 #(sqrt 8) ##t
+}
 
 splitStaffBarLine = {
   \once \override Staff.BarLine.stencil =
   #(lambda (grob)
-    (ly:stencil-combine-at-edge
-    (ly:bar-line::print grob)
-    X RIGHT
-    (grob-interpret-markup grob #{
-      \markup\with-dimensions #'(0 . 0) #'(0 . 0) {
-        \translate #'(5.95 . .14)\arrow-at-angle #45 #(sqrt 8) ##t
-        \translate #'(5.35 . -.13)\arrow-at-angle #-45 #(sqrt 8) ##t }#})
-    0))
+     (ly:stencil-combine-at-edge
+      (ly:bar-line::print grob)
+      X RIGHT
+      (grob-interpret-markup grob splitStaffBarLineMarkup)
+      0))
   \break
 }
 
 convDownStaffBarLine = {
   \once \override Staff.BarLine.stencil =
   #(lambda (grob)
-    (ly:stencil-combine-at-edge
-    (ly:bar-line::print grob)
-    X RIGHT
-    (grob-interpret-markup grob #{
+     (ly:stencil-combine-at-edge
+      (ly:bar-line::print grob)
+      X RIGHT
+      (grob-interpret-markup grob #{
         \markup\with-dimensions #'(0 . 0) #'(0 . 0) {
-          \translate #'(5.3 . -.13)\arrow-at-angle #-45 #(sqrt 8) ##t }#})
+          \translate #'(0 . -.13)\arrow-at-angle #-45 #(sqrt 8) ##t
+        }#})
       0))
   \break
 }
@@ -65,99 +71,117 @@ convDownStaffBarLine = {
 convUpStaffBarLine = {
   \once \override Staff.BarLine.stencil =
   #(lambda (grob)
-    (ly:stencil-combine-at-edge
-    (ly:bar-line::print grob)
-    X RIGHT
-    (grob-interpret-markup grob #{
+     (ly:stencil-combine-at-edge
+      (ly:bar-line::print grob)
+      X RIGHT
+      (grob-interpret-markup grob #{
         \markup\with-dimensions #'(0 . 0) #'(0 . 0) {
-          \translate #'(5.28 . .14)\arrow-at-angle #45 #(sqrt 8) ##t }#})
+          \translate #'(0 . .14)\arrow-at-angle #45 #(sqrt 8) ##t
+        }#})
       0))
   \break
 }
 
 
+\paper {
+  ragged-right = ##t
+  short-indent = 10\mm
+}
+
+separateSopranos = {
+  \set Staff.instrumentName = "AI AII"
+  \set Staff.shortInstrumentName = "AI AII"
+  \splitStaffBarLine
+  \change Staff = "up"
+}
+convSopranos = {
+  \convDownStaffBarLine
+  \change Staff = "shared"
+  \set Staff.instrumentName = "S A"
+  \set Staff.shortInstrumentName = "S A"
+}
+
+sI = {
+  \voiceOne
+  \repeat unfold 4 f''2
+  \separateSopranos
+  \repeat unfold 4 g''2
+  \convSopranos
+  \repeat unfold 4 c''2
+}
+sII = {
+  s1*2
+  \voiceTwo
+  \change Staff = "up"
+  \repeat unfold 4 d''2
+}
+aI = {
+  \voiceTwo
+  \repeat unfold 4 a'2
+  \voiceOne
+  \repeat unfold 4 b'2
+  \convUpStaffBarLine
+  \voiceTwo
+  \repeat unfold 4 g'2
+}
+aII = {
+  s1*2
+  \voiceTwo
+  \repeat unfold 4 g'2
+}
+ten = {
+  \voiceOne
+  \repeat unfold 4 c'2
+  \repeat unfold 4 d'2
+  \repeat unfold 4 c'2
+}
+bas = {
+  \voiceTwo
+  \repeat unfold 4 f2
+  \repeat unfold 4 g2
+  \repeat unfold 4 c2
+}
+
 \score {
   <<
     \new ChoirStaff <<
-      \new Staff
-      \with {
-        instrumentName = #"H I + H II"
+      \new Staff = up \with {
+        instrumentName = "SI SII"
+        shortInstrumentName = "SI SII"
       } {
-        \key f\minor
-        <<
-          \repeat unfold 4 f''1
-          \\
-          \repeat unfold 4 des''1
-        >>
-        \key f\major
-        \splitStaffBarLine
-      }
-      \new Staff \with { instrumentName = #"Low" } {
-        \key f\minor
-        <<
-          \repeat unfold 4 bes'1
-          \\
-          \repeat unfold 4 g'1
-        >>
-        \key f\major
-      }
-
-      \new Staff \with { shortInstrumentName = #"I" } {
-        \key f \major
-        R1*4
-        \repeat unfold 2 { r4 f''2 r4 } \repeat unfold 2 e''1
-        \key f\minor
-        \convDownStaffBarLine
-      }
-      \new Staff \with { shortInstrumentName = #"II" } {
-        \key f \major
-        R1*4
-        \repeat unfold 4 bes'2 \repeat unfold 2 c''1
-        \key f\minor
-        \convUpStaffBarLine
+        s1*4
       }
 
-      \new Staff \with { shortInstrumentName = #"L" } {
-        \key f\major
-        R1*4
-        <<
-          \repeat unfold 4 g'1
-          \\
-          \repeat unfold 4 c'1
-        >>
-        \key f\minor
+      \new Staff = shared \with {
+        instrumentName = "S A"
+        shortInstrumentName = "S A"
+      } <<
+        \new Voice = sopI \sI
+        \new Voice = sopII \sII
+        \new Voice = altI \aI
+        \new Voice = altII \aII
+      >>
+      \new Lyrics \with {
+        alignBelowContext = up
       }
+      \lyricsto sopII { e f g h }
+      \new Lyrics \lyricsto altI { a b c d e f g h i j k l }
 
-      \new Staff
-      \with {
-        shortInstrumentName = #"I+II"
-      } {
-        \key f\minor
-        R1*8
-        <<
-          \repeat unfold 4 f''1
-          \\
-          \repeat unfold 4 des''1
-        >>
-      }
-      \new Staff \with { shortInstrumentName = #"L" } {
-        \key f\minor
-        R1*8
-        <<
-          \repeat unfold 4 bes'1
-          \\
-          \repeat unfold 4 g'1
-        >>
-      }
+      \new Staff = men \with {
+        instrumentName = "T B"
+        shortInstrumentName = "T B"
+      } <<
+        \clef F
+        \new Voice = ten \ten
+        \new Voice = bas \bas
+      >>
+      \new Lyrics \lyricsto bas { a b c d e f g h i j k l }
     >>
   >>
   \layout {
     \context {
       \Staff \RemoveEmptyStaves
-      \override VerticalAxisGroup #'remove-first = ##t
+      \override VerticalAxisGroup.remove-first = ##t
     }
   }
 }
-\paper {
-  ragged-right = ##t
-}
diff --git a/Documentation/snippets/beam-grouping-in-7-8-time.ly b/Documentation/snippets/beam-grouping-in-7-8-time.ly
deleted file mode 100644 (file)
index 9fff57e..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-%% DO NOT EDIT this file manually; it is automatically
-%% generated from LSR http://lsr.di.unimi.it
-%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
-%% and then run scripts/auxiliar/makelsr.py
-%%
-%% This file is in the public domain.
-\version "2.18.0"
-
-\header {
-  lsrtags = "rhythms"
-
-  texidoc = "
-There are no default automatic beam groupings specified for 7/8 time,
-so if automatic beams are required the grouping must be specified using
-<code>beatStructure</code>.  For example, to  group all beams 2-3-2 in
-7/8 time, specify beam endings at 2/8 and 5/8:
-
-"
-  doctitle = "Beam grouping in 7/8 time"
-} % begin verbatim
-
-\relative c'' {
-  \time 7/8
-  % rhythm 2-3-2
-  a8 a a a a a a
-  \set Score.beatStructure = #'(2 3 2)
-  a8 a a a a a a
-}
index d20801bedbe801389dff846f33bd2736aaddc576..9ac1693c96492374950b6a9fa8f58d7464b43acb 100644 (file)
@@ -11,8 +11,8 @@
 
   texidoc = "
 By default, only the numerator of the tuplet number is printed over the
-tuplet bracket, i.e., the denominator of the argument to the
-@code{\\times} command.
+tuplet bracket, i.e., the numerator of the argument to the
+@code{\\tuplet} command.
 
 Alternatively, num:den of the tuplet number may be printed, or the
 tuplet number may be suppressed altogether.
diff --git a/Documentation/snippets/correction-wanted.snippet-list b/Documentation/snippets/correction-wanted.snippet-list
deleted file mode 100644 (file)
index ed1279b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly
diff --git a/Documentation/snippets/entering-several-tuplets-using-only-one--times-command.ly b/Documentation/snippets/entering-several-tuplets-using-only-one--times-command.ly
deleted file mode 100644 (file)
index 5e67e60..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.11
-\version "2.17.11"
-
-\header {
-  lsrtags = "rhythms, syntax-and-expressions"
-
-  texidoc = "
-The property @code{tupletSpannerDuration} sets how long each of the
-tuplets contained within the brackets after @code{\\tuplet} should last.
-Many consecutive tuplets can then be placed within a single
-@code{\\tuplet} expression, thus saving typing.
-
-There are several ways to set @code{tupletSpannerDuration}.  The command
-@code{\\tupletSpan} sets it to a given duration, and clears it when
-instead of a duration @code{\\default} is specified.  Another way is
-to use an optional argument with @code{\\tuplet}.
-"
-  doctitle = "Entering several tuplets using only one \\tuplet command"
-} % begin verbatim
-
-
-
-\relative c' {
-  \time 2/4
-  \tupletSpan 4
-  \tuplet 3/2 { c8^"\\tupletSpan 4" c c c c c }
-  \tupletSpan \default
-  \tuplet 3/2 { c8^"\\tupletSpan \\default" c c c c c }
-  \tuplet 3/2 4 { c8^"\\tuplet 3/2 4 {...}" c c c c c }
-}
diff --git a/Documentation/snippets/entering-several-tuplets-using-only-one--tuplet-command.ly b/Documentation/snippets/entering-several-tuplets-using-only-one--tuplet-command.ly
new file mode 100644 (file)
index 0000000..5d00507
--- /dev/null
@@ -0,0 +1,34 @@
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
+
+\header {
+  lsrtags = "rhythms, syntax-and-expressions"
+
+  texidoc = "
+The property @code{tupletSpannerDuration} sets how long each of the
+tuplets contained within the brackets after @code{\\tuplet} should
+last. Many consecutive tuplets can then be placed within a single
+@code{\\tuplet} expression, thus saving typing.
+
+There are several ways to set @code{tupletSpannerDuration}.  The
+command @code{\\tupletSpan} sets it to a given duration, and clears it
+when instead of a duration @code{\\default} is specified.  Another way
+is to use an optional argument with @code{\\tuplet}.
+
+"
+  doctitle = "Entering several tuplets using only one \\tuplet command"
+} % begin verbatim
+
+\relative c' {
+  \time 2/4
+  \tupletSpan 4
+  \tuplet 3/2 { c8^"\\tupletSpan 4" c c c c c }
+  \tupletSpan \default
+  \tuplet 3/2 { c8^"\\tupletSpan \\default" c c c c c }
+  \tuplet 3/2 4 { c8^"\\tuplet 3/2 4 {...}" c c c c c }
+}
index b7caf83f1e16aa84bda78e725057fd76559506d7..2c86cc87f67d101fa76d943b9c01c4597dddf6e4 100644 (file)
@@ -1,11 +1,10 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.27
-\version "2.17.27"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "headword"
@@ -17,21 +16,13 @@ Expressive headword
   doctitle = "Expressive headword"
 } % begin verbatim
 
-\include "english.ly"
-
 % NR 1.3 Expressive marks
 
 % L. v. Beethoven, Op. 49 no. 1
 % Piano sonata 19 - "Leichte Sonate"
 % measures 1 - 12
 
-%\layout {
-%   \context {
-%      \Score
-%      \override SpacingSpanner.base-shortest-duration =
-%         #(ly:make-moment 1/20)
-%   }
-%}
+\include "english.ly"
 
 \new PianoStaff <<
 
@@ -272,5 +263,4 @@ Expressive headword
       <d' fs>4 \fermata
       r8 r4 r8
    }
-
 >>
index 4656fac4430b740aa164f4e84ffe36158e7fe49e..52ec92978198713a4e1bb06fc5346c16110bb2db 100644 (file)
@@ -1,29 +1,29 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.6
-\version "2.17.6"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "staff-notation, tweaks-and-overrides"
+
   texidoc = "
-A glissando which extends into several @code{\\alternative} blocks
-can be simulated by adding a hidden grace note with a glissando
-at the start of each @code{\\alternative} block.  The grace note
-should be at the same pitch as the note which starts the initial
-glissando.  This is implemented here with a music function which
-takes the pitch of the grace note as its argument.
+A glissando which extends into several @code{\\alternative} blocks can
+be simulated by adding a hidden grace note with a glissando at the
+start of each @code{\\alternative} block.  The grace note should be at
+the same pitch as the note which starts the initial glissando.  This is
+implemented here with a music function which takes the pitch of the
+grace note as its argument.
 
 Note that in polyphonic music the grace note must be matched with
 corresponding grace notes in all other voices.
+
 "
   doctitle = "Extending glissandi across repeats"
 } % begin verbatim
 
-
 repeatGliss = #(define-music-function (parser location grace)
   (ly:pitch?)
   #{
@@ -67,4 +67,4 @@ music =  \relative c' {
       \context TabVoice { \clef "moderntab" \music }
     >>
   >>
-}
\ No newline at end of file
+}
index b5b45281fd4b236c5a3cdbc238d54d79b51ba451..4274440b67496c381847e2c9740a7930824c4fe5 100644 (file)
@@ -19,12 +19,9 @@ useful for wind instruments.
 
 centermarkup = {
   \once \override TextScript.self-alignment-X = #CENTER
-  \once \override TextScript.X-offset =#(ly:make-simple-closure
-    `(,+
-      ,(ly:make-simple-closure (list
-        ly:self-alignment-interface::centered-on-x-parent))
-      ,(ly:make-simple-closure (list
-        ly:self-alignment-interface::x-aligned-on-self))))
+  \once \override TextScript.X-offset =#(lambda (g)
+  (+ (ly:self-alignment-interface::centered-on-x-parent g)
+     (ly:self-alignment-interface::x-aligned-on-self g)))
 }
 
 \score {
index 6b8f910d87befa5bb75c7813b931a50692890b7c..8b2295686418d98e60bb6c3fbb31141f12e7c403 100644 (file)
@@ -1,31 +1,20 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.30
-% INSPIRATIONAL HEADER FOR LILYPOND DOCUMENTATION fretted-strings %
-% Passage from Johann Kaspar Mertz "Opern Revue, Op. 8, no. 17"   %
-% on melodies from Bellini's "Norma"                              %
-%*****************************************************************%
-
-\version "2.17.30"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "headword"
-  texidoc = ""
-  doctitle = "headword"
-} % begin verbatim
-
 
+  texidoc = "
+Fretted headword
 
-\layout {
-  \context {
-    \Score
-    \remove "Bar_number_engraver"
-  }
-}
+"
+  doctitle = "Fretted headword"
+} % begin verbatim
 
 %%%% shortcuts
 % fingering orientations
@@ -141,10 +130,10 @@ bass = \relative c {
   \layout {
     \context {
       \Score
+      \remove "Bar_number_engraver"
       \override Fingering.staff-padding = #'()
       \omit TupletNumber
       \override TupletBracket.bracket-visibility = ##f
     }
   }
-  \midi { }
 }
index 99579b27f46d418c2ab24f4ae7f68c0715550c9e..a1121ae24cde3effbc2f8272ac566784e561f2eb 100644 (file)
@@ -1,24 +1,22 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.6
-\version "2.17.6"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "rhythms, tweaks-and-overrides"
 
   texidoc = "
-The @code{stencil} property of the Flag grob can be set to a custom scheme
-function to generate the glyph for the flag.
+The @code{stencil} property of the @code{Flag} grob can be set to a
+custom scheme function to generate the glyph for the flag.
 
 "
   doctitle = "Generating custom flags"
 } % begin verbatim
 
-
 #(define-public (weight-flag grob)
    (let* ((stem-grob (ly:grob-parent grob X))
           (log (- (ly:grob-property stem-grob 'duration-log) 2))
index 32caca079cb857828d4ccf2ab0a8e9a8597b5eb3..f9e7632cad75d005142db57ba4a1ec1171889980 100644 (file)
@@ -1,19 +1,21 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.6
-\version "2.17.6"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "expressive-marks, staff-notation, tweaks-and-overrides"
+
+  texidoc = "
+@code{NoteColumn} grobs can be skipped over by glissandi.
+
+"
   doctitle = "Glissandi can skip grobs"
-  texidoc = "@code{NoteColumn} grobs can be skipped over by glissandi."
 } % begin verbatim
 
-
 \relative c' {
   a2 \glissando
   \once \override NoteColumn.glissando-skip = ##t
index e2e2b802f24fede1310cb090275fc24d0b14ca1d..c77388cf8796bf8b8046e65a0e2c66a4b5ccec1a 100644 (file)
@@ -1,25 +1,24 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.30
-\version "2.17.30"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "fretted-strings"
 
   texidoc = "
 Unlike glissandos, slides may go from an imprecise point of the
-fretboard to a specific fret. A good way to do that is to add a grace
-hidden note before the note which is actually played, as demonstrated
-in the following example.
+fretboard to a specific fret. A good way to do this is to add a hidden
+grace note before the note which is actually played, as demonstrated in
+the following example.
+
 "
   doctitle = "Guitar slides"
 } % begin verbatim
 
-
 %% Hide fret number: useful to draw slide into/from a casual point of
 %% the fretboard.
 hideFretNumber = {
index 880a2cf8fdef9a52910477abe15fc3eb400d3604..569e77bded3075fa8ee38fce82d9761393c0ce80 100644 (file)
@@ -1,25 +1,23 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.16.0
-\version "2.16.0"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "editorial-annotations, fretted-strings"
 
   texidoc = "
 When using hammer-on or pull-off with chorded notes, only a single arc
-is drawn. However @q{double arcs} are possible by setting the
+is drawn. However @qq{double arcs} are possible by setting the
 @code{doubleSlurs} property to @code{#t}.
 
 "
   doctitle = "Hammer on and pull off using chords"
 } % begin verbatim
 
-
 \new TabStaff {
   \relative c' {
     % chord hammer-on and pull-off
index df84036ae8ade7fe0785b222b6ebdf0da89ed0a1..e44c81786a1d18d5485eba9efea25a438de12eb4 100644 (file)
@@ -1,24 +1,22 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.16.0
-\version "2.16.0"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "editorial-annotations, fretted-strings"
 
   texidoc = "
-The arc of hammer-on and pull-off is upwards in voices one and three and
-downwards in voices two and four:
+The arc of hammer-on and pull-off is upwards in voices one and three
+and downwards in voices two and four:
 
 "
   doctitle = "Hammer on and pull off using voices"
 } % begin verbatim
 
-
 \new TabStaff {
   \relative c' {
     << { \voiceOne g2( a) }
index 57c830a2ceb4a8cc66688f27a5f0105b84cb9f26..fbc12b9f6bcf1f3ea0a5967ac0e94af57a0fb28d 100644 (file)
@@ -1,11 +1,10 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.16.0
-\version "2.16.0"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "editorial-annotations, fretted-strings"
@@ -17,7 +16,6 @@ Hammer-on and pull-off can be obtained using slurs.
   doctitle = "Hammer on and pull off"
 } % begin verbatim
 
-
 \new TabStaff {
   \relative c' {
     d4( e\2)
index 8c939d25c1d7e4532359f69b253c249cad5c80a4..53d7f2120e23736f8c8ca8b677c03e0a287306ee 100644 (file)
@@ -1,11 +1,10 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.15
-\version "2.17.15"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "contemporary-notation, percussion, real-music, rhythms"
@@ -19,7 +18,6 @@ is the template of a real Balkan song!).
   doctitle = "Heavily customized polymetric time signatures"
 } % begin verbatim
 
-
 melody = \relative c'' {
   \set Staff.instrumentName = #"Bb Sop."
   \key g \major
index 724062ec24ee2f49b59fe4f0bb5d98bad83c642c..fb0629e36a60ddb784196f115c85e29115a77cfd 100644 (file)
@@ -1,14 +1,13 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.6
-\version "2.17.6"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
-  lsrtags = "correction-wanted, expressive-marks, tweaks-and-overrides, version-specific"
+  lsrtags = "expressive-marks, tweaks-and-overrides, version-specific"
 
   texidoc = "
 Some dynamic expressions involve additional text, like @qq{sempre pp}.
@@ -23,13 +22,13 @@ before the note with the dynamics to manually shift it to the correct
 position. Drawback: This has to be done manually each time you use that
 dynamic markup...
 
-* Add some padding (@code{#:hspace 7.1}) into the
-definition of your custom dynamic mark, so that after lilypond
-center-aligns it, it is already correctly aligned. Drawback: The
-padding really takes up that space and does not allow any other markup
-or dynamics to be shown in that position.
+* Add some padding (@code{#:hspace 7.1}) into the definition of your
+custom dynamic mark, so that after lilypond center-aligns it, it is
+already correctly aligned. Drawback: The padding really takes up that
+space and does not allow any other markup or dynamics to be shown in
+that position.
 
-* Shift the dynamic script @code{\\once\\override ...X-offset = ..}.
+* Shift the dynamic script @code{\\once\\override ... .X-offset = ..}.
 Drawback: @code{\\once\\override} is needed for every invocation!
 
 * Set the dimensions of the additional text to 0 (using
@@ -44,14 +43,17 @@ dynamic-script.
 
 * Set an explicit alignment inside the dynamic-script. By default, this
 won't have any effect, only if one sets X-offset! Drawback: One needs
-to set @code{DynamicText #'X-offset}, which will apply to all dynamic
+to set @code{DynamicText.X-offset}, which will apply to all dynamic
 texts! Also, it is aligned at the right edge of the additional text,
 not at the center of pp.
+
+
+
+
 "
   doctitle = "Horizontally aligning custom dynamics (e.g. \"sempre pp\" \"piu f\" \"subito p\")"
 } % begin verbatim
 
-
 \header { title = "Horizontally aligning custom dynamics" }
 
 \paper { ragged-right = ##f }
index 1a84268db61adb0477c4f709530d357e3dd58c95..9993627f73c9b0619a5b654e2d4c5dff6d3a079e 100644 (file)
@@ -1,11 +1,10 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.24
-\version "2.17.24"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "editorial-annotations, expressive-marks, staff-notation, tweaks-and-overrides"
@@ -31,25 +30,22 @@ affecting the other.  It may also give some problems with vertical
 spacing, since using @code{extra-offset} does not change the bounding
 box of the mark from its original value.
 
-
-
 "
   doctitle = "How to print two rehearsal marks above and below the same barline (method 1)"
 } % begin verbatim
 
-
 \relative c'{
-    c d e f |
-    \once \override Score.RehearsalMark.extra-offset = #'(0 . -8.5)
-    \once \override Score.RehearsalMark.baseline-skip = #9
-    \mark \markup \center-column { \circle 1 \box A }
-    g f e d |
-    \once \override Score.RehearsalMark.extra-offset = #'(0 . -8.5)
-    \once \override Score.RehearsalMark.baseline-skip = #9
-    \mark \markup \center-column { \flat { \bold \small \italic Fine. } }
-    g f e d |
-    \once \override Score.RehearsalMark.extra-offset = #'(0 . -8.5)
-    \once \override Score.RehearsalMark.baseline-skip = #9
-    \override Score.RehearsalMark.break-visibility = #begin-of-line-invisible
-    \mark \markup \center-column { \fermata \box z }
+  c d e f |
+  \once \override Score.RehearsalMark.extra-offset = #'(0 . -8.5)
+  \once \override Score.RehearsalMark.baseline-skip = #9
+  \mark \markup \center-column { \circle 1 \box A }
+  g f e d |
+  \once \override Score.RehearsalMark.extra-offset = #'(0 . -8.5)
+  \once \override Score.RehearsalMark.baseline-skip = #9
+  \mark \markup \center-column { \flat { \bold \small \italic Fine. } }
+  g f e d |
+  \once \override Score.RehearsalMark.extra-offset = #'(0 . -8.5)
+  \once \override Score.RehearsalMark.baseline-skip = #9
+  \override Score.RehearsalMark.break-visibility = #begin-of-line-invisible
+  \mark \markup \center-column { \fermata \box z }
 }
index b078cc0f538a3e3c5879103f08abf5429019f359..4674257d0d43e3b042f7da9303f7b9641166da4c 100644 (file)
@@ -1,22 +1,22 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.30
-\version "2.17.30"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
-  lsrtags = "staff-notation, ancient-notation, really-cool"
+  lsrtags = "ancient-notation, really-cool, staff-notation"
+
   texidoc = "
 Incipits can be added using the instrument name grob, but keeping
 separate the instrument name definition and the incipit definition.
+
 "
   doctitle = "Incipit"
 } % begin verbatim
 
-
 incipit =
 #(define-music-function (parser location incipit-music) (ly:music?)
   #{
@@ -25,29 +25,29 @@ incipit =
     \once \override Staff.InstrumentName.padding = #0.3
     \once \override Staff.InstrumentName.stencil =
       #(lambda (grob)
-        (let* ((instrument-name (ly:grob-property grob 'long-text)))
-          (set! (ly:grob-property grob 'long-text)
-                #{ \markup
-                     \score
-                        {
-                          { \context MensuralStaff \with {
-                               instrumentName = #instrument-name
-                            } $incipit-music
-                          }
-                          \layout { $(ly:grob-layout grob)
-                                    line-width = \indent
-                                    indent =
-                               % primitive-eval is probably easiest for
-                               % escaping lexical closure and evaluating
-                               % everything respective to (current-module).
-                                    #(primitive-eval
+   (let* ((instrument-name (ly:grob-property grob 'long-text)))
+     (set! (ly:grob-property grob 'long-text)
+     #{ \markup
+          \score
+             {
+         { \context MensuralStaff \with {
+                          instrumentName = #instrument-name
+                       } $incipit-music
+         }
+                     \layout { $(ly:grob-layout grob)
+                   line-width = \indent
+                         indent =
+        % primitive-eval is probably easiest for
+        % escaping lexical closure and evaluating
+        % everything respective to (current-module).
+                               #(primitive-eval
                                        '(or (false-if-exception (- indent incipit-width))
-                                           (* 0.5 indent)))
-                                    ragged-right = ##f
-                                    ragged-last = ##f
-                                    system-count = #1 }
-                        }
-                 #})
+              (* 0.5 indent)))
+                   ragged-right = ##f
+                   ragged-last = ##f
+                   system-count = #1 }
+       }
+      #})
            (system-start-text::print grob)))
   #})
 
index 388398c02d8fd948cb5c072498734972c45bc58c..a79375f8e4bfbc1530639c35aa4d5f8627b35a0a 100644 (file)
@@ -1,11 +1,10 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.15
-\version "2.17.15"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "real-music, staff-notation"
@@ -18,7 +17,6 @@ contains a @code{\\score} block instead of texts or marks.
   doctitle = "Inserting score fragments above a staff as markups"
 } % begin verbatim
 
-
 tuning = \markup {
   \score {
     \new Staff \with { \remove "Time_signature_engraver" }
index 4f0570da2c59e251d2e7572876132ae3e775a3b3..5034025426ba1bf7b389139ada3cbe6f181fecbb 100644 (file)
@@ -1,14 +1,13 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.30
-\version "2.17.30"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
-  lsrtags = "keyboards, percussion, fretted-strings, template, real-music"
+  lsrtags = "fretted-strings, keyboards, percussion, real-music, template"
 
   texidoc = "
 This is quite an advanced template, for a jazz ensemble. Note that all
@@ -20,7 +19,6 @@ music is within a @code{\\transpose} section.
   doctitle = "Jazz combo template"
 } % begin verbatim
 
-
 \header {
   title = "Song"
   subtitle = "(tune)"
index 177675afc54827856be5d33fbc4d2ef18bd6029b..07d4f34ea1f01c2116cf5d6c7eef8a617efadd4e 100644 (file)
@@ -1,11 +1,10 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.24
-\version "2.17.24"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "headword"
index 16799a19cfde7d9a4d90cae5e2d7d1f158773331..d469078f5dde38ecc37f9fe565f2d10056acbd57 100644 (file)
@@ -1,25 +1,23 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.30
-\version "2.17.30"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "staff-notation, tweaks-and-overrides"
 
   texidoc = "
 Setting the @code{breakable} property to @code{#t} in combination with
-@code{after-line-breaking} allows a glissando to break if it occurs
-at a line break:
-"
+@code{after-line-breaking} allows a glissando to break if it occurs at
+a line break:
 
+"
   doctitle = "Making glissandi breakable"
 } % begin verbatim
 
-
 glissandoSkipOn = {
   \override NoteColumn.glissando-skip = ##t
   \hide NoteHead
index 8cacc7ba9000e6a15a69f6224402366bda08a90a..7d4be06b8690d957861b79c9c6770af8ec0eb9d3 100644 (file)
@@ -1,11 +1,10 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.18
-\version "2.17.18"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "really-simple, rhythms, version-specific"
@@ -19,7 +18,6 @@ can be printed on the same staff line, using the following setting.
   doctitle = "Merging multi-measure rests in a polyphonic part"
 } % begin verbatim
 
-
 normalPos = \revert MultiMeasureRest.direction
 
 {
diff --git a/Documentation/snippets/new/entering-several-tuplets-using-only-one--times-command.ly b/Documentation/snippets/new/entering-several-tuplets-using-only-one--times-command.ly
deleted file mode 100644 (file)
index 0b6af1b..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-\version "2.17.11"
-
-\header {
-  lsrtags = "rhythms, syntax-and-expressions"
-
-  texidoc = "
-The property @code{tupletSpannerDuration} sets how long each of the
-tuplets contained within the brackets after @code{\\tuplet} should last.
-Many consecutive tuplets can then be placed within a single
-@code{\\tuplet} expression, thus saving typing.
-
-There are several ways to set @code{tupletSpannerDuration}.  The command
-@code{\\tupletSpan} sets it to a given duration, and clears it when
-instead of a duration @code{\\default} is specified.  Another way is
-to use an optional argument with @code{\\tuplet}.
-"
-  doctitle = "Entering several tuplets using only one \\tuplet command"
-}
-
-
-\relative c' {
-  \time 2/4
-  \tupletSpan 4
-  \tuplet 3/2 { c8^"\\tupletSpan 4" c c c c c }
-  \tupletSpan \default
-  \tuplet 3/2 { c8^"\\tupletSpan \\default" c c c c c }
-  \tuplet 3/2 4 { c8^"\\tuplet 3/2 4 {...}" c c c c c }
-}
diff --git a/Documentation/snippets/new/expressive-headword.ly b/Documentation/snippets/new/expressive-headword.ly
deleted file mode 100644 (file)
index 1f9cf0f..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-\version "2.17.27"
-
-\header {
-  lsrtags = "headword"
-
-  texidoc = "
-Expressive headword
-
-"
-  doctitle = "Expressive headword"
-}
-\include "english.ly"
-
-% NR 1.3 Expressive marks
-
-% L. v. Beethoven, Op. 49 no. 1
-% Piano sonata 19 - "Leichte Sonate"
-% measures 1 - 12
-
-%\layout {
-%   \context {
-%      \Score
-%      \override SpacingSpanner.base-shortest-duration =
-%         #(ly:make-moment 1/20)
-%   }
-%}
-
-\new PianoStaff <<
-
-   % RH Staff
-   \new Staff {
-      \clef treble
-      \key g \major
-      \time 6/8
-      \partial 2
-      \once \override TextScript.padding = #2
-      d'8 \staccato
-      ^ \markup { \column {
-         RONDO
-         \italic Allegro } }
-      d'8 \staccato
-      g'8 \staccato
-      a'8 \staccato
-
-      |
-
-      b'8 [ (
-      g'8 ] )
-      e'8 \staccato
-      e' \staccato
-      a'8 \staccato
-      b'8 \staccato
-
-      |
-
-      c''8 [ (
-      a'8 ] )
-      e''8 \staccato
-      d''8 \staccato
-      c''8 \staccato
-      b'8 \staccato
-
-      |
-
-      a'8 \staccato
-      g'8 \staccato
-      a'8 \staccato
-      \acciaccatura { g'16 [ a'16 ] }
-      bf'8
-      a'8 \staccato
-      g'8 \staccato
-
-      |
-
-      fs'8 [ (
-      d'8 ] )
-      d'8 \staccato
-      d'8 \staccato
-      g'8 \staccato
-      a'8 \staccato
-
-      |
-
-      b'8 [ (
-      g'8 ] )
-      e'8 \staccato
-      e'8 \staccato
-      a'8 \staccato
-      b'8 \staccato
-
-      |
-
-      c''8 [ (
-      a'8 ] )
-      e''8 \staccato
-      d''8 \staccato
-      c''8 \staccato
-      b'8 \staccato
-
-      |
-
-      a'8 \staccato
-      g'8 \staccato
-      a'8 \staccato
-      <<
-         {
-            \voiceOne
-            d'8
-            g'8
-            fs'8
-            \oneVoice
-         }
-         \new Voice {
-            \voiceTwo
-            d'4
-            c'8
-            \oneVoice
-         }
-      >>
-
-      |
-
-      <b g'>4 \tenuto
-      d'8 \staccato
-      g'8 \staccato
-      b'8 \staccato
-      d''8 \staccato
-
-      |
-
-      d''8 (
-      <c'' a'>8 \staccato )
-      <c'' a'>8 \staccato
-      d''8 (
-      <b' g'>8 \staccato )
-      <b' g'>8 \staccato
-
-      |
-
-      d''8 (
-      <c'' a'>8 \staccato )
-      <c'' a'>8 \staccato
-      d''8 (
-      <b' g'>8 \staccato )
-      <b' g'>8 \staccato
-
-      |
-
-      d''8 \staccato
-      <c'' a'>8 \staccato
-      <b' g'>8 \staccato
-      d'' \staccato
-      <c'' a'>8 \staccato
-      <b' g'>8 \staccato
-
-      |
-
-      <d'' c'' a'>4 \fermata
-      r8 r4 r8
-   }
-
-   % LH Staff
-   \new Staff {
-      \clef bass
-      \key g \major
-      \time 6/8
-      \partial 2
-      r8
-      r8
-      <d' b>8 \staccato
-      <c' a>8 \staccato
-
-      |
-
-      <b g>4
-      r8
-      r8
-      <e' c'>8 \staccato
-      <d' b>8 \staccato
-
-      |
-
-      <c' a>4
-      r8
-      r8
-      <a fs>8 \staccato
-      <b g>8 \staccato
-
-      |
-
-      <c' a>8 \staccato
-      <b d'>8 \staccato
-      <e' c'>8 \staccato
-      <e' cs'>4. (
-
-      |
-
-      d'4 )
-      r8
-      r8
-      <d' b!>8 \staccato
-      <c'! a>8 \staccato
-
-      |
-
-      <b g>4
-      r8
-      r8
-      <e' c'>8 \staccato
-      <d' b>8 \staccato
-
-      |
-
-      <c' a>4
-      r8
-      r8
-      <a fs>8 \staccato
-      <b g>8 \staccato
-
-      |
-
-      <c' a>8 \staccato
-      <d' b>8 \staccato
-      <e' c'>8 \staccato
-      <b d>4
-      <a d>8 \staccato
-
-      |
-
-      <g g,>4 \tenuto
-      r8
-      r4
-      r8
-
-      |
-
-      r8
-      <d' fs>8 \staccato
-      <d' fs>8 \staccato
-      r8
-      <d' g>8 \staccato
-      <d' g>8 \staccato
-
-      |
-
-      r8
-      <d' fs>8 \staccato
-      <d' fs>8 \staccato
-      r8
-      <d' g>8 \staccato
-      <d' g>8 \staccato
-
-      |
-
-      r8
-      <d' fs>8 \staccato
-      <d' g>8 \staccato
-      r8
-      <d' fs>8 \staccato
-      <d' g>8 \staccato
-
-      |
-
-      <d' fs>4 \fermata
-      r8 r4 r8
-   }
-
->>
diff --git a/Documentation/snippets/new/extending-glissandi-across-repeats.ly b/Documentation/snippets/new/extending-glissandi-across-repeats.ly
deleted file mode 100644 (file)
index 0c7496c..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-\version "2.17.6"
-
-\header {
-  lsrtags = "staff-notation, tweaks-and-overrides"
-  texidoc = "
-A glissando which extends into several @code{\alternative} blocks
-can be simulated by adding a hidden grace note with a glissando
-at the start of each @code{\alternative} block.  The grace note
-should be at the same pitch as the note which starts the initial
-glissando.  This is implemented here with a music function which
-takes the pitch of the grace note as its argument.
-
-Note that in polyphonic music the grace note must be matched with
-corresponding grace notes in all other voices.
-"
-  doctitle = "Extending glissandi across repeats"
-}
-
-repeatGliss = #(define-music-function (parser location grace)
-  (ly:pitch?)
-  #{
-    % the next two lines ensure the glissando is long enough
-    % to be visible
-    \once \override Glissando.springs-and-rods
-      = #ly:spanner::set-spacing-rods
-    \once \override Glissando.minimum-length = #3.5
-    \once \hideNotes
-    \grace $grace \glissando
-  #})
-
-\score {
-  \relative c'' {
-    \repeat volta 3 { c4 d e f\glissando }
-    \alternative {
-      { g2 d }
-      { \repeatGliss f g2 e }
-      { \repeatGliss f e2 d }
-    }
-  }
-}
-
-music =  \relative c' {
-  \voiceOne
-  \repeat volta 2 {
-    g a b c\glissando
-  }
-  \alternative {
-    { d1 }
-    { \repeatGliss c e1 }
-  }
-}
-
-\score {
-  \new StaffGroup <<
-    \new Staff <<
-      \context Voice { \clef "G_8" \music }
-    >>
-    \new TabStaff  <<
-      \context TabVoice { \clef "moderntab" \music }
-    >>
-  >>
-}
\ No newline at end of file
diff --git a/Documentation/snippets/new/fretted-headword.ly b/Documentation/snippets/new/fretted-headword.ly
deleted file mode 100644 (file)
index 24fe6e2..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-% INSPIRATIONAL HEADER FOR LILYPOND DOCUMENTATION fretted-strings %
-% Passage from Johann Kaspar Mertz "Opern Revue, Op. 8, no. 17"   %
-% on melodies from Bellini's "Norma"                              %
-%*****************************************************************%
-
-\version "2.17.30"
-
-\header {
-  lsrtags = "headword"
-  texidoc = ""
-  doctitle = "headword"
-}
-
-
-\layout {
-  \context {
-    \Score
-    \remove "Bar_number_engraver"
-  }
-}
-
-%%%% shortcuts
-% fingering orientations
-sfol = \set fingeringOrientations = #'(left)
-sfor = \set fingeringOrientations = #'(right)
-sfod = \set fingeringOrientations = #'(down)
-sfou = \set fingeringOrientations = #'(up)
-
-% string number orientations
-ssnol = \set stringNumberOrientations = #'(left)  %(down right up)
-ssnou = \set stringNumberOrientations = #'(up)
-ssnod = \set stringNumberOrientations = #'(down)
-ssnor = \set stringNumberOrientations = #'(right)
-
-% define fingering offset
-FO = #(define-music-function (parser location offsetX offsetY) (number? number?)
-#{
-  \once \override Voice.Fingering.extra-offset = #(cons offsetX offsetY)
-#})
-
-% markups
-rit = \markup \center-align { \bold { \italic { " rit." } } }
-dimin = \markup \center-align { \italic { " dim." } }
-andantino = \markup \left-align { \italic { \bold { \fontsize #2.5 { "Andantino" } } } }
-benmarcato = \markup { \italic { \bold { "il canto ben marcato" } } }
-pdolce = #(make-dynamic-script (markup #:line (#:dynamic "p" #:normal-text #:italic "dol.")))
-
-%%% THE MUSIC %%%
-
-melody = \relative c {
-  \clef "treble_8"
-  \key d \major
-  \time 4/4
-  \voiceOne
-  \sfol
-  e,32 a' c e
-  e, a c e
-  e,, a' c e
-  e, a c e
-  f4\rest <e'-4>4-> | % m. 1
-
-  e,,,32 gis' b e
-  e, gis b e
-  e,, gis' b e
-  e, gis b e
-  f4\rest \FO #'0.4 #'0.5 <gis-1 e'-4>4 | % m. 2
-
-  d4\rest <b e>-> d4\rest^\rit <b e>4-> | % m. 3
-  <gis b e>1 | % m. 4
-
-  \bar "||"
-  \key a \minor
-  R1 % m. 5
-
-  e'4^\benmarcato e8. d16-4
-  d4-4 \tuplet 3/2 { \sfou \FO #'-0.3 #'0.6 <c-2>4 b8 } | % end of m. 6
-
-  \FO #'-0.3 #'0.3
-  <a-3>4 \tuplet 3/2 { c4 b8 } a4 e'8. e16 | % m. 7
-
-  \FO #'-0.3 #'0.3
-  <g-4>4 \tuplet 3/2 { \sfol \FO #'0.3 #'0.0 <f-1>4 e8 } e4  % beg of m. 8
-  \tuplet 3/2 { \sfou <d-4>4 c8 } | % end of m. 8
-
-  b4 \tuplet 3/2 { d4-4 c8 } \sfou \FO #'-1.7 #'-1.5 <b-0>4 e | % end of m. 9
-
-  e4 e8. d16-4 d4 \tuplet 3/2 { c4 b8 } | % m. 10
-
-  \tuplet 3/2 { a4 a8 b4 c8 } % beg of m. 11
-  \sfou \FO #'-0.3 #'0.3
-  <d-4>4^\< \tuplet 3/2 { e4 <d f>8\! } | % end of m. 11
-}
-
-bass = \relative c {
-  \key d \major
-  \time 4/4
-  \voiceTwo
-
-  e,8\fp[ e'] e,[ e'] e, \sfol <c''-1> <a'-2> c, | % m. 1
-
-  e,,8\fp[ e'] e,[ e'] e, \sfod \FO #'0.2 #'-0.2 <b''-1>  % beg m. 2
-  \sfol \FO #'0.3 #'0.0 <e-1> b | % end m. 2
-
-  e,,8 e' gis e e, e' gis_\dimin e | % m. 3
-
-  e,1 | % m. 4
-
-  %% new section starts here in A minor
-  \set Score.beamExceptions = #'()
-  \once \override TextScript.staff-padding = #1.7
-  \tuplet 3/2 { a8\p^\andantino e' a c a e a, e' a c a e } | % m. 5
-
-  \tuplet 3/2 { a,8\pdolce e' a c a e } % beg m. 6
-  \tuplet 3/2 { e,8 \sfou <e'-3> <gis-1> c gis e } | % end m. 6
-
-  \tuplet 3/2 { a,8 <e'-2> a c e, b' a, e' a c a e } | % m. 7
-
-  \tuplet 3/2 { f,8 f' a \sfol \FO #'0.3 #'-0.5 <d-4> a f fis, d' a' d a d, } | % m. 8
-
-  \tuplet 3/2 { <g,-3>8 d' g d' g, d % beg m. 9
-    \sfod \FO #'0.0 #'-2.0 <gis,-4> \sfou <e'-2> <gis-1> b gis e } | % end m. 9
-
-  \tuplet 3/2 { a,8 e' a c a e e, e' gis c gis e } | % m. 10
-
-  \tuplet 3/2 { a,8 e' a b a e f, f' a d a f } | % m. 11
-}
-
-\score {
-  \new Staff = "guitar" <<
-    \context Voice = "upper" { \melody }
-    \context Voice = "lower" { \bass }
-  >>
-  \layout {
-    \context {
-      \Score
-      \override Fingering.staff-padding = #'()
-      \omit TupletNumber
-      \override TupletBracket.bracket-visibility = ##f
-    }
-  }
-  \midi { }
-}
diff --git a/Documentation/snippets/new/generating-custom-flags.ly b/Documentation/snippets/new/generating-custom-flags.ly
deleted file mode 100644 (file)
index aa54b59..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-\version "2.17.6"
-
-\header {
-  lsrtags = "rhythms, tweaks-and-overrides"
-
-  texidoc = "
-The @code{stencil} property of the Flag grob can be set to a custom scheme
-function to generate the glyph for the flag.
-
-"
-  doctitle = "Generating custom flags"
-}
-
-#(define-public (weight-flag grob)
-   (let* ((stem-grob (ly:grob-parent grob X))
-          (log (- (ly:grob-property stem-grob 'duration-log) 2))
-          (is-up? (eqv? (ly:grob-property stem-grob 'direction) UP))
-          (yext (if is-up? (cons (* log -0.8) 0) (cons 0 (* log 0.8))))
-          (flag-stencil (make-filled-box-stencil '(-0.4 . 0.4) yext))
-          (stroke-style (ly:grob-property grob 'stroke-style))
-          (stroke-stencil (if (equal? stroke-style "grace")
-                              (make-line-stencil 0.2 -0.9 -0.4 0.9 -0.4)
-                              empty-stencil)))
-     (ly:stencil-add flag-stencil stroke-stencil)))
-
-
-% Create a flag stencil by looking up the glyph from the font
-#(define (inverted-flag grob)
-   (let* ((stem-grob (ly:grob-parent grob X))
-          (dir (if (eqv? (ly:grob-property stem-grob 'direction) UP) "d" "u"))
-          (flag (retrieve-glyph-flag "" dir "" grob))
-          (line-thickness (ly:staff-symbol-line-thickness grob))
-          (stem-thickness (ly:grob-property stem-grob 'thickness))
-          (stem-width (* line-thickness stem-thickness))
-          (stroke-style (ly:grob-property grob 'stroke-style))
-          (stencil (if (null? stroke-style)
-                       flag
-                       (add-stroke-glyph flag stem-grob dir stroke-style "")))
-          (rotated-flag (ly:stencil-rotate-absolute stencil 180 0 0)))
-     (ly:stencil-translate rotated-flag (cons (- (/ stem-width 2)) 0))))
-
-snippetexamplenotes = { \autoBeamOff c'8 d'16 c'32 d'64 \acciaccatura {c'8} d'64 }
-
-{
-  \override Score.RehearsalMark.self-alignment-X = #LEFT
-  \time 1/4
-  \mark "Normal flags"
-  \snippetexamplenotes
-
-  \mark "Custom flag: inverted"
-  \override Flag.stencil = #inverted-flag
-  \snippetexamplenotes
-
-  \mark "Custom flag: weight"
-  \override Flag.stencil = #weight-flag
-  \snippetexamplenotes
-
-  \mark "Revert to normal"
-  \revert Flag.stencil
-  \snippetexamplenotes
-}
-
diff --git a/Documentation/snippets/new/glissandi-can-skip-grobs.ly b/Documentation/snippets/new/glissandi-can-skip-grobs.ly
deleted file mode 100644 (file)
index 039d5b4..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-\version "2.17.6"
-
-\header {
-  lsrtags = "expressive-marks, staff-notation, tweaks-and-overrides"
-  doctitle = "Glissandi can skip grobs"
-  texidoc = "@code{NoteColumn} grobs can be skipped over by glissandi."
-}
-
-\relative c' {
-  a2 \glissando
-  \once \override NoteColumn.glissando-skip = ##t
-  f''4 d,
-}
diff --git a/Documentation/snippets/new/guitar-slides.ly b/Documentation/snippets/new/guitar-slides.ly
deleted file mode 100644 (file)
index c65a265..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-\version "2.17.30"
-
-\header {
-  lsrtags = "fretted-strings"
-
-  texidoc = "
-Unlike glissandos, slides may go from an imprecise point of the
-fretboard to a specific fret. A good way to do that is to add a grace
-hidden note before the note which is actually played, as demonstrated
-in the following example.
-"
-  doctitle = "Guitar slides"
-}
-
-%% Hide fret number: useful to draw slide into/from a casual point of
-%% the fretboard.
-hideFretNumber = {
-  \once \hide TabNoteHead
-  \once \hide NoteHead
-  \once \hide Stem
-  \once \override NoteHead.no-ledgers = ##t
-  \once \override Glissando.bound-details.left.padding = #0.3
-}
-
-music= \relative c' {
-  \grace { \hideFretNumber d8\2 \glissando s2 } g2\2
-  \grace { \hideFretNumber g8\2 \glissando s2 } d2 |
-
-  \grace { \hideFretNumber c,8 \glissando s } f4\5^\markup \tiny { Slide into }
-  \grace { \hideFretNumber f8 \glissando s } a4\4
-  \grace { \hideFretNumber e'8\3 \glissando s } b4\3^\markup \tiny { Slide from }
-  \grace { \hideFretNumber b'8 \glissando s2 } g4 |
-}
-
-\score {
-  <<
-    \new Staff {
-      \clef "G_8"
-      \music
-    }
-    \new TabStaff {
-      \music
-    }
-  >>
-}
diff --git a/Documentation/snippets/new/hammer-on-and-pull-off-using-chords.ly b/Documentation/snippets/new/hammer-on-and-pull-off-using-chords.ly
deleted file mode 100644 (file)
index 980707d..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-\version "2.16.0"
-
-\header {
-  lsrtags = "editorial-annotations, fretted-strings"
-
-  texidoc = "
-When using hammer-on or pull-off with chorded notes, only a single arc
-is drawn. However @q{double arcs} are possible by setting the
-@code{doubleSlurs} property to @code{#t}.
-
-"
-  doctitle = "Hammer on and pull off using chords"
-}
-
-\new TabStaff {
-  \relative c' {
-    % chord hammer-on and pull-off
-    \set doubleSlurs = ##t
-    <g' b>8( <a c> <g b>)
-  }
-}
diff --git a/Documentation/snippets/new/hammer-on-and-pull-off-using-voices.ly b/Documentation/snippets/new/hammer-on-and-pull-off-using-voices.ly
deleted file mode 100644 (file)
index d22a7f9..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-\version "2.16.0"
-
-\header {
-  lsrtags = "editorial-annotations, fretted-strings"
-
-  texidoc = "
-The arc of hammer-on and pull-off is upwards in voices one and three and
-downwards in voices two and four:
-
-"
-  doctitle = "Hammer on and pull off using voices"
-}
-
-\new TabStaff {
-  \relative c' {
-    << { \voiceOne g2( a) }
-    \\ { \voiceTwo a,( b) }
-    >> \oneVoice
-  }
-}
diff --git a/Documentation/snippets/new/hammer-on-and-pull-off.ly b/Documentation/snippets/new/hammer-on-and-pull-off.ly
deleted file mode 100644 (file)
index c5b283b..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-\version "2.16.0"
-
-\header {
-  lsrtags = "editorial-annotations, fretted-strings"
-
-  texidoc = "
-Hammer-on and pull-off can be obtained using slurs.
-
-"
-  doctitle = "Hammer on and pull off"
-}
-
-\new TabStaff {
-  \relative c' {
-    d4( e\2)
-    a( g)
-  }
-}
diff --git a/Documentation/snippets/new/heavily-customized-polymetric-time-signatures.ly b/Documentation/snippets/new/heavily-customized-polymetric-time-signatures.ly
deleted file mode 100644 (file)
index eefaf6e..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-\version "2.17.15"
-
-\header {
-  lsrtags = "contemporary-notation, percussion, real-music, rhythms"
-
-  texidoc = "
-Though the polymetric time signature shown was not the most essential
-item here, it has been included to show the beat of this piece (which
-is the template of a real Balkan song!).
-
-"
-  doctitle = "Heavily customized polymetric time signatures"
-}
-
-melody = \relative c'' {
-  \set Staff.instrumentName = #"Bb Sop."
-  \key g \major
-  \compoundMeter #'((3 8) (2 8) (2 8) (3 8) (2 8) (2 8)
-                    (2 8) (2 8) (3 8) (2 8) (2 8))
-  c8 c c d4 c8 c b c b a4 g fis8 e d c b' c d e4-^ fis8 g \break
-  c,4. d4 c4 d4. c4 d c2 d4. e4-^ d4
-  c4. d4 c4 d4. c4 d c2 d4. e4-^ d4 \break
-  c4. d4 c4 d4. c4 d c2 d4. e4-^ d4
-  c4. d4 c4 d4. c4 d c2 d4. e4-^ d4 \break
-}
-
-drum = \new DrumStaff \drummode {
-  \bar ".|:" bd4.^\markup { Drums } sn4 bd \bar ";" sn4.
-  bd4 sn \bar ";" bd sn bd4. sn4 bd \bar ":|."
-}
-
-{
-  \melody
-  \drum
-}
diff --git a/Documentation/snippets/new/horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly b/Documentation/snippets/new/horizontally-aligning-custom-dynamics-e.g.-sempre-pp,-piu-f,-subito-p.ly
deleted file mode 100644 (file)
index 4117078..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-\version "2.17.6"
-
-\header {
-  lsrtags = "correction-wanted, expressive-marks, tweaks-and-overrides, version-specific"
-
-  texidoc = "
-Some dynamic expressions involve additional text, like @qq{sempre pp}.
-Since dynamics are usually centered under the note, the \\pp would be
-displayed way after the note it applies to.
-
-To correctly align the @qq{sempre pp} horizontally, so that it is
-aligned as if it were only the \\pp, there are several approaches:
-
-* Simply use @code{\\once\\override DynamicText.X-offset = #-9.2}
-before the note with the dynamics to manually shift it to the correct
-position. Drawback: This has to be done manually each time you use that
-dynamic markup...
-
-* Add some padding (@code{#:hspace 7.1}) into the
-definition of your custom dynamic mark, so that after lilypond
-center-aligns it, it is already correctly aligned. Drawback: The
-padding really takes up that space and does not allow any other markup
-or dynamics to be shown in that position.
-
-* Shift the dynamic script @code{\\once\\override ...X-offset = ..}.
-Drawback: @code{\\once\\override} is needed for every invocation!
-
-* Set the dimensions of the additional text to 0 (using
-@code{#:with-dimensions '(0 . 0) '(0 . 0)}). Drawback: To LilyPond
-@qq{sempre} has no extent, so it might put other stuff there and create
-collisions (which are not detected by the collision detection!). Also,
-there seems to be some spacing, so it's not exactly the same alignment
-as without the additional text
-
-* Add an explicit shifting directly inside the scheme function for the
-dynamic-script.
-
-* Set an explicit alignment inside the dynamic-script. By default, this
-won't have any effect, only if one sets X-offset! Drawback: One needs
-to set @code{DynamicText #'X-offset}, which will apply to all dynamic
-texts! Also, it is aligned at the right edge of the additional text,
-not at the center of pp.
-"
-  doctitle = "Horizontally aligning custom dynamics (e.g. \"sempre pp\" \"piu f\" \"subito p\")"
-}
-
-\header { title = "Horizontally aligning custom dynamics" }
-
-\paper { ragged-right = ##f }
-
-% Solution 1: Using a simple markup with a particular halign value
-% Drawback: It's a markup, not a dynamic command, so \dynamicDown
-%           etc. will have no effect
-semppMarkup = \markup { \halign #1.4 \italic "sempre" \dynamic "pp" }
-
-% Solution 2: Using a dynamic script & shifting with
-%             \once \override ...X-offset = ..
-% Drawback: \once \override needed for every invocation
-semppK =
-#(make-dynamic-script
-  (markup #:line
-          (#:normal-text
-           #:italic "sempre"
-           #:dynamic "pp")))
-
-% Solution 3: Padding the dynamic script so the center-alignment
-%             puts it at the correct position
-% Drawback: the padding really reserves the space, nothing else can be there
-semppT =
-#(make-dynamic-script
-  (markup #:line
-          (#:normal-text
-           #:italic "sempre"
-           #:dynamic "pp"
-           #:hspace 7.1)))
-
-% Solution 4: Dynamic, setting the dimensions of the additional text to 0
-% Drawback: To lilypond "sempre" has no extent, so it might put
-%           other stuff there => collisions
-% Drawback: Also, there seems to be some spacing, so it's not exactly the
-%           same alignment as without the additional text
-semppM =
-#(make-dynamic-script
-  (markup #:line
-          (#:with-dimensions '(0 . 0) '(0 . 0)
-                             #:right-align
-                             #:normal-text
-                             #:italic "sempre"
-                             #:dynamic "pp")))
-
-% Solution 5: Dynamic with explicit shifting inside the scheme function
-semppG =
-#(make-dynamic-script
-  (markup #:hspace 0
-          #:translate '(-18.85 . 0)
-          #:line (#:normal-text
-                  #:italic "sempre"
-                  #:dynamic "pp")))
-
-% Solution 6: Dynamic with explicit alignment. This has only effect
-%             if one sets X-offset!
-% Drawback: One needs to set DynamicText.X-offset!
-% Drawback: Aligned at the right edge of the additional text,
-%           not at the center of pp
-semppMII =
-#(make-dynamic-script
-  (markup #:line (#:right-align
-                  #:normal-text
-                  #:italic "sempre"
-                  #:dynamic "pp")))
-
-\context StaffGroup <<
-  \context Staff = "s" <<
-    \set Staff.instrumentName = #"Normal"
-    \relative c'' {
-      \key es \major
-      c4\pp c\p c c | c\ff c c\pp c
-    }
-  >>
-  \context Staff = "sMarkup" <<
-    \set Staff.instrumentName = \markup \column { Normal markup }
-    \relative c'' {
-      \key es \major
-      c4-\semppMarkup c\p c c | c\ff c c-\semppMarkup c
-    }
-  >>
-  \context Staff = "sK" <<
-    \set Staff.instrumentName = \markup \column { Explicit shifting }
-    \relative c'' {
-      \key es \major
-      \once \override DynamicText.X-offset = #-9.2
-      c4\semppK c\p c c
-      c4\ff c
-      \once \override DynamicText.X-offset = #-9.2
-      c4\semppK c
-    }
-  >>
-  \context Staff = "sT" <<
-    \set Staff.instrumentName = \markup \column { Right padding }
-    \relative c'' {
-      \key es \major
-      c4\semppT c\p c c | c\ff c c\semppT c
-    }
-  >>
-  \context Staff = "sM" <<
-    \set Staff.instrumentName = \markup \column { Setting dimension "to zero" }
-    \relative c'' {
-      \key es \major
-      c4\semppM c\p c c | c\ff c c\semppM c
-    }
-  >>
-  \context Staff = "sG" <<
-    \set Staff.instrumentName = \markup \column { Shifting inside dynamics }
-    \relative c'' {
-      \key es \major
-      c4\semppG c\p c c | c\ff c c\semppG c
-    }
-  >>
-  \context Staff = "sMII" <<
-    \set Staff.instrumentName = \markup \column { Alignment inside dynamics }
-    \relative c'' {
-      \key es \major
-      % Setting to ##f (false) gives the same result
-      \override DynamicText.X-offset = #0
-      c4\semppMII c\p c c | c\ff c c\semppMII c
-    }
-  >>
->>
diff --git a/Documentation/snippets/new/how-to-print-two-rehearsal-marks-above-and-below-the-same-barline-method-1.ly b/Documentation/snippets/new/how-to-print-two-rehearsal-marks-above-and-below-the-same-barline-method-1.ly
deleted file mode 100644 (file)
index d83c178..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-\version "2.17.24"
-
-\header {
-  lsrtags = "editorial-annotations, expressive-marks, staff-notation, tweaks-and-overrides"
-
-  texidoc = "
-This method prints two 'rehearsal marks', one on top of the other. It
-shifts the lower rehearsal mark below the staff and then adds padding
-above it in order to place the upper rehearsal mark above the staff.
-
-By adjusting the extra-offset and baseline-skip values you can increase
-or decrease the overall space between the rehearsal mark and the staff.
-
-Because nearly every type of glyph or string can be made to behave like
-a rehearsal mark it is possible to centre those above and below a bar
-line.
-
-Adding the appropriate 'break visibility' as shown in snippet 1 will
-allow you to position two marks at the end of a line as well.
-
-Note: Method 1 is less complex than Method 2 but does not really allow
-for fine tuning of placement of one of the rehearsal marks without
-affecting the other.  It may also give some problems with vertical
-spacing, since using @code{extra-offset} does not change the bounding
-box of the mark from its original value.
-
-
-
-"
-  doctitle = "How to print two rehearsal marks above and below the same barline (method 1)"
-}
-
-\relative c'{
-    c d e f |
-    \once \override Score.RehearsalMark.extra-offset = #'(0 . -8.5)
-    \once \override Score.RehearsalMark.baseline-skip = #9
-    \mark \markup \center-column { \circle 1 \box A }
-    g f e d |
-    \once \override Score.RehearsalMark.extra-offset = #'(0 . -8.5)
-    \once \override Score.RehearsalMark.baseline-skip = #9
-    \mark \markup \center-column { \flat { \bold \small \italic Fine. } }
-    g f e d |
-    \once \override Score.RehearsalMark.extra-offset = #'(0 . -8.5)
-    \once \override Score.RehearsalMark.baseline-skip = #9
-    \override Score.RehearsalMark.break-visibility = #begin-of-line-invisible
-    \mark \markup \center-column { \fermata \box z }
-}
diff --git a/Documentation/snippets/new/incipit.ly b/Documentation/snippets/new/incipit.ly
deleted file mode 100644 (file)
index 3b85ef1..0000000
+++ /dev/null
@@ -1,267 +0,0 @@
-\version "2.17.30"
-
-\header {
-  lsrtags = "staff-notation, ancient-notation, really-cool"
-  texidoc = "
-Incipits can be added using the instrument name grob, but keeping
-separate the instrument name definition and the incipit definition.
-"
-  doctitle = "Incipit"
-}
-
-incipit =
-#(define-music-function (parser location incipit-music) (ly:music?)
-  #{
-    \once \override Staff.InstrumentName.self-alignment-X = #RIGHT
-    \once \override Staff.InstrumentName.self-alignment-Y = ##f
-    \once \override Staff.InstrumentName.padding = #0.3
-    \once \override Staff.InstrumentName.stencil =
-      #(lambda (grob)
-        (let* ((instrument-name (ly:grob-property grob 'long-text)))
-          (set! (ly:grob-property grob 'long-text)
-                #{ \markup
-                     \score
-                        {
-                          { \context MensuralStaff \with {
-                               instrumentName = #instrument-name
-                            } $incipit-music
-                          }
-                          \layout { $(ly:grob-layout grob)
-                                    line-width = \indent
-                                    indent =
-                               % primitive-eval is probably easiest for
-                               % escaping lexical closure and evaluating
-                               % everything respective to (current-module).
-                                    #(primitive-eval
-                                       '(or (false-if-exception (- indent incipit-width))
-                                           (* 0.5 indent)))
-                                    ragged-right = ##f
-                                    ragged-last = ##f
-                                    system-count = #1 }
-                        }
-                 #})
-           (system-start-text::print grob)))
-  #})
-
-%%%%%%%%%%%%%%%%%%%%%%%%%
-
-global = {
-  \set Score.skipBars = ##t
-  \key g \major
-  \time 4/4
-
-  % the actual music
-  \skip 1*8
-
-  % let finis bar go through all staves
-  \override Staff.BarLine.transparent = ##f
-
-  % finis bar
-  \bar "|."
-}
-
-discantusIncipit = <<
-  \new MensuralVoice = "discantusIncipit" <<
-    \repeat unfold 9 { s1 \noBreak }
-    {
-      \clef "neomensural-c1"
-      \key f \major
-      \time 2/2
-      c''1.
-    }
-  >>
-  \new Lyrics \lyricsto discantusIncipit { IV- }
->>
-
-discantusNotes = {
-  \transpose c' c'' {
-    \clef "treble"
-    d'2. d'4 |
-    b e' d'2 |
-    c'4 e'4.( d'8 c' b |
-    a4) b a2 |
-    b4.( c'8 d'4) c'4 |
-    \once \hide NoteHead
-    c'1 |
-    b\breve |
-  }
-}
-
-discantusLyrics = \lyricmode {
-  Ju -- bi -- |
-  la -- te De -- |
-  o, om --
-  nis ter -- |
-  ra, __ om- |
-  "..." |
-  -us. |
-}
-
-altusIncipit = <<
-  \new MensuralVoice = "altusIncipit" <<
-    \repeat unfold 9 { s1 \noBreak }
-    {
-      \clef "neomensural-c3"
-      \key f \major
-      \time 2/2
-      r1 f'1.
-    }
-  >>
-  \new Lyrics \lyricsto altusIncipit { IV- }
->>
-
-altusNotes = {
-  \transpose c' c'' {
-    \clef "treble"
-    % two measures
-    r2 g2. e4 fis g |
-    a2 g4 e |
-    fis g4.( fis16 e fis4) |
-    g1 |
-    \once \hide NoteHead
-    g1 |
-    g\breve |
-  }
-}
-
-altusLyrics = \lyricmode {
-  % two measures
-  Ju -- bi -- la -- te |
-  De -- o, om -- |
-  nis ter -- ra, |
-  "..." |
-  -us. |
-}
-
-tenorIncipit = <<
-  \new MensuralVoice = "tenorIncipit" <<
-    \repeat unfold 9 { s1 \noBreak }
-    {
-      \clef "neomensural-c4"
-      \key f \major
-      \time 2/2
-      r\longa
-      r\breve
-      r1 c'1.
-    }
-  >>
-  \new Lyrics \lyricsto tenorIncipit { IV- }
->>
-
-tenorNotes = {
-  \transpose c' c' {
-    \clef "treble_8"
-    R1 |
-    R1 |
-    R1 |
-    % two measures
-    r2 d'2. d'4 b e' |
-    \once \hide NoteHead
-    e'1 |
-    d'\breve |
-  }
-}
-
-tenorLyrics = \lyricmode {
-  % two measures
-  Ju -- bi -- la -- te |
-  "..." |
-  -us.
-}
-
-bassusIncipit = <<
-  \new MensuralVoice = "bassusIncipit" <<
-    \repeat unfold 9 { s1 \noBreak }
-    {
-      \clef "bass"
-      \key f \major
-      \time 2/2
-      %% incipit
-      r\maxima
-      f1.
-    }
-  >>
-  \new Lyrics \lyricsto bassusIncipit { IV- }
->>
-
-bassusNotes = {
-  \transpose c' c' {
-    \clef "bass"
-    R1 |
-    R1 |
-    R1 |
-    R1 |
-    g2. e4 |
-    \once \hide NoteHead
-    e1 |
-    g\breve |
-  }
-}
-
-bassusLyrics = \lyricmode {
-  Ju -- bi- |
-  "..." |
-  -us.
-}
-
-\score {
-  <<
-    \new StaffGroup = choirStaff <<
-      \new Voice = "discantusNotes" <<
-        \global
-        \set Staff.instrumentName = #"Discantus"
-        \incipit \discantusIncipit
-        \discantusNotes
-      >>
-      \new Lyrics = "discantusLyrics" \lyricsto discantusNotes { \discantusLyrics }
-      \new Voice = "altusNotes" <<
-        \global
-        \set Staff.instrumentName = #"Altus"
-        \incipit \altusIncipit
-        \altusNotes
-      >>
-      \new Lyrics = "altusLyrics" \lyricsto altusNotes { \altusLyrics }
-      \new Voice = "tenorNotes" <<
-        \global
-        \set Staff.instrumentName = #"Tenor"
-        \incipit \tenorIncipit
-        \tenorNotes
-      >>
-      \new Lyrics = "tenorLyrics" \lyricsto tenorNotes { \tenorLyrics }
-      \new Voice = "bassusNotes" <<
-        \global
-        \set Staff.instrumentName = #"Bassus"
-        \incipit \bassusIncipit
-        \bassusNotes
-      >>
-      \new Lyrics = "bassusLyrics" \lyricsto bassusNotes { \bassusLyrics }
-    >>
-  >>
-  \layout {
-    \context {
-      \Score
-      %% no bar lines in staves or lyrics
-      \hide BarLine
-    }
-    %% the next two instructions keep the lyrics between the bar lines
-    \context {
-      \Lyrics
-      \consists "Bar_engraver"
-      \consists "Separating_line_group_engraver"
-    }
-    \context {
-      \Voice
-      %% no slurs
-      \hide Slur
-      %% Comment in the below "\remove" command to allow line
-      %% breaking also at those bar lines where a note overlaps
-      %% into the next measure.  The command is commented out in this
-      %% short example score, but especially for large scores, you
-      %% will typically yield better line breaking and thus improve
-      %% overall spacing if you comment in the following command.
-      %%\remove "Forbid_line_break_engraver"
-    }
-    indent = 6\cm
-    incipit-width = 4\cm
-  }
-}
diff --git a/Documentation/snippets/new/inserting-score-fragments-above-a-staff,-as-markups.ly b/Documentation/snippets/new/inserting-score-fragments-above-a-staff,-as-markups.ly
deleted file mode 100644 (file)
index 09a13cf..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-\version "2.17.15"
-
-\header {
-  lsrtags = "real-music, staff-notation"
-
-  texidoc = "
-The @code{\\markup} command is quite versatile.  In this snippet, it
-contains a @code{\\score} block instead of texts or marks.
-
-"
-  doctitle = "Inserting score fragments above a staff as markups"
-}
-
-tuning = \markup {
-  \score {
-    \new Staff \with { \remove "Time_signature_engraver" }
-    {
-      \clef bass
-      <c, g, d g>1
-    }
-    \layout { ragged-right = ##t  indent = 0\cm }
-  }
-}
-
-\header {
-  title = "Solo Cello Suites"
-  subtitle = "Suite IV"
-  subsubtitle = \markup { Originalstimmung: \raise #0.5 \tuning }
-}
-
-\layout { ragged-right = ##f }
-
-\relative c'' {
-  \time 4/8
-  \tuplet 3/2 { c8 d e } \tuplet 3/2 { c d e }
-  \tuplet 3/2 { c8 d e } \tuplet 3/2 { c d e }
-  g8 a g a
-  g8 a g a
-}
diff --git a/Documentation/snippets/new/jazz-combo-template.ly b/Documentation/snippets/new/jazz-combo-template.ly
deleted file mode 100644 (file)
index 41b62e5..0000000
+++ /dev/null
@@ -1,272 +0,0 @@
-\version "2.17.30"
-
-\header {
-  lsrtags = "keyboards, percussion, fretted-strings, template, real-music"
-
-  texidoc = "
-This is quite an advanced template, for a jazz ensemble. Note that all
-instruments are notated in @code{\\key c \\major}. This refers to the
-key in concert pitch; the key will be automatically transposed if the
-music is within a @code{\\transpose} section.
-
-"
-  doctitle = "Jazz combo template"
-}
-
-\header {
-  title = "Song"
-  subtitle = "(tune)"
-  composer = "Me"
-  meter = "moderato"
-  piece = "Swing"
-  tagline = \markup {
-    \column {
-      "LilyPond example file by Amelie Zapf,"
-      "Berlin 07/07/2003"
-    }
-  }
-}
-
-%#(set-global-staff-size 16)
-\include "english.ly"
-
-%%%%%%%%%%%% Some macros %%%%%%%%%%%%%%%%%%%
-
-sl = {
-  \override NoteHead.style = #'slash
-  \hide Stem
-}
-nsl = {
-  \revert NoteHead.style
-  \undo \hide Stem
-}
-crOn = \override NoteHead.style = #'cross
-crOff = \revert NoteHead.style
-
-%% insert chord name style stuff here.
-
-jazzChords = { }
-
-%%%%%%%%%%%% Keys'n'thangs %%%%%%%%%%%%%%%%%
-
-global = { \time 4/4 }
-
-Key = { \key c \major }
-
-% ############ Horns ############
-
-% ------ Trumpet ------
-trpt = \transpose c d \relative c'' {
-  \Key
-  c1 | c | c |
-}
-trpHarmony = \transpose c' d {
-  \jazzChords
-}
-trumpet = {
-  \global
-  \set Staff.instrumentName = #"Trumpet"
-  \clef treble
-  <<
-    \trpt
-  >>
-}
-
-% ------ Alto Saxophone ------
-alto = \transpose c a \relative c' {
-  \Key
-  c1 | c | c |
-}
-altoHarmony = \transpose c' a {
-  \jazzChords
-}
-altoSax = {
-  \global
-  \set Staff.instrumentName = #"Alto Sax"
-  \clef treble
-  <<
-    \alto
-  >>
-}
-
-% ------ Baritone Saxophone ------
-bari = \transpose c a' \relative c {
-  \Key
-  c1
-  c1
-  \sl
-  d4^"Solo" d d d
-  \nsl
-}
-bariHarmony = \transpose c' a \chordmode {
-  \jazzChords s1 s d2:maj e:m7
-}
-bariSax = {
-  \global
-  \set Staff.instrumentName = #"Bari Sax"
-  \clef treble
-  <<
-    \bari
-  >>
-}
-
-% ------ Trombone ------
-tbone = \relative c {
-  \Key
-  c1 | c | c
-}
-tboneHarmony = \chordmode {
-  \jazzChords
-}
-trombone = {
-  \global
-  \set Staff.instrumentName = #"Trombone"
-  \clef bass
-  <<
-    \tbone
-  >>
-}
-
-% ############ Rhythm Section #############
-
-% ------ Guitar ------
-gtr = \relative c'' {
-  \Key
-  c1
-  \sl
-  b4 b b b
-  \nsl
-  c1
-}
-gtrHarmony = \chordmode {
-  \jazzChords
-  s1 c2:min7+ d2:maj9
-}
-guitar = {
-  \global
-  \set Staff.instrumentName = #"Guitar"
-  \clef treble
-  <<
-    \gtr
-  >>
-}
-
-%% ------ Piano ------
-rhUpper = \relative c'' {
-  \voiceOne
-  \Key
-  c1 | c | c
-}
-rhLower = \relative c' {
-  \voiceTwo
-  \Key
-  e1 | e | e
-}
-
-lhUpper = \relative c' {
-  \voiceOne
-  \Key
-  g1 | g | g
-}
-lhLower = \relative c {
-  \voiceTwo
-  \Key
-  c1 | c | c
-}
-
-PianoRH = {
-  \clef treble
-  \global
-  \set Staff.midiInstrument = #"acoustic grand"
-  <<
-    \new Voice = "one" \rhUpper
-    \new Voice = "two" \rhLower
-  >>
-}
-PianoLH = {
-  \clef bass
-  \global
-  \set Staff.midiInstrument = #"acoustic grand"
-  <<
-    \new Voice = "one" \lhUpper
-    \new Voice = "two" \lhLower
-  >>
-}
-
-piano = {
-  <<
-    \set PianoStaff.instrumentName = #"Piano"
-    \new Staff = "upper" \PianoRH
-    \new Staff = "lower" \PianoLH
-  >>
-}
-
-% ------ Bass Guitar ------
-Bass = \relative c {
-  \Key
-  c1 | c | c
-}
-bass = {
-  \global
-  \set Staff.instrumentName = #"Bass"
-  \clef bass
-  <<
-    \Bass
-  >>
-}
-
-% ------ Drums ------
-up = \drummode {
-  \voiceOne
-  hh4 <hh sn> hh <hh sn>
-  hh4 <hh sn> hh <hh sn>
-  hh4 <hh sn> hh <hh sn>
-}
-down = \drummode {
-  \voiceTwo
-  bd4 s bd s
-  bd4 s bd s
-  bd4 s bd s
-}
-
-drumContents = {
-  \global
-  <<
-    \set DrumStaff.instrumentName = #"Drums"
-    \new DrumVoice \up
-    \new DrumVoice \down
-  >>
-}
-
-%%%%%%%%% It All Goes Together Here %%%%%%%%%%%%%%%%%%%%%%
-
-\score {
-  <<
-    \new StaffGroup = "horns" <<
-      \new Staff = "trumpet" \trumpet
-      \new Staff = "altosax" \altoSax
-      \new ChordNames = "barichords" \bariHarmony
-      \new Staff = "barisax" \bariSax
-      \new Staff = "trombone" \trombone
-    >>
-
-    \new StaffGroup = "rhythm" <<
-      \new ChordNames = "chords" \gtrHarmony
-      \new Staff = "guitar" \guitar
-      \new PianoStaff = "piano" \piano
-      \new Staff = "bass" \bass
-      \new DrumStaff \drumContents
-    >>
-  >>
-  \layout {
-    \context { \Staff \RemoveEmptyStaves }
-    \context {
-      \Score
-      \override BarNumber.padding = #3
-      \override RehearsalMark.padding = #2
-      skipBars = ##t
-    }
-  }
-  \midi { }
-}
-
diff --git a/Documentation/snippets/new/keyboard-headword.ly b/Documentation/snippets/new/keyboard-headword.ly
deleted file mode 100644 (file)
index cb2af25..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-\version "2.17.24"
-
-\header {
-  lsrtags = "headword"
-
-  texidoc = "
-Keyboard headword
-
-"
-  doctitle = "Keyboard headword"
-}
-% M. Ravel, Sonatine (1905)
-% First movement
-\include "english.ly"
-
-\layout {
-  \context {
-    \Score
-    \remove "Bar_number_engraver"
-  }
-}
-
-fermataLong = \markup {
-  \override #'(direction . 1)
-  \override #'(baseline-skip . 2) {
-    \dir-column {
-      \fermata
-      \text \italic \center-align long
-    }
-  }
-}
-
-\new PianoStaff <<
-  \set PianoStaff.connectArpeggios = ##t
-  \new Staff {
-    \time 2/4
-    \key fs \major
-    <<
-      \new Voice {
-        \voiceOne
-        fs''8 ( ^\markup {
-          \override #'(baseline-skip . 2.4) \column {
-            \line \bold { Un peu retenu }
-            \line \italic { très expressif }
-          }
-        }
-        es''16
-        cs''16
-        as'4 )
-        |
-        fs''8 (
-        es''16
-        cs''16
-        as'4 )
-        |
-        fs''8 (
-        es''16
-        cs''16
-        as'8
-        cs''8 )
-        |
-      }
-      \new Voice {
-        \voiceTwo
-        gs'8\rest \ppp
-        fs'4 (
-        es'8 )
-        |
-        gs'8\rest
-        fs'4 (
-        es'8 )
-        |
-        gs'8\rest
-        fs'4 (
-        es'8 )
-        |
-      }
-    >>
-    \clef bass
-    <ds b! es'>4 ( ^ \markup \bold { Rall. }
-    \override Script.stencil = #(lambda (grob)
-      (grob-interpret-markup grob fermataLong))
-    <ds' as'>8 ) \fermata
-    \noBeam
-    \clef treble
-    \slurUp
-    \once \override Hairpin.to-barline = ##f
-    <as fs'>8 ( \pp \>
-    |
-    <gs b cs'>4. \! ) ^\markup \bold { a Tempo }
-    \slurUp
-    <as fs'>8 ^\( \>
-    |
-    <gs b cs'>4. \! \)
-    <<
-      \new Voice {
-        \voiceOne
-        <as fs'>8 (
-        |
-        cs'8 ^\markup \bold { Rallentando }
-        b16
-        cs'16
-        d'8
-        e'16
-        fs'16
-        |
-        <as! cs' gs'>4. )
-        s8
-        |
-        r8
-        <cs'' as'' cs'''>4 \arpeggio
-        e''16 ( ^\markup \bold { Lent }
-        fs''16
-        |
-        \voiceTwo
-        <as'! cs'' gs''>2 )
-        |
-      }
-      \new Voice {
-        \voiceTwo
-        s8
-        |
-        <gs b>4 \<
-        <fs bs>4 \>
-        |
-        s4. \!
-        \slurUp
-        \once \override Script.direction = #UP
-        <a bs e'>8 ( \accent
-        |
-        <as! cs' gs'>4. )
-        \once \override Hairpin.to-barline = ##f
-        <a' bs'>8 \ppp \>
-        |
-        s8 \!
-        \stemDown
-        \once \override Script.direction = #UP
-        \ottava #1
-        \voiceOne
-        \once \override PianoStaff.Arpeggio.padding = #0.8
-        <cs''' as''' cs''''>4. \arpeggio \fermata
-        \ottava #0
-        \bar "|."
-      }
-    >>
-  }
-  \new Staff <<
-    \set Staff.pedalSustainStyle = #'bracket
-    \key fs \major
-    \clef bass
-    \new Voice {
-      \voiceOne
-      ds'4 \tenuto
-      cs'4 \tenuto
-      |
-      ds'4 \tenuto
-      cs'4 \tenuto
-      |
-      ds'4 \tenuto
-      cs'4 \tenuto
-      |
-      s8
-      \clef treble
-      <b' cs''>8 [
-      \clef bass
-      <es b cs'>8 \fermata ]
-      s8
-      |
-      fs8\rest
-      \clef treble
-      <b' cs''>4 \tenuto
-      s8
-      |
-      fs8\rest
-      \clef treble
-      <b' cs''>4 \tenuto
-      s8
-      |
-      s2
-      |
-      ds8\rest
-      \clef treble
-      <as' cs''>4
-      \clef bass
-      s8
-      |
-      s8
-      \clef treble
-      <as'>4 \arpeggio
-      \clef bass
-      s8
-      |
-      s8
-      \clef treble
-      <as''>4. \arpeggio \fermata
-      |
-    }
-    \new Voice {
-      \voiceTwo
-      ds'8 [ (
-      < ds bs >8
-      cs'8
-      < ds as >8 ] )
-      |
-      ds'8 [ (
-      < ds bs >8
-      cs'8
-      < ds as >8 ] )
-      |
-      ds'8 [ (
-      < ds bs >8
-      cs'8
-      < ds as >8 ] )
-      |
-      \once \override Script.outside-staff-priority = #100
-      \once \override TextScript.outside-staff-priority = #500
-      <cs, gs,>4. \fermata _\markup \italic { ped. }
-      <fs, cs>8 (
-      |
-      <e, b,>4. ) \sustainOn
-      \clef bass
-      <fs, cs>8 \( \sustainOff
-      |
-      <e, b,>4. \) \sustainOn
-      \clef bass
-      <fs, cs>8 ( \sustainOff
-      |
-      <e, b,>4
-      <d, a,>4
-      |
-      <fs,, cs,>4. ) \sustainOn
-      <a, e>8 ( \sustainOff
-      |
-      <fs, cs>4. ) \sustainOn
-      \slurUp
-      <a e'>8 ( \sustainOff \sustainOn
-      |
-      <fs cs'>2 ) \sustainOff \sustainOn
-      |
-    }
-  >>
->>
diff --git a/Documentation/snippets/new/making-glissandi-breakable.ly b/Documentation/snippets/new/making-glissandi-breakable.ly
deleted file mode 100644 (file)
index bf065ac..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-\version "2.17.30"
-
-\header {
-  lsrtags = "staff-notation, tweaks-and-overrides"
-
-  texidoc = "
-Setting the @code{breakable} property to @code{#t} in combination with
-@code{after-line-breaking} allows a glissando to break if it occurs
-at a line break:
-"
-
-  doctitle = "Making glissandi breakable"
-}
-
-glissandoSkipOn = {
-  \override NoteColumn.glissando-skip = ##t
-  \hide NoteHead
-  \override NoteHead.no-ledgers = ##t
-}
-
-\relative c'' {
-  \override Glissando.breakable = ##t
-  \override Glissando.after-line-breaking = ##t
-  f1\glissando |
-  \break
-  a4 r2. |
-  f1\glissando
-  \once \glissandoSkipOn
-  \break
-  a2 a4 r4 |
-}
diff --git a/Documentation/snippets/new/merging-multi-measure-rests-in-a-polyphonic-part.ly b/Documentation/snippets/new/merging-multi-measure-rests-in-a-polyphonic-part.ly
deleted file mode 100644 (file)
index 3330291..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-\version "2.17.18"
-
-\header {
-  lsrtags = "really-simple, rhythms, version-specific"
-
-  texidoc = "
-When using multi-measure rests in a polyphonic staff, the rests will be
-placed differently depending on the voice they belong to. However they
-can be printed on the same staff line, using the following setting.
-
-"
-  doctitle = "Merging multi-measure rests in a polyphonic part"
-}
-
-normalPos = \revert MultiMeasureRest.direction
-
-{
-  <<
-    {
-      c''1
-      R1
-      c''1
-      \normalPos
-      R1
-    }
-    \\
-    {
-      c'1
-      R1
-      c'1
-      \normalPos
-      R1
-    }
-  >>
-}
diff --git a/Documentation/snippets/new/numbering-groups-of-measures.ly b/Documentation/snippets/new/numbering-groups-of-measures.ly
deleted file mode 100644 (file)
index 2722b3d..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-\version "2.17.7"
-
-\header {
-  lsrtags = "contexts-and-engravers, editorial-annotations, repeats, staff-notation"
-
-  texidoc = "
-This snippet demonstrates the use of the @code{Measure_counter_engraver} to
-number groups of successive measures.  Any stretch of measures may be numbered,
-whether consisting of repetitions or not.
-
-The engraver must be added to the appropriate context.  Here, a @code{Staff}
-context is used; another possibility is a @code{Dynamics} context.
-
-The counter is begun with @code{\\startMeasureCount} and ended with
-@code{\\stopMeasureCount}.  Numbering will start by default with @code{1}, but
-this behavior may be modified by overriding the @code{count-from} property.
-
-When a measure extends across a line break, the number will appear twice, the
-second time in parentheses.
-
-"
-  doctitle = "Numbering groups of measures"
-}
-
-\layout {
-  \context {
-    \Staff
-    \consists #Measure_counter_engraver
-  }
-}
-
-\new Staff {
-  \startMeasureCount
-  \repeat unfold 7 {
-    c'4 d' e' f'
-  }
-  \stopMeasureCount
-  \bar "||"
-  g'4 f' e' d'
-  \override Staff.MeasureCounter.count-from = #2
-  \startMeasureCount
-  \repeat unfold 5 {
-    g'4 f' e' d'
-  }
-  g'4 f'
-  \bar ""
-  \break
-  e'4 d'
-  \repeat unfold 7 {
-    g'4 f' e' d'
-  }
-  \stopMeasureCount
-}
diff --git a/Documentation/snippets/new/numbers-as-easy-note-heads.ly b/Documentation/snippets/new/numbers-as-easy-note-heads.ly
deleted file mode 100644 (file)
index 4b3f02e..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-\version "2.16.0"
-
-\header {
-  lsrtags = "pitches"
-  texidoc = "
-Easy notation note heads use the @code{note-names} property
-of the @code{NoteHead} object to determine what appears inside
-the note head.  By overriding this property, it is possible
-to print numbers representing the scale-degree.
-
-A simple engraver can be created to do this for every note head
-object it sees.
-"
-  doctitle = "Numbers as easy note heads"
-}
-
-#(define Ez_numbers_engraver
-   (make-engraver
-    (acknowledgers
-     ((note-head-interface engraver grob source-engraver)
-      (let* ((context (ly:translator-context engraver))
-            (tonic-pitch (ly:context-property context 'tonic))
-            (tonic-name (ly:pitch-notename tonic-pitch))
-            (grob-pitch
-             (ly:event-property (event-cause grob) 'pitch))
-            (grob-name (ly:pitch-notename grob-pitch))
-            (delta (modulo (- grob-name tonic-name) 7))
-            (note-names
-             (make-vector 7 (number->string (1+ delta)))))
-       (ly:grob-set-property! grob 'note-names note-names))))))
-
-#(set-global-staff-size 26)
-
-\layout {
-  ragged-right = ##t
-  \context {
-    \Voice
-    \consists \Ez_numbers_engraver
-  }
-}
-
-\relative c' {
-  \easyHeadsOn
-  c4 d e f
-  g4 a b c \break
-
-  \key a \major
-  a,4 b cis d
-  e4 fis gis a \break
-
-  \key d \dorian
-  d,4 e f g
-  a4 b c d
-}
diff --git a/Documentation/snippets/new/pitches-headword.ly b/Documentation/snippets/new/pitches-headword.ly
deleted file mode 100644 (file)
index 70246ce..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-\version "2.17.27"
-
-\header {
-  lsrtags = "headword"
-
-  texidoc = "
-Piches headword
-
-"
-  doctitle = "Pitches headword"
-}
-% L. v. Beethoven
-% Piano sonata 21 - Dem Grafen von Waldstein Gewidmet
-% chorale at measures 34 - 40+
-
-\include "english.ly"
-
-\new PianoStaff <<
-
-  % RH Staff
-  \new Staff <<
-
-    % RH Voice 1
-    \new Voice {
-      \set Score.currentBarNumber = #34
-      \voiceOne
-      gs''2 ( ^ \markup \italic { dolce e molto ligato }
-      fs''4
-      e''4
-      |
-      ds''2
-      cs''2 )
-      |
-      ds''2 (
-      e''4
-      fs''4
-      |
-      <gs'' e''>2
-      <fs'' ds''>2 )
-      |
-      \oneVoice
-      \clef bass
-      <gs' e' b>2 (
-      <fs' ds' a>4
-      <e' cs' gs>4
-      |
-      <ds' bs fs>2
-      <cs' a e>2 )
-      |
-      \voiceOne
-      b2 %(
-      cs'4
-      ds'4
-      |
-      \clef treble
-      <e' gs>4 %)
-      r4 r2
-    }
-
-    % RH Voice 2
-    \new Voice {
-      \voiceTwo
-      \override Staff.DynamicLineSpanner.staff-padding = #3
-      <e'' b'>2 \p
-      <ds'' a'>4
-      <cs'' gs'>4
-      |
-      <bs' fs'>2
-      e'2
-      |
-      <b'! a'>2 -\tweak #'style #'none \cresc
-      b'4
-      <e'' cs''>4
-      |
-      b'2. ( \sf \>
-      a'4 )
-      \clef bass
-      | \break
-      s1 \p
-      |
-      s1
-      |
-      <gs e>4 (
-      <a fs>2. )
-      |
-      s4
-      r4 r2
-    }
-
-  >>
-
-  % LH Staff
-  \new Staff {
-    \override Staff.SustainPedalLineSpanner.staff-padding = #6
-    <gs' e'>2 ( \sustainOn
-    <fs' ds' b>4 \sustainOff
-    <e' cs'>4
-    |
-    <ds' bs gs>2
-    <cs' a>2 ) \sustainOn
-    |
-    \clef bass
-    \slurDown
-    <ds' b! a fs>2 ( \sustainOff
-    <e' b gs>4
-    <fs' cs' a>4 \sustainOn
-    |
-    \clef treble
-    \voiceOne
-    <<
-      {
-        <gs' e'>2
-        <fs' ds'>2 )
-      }
-      \new Voice {
-        \voiceTwo
-        b1 \sustainOff
-      }
-    >>
-    \oneVoice
-    |
-    %\break
-    \clef bass
-    <gs e>2 (
-    <fs ds b,>4
-    <e cs>4
-    |
-    <ds bs, gs,>2
-    <cs a,>2 ) \sustainOn
-    |
-    <b,! b,,!>1 ( \sustainOff
-    |
-    <e e,>4 )
-    r4 r2
-  }
-
->>
diff --git a/Documentation/snippets/new/positioning-multi-measure-rests.ly b/Documentation/snippets/new/positioning-multi-measure-rests.ly
deleted file mode 100644 (file)
index e908ef1..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-\version "2.17.18"
-
-\header {
-  lsrtags = "rhythms, tweaks-and-overrides"
-
-  texidoc = "
-Unlike ordinary rests, there is no predefined command to change the
-staff position of a multi-measure rest symbol of either form by
-attaching it to a note.  However, in polyphonic music multi-measure
-rests in odd-numbered and even-numbered voices are vertically
-separated. The positioning of multi-measure rests can be controlled as
-follows:
-
-"
-  doctitle = "Positioning multi-measure rests"
-}
-
-\relative c'' {
-  % Multi-measure rests by default are set under the fourth line
-  R1
-  % They can be moved using an override
-  \override MultiMeasureRest.staff-position = #-2
-  R1
-  \override MultiMeasureRest.staff-position = #0
-  R1
-  \override MultiMeasureRest.staff-position = #2
-  R1
-  \override MultiMeasureRest.staff-position = #3
-  R1
-  \override MultiMeasureRest.staff-position = #6
-  R1
-  \revert MultiMeasureRest.staff-position
-  \break
-
-  % In two Voices, odd-numbered voices are under the top line
-  << { R1 } \\ { a1 } >>
-  % Even-numbered voices are under the bottom line
-  << { a1 } \\ { R1 } >>
-  % Multi-measure rests in both voices remain separate
-  << { R1 } \\ { R1 } >>
-
-  % Separating multi-measure rests in more than two voices
-  % requires an override
-  << { R1 } \\ { R1 } \\
-     \once \override MultiMeasureRest.staff-position = #0
-     { R1 }
-  >>
-
-  % Using compressed bars in multiple voices requires another override
-  % in all voices to avoid multiple instances being printed
-  \compressFullBarRests
-  <<
-   \revert MultiMeasureRest.direction
-    { R1*3 }
-    \\
-   \revert MultiMeasureRest.direction
-    { R1*3 }
-  >>
-}
diff --git a/Documentation/snippets/new/printing-hairpins-in-various-styles.ly b/Documentation/snippets/new/printing-hairpins-in-various-styles.ly
deleted file mode 100644 (file)
index b6a18ec..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-\version "2.17.14"
-
-\header {
-  lsrtags = "expressive-marks"
-
-  texidoc = "
-Hairpin dynamics may be created in a variety of styles
-
-"
-  doctitle = "Printing hairpins in various styles"
-}
-
-\relative c'' {
-  \override Hairpin.stencil = #flared-hairpin
-  a4\< a a a\f
-  a4\p\< a a a\ff
-  a4\sfz\< a a a\!
-  \override Hairpin.stencil = #constante-hairpin
-  a4\< a a a\f
-  a4\p\< a a a\ff
-  a4\sfz\< a a a\!
-  \override Hairpin.stencil = #flared-hairpin
-  a4\> a a a\f
-  a4\p\> a a a\ff
-  a4\sfz\> a a a\!
-  \override Hairpin.stencil = #constante-hairpin
-  a4\> a a a\f
-  a4\p\> a a a\ff
-  a4\sfz\> a a a\!
-}
diff --git a/Documentation/snippets/new/quoting-another-voice-with-transposition.ly b/Documentation/snippets/new/quoting-another-voice-with-transposition.ly
deleted file mode 100644 (file)
index a0153d6..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-\version "2.17.13"
-
-\header {
-  lsrtags = "pitches, staff-notation"
-
-  texidoc = "
-Quotations take into account the transposition of both source and
-target.  In this example, all instruments play sounding middle C; the
-target is an instrument in F.  The target part may be transposed using
-@code{\\transpose}.  In this case, the quoted pitches will stay
-unchanged.
-"
-  doctitle = "Quoting another voice with transposition"
-}
-
-\addQuote clarinet {
-  \transposition bes
-  \repeat unfold 8 { d'16 d' d'8 }
-}
-
-\addQuote sax {
-  \transposition es'
-  \repeat unfold 16 { a8 }
-}
-
-quoteTest = {
-  % french horn
-  \transposition f
-  g'4
-  << \quoteDuring #"clarinet" { \skip 4 } s4^"clar." >>
-  << \quoteDuring #"sax" { \skip 4 } s4^"sax." >>
-  g'4
-}
-
-{
-  \set Staff.instrumentName =
-    \markup {
-      \center-column { Horn \line { in F } }
-    }
-  \quoteTest
-  \transpose c' d' << \quoteTest s4_"up a tone" >>
-}
diff --git a/Documentation/snippets/new/redefining-grace-note-global-defaults.ly b/Documentation/snippets/new/redefining-grace-note-global-defaults.ly
deleted file mode 100644 (file)
index b4cd68c..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-\version "2.17.6"
-
-\header {
-  lsrtags = "rhythms"
-
-  texidoc = "
-The global defaults for grace notes are stored in the identifiers
-@code{startGraceMusic}, @code{stopGraceMusic},
-@code{startAcciaccaturaMusic}, @code{stopAcciaccaturaMusic},
-@code{startAppoggiaturaMusic} and @code{stopAppoggiaturaMusic}, which
-are defined in the file @code{ly/grace-init.ly}.  By redefining them
-other effects may be obtained.
-
-"
-  doctitle = "Redefining grace note global defaults"
-}
-
-startAcciaccaturaMusic = {
-  <>(
-  \override Flag.stroke-style = #"grace"
-  \slurDashed
-}
-
-stopAcciaccaturaMusic = {
-  \revert Flag.stroke-style
-  \slurSolid
-  <>)
-}
-
-\relative c'' {
-  \acciaccatura d8 c1
-}
-
diff --git a/Documentation/snippets/new/score-for-diatonic-accordion.ly b/Documentation/snippets/new/score-for-diatonic-accordion.ly
deleted file mode 100644 (file)
index bca93b5..0000000
+++ /dev/null
@@ -1,240 +0,0 @@
-\version "2.17.30"
-
-\header {
-  lsrtags = "template, real-music, specific-notation"
-
-  texidoc = "
-A template to write a score for a diatonic accordion.
-
-- There is a horizontal staff indicating if the accordion must be
-pushed (thick line) or pulled (thin line)
-
-- There is a small rhythmic staff with lyrics that describes the bass
-buttons to press. The bar lines are made from gridlines
-
-- The tabulator staff for diatonic accordions shows the geographic
-position of the buttons and not (as for every other instrument) the
-pitch of the notes; the keys on the melody-side of the accordion are
-placed in three columns and about 12 rows
-
-
-In the tabulator staff notation the outermost column is described with
-notes between lines, the innermost column is described with notes
-between lines and a cross as accidental, and the middle column is
-described with notes on a line, whereby the row in the middle is
-represented on the middle line in the staff.
-
-
-Some words to transpose piano notes to the diatonic accordion:
-
-
-1. Every diatonic accordion is built for some keys only (for example,
-for the keys of C major and F major), so it is important to transpose a
-piano melody to match one of these keys. Transpose the source code, not
-only the output because this code is required later on to translate it
-once more to the tabulator staff. This can be done with the command
-@code{displayLilyMusic}.
-
-
-2. You have to alternate the push- and pull-direction of the accordion
-regularly. If the player has a too long part to pull the accordion gets
-broken. On the other hand, some harmonies are only available in one
-direction. Considering this, decide which parts of the melody are the
-push-parts and which the pull-parts.
-
-
-3. For each pull- or push-part translate the piano notes to the
-according tabulature representation.
-
-
-This snippet comes with a useful optional macro for the jEdit text
-editor.
-
-"
-  doctitle = "Score for diatonic accordion"
-}
-
-verse = \lyricmode { Wie gross bist du! Wie gross bist du! }
-
-harmonies = \new ChordNames \chordmode {
-  \germanChords
-  \set chordChanges = ##t
-  bes8 bes8 bes8
-  es2 f
-  bes1
-}
-
-NoStem = { \hide Stem }
-NoNoteHead = \hide NoteHead
-ZeroBeam = \override Beam.positions = #'(0 . 0)
-
-staffTabLine = \new Staff \with {
-  \remove "Time_signature_engraver"
-  \remove "Clef_engraver"
-} {
-  \override Staff.StaffSymbol.line-positions = #'(0)
-  % Shows one horizontal line. The vertical line (simulating a bar-line) is simulated with a gridline
-  \set Staff.midiInstrument = #"choir aahs"
-  \key c \major
-  \relative c''
-  {
-    % disable the following line to see the the noteheads while writing the song
-    \NoNoteHead
-    \override NoteHead.no-ledgers = ##t
-
-    % The beam between 8th-notes is used to draw the push-line
-    %How to fast write the push-lines:
-    %  1. write repeatedly 'c c c c c c c c |' for the whole length of the song
-    %  2. uncomment the line \NoNoteHead
-    %  3. compile
-    %  4. Mark the positions on which push/pull changes.
-    %     In the score-picture click on the position the push- or pull-part starts
-    %           (on the noteHead, the cursor will change to a hand-icon).
-    %     The cursor in the source code will jump just at this position.
-    %   a) If a push-part starts there, replace the 'c' by an 'e['
-    %   b) If a pull-part starts there, replace the 'c' by an 's'
-    %  5. Switch into 'overwrite-mode' by pressing the 'ins' key.
-    %  6. For the pull-parts overwrite the 'c' with 's'
-    %  7. For every push-part replace the last 'c' with 'e]'
-    %        8. Switch into 'insert-mode' again
-    %  9. At last it should look lik e.g. (s s e[ c | c c c c c c c c | c c c c c c e] s s)
-    % 10. re-enable the line \NoNoteHead
-    \autoBeamOff
-    \ZeroBeam
-    s8 s s e[ c c c c c c e] | s s s s s
-  }
-}
-
-%{
-%}
-
-% Accordion melody in tabulator score
-% 1. Place a copy of the piano melody below
-% 2. Separate piano melody into pull- and push-parts according to the staffTabLine you've already made
-% 3. For each line: Double the line. Remark the 1st one (Keeps unchanged as reference) and then change the second line using the transformation paper
-%    or the macros 'conv2diaton push.bsh' and 'conv2diaton pull.bsh'
-% Tips:
-% - In jEdit Search & Replace mark the Option 'Keep Dialog'
-
-AccordionTabTwoCBesDur = {
-  % pull 1
-  %<f' bes'>8 <f' a'>8 <d' bes'>8 |
-  <g'' a''>8 <g'' b''>8 <e'' a''>8 |
-  % push 2
-  %<g' c''>4 <f' d''> <g' ees''> <f' a'> |
-  <g'' a''>4 <d'' eisis''> <g'' bisis''> <d'' f''> |
-  % pull 3
-  % <f' bes'>2 r8 }
-  <g'' a''>2 r8 }
-
-AccordionTab= { \dynamicUp
-  % 1. Place a copy of the piano melody above
-  % 2. Separate piano melody into pull- and push-parts according to the staffTabLine you've already made
-  % 3. For each line: Double the line. Remark the 1st one (Keeps unchanged as reference) and then
-  %    change the second line using the transformation paper
-  % Tips:
-  % - In jEdit Search & Replace mark the Option 'Keep Dialog'
-  % -
-  \AccordionTabTwoCBesDur
-}
-
-
-
-\layout {
-  \context {
-    \Score
-    % The vertical line (simulating a bar-line) in
-    % the staffBassRhytm is a gridline
-    \consists "Grid_line_span_engraver"
-  }
-  \context {
-    \Staff
-    \consists "Grid_point_engraver"
-    gridInterval = #(ly:make-moment 4/4) % 4/4 - tact. How many beats per bar
-    % The following line has to be adjusted O-F-T-E-N.
-    \override GridPoint.Y-extent = #'(-2 . -21)
-  }
-  \context {
-    \ChoirStaff
-    \remove "System_start_delimiter_engraver"
-  }
-}
-
-staffVoice = \new Staff = astaffvoice  {
-  \time 4/4
-  \set Staff.instrumentName = "Voice"
-  \set Staff.midiInstrument = "voice oohs"
-  \key bes \major
-  \partial 8*3
-  \clef treble
-  {
-    \context Voice = "melodyVoi"
-    { <f' bes'>8 <f' a'>8 <d' bes'>8 | <g' c''>4 <f' d''> <g' es''> <f' a'> | <f' bes'>2 r8 }
-    \bar "|."
-  }
-}
-
-staffAccordionMel =
-\new Staff  \with { \remove "Clef_engraver" } {
-  \accidentalStyle forget %Set the accidentals (Vorzeichen) for each note,
-  %do not remember them for the rest of the measure.
-  \time 4/4
-  \set Staff.instrumentName="Accordion"
-  \set Staff.midiInstrument="voice oohs"
-  \key c \major
-  \clef treble
-  { \AccordionTab \bar "|." }
-}
-
-AltOn =
-#(define-music-function (parser location mag) (number?)
-  #{ \override Stem.length = #(* 7.0 mag)
-      \override NoteHead.font-size =
-#(inexact->exact (* (/ 6.0 (log 2.0)) (log mag))) #})
-
-AltOff = {
-  \revert Stem.length
-  \revert NoteHead.font-size
-}
-
-BassRhytm = {s4 s8 | c2 c2 | c2 s8 }
-LyricBassRhythmI=  \lyricmode { c b | c }
-
-staffBassRhytm =
-\new Staff = staffbass \with { \remove "Clef_engraver" } {
-  % This is not a RhythmicStaff  because it must be possible to append lyrics.
-
-  \override Score.GridLine.extra-offset = #'( 13.0 . 0.0 ) % x.y
-  \override Staff.StaffSymbol.line-positions = #'( 0 )
-  % Shows one horizontal line. The vertical line (simulating a bar-line) is simulated by a grid
-  % Search for 'grid' in this page to find all related functions
-  \time 4/4
-  {
-    \context Voice = "VoiceBassRhytm"
-    \stemDown \AltOn #0.6
-    \relative c''
-    {
-      \BassRhytm
-    }
-    \AltOff
-    \bar "|."
-  }
-}
-
-\score {
-  \new ChoirStaff <<
-    \harmonies
-    \staffVoice
-    \context Lyrics = "lmelodyVoi"
-      \with { alignBelowContext = astaffvoice }
-      \lyricsto melodyVoi \verse
-    \staffAccordionMel
-    \staffTabLine
-    \staffBassRhytm
-    \context Lyrics = "lBassRhytmAboveI"
-      \with { alignAboveContext = staffbass }
-      \lyricsto VoiceBassRhytm \LyricBassRhythmI
-  >>
-}
-%}
-
diff --git a/Documentation/snippets/new/strict-beat-beaming.ly b/Documentation/snippets/new/strict-beat-beaming.ly
deleted file mode 100644 (file)
index e614469..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-\version "2.16.0"
-
-\header {
-  texidoc = "
-Beamlets can be set to point in the direction of the beat to which they
-belong.  The first beam avoids sticking out flags (the default);
-the second beam strictly follows the beat.
-"
-
-  doctitle = "Strict beat beaming"
-
-  lsrtags = "rhythms"
-}
-
-
-\relative c'' {
-  \time 6/8
-  a8. a16 a a
-  \set strictBeatBeaming = ##t
-  a8. a16 a a
-}
diff --git a/Documentation/snippets/new/string-number-extender-lines.ly b/Documentation/snippets/new/string-number-extender-lines.ly
deleted file mode 100644 (file)
index 90ea3fc..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-\version "2.17.6"
-
-\header {
-  lsrtags = "editorial-annotations, text, fretted-strings, tweaks-and-overrides, scheme-language"
-
-  texidoc = "
-Make an extender line for string number indications, showing that a
-series of notes is supposed to be played all on the same string.
-
-"
-  doctitle = "String number extender lines"
-}
-
-stringNumberSpanner =
-#(define-music-function (parser location StringNumber) (string?)
-  #{
-    \override TextSpanner.style = #'solid
-    \override TextSpanner.font-size = #-5
-    \override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER
-    \override TextSpanner.bound-details.left.text = \markup { \circle \number #StringNumber }
-  #})
-
-
-\relative c {
-  \clef "treble_8"
-  \stringNumberSpanner "5"
-  \textSpannerDown
-  a8\startTextSpan
-  b c d e f\stopTextSpan
-  \stringNumberSpanner "4"
-  g\startTextSpan a
-  bes4 a g2\stopTextSpan
-}
-
diff --git a/Documentation/snippets/new/using-a-tick-as-the-breath-mark-symbol.ly b/Documentation/snippets/new/using-a-tick-as-the-breath-mark-symbol.ly
deleted file mode 100644 (file)
index ad440c3..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-\version "2.17.6"
-
-\header {
-  lsrtags = "expressive-marks"
-
-  texidoc = "
-Vocal and wind music frequently uses a tick mark as a breathing sign.  This
-indicates a breath that subtracts a little time from the previous note rather
-than causing a short pause, which is indicated by the comma breath mark.  The
-mark can be moved up a little to take it away from the stave.
-"
-  doctitle = "Using a tick as the breath mark symbol"
-}
-
-\relative c'' {
-  c2
-  \breathe
-  d2
-  \override BreathingSign.Y-offset = #2.6
-  \override BreathingSign.text =
-    \markup { \musicglyph #"scripts.tickmark" }
-  c2
-  \breathe
-  d2
-}
diff --git a/Documentation/snippets/new/using-alternative-flag-styles.ly b/Documentation/snippets/new/using-alternative-flag-styles.ly
deleted file mode 100644 (file)
index 5932ba2..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-\version "2.17.6"
-
-\header {
-  lsrtags = "rhythms, tweaks-and-overrides"
-
-  texidoc = "
-Alternative styles of flag on eighth and shorter notes can be displayed
-by overriding the @code{stencil} property of @code{Flag}.  Valid values
-are @code{modern-straight-flag} and @code{old-straight-flag}.
-
-"
-  doctitle = "Using alternative flag styles"
-}
-
-testnotes = {
-  \autoBeamOff
-  c8 d16 c32 d64 \acciaccatura { c8 } d64 r4
-}
-
-\relative c' {
-  \time 2/4
-  \testnotes
-
-  \override Flag.stencil = #modern-straight-flag
-  \testnotes
-
-  \override Flag.stencil = #old-straight-flag
-  \testnotes
-
-  \revert Flag.stencil
-  \testnotes
-}
-
diff --git a/Documentation/snippets/new/using-an-extra-voice-for-breaks.ly b/Documentation/snippets/new/using-an-extra-voice-for-breaks.ly
deleted file mode 100644 (file)
index 418b9d6..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-\version "2.18.0"
-
-\header {
-  lsrtags = "specific-notation, workaround"
-
-  texidoc = "
-
-Often it is easier to manage line and page-breaking information by
-keeping it separate from the music by introducing an extra voice
-containing only skips along with the @code{\break},
-@code{pageBreak} and other layout information.
-
-This pattern becomes especially helpful when overriding
-@code{line-break-system-details} and the other useful but long
-properties of @code{NonMusicalPaperColumnGrob}.
-"
-  doctitle = "Using an extra voice for breaks"
-}
-
-music = \relative c'' { c4 c c c }
-
-\header { tagline = ##f }
-\paper { left-margin = 0\mm }
-\book {
-  \score {
-    \new Staff <<
-      \new Voice {
-        s1 * 2 \break
-        s1 * 3 \break
-        s1 * 6 \break
-        s1 * 5 \break
-      }
-      \new Voice {
-        \repeat unfold 2 { \music }
-        \repeat unfold 3 { \music }
-        \repeat unfold 6 { \music }
-        \repeat unfold 5 { \music }
-      }
-    >>
-  }
-}
diff --git a/Documentation/snippets/new/using-grace-note-slashes-with-normal-heads.ly b/Documentation/snippets/new/using-grace-note-slashes-with-normal-heads.ly
deleted file mode 100644 (file)
index 0a53f3d..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-\version "2.17.6"
-
-\header {
-  lsrtags = "rhythms"
-
-  texidoc = "
-The slash through the stem found in acciaccaturas can be applied in
-other situations.
-
-"
-  doctitle = "Using grace note slashes with normal heads"
-}
-
-\relative c'' {
-  \override Flag.stroke-style = #"grace"
-  c8( d2) e8( f4)
-}
-
diff --git a/Documentation/snippets/new/vertically-aligned-dynamics-and-textscripts.ly b/Documentation/snippets/new/vertically-aligned-dynamics-and-textscripts.ly
deleted file mode 100644 (file)
index 909f09e..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-\version "2.17.27"
-
-\header {
-  lsrtags = "spacing, tweaks-and-overrides, workaround"
-
-  texidoc = "
-All @code{DynamicLineSpanner} objects (hairpins and dynamic texts) are
-placed with their reference line at least @code{'staff-padding} from
-the staff, unless other notation forces them to be farther.
-Setting @code{'staff-padding} to a sufficiently large value aligns the
-dynamics.
-
-The same idea, together with @code{\\textLengthOn}, is used to align
-the text scripts along their baseline.
-
-"
-  doctitle = "Vertically aligned dynamics and textscripts"
-}
-\markup \vspace #1 %avoid LSR-bug
-
-music = \relative c' {
-  a'2\p b\f
-  e4\p f\f\> g, b\p
-  c2^\markup { \huge gorgeous } c^\markup { \huge fantastic }
-}
-
-{
-  \music
-  \break
-  \override DynamicLineSpanner.staff-padding = #3
-  \textLengthOn
-  \override TextScript.staff-padding = #1
-  \music
-}
diff --git a/Documentation/snippets/new/woodwind-diagrams-key-lists.ly b/Documentation/snippets/new/woodwind-diagrams-key-lists.ly
deleted file mode 100644 (file)
index b9eaaa8..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-\version "2.16.0"
-
-\header {
-  lsrtags = "winds"
-
-  texidoc="
-The snippet below produces a list of all possible keys and key
-settings for woodwind diagrams as defined in
-@file{scm/define-woodwind-diagrams.scm}.  The list will be displayed
-in the log file, but not in the music.  If output to the console
-is wanted, omit the @code{(current-error-port)} from the commands.
-"
-  doctitle = "Woodwind diagrams key lists"
-}
-
-#(print-keys-verbose 'piccolo (current-error-port))
-#(print-keys-verbose 'flute (current-error-port))
-#(print-keys-verbose 'flute-b-extension (current-error-port))
-#(print-keys-verbose 'tin-whistle (current-error-port))
-#(print-keys-verbose 'oboe (current-error-port))
-#(print-keys-verbose 'clarinet (current-error-port))
-#(print-keys-verbose 'bass-clarinet (current-error-port))
-#(print-keys-verbose 'low-bass-clarinet (current-error-port))
-#(print-keys-verbose 'saxophone (current-error-port))
-#(print-keys-verbose 'soprano-saxophone (current-error-port))
-#(print-keys-verbose 'alto-saxophone (current-error-port))
-#(print-keys-verbose 'tenor-saxophone (current-error-port))
-#(print-keys-verbose 'baritone-saxophone (current-error-port))
-#(print-keys-verbose 'bassoon (current-error-port))
-#(print-keys-verbose 'contrabassoon (current-error-port))
index 7c082bed1b5ec7dfbdbd4dbfae296e7b5fc28df5..17d731c7b697293cb2157a2c6e2f55e3fcfd6f73 100644 (file)
@@ -1,35 +1,39 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.7
-\version "2.17.7"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "contexts-and-engravers, editorial-annotations, repeats, staff-notation"
 
   texidoc = "
-This snippet demonstrates the use of the @code{Measure_counter_engraver} to
-number groups of successive measures.  Any stretch of measures may be numbered,
-whether consisting of repetitions or not.
+This snippet demonstrates the use of the
+@code{Measure_counter_engraver} to number groups of successive
+measures.  Any stretch of measures may be numbered, whether consisting
+of repetitions or not.
+
+
+The engraver must be added to the appropriate context.  Here, a
+@code{Staff} context is used; another possibility is a @code{Dynamics}
+context.
 
-The engraver must be added to the appropriate context.  Here, a @code{Staff}
-context is used; another possibility is a @code{Dynamics} context.
 
 The counter is begun with @code{\\startMeasureCount} and ended with
-@code{\\stopMeasureCount}.  Numbering will start by default with @code{1}, but
-this behavior may be modified by overriding the @code{count-from} property.
+@code{\\stopMeasureCount}.  Numbering will start by default with
+@code{1}, but this behavior may be modified by overriding the
+@code{count-from} property.
 
-When a measure extends across a line break, the number will appear twice, the
-second time in parentheses.
+
+When a measure extends across a line break, the number will appear
+twice, the second time in parentheses.
 
 "
   doctitle = "Numbering groups of measures"
 } % begin verbatim
 
-
 \layout {
   \context {
     \Staff
index 70faa4ae4bfeb719edab3521b4d2304086126576..b8e9f3421cae864b089d2098c4005602aaf800e2 100644 (file)
@@ -1,27 +1,27 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.16.0
-\version "2.16.0"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "pitches"
+
   texidoc = "
-Easy notation note heads use the @code{note-names} property
-of the @code{NoteHead} object to determine what appears inside
-the note head.  By overriding this property, it is possible
-to print numbers representing the scale-degree.
+Easy notation note heads use the @code{note-names} property of the
+@code{NoteHead} object to determine what appears inside the note head.
+By overriding this property, it is possible to print numbers
+representing the scale-degree.
+
+A simple engraver can be created to do this for every note head object
+it sees.
 
-A simple engraver can be created to do this for every note head
-object it sees.
 "
   doctitle = "Numbers as easy note heads"
 } % begin verbatim
 
-
 #(define Ez_numbers_engraver
    (make-engraver
     (acknowledgers
index ad09b5755ba21e09989d1516d5e0d04db8791213..b2f27eddc97db7b66cc475d1512d3805da605e78 100644 (file)
@@ -1,11 +1,10 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.27
-\version "2.17.27"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "headword"
@@ -141,5 +140,4 @@ Piches headword
     <e e,>4 )
     r4 r2
   }
-
 >>
index b32e5b9a51d364d303558b022a3aaa46d9801ecb..2f9cd215d749dd561fd798446423ae7949ddca71 100644 (file)
@@ -1,11 +1,10 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.18
-\version "2.17.18"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "rhythms, tweaks-and-overrides"
@@ -22,7 +21,6 @@ follows:
   doctitle = "Positioning multi-measure rests"
 } % begin verbatim
 
-
 \relative c'' {
   % Multi-measure rests by default are set under the fourth line
   R1
index 1ce96f79a60965ffaf579b393ff253b8d695394e..54be1bd351035406a70d001661a6aed0d8a61273 100644 (file)
@@ -1,23 +1,21 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.14
-\version "2.17.14"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "expressive-marks"
 
   texidoc = "
-Hairpin dynamics may be created in a variety of styles
+Hairpin dynamics may be created in a variety of styles.
 
 "
   doctitle = "Printing hairpins in various styles"
 } % begin verbatim
 
-
 \relative c'' {
   \override Hairpin.stencil = #flared-hairpin
   a4\< a a a\f
index df7517fd79a5b055b3b5a06efe5d7e3c59cac7be..82f02f0f0df6d43d32d0aeaaaeb3dbc6a70da399 100644 (file)
@@ -1,11 +1,10 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.13
-\version "2.17.13"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "pitches, staff-notation"
 Quotations take into account the transposition of both source and
 target.  In this example, all instruments play sounding middle C; the
 target is an instrument in F.  The target part may be transposed using
-@code{\\transpose}.  In this case, the quoted pitches will stay
-unchanged.
+@code{\\transpose}.  In this case, all the pitches (including the
+quoted ones) are transposed.
+
 "
   doctitle = "Quoting another voice with transposition"
 } % begin verbatim
 
-
 \addQuote clarinet {
   \transposition bes
   \repeat unfold 8 { d'16 d' d'8 }
index 85a038f55fc2ea96629df0f0546b4415bfa9d516..4d8d548bfd9360397b42d7200cbce848ac9acc29 100644 (file)
@@ -21,12 +21,9 @@ instruments can be realized.
 
 centermarkup = {
   \once \override TextScript.self-alignment-X = #CENTER
-  \once \override TextScript.X-offset =#(ly:make-simple-closure
-  `(,+
-  ,(ly:make-simple-closure (list
-  ly:self-alignment-interface::centered-on-x-parent))
-  ,(ly:make-simple-closure (list
-  ly:self-alignment-interface::x-aligned-on-self))))
+  \once \override TextScript.X-offset =#(lambda (g)
+  (+ (ly:self-alignment-interface::centered-on-x-parent g)
+     (ly:self-alignment-interface::x-aligned-on-self g)))
 }
 
 \score {
index ae51b3c9a724eb86c17961aa81e569088609a3f8..410fdd0fe253d4b00111156b6bdd625c3421e69e 100644 (file)
@@ -1,11 +1,10 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.6
-\version "2.17.6"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "rhythms"
@@ -22,7 +21,6 @@ other effects may be obtained.
   doctitle = "Redefining grace note global defaults"
 } % begin verbatim
 
-
 startAcciaccaturaMusic = {
   <>(
   \override Flag.stroke-style = #"grace"
index 358e8accfb34b1638d63a1a4e118fcef90681d09..0d5bde112424d3ab9c29cd904e8cbd4e5cde1f72 100644 (file)
@@ -7,7 +7,6 @@ automatic-beam-subdivisions.ly
 automatically-change-durations.ly
 avoiding-collisions-with-chord-fingerings.ly
 beam-endings-in-score-context.ly
-beam-grouping-in-7-8-time.ly
 beams-across-line-breaks.ly
 changing-beam-knee-gap.ly
 changing-form-of-multi-measure-rests.ly
@@ -23,7 +22,7 @@ controlling-tuplet-bracket-visibility.ly
 creating-metronome-marks-in-markup-mode.ly
 engraving-ties-manually.ly
 engraving-tremolos-with-floating-beams.ly
-entering-several-tuplets-using-only-one--times-command.ly
+entering-several-tuplets-using-only-one--tuplet-command.ly
 flat-flags-and-beam-nibs.ly
 forcing-rehearsal-marks-to-start-from-a-given-letter-or-number.ly
 generating-custom-flags.ly
index 46883755e6b6e55885e0621009982ac7962c2626..f07285c8b70550892786712d5e9937e93be50c04 100644 (file)
@@ -1,14 +1,13 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.30
-\version "2.17.30"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
-  lsrtags = "template, real-music, specific-notation"
+  lsrtags = "real-music, specific-notation, template"
 
   texidoc = "
 A template to write a score for a diatonic accordion.
@@ -53,15 +52,10 @@ push-parts and which the pull-parts.
 3. For each pull- or push-part translate the piano notes to the
 according tabulature representation.
 
-
-This snippet comes with a useful optional macro for the jEdit text
-editor.
-
 "
   doctitle = "Score for diatonic accordion"
 } % begin verbatim
 
-
 verse = \lyricmode { Wie gross bist du! Wie gross bist du! }
 
 harmonies = \new ChordNames \chordmode {
@@ -113,9 +107,6 @@ staffTabLine = \new Staff \with {
   }
 }
 
-%{
-%}
-
 % Accordion melody in tabulator score
 % 1. Place a copy of the piano melody below
 % 2. Separate piano melody into pull- and push-parts according to the staffTabLine you've already made
@@ -244,4 +235,3 @@ staffBassRhytm =
       \lyricsto VoiceBassRhytm \LyricBassRhythmI
   >>
 }
-%}
index 238479a41329370478f3e1a29f470ea645f83f65..298266360457d5982ffeabeb9707a45ab0b05765 100644 (file)
@@ -1,26 +1,23 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.16.0
-\version "2.16.0"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
+  lsrtags = "rhythms"
+
   texidoc = "
 Beamlets can be set to point in the direction of the beat to which they
-belong.  The first beam avoids sticking out flags (the default);
-the second beam strictly follows the beat.
-"
+belong.  The first beam avoids sticking out flags (the default); the
+second beam strictly follows the beat.
 
+"
   doctitle = "Strict beat beaming"
-
-  lsrtags = "rhythms"
 } % begin verbatim
 
-
-
 \relative c'' {
   \time 6/8
   a8. a16 a a
index 726e69b778ac901b19d6f6c8e7e59d995fa4dc7b..5409fbaf4fe3007308fc4d0b2d048bcfea2ecfa1 100644 (file)
@@ -1,14 +1,13 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.6
-\version "2.17.6"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
-  lsrtags = "editorial-annotations, text, fretted-strings, tweaks-and-overrides, scheme-language"
+  lsrtags = "editorial-annotations, fretted-strings, scheme-language, text, tweaks-and-overrides"
 
   texidoc = "
 Make an extender line for string number indications, showing that a
@@ -18,15 +17,14 @@ series of notes is supposed to be played all on the same string.
   doctitle = "String number extender lines"
 } % begin verbatim
 
-
 stringNumberSpanner =
-#(define-music-function (parser location StringNumber) (string?)
-  #{
-    \override TextSpanner.style = #'solid
-    \override TextSpanner.font-size = #-5
-    \override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER
-    \override TextSpanner.bound-details.left.text = \markup { \circle \number #StringNumber }
-  #})
+  #(define-music-function (parser location StringNumber) (string?)
+    #{
+      \override TextSpanner.style = #'solid
+      \override TextSpanner.font-size = #-5
+      \override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER
+      \override TextSpanner.bound-details.left.text = \markup { \circle \number $StringNumber }
+    #})
 
 
 \relative c {
index 6cef9e842f0c91521b5404fe726f664b8c2dc61a..fe78d91421b176ed0256d5d3fc0c6ae0015ce08d 100644 (file)
@@ -1,4 +1,4 @@
 combining-two-parts-on-the-same-staff.ly
-entering-several-tuplets-using-only-one--times-command.ly
+entering-several-tuplets-using-only-one--tuplet-command.ly
 extending-a-trillspanner.ly
 vertical-aligned-staffgroups-without-connecting-systemstartbar.ly
index 27c80491e768055d1220fb950f817090355e4df4..bda583ab8c6110598e27c61bf3a0fd6b27104c80 100644 (file)
@@ -1,25 +1,25 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.6
-\version "2.17.6"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "expressive-marks"
 
   texidoc = "
-Vocal and wind music frequently uses a tick mark as a breathing sign.  This
-indicates a breath that subtracts a little time from the previous note rather
-than causing a short pause, which is indicated by the comma breath mark.  The
-mark can be moved up a little to take it away from the stave.
+Vocal and wind music frequently uses a tick mark as a breathing sign.
+This indicates a breath that subtracts a little time from the previous
+note rather than causing a short pause, which is indicated by the comma
+breath mark.  The mark can be moved up a little to take it away from
+the stave.
+
 "
   doctitle = "Using a tick as the breath mark symbol"
 } % begin verbatim
 
-
 \relative c'' {
   c2
   \breathe
index 3338586384e5c4cf501bda9191a73f166515aafa..319456cba1d3096cb01534ce6704955398f82f14 100644 (file)
@@ -1,11 +1,10 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.6
-\version "2.17.6"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "rhythms, tweaks-and-overrides"
@@ -19,7 +18,6 @@ are @code{modern-straight-flag} and @code{old-straight-flag}.
   doctitle = "Using alternative flag styles"
 } % begin verbatim
 
-
 testnotes = {
   \autoBeamOff
   c8 d16 c32 d64 \acciaccatura { c8 } d64 r4
index b0c952ca65394b95164e1756f5226659f50895a9..c355a93f75dd8db2d7b222797fa856429cbed3d7 100644 (file)
@@ -1,49 +1,43 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.18.0
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
 \version "2.18.0"
 
 \header {
   lsrtags = "specific-notation, workaround"
 
   texidoc = "
-
 Often it is easier to manage line and page-breaking information by
 keeping it separate from the music by introducing an extra voice
-containing only skips along with the @code{\\break},
-@code{pageBreak} and other layout information.
+containing only skips along with the @code{\\break}, @code{pageBreak}
+and other layout information.
 
 This pattern becomes especially helpful when overriding
 @code{line-break-system-details} and the other useful but long
 properties of @code{NonMusicalPaperColumnGrob}.
+
 "
   doctitle = "Using an extra voice for breaks"
 } % begin verbatim
 
-
 music = \relative c'' { c4 c c c }
 
-\header { tagline = ##f }
-\paper { left-margin = 0\mm }
-\book {
-  \score {
-    \new Staff <<
-      \new Voice {
-        s1 * 2 \break
-        s1 * 3 \break
-        s1 * 6 \break
-        s1 * 5 \break
-      }
-      \new Voice {
-        \repeat unfold 2 { \music }
-        \repeat unfold 3 { \music }
-        \repeat unfold 6 { \music }
-        \repeat unfold 5 { \music }
-      }
-    >>
-  }
+\score {
+  \new Staff <<
+    \new Voice {
+      s1 * 2 \break
+      s1 * 3 \break
+      s1 * 6 \break
+      s1 * 5 \break
+    }
+    \new Voice {
+      \repeat unfold 2 { \music }
+      \repeat unfold 3 { \music }
+      \repeat unfold 6 { \music }
+      \repeat unfold 5 { \music }
+    }
+  >>
 }
index a348603f9abb305b1c98045b939d4dc6cf3a57b2..4d2898ff32d0d3c11606cbd41e5aac8c39bc988b 100644 (file)
@@ -1,11 +1,10 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.6
-\version "2.17.6"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "rhythms"
@@ -18,7 +17,6 @@ other situations.
   doctitle = "Using grace note slashes with normal heads"
 } % begin verbatim
 
-
 \relative c'' {
   \override Flag.stroke-style = #"grace"
   c8( d2) e8( f4)
index 82a609c12ff66ab2af1f3ff5dab4e56d575198fb..9e631e1c2fa9c3f55f225d5d6438cde9a6bb321f 100644 (file)
@@ -1,11 +1,10 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.17.27
-\version "2.17.27"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "spacing, tweaks-and-overrides, workaround"
@@ -13,9 +12,8 @@
   texidoc = "
 All @code{DynamicLineSpanner} objects (hairpins and dynamic texts) are
 placed with their reference line at least @code{'staff-padding} from
-the staff, unless other notation forces them to be farther.
-Setting @code{'staff-padding} to a sufficiently large value aligns the
-dynamics.
+the staff, unless other notation forces them to be farther. Setting
+@code{'staff-padding} to a sufficiently large value aligns the dynamics.
 
 The same idea, together with @code{\\textLengthOn}, is used to align
 the text scripts along their baseline.
@@ -24,8 +22,6 @@ the text scripts along their baseline.
   doctitle = "Vertically aligned dynamics and textscripts"
 } % begin verbatim
 
-\markup \vspace #1 %avoid LSR-bug
-
 music = \relative c' {
   a'2\p b\f
   e4\p f\f\> g, b\p
index 011aa3dcc6a7b2773f2bd76c1e306e603f84a0f1..4fe018c92bc09c95c6fcdfcb7eea356c2367f421 100644 (file)
@@ -1,26 +1,25 @@
-% DO NOT EDIT this file manually; it is automatically
-% generated from Documentation/snippets/new
-% Make any changes in Documentation/snippets/new/
-% and then run scripts/auxiliar/makelsr.py
-%
-% This file is in the public domain.
-%% Note: this file works from version 2.16.0
-\version "2.16.0"
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.di.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.18.0"
 
 \header {
   lsrtags = "winds"
 
-  texidoc="
-The snippet below produces a list of all possible keys and key
-settings for woodwind diagrams as defined in
-@file{scm/define-woodwind-diagrams.scm}.  The list will be displayed
-in the log file, but not in the music.  If output to the console
-is wanted, omit the @code{(current-error-port)} from the commands.
+  texidoc = "
+The snippet below produces a list of all possible keys and key settings
+for woodwind diagrams as defined in
+@code{scm/define-woodwind-diagrams.scm}.  The list will be displayed in
+the log file, but not in the music.  If output to the console is
+wanted, omit the @code{(current-error-port)} from the commands.
+
 "
   doctitle = "Woodwind diagrams key lists"
 } % begin verbatim
 
-
 #(print-keys-verbose 'piccolo (current-error-port))
 #(print-keys-verbose 'flute (current-error-port))
 #(print-keys-verbose 'flute-b-extension (current-error-port))
@@ -36,3 +35,5 @@ is wanted, omit the @code{(current-error-port)} from the commands.
 #(print-keys-verbose 'baritone-saxophone (current-error-port))
 #(print-keys-verbose 'bassoon (current-error-port))
 #(print-keys-verbose 'contrabassoon (current-error-port))
+
+\score {c''1}
index f4cce23c110835a2a009b35f227860557a2b477d..5959a48f09a1b18946afea6b807062db1b532aa6 100644 (file)
@@ -19,7 +19,12 @@ LilyPond version @version{}.  In addition, it suggests some
 @qq{best practices} for efficient usage.
 @end macro
 
-@c `Usage' was born 1999-10-10 with git commit c82c30c...
+@c `Usage' was born 1999-10-11 with this commit:
+@c release: 1.2.13
+@c author: Han-Wen Nienhuys
+@c commit: 0cf97b5cdceecbba937f43ac827f4065aad5001e
+@c   file: Documentation/user/invoking.itexi
+
 @macro copyrightDeclare
 Copyright @copyright{} 1999--2014 by the authors.
 @end macro
index e33f0f7a5e6f901f921e125be267e1ac83e39b08..ed1f1ffefbbc1d332fa0d105a019b45ddbb48faa 100644 (file)
 @documentlanguage en
 @afourpaper
 
-@c `Web' was imported 2009-08-05 with git commit b938d71...
-@c @macro copyrightDeclare
-@c Copyright @copyright{} 2009--2014 by the authors.
-@c @end macro
-
 @set FDL
 @set web
 @include macros.itexi
 @omflanguage English
 @end ignore
 
+@c `Web' was born 2003-03-30 with this commit:
+@c Initial revision
+@c author: Han-Wen Nienhuys
+@c commit: d189a2119004c2f75da2020ea2ed36d817582fc5
+
+@c @macro copyrightDeclare
+@c Copyright @copyright{} 2003--2014 by the authors.
+@c @end macro
+
 @copying
-Copyright @copyright{} 2009--2014 by the authors.
+Copyright @copyright{} 2003--2014 by the authors.
 
 @c next line is necessary for broken pre-4.13 texinfo's
 @c install-info, so leave it there until we officially
index 512559a6b4dba7f3119b7ee5542f66fba19ef27c..b0ed9e47be74febd3bb2933ab3f6083ff1efab17 100644 (file)
@@ -1204,45 +1204,6 @@ In particular, don't link to:
 
 @end ignore
 
-@divClass{column-center-top}
-@subheading Tunefl
-
-@sourceimage{logo-linux,,,}
-@sourceimage{logo-freebsd,,,}
-@sourceimage{logo-macosx,,,}
-@sourceimage{logo-windows,,,}
-
-@uref{http://www.tunefl.com}
-
-With tunefl you can typeset your scores directly online
-without needing to install LilyPond locally. It allows
-trying out all the program's features using a convenient
-web interface.
-
-@divEnd
-
-@divClass{column-center-top}
-@subheading LilyPondTool
-
-@imageClickable{lilypondtool-2.12-screenshot-400wide,png,
-  (click to enlarge),lilypondtool-2.12-screenshot,png,right}
-
-@sourceimage{logo-linux,,,}
-@sourceimage{logo-freebsd,,,}
-@sourceimage{logo-macosx,,,}
-@sourceimage{logo-windows,,,}
-
-@uref{http://lilypondtool.organum.hu}
-
-Created as a plugin for the
-@uref{http://www.jedit.org,jEdit} text editor,
-LilyPondTool is one of the most feature-rich text-based tools for
-editing LilyPond scores.  Its features include a Document Wizard
-with lyrics support to set up documents easier, and embedded PDF
-viewer with advanced point-and-click support.
-
-@divEnd
-
 @divClass{column-center-top}
 @subheading Frescobaldi
 
@@ -1250,13 +1211,17 @@ viewer with advanced point-and-click support.
   (click to enlarge),frescobaldi-lilypond-editor,png,right}
 
 @sourceimage{logo-linux,,,}
-@sourceimage{logo-freebsd,,,}
+@sourceimage{logo-macosx,,,}
 @sourceimage{logo-windows,,,}
 
 @uref{http://www.frescobaldi.org}
 
-Frescobaldi is lightweight, yet powerful LilyPond music and text editor
-with a built-in PDF viewer.  It is easy to use and will run on all major
+Frescobaldi is a lightweight, yet powerful, music and text editor
+with many features added and enhanced particularly for LilyPond. Major
+features include point-and-click links between the code and music views,
+detailed score wizards, built in LilyPond documentation browser, syntax
+highlighting and automatic completion. Frescobaldi is written in
+Python, with PyQt4 for its user interface, and will run on all major
 operating systems (GNU/Linux, Mac OS X and Windows).
 
 @divEnd
@@ -1268,6 +1233,7 @@ operating systems (GNU/Linux, Mac OS X and Windows).
   (click to enlarge),screenshot-denemo,png,right}
 
 @sourceimage{logo-linux,,,}
+@sourceimage{logo-macosx,,,}
 @sourceimage{logo-windows,,,}
 
 @uref{http://denemo.org}
@@ -1285,7 +1251,24 @@ the text view when printed from there.
 @divEnd
 
 @divClass{column-center-top}
-@subheading Text editors
+@subheading Tunefl
+@c do we need logos for web-based packages?
+@sourceimage{logo-linux,,,}
+@sourceimage{logo-freebsd,,,}
+@sourceimage{logo-macosx,,,}
+@sourceimage{logo-windows,,,}
+
+@uref{http://www.tunefl.com}
+
+With tunefl, you can typeset your mini-scores directly online
+without needing to install LilyPond locally. It allows
+trying out all the program's features using a convenient
+web interface.
+
+@divEnd
+
+@divClass{column-center-top}
+@subheading Elysium
 
 @sourceimage{logo-linux,,,}
 @sourceimage{logo-freebsd,,,}
@@ -1299,6 +1282,16 @@ view for source and score.  It includes rapid visual & auditive feedback
 without having to switch contexts, and comes with many wizard-driven
 templates.
 
+@divEnd
+
+@divClass{column-center-top}
+@subheading Text editors
+
+@sourceimage{logo-linux,,,}
+@sourceimage{logo-freebsd,,,}
+@sourceimage{logo-macosx,,,}
+@sourceimage{logo-windows,,,}
+
 @uref{http://www.gnu.org/software/emacs/}
 
 Emacs is a text editor with language-sensitive capabilities for
@@ -1427,6 +1420,11 @@ language.
 
 @itemize
 
+@item
+@uref{https://sourceforge.net/projects/lily4jedit,LilyPondTool} was created as a
+plugin for the
+@uref{http://www.jedit.org,jEdit} text editor.
+
 @item
 @uref{http://lilykde.googlecode.com/,LilyKDE} has been replaced by
 @uref{http://www.frescobaldi.org/,Frescobaldi}, and exists as LilyKDE3
index 50c8016a4f28dc2dca217b6f76fc51cb8ec4d26a..4b6367f03384f990964126ebfaef747b110f91fa 100644 (file)
@@ -9,9 +9,9 @@
 @c used for news about the upcoming release; see CG 10.2
 
 @newsItem
-@subsubheading LilyPond 2.19.10 released  @emph{July 13, 2014}
+@subsubheading LilyPond 2.19.11 released  @emph{August 3, 2014}
 
-We are happy to announce the release of LilyPond 2.19.10.  This
+We are happy to announce the release of LilyPond 2.19.11.  This
 release includes a number of enhancements, and contains some work
 in progress.  You will have access to the very latest features, but
 some may be incomplete, and you may encounter bugs and crashes.  If you
index 0a876101e1867e2acb34efe8c772726a49939826..8f1d4e349cb18af353a61afba5410b5913b879f6 100644 (file)
@@ -26,6 +26,18 @@ NOTE:
   * don't duplicate entries from news-front.itexi
 @end ignore
 
+@newsItem
+@subsubheading LilyPond 2.19.10 released  @emph{July 13, 2014}
+
+We are happy to announce the release of LilyPond 2.19.10.  This
+release includes a number of enhancements, and contains some work
+in progress.  You will have access to the very latest features, but
+some may be incomplete, and you may encounter bugs and crashes.  If you
+require a stable version of Lilypond, we recommend using the 2.18
+version.
+
+@newsEnd
+
 @newsItem
 @subsubheading LilyPond 2.19.9 released  @emph{June 29, 2014}
 
diff --git a/VERSION b/VERSION
index 8866a61d69eea3ffd2aa33c26c21e4350859f877..a8d8464e1f961df652a571f60a6770c19085c0b3 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=19
-PATCH_LEVEL=11
+PATCH_LEVEL=12
 MY_PATCH_LEVEL=
 VERSION_STABLE=2.18.2
-VERSION_DEVEL=2.19.10
+VERSION_DEVEL=2.19.11
index 3b99a96bc2ad07b8a3a3cb73c1a360afc826fe1f..b14fa520906c06b3c49ad93a6ac8dd0babbeba43 100644 (file)
@@ -168,6 +168,8 @@ stderr of this run."
 \test ##[ \key e \minor #]
 \test ##[ \clef "bass" #]
 \test ##[ \clef "french^2" #]
+\test ##[ \clef "treble_[8]" #]
+\test ##[ \clef "bass^(15)" #]
 \test ##[ \clef "alto_3" #]
 \test ##[ \time 2/4 #]
 \test ##[ \time #'(3 2) 5/8 #]
index a5545558e8611f9d0bbc8a109663fe61fe7cebd4..7a98ab3f75d13cece34efad7b6148bd6c0d2ae19 100644 (file)
@@ -1,41 +1,24 @@
-\version "2.17.10"
+\version "2.18.0"
 
 \header {
   texidoc = "Incipits can be printed using an @code{InstrumentName}
 grob."
 }
 
-%% to prevent warnings/programming errors:
-#(begin
-   (set-object-property! 'music 'backend-type? ly:music?)
-   (set-object-property! 'music 'backend-doc "Incipit music")
-   (ly:add-interface 'incipit-interface "An incipit." '(music))
-   (let* ((instrument-def (assoc 'InstrumentName all-grob-descriptions))
-         (meta-def (assoc 'meta (cdr instrument-def)))
-         (interfaces-def (assoc 'interfaces (cdr meta-def)))
-         (interfaces (cdr interfaces-def)))
-     (set-cdr! interfaces-def (cons 'incipit-interface interfaces))))
-
 \score {
   \new Staff {
     %% All this would be shortcuted by an appropriate music function:
-    \override Staff.InstrumentName.music = ##{ \clef "petrucci-c1" c'4 d' e' f' #}
     \override Staff.InstrumentName.self-alignment-X = #RIGHT
+    \override Staff.InstrumentName.self-alignment-Y = ##f
     \override Staff.InstrumentName.padding = #0
     \override Staff.InstrumentName.stencil =
       #(lambda (grob)
          (let* ((instrument-name (ly:grob-property grob 'long-text))
                 (layout (ly:output-def-clone (ly:grob-layout grob)))
-                (music (make-sequential-music
-                        (list (context-spec-music
-                               (make-sequential-music
-                                (list (make-property-set
-                                       'instrumentName instrument-name)
-                                      (make-grob-property-set
-                                       'VerticalAxisGroup
-                                       'Y-extent '(-4 . 4))))
-                               'MensuralStaff)
-                              (ly:grob-property grob 'music))))
+                (music #{ \new MensuralStaff
+                         \with { instrumentName = #instrument-name }
+                         { \clef "petrucci-c1" c'4 d' e' f' }
+                         #})
                 (score (ly:make-score music))
                 (indent (ly:output-def-lookup layout 'indent))
                 (incipit-width (ly:output-def-lookup layout 'incipit-width
diff --git a/input/regression/magnifyMusic-tablature-double-stems.ly b/input/regression/magnifyMusic-tablature-double-stems.ly
new file mode 100644 (file)
index 0000000..35cef69
--- /dev/null
@@ -0,0 +1,20 @@
+\version "2.19.11"
+
+\header {
+  texidoc = "Tablature half-note double-stems should be scaled along
+with notation size when using the @code{\magnifyMusic} command."
+}
+
+<<
+  \new TabVoice = "tabvoice" {
+    \tabFullNotation
+    \magnifyMusic 0.5 { c4 c2 c4 }
+    c4 c2 c4
+    \magnifyMusic 2.0 { c4 c2 c4 }
+  }
+  \new Lyrics \lyricsto "tabvoice" {
+    "50%" _ _
+    "100%" _ _
+    "200%" _ _
+  }
+>>
diff --git a/input/regression/magnifyMusic-text-interface.ly b/input/regression/magnifyMusic-text-interface.ly
new file mode 100644 (file)
index 0000000..3ab2b70
--- /dev/null
@@ -0,0 +1,22 @@
+\version "2.19.11"
+
+\header {
+  texidoc = "All text-interface grobs should have
+@w{@code{baseline-skip}} and @w{@code{word-space}} values scaled
+along with notation size when using the @code{\magnifyMusic}
+command."
+}
+
+music = {
+  b'1^\markup {
+    \center-column { a c }
+    \center-column { b d }
+  }
+}
+
+{
+  \override TextScript.baseline-skip = #2
+  \magnifyMusic 0.5 \music
+  \music
+  \magnifyMusic 2.0 \music
+}
diff --git a/input/regression/magnifyStaff-tablature-double-stems.ly b/input/regression/magnifyStaff-tablature-double-stems.ly
new file mode 100644 (file)
index 0000000..651054f
--- /dev/null
@@ -0,0 +1,20 @@
+\version "2.19.11"
+
+\header {
+  texidoc = "Tablature half-note double-stems should be scaled along
+with notation size when using the @code{\magnifyStaff} command."
+}
+
+<<
+  \new TabVoice = "tabvoice" {
+    \tabFullNotation
+    \magnifyStaff 0.5 c4 c2 c4
+    \magnifyStaff 1.0 c4 c2 c4
+    \magnifyStaff 2.0 c4 c2 c4
+  }
+  \new Lyrics \lyricsto "tabvoice" {
+    "50%" _ _
+    "100%" _ _
+    "200%" _ _
+  }
+>>
diff --git a/input/regression/magnifyStaff-text-interface.ly b/input/regression/magnifyStaff-text-interface.ly
new file mode 100644 (file)
index 0000000..e1fd75d
--- /dev/null
@@ -0,0 +1,37 @@
+\version "2.19.11"
+
+\header {
+  texidoc = "All text-interface grobs that are within the Staff
+context should have @w{@code{baseline-skip}} and
+@w{@code{word-space}} values scaled along with notation size when
+using the @code{\magnifyStaff} command."
+}
+
+\paper {
+  line-width = 60
+  ragged-right = ##f
+  score-system-spacing = #'((padding . 3))
+}
+
+\layout {
+  \context {
+    \Staff
+    \override TextScript.baseline-skip = 2
+    \override InstrumentName.baseline-skip = 2
+    \override InstrumentName.self-alignment-X = 0.75
+  }
+}
+
+abcd = \markup {
+  \center-column { a c }
+  \center-column { b d }
+}
+
+music = {
+  \set Staff.instrumentName = \markup \abcd
+  b'1^\markup \abcd
+}
+
+\new Staff { \magnifyStaff 0.5 \music }
+\new Staff { \magnifyStaff 1.0 \music }
+\new Staff { \magnifyStaff 2.0 \music }
index 0845a66de2da907a2f424082ced7e8cd0a8e178c..5bc78357b25d861b50f73377909af0419aa5bde7 100644 (file)
@@ -233,7 +233,7 @@ Accidental_engraver::process_acknowledged ()
           Stream_event *note = accidentals_[i].melodic_;
           Context *origin = accidentals_[i].origin_;
 
-          Pitch *pitch = unsmob_pitch (note->get_property ("pitch"));
+          Pitch *pitch = Pitch::unsmob (note->get_property ("pitch"));
           if (!pitch)
             continue;
 
@@ -348,7 +348,7 @@ Accidental_engraver::make_suggested_accidental (Stream_event * /* note */,
   Grob *a = trans->make_item ("AccidentalSuggestion", note_head->self_scm ());
 
   Side_position_interface::add_support (a, note_head);
-  if (Grob *stem = unsmob_grob (a->get_object ("stem")))
+  if (Grob *stem = Grob::unsmob (a->get_object ("stem")))
     Side_position_interface::add_support (a, stem);
 
   a->set_parent (note_head, X_AXIS);
@@ -387,7 +387,7 @@ Accidental_engraver::stop_translation_timestep ()
 
       int barnum = measure_number (origin);
 
-      Pitch *pitch = unsmob_pitch (note->get_property ("pitch"));
+      Pitch *pitch = Pitch::unsmob (note->get_property ("pitch"));
       if (!pitch)
         continue;
 
@@ -397,7 +397,7 @@ Accidental_engraver::stop_translation_timestep ()
       SCM key = scm_cons (scm_from_int (o), scm_from_int (n));
 
       Moment end_mp = measure_position (context (),
-                                        unsmob_duration (note->get_property ("duration")));
+                                        Duration::unsmob (note->get_property ("duration")));
       SCM position = scm_cons (scm_from_int (barnum), end_mp.smobbed_copy ());
 
       SCM localsig = SCM_EOL;
index 6fa61e967de6a74cf0e62cf89848bab3bbc1259a..edc176a5207b8e2a7428b67ea7f5e05a120438d5 100644 (file)
@@ -36,14 +36,14 @@ accidental_pitch (Grob *acc)
 {
   SCM cause = acc->get_parent (Y_AXIS)->get_property ("cause");
 
-  Stream_event *mcause = unsmob_stream_event (cause);
+  Stream_event *mcause = Stream_event::unsmob (cause);
   if (!mcause)
     {
       programming_error ("note head has no event cause");
       return 0;
     }
 
-  return unsmob_pitch (mcause->get_property ("pitch"));
+  return Pitch::unsmob (mcause->get_property ("pitch"));
 }
 
 void
@@ -85,9 +85,9 @@ Accidental_placement::split_accidentals (Grob *accs,
        acs = scm_cdr (acs))
     for (SCM s = scm_cdar (acs); scm_is_pair (s); s = scm_cdr (s))
       {
-        Grob *a = unsmob_grob (scm_car (s));
+        Grob *a = Grob::unsmob (scm_car (s));
 
-        if (unsmob_grob (a->get_object ("tie"))
+        if (Grob::unsmob (a->get_object ("tie"))
             && !to_boolean (a->get_property ("forced")))
           break_reminder->push_back (a);
         else
@@ -237,7 +237,7 @@ build_apes (SCM accs)
       Accidental_placement_entry *ape = new Accidental_placement_entry;
 
       for (SCM t = scm_cdar (s); scm_is_pair (t); t = scm_cdr (t))
-        ape->grobs_.push_back (unsmob_grob (scm_car (t)));
+        ape->grobs_.push_back (Grob::unsmob (scm_car (t)));
 
       apes.push_back (ape);
     }
@@ -470,7 +470,7 @@ MAKE_SCHEME_CALLBACK (Accidental_placement, calc_positioning_done, 1);
 SCM
 Accidental_placement::calc_positioning_done (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   if (!me->is_live ())
     return SCM_BOOL_T;
 
index dc3c873878f095709d4c7187bf37f30bcbbf0849..62f5235b1c4693eb6b4f0fdb8bfd45703e4bdb38 100644 (file)
@@ -48,7 +48,7 @@ parenthesize (Grob *me, Stencil m)
 static SCM
 get_extent (Grob *me, Axis a)
 {
-  Stencil *s = unsmob_stencil (Accidental_interface::get_stencil (me));
+  Stencil *s = Stencil::unsmob (Accidental_interface::get_stencil (me));
 
   if (s)
     return ly_interval2scm (s->extent (a));
@@ -59,21 +59,21 @@ MAKE_SCHEME_CALLBACK (Accidental_interface, height, 1);
 SCM
 Accidental_interface::height (SCM smob)
 {
-  return get_extent (unsmob_grob (smob), Y_AXIS);
+  return get_extent (Grob::unsmob (smob), Y_AXIS);
 }
 
 MAKE_SCHEME_CALLBACK (Accidental_interface, width, 1);
 SCM
 Accidental_interface::width (SCM smob)
 {
-  return get_extent (unsmob_grob (smob), X_AXIS);
+  return get_extent (Grob::unsmob (smob), X_AXIS);
 }
 
 MAKE_SCHEME_CALLBACK (Accidental_interface, horizontal_skylines, 1);
 SCM
 Accidental_interface::horizontal_skylines (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   if (!me->is_live ())
     return Skyline_pair ().smobbed_copy ();
 
@@ -82,7 +82,7 @@ Accidental_interface::horizontal_skylines (SCM smob)
    * before line breaking. It is therefore `unpure' (c).
    * We use the more basic get_stencil.
    */
-  Stencil *my_stencil = unsmob_stencil (get_stencil (me));
+  Stencil *my_stencil = Stencil::unsmob (get_stencil (me));
   if (!my_stencil)
     return Skyline_pair ().smobbed_copy ();
 
@@ -120,16 +120,16 @@ MAKE_SCHEME_CALLBACK (Accidental_interface, pure_height, 3);
 SCM
 Accidental_interface::pure_height (SCM smob, SCM start_scm, SCM)
 {
-  Item *me = dynamic_cast<Item *> (unsmob_grob (smob));
+  Item *me = dynamic_cast<Item *> (Grob::unsmob (smob));
   int start = scm_to_int (start_scm);
   int rank = me->get_column ()->get_rank ();
 
   if (to_boolean (me->get_property ("forced"))
-      || !unsmob_grob (me->get_object ("tie"))
+      || !Grob::unsmob (me->get_object ("tie"))
       || (rank == start + 1 && /* we are at the start of a line */
           !to_boolean (me->get_property ("hide-tied-accidental-after-break"))))
     {
-      Stencil *s = unsmob_stencil (get_stencil (me));
+      Stencil *s = Stencil::unsmob (get_stencil (me));
       if (s)
         return ly_interval2scm (s->extent (Y_AXIS));
     }
@@ -141,8 +141,8 @@ MAKE_SCHEME_CALLBACK (Accidental_interface, print, 1);
 SCM
 Accidental_interface::print (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
-  Grob *tie = unsmob_grob (me->get_object ("tie"));
+  Grob *me = Grob::unsmob (smob);
+  Grob *tie = Grob::unsmob (me->get_object ("tie"));
 
   if (tie
       && (to_boolean (me->get_property ("hide-tied-accidental-after-break"))
index 36bfec72a4854cfe7be89f50ceae08fde4b76bdb..90db684848dbe154d775cb5d71b9874d84901954 100644 (file)
@@ -36,7 +36,7 @@ MAKE_SCHEME_CALLBACK (Align_interface, align_to_minimum_distances, 1);
 SCM
 Align_interface::align_to_minimum_distances (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   me->set_property ("positioning-done", SCM_BOOL_T);
 
@@ -52,7 +52,7 @@ MAKE_SCHEME_CALLBACK (Align_interface, align_to_ideal_distances, 1);
 SCM
 Align_interface::align_to_ideal_distances (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   me->set_property ("positioning-done", SCM_BOOL_T);
 
@@ -353,11 +353,11 @@ void
 Align_interface::set_ordered (Grob *me)
 {
   SCM ga_scm = me->get_object ("elements");
-  Grob_array *ga = unsmob_grob_array (ga_scm);
+  Grob_array *ga = Grob_array::unsmob (ga_scm);
   if (!ga)
     {
       ga_scm = Grob_array::make_array ();
-      ga = unsmob_grob_array (ga_scm);
+      ga = Grob_array::unsmob (ga_scm);
       me->set_object ("elements", ga_scm);
     }
 
index 42b405e11bd44acd2ac74da382ea00992d406252..537daa50add0e4438358b1845523c08dd98e6b19 100644 (file)
@@ -103,7 +103,7 @@ All_font_metrics::find_pango_font (PangoFontDescription const *description,
                                    scm_from_double (1.0));
     }
   g_free (pango_fn);
-  return dynamic_cast<Pango_font *> (unsmob_metrics (val));
+  return dynamic_cast<Pango_font *> (Font_metric::unsmob (val));
 }
 
 #endif
@@ -128,15 +128,15 @@ All_font_metrics::find_otf (const string &name)
 
       debug_output ("]", false);
 
-      unsmob_metrics (val)->file_name_ = file_name;
+      Font_metric::unsmob (val)->file_name_ = file_name;
       SCM name_string = ly_string2scm (name);
-      unsmob_metrics (val)->description_ = scm_cons (name_string,
+      Font_metric::unsmob (val)->description_ = scm_cons (name_string,
                                                      scm_from_double (1.0));
       otf_dict_->set (sname, val);
-      unsmob_metrics (val)->unprotect ();
+      Font_metric::unsmob (val)->unprotect ();
     }
 
-  return dynamic_cast<Open_type_font *> (unsmob_metrics (val));
+  return dynamic_cast<Open_type_font *> (Font_metric::unsmob (val));
 }
 
 Font_metric *
index f904b877e0baf270d5926f7d3d0ab59fea8eee5b..972ca2932ca05ddbf103e200abaab98ceaf26d70 100644 (file)
@@ -143,9 +143,9 @@ Ambitus_engraver::acknowledge_note_head (Grob_info info)
         If the engraver is added to a percussion context,
         filter out unpitched note heads.
       */
-      if (!unsmob_pitch (p))
+      if (!Pitch::unsmob (p))
         return;
-      Pitch pitch = *unsmob_pitch (p);
+      Pitch pitch = *Pitch::unsmob (p);
       Drul_array<bool> expands = pitch_interval_.add_point (pitch);
       if (expands[UP])
         causes_[UP] = nr;
index 0d5c36661c2e85d15dedbfc1e70ba51d75219d09..751d91d28fafbf1da41325f7f8d8a2828e83a2a6 100644 (file)
@@ -60,7 +60,7 @@ MAKE_SCHEME_CALLBACK (Arpeggio, calc_cross_staff, 1);
 SCM
 Arpeggio::calc_cross_staff (SCM grob)
 {
-  Grob *me = unsmob_grob (grob);
+  Grob *me = Grob::unsmob (grob);
 
   extract_grob_set (me, "stems", stems);
   Grob *vag = 0;
@@ -83,7 +83,7 @@ MAKE_SCHEME_CALLBACK (Arpeggio, calc_positions, 1);
 SCM
 Arpeggio::calc_positions (SCM grob)
 {
-  Grob *me = unsmob_grob (grob);
+  Grob *me = Grob::unsmob (grob);
   Grob *common = get_common_y (me);
 
   /*
@@ -116,7 +116,7 @@ MAKE_SCHEME_CALLBACK (Arpeggio, print, 1);
 SCM
 Arpeggio::print (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Interval heads = robust_scm2interval (me->get_property ("positions"),
                                         Interval ())
                    * Staff_symbol_referencer::staff_space (me);
@@ -184,7 +184,7 @@ MAKE_SCHEME_CALLBACK (Arpeggio, brew_chord_bracket, 1);
 SCM
 Arpeggio::brew_chord_bracket (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Interval heads = robust_scm2interval (me->get_property ("positions"),
                                         Interval ())
                    * Staff_symbol_referencer::staff_space (me);
@@ -203,7 +203,7 @@ MAKE_SCHEME_CALLBACK (Arpeggio, brew_chord_slur, 1);
 SCM
 Arpeggio::brew_chord_slur (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   SCM dash_definition = me->get_property ("dash-definition");
   Interval heads = robust_scm2interval (me->get_property ("positions"),
                                         Interval ())
@@ -230,7 +230,7 @@ MAKE_SCHEME_CALLBACK (Arpeggio, width, 1);
 SCM
 Arpeggio::width (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   return ly_interval2scm (get_squiggle (me).extent (X_AXIS));
 }
 
@@ -238,7 +238,7 @@ MAKE_SCHEME_CALLBACK (Arpeggio, pure_height, 3);
 SCM
 Arpeggio::pure_height (SCM smob, SCM, SCM)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   if (to_boolean (me->get_property ("cross-staff")))
     return ly_interval2scm (Interval ());
 
index 164e8e7fa2fa4bb985b20e4a00c2c89f1756d01c..7ffa7fb260bd356232b84c5a4d43ff0283f73114 100644 (file)
@@ -56,7 +56,7 @@ articulation_list (vector<Stream_event *> note_events,
       for (SCM s = event->get_property ("articulations");
            !articulation_event && scm_is_pair (s); s = scm_cdr (s))
         {
-          Stream_event *art = unsmob_stream_event (scm_car (s));
+          Stream_event *art = Stream_event::unsmob (scm_car (s));
 
           if (art->in_event_class (articulation_name))
             articulation_event = art;
index 8204d45d1cb85ed498d0d78feefbb867999832c7..4d63ff8d23b4e646df87ad8638f91c097eb49af6 100644 (file)
@@ -217,6 +217,7 @@ Audio_control_function_value_change::context_properties_[] = {
   // property name, enum constant, lower bound for range, upper bound for range
   { "midiBalance",     BALANCE,      -1.0, 1.0 },
   { "midiPanPosition", PAN_POSITION, -1.0, 1.0 },
+  { "midiExpression",  EXPRESSION,    0.0, 1.0 },
   { "midiReverbLevel", REVERB_LEVEL,  0.0, 1.0 },
   { "midiChorusLevel", CHORUS_LEVEL,  0.0, 1.0 },
   // extra element to signify the end of the mapping, must be kept last
index 8b55b44521d6b11fcbe94e110bb0fdd9aa22ed22..cc756b7e21c2eec0991ba1b3c98cf53d6eb7884b 100644 (file)
@@ -394,7 +394,7 @@ Auto_beam_engraver::acknowledge_stem (Grob_info info)
       return;
     }
 
-  int durlog = unsmob_duration (ev->get_property ("duration"))->duration_log ();
+  int durlog = Duration::unsmob (ev->get_property ("duration"))->duration_log ();
 
   if (durlog <= 2)
     {
@@ -410,10 +410,10 @@ Auto_beam_engraver::acknowledge_stem (Grob_info info)
   if (!is_same_grace_state (beam_start_location_, now))
     return;
 
-  Duration *stem_duration = unsmob_duration (ev->get_property ("duration"));
+  Duration *stem_duration = Duration::unsmob (ev->get_property ("duration"));
   Moment dur = stem_duration->get_length ();
 
-  //Moment dur = unsmob_duration (ev->get_property ("duration"))->get_length ();
+  //Moment dur = Duration::unsmob (ev->get_property ("duration"))->get_length ();
   Moment measure_now = measure_position (context ());
   bool recheck_needed = false;
 
index 9dcd9993bc193b9d81d6e1fb9eafa05d7b3e1b02..4559344fd8448d558a2ba9b895176ee290c57951 100644 (file)
@@ -108,7 +108,7 @@ Auto_change_iterator::process (Moment m)
 
   for (; scm_is_pair (split_list_); split_list_ = scm_cdr (split_list_))
     {
-      splitm = unsmob_moment (scm_caar (split_list_));
+      splitm = Moment::unsmob (scm_caar (split_list_));
       if ((*splitm + start_moment_) > now)
         break;
 
index 0b491eefc93f3ce689edcd76475db8d430f4bffa..8c24ef86a3d6c2f597c9c577250fa14abae26472 100644 (file)
@@ -89,7 +89,7 @@ Axis_group_engraver::process_music ()
   if (!staffline_ && active_)
     {
       staffline_ = get_spanner ();
-      Grob *it = unsmob_grob (get_property ("currentCommandColumn"));
+      Grob *it = Grob::unsmob (get_property ("currentCommandColumn"));
       staffline_->set_bound (LEFT, it);
     }
   interesting_ = get_property ("keepAliveInterfaces");
@@ -106,7 +106,7 @@ Axis_group_engraver::finalize ()
 {
   if (staffline_)
     {
-      Grob *it = unsmob_grob (get_property ("currentCommandColumn"));
+      Grob *it = Grob::unsmob (get_property ("currentCommandColumn"));
       staffline_->set_bound (RIGHT, it);
 
       Pointer_group_interface::set_ordered (staffline_, ly_symbol2scm ("elements"), false);
@@ -141,7 +141,7 @@ Axis_group_engraver::process_acknowledged ()
 
   for (vsize i = 0; i < elts_.size (); i++)
     {
-      if (!unsmob_grob (elts_[i]->get_object ("axis-group-parent-Y")))
+      if (!Grob::unsmob (elts_[i]->get_object ("axis-group-parent-Y")))
         {
           if (staffline_->get_parent (Y_AXIS)
               && staffline_->get_parent (Y_AXIS) == elts_[i])
index ec89e8337cbda15e93de3deffa06d99c30a1cace..4741b3719cd2627801a581f46b2068160000c2cf 100644 (file)
@@ -27,7 +27,7 @@ LY_DEFINE (ly_relative_group_extent, "ly:relative-group-extent",
            "Determine the extent of @var{elements} relative to @var{common} in the"
            " @var{axis} direction.")
 {
-  Grob_array *ga = unsmob_grob_array (elements);
+  Grob_array *ga = Grob_array::unsmob (elements);
 
   SCM_ASSERT_TYPE (ga || scm_is_pair (elements), elements, SCM_ARG1, __FUNCTION__, "list or Grob_array");
   LY_ASSERT_SMOB (Grob, common, 2);
@@ -37,11 +37,11 @@ LY_DEFINE (ly_relative_group_extent, "ly:relative-group-extent",
   if (!ga)
     {
       for (SCM s = elements; scm_is_pair (s); s = scm_cdr (s))
-        elts.push_back (unsmob_grob (scm_car (s)));
+        elts.push_back (Grob::unsmob (scm_car (s)));
     }
 
   Interval ext = Axis_group_interface::relative_group_extent (ga ? ga->array () : elts,
-                                                              unsmob_grob (common),
+                                                              Grob::unsmob (common),
                                                               (Axis) scm_to_int (axis));
   return ly_interval2scm (ext);
 }
@@ -56,7 +56,7 @@ LY_DEFINE (ly_generic_bound_extent, "ly:generic-bound-extent",
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_SMOB (Grob, common, 2);
 
-  Interval ext = Axis_group_interface::generic_bound_extent (unsmob_grob (grob), unsmob_grob (common), X_AXIS);
+  Interval ext = Axis_group_interface::generic_bound_extent (Grob::unsmob (grob), Grob::unsmob (common), X_AXIS);
   return ly_interval2scm (ext);
 }
 
@@ -67,6 +67,6 @@ LY_DEFINE (ly_axis_group_interface__add_element, "ly:axis-group-interface::add-e
 {
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_SMOB (Grob, grob_element, 2);
-  Axis_group_interface::add_element (unsmob_grob (grob), unsmob_grob (grob_element));
+  Axis_group_interface::add_element (Grob::unsmob (grob), Grob::unsmob (grob_element));
   return SCM_UNSPECIFIED;
 }
index af3ddcb8a310b181e910845d7349e0610bf69f8d..e27ce099c5bee8868e736b3e6514e5ba1984fc7c 100644 (file)
@@ -221,9 +221,9 @@ MAKE_SCHEME_CALLBACK (Axis_group_interface, adjacent_pure_heights, 1)
 SCM
 Axis_group_interface::adjacent_pure_heights (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
-  Grob *common = unsmob_grob (me->get_object ("pure-Y-common"));
+  Grob *common = Grob::unsmob (me->get_object ("pure-Y-common"));
   extract_grob_set (me, "pure-relevant-grobs", elts);
 
   Paper_score *ps = get_root_system (me)->paper_score ();
@@ -331,7 +331,7 @@ Axis_group_interface::relative_pure_height (Grob *me, int start, int end)
   if (p && Align_interface::has_interface (p))
     return Axis_group_interface::sum_partial_pure_heights (me, start, end);
 
-  Grob *common = unsmob_grob (me->get_object ("pure-Y-common"));
+  Grob *common = Grob::unsmob (me->get_object ("pure-Y-common"));
   extract_grob_set (me, "pure-relevant-grobs", elts);
 
   Interval r;
@@ -356,7 +356,7 @@ MAKE_SCHEME_CALLBACK (Axis_group_interface, width, 1);
 SCM
 Axis_group_interface::width (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   return generic_group_extent (me, X_AXIS);
 }
 
@@ -364,7 +364,7 @@ MAKE_SCHEME_CALLBACK (Axis_group_interface, height, 1);
 SCM
 Axis_group_interface::height (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   return generic_group_extent (me, Y_AXIS);
 }
 
@@ -374,7 +374,7 @@ Axis_group_interface::pure_height (SCM smob, SCM start_scm, SCM end_scm)
 {
   int start = robust_scm2int (start_scm, 0);
   int end = robust_scm2int (end_scm, INT_MAX);
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   /* Maybe we are in the second pass of a two-pass spacing run. In that
      case, the Y-extent of a system is already given to us */
@@ -394,7 +394,7 @@ MAKE_SCHEME_CALLBACK (Axis_group_interface, calc_skylines, 1);
 SCM
 Axis_group_interface::calc_skylines (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Skyline_pair skylines = skyline_spacing (me);
   return skylines.smobbed_copy ();
 }
@@ -409,7 +409,7 @@ MAKE_SCHEME_CALLBACK (Axis_group_interface, combine_skylines, 1);
 SCM
 Axis_group_interface::combine_skylines (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   extract_grob_set (me, "elements", elements);
   Grob *y_common = common_refpoint_of_array (elements, me, Y_AXIS);
   Grob *x_common = common_refpoint_of_array (elements, me, X_AXIS);
@@ -473,7 +473,7 @@ MAKE_SCHEME_CALLBACK (Axis_group_interface, calc_pure_relevant_grobs, 1);
 SCM
 Axis_group_interface::calc_pure_relevant_grobs (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   /* TODO: Filter out elements that belong to a different Axis_group,
      such as the tie in
      << \new Staff=A { c'1~ \change Staff=B c'}
@@ -520,7 +520,7 @@ Axis_group_interface::internal_calc_pure_relevant_grobs (Grob *me, const string
 
   vector_sort (relevant_grobs, pure_staff_priority_less);
   SCM grobs_scm = Grob_array::make_array ();
-  unsmob_grob_array (grobs_scm)->set_array (relevant_grobs);
+  Grob_array::unsmob (grobs_scm)->set_array (relevant_grobs);
 
   return grobs_scm;
 }
@@ -529,7 +529,7 @@ MAKE_SCHEME_CALLBACK (Axis_group_interface, calc_pure_y_common, 1);
 SCM
 Axis_group_interface::calc_pure_y_common (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   extract_grob_set (me, "pure-relevant-grobs", elts);
   Grob *common = common_refpoint_of_array (elts, me, Y_AXIS);
@@ -566,20 +566,20 @@ MAKE_SCHEME_CALLBACK (Axis_group_interface, calc_x_common, 1);
 SCM
 Axis_group_interface::calc_x_common (SCM grob)
 {
-  return calc_common (unsmob_grob (grob), X_AXIS);
+  return calc_common (Grob::unsmob (grob), X_AXIS);
 }
 
 MAKE_SCHEME_CALLBACK (Axis_group_interface, calc_y_common, 1);
 SCM
 Axis_group_interface::calc_y_common (SCM grob)
 {
-  return calc_common (unsmob_grob (grob), Y_AXIS);
+  return calc_common (Grob::unsmob (grob), Y_AXIS);
 }
 
 Interval
 Axis_group_interface::pure_group_height (Grob *me, int start, int end)
 {
-  Grob *common = unsmob_grob (me->get_object ("pure-Y-common"));
+  Grob *common = Grob::unsmob (me->get_object ("pure-Y-common"));
 
   if (!common)
     {
@@ -644,7 +644,7 @@ pure_staff_priority_less (Grob *const &g1, Grob *const &g2)
 static void
 add_interior_skylines (Grob *me, Grob *x_common, Grob *y_common, vector<Skyline_pair> *skylines)
 {
-  if (Grob_array *elements = unsmob_grob_array (me->get_object ("elements")))
+  if (Grob_array *elements = Grob_array::unsmob (me->get_object ("elements")))
     {
       for (vsize i = 0; i < elements->size (); i++)
         add_interior_skylines (elements->grob (i), x_common, y_common, skylines);
@@ -981,7 +981,7 @@ Axis_group_interface::print (SCM smob)
   if (!debug_skylines)
     return SCM_BOOL_F;
 
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Stencil ret;
   if (Skyline_pair *s = Skyline_pair::unsmob (me->get_property ("vertical-skylines")))
     {
@@ -997,7 +997,7 @@ MAKE_SCHEME_CALLBACK (Axis_group_interface, calc_pure_staff_staff_spacing, 3)
 SCM
 Axis_group_interface::calc_pure_staff_staff_spacing (SCM smob, SCM start, SCM end)
 {
-  return calc_maybe_pure_staff_staff_spacing (unsmob_grob (smob),
+  return calc_maybe_pure_staff_staff_spacing (Grob::unsmob (smob),
                                               true,
                                               scm_to_int (start),
                                               scm_to_int (end));
@@ -1007,7 +1007,7 @@ MAKE_SCHEME_CALLBACK (Axis_group_interface, calc_staff_staff_spacing, 1)
 SCM
 Axis_group_interface::calc_staff_staff_spacing (SCM smob)
 {
-  return calc_maybe_pure_staff_staff_spacing (unsmob_grob (smob),
+  return calc_maybe_pure_staff_staff_spacing (Grob::unsmob (smob),
                                               false,
                                               0,
                                               INT_MAX);
@@ -1016,7 +1016,7 @@ Axis_group_interface::calc_staff_staff_spacing (SCM smob)
 SCM
 Axis_group_interface::calc_maybe_pure_staff_staff_spacing (Grob *me, bool pure, int start, int end)
 {
-  Grob *grouper = unsmob_grob (me->get_object ("staff-grouper"));
+  Grob *grouper = Grob::unsmob (me->get_object ("staff-grouper"));
 
   if (grouper)
     {
index 8c50d2c0a4c35bcd28d16078a8f79f688d56a3f8..fb3cd056fbfda5708f0014c8112958934a9060cc 100644 (file)
@@ -71,7 +71,7 @@ Balloon_engraver::acknowledge_grob (Grob_info info)
   SCM arts = cause ? cause->get_property ("articulations") : SCM_EOL;
   for (SCM s = arts; scm_is_pair (s); s = scm_cdr (s))
     {
-      Stream_event *e = unsmob_stream_event (scm_car (s));
+      Stream_event *e = Stream_event::unsmob (scm_car (s));
       if (e->in_event_class ("annotate-output-event"))
         {
           balloonify (info.grob (), e);
index ec44f80b378009e991fa1a2e0612f39e6ccac4fb..859aa5f422cad33e439436fff23ca30f269c21ac 100644 (file)
@@ -42,7 +42,7 @@ MAKE_SCHEME_CALLBACK (Balloon_interface, print, 1);
 SCM
 Balloon_interface::print (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   if (Item *item = dynamic_cast<Item *> (me))
     if (!Item::break_visible (item))
@@ -60,7 +60,7 @@ MAKE_SCHEME_CALLBACK (Balloon_interface, print_spanner, 1);
 SCM
 Balloon_interface::print_spanner (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
   Spanner *orig = dynamic_cast<Spanner *> (me->original ());
 
   if (orig)
@@ -102,7 +102,7 @@ Balloon_interface::internal_balloon_print (Grob *me, Grob *p, Offset off)
   SCM chain = Font_interface::text_font_alist_chain (me);
   SCM stencil = Text_interface::interpret_markup (me->layout ()->self_scm (),
                                                   chain, bt);
-  Stencil *text_stil = unsmob_stencil (stencil);
+  Stencil *text_stil = Stencil::unsmob (stencil);
 
   Offset z1;
 
index e4d26f8a1a3db33a2f359c9d196c517a361e1a02..848736b8d4ca9ae1fdde2511a83ec57be721fa2d 100644 (file)
@@ -56,7 +56,7 @@ Bar_check_iterator::process (Moment m)
       SCM mp = tr->get_property ("measurePosition");
       SCM sync = tr->get_property ("barCheckSynchronize");
 
-      Moment *where = unsmob_moment (mp);
+      Moment *where = Moment::unsmob (mp);
       if (!where)
         return;
 
@@ -73,8 +73,8 @@ Bar_check_iterator::process (Moment m)
           else
             {
               SCM lf = tr->get_property ("barCheckLastFail");
-              if (unsmob_moment (lf)
-                  && *unsmob_moment (lf) == *where)
+              if (Moment::unsmob (lf)
+                  && *Moment::unsmob (lf) == *where)
                 warn = false;
               else
                 tr->set_property ("barCheckLastFail", mp);
index 35ef3e315184ea06aff9ee872a4a5811bfc73cac..dd03c7be0c19af7bc89cec922996f2833f8a8d2e 100644 (file)
@@ -121,11 +121,11 @@ Beam_collision_engraver::finalize ()
             {
               // Do not consider note heads attached to the beam.
               if (Stem::has_interface (covered_grob))
-                if (unsmob_grob (covered_grob->get_object ("beam")))
+                if (Grob::unsmob (covered_grob->get_object ("beam")))
                   continue;
 
-              if (Grob *stem = unsmob_grob (covered_grob->get_object ("stem")))
-                if (Grob *beam = unsmob_grob (stem->get_object ("beam")))
+              if (Grob *stem = Grob::unsmob (covered_grob->get_object ("stem")))
+                if (Grob *beam = Grob::unsmob (stem->get_object ("beam")))
                   if (beam == beam_grob)
                     continue;
 
index 2672a3aff4d091be5af7061073a8b51393eccf76..9ab1d998478fc58544b8617967ea541c9f2c61ec 100644 (file)
@@ -285,9 +285,9 @@ Beam_engraver::acknowledge_stem (Grob_info info)
 
   last_stem_added_at_ = now;
 
-  Duration *stem_duration = unsmob_duration (ev->get_property ("duration"));
+  Duration *stem_duration = Duration::unsmob (ev->get_property ("duration"));
   int durlog = stem_duration->duration_log ();
-  //int durlog = unsmob_duration (ev->get_property ("duration"))->duration_log ();
+  //int durlog = Duration::unsmob (ev->get_property ("duration"))->duration_log ();
   if (durlog <= 2)
     {
       ev->origin ()->warning (_ ("stem does not fit in beam"));
index b5cf0a2fc0ed359d77132bd67b61374fe0f6e7e1..c73f91fbc828580c3276c69a61fc1da487ec7e9f 100644 (file)
@@ -352,7 +352,7 @@ void Beam_scoring_problem::init_instance_variables (Grob *me, Drul_array<Real> y
           for (LEFT_and_RIGHT (d))
             add_collision (b[X_AXIS][d], b[Y_AXIS], width_factor);
 
-          Grob *stem = unsmob_grob (collisions[j]->get_object ("stem"));
+          Grob *stem = Grob::unsmob (collisions[j]->get_object ("stem"));
           if (stem && Stem::has_interface (stem) && Stem::is_normal_stem (stem))
             {
               colliding_stems.insert (stem);
@@ -371,7 +371,7 @@ void Beam_scoring_problem::init_instance_variables (Grob *me, Drul_array<Real> y
                          - my_y;
 
           Real factor = parameters_.STEM_COLLISION_FACTOR;
-          if (!unsmob_grob (s->get_object ("beam")))
+          if (!Grob::unsmob (s->get_object ("beam")))
             factor = 1.0;
           add_collision (x, y, factor);
         }
index 48d2be1e6e5c6de1be48262ee18d2c29dd13197b..3d9db725016778fb6e906bb35e2fe68f9395ec7c 100644 (file)
@@ -145,11 +145,11 @@ MAKE_SCHEME_CALLBACK (Beam, calc_normal_stems, 1);
 SCM
 Beam::calc_normal_stems (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   extract_grob_set (me, "stems", stems);
   SCM val = Grob_array::make_array ();
-  Grob_array *ga = unsmob_grob_array (val);
+  Grob_array *ga = Grob_array::unsmob (val);
   for (vsize i = 0; i < stems.size (); i++)
     if (Stem::is_normal_stem (stems[i]))
       ga->add (stems[i]);
@@ -161,7 +161,7 @@ MAKE_SCHEME_CALLBACK (Beam, calc_direction, 1);
 SCM
 Beam::calc_direction (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   /* Beams with less than 2 two stems don't make much sense, but could happen
      when you do
@@ -274,7 +274,7 @@ MAKE_SCHEME_CALLBACK (Beam, calc_beaming, 1)
 SCM
 Beam::calc_beaming (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   extract_grob_set (me, "stems", stems);
 
@@ -353,7 +353,7 @@ Beam::calc_beam_segments (SCM smob)
 {
   /* ugh, this has a side-effect that we need to ensure that
      Stem #'beaming is correct */
-  Grob *me_grob = unsmob_grob (smob);
+  Grob *me_grob = Grob::unsmob (smob);
   (void) me_grob->get_property ("beaming");
 
   Spanner *me = dynamic_cast<Spanner *> (me_grob);
@@ -570,7 +570,7 @@ MAKE_SCHEME_CALLBACK (Beam, calc_x_positions, 1);
 SCM
 Beam::calc_x_positions (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
   SCM segments = me->get_property ("beam-segments");
   Interval x_positions;
   x_positions.set_empty ();
@@ -611,7 +611,7 @@ MAKE_SCHEME_CALLBACK (Beam, print, 1);
 SCM
 Beam::print (SCM grob)
 {
-  Spanner *me = unsmob_spanner (grob);
+  Spanner *me = Spanner::unsmob (grob);
   /*
     TODO - mild code dup for all the commonx calls.
     Some use just common_refpoint_of_array, some (in print and
@@ -739,7 +739,7 @@ Beam::print (SCM grob)
 
       Direction stem_dir = stems.size () ? to_dir (stems[0]->get_property ("direction")) : UP;
 
-      Stencil score = *unsmob_stencil (Text_interface::interpret_markup
+      Stencil score = *Stencil::unsmob (Text_interface::interpret_markup
                                        (me->layout ()->self_scm (), properties, annotation));
 
       if (!score.is_empty ())
@@ -947,7 +947,7 @@ MAKE_SCHEME_CALLBACK (Beam, calc_stem_shorten, 1)
 SCM
 Beam::calc_stem_shorten (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   /*
     shortening looks silly for x staff beams
@@ -982,7 +982,7 @@ MAKE_SCHEME_CALLBACK (Beam, quanting, 3);
 SCM
 Beam::quanting (SCM smob, SCM ys_scm, SCM align_broken_intos)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Drul_array<Real> ys = robust_scm2drul (ys_scm, Drul_array<Real> (infinity_f, -infinity_f));
   bool cbs = to_boolean (align_broken_intos);
 
@@ -1064,7 +1064,7 @@ MAKE_SCHEME_CALLBACK (Beam, set_stem_lengths, 1);
 SCM
 Beam::set_stem_lengths (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   /* trigger callbacks. */
   (void) me->get_property ("direction");
@@ -1217,17 +1217,17 @@ MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Beam, rest_collision_callback, 2, 1, "");
 SCM
 Beam::rest_collision_callback (SCM smob, SCM prev_offset)
 {
-  Grob *rest = unsmob_grob (smob);
+  Grob *rest = Grob::unsmob (smob);
   if (scm_is_number (rest->get_property ("staff-position")))
     return scm_from_int (0);
 
   Real offset = robust_scm2double (prev_offset, 0.0);
 
-  Grob *st = unsmob_grob (rest->get_object ("stem"));
+  Grob *st = Grob::unsmob (rest->get_object ("stem"));
   Grob *stem = st;
   if (!stem)
     return scm_from_double (0.0);
-  Grob *beam = unsmob_grob (stem->get_object ("beam"));
+  Grob *beam = Grob::unsmob (stem->get_object ("beam"));
   if (!beam
       || !Beam::has_interface (beam)
       || !Beam::normal_stem_count (beam))
@@ -1312,11 +1312,11 @@ Beam::pure_rest_collision_callback (SCM smob,
 {
   Real previous = robust_scm2double (prev_offset, 0.0);
 
-  Grob *me = unsmob_grob (smob);
-  Grob *stem = unsmob_grob (me->get_object ("stem"));
+  Grob *me = Grob::unsmob (smob);
+  Grob *stem = Grob::unsmob (me->get_object ("stem"));
   if (!stem)
     return scm_from_double (previous);
-  Grob *beam = unsmob_grob (stem->get_object ("beam"));
+  Grob *beam = Grob::unsmob (stem->get_object ("beam"));
   if (!beam
       || !Beam::normal_stem_count (beam)
       || !is_direction (beam->get_property_data ("direction")))
@@ -1424,7 +1424,7 @@ MAKE_SCHEME_CALLBACK (Beam, calc_cross_staff, 1)
 SCM
 Beam::calc_cross_staff (SCM smob)
 {
-  return scm_from_bool (is_cross_staff (unsmob_grob (smob)));
+  return scm_from_bool (is_cross_staff (Grob::unsmob (smob)));
 }
 
 int
index 341353deb802331fa2ab935b40377f010ae19a8f..8461570dfb0f76d7214aa14246ff407d79792ab4 100644 (file)
@@ -53,7 +53,7 @@ Bend_engraver::finalize ()
   // We shouldn't end a spanner on the last musical column of a piece because then
   // it would extend past the last breakable column of the piece.
   if (last_fall_)
-    last_fall_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn")));
+    last_fall_->set_bound (RIGHT, Grob::unsmob (get_property ("currentCommandColumn")));
 }
 
 void
@@ -61,7 +61,7 @@ Bend_engraver::stop_fall ()
 {
   bool bar = scm_is_string (get_property ("whichBar"));
 
-  fall_->set_bound (RIGHT, unsmob_grob (bar
+  fall_->set_bound (RIGHT, Grob::unsmob (bar
                                         ? get_property ("currentCommandColumn")
                                         : get_property ("currentMusicalColumn")));
   last_fall_ = fall_;
index 9cf9d2281f0359843d3f21bb564f5448e9907af6..719f1e6b223722afdd85bf9d5346a54ca6a33b41 100644 (file)
@@ -29,7 +29,7 @@ LY_DEFINE (ly_make_book, "ly:make-book",
            "Make a @code{\\book} of @var{paper} and @var{header}"
            " (which may be @code{#f} as well) containing @code{\\scores}.")
 {
-  Output_def *odef = unsmob_output_def (paper);
+  Output_def *odef = Output_def::unsmob (paper);
   LY_ASSERT_SMOB (Output_def, paper, 1);
 
   Book *book = new Book;
@@ -66,14 +66,14 @@ LY_DEFINE (ly_book_process, "ly:book-process",
            "  For example, it may be a string (for file based outputs)"
            " or a socket (for network based output).")
 {
-  Book *book = unsmob_book (book_smob);
+  Book *book = Book::unsmob (book_smob);
 
   LY_ASSERT_SMOB (Book, book_smob, 1);
   LY_ASSERT_SMOB (Output_def, default_paper, 2);
   LY_ASSERT_SMOB (Output_def, default_layout, 3);
 
-  Paper_book *pb = book->process (unsmob_output_def (default_paper),
-                                  unsmob_output_def (default_layout));
+  Paper_book *pb = book->process (Output_def::unsmob (default_paper),
+                                  Output_def::unsmob (default_layout));
   if (pb)
     {
       pb->output (output);
@@ -96,10 +96,10 @@ LY_DEFINE (ly_book_process_to_systems, "ly:book-process-to-systems",
   LY_ASSERT_SMOB (Output_def, default_paper, 2);
   LY_ASSERT_SMOB (Output_def, default_layout, 3);
 
-  Book *book = unsmob_book (book_smob);
+  Book *book = Book::unsmob (book_smob);
 
-  Paper_book *pb = book->process (unsmob_output_def (default_paper),
-                                  unsmob_output_def (default_layout));
+  Paper_book *pb = book->process (Output_def::unsmob (default_paper),
+                                  Output_def::unsmob (default_layout));
   if (pb)
     {
       pb->classic_output (output);
@@ -114,7 +114,7 @@ LY_DEFINE (ly_book_add_score_x, "ly:book-add-score!",
            "Add @var{score} to @var{book-smob} score list.")
 {
   LY_ASSERT_SMOB (Book, book_smob, 1);
-  Book *book = unsmob_book (book_smob);
+  Book *book = Book::unsmob (book_smob);
   book->add_score (score);
   return SCM_UNSPECIFIED;
 }
@@ -124,7 +124,7 @@ LY_DEFINE (ly_book_add_bookpart_x, "ly:book-add-bookpart!",
            "Add @var{book-part} to @var{book-smob} book part list.")
 {
   LY_ASSERT_SMOB (Book, book_smob, 1);
-  Book *book = unsmob_book (book_smob);
+  Book *book = Book::unsmob (book_smob);
   book->add_bookpart (book_part);
   return SCM_UNSPECIFIED;
 }
@@ -134,7 +134,7 @@ LY_DEFINE (ly_book_book_parts, "ly:book-book-parts",
            "Return book parts in @var{book}.")
 {
   LY_ASSERT_SMOB (Book, book, 1);
-  Book *b = unsmob_book (book);
+  Book *b = Book::unsmob (book);
   return b->bookparts_;
 }
 
@@ -143,7 +143,7 @@ LY_DEFINE (ly_book_paper, "ly:book-paper",
            "Return paper in @var{book}.")
 {
   LY_ASSERT_SMOB (Book, book, 1);
-  Book *b = unsmob_book (book);
+  Book *b = Book::unsmob (book);
   return b->paper_ ? b->paper_->self_scm () : SCM_BOOL_F;
 }
 
@@ -152,7 +152,7 @@ LY_DEFINE (ly_book_header, "ly:book-header",
            "Return header in @var{book}.")
 {
   LY_ASSERT_SMOB (Book, book, 1);
-  Book *b = unsmob_book (book);
+  Book *b = Book::unsmob (book);
   return b->header_ ? b->header_ : SCM_BOOL_F;
 }
 
@@ -164,7 +164,7 @@ LY_DEFINE (ly_book_set_header_x, "ly:book-set-header!",
   SCM_ASSERT_TYPE (ly_is_module (module), module, SCM_ARG2, __FUNCTION__,
                    "module");
 
-  Book *b = unsmob_book (book);
+  Book *b = Book::unsmob (book);
   b->header_ = (module);
   return SCM_UNSPECIFIED;
 }
@@ -174,7 +174,7 @@ LY_DEFINE (ly_book_scores, "ly:book-scores",
            "Return scores in @var{book}.")
 {
   LY_ASSERT_SMOB (Book, book, 1);
-  Book *b = unsmob_book (book);
+  Book *b = Book::unsmob (book);
   return b->scores_;
 }
 
index e52da05c93336195baa7014851208eb47016e660..a13a3ca51d0d9a25a3b2f4f49472a437f40cd351 100644 (file)
@@ -72,9 +72,9 @@ Book::Book (Book const &s)
     {
       SCM entry = scm_car (p);
 
-      if (Score *newscore = unsmob_score (entry))
+      if (Score *newscore = Score::unsmob (entry))
         * t = scm_cons (newscore->clone ()->unprotect (), SCM_EOL);
-      else if (Page_marker *marker = unsmob_page_marker (entry))
+      else if (Page_marker *marker = Page_marker::unsmob (entry))
         * t = scm_cons (marker->clone ()->unprotect (), SCM_EOL);
       else
         {
@@ -87,7 +87,7 @@ Book::Book (Book const &s)
   t = &bookparts_;
   for (SCM p = s.bookparts_; scm_is_pair (p); p = scm_cdr (p))
     {
-      Book *newpart = unsmob_book (scm_car (p))->clone ();
+      Book *newpart = Book::unsmob (scm_car (p))->clone ();
 
       *t = scm_cons (newpart->self_scm (), SCM_EOL);
       t = SCM_CDRLOC (*t);
@@ -98,7 +98,7 @@ Book::Book (Book const &s)
 Input *
 Book::origin () const
 {
-  return unsmob_input (input_location_);
+  return Input::unsmob (input_location_);
 }
 
 Book::~Book ()
@@ -179,7 +179,7 @@ void
 Book::add_bookpart (SCM b)
 {
   add_scores_to_bookpart ();
-  Book *part = unsmob_book (b);
+  Book *part = Book::unsmob (b);
   part->set_parent (this);
   bookparts_ = scm_cons (b, bookparts_);
 }
@@ -188,12 +188,12 @@ bool
 Book::error_found ()
 {
   for (SCM s = scores_; scm_is_pair (s); s = scm_cdr (s))
-    if (Score *score = unsmob_score (scm_car (s)))
+    if (Score *score = Score::unsmob (scm_car (s)))
       if (score->error_found_)
         return true;
 
   for (SCM part = bookparts_; scm_is_pair (part); part = scm_cdr (part))
-    if (Book *bookpart = unsmob_book (scm_car (part)))
+    if (Book *bookpart = Book::unsmob (scm_car (part)))
       if (bookpart->error_found ())
         return true;
 
@@ -213,7 +213,7 @@ Book::process_bookparts (Paper_book *output_paper_book, Output_def *paper, Outpu
   add_scores_to_bookpart ();
   for (SCM p = scm_reverse (bookparts_); scm_is_pair (p); p = scm_cdr (p))
     {
-      if (Book *book = unsmob_book (scm_car (p)))
+      if (Book *book = Book::unsmob (scm_car (p)))
         {
           Paper_book *paper_book_part = book->process (paper, layout, output_paper_book);
           if (paper_book_part)
@@ -230,14 +230,14 @@ Book::process_bookparts (Paper_book *output_paper_book, Output_def *paper, Outpu
 void
 Book::process_score (SCM s, Paper_book *output_paper_book, Output_def *layout)
 {
-  if (Score *score = unsmob_score (scm_car (s)))
+  if (Score *score = Score::unsmob (scm_car (s)))
     {
       SCM outputs = score
                     ->book_rendering (output_paper_book->paper_, layout);
 
       while (scm_is_pair (outputs))
         {
-          Music_output *output = unsmob_music_output (scm_car (outputs));
+          Music_output *output = Music_output::unsmob (scm_car (outputs));
 
           if (Performance *perf = dynamic_cast<Performance *> (output))
             output_paper_book->add_performance (perf->self_scm ());
@@ -252,7 +252,7 @@ Book::process_score (SCM s, Paper_book *output_paper_book, Output_def *layout)
         }
     }
   else if (Text_interface::is_markup_list (scm_car (s))
-           || unsmob_page_marker (scm_car (s)))
+           || Page_marker::unsmob (scm_car (s)))
     output_paper_book->add_score (scm_car (s));
   else
     assert (0);
index 1013ac6e7be4b9a2b164f76dfd7e6c62f1a87145..ed804493de1b96b50be2f7fc4ddae3f543fca41f 100644 (file)
@@ -118,7 +118,7 @@ Break_align_engraver::create_alignment (Grob_info inf)
   Context *origin = inf.origin_contexts (this)[0];
 
   Translator_group *tg = origin->implementation ();
-  Engraver *random_source = dynamic_cast<Engraver *> (unsmob_translator (scm_car (tg->get_simple_trans_list ())));
+  Engraver *random_source = dynamic_cast<Engraver *> (Translator::unsmob (scm_car (tg->get_simple_trans_list ())));
   if (!random_source)
     random_source = this;
 
@@ -138,7 +138,7 @@ Break_align_engraver::add_to_group (SCM align_name, Item *item)
 
   if (s != SCM_BOOL_F)
     {
-      Grob *e = unsmob_grob (scm_cdr (s));
+      Grob *e = Grob::unsmob (scm_cdr (s));
       group = dynamic_cast<Item *> (e);
     }
   else
index 79f215623f8617dd1a98dd59804033e0f03af29b..1744c60214bcb78501ff367d189d5db1fa3762cb 100644 (file)
@@ -94,7 +94,7 @@ MAKE_SCHEME_CALLBACK (Break_alignment_interface, calc_positioning_done, 1)
 SCM
 Break_alignment_interface::calc_positioning_done (SCM smob)
 {
-  Grob *grob = unsmob_grob (smob);
+  Grob *grob = Grob::unsmob (smob);
   Item *me = dynamic_cast<Item *> (grob);
 
   me->set_property ("positioning-done", SCM_BOOL_T);
@@ -189,8 +189,8 @@ Break_alignment_interface::calc_positioning_done (SCM smob)
             sym_string = ly_symbol2string (rsym);
 
           string orig_string;
-          if (unsmob_grob (l->get_property ("cause")))
-            orig_string = unsmob_grob (l->get_property ("cause"))->name ();
+          if (Grob::unsmob (l->get_property ("cause")))
+            orig_string = Grob::unsmob (l->get_property ("cause"))->name ();
 
           programming_error (to_string ("No spacing entry from %s to `%s'",
                                         orig_string.c_str (),
@@ -261,7 +261,7 @@ MAKE_SCHEME_CALLBACK (Break_alignable_interface, self_align_callback, 1)
 SCM
 Break_alignable_interface::self_align_callback (SCM grob)
 {
-  Grob *me = unsmob_grob (grob);
+  Grob *me = Grob::unsmob (grob);
   Item *alignment = dynamic_cast<Item *> (me->get_parent (X_AXIS));
   if (!Break_alignment_interface::has_interface (alignment))
     return scm_from_int (0);
@@ -308,7 +308,7 @@ MAKE_SCHEME_CALLBACK (Break_aligned_interface, calc_average_anchor, 1)
 SCM
 Break_aligned_interface::calc_average_anchor (SCM grob)
 {
-  Grob *me = unsmob_grob (grob);
+  Grob *me = Grob::unsmob (grob);
   Real avg = 0.0;
   int count = 0;
 
@@ -331,7 +331,7 @@ MAKE_SCHEME_CALLBACK (Break_aligned_interface, calc_extent_aligned_anchor, 1)
 SCM
 Break_aligned_interface::calc_extent_aligned_anchor (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Real alignment = robust_scm2double (me->get_property ("break-align-anchor-alignment"), 0.0);
   Interval iv = me->extent (me, X_AXIS);
 
@@ -346,7 +346,7 @@ SCM
 Break_aligned_interface::calc_break_visibility (SCM smob)
 {
   /* a BreakAlignGroup is break-visible if it has one element that is break-visible */
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   SCM ret = scm_c_make_vector (3, SCM_EOL);
   extract_grob_set (me, "elements", elts);
   for (int dir = 0; dir <= 2; dir++)
@@ -363,6 +363,42 @@ Break_aligned_interface::calc_break_visibility (SCM smob)
   return ret;
 }
 
+ADD_INTERFACE (Break_alignment_interface,
+               "The object that performs break alignment.\n"
+               "\n"
+               "Three interfaces deal specifically with break alignment:\n"
+               "@enumerate\n"
+               "@item break-alignment-interface (this one),\n"
+               "@item @ref{break-alignable-interface}, and\n"
+               "@item @ref{break-aligned-interface}.\n"
+               "@end enumerate\n"
+               "\n"
+               " Each of these interfaces supports grob properties that use"
+               " @w{@emph{break-align symbols}}, which are Scheme symbols that"
+               " are used to specify the alignment, ordering, and spacing of"
+               " certain notational elements (@q{breakable}@tie{}items)."
+               "\n"
+               "@subsubheading Available break-align symbols:\n"
+               "\n"
+               "@example\n"
+               "ambitus\n"
+               "breathing-sign\n"
+               "clef\n"
+               "cue-clef\n"
+               "cue-end-clef\n"
+               "custos\n"
+               "key-cancellation\n"
+               "key-signature\n"
+               "left-edge\n"
+               "staff-bar\n"
+               "time-signature\n"
+               "@end example",
+
+               /* properties */
+               "positioning-done "
+               "break-align-orders "
+              );
+
 ADD_INTERFACE (Break_alignable_interface,
                "Object that is aligned on a break alignment.",
 
@@ -372,31 +408,7 @@ ADD_INTERFACE (Break_alignable_interface,
               );
 
 ADD_INTERFACE (Break_aligned_interface,
-               "Items that are aligned in prefatory matter.\n"
-               "\n"
-               "The spacing of these items is controlled by the"
-               " @code{space-alist} property.  It contains a list"
-               " @code{break-align-symbol}s with a specification of the"
-               " associated space.  The space specification can be\n"
-               "\n"
-               "@table @code\n"
-               "@item (minimum-space . @var{spc}))\n"
-               "Pad space until the distance is @var{spc}.\n"
-               "@item (fixed-space . @var{spc})\n"
-               "Set a fixed space.\n"
-               "@item (semi-fixed-space . @var{spc})\n"
-               "Set a space.  Half of it is fixed and half is stretchable."
-               " (does not work at start of line. fixme)\n"
-               "@item (extra-space . @var{spc})\n"
-               "Add @var{spc} amount of space.\n"
-               "@end table\n"
-               "\n"
-               "Special keys for the alist are @code{first-note} and"
-               " @code{next-note}, signifying the first note on a line, and"
-               " the next note halfway a line.\n"
-               "\n"
-               "Rules for this spacing are much more complicated than this."
-               "  See [Wanske] page 126--134, [Ross] page 143--147.",
+               "Breakable items.",
 
                /* properties */
                "break-align-anchor "
@@ -404,12 +416,3 @@ ADD_INTERFACE (Break_aligned_interface,
                "break-align-symbol "
                "space-alist "
               );
-
-ADD_INTERFACE (Break_alignment_interface,
-               "The object that performs break alignment.  See"
-               " @ref{break-aligned-interface}.",
-
-               /* properties */
-               "positioning-done "
-               "break-align-orders "
-              );
index 75053c34fd00ebe243eb32d23ece6b987b201c17..e0b0fadfcd29a41303fa9369bb41b7dbe7c47cb0 100644 (file)
@@ -51,7 +51,7 @@ substitute_grob (Grob *sc)
   else
     {
       System *line
-        = dynamic_cast<System *> (unsmob_grob (break_criterion));
+        = dynamic_cast<System *> (Grob::unsmob (break_criterion));
       if (sc->get_system () != line)
         sc = sc->find_broken_piece (line);
 
@@ -101,9 +101,9 @@ do_break_substitution (SCM src)
 {
 again:
 
-  if (unsmob_grob (src))
+  if (Grob::unsmob (src))
     {
-      Grob *new_ptr = substitute_grob (unsmob_grob (src));
+      Grob *new_ptr = substitute_grob (Grob::unsmob (src));
       return new_ptr ? new_ptr->self_scm () : SCM_UNDEFINED;
     }
   else if (scm_is_vector (src))
@@ -408,13 +408,13 @@ Spanner::fast_substitute_grob_array (SCM sym,
       set_break_subsititution (l ? l->self_scm () : SCM_UNDEFINED);
 
       SCM newval = sc->internal_get_object (sym);
-      if (!unsmob_grob_array (newval))
+      if (!Grob_array::unsmob (newval))
         {
           newval = Grob_array::make_array ();
           sc->set_object (sym, newval);
         }
 
-      Grob_array *new_array = unsmob_grob_array (newval);
+      Grob_array *new_array = Grob_array::unsmob (newval);
       for (int k = 0; k < 2; k++)
         for (int j = (*arrs[k])[i][LEFT]; j <= (*arrs[k])[i][RIGHT]; j++)
           {
@@ -461,7 +461,7 @@ substitute_object_alist (SCM alist, SCM dest)
       SCM sym = scm_caar (s);
       SCM val = scm_cdar (s);
 
-      if (Grob_array *orig = unsmob_grob_array (val))
+      if (Grob_array *orig = Grob_array::unsmob (val))
         {
           SCM handle = scm_assq (sym, dest);
           SCM newval
@@ -469,7 +469,7 @@ substitute_object_alist (SCM alist, SCM dest)
               ? scm_cdr (handle)
               : Grob_array::make_array ();
 
-          Grob_array *new_arr = unsmob_grob_array (newval);
+          Grob_array *new_arr = Grob_array::unsmob (newval);
 
           substitute_grob_array (orig, new_arr);
           val = newval;
@@ -497,7 +497,7 @@ Spanner::substitute_one_mutable_property (SCM sym,
   Spanner *s = this;
 
   bool fast_done = false;
-  Grob_array *grob_array = unsmob_grob_array (val);
+  Grob_array *grob_array = Grob_array::unsmob (val);
   if (grob_array)
     fast_done = s->fast_substitute_grob_array (sym, grob_array);
 
@@ -511,12 +511,12 @@ Spanner::substitute_one_mutable_property (SCM sym,
         if (grob_array)
           {
             SCM newval = sc->internal_get_object (sym);
-            if (!unsmob_grob_array (newval))
+            if (!Grob_array::unsmob (newval))
               {
                 newval = Grob_array::make_array ();
                 sc->set_object (sym, newval);
               }
-            substitute_grob_array (grob_array, unsmob_grob_array (newval));
+            substitute_grob_array (grob_array, Grob_array::unsmob (newval));
           }
         else
           {
index 9abe9fe98dfd5eb03a3d67144ff33773b7693892..2cbe20e303d9318bfc3eaeb103f0ae946e731b11 100644 (file)
@@ -43,7 +43,7 @@ MAKE_SCHEME_CALLBACK (Breathing_sign, divisio_minima, 1);
 SCM
 Breathing_sign::divisio_minima (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Real staff_space = Staff_symbol_referencer::staff_space (me);
 
   Real thickness = Staff_symbol_referencer::line_thickness (me);
@@ -69,7 +69,7 @@ MAKE_SCHEME_CALLBACK (Breathing_sign, divisio_maior, 1);
 SCM
 Breathing_sign::divisio_maior (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Real thickness = Staff_symbol_referencer::line_thickness (me);
   thickness *= robust_scm2double (me->get_property ("thickness"), 1.0);
 
@@ -149,7 +149,7 @@ MAKE_SCHEME_CALLBACK (Breathing_sign, divisio_maxima, 1);
 SCM
 Breathing_sign::divisio_maxima (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   Real thickness = Staff_symbol_referencer::line_thickness (me);
   thickness *= robust_scm2double (me->get_property ("thickness"), 1.0);
@@ -172,7 +172,7 @@ MAKE_SCHEME_CALLBACK (Breathing_sign, finalis, 1);
 SCM
 Breathing_sign::finalis (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   Real thickness = Staff_symbol_referencer::line_thickness (me);
   thickness *= robust_scm2double (me->get_property ("thickness"), 1.0);
@@ -196,7 +196,7 @@ MAKE_SCHEME_CALLBACK (Breathing_sign, offset_callback, 1);
 SCM
 Breathing_sign::offset_callback (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   Direction d = get_grob_direction (me);
   if (!d)
index b4f1dd33be1384acb258619032f2a8bc80483544..dba699c8f4aaf119f0de742c33d96ca6fb3fefc7 100644 (file)
@@ -96,7 +96,7 @@ Chord_name_engraver::process_music ()
             {
               Stream_event *n = notes_[i];
               SCM p = n->get_property ("pitch");
-              if (!unsmob_pitch (p))
+              if (!Pitch::unsmob (p))
                 continue;
 
               if (n->get_property ("bass") == SCM_BOOL_T)
@@ -106,7 +106,7 @@ Chord_name_engraver::process_music ()
                   SCM oct = n->get_property ("octavation");
                   if (scm_is_number (oct))
                     {
-                      Pitch orig = unsmob_pitch (p)->transposed (Pitch (-scm_to_int (oct), 0));
+                      Pitch orig = Pitch::unsmob (p)->transposed (Pitch (-scm_to_int (oct), 0));
                       pitches = scm_cons (orig.smobbed_copy (), pitches);
                     }
                   else
index 21cbcbf4c2c5d9c4cf861dfae0385a077a5db642..ea8c6c2f9a98dfb49164619b0e89194f3557aadd 100644 (file)
@@ -30,7 +30,7 @@ MAKE_SCHEME_CALLBACK (Chord_name, after_line_breaking, 1);
 SCM
 Chord_name::after_line_breaking (SCM smob)
 {
-  Item *me = unsmob_item (smob);
+  Item *me = Item::unsmob (smob);
   assert (me);
 
   SCM s = me->get_property ("begin-of-line-visible");
index 6e16d7fde8cf5af036e0880942cb07391493d8ad..684069819ec01b220b74e30fb7d92d5f64abf9a8 100644 (file)
@@ -145,7 +145,7 @@ static void apply_on_children (Context *context, SCM fun)
   scm_call_1 (fun, context->self_scm ());
   for (SCM s = context->children_contexts ();
        scm_is_pair (s); s = scm_cdr (s))
-    apply_on_children (unsmob_context (scm_car (s)), fun);
+    apply_on_children (Context::unsmob (scm_car (s)), fun);
 }
 
 void
index df84074f3af060fbfe970c58fdd358739e9a81f9..7f914a19d185672226946a77384bfc75e41df531 100644 (file)
@@ -28,7 +28,7 @@ MAKE_SCHEME_CALLBACK (Clef, calc_glyph_name, 1);
 SCM
 Clef::calc_glyph_name (SCM smob)
 {
-  Item *s = unsmob_item (smob);
+  Item *s = Item::unsmob (smob);
   SCM glyph = s->get_property ("glyph");
 
   if (scm_is_string (glyph))
@@ -53,7 +53,7 @@ MAKE_SCHEME_CALLBACK (Clef, print, 1)
 SCM
 Clef::print (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   SCM glyph_scm = me->get_property ("glyph-name");
   if (!scm_is_string (glyph_scm))
     return SCM_EOL;
index 0f55248a1beba22cbaeb96de4183132125b4a83d..79e6cdfba571f9a32d7615da0962e319f05dfe38 100644 (file)
@@ -101,7 +101,7 @@ Cluster_spanner_engraver::process_music ()
 
       for (vsize i = 0; i < cluster_notes_.size (); i++)
         {
-          Pitch *pit = unsmob_pitch (cluster_notes_[i]->get_property ("pitch"));
+          Pitch *pit = Pitch::unsmob (cluster_notes_[i]->get_property ("pitch"));
 
           int p = (pit ? pit->steps () : 0) + c0;
 
index dd16799683e8e2362ee6afa44aaa13236189104d..b1e1f6aec106ccd336a7426f8c750978aaa746da 100644 (file)
@@ -125,7 +125,7 @@ MAKE_SCHEME_CALLBACK (Cluster, calc_cross_staff, 1);
 SCM
 Cluster::calc_cross_staff (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   extract_grob_set (me, "columns", cols);
   Grob *commony = common_refpoint_of_array (cols, me, Y_AXIS);
@@ -137,7 +137,7 @@ MAKE_SCHEME_CALLBACK (Cluster, print, 1);
 SCM
 Cluster::print (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   Spanner *spanner = dynamic_cast<Spanner *> (me);
   if (!spanner)
@@ -235,7 +235,7 @@ MAKE_SCHEME_CALLBACK (Cluster_beacon, height, 1);
 SCM
 Cluster_beacon::height (SCM g)
 {
-  Grob *me = unsmob_grob (g);
+  Grob *me = Grob::unsmob (g);
   Interval v = robust_scm2interval (me->get_property ("positions"),
                                     Interval (0, 0));
   return ly_interval2scm (Staff_symbol_referencer::staff_space (me) * 0.5 * v);
index ea535a3237335f37051b5625ed0b973d39263887..16225da853678aabd1c27e3a8584c25cf1368888 100644 (file)
@@ -151,7 +151,7 @@ compute_delta_pitches (vector<Grob_info> const &primitives)
       primitive = dynamic_cast<Item *> (primitives[i].grob ());
       Stream_event *cause = primitives[i].event_cause ();
       int pitch
-        = unsmob_pitch (cause->get_property ("pitch"))->steps ();
+        = Pitch::unsmob (cause->get_property ("pitch"))->steps ();
       if (prev_primitive)
         {
           delta_pitch = pitch - prev_pitch;
index 4192b58be1a9f12696aa2faa8b9f284bdf0e5445..8a55ddf4621bbd90876ecaf27f8aa33091e69c1b 100644 (file)
@@ -109,8 +109,8 @@ Completion_heads_engraver::listen_note (Stream_event *ev)
 Moment
 Completion_heads_engraver::next_moment (Rational const &note_len)
 {
-  Moment *e = unsmob_moment (get_property ("measurePosition"));
-  Moment *l = unsmob_moment (get_property ("measureLength"));
+  Moment *e = Moment::unsmob (get_property ("measurePosition"));
+  Moment *l = Moment::unsmob (get_property ("measureLength"));
   if (!e || !l || !to_boolean (get_property ("timing")))
     {
       return Moment (0, 0);
@@ -123,7 +123,7 @@ Completion_heads_engraver::next_moment (Rational const &note_len)
                          + e->to_string () + " of " + l->to_string ());
       return 0;
     }
-  Moment const *unit = unsmob_moment (get_property ("completionUnit"));
+  Moment const *unit = Moment::unsmob (get_property ("completionUnit"));
 
   if (unit)
     {
@@ -162,7 +162,7 @@ Item *
 Completion_heads_engraver::make_note_head (Stream_event *ev)
 {
   Item *note = make_item ("NoteHead", ev->self_scm ());
-  Pitch *pit = unsmob_pitch (ev->get_property ("pitch"));
+  Pitch *pit = Pitch::unsmob (ev->get_property ("pitch"));
 
   int pos = pit->steps ();
   SCM c0 = get_property ("middleCPosition");
@@ -198,7 +198,7 @@ Completion_heads_engraver::process_music ()
     }
   else
     {
-      orig = unsmob_duration (note_events_[0]->get_property ("duration"));
+      orig = Duration::unsmob (note_events_[0]->get_property ("duration"));
       note_dur = *orig;
       SCM factor = get_property ("completionFactor");
       if (ly_is_procedure (factor))
index 56e11a5d1df0e2185b12e49329f917a74f56fa88..8700b6cceda7bda0d4ce26a6293042ebc55733bb 100644 (file)
@@ -105,15 +105,15 @@ Completion_rest_engraver::listen_rest (Stream_event *ev)
 Moment
 Completion_rest_engraver::next_moment (Rational const &note_len)
 {
-  Moment *e = unsmob_moment (get_property ("measurePosition"));
-  Moment *l = unsmob_moment (get_property ("measureLength"));
+  Moment *e = Moment::unsmob (get_property ("measurePosition"));
+  Moment *l = Moment::unsmob (get_property ("measureLength"));
   if (!e || !l || !to_boolean (get_property ("timing")))
     {
       return Moment (0, 0);
     }
 
   Moment result = *l - *e;
-  Moment const *unit = unsmob_moment (get_property ("completionUnit"));
+  Moment const *unit = Moment::unsmob (get_property ("completionUnit"));
 
   if (unit)
     {
@@ -152,7 +152,7 @@ Item *
 Completion_rest_engraver::make_rest (Stream_event *ev)
 {
   Item *rest = make_item ("Rest", ev->self_scm ());
-  if (Pitch *p = unsmob_pitch (ev->get_property ("pitch")))
+  if (Pitch *p = Pitch::unsmob (ev->get_property ("pitch")))
     {
       int pos = p->steps ();
       SCM c0 = get_property ("middleCPosition");
@@ -188,7 +188,7 @@ Completion_rest_engraver::process_music ()
     }
   else
     {
-      orig = unsmob_duration (rest_events_[0]->get_property ("duration"));
+      orig = Duration::unsmob (rest_events_[0]->get_property ("duration"));
       rest_dur = *orig;
       SCM factor = get_property ("completionFactor");
       if (ly_is_procedure (factor))
index 1c4bff82c7b7b695e7d5d1c3a9bf5c72a749b4f6..725b220750ee436d3d91592bf7c84d3f2a5d275e 100644 (file)
@@ -560,7 +560,7 @@ Line_details::Line_details (Prob *pb, Output_def *paper)
   if (scm_is_pair (footnotes))
     for (SCM s = footnotes; scm_is_pair (s); s = scm_cdr (s))
       {
-        Stencil *sten = unsmob_stencil (scm_caddar (s));
+        Stencil *sten = Stencil::unsmob (scm_caddar (s));
         if (!sten)
           {
             programming_error ("expecting stencil, got empty pointer");
@@ -571,7 +571,7 @@ Line_details::Line_details (Prob *pb, Output_def *paper)
 
   last_column_ = 0;
   force_ = 0;
-  Stencil *st = unsmob_stencil (pb->get_property ("stencil"));
+  Stencil *st = Stencil::unsmob (pb->get_property ("stencil"));
   Interval stencil_extent = st->is_empty (Y_AXIS) ? Interval (0, 0)
     : st->extent (Y_AXIS);
   shape_ = Line_shape (stencil_extent, stencil_extent); // pretend it goes all the way across
index 56da817e105cb322f9b4a6ed70e0dfab9ea498d0..4df8e5e1599dae1f96e949e632cd108e331496db 100644 (file)
@@ -50,7 +50,7 @@ Context_def::Context_def ()
 Input *
 Context_def::origin () const
 {
-  return unsmob_input (input_location_);
+  return Input::unsmob (input_location_);
 }
 
 Context_def::Context_def (Context_def const &s)
@@ -241,7 +241,7 @@ Context_def::internal_path_to_acceptable_context (SCM type_sym,
 
   vector<Context_def *> accepteds;
   for (SCM s = accepted; scm_is_pair (s); s = scm_cdr (s))
-    if (Context_def *t = unsmob_context_def (find_context_def (odef,
+    if (Context_def *t = Context_def::unsmob (find_context_def (odef,
                                                                scm_car (s))))
       accepteds.push_back (t);
 
@@ -404,7 +404,7 @@ LY_DEFINE (ly_context_def_lookup, "ly:context-def-lookup",
            " @samp{property-ops}, @samp{context-name}, @samp{group-type}.")
 {
   LY_ASSERT_SMOB (Context_def, def, 1);
-  Context_def *cd = unsmob_context_def (def);
+  Context_def *cd = Context_def::unsmob (def);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
 
   SCM res = cd->lookup (sym);
@@ -428,9 +428,9 @@ LY_DEFINE (ly_context_def_modify, "ly:context-def-modify",
   LY_ASSERT_SMOB (Context_def, def, 1);
   LY_ASSERT_SMOB (Context_mod, mod, 2);
 
-  Context_def *cd = unsmob_context_def (def)->clone ();
+  Context_def *cd = Context_def::unsmob (def)->clone ();
 
-  for (SCM s = unsmob_context_mod (mod)->get_mods ();
+  for (SCM s = Context_mod::unsmob (mod)->get_mods ();
        scm_is_pair (s);
        s = scm_cdr (s))
     cd->add_context_mod (scm_car (s));
index 6c04c0baf92461d4a4d39b26d2bbbf7f38340062..5028cfdf4d7f1563fd0e0868b4fe544bedb8a67b 100644 (file)
@@ -26,7 +26,7 @@ LY_DEFINE (ly_get_context_mods, "ly:get-context-mods",
            "Returns the list of context modifications stored in"
            " @var{contextmod}.")
 {
-  Context_mod *tr = unsmob_context_mod (contextmod);
+  Context_mod *tr = Context_mod::unsmob (contextmod);
   LY_ASSERT_SMOB (Context_mod, contextmod, 1);
   return tr->get_mods ();
 }
@@ -36,7 +36,7 @@ LY_DEFINE (ly_add_context_mod, "ly:add-context-mod",
            "Adds the given context @var{modification} to the list"
            " @var{contextmods} of context modifications.")
 {
-  Context_mod *ctxmod = unsmob_context_mod (contextmods);
+  Context_mod *ctxmod = Context_mod::unsmob (contextmods);
   LY_ASSERT_SMOB (Context_mod, contextmods, 1);
   ctxmod->add_context_mod (modification);
   return SCM_UNSPECIFIED;
@@ -63,8 +63,8 @@ LY_DEFINE (ly_context_mod_apply_x, "ly:context-mod-apply!",
   LY_ASSERT_SMOB (Context, context, 1);
   LY_ASSERT_SMOB (Context_mod, mod, 2);
 
-  apply_property_operations (unsmob_context (context),
-                             unsmob_context_mod (mod)->get_mods ());
+  apply_property_operations (Context::unsmob (context),
+                             Context_mod::unsmob (mod)->get_mods ());
   scm_remember_upto_here_1 (context);
   return SCM_UNSPECIFIED;
 }
index 1559d67e0157255698640830bcd2e15ccb46a504..aaa5b529b3d8033ce83a4a94972f3f0f4d46c7ca 100644 (file)
@@ -27,7 +27,7 @@ LY_DEFINE (ly_context_current_moment,
            1, 0, 0, (SCM context),
            "Return the current moment of @var{context}.")
 {
-  Context *tr = unsmob_context (context);
+  Context *tr = Context::unsmob (context);
 
   LY_ASSERT_SMOB (Context, context, 1);
 
@@ -40,7 +40,7 @@ LY_DEFINE (ly_context_id, "ly:context-id",
            " i.e., for @code{\\context Voice = \"one\" @dots{}}"
            " return the string @code{one}.")
 {
-  Context *tr = unsmob_context (context);
+  Context *tr = Context::unsmob (context);
 
   LY_ASSERT_SMOB (Context, context, 1);
 
@@ -55,7 +55,7 @@ LY_DEFINE (ly_context_name, "ly:context-name",
 {
   LY_ASSERT_SMOB (Context, context, 1);
 
-  Context *tr = unsmob_context (context);
+  Context *tr = Context::unsmob (context);
 
   return ly_symbol2scm (tr->context_name ().c_str ());
 }
@@ -65,7 +65,7 @@ LY_DEFINE (ly_context_grob_definition, "ly:context-grob-definition",
            "Return the definition of @var{name} (a symbol) within"
            " @var{context} as an alist.")
 {
-  Context *tr = unsmob_context (context);
+  Context *tr = Context::unsmob (context);
 
   LY_ASSERT_SMOB (Context, context, 1);
   LY_ASSERT_TYPE (ly_is_symbol, name, 2);
@@ -80,7 +80,7 @@ LY_DEFINE (ly_context_pushpop_property, "ly:context-pushpop-property",
            " with @var{eltprop} (if @var{val} is specified) or reverted"
            " (if unspecified).")
 {
-  Context *tg = unsmob_context (context);
+  Context *tg = Context::unsmob (context);
 
   LY_ASSERT_SMOB (Context, context, 1);
   LY_ASSERT_TYPE (ly_is_symbol, grob, 2);
@@ -100,7 +100,7 @@ LY_DEFINE (ly_context_property, "ly:context-property",
   LY_ASSERT_SMOB (Context, context, 1);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
 
-  Context *t = unsmob_context (context);
+  Context *t = Context::unsmob (context);
   SCM result = t->internal_get_property (sym);
   return def != SCM_UNDEFINED && scm_is_null (result) ? def : result;
 }
@@ -113,7 +113,7 @@ LY_DEFINE (ly_context_set_property_x, "ly:context-set-property!",
   LY_ASSERT_SMOB (Context, context, 1);
   LY_ASSERT_TYPE (ly_is_symbol, name, 2);
 
-  Context *tr = unsmob_context (context);
+  Context *tr = Context::unsmob (context);
 
   tr->set_property (name, val);
 
@@ -128,7 +128,7 @@ LY_DEFINE (ly_context_property_where_defined, "ly:context-property-where-defined
   LY_ASSERT_SMOB (Context, context, 1);
   LY_ASSERT_TYPE (ly_is_symbol, name, 2);
 
-  Context *tr = unsmob_context (context);
+  Context *tr = Context::unsmob (context);
 
   SCM val;
   tr = tr->where_defined (name, &val);
@@ -144,7 +144,7 @@ LY_DEFINE (ly_context_unset_property, "ly:context-unset-property", 2, 0, 0,
 {
   LY_ASSERT_SMOB (Context, context, 1);
   LY_ASSERT_TYPE (ly_is_symbol, name, 2);
-  Context *tr = unsmob_context (context);
+  Context *tr = Context::unsmob (context);
 
   tr->unset_property (name);
   return SCM_UNSPECIFIED;
@@ -155,7 +155,7 @@ LY_DEFINE (ly_context_parent, "ly:context-parent",
            "Return the parent of @var{context}, @code{#f} if none.")
 {
   LY_ASSERT_SMOB (Context, context, 1);
-  Context *tr = unsmob_context (context);
+  Context *tr = Context::unsmob (context);
 
   tr = tr->get_parent_context ();
   if (tr)
@@ -172,7 +172,7 @@ LY_DEFINE (ly_context_find, "ly:context-find",
 {
   LY_ASSERT_SMOB (Context, context, 1);
   LY_ASSERT_TYPE (ly_is_symbol, name, 2);
-  Context *tr = unsmob_context (context);
+  Context *tr = Context::unsmob (context);
 
   while (tr)
     {
@@ -189,7 +189,7 @@ LY_DEFINE (ly_context_now, "ly:context-now",
            "Return @code{now-moment} of context @var{context}.")
 {
   LY_ASSERT_SMOB (Context, context, 1);
-  Context *ctx = unsmob_context (context);
+  Context *ctx = Context::unsmob (context);
   return ctx->now_mom ().smobbed_copy ();
 }
 
@@ -198,7 +198,7 @@ LY_DEFINE (ly_context_event_source, "ly:context-event-source",
            "Return @code{event-source} of context @var{context}.")
 {
   LY_ASSERT_SMOB (Context, context, 1);
-  Context *ctx = unsmob_context (context);
+  Context *ctx = Context::unsmob (context);
   return ctx->event_source ()->self_scm ();
 }
 
@@ -208,6 +208,6 @@ LY_DEFINE (ly_context_events_below, "ly:context-events-below",
            " from @var{context} and all its subcontexts.")
 {
   LY_ASSERT_SMOB (Context, context, 1);
-  Context *ctx = unsmob_context (context);
+  Context *ctx = Context::unsmob (context);
   return ctx->events_below ()->self_scm ();
 }
index a27db01865b92414d07d37752b407df85d26755a..7077014501a7651e76b5f8fe80bc2dea130dded2 100644 (file)
@@ -44,7 +44,7 @@ Context::check_removal ()
 {
   for (SCM p = context_list_; scm_is_pair (p); p = scm_cdr (p))
     {
-      Context *ctx = unsmob_context (scm_car (p));
+      Context *ctx = Context::unsmob (scm_car (p));
 
       ctx->check_removal ();
       if (ctx->is_removable ())
@@ -176,7 +176,7 @@ Context::find_create_context (SCM n, const string &id, SCM operations)
       SCM score_name = default_child_context_name ();
       SCM score_def = find_context_def (get_output_def (), score_name);
 
-      if (Context_def *cd = unsmob_context_def (score_def))
+      if (Context_def *cd = Context_def::unsmob (score_def))
         {
           if (cd->is_alias (n))
             return create_context (cd, id, operations);
@@ -236,14 +236,14 @@ IMPLEMENT_LISTENER (Context, acknowledge_infant);
 void
 Context::acknowledge_infant (SCM sev)
 {
-  infant_event_ = unsmob_stream_event (sev);
+  infant_event_ = Stream_event::unsmob (sev);
 }
 
 IMPLEMENT_LISTENER (Context, set_property_from_event);
 void
 Context::set_property_from_event (SCM sev)
 {
-  Stream_event *ev = unsmob_stream_event (sev);
+  Stream_event *ev = Stream_event::unsmob (sev);
 
   SCM sym = ev->get_property ("symbol");
   if (scm_is_symbol (sym))
@@ -267,7 +267,7 @@ IMPLEMENT_LISTENER (Context, unset_property_from_event);
 void
 Context::unset_property_from_event (SCM sev)
 {
-  Stream_event *ev = unsmob_stream_event (sev);
+  Stream_event *ev = Stream_event::unsmob (sev);
 
   SCM sym = ev->get_property ("symbol");
   type_check_assignment (sym, SCM_EOL, ly_symbol2scm ("translation-type?"));
@@ -282,7 +282,7 @@ IMPLEMENT_LISTENER (Context, create_context_from_event);
 void
 Context::create_context_from_event (SCM sev)
 {
-  Stream_event *ev = unsmob_stream_event (sev);
+  Stream_event *ev = Stream_event::unsmob (sev);
 
   string id = ly_scm2string (ev->get_property ("id"));
   SCM ops = ev->get_property ("ops");
@@ -328,7 +328,7 @@ Context::create_context_from_event (SCM sev)
 
   new_context->unprotect ();
 
-  Context_def *td = unsmob_context_def (new_context->definition_);
+  Context_def *td = Context_def::unsmob (new_context->definition_);
 
   /* This cannot move before add_context (), because \override
      operations require that we are in the hierarchy.  */
@@ -353,7 +353,7 @@ Context::path_to_acceptable_context (SCM name) const
         accepts = scm_cons (elt, accepts);
       }
 
-  return unsmob_context_def (definition_)->path_to_acceptable_context (name,
+  return Context_def::unsmob (definition_)->path_to_acceptable_context (name,
          get_output_def (),
          scm_reverse_x (accepts, SCM_EOL));
 
@@ -383,7 +383,7 @@ Context::create_context (Context_def *cdef,
 
   assert (infant_event_);
   SCM infant_scm = infant_event_->get_property ("context");
-  Context *infant = unsmob_context (infant_scm);
+  Context *infant = Context::unsmob (infant_scm);
 
   if (!infant || infant->get_parent_context () != this)
     {
@@ -419,11 +419,11 @@ Context::get_default_interpreter (const string &context_id)
       SCM st = find_context_def (get_output_def (), nm);
 
       string name = ly_symbol2string (nm);
-      Context_def *t = unsmob_context_def (st);
+      Context_def *t = Context_def::unsmob (st);
       if (!t)
         {
           warning (_f ("cannot find or create: `%s'", name.c_str ()));
-          t = unsmob_context_def (this->definition_);
+          t = Context_def::unsmob (this->definition_);
         }
       if (scm_is_symbol (t->get_default_child (SCM_EOL)))
         {
@@ -548,8 +548,8 @@ IMPLEMENT_LISTENER (Context, change_parent);
 void
 Context::change_parent (SCM sev)
 {
-  Stream_event *ev = unsmob_stream_event (sev);
-  Context *to = unsmob_context (ev->get_property ("context"));
+  Stream_event *ev = Stream_event::unsmob (sev);
+  Context *to = Context::unsmob (ev->get_property ("context"));
 
   disconnect_from_parent ();
   to->add_context (this);
@@ -594,7 +594,7 @@ find_context_below (Context *where,
   for (SCM s = where->children_contexts ();
        !found && scm_is_pair (s); s = scm_cdr (s))
     {
-      Context *tr = unsmob_context (scm_car (s));
+      Context *tr = Context::unsmob (scm_car (s));
 
       found = find_context_below (tr, type, id);
     }
@@ -611,7 +611,7 @@ Context::properties_as_alist () const
 SCM
 Context::context_name_symbol () const
 {
-  Context_def *td = unsmob_context_def (definition_);
+  Context_def *td = Context_def::unsmob (definition_);
   return td->get_context_name ();
 }
 
@@ -657,7 +657,7 @@ Context::print_smob (SCM s, SCM port, scm_print_state *)
 
   scm_puts ("#<", port);
   scm_puts (sc->class_name (), port);
-  if (Context_def *d = unsmob_context_def (sc->definition_))
+  if (Context_def *d = Context_def::unsmob (sc->definition_))
     {
       scm_puts (" ", port);
       scm_display (d->get_context_name (), port);
@@ -733,8 +733,8 @@ measure_length (Context const *context)
 {
   SCM l = context->get_property ("measureLength");
   Rational length (1);
-  if (unsmob_moment (l))
-    length = unsmob_moment (l)->main_part_;
+  if (Moment::unsmob (l))
+    length = Moment::unsmob (l)->main_part_;
   return length;
 }
 
@@ -744,9 +744,9 @@ measure_position (Context const *context)
   SCM sm = context->get_property ("measurePosition");
 
   Moment m = 0;
-  if (unsmob_moment (sm))
+  if (Moment::unsmob (sm))
     {
-      m = *unsmob_moment (sm);
+      m = *Moment::unsmob (sm);
 
       if (m.main_part_ < Rational (0))
         {
@@ -794,7 +794,7 @@ set_context_property_on_children (Context *trans, SCM sym, SCM val)
   trans->set_property (sym, ly_deep_copy (val));
   for (SCM p = trans->children_contexts (); scm_is_pair (p); p = scm_cdr (p))
     {
-      Context *trg = unsmob_context (scm_car (p));
+      Context *trg = Context::unsmob (scm_car (p));
       set_context_property_on_children (trg, sym, ly_deep_copy (val));
     }
 }
index 0ebb45cd8c2dc5cbc3999e6ccfa8ebe0ee6a65a9..023536e35b62cf210e99a21ecd6c3140bdc04ee5 100644 (file)
@@ -95,7 +95,7 @@ Custos_engraver::acknowledge_note_head (Grob_info info)
         don't look at the staff-position, since we can't be sure
         whether Clef_engraver already applied a vertical shift.
       */
-      pitches_.push_back (*unsmob_pitch (ev->get_property ("pitch")));
+      pitches_.push_back (*Pitch::unsmob (ev->get_property ("pitch")));
     }
 }
 
index 1bbf5f8d7191c1792ae56f9c203da4aea06ce628..739316a6d1c965edb3a3ce830e17cbc1eb3c20fe 100644 (file)
@@ -41,7 +41,7 @@ MAKE_SCHEME_CALLBACK (Custos, print, 1);
 SCM
 Custos::print (SCM smob)
 {
-  Item *me = (Item *)unsmob_grob (smob);
+  Item *me = (Item *)Grob::unsmob (smob);
 
   SCM scm_style = me->get_property ("style");
   string style;
index f6ef23d120279e8ded3b0e6678c10c899940be7d..ce58926eb786983053572d721cc6add1131daee3 100644 (file)
@@ -30,8 +30,8 @@ LY_DEFINE (ly_connect_dispatchers, "ly:connect-dispatchers",
            2, 0, 0, (SCM to, SCM from),
            "Make the dispatcher @var{to} listen to events from @var{from}.")
 {
-  Dispatcher *t = unsmob_dispatcher (to);
-  Dispatcher *f = unsmob_dispatcher (from);
+  Dispatcher *t = Dispatcher::unsmob (to);
+  Dispatcher *f = Dispatcher::unsmob (from);
 
   LY_ASSERT_SMOB (Dispatcher, to, 1);
   LY_ASSERT_SMOB (Dispatcher, from, 2);
@@ -47,8 +47,8 @@ LY_DEFINE (ly_add_listener, "ly:add-listener",
            "  Whenever @var{disp} hears an event of class @var{cl},"
            " it is forwarded to @var{list}.")
 {
-  Listener *l = unsmob_listener (list);
-  Dispatcher *d = unsmob_dispatcher (disp);
+  Listener *l = Listener::unsmob (list);
+  Dispatcher *d = Dispatcher::unsmob (disp);
 
   LY_ASSERT_SMOB (Listener, list, 1);
   LY_ASSERT_SMOB (Dispatcher, disp, 2);
@@ -70,7 +70,7 @@ LY_DEFINE (ly_listened_event_types, "ly:listened-event-types",
 {
   LY_ASSERT_SMOB (Dispatcher, disp, 1);
 
-  SCM result = unsmob_dispatcher (disp)->listened_types ();
+  SCM result = Dispatcher::unsmob (disp)->listened_types ();
 
   scm_remember_upto_here_1 (disp);
 
@@ -85,7 +85,7 @@ LY_DEFINE (ly_listened_event_class_p, "ly:listened-event-class?",
   LY_ASSERT_SMOB (Dispatcher, disp, 1);
   LY_ASSERT_TYPE (scm_is_pair, cl, 2);
 
-  bool result = unsmob_dispatcher (disp)->is_listened_class (cl);
+  bool result = Dispatcher::unsmob (disp)->is_listened_class (cl);
 
   scm_remember_upto_here_1 (disp);
 
@@ -96,8 +96,8 @@ LY_DEFINE (ly_broadcast, "ly:broadcast",
            2, 0, 0, (SCM disp, SCM ev),
            "Send the stream event @var{ev} to the dispatcher @var{disp}.")
 {
-  Dispatcher *d = unsmob_dispatcher (disp);
-  Stream_event *e = unsmob_stream_event (ev);
+  Dispatcher *d = Dispatcher::unsmob (disp);
+  Stream_event *e = Stream_event::unsmob (ev);
 
   LY_ASSERT_SMOB (Dispatcher, disp, 1);
 
index 915e1eff0aa2db05e40b77499dafeaad2d5737b8..feee3f24a7eb3b535d72bf02252ceac2eb71342e 100644 (file)
@@ -82,7 +82,7 @@ IMPLEMENT_LISTENER (Dispatcher, dispatch);
 void
 Dispatcher::dispatch (SCM sev)
 {
-  Stream_event *ev = unsmob_stream_event (sev);
+  Stream_event *ev = Stream_event::unsmob (sev);
   SCM class_list = ev->get_property ("class");
   if (!scm_is_pair (class_list))
     {
@@ -149,7 +149,7 @@ Dispatcher::dispatch (SCM sev)
           assert (lists[0].prio > last_priority);
           last_priority = lists[0].prio;
 
-          Listener *l = unsmob_listener (scm_cdar (lists[0].list));
+          Listener *l = Listener::unsmob (scm_cdar (lists[0].list));
           l->listen (ev->self_scm ());
 #if 0
           sent = true;
@@ -235,7 +235,7 @@ Dispatcher::internal_add_listener (Listener l, SCM ev_class, int priority)
       for (SCM disp = dispatchers_; scm_is_pair (disp); disp = scm_cdr (disp))
         {
           int priority = scm_to_int (scm_cdar (disp));
-          Dispatcher *d = unsmob_dispatcher (scm_caar (disp));
+          Dispatcher *d = Dispatcher::unsmob (scm_caar (disp));
           d->internal_add_listener (GET_LISTENER (dispatch), ev_class, priority);
         }
       listen_classes_ = scm_cons (ev_class, listen_classes_);
@@ -262,7 +262,7 @@ Dispatcher::remove_listener (Listener l, SCM ev_class)
   SCM dummy = scm_cons (SCM_EOL, list);
   SCM e = dummy;
   while (scm_is_pair (scm_cdr (e)))
-    if (*unsmob_listener (scm_cdadr (e)) == l && first)
+    if (*Listener::unsmob (scm_cdadr (e)) == l && first)
       {
         scm_set_cdr_x (e, scm_cddr (e));
         first = false;
@@ -280,7 +280,7 @@ Dispatcher::remove_listener (Listener l, SCM ev_class)
       /* Unregister with all dispatchers. */
       for (SCM disp = dispatchers_; scm_is_pair (disp); disp = scm_cdr (disp))
         {
-          Dispatcher *d = unsmob_dispatcher (scm_caar (disp));
+          Dispatcher *d = Dispatcher::unsmob (scm_caar (disp));
           d->remove_listener (GET_LISTENER (dispatch), ev_class);
         }
       listen_classes_ = scm_delq_x (ev_class, listen_classes_);
index 38beed5d9dc6c84ad85690fcd6c9d802dda92d5f..6e2c731dacfd4a90098d8ddd5272dc7be24103a9 100644 (file)
@@ -51,7 +51,7 @@ Dot_column_engraver::stop_translation_timestep ()
 void
 Dot_column_engraver::acknowledge_rhythmic_head (Grob_info info)
 {
-  Grob *d = unsmob_grob (info.grob ()->get_object ("dot"));
+  Grob *d = Grob::unsmob (info.grob ()->get_object ("dot"));
   if (d)
     {
       if (!dotcol_)
index 35d3b3f051fa274b14843ae003be53a7151297dc..36864410ad6bf334bd67e3dcccd30b4e97d6e888 100644 (file)
@@ -45,13 +45,13 @@ MAKE_SCHEME_CALLBACK (Dot_column, calc_positioning_done, 1);
 SCM
 Dot_column::calc_positioning_done (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   /*
     Trigger note collision resolution first, since that may kill off
     dots when merging.
   */
-  if (Grob *collision = unsmob_grob (me->get_object ("note-collision")))
+  if (Grob *collision = Grob::unsmob (me->get_object ("note-collision")))
     (void) collision->get_property ("positioning-done");
 
   me->set_property ("positioning-done", SCM_BOOL_T);
@@ -68,7 +68,7 @@ Dot_column::calc_positioning_done (SCM smob)
       Grob *n = dots[i]->get_parent (Y_AXIS);
       commonx = n->common_refpoint (commonx, X_AXIS);
 
-      if (Grob *stem = unsmob_grob (n->get_object ("stem")))
+      if (Grob *stem = Grob::unsmob (n->get_object ("stem")))
         {
           commonx = stem->common_refpoint (commonx, X_AXIS);
 
@@ -125,7 +125,7 @@ Dot_column::calc_positioning_done (SCM smob)
       Box b (s->extent (commonx, X_AXIS), y);
       boxes.push_back (b);
 
-      if (Grob *stem = unsmob_grob (s->get_object ("stem")))
+      if (Grob *stem = Grob::unsmob (s->get_object ("stem")))
         stems.insert (stem);
     }
 
@@ -159,7 +159,7 @@ Dot_column::calc_positioning_done (SCM smob)
       // Sort dots by stem, then check for dots above the limit for each stem
       vector <vector <Grob *> > dots_each_stem (parent_stems.size ());
       for (vsize i = 0; i < dots.size (); i++)
-        if (Grob *stem = unsmob_grob (dots[i]->get_parent (Y_AXIS)
+        if (Grob *stem = Grob::unsmob (dots[i]->get_parent (Y_AXIS)
                                       -> get_object ("stem")))
           for (vsize j = 0; j < parent_stems.size (); j++)
             if (stem == parent_stems[j])
@@ -241,7 +241,7 @@ Dot_column::calc_positioning_done (SCM smob)
 void
 Dot_column::add_head (Grob *me, Grob *head)
 {
-  Grob *d = unsmob_grob (head->get_object ("dot"));
+  Grob *d = Grob::unsmob (head->get_object ("dot"));
   if (d)
     {
       Side_position_interface::add_support (me, head);
index 02569f299b991ee8ba6e6b6726a350d5c980b5cb..c8883e8d3712b23778f7fc44d54f35269a7b6c8e 100644 (file)
@@ -43,10 +43,10 @@ Dots_engraver::acknowledge_rhythmic_head (Grob_info gi)
     return;
 
   Grob *note = gi.grob ();
-  if (unsmob_grob (note->get_object ("dot")))
+  if (Grob::unsmob (note->get_object ("dot")))
     return;
 
-  Duration *dur = unsmob_duration (cause->get_property ("duration"));
+  Duration *dur = Duration::unsmob (cause->get_property ("duration"));
   if (dur && dur->dot_count ())
     {
       Item *d = make_item ("Dots", note->self_scm ());
index 0c7d634798a87c2ab26e481f8b3521dd62365045..11c0aa4cb9dd2df6d54e47868a1e35071ea489b2 100644 (file)
@@ -30,7 +30,7 @@ MAKE_SCHEME_CALLBACK (Dots, print, 1);
 SCM
 Dots::print (SCM d)
 {
-  Grob *sc = unsmob_grob (d);
+  Grob *sc = Grob::unsmob (d);
   Stencil mol;
 
   SCM c = sc->get_property ("dot-count");
index 531c3dde3264a017beb05184df008940cdf0f52c..44a624313b803c8900097ad6dd271b9b5d91b29a 100644 (file)
@@ -58,7 +58,7 @@ Drum_note_performer::process_music ()
           && (scm_hash_table_p (tab) == SCM_BOOL_T))
         defn = scm_hashq_ref (tab, sym, SCM_EOL);
 
-      if (Pitch *pit = unsmob_pitch (defn))
+      if (Pitch *pit = Pitch::unsmob (defn))
         {
           SCM articulations = n->get_property ("articulations");
           Stream_event *tie_event = 0;
@@ -66,7 +66,7 @@ Drum_note_performer::process_music ()
           int velocity = 0;
           for (SCM s = articulations; scm_is_pair (s); s = scm_cdr (s))
             {
-              Stream_event *ev = unsmob_stream_event (scm_car (s));
+              Stream_event *ev = Stream_event::unsmob (scm_car (s));
               if (!ev)
                 continue;
 
index 152c75e8cc5f9714767b672cb86252876ca8abae..f0a1b140fe41ed7cc210a17e9fa7f20d48f72247 100644 (file)
@@ -25,8 +25,8 @@ MAKE_SCHEME_CALLBACK (Duration, less_p, 2);
 SCM
 Duration::less_p (SCM p1, SCM p2)
 {
-  Duration *a = unsmob_duration (p1);
-  Duration *b = unsmob_duration (p2);
+  Duration *a = Duration::unsmob (p1);
+  Duration *b = Duration::unsmob (p2);
 
   if (compare (*a, *b) < 0)
     return SCM_BOOL_T;
@@ -41,8 +41,8 @@ LY_DEFINE (ly_duration_less_p, "ly:duration<?",
   LY_ASSERT_SMOB (Duration, p1, 1);
   LY_ASSERT_SMOB (Duration, p2, 2);
 
-  Duration *a = unsmob_duration (p1);
-  Duration *b = unsmob_duration (p2);
+  Duration *a = Duration::unsmob (p1);
+  Duration *b = Duration::unsmob (p2);
 
   if (Duration::compare (*a, *b) < 0)
     return SCM_BOOL_T;
@@ -102,7 +102,7 @@ LY_DEFINE (ly_duration_log, "ly:duration-log",
            "Extract the duration log from @var{dur}.")
 {
   LY_ASSERT_SMOB (Duration, dur, 1);
-  return scm_from_int (unsmob_duration (dur)->duration_log ());
+  return scm_from_int (Duration::unsmob (dur)->duration_log ());
 }
 
 LY_DEFINE (ly_duration_dot_count, "ly:duration-dot-count",
@@ -110,7 +110,7 @@ LY_DEFINE (ly_duration_dot_count, "ly:duration-dot-count",
            "Extract the dot count from @var{dur}.")
 {
   LY_ASSERT_SMOB (Duration, dur, 1);
-  return scm_from_int (unsmob_duration (dur)->dot_count ());
+  return scm_from_int (Duration::unsmob (dur)->dot_count ());
 }
 
 LY_DEFINE (ly_intlog2, "ly:intlog2",
@@ -127,7 +127,7 @@ LY_DEFINE (ly_duration_length, "ly:duration-length",
            "The length of the duration as a @code{moment}.")
 {
   LY_ASSERT_SMOB (Duration, dur, 1);
-  return Moment (unsmob_duration (dur)->get_length ()).smobbed_copy ();
+  return Moment (Duration::unsmob (dur)->get_length ()).smobbed_copy ();
 }
 
 LY_DEFINE (ly_duration_2_string, "ly:duration->string",
@@ -135,7 +135,7 @@ LY_DEFINE (ly_duration_2_string, "ly:duration->string",
            "Convert @var{dur} to a string.")
 {
   LY_ASSERT_SMOB (Duration, dur, 1);
-  return ly_string2scm (unsmob_duration (dur)->to_string ());
+  return ly_string2scm (Duration::unsmob (dur)->to_string ());
 }
 
 LY_DEFINE (ly_duration_factor, "ly:duration-factor",
@@ -144,7 +144,7 @@ LY_DEFINE (ly_duration_factor, "ly:duration-factor",
            "  Return it as a pair.")
 {
   LY_ASSERT_SMOB (Duration, dur, 1);
-  Rational r = unsmob_duration (dur)->factor ();
+  Rational r = Duration::unsmob (dur)->factor ();
   return scm_cons (scm_from_int64 (r.num ()), scm_from_int64 (r.den ()));
 }
 
@@ -156,7 +156,7 @@ LY_DEFINE (ly_duration_scale, "ly:duration-scale",
            "  Return it as a rational.")
 {
   LY_ASSERT_SMOB (Duration, dur, 1);
-  Rational r = unsmob_duration (dur)->factor ();
+  Rational r = Duration::unsmob (dur)->factor ();
 
   return ly_rational2scm (r);
 }
index 35083db04344930d31cf19abb37582b712fe4a30..467b1fda785d7e9fa554292f992de97ee8c10c0f 100644 (file)
@@ -182,7 +182,7 @@ Dynamic_align_engraver::set_spanner_bounds (Spanner *line, bool end)
             bound = spanners[0]->get_bound (d);
           else
             {
-              bound = unsmob_grob (get_property ("currentMusicalColumn"));
+              bound = Grob::unsmob (get_property ("currentMusicalColumn"));
               programming_error ("started DynamicLineSpanner but have no left bound");
             }
 
index fdf682f7733cd993bd3d0331b67cb859276cc817..6baceb1f31ccd63d0869457c414ebc29bb846bd3 100644 (file)
@@ -208,12 +208,12 @@ Dynamic_engraver::stop_translation_timestep ()
   if (finished_spanner_ && !finished_spanner_->get_bound (RIGHT))
     finished_spanner_
     ->set_bound (RIGHT,
-                 unsmob_grob (get_property ("currentMusicalColumn")));
+                 Grob::unsmob (get_property ("currentMusicalColumn")));
 
   if (current_spanner_ && !current_spanner_->get_bound (LEFT))
     current_spanner_
     ->set_bound (LEFT,
-                 unsmob_grob (get_property ("currentMusicalColumn")));
+                 Grob::unsmob (get_property ("currentMusicalColumn")));
   script_ = 0;
   script_event_ = 0;
   accepted_spanevents_drul_.set (0, 0);
@@ -266,7 +266,7 @@ Dynamic_engraver::acknowledge_note_column (Grob_info info)
       */
       Grob *x_parent = (heads.size ()
                         ? info.grob ()
-                        : unsmob_grob (info.grob ()->get_object ("rest")));
+                        : Grob::unsmob (info.grob ()->get_object ("rest")));
       if (x_parent)
         script_->set_parent (x_parent, X_AXIS);
     }
index 1a199f43a18c0cca5fd4659013ff19c883ad3725..0ae950879e987f65564b2299bc4f9f371491f7fd 100644 (file)
@@ -54,7 +54,7 @@ Enclosing_bracket::width (SCM grob)
   /*
      UGH. cut & paste code.
   */
-  Grob *me = unsmob_grob (grob);
+  Grob *me = Grob::unsmob (grob);
   extract_grob_set (me, "elements", elements);
   if (elements.empty ())
     {
@@ -82,7 +82,7 @@ MAKE_SCHEME_CALLBACK (Enclosing_bracket, print, 1);
 SCM
 Enclosing_bracket::print (SCM grob)
 {
-  Grob *me = unsmob_grob (grob);
+  Grob *me = Grob::unsmob (grob);
   extract_grob_set (me, "elements", elements);
   if (elements.empty ())
     {
index 80da25b478c8a3feba7a74858f80e8f6ecc7dacc..4a897c60920d5544ab84d3e69698bdeaf31b4238 100644 (file)
@@ -29,7 +29,7 @@ IMPLEMENT_LISTENER (Engraver_group, override);
 void
 Engraver_group::override (SCM sev)
 {
-  Stream_event *ev = unsmob_stream_event (sev);
+  Stream_event *ev = Stream_event::unsmob (sev);
 
   sloppy_general_pushpop_property (context (),
                                    ev->get_property ("symbol"),
@@ -41,7 +41,7 @@ IMPLEMENT_LISTENER (Engraver_group, revert);
 void
 Engraver_group::revert (SCM sev)
 {
-  Stream_event *ev = unsmob_stream_event (sev);
+  Stream_event *ev = Stream_event::unsmob (sev);
 
   sloppy_general_pushpop_property (context (),
                                    ev->get_property ("symbol"),
@@ -141,7 +141,7 @@ Engraver_group::pending_grob_count () const
   for (SCM s = context_->children_contexts ();
        scm_is_pair (s); s = scm_cdr (s))
     {
-      Context *c = unsmob_context (scm_car (s));
+      Context *c = Context::unsmob (scm_car (s));
       Engraver_group *group
         = dynamic_cast<Engraver_group *> (c->implementation ());
 
@@ -162,7 +162,7 @@ Engraver_group::do_announces ()
       for (SCM s = context ()->children_contexts ();
            scm_is_pair (s); s = scm_cdr (s))
         {
-          Context *c = unsmob_context (scm_car (s));
+          Context *c = Context::unsmob (scm_car (s));
           Engraver_group *group
             = dynamic_cast<Engraver_group *> (c->implementation ());
           if (group)
index 60f08a226a4bf16230b786815be18a1457f693fa..5596a2f2f8b7702e8e779b0d6204825a0e5c54a5 100644 (file)
@@ -27,11 +27,11 @@ LY_DEFINE (ly_engraver_make_grob, "ly:engraver-make-grob",
            "  @var{cause} should either be another grob"
            " or a music event.")
 {
-  LY_ASSERT_TYPE (unsmob_engraver, engraver, 1);
+  LY_ASSERT_TYPE (Engraver::unsmob, engraver, 1);
   LY_ASSERT_TYPE (ly_is_symbol, grob_name, 2);
   LY_ASSERT_TYPE (ly_is_grob_cause, cause, 3);
 
-  Grob *g = unsmob_engraver (engraver)->
+  Grob *g = Engraver::unsmob (engraver)->
             internal_make_grob (grob_name, cause,
                                 ly_symbol2string (grob_name).c_str (),
                                 "scheme", 0, "scheme");
@@ -45,12 +45,12 @@ LY_DEFINE (ly_engraver_announce_end_grob, "ly:engraver-announce-end-grob",
            " @var{grob} being a grob.  @var{cause} should either"
            " be another grob or a music event.")
 {
-  LY_ASSERT_TYPE (unsmob_engraver, engraver, 1);
+  LY_ASSERT_TYPE (Engraver::unsmob, engraver, 1);
   LY_ASSERT_SMOB (Grob, grob, 2);
   LY_ASSERT_TYPE (ly_is_grob_cause, cause, 3);
 
-  unsmob_engraver (engraver)->
-  announce_end_grob (unsmob_grob (grob), cause);
+  Engraver::unsmob (engraver)->
+  announce_end_grob (Grob::unsmob (grob), cause);
 
   return SCM_UNSPECIFIED;
 }
index ac085bd296e17c21a5538c40da1928122b0aad14..74a6554e3a413bcf2d669f2192902cc975222213 100644 (file)
@@ -51,12 +51,12 @@ Grob_info
 Engraver::make_grob_info (Grob *e, SCM cause)
 {
   /* TODO: Remove Music code when it's no longer needed */
-  if (Music *m = unsmob_music (cause))
+  if (Music *m = Music::unsmob (cause))
     {
       cause = m->to_event ()->unprotect ();
     }
   if (e->get_property ("cause") == SCM_EOL
-      && (unsmob_stream_event (cause) || unsmob_grob (cause)))
+      && (Stream_event::unsmob (cause) || Grob::unsmob (cause)))
     e->set_property ("cause", cause);
 
   return Grob_info (this, e);
@@ -171,15 +171,15 @@ Engraver::internal_make_spanner (SCM x, SCM cause, char const *name,
 }
 
 Engraver *
-unsmob_engraver (SCM eng)
+Engraver::unsmob (SCM eng)
 {
-  return dynamic_cast<Engraver *> (unsmob_translator (eng));
+  return dynamic_cast<Engraver *> (Translator::unsmob (eng));
 }
 
 bool
 ly_is_grob_cause (SCM obj)
 {
-  return unsmob_grob (obj) || unsmob_stream_event (obj) || (obj == SCM_EOL);
+  return Grob::unsmob (obj) || Stream_event::unsmob (obj) || (obj == SCM_EOL);
 }
 
 #include "translator.icc"
index ca0452932d67eac54926e66b992ea876d8e0bfbd..4c60b2d9dbe145791dcfdf9064c7e47332a84515 100644 (file)
@@ -106,7 +106,7 @@ Episema_engraver::typeset_all ()
         {
           Grob *col = (note_columns_.size ()
                        ? note_columns_.back ()
-                       : unsmob_grob (get_property ("currentMusicalColumn")));
+                       : Grob::unsmob (get_property ("currentMusicalColumn")));
           finished_->set_bound (RIGHT, col);
         }
       finished_ = 0;
@@ -120,7 +120,7 @@ Episema_engraver::stop_translation_timestep ()
     {
       Grob *col = (note_columns_.size ()
                    ? note_columns_.front ()
-                   : unsmob_grob (get_property ("currentMusicalColumn")));
+                   : Grob::unsmob (get_property ("currentMusicalColumn")));
       span_->set_bound (LEFT, col);
     }
 
index 55d43302c556a32afbfe8f38bb76dc22a016fc28..9b3e5dae141ad071db6895c57bdb1f420175b11a 100644 (file)
@@ -46,13 +46,13 @@ Event_chord_iterator::process (Moment m)
       for (SCM s = get_music ()->get_property ("elements");
            scm_is_pair (s); s = scm_cdr (s))
         {
-          Music *mus = unsmob_music (scm_car (s));
+          Music *mus = Music::unsmob (scm_car (s));
           report_event (mus);
         }
       for (SCM s = get_music ()->get_property ("articulations");
            scm_is_pair (s); s = scm_cdr (s))
         {
-          Music *mus = unsmob_music (scm_car (s));
+          Music *mus = Music::unsmob (scm_car (s));
           report_event (mus);
         }
     }
index 4b0832627022233e6bfdb62216a8b251d5712960..14af189beeaa6612903107f71041ebafc5375c5f 100644 (file)
@@ -41,7 +41,7 @@ MAKE_SCHEME_CALLBACK (Figured_bass_continuation, center_on_figures, 1);
 SCM
 Figured_bass_continuation::center_on_figures (SCM grob)
 {
-  Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (grob));
+  Spanner *me = dynamic_cast<Spanner *> (Grob::unsmob (grob));
   extract_grob_set (me, "figures", figures);
   if (figures.empty ())
     return scm_from_double (0.0);
@@ -57,7 +57,7 @@ MAKE_SCHEME_CALLBACK (Figured_bass_continuation, print, 1);
 SCM
 Figured_bass_continuation::print (SCM grob)
 {
-  Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (grob));
+  Spanner *me = dynamic_cast<Spanner *> (Grob::unsmob (grob));
 
   Real thick
     = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"))
index d2eec375dd4b124e0a5d5f4b3745a14bdb611425..1784ac49e367e2b42095e9582f165ebae2616655 100644 (file)
@@ -222,11 +222,11 @@ Figured_bass_engraver::center_continuations (vector<Spanner *> const &consecutiv
     left_figs.push_back (consecutive_lines[j]->get_bound (LEFT));
 
   SCM ga = Grob_array::make_array ();
-  unsmob_grob_array (ga)->set_array (left_figs);
+  Grob_array::unsmob (ga)->set_array (left_figs);
 
   for (vsize j = consecutive_lines.size (); j--;)
     consecutive_lines[j]->set_object ("figures",
-                                      unsmob_grob_array (ga)->smobbed_copy ());
+                                      Grob_array::unsmob (ga)->smobbed_copy ());
 }
 
 void
@@ -407,7 +407,7 @@ void
 Figured_bass_engraver::create_grobs ()
 {
   Grob *muscol
-    = dynamic_cast<Item *> (unsmob_grob (get_property ("currentMusicalColumn")));
+    = dynamic_cast<Item *> (Grob::unsmob (get_property ("currentMusicalColumn")));
   if (!alignment_)
     {
       alignment_ = make_spanner ("BassFigureAlignment", SCM_EOL);
index 62d7d08db1d7b2dc8f1b0351d2ed2fad992d0e38..73a393584eee1461d1a1389ea47b3ca97856938d 100644 (file)
@@ -49,7 +49,7 @@ MAKE_SCHEME_CALLBACK (Fingering_column, calc_positioning_done, 1);
 SCM
 Fingering_column::calc_positioning_done (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   if (!me->is_live ())
     return SCM_BOOL_T;
 
index b8e7d94df12bc4065e623d8b3c15b4af11306ce8..5e4241d5318ed34a666e91f2e8f5fe95be6497f0 100644 (file)
@@ -101,7 +101,7 @@ Fingering_engraver::make_script (Direction d, Stream_event *r, int i)
     junkme.
   */
   SCM pitch = r->get_property ("pitch");
-  if (unsmob_pitch (pitch))
+  if (Pitch::unsmob (pitch))
     fingering->set_property ("pitch", pitch);
 
   /*
index 58641d37b010d1613d0d7f5d087ea40a8408eac2..7255555bea3993df9ef47d5afe3973555aaec0e7 100644 (file)
@@ -47,8 +47,8 @@ MAKE_SCHEME_CALLBACK (Flag, width, 1);
 SCM
 Flag::width (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
-  Stencil *sten = unsmob_stencil (me->get_property ("stencil"));
+  Grob *me = Grob::unsmob (smob);
+  Stencil *sten = Stencil::unsmob (me->get_property ("stencil"));
   if (!sten)
     return ly_interval2scm (Interval (0.0, 0.0));
 
@@ -67,7 +67,7 @@ MAKE_SCHEME_CALLBACK (Flag, glyph_name, 1);
 SCM
 Flag::glyph_name (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Grob *stem = me->get_parent (X_AXIS);
 
   Direction d = get_grob_direction (stem);
@@ -113,7 +113,7 @@ MAKE_SCHEME_CALLBACK (Flag, print, 1);
 SCM
 Flag::print (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Grob *stem = me->get_parent (X_AXIS);
 
   Direction d = get_grob_direction (stem);
@@ -179,7 +179,7 @@ Flag::calc_y_offset (SCM smob)
 SCM
 Flag::internal_calc_y_offset (SCM smob, bool pure)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Grob *stem = me->get_parent (X_AXIS);
   Direction d = get_grob_direction (stem);
 
@@ -199,7 +199,7 @@ MAKE_SCHEME_CALLBACK (Flag, calc_x_offset, 1);
 SCM
 Flag::calc_x_offset (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Grob *stem = me->get_parent (X_AXIS);
   return scm_from_double (stem->extent (stem, X_AXIS)[RIGHT]);
 }
index 7c3ac5357465e71e5823dd8443702a22dca3b907..7e8f1bd964982762c941a2ecba9f1a5913a3c2bb 100644 (file)
@@ -28,7 +28,7 @@
 Font_metric *
 Font_interface::get_default_font (Grob *me)
 {
-  Font_metric *fm = unsmob_metrics (me->get_property ("font"));
+  Font_metric *fm = Font_metric::unsmob (me->get_property ("font"));
   if (!fm)
     {
       SCM chain = music_font_alist_chain (me);
index 19afdd698d337b1481e31328399c16a5c194a29e..ed870296c63ba704d73f76173402036fcb2df291 100644 (file)
@@ -36,7 +36,7 @@ LY_DEFINE (ly_font_get_glyph, "ly:font-get-glyph",
            " to the font encodings @code{fetaMusic} and @code{fetaBraces},"
            " respectively.")
 {
-  Font_metric *fm = unsmob_metrics (font);
+  Font_metric *fm = Font_metric::unsmob (font);
   LY_ASSERT_SMOB (Font_metric, font, 1);
   LY_ASSERT_TYPE (scm_is_string, name, 2);
 
@@ -57,7 +57,7 @@ LY_DEFINE (ly_font_glyph_name_to_index, "ly:font-glyph-name-to-index",
            " to the font encodings @code{fetaMusic} and @code{fetaBraces},"
            " respectively.")
 {
-  Font_metric *fm = unsmob_metrics (font);
+  Font_metric *fm = Font_metric::unsmob (font);
   LY_ASSERT_SMOB (Font_metric, font, 1);
   LY_ASSERT_TYPE (scm_is_string, name, 2);
 
@@ -75,7 +75,7 @@ LY_DEFINE (ly_font_index_to_charcode, "ly:font-index-to-charcode",
            " to the font encodings @code{fetaMusic} and @code{fetaBraces},"
            " respectively.")
 {
-  Font_metric *fm = unsmob_metrics (font);
+  Font_metric *fm = Font_metric::unsmob (font);
   LY_ASSERT_SMOB (Font_metric, font, 1);
   LY_ASSERT_TYPE (scm_is_integer, index, 2);
 
@@ -93,7 +93,7 @@ LY_DEFINE (ly_font_glyph_name_to_charcode, "ly:font-glyph-name-to-charcode",
            " to the font encodings @code{fetaMusic} and @code{fetaBraces},"
            " respectively.")
 {
-  Font_metric *fm = unsmob_metrics (font);
+  Font_metric *fm = Font_metric::unsmob (font);
   LY_ASSERT_SMOB (Font_metric, font, 1);
   LY_ASSERT_TYPE (scm_is_string, name, 2);
 
@@ -111,7 +111,7 @@ LY_DEFINE (ly_font_file_name, "ly:font-file-name",
 {
   LY_ASSERT_SMOB (Font_metric, font, 1);
 
-  Font_metric *fm = unsmob_metrics (font);
+  Font_metric *fm = Font_metric::unsmob (font);
   SCM name = fm->font_file_name ();
 
   return name;
@@ -124,7 +124,7 @@ LY_DEFINE (ly_font_name, "ly:font-name",
            " return the corresponding name.")
 {
   LY_ASSERT_SMOB (Font_metric, font, 1);
-  Font_metric *fm = unsmob_metrics (font);
+  Font_metric *fm = Font_metric::unsmob (font);
 
   return ly_string2scm (fm->font_name ());
 }
@@ -136,7 +136,7 @@ LY_DEFINE (ly_font_magnification, "ly:font-magnification", 1, 0, 0,
 {
   LY_ASSERT_SMOB (Font_metric, font, 1);
 
-  Font_metric *fm = unsmob_metrics (font);
+  Font_metric *fm = Font_metric::unsmob (font);
   return scm_cdr (fm->description_);
 }
 
@@ -147,7 +147,7 @@ LY_DEFINE (ly_font_design_size, "ly:font-design-size", 1, 0, 0,
 {
   LY_ASSERT_SMOB (Font_metric, font, 1);
 
-  Font_metric *fm = unsmob_metrics (font);
+  Font_metric *fm = Font_metric::unsmob (font);
   return scm_from_double (fm->design_size ());
 }
 
index 0eb2b2903c738e1520ba6ed14ccd6b406e422dec..af5cecb63ff6a6855a7c1daa7041600d0a27507c 100644 (file)
@@ -106,7 +106,7 @@ Font_metric::mark_smob (SCM s)
 int
 Font_metric::print_smob (SCM s, SCM port, scm_print_state *)
 {
-  Font_metric *m = unsmob_metrics (s);
+  Font_metric *m = Font_metric::unsmob (s);
   scm_puts ("#<", port);
   scm_puts (m->class_name (), port);
   scm_puts (" ", port);
index 6532a7c2869f6b259dbb0e52535a0e6c3e896042..b35a7935a5d54a1f30355f8c0773e07a7d6781d6 100644 (file)
@@ -42,7 +42,7 @@ get_font_by_design_size (Output_def *layout, Real requested,
 
       if (scm_promise_p (entry) == SCM_BOOL_T)
         {
-          Font_metric *fm = unsmob_metrics (scm_force (entry));
+          Font_metric *fm = Font_metric::unsmob (scm_force (entry));
           size = fm->design_size ();
         }
 #if HAVE_PANGO_FT2
@@ -86,7 +86,7 @@ get_font_by_design_size (Output_def *layout, Real requested,
 #endif
     }
   else
-    fm = unsmob_metrics (scm_force (scm_c_vector_ref (font_vector, i)));
+    fm = Font_metric::unsmob (scm_force (scm_c_vector_ref (font_vector, i)));
 
   return find_scaled_font (layout, fm, requested / size);
 }
index fa488b06d42dd0b7ff8389f58f348186273e2e06..4cac19447841dabcd493dfa6c7044982199d299c 100644 (file)
@@ -63,7 +63,7 @@ Footnote_engraver::footnotify (Grob *g, SCM cause)
       Spanner *b = make_spanner ("FootnoteSpanner", cause);
       b->set_parent (s, Y_AXIS);
       b->set_parent (s, X_AXIS);
-      Grob *bound = unsmob_grob (get_property ("currentMusicalColumn"));
+      Grob *bound = Grob::unsmob (get_property ("currentMusicalColumn"));
       b->set_bound (LEFT, bound);
       annotated_spanners_.push_back (Drul_array<Spanner *> (s, b));
     }
@@ -78,7 +78,7 @@ Footnote_engraver::footnotify (Grob *g, SCM cause)
 void
 Footnote_engraver::acknowledge_grob (Grob_info info)
 {
-  Music *mus = unsmob_music (info.grob ()->get_property ("footnote-music"));
+  Music *mus = Music::unsmob (info.grob ()->get_property ("footnote-music"));
 
   if (mus)
     {
@@ -107,7 +107,7 @@ Footnote_engraver::acknowledge_end_grob (Grob_info info)
       {
         if (annotated_spanners_[i][LEFT] == s)
           {
-            Grob *bound = unsmob_grob (get_property ("currentMusicalColumn"));
+            Grob *bound = Grob::unsmob (get_property ("currentMusicalColumn"));
             annotated_spanners_[i][RIGHT]->set_bound (RIGHT, bound);
             break;
           }
index b1d89ddf24380ade44a7adba2a249e4542d7229d..a0e45c84241b5495cacf5cbe10f8ed16a496cca5 100644 (file)
@@ -46,12 +46,12 @@ Forbid_line_break_engraver::start_translation_timestep ()
   SCM busy = get_property ("busyGrobs");
 
   Moment now = now_mom ();
-  while (scm_is_pair (busy) && unsmob_moment (scm_caar (busy))->main_part_ == now.main_part_)
+  while (scm_is_pair (busy) && Moment::unsmob (scm_caar (busy))->main_part_ == now.main_part_)
     busy = scm_cdr (busy);
 
   while (scm_is_pair (busy))
     {
-      Grob *g = unsmob_grob (scm_cdar (busy));
+      Grob *g = Grob::unsmob (scm_cdar (busy));
       if (g->internal_has_interface (ly_symbol2scm ("rhythmic-grob-interface")))
         context ()->get_score_context ()->set_property ("forbidBreak", SCM_BOOL_T);
       busy = scm_cdr (busy);
index cce8c666475f95b72e90509dbba8a5a1f4e82241..ddd1b0c872a4365cd6be43dadc681471ed4434b4 100644 (file)
@@ -106,11 +106,11 @@ init_func_doc ()
   ly_add_type_predicate ((void *) &is_music_function, "Music_function");
   ly_add_type_predicate ((void *) &ly_is_port, "port");
   ly_add_type_predicate ((void *) &ly_cheap_is_list, "list");
-  ly_add_type_predicate ((void *) &unsmob_global_context, "Global_context");
-  ly_add_type_predicate ((void *) &unsmob_input, "Input");
-  ly_add_type_predicate ((void *) &unsmob_moment, "Moment");
-  ly_add_type_predicate ((void *) &unsmob_paper_score, "Paper_score");
-  ly_add_type_predicate ((void *) &unsmob_performance, "Performance");
+  ly_add_type_predicate ((void *) &Global_context::unsmob, "Global_context");
+  ly_add_type_predicate ((void *) &Input::unsmob, "Input");
+  ly_add_type_predicate ((void *) &Moment::unsmob, "Moment");
+  ly_add_type_predicate ((void *) &Paper_score::unsmob, "Paper_score");
+  ly_add_type_predicate ((void *) &Performance::unsmob, "Performance");
   ly_add_type_predicate ((void *) &is_unpure_pure_container, "unpure pure container");
 
   ly_add_type_predicate ((void *) &is_axis, "axis");
@@ -125,10 +125,10 @@ init_func_doc ()
   ly_add_type_predicate ((void *) &scm_is_rational, "rational");
   ly_add_type_predicate ((void *) &scm_is_string, "string");
   ly_add_type_predicate ((void *) &scm_is_vector, "vector");
-  ly_add_type_predicate ((void *) &unsmob_item, "Item");
-  ly_add_type_predicate ((void *) &unsmob_music, "Music");
-  ly_add_type_predicate ((void *) &unsmob_spanner, "Spanner");
-  ly_add_type_predicate ((void *) &unsmob_stream_event, "Stream_event");
+  ly_add_type_predicate ((void *) &Item::unsmob, "Item");
+  ly_add_type_predicate ((void *) &Music::unsmob, "Music");
+  ly_add_type_predicate ((void *) &Spanner::unsmob, "Spanner");
+  ly_add_type_predicate ((void *) &Stream_event::unsmob, "Stream_event");
 }
 
 ADD_SCM_INIT_FUNC (func_doc, init_func_doc);
index d1cd44201d483d58ce677bf3f278214170421881..7af3e4ed57dd2631f840753b675c30999ff3504d 100644 (file)
@@ -34,14 +34,14 @@ LY_DEFINE (ly_format_output, "ly:format-output",
            " process it and return the @code{Music_output} object"
            " in its final state.")
 {
-  Global_context *g = dynamic_cast<Global_context *> (unsmob_context (context));
+  Global_context *g = dynamic_cast<Global_context *> (Context::unsmob (context));
 
-  LY_ASSERT_TYPE (unsmob_global_context, context, 1);
+  LY_ASSERT_TYPE (Global_context::unsmob, context, 1);
 
   SCM output = g->get_output ();
   progress_indication ("\n");
 
-  if (Music_output *od = unsmob_music_output (output))
+  if (Music_output *od = Music_output::unsmob (output))
     od->process ();
 
   return output;
@@ -52,8 +52,8 @@ LY_DEFINE (ly_make_global_translator, "ly:make-global-translator",
            "Create a translator group and connect it to the global context"
            " @var{global}.  The translator group is returned.")
 {
-  Global_context *g = dynamic_cast<Global_context *> (unsmob_context (global));
-  LY_ASSERT_TYPE (unsmob_global_context, global, 1);
+  Global_context *g = dynamic_cast<Global_context *> (Context::unsmob (global));
+  LY_ASSERT_TYPE (Global_context::unsmob, global, 1);
 
   Translator_group *tg = new Translator_group ();
   tg->connect_to_context (g);
@@ -68,7 +68,7 @@ LY_DEFINE (ly_make_global_context, "ly:make-global-context",
            " block @var{output-def}.  The context is returned.")
 {
   LY_ASSERT_SMOB (Output_def, output_def, 1);
-  Output_def *odef = unsmob_output_def (output_def);
+  Output_def *odef = Output_def::unsmob (output_def);
 
   Global_context *glob = new Global_context (odef);
 
@@ -87,23 +87,23 @@ LY_DEFINE (ly_interpret_music_expression, "ly:interpret-music-expression",
            " @var{ctx}.  The context is returned in its final state.")
 {
   LY_ASSERT_SMOB (Music, mus, 1);
-  LY_ASSERT_TYPE (unsmob_global_context, ctx, 2);
+  LY_ASSERT_TYPE (Global_context::unsmob, ctx, 2);
 
-  Music *music = unsmob_music (mus);
+  Music *music = Music::unsmob (mus);
   if (!music)
     {
       warning (_ ("no music found in score"));
       return SCM_BOOL_F;
     }
 
-  Global_context *g = dynamic_cast<Global_context *> (unsmob_context (ctx));
+  Global_context *g = dynamic_cast<Global_context *> (Context::unsmob (ctx));
 
   Cpu_timer timer;
 
   message (_ ("Interpreting music..."));
 
   SCM protected_iter = Music_iterator::get_static_get_iterator (music);
-  Music_iterator *iter = unsmob_iterator (protected_iter);
+  Music_iterator *iter = Music_iterator::unsmob (protected_iter);
 
   iter->init_context (music, g);
   iter->construct_children ();
index f0f138f324336c338543c737c924610b0573d0b4..94f8efa82f50859d179640bbdcff33b5a9714e21 100644 (file)
@@ -46,7 +46,7 @@ Global_context::Global_context (Output_def *o)
                                  ly_symbol2scm ("Prepare"));
   events_below ()->register_as_listener (event_source_);
 
-  Context_def *globaldef = unsmob_context_def (definition_);
+  Context_def *globaldef = Context_def::unsmob (definition_);
   if (!globaldef)
     programming_error ("no `Global' context found");
   else
@@ -92,8 +92,8 @@ IMPLEMENT_LISTENER (Global_context, prepare);
 void
 Global_context::prepare (SCM sev)
 {
-  Stream_event *ev = unsmob_stream_event (sev);
-  Moment *mom = unsmob_moment (ev->get_property ("moment"));
+  Stream_event *ev = Stream_event::unsmob (sev);
+  Moment *mom = Moment::unsmob (ev->get_property ("moment"));
 
   assert (mom);
 
@@ -114,7 +114,7 @@ Context *
 Global_context::get_score_context () const
 {
   return (scm_is_pair (context_list_))
-         ? unsmob_context (scm_car (context_list_))
+         ? Context::unsmob (scm_car (context_list_))
          : 0;
 }
 
@@ -209,7 +209,7 @@ Global_context::get_default_interpreter (const string &/* context_id */)
 }
 
 Global_context *
-unsmob_global_context (SCM x)
+Global_context::unsmob (SCM x)
 {
-  return dynamic_cast<Global_context *> (unsmob_context (x));
+  return dynamic_cast<Global_context *> (Context::unsmob (x));
 }
index b57e284e33545d28c0431c4a0777df6f26538e0d..dc32f8448106325fe48b1d4347d13a6c0acc3972 100644 (file)
@@ -60,7 +60,7 @@ Grace_engraver::consider_change_grace_settings ()
           SCM grob = scm_cadr (entry);
           SCM sym = scm_caddr (entry);
 
-          execute_pushpop_property (unsmob_context (context),
+          execute_pushpop_property (Context::unsmob (context),
                                     grob, sym, SCM_UNDEFINED);
         }
 
index ffac90114cb52e0ebfb74bf4d3f7755f912f54b0..eb466d30a3265be11aff0e1c9b8ce61f9b65c3e6 100644 (file)
@@ -30,7 +30,7 @@ MAKE_SCHEME_CALLBACK (Grace_music, start_callback, 1);
 SCM
 Grace_music::start_callback (SCM m)
 {
-  Moment *l = unsmob_moment (Music_wrapper::length_callback (m));
+  Moment *l = Moment::unsmob (Music_wrapper::length_callback (m));
   Moment gl;
   gl.grace_part_ = -(l->main_part_ + l->grace_part_);
   return gl.smobbed_copy ();
index 4e5f33a91c9223b6daf82a49391303d350cbeaae..dfef3312f07a5e77802fbbc35429598aae3da146 100644 (file)
@@ -54,7 +54,7 @@ Grace_spacing_engraver::process_music ()
 
   if (grace_spacing_ && (now.grace_part_ || last_moment_.grace_part_))
     {
-      Grob *column = unsmob_grob (get_property ("currentMusicalColumn"));
+      Grob *column = Grob::unsmob (get_property ("currentMusicalColumn"));
       Pointer_group_interface::add_grob (grace_spacing_,
                                          ly_symbol2scm ("columns"),
                                          column);
index 9d070ad99782062d50794e45227a768896d70919..3d63fc44113ce8ffbbca1a8781905abfb27a04f8 100644 (file)
@@ -215,7 +215,7 @@ provide_context_info (vector<Grob_info> const &primitives)
       Grob *primitive = primitives[i].grob ();
       Stream_event *event_cause = primitives[i].event_cause ();
       int context_info = 0;
-      int pitch = unsmob_pitch (event_cause->get_property ("pitch"))->steps ();
+      int pitch = Pitch::unsmob (event_cause->get_property ("pitch"))->steps ();
       int prefix_set = scm_to_int (primitive->get_property ("prefix-set"));
 
       if (prefix_set & PES_OR_FLEXA)
index 5eb566c0eb443e087b08886f9c5a08521c75d456..5b51499223e31dc407c4add0818a866b8ac3dde4 100644 (file)
@@ -28,7 +28,7 @@ MAKE_SCHEME_CALLBACK (Grid_line_interface, print, 1);
 SCM
 Grid_line_interface::print (SCM smobbed_me)
 {
-  Grob *me = unsmob_grob (smobbed_me);
+  Grob *me = Grob::unsmob (smobbed_me);
 
   extract_grob_set (me, "elements", elts);
   /* compute common refpoint of elements */
@@ -63,7 +63,7 @@ MAKE_SCHEME_CALLBACK (Grid_line_interface, width, 1);
 SCM
 Grid_line_interface::width (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   Real staffline = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
   Real thick = robust_scm2double (me->get_property ("thickness"), 1.0)
index 3c326285b611e396da93189cd70664eb9c1b4bf4..bcf37cbed0ebd6b217d5e0acfada6b59c55790f3 100644 (file)
@@ -35,7 +35,7 @@ void
 Grid_point_engraver::process_music ()
 {
   SCM grid_interval = get_property ("gridInterval");
-  if (Moment *mom = unsmob_moment (grid_interval))
+  if (Moment *mom = Moment::unsmob (grid_interval))
     {
       Moment now = now_mom ();
 
index 51863dc1c74cdf8331dadf16d905a3ef4ce40c8f..5f5ccae114a38b27e0a6d36a96109f26351ea1da 100644 (file)
@@ -28,7 +28,7 @@ LY_DEFINE (ly_grob_array_length, "ly:grob-array-length",
 {
   LY_ASSERT_SMOB (Grob_array, grob_arr, 1);
 
-  Grob_array *me = unsmob_grob_array (grob_arr);
+  Grob_array *me = Grob_array::unsmob (grob_arr);
   return scm_from_int (me->size ());
 }
 
@@ -37,7 +37,7 @@ LY_DEFINE (ly_grob_array_ref, "ly:grob-array-ref",
            (SCM grob_arr, SCM index),
            "Retrieve the @var{index}th element of @var{grob-arr}.")
 {
-  Grob_array *me = unsmob_grob_array (grob_arr);
+  Grob_array *me = Grob_array::unsmob (grob_arr);
   LY_ASSERT_SMOB (Grob_array, grob_arr, 1);
   LY_ASSERT_TYPE (scm_is_integer, index, 2);
 
@@ -53,7 +53,7 @@ LY_DEFINE (ly_grob_array_2_list, "ly:grob-array->list",
            (SCM grob_arr),
            "Return the elements of @var{grob-arr} as a Scheme list.")
 {
-  Grob_array *me = unsmob_grob_array (grob_arr);
+  Grob_array *me = Grob_array::unsmob (grob_arr);
   LY_ASSERT_SMOB (Grob_array, grob_arr, 1);
 
   return grob_array_to_list (me);
index a47d222e8123f6d706c6392a4900d07dd94e552a..78ee5eff006986abb095505837fe245e8c02800e 100644 (file)
@@ -58,7 +58,7 @@ Grob_array::mark_smob (SCM s)
   (void) s;
 
 #if 0  /* see System::derived_mark () const */
-  Grob_array *ga = unsmob_grob_array (s);
+  Grob_array *ga = Grob_array::unsmob (s);
   for (vsize i = 0; i < ga->grobs_.size (); i++)
     scm_gc_mark (ga->grobs_[i]->self_scm ());
 #endif
@@ -122,9 +122,9 @@ SCM
 grob_list_to_grob_array (SCM lst)
 {
   SCM arr_scm = Grob_array::make_array ();
-  Grob_array *ga = unsmob_grob_array (arr_scm);
+  Grob_array *ga = Grob_array::unsmob (arr_scm);
   for (SCM s = lst; scm_is_pair (s); s = scm_cdr (s))
-    ga->add (unsmob_grob (scm_car (s)));
+    ga->add (Grob::unsmob (scm_car (s)));
   return arr_scm;
 }
 
index 2103385880d800267afb5a4846ef395eaeb86d5f..3a90b8c896eb37a4c9069200a057d86a4e02257d 100644 (file)
@@ -50,7 +50,7 @@ Stream_event *
 Grob_info::event_cause () const
 {
   SCM cause = grob_->get_property ("cause");
-  return unsmob_stream_event (cause);
+  return Stream_event::unsmob (cause);
 }
 
 vector<Context *>
@@ -90,11 +90,11 @@ Stream_event *
 Grob_info::ultimate_event_cause () const
 {
   SCM cause = grob_->self_scm ();
-  while (unsmob_grob (cause))
+  while (Grob::unsmob (cause))
     {
-      cause = unsmob_grob (cause)->get_property ("cause");
+      cause = Grob::unsmob (cause)->get_property ("cause");
     }
-  return unsmob_stream_event (cause);
+  return Stream_event::unsmob (cause);
 }
 
 bool
index cd845cdd4a0e0f9351028c77c9ff52cb73f9fd6d..f9b56575b02a547ca5e4865e1fc58789ceabb7e2 100644 (file)
@@ -63,8 +63,8 @@ LY_DEFINE (ly_grob_pq_less_p, "ly:grob-pq<?",
            "Compare two grob priority queue entries."
            "  This is an internal function.")
 {
-  if (Moment::compare (*unsmob_moment (scm_car (a)),
-                       *unsmob_moment (scm_car (b))) < 0)
+  if (Moment::compare (*Moment::unsmob (scm_car (a)),
+                       *Moment::unsmob (scm_car (b))) < 0)
     return SCM_BOOL_T;
   else
     return SCM_BOOL_F;
@@ -121,7 +121,7 @@ Grob_pq_engraver::stop_translation_timestep ()
   Moment now = now_mom ();
   SCM start_busy = get_property ("busyGrobs");
   SCM busy = start_busy;
-  while (scm_is_pair (busy) && *unsmob_moment (scm_caar (busy)) == now)
+  while (scm_is_pair (busy) && *Moment::unsmob (scm_caar (busy)) == now)
     busy = scm_cdr (busy);
 
 }
@@ -133,7 +133,7 @@ Grob_pq_engraver::start_translation_timestep ()
 
   SCM start_busy = get_property ("busyGrobs");
   SCM busy = start_busy;
-  while (scm_is_pair (busy) && *unsmob_moment (scm_caar (busy)) < now)
+  while (scm_is_pair (busy) && *Moment::unsmob (scm_caar (busy)) < now)
     {
       /*
         The grob-pq-engraver is not water tight, and stuff like
index 1bbc53212ab2b04fa3280fcbd1639d3b2b4a1182..a3c102d187f44f8cf128a2885e52b6ad78890ed0 100644 (file)
@@ -33,7 +33,7 @@ LY_DEFINE (ly_grob_property_data, "ly:grob-property-data",
            "Return the value for property @var{sym} of @var{grob},"
            " but do not process callbacks.")
 {
-  Grob *sc = unsmob_grob (grob);
+  Grob *sc = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
@@ -45,7 +45,7 @@ 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}.")
 {
-  Grob *sc = unsmob_grob (grob);
+  Grob *sc = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
@@ -63,7 +63,7 @@ LY_DEFINE (ly_grob_set_nested_property_x, "ly:grob-set-nested-property!",
            3, 0, 0, (SCM grob, SCM symlist, SCM val),
            "Set nested property @var{symlist} in grob @var{grob} to value @var{val}.")
 {
-  Grob *sc = unsmob_grob (grob);
+  Grob *sc = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
 
@@ -88,7 +88,7 @@ LY_DEFINE (ly_grob_pure_property, "ly:grob-pure-property",
            "  If no value is found, return @var{val} or @code{'()}"
            " if @var{val} is not specified.")
 {
-  Grob *sc = unsmob_grob (grob);
+  Grob *sc = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
@@ -110,8 +110,8 @@ LY_DEFINE (ly_grob_pure_height, "ly:grob-pure-height",
            "  If no value is found, return @var{val} or @code{'()}"
            " if @var{val} is not specified.")
 {
-  Grob *sc = unsmob_grob (grob);
-  Grob *ref = unsmob_grob (refp);
+  Grob *sc = Grob::unsmob (grob);
+  Grob *ref = Grob::unsmob (refp);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_SMOB (Grob, refp, 2);
@@ -131,7 +131,7 @@ LY_DEFINE (ly_grob_property, "ly:grob-property",
            "  If no value is found, return @var{val} or @code{'()}"
            " if @var{val} is not specified.")
 {
-  Grob *sc = unsmob_grob (grob);
+  Grob *sc = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
@@ -149,7 +149,7 @@ LY_DEFINE (ly_grob_interfaces, "ly:grob-interfaces",
            1, 0, 0, (SCM grob),
            "Return the interfaces list of grob @var{grob}.")
 {
-  Grob *sc = unsmob_grob (grob);
+  Grob *sc = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
 
@@ -162,7 +162,7 @@ LY_DEFINE (ly_grob_object, "ly:grob-object",
            " @var{sym}.  It returns @code{'()} (end-of-list) if @var{sym}"
            " is undefined in @var{grob}.")
 {
-  Grob *sc = unsmob_grob (grob);
+  Grob *sc = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
@@ -174,7 +174,7 @@ LY_DEFINE (ly_grob_set_object_x, "ly:grob-set-object!",
            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 = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
@@ -189,7 +189,7 @@ LY_DEFINE (ly_grob_layout, "ly:grob-layout",
            1, 0, 0, (SCM grob),
            "Get @code{\\layout} definition from grob @var{grob}.")
 {
-  Grob *sc = unsmob_grob (grob);
+  Grob *sc = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
 
@@ -202,7 +202,7 @@ LY_DEFINE (ly_grob_alist_chain, "ly:grob-alist-chain",
            " the global default.  If unspecified, @code{font-defaults}"
            " from the layout block is taken.")
 {
-  Grob *sc = unsmob_grob (grob);
+  Grob *sc = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
 
@@ -221,8 +221,8 @@ LY_DEFINE (ly_grob_extent, "ly:grob-extent",
            "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 = Grob::unsmob (grob);
+  Grob *ref = Grob::unsmob (refp);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_SMOB (Grob, refp, 2);
@@ -243,8 +243,8 @@ LY_DEFINE (ly_grob_robust_relative_extent, "ly:grob-robust-relative-extent",
            "Get the extent in @var{axis} direction of @var{grob} relative to"
            " the grob @var{refp}, or @code{(0,0)} if empty.")
 {
-  Grob *sc = unsmob_grob (grob);
-  Grob *ref = unsmob_grob (refp);
+  Grob *sc = Grob::unsmob (grob);
+  Grob *ref = Grob::unsmob (refp);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_SMOB (Grob, refp, 2);
@@ -266,8 +266,8 @@ LY_DEFINE (ly_grob_relative_coordinate, "ly:grob-relative-coordinate",
            "Get the coordinate 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 = Grob::unsmob (grob);
+  Grob *ref = Grob::unsmob (refp);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_SMOB (Grob, refp, 2);
@@ -289,7 +289,7 @@ LY_DEFINE (ly_grob_parent, "ly:grob-parent",
            "Get the parent of @var{grob}.  @var{axis} is 0 for the X-axis,"
            " 1@tie{}for the Y-axis.")
 {
-  Grob *sc = unsmob_grob (grob);
+  Grob *sc = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_TYPE (is_axis, axis, 2);
@@ -302,8 +302,8 @@ LY_DEFINE (ly_grob_set_parent_x, "ly:grob-set-parent!",
            3, 0, 0, (SCM grob, SCM axis, SCM parent_grob),
            "Set @var{parent-grob} the parent of grob @var{grob} in axis @var{axis}.")
 {
-  Grob *gr = unsmob_grob (grob);
-  Grob *parent = unsmob_grob (parent_grob);
+  Grob *gr = Grob::unsmob (grob);
+  Grob *parent = Grob::unsmob (parent_grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_TYPE (is_axis, axis, 2);
@@ -318,7 +318,7 @@ LY_DEFINE (ly_grob_properties, "ly:grob-properties",
            1, 0, 0, (SCM grob),
            "Get the mutable properties of @var{grob}.")
 {
-  Grob *g = unsmob_grob (grob);
+  Grob *g = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
 
@@ -330,7 +330,7 @@ LY_DEFINE (ly_grob_basic_properties, "ly:grob-basic-properties",
            1, 0, 0, (SCM grob),
            "Get the immutable properties of @var{grob}.")
 {
-  Grob *g = unsmob_grob (grob);
+  Grob *g = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
 
@@ -342,7 +342,7 @@ LY_DEFINE (ly_grob_system, "ly:grob-system",
            1, 0, 0, (SCM grob),
            "Return the system grob of @var{grob}.")
 {
-  Grob *me = unsmob_grob (grob);
+  Grob *me = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
 
@@ -356,7 +356,7 @@ LY_DEFINE (ly_grob_original, "ly:grob-original",
            1, 0, 0, (SCM grob),
            "Return the unbroken original grob of @var{grob}.")
 {
-  Grob *me = unsmob_grob (grob);
+  Grob *me = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
   return me->original () ? me->original ()->self_scm () : me->self_scm ();
@@ -366,7 +366,7 @@ LY_DEFINE (ly_grob_suicide_x, "ly:grob-suicide!",
            1, 0, 0, (SCM grob),
            "Kill @var{grob}.")
 {
-  Grob *me = unsmob_grob (grob);
+  Grob *me = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
 
@@ -379,7 +379,7 @@ LY_DEFINE (ly_grob_translate_axis_x, "ly:grob-translate-axis!",
            "Translate @var{grob} on axis@tie{}@var{a} over"
            " distance@tie{}@var{d}.")
 {
-  Grob *me = unsmob_grob (grob);
+  Grob *me = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_TYPE (scm_is_number, d, 2);
@@ -393,7 +393,7 @@ LY_DEFINE (ly_grob_default_font, "ly:grob-default-font",
            1, 0, 0, (SCM grob),
            "Return the default font for grob @var{grob}.")
 {
-  Grob *gr = unsmob_grob (grob);
+  Grob *gr = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
 
@@ -411,12 +411,12 @@ LY_DEFINE (ly_grob_common_refpoint, "ly:grob-common-refpoint",
            " for @var{axis}.")
 {
 
-  Grob *gr = unsmob_grob (grob);
+  Grob *gr = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_SMOB (Grob, other, 2);
 
-  Grob *o = unsmob_grob (other);
+  Grob *o = Grob::unsmob (other);
 
   LY_ASSERT_TYPE (is_axis, axis, 3);
 
@@ -429,12 +429,12 @@ LY_DEFINE (ly_grob_common_refpoint_of_array, "ly:grob-common-refpoint-of-array",
            "Find the common refpoint of @var{grob} and @var{others}"
            " (a grob-array) for @var{axis}.")
 {
-  Grob *gr = unsmob_grob (grob);
+  Grob *gr = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_SMOB (Grob_array, others, 2);
 
-  Grob_array *ga = unsmob_grob_array (others);
+  Grob_array *ga = Grob_array::unsmob (others);
   LY_ASSERT_TYPE (is_axis, axis, 3);
 
   Grob *refp = common_refpoint_of_array (ga->array (), gr, Axis (scm_to_int (axis)));
@@ -448,7 +448,7 @@ LY_DEFINE (ly_grob_chain_callback, "ly:grob-chain-callback",
            " to the head of this, meaning that it is called"
            " using @var{grob} and the previous callback's result.")
 {
-  Grob *gr = unsmob_grob (grob);
+  Grob *gr = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
   SCM_ASSERT_TYPE (ly_is_procedure (proc) || is_unpure_pure_container (proc), proc, SCM_ARG2, __FUNCTION__, "procedure or unpure pure container");
@@ -465,8 +465,8 @@ LY_DEFINE (ly_grob_vertical_less_p, "ly:grob-vertical<?",
   LY_ASSERT_SMOB (Grob, a, 1);
   LY_ASSERT_SMOB (Grob, b, 2);
 
-  Grob *ga = unsmob_grob (a);
-  Grob *gb = unsmob_grob (b);
+  Grob *ga = Grob::unsmob (a);
+  Grob *gb = Grob::unsmob (b);
 
   return ly_bool2scm (Grob::vertical_less (ga, gb));
 }
@@ -476,7 +476,7 @@ LY_DEFINE (ly_grob_get_vertical_axis_group_index, "ly:grob-get-vertical-axis-gro
            "Get the index of the vertical axis group the grob @var{grob} belongs to;"
            " return @code{-1} if none is found.")
 {
-  Grob *gr = unsmob_grob (grob);
+  Grob *gr = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
 
index 86ec7e4c6be40b7bc16cf7c3a58b6b631d705049..90a7dbac20a9e5ec98793c5432603d8c82883a01 100644 (file)
@@ -129,7 +129,7 @@ Grob::get_stencil () const
     return 0;
 
   SCM stil = get_property ("stencil");
-  return unsmob_stencil (stil);
+  return Stencil::unsmob (stil);
 }
 
 Stencil
@@ -138,7 +138,7 @@ Grob::get_print_stencil () const
   SCM stil = get_property ("stencil");
 
   Stencil retval;
-  if (Stencil *m = unsmob_stencil (stil))
+  if (Stencil *m = Stencil::unsmob (stil))
     {
       retval = *m;
       bool transparent = to_boolean (get_property ("transparent"));
@@ -182,7 +182,7 @@ Grob::get_print_stencil () const
           /* Call the scheme procedure stencil-whiteout in scm/stencils.scm */
           /* to add a round-filled-box stencil to the stencil list */
           retval
-            = *unsmob_stencil (scm_call_1 (ly_lily_module_constant ("stencil-whiteout"),
+            = *Stencil::unsmob (scm_call_1 (ly_lily_module_constant ("stencil-whiteout"),
                                            retval.smobbed_copy ()));
         }
 
@@ -727,13 +727,13 @@ void
 Grob::programming_error (const string &s) const
 {
   SCM cause = self_scm ();
-  while (Grob *g = unsmob_grob (cause))
+  while (Grob *g = Grob::unsmob (cause))
     cause = g->get_property ("cause");
 
   /* ES TODO: cause can't be Music*/
-  if (Music *m = unsmob_music (cause))
+  if (Music *m = Music::unsmob (cause))
     m->origin ()->programming_error (s);
-  else if (Stream_event *ev = unsmob_stream_event (cause))
+  else if (Stream_event *ev = Stream_event::unsmob (cause))
     ev->origin ()->programming_error (s);
   else
     ::programming_error (s);
@@ -743,13 +743,13 @@ void
 Grob::warning (const string &s) const
 {
   SCM cause = self_scm ();
-  while (Grob *g = unsmob_grob (cause))
+  while (Grob *g = Grob::unsmob (cause))
     cause = g->get_property ("cause");
 
   /* ES TODO: cause can't be Music*/
-  if (Music *m = unsmob_music (cause))
+  if (Music *m = Music::unsmob (cause))
     m->origin ()->warning (s);
-  else if (Stream_event *ev = unsmob_stream_event (cause))
+  else if (Stream_event *ev = Stream_event::unsmob (cause))
     ev->origin ()->warning (s);
   else
     ::warning (s);
@@ -854,7 +854,7 @@ MAKE_SCHEME_CALLBACK (Grob, stencil_height, 1);
 SCM
 Grob::stencil_height (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   return grob_stencil_extent (me, Y_AXIS);
 }
 
@@ -862,8 +862,8 @@ MAKE_SCHEME_CALLBACK (Grob, pure_stencil_height, 3);
 SCM
 Grob::pure_stencil_height (SCM smob, SCM /* beg */, SCM /* end */)
 {
-  Grob *me = unsmob_grob (smob);
-  if (unsmob_stencil (me->get_property_data ("stencil")))
+  Grob *me = Grob::unsmob (smob);
+  if (Stencil::unsmob (me->get_property_data ("stencil")))
     return grob_stencil_extent (me, Y_AXIS);
 
   return ly_interval2scm (Interval ());
@@ -874,7 +874,7 @@ MAKE_SCHEME_CALLBACK (Grob, y_parent_positioning, 1);
 SCM
 Grob::y_parent_positioning (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Grob *par = me->get_parent (Y_AXIS);
   if (par)
     (void) par->get_property ("positioning-done");
@@ -886,7 +886,7 @@ MAKE_SCHEME_CALLBACK (Grob, x_parent_positioning, 1);
 SCM
 Grob::x_parent_positioning (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   Grob *par = me->get_parent (X_AXIS);
   if (par)
@@ -899,7 +899,7 @@ MAKE_SCHEME_CALLBACK (Grob, stencil_width, 1);
 SCM
 Grob::stencil_width (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   return grob_stencil_extent (me, X_AXIS);
 }
 
@@ -907,7 +907,7 @@ Grob *
 common_refpoint_of_list (SCM elist, Grob *common, Axis a)
 {
   for (; scm_is_pair (elist); elist = scm_cdr (elist))
-    if (Grob *s = unsmob_grob (scm_car (elist)))
+    if (Grob *s = Grob::unsmob (scm_car (elist)))
       {
         if (common)
           common = common->common_refpoint (s, a);
index 9e6d179c8b56dd347a3ebdfebdb097125aedeb2c..edf5c7cbf7fe1f04e31d60807975a7b98d1df30a 100644 (file)
@@ -38,7 +38,7 @@ MAKE_SCHEME_CALLBACK (Hairpin, pure_height, 3);
 SCM
 Hairpin::pure_height (SCM smob, SCM, SCM)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Real height = robust_scm2double (me->get_property ("height"), 0.0)
                 * Staff_symbol_referencer::staff_space (me);
 
@@ -53,7 +53,7 @@ MAKE_SCHEME_CALLBACK (Hairpin, broken_bound_padding, 1);
 SCM
 Hairpin::broken_bound_padding (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
   Item *r_bound = me->get_bound (RIGHT);
   if (r_bound->break_status_dir () != -1)
     {
@@ -88,7 +88,7 @@ Hairpin::broken_bound_padding (SCM smob)
             if (!scm_is_pair (hsb))
               break;
 
-            span_bars[d] = unsmob_grob ((d == UP ? scm_car : scm_cdr) (hsb));
+            span_bars[d] = Grob::unsmob ((d == UP ? scm_car : scm_cdr) (hsb));
             break;
           }
 
@@ -107,7 +107,7 @@ MAKE_SCHEME_CALLBACK (Hairpin, print, 1);
 SCM
 Hairpin::print (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
 
   SCM s = me->get_property ("grow-direction");
   if (!is_direction (s))
index ce06c40ee1bfc723f05cdbdf29ce27997b004ef4..b7c55b5045f903b0b22ec46c3b5cd10a707b0dc5 100644 (file)
@@ -30,7 +30,7 @@ MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner, y_extent, 1);
 SCM
 Hara_kiri_group_spanner::y_extent (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   consider_suicide (me);
   return Axis_group_interface::generic_group_extent (me, Y_AXIS);
 }
@@ -39,7 +39,7 @@ MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner, calc_skylines, 1);
 SCM
 Hara_kiri_group_spanner::calc_skylines (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   consider_suicide (me);
   return Axis_group_interface::calc_skylines (smob);
 }
@@ -48,7 +48,7 @@ MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner, pure_height, 3);
 SCM
 Hara_kiri_group_spanner::pure_height (SCM smob, SCM start_scm, SCM end_scm)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   int start = robust_scm2int (start_scm, 0);
   int end = robust_scm2int (end_scm, INT_MAX);
 
@@ -162,7 +162,7 @@ MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner, force_hara_kiri_callback, 1);
 SCM
 Hara_kiri_group_spanner::force_hara_kiri_callback (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   consider_suicide (me);
   return scm_from_double (0.0);
 }
@@ -171,7 +171,7 @@ MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner, force_hara_kiri_in_y_parent_callb
 SCM
 Hara_kiri_group_spanner::force_hara_kiri_in_y_parent_callback (SCM smob)
 {
-  Grob *daughter = unsmob_grob (smob);
+  Grob *daughter = Grob::unsmob (smob);
   force_hara_kiri_callback (daughter->get_parent (Y_AXIS)->self_scm ());
   return scm_from_double (0.0);
 }
index 7beaef28208eb10e9c99540617738eb174cfbaa6..003a375d527016270c42ea321854f831e7c63005 100644 (file)
@@ -101,7 +101,7 @@ MAKE_SCHEME_CALLBACK (Horizontal_bracket, print, 1);
 SCM
 Horizontal_bracket::print (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
   extract_grob_set (me, "columns", gs);
 
   vector<Grob *> enclosed = gs;
index b70474385329c45437ffaf707abf9db223cedc10..bd996a582c1a273ee54e9988c57a7e1538202b0c 100644 (file)
@@ -144,7 +144,7 @@ public:
   // Supported control functions.
   enum Control
   {
-    BALANCE = 0, PAN_POSITION, REVERB_LEVEL, CHORUS_LEVEL,
+    BALANCE = 0, PAN_POSITION, EXPRESSION, REVERB_LEVEL, CHORUS_LEVEL,
     // pseudo value for representing the size of the enum; must be kept last
     NUM_CONTROLS
   };
index efbc3deb00b063725a5721992ae0e1956c85b779..7527cf5062c2780c758cb5329c1da811434e3486 100644 (file)
@@ -62,6 +62,5 @@ protected:
                           Output_def *layout);
 };
 
-DECLARE_UNSMOB (Book, book);
 
 #endif /* BOOK_HH */
index b0f899431188bf4d653ac448afbb6e074efdd6fa..685fbcff75a61fe3912134c75dfeaf4e23581df9 100644 (file)
@@ -40,6 +40,5 @@ public:
   Box (Interval ix, Interval iy);
 };
 
-DECLARE_UNSMOB (Box, box);
 
 #endif
index 835354a2e5c57ea6a48eabf69e17dcd15d335901..ecf1cb0c42d3040c2ea83aea7b48b581a249a707 100644 (file)
@@ -81,7 +81,6 @@ private:
   Context_def (Context_def const &);
 };
 
-DECLARE_UNSMOB (Context_def, context_def);
 
 #endif /* CONTEXT_DEF_HH */
 
index ab3c3d2e7e2d308c4c22d0cda8cba68507d79899..44ba8d2ebc628a31785593bf00bdf1711c9ec166 100644 (file)
@@ -50,7 +50,6 @@ public:
   DECLARE_SIMPLE_SMOBS (Context_mod);
 };
 
-DECLARE_UNSMOB (Context_mod, context_mod);
 
 #endif /* CONTEXT_MOD_HH */
 
index 69bac839a5c7260ad73b207fe83585f6979b5078..d6cdfde6e4d7e35b934542dffc4c368fe0f23ffd 100644 (file)
@@ -150,7 +150,6 @@ bool melisma_busy (Context *);
 Context *get_voice_to_lyrics (Context *lyrics);
 Grob *get_current_note_head (Context *voice, bool include_grace_notes);
 Grob *get_current_rest (Context *voice);
-DECLARE_UNSMOB (Context, context);
 
 Moment measure_position (Context const *context);
 Moment measure_position (Context const *context, Duration const *dur);
index 31bed90c7eed6030ae55bae2d5bdf6a2530009c2..1d3583bb673f2a7faaf588feeee90c7133a44f8c 100644 (file)
@@ -49,6 +49,5 @@ protected:
   DECLARE_SMOBS (Dispatcher);
 };
 
-DECLARE_UNSMOB (Dispatcher, dispatcher);
 
 #endif // DISPATCHER_HH
index e05ed7042ad63c5c6920e40277c58d7e2d26b295..959ed09e1be5edb137bb776357ddb93f4bfe22da 100644 (file)
@@ -54,7 +54,6 @@ private:
 };
 
 INSTANTIATE_COMPARE (Duration, Duration::compare);
-DECLARE_UNSMOB (Duration, duration);
 
 extern SCM Duration_type_p_proc;
 
index 4a102aa2655289b4a321a1616d7c631ec774fedd..2cb28292fc30290c029744893dfa89caaf7ff7d4 100644 (file)
@@ -65,13 +65,13 @@ public:
      override other ctor
   */
   TRANSLATOR_DECLARATIONS (Engraver);
+  static Engraver *unsmob (SCM eng);
 };
 
 #define make_item(x, cause) internal_make_item (ly_symbol2scm (x), cause, x, __FILE__, __LINE__, __FUNCTION__)
 #define make_spanner(x, cause) internal_make_spanner (ly_symbol2scm (x), cause, x, __FILE__, __LINE__, __FUNCTION__)
 #define make_paper_column(x) internal_make_column (ly_symbol2scm (x), x, __FILE__, __LINE__, __FUNCTION__)
 
-Engraver *unsmob_engraver (SCM eng);
 bool ly_is_grob_cause (SCM obj);
 
 #endif // ENGRAVER_HH
index 71ba92175385924685ab99e6f3b19ac172e48bc4..720f33b8375799f47110dfe07f8cc12553e2006e 100644 (file)
@@ -66,7 +66,6 @@ protected:
   Font_metric ();
 };
 
-DECLARE_UNSMOB (Font_metric, metrics);
 
 char *pfb2pfa (Byte const *pfb, int length);
 
index 8c1b8b66ab73294cb5bd8aaef439cab1eee279bd..31e2190bc21c22dbb08d458774c4982f8fecdb1d 100644 (file)
@@ -48,6 +48,8 @@ public:
   virtual Moment now_mom () const;
   virtual Context *get_default_interpreter (const string &context_id = "");
 
+  static Global_context *unsmob (SCM x);
+
   Moment previous_moment () const;
 protected:
   Moment prev_mom_;
@@ -55,6 +57,5 @@ protected:
 };
 
 SCM ly_format_output (SCM);
-Global_context *unsmob_global_context (SCM x);
 
 #endif // GLOBAL_CONTEXT_HH
index 958c59d55e0707d486ec5731dda7cb433861a09b..33d458cea8c0c1f378667873af58b289f79444a0 100644 (file)
@@ -49,7 +49,6 @@ public:
   static SCM make_array ();
 };
 
-DECLARE_UNSMOB (Grob_array, grob_array);
 
 vector<Grob *> const &ly_scm2link_array (SCM x);
 SCM grob_list_to_grob_array (SCM lst);
index 83ec5f73edf25cfa79ca5316290745bd4437f37f..2aec0fa90906c482188a6a17597af8afda7dbd26 100644 (file)
@@ -171,11 +171,6 @@ public:
   static SCM internal_skylines_from_element_stencils (SCM, Axis);
 };
 
-/* smob utilities */
-DECLARE_UNSMOB (Grob, grob);
-Spanner *unsmob_spanner (SCM);
-Item *unsmob_item (SCM);
-
 /* unification */
 void uniquify (vector <Grob *> &);
 
index a6aa1698b4d56912e6e71dba8ced11d7386616db..5a2992fdbe2ae54efb936ad5614989e7c07e500b 100644 (file)
@@ -21,6 +21,7 @@
 #define INPUT_HH
 
 #include "lily-proto.hh"
+#include "smobs.hh"
 
 /**
    Base class for anything that records its poisition in the parse file.
@@ -35,6 +36,8 @@ public:
   char const *start () const;
   char const *end () const;
 
+  static Input *unsmob (SCM);
+
   void set (Source_file *, char const *, char const *);
   void error (const string&) const;
   void programming_error (const string&) const;
@@ -66,10 +69,7 @@ protected:
   string message_string (const string &msg) const;
 };
 
-#include "smobs.hh"
-
 SCM make_input (Input spot);
-Input *unsmob_input (SCM);
 
 extern Input dummy_input_global;
 
index bae549594cecf1976ee4f14ef2eb0c105d30d5df..ac945eac413527b926defcdef5e66b514465f88a 100644 (file)
@@ -36,6 +36,8 @@ public:
   Item (SCM);
   Item (Item const &);
 
+  static Item *unsmob (SCM);
+
   virtual Grob *clone () const;
 
   static bool is_non_musical (Grob *);
index 002cbc0a8ec72e896d80d5dcaaedd1c402794d2e..acc817f87812779cc3c20a9290b7eac379d59363 100644 (file)
@@ -110,22 +110,6 @@ inline SCM ly_symbol2scm (char const *x) { return scm_from_locale_symbol ((x));
 #define DECLARE_SCHEME_CALLBACK(NAME, ARGS)     \
   static SCM NAME ARGS;                         \
   static SCM NAME ## _proc
-#define ADD_TYPE_PREDICATE(func, type_name) \
-  void \
-  func ## _type_adder ()                        \
-  {\
-    ly_add_type_predicate ((Type_predicate_ptr)func, type_name);        \
-  }\
-  ADD_SCM_INIT_FUNC(func ## _type_adder_ctor, \
-                    func ## _type_adder);
-#define ADD_TYPE_PREDICATE(func, type_name) \
-  void \
-  func ## _type_adder ()                        \
-  {\
-    ly_add_type_predicate ((Type_predicate_ptr)func, type_name);        \
-  }\
-  ADD_SCM_INIT_FUNC(func ## _type_adder_ctor, \
-                    func ## _type_adder);
 
 string mangle_cxx_identifier (string);
 
index e2d484f3fb7d7993e2790476953bdecf6a7c11d5..305d439ee2a0e68ae399c5db5658d3c91c6a673c 100644 (file)
@@ -67,7 +67,6 @@ public:
   SCM make_scope () const;
 };
 
-DECLARE_UNSMOB (Lily_parser, lily_parser);
 
 Output_def *get_layout (Lily_parser *parser);
 Output_def *get_midi (Lily_parser *parser);
index e0827f8786dc372ceaee9256f159e7d1dbe0c7d5..51ad5db821d30885303cb72e9ef787b12720efb9 100644 (file)
@@ -89,7 +89,6 @@ public:
 
   DECLARE_SIMPLE_SMOBS (Listener);
 };
-DECLARE_UNSMOB (Listener, listener);
 
 #define IMPLEMENT_LISTENER(cl, method)                  \
 void                                                    \
index b7f79a6b84b1e7c399aca4b5b7eb6504b8dcd55d..2f53c9e2582429f671c8c487818188060b36723b 100644 (file)
@@ -68,7 +68,6 @@ IMPLEMENT_ARITHMETIC_OPERATOR (Moment, / );
 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, *);
 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, % );
 
-DECLARE_UNSMOB (Moment, moment);
 int compare (Moment const &, Moment const &);
 INSTANTIATE_COMPARE (Moment const &, Moment::compare);
 
index 9bb2637404d0de13bb2d5702b1b13a46a650a3ad..436318bd385dcda8effd8801147c0660c8101825 100644 (file)
@@ -113,6 +113,5 @@ bool is_child_context (Context *me, Context *child);
     return c->unprotect ();                                             \
   }
 
-DECLARE_UNSMOB (Music_iterator, iterator);
 
 #endif // MUSIC_ITERATOR_HH
index 888774af55b62cf42c6cdc850427ba04a6186ca6..73d2ac94c6f50733e8bef9bbb3abf79aaa36a264 100644 (file)
@@ -38,7 +38,4 @@ public:
   virtual void process ();
 };
 
-DECLARE_UNSMOB (Music_output, music_output);
-Paper_score *unsmob_paper_score (SCM);
-Performance *unsmob_performance (SCM);
 #endif /* MUSIC_OUTPUT_HH */
index 8d1ffc7128f280990cd8880ad591d1d3938159b4..e59f82c758f6a26d408a275c414298bb881f8d80 100644 (file)
@@ -47,6 +47,7 @@ public:
   Moment get_length () const;
   Moment start_mom () const;
   void print () const;
+  static Music *unsmob (SCM);
 
   /// Transpose, with the interval central C to #p#
   void transpose (Pitch p);
@@ -69,7 +70,6 @@ protected:
   friend SCM ly_extended_make_music (SCM, SCM);
 };
 
-Music *unsmob_music (SCM);
 Music *make_music_by_name (SCM sym);
 SCM ly_music_deep_copy (SCM);
 SCM ly_camel_case_2_lisp_identifier (SCM name_sym);
index 0cd9786d2b94f069b379de5d35e9a89653b2b699..fa9c712daf15710e5ee66655ce6dc02af42e976b 100644 (file)
@@ -81,7 +81,6 @@ Interval line_dimensions_int (Output_def *def, int);
 Font_metric *select_encoded_font (Output_def *layout, SCM chain);
 Font_metric *select_font (Output_def *layout, SCM chain);
 
-DECLARE_UNSMOB (Output_def, output_def);
 
 
 Font_metric* find_pango_font (Output_def *layout,  SCM descr, Real factor);
index a18173f5c4b3d7f32f945288c74395e6888b5484..8f344d41affea574aca8c0b1b8104ad41afb3818 100644 (file)
@@ -44,6 +44,5 @@ public:
   SCM label ();
 };
 
-DECLARE_UNSMOB (Page_marker, page_marker)
 
 #endif /* PAGE_MARKER_HH */
index a0ccbe82cc44b13bafef4d3273f52972b51a07b8..42dc8c0065918bee7e44220200b54c2ff3d1d5a6 100644 (file)
@@ -74,6 +74,5 @@ protected:
                    long *first_performance_number);
 };
 
-DECLARE_UNSMOB (Paper_book, paper_book)
 
 #endif /* PAPER_BOOK_HH */
index a674fda0c8c44550d8a816f7e95f7a75415b118a..b7dd8399bf20f89d5d8ee653b108a7ddd681292f 100644 (file)
@@ -51,6 +51,5 @@ public:
   SCM scheme_to_string (SCM);
 };
 
-DECLARE_UNSMOB (Paper_outputter, outputter);
 
 #endif /* PAPER_OUTPUTTER_HH */
index c44634b2c9b5117f4e1747dfc8b365714897317c..05933d49f39ca8e20f1a506301131899a4a63e74 100644 (file)
@@ -39,6 +39,8 @@ public:
 
   DECLARE_CLASSNAME (Paper_score);
 
+  static Paper_score *unsmob (SCM);
+
   Output_def *layout () const;
   System *root_system () const;
 
index 8b5de863319365ba66070d9826d825aa6c3e1602..f3093f82c5060699bddb979a5aa0f7e428c735dc 100644 (file)
@@ -31,6 +31,8 @@ public:
   ~Performance ();
   DECLARE_CLASSNAME (Performance);
 
+  static Performance *unsmob (SCM);
+
   void add_element (Audio_element *p);
   virtual void process ();
   void remap_grace_durations ();
index fcd5a26b424c73ff229d247ca2454e40d7b0f515..aa9b098d34d3e478dbd6343c373f288b87309d98 100644 (file)
@@ -33,6 +33,7 @@ public:
   VIRTUAL_COPY_CONSTRUCTOR (Translator, Performer);
   friend class Performer_group;
   Performer_group *get_daddy_performer () const;
+  static Performer *unsmob (SCM perf);
 
 protected:
   virtual void announce_element (Audio_element_info);
@@ -40,7 +41,5 @@ protected:
   virtual void create_audio_elements ();
 };
 
-Performer *unsmob_performer (SCM perf);
-
 #endif /* PERFORMER_HH */
 
index eff3f66d79856ce0ea82faec6b15b441c91fb9b3..91c527455712cb4f6a1f388921d1328fc23d7530 100644 (file)
@@ -98,7 +98,6 @@ extern Rational DOUBLE_SHARP_ALTERATION;
 
 SCM ly_pitch_diff (SCM pitch, SCM root);
 SCM ly_pitch_transpose (SCM p, SCM delta);
-DECLARE_UNSMOB (Pitch, pitch);
 
 INSTANTIATE_COMPARE (Pitch, Pitch::compare);
 
index 77c1a634eaa48219b74d7ee80e0e69c6303eb6f3..6fd7c49081e2ff992604ed7ab8a84a3e13cc0df4 100644 (file)
@@ -57,7 +57,6 @@ public:
   void internal_set_property (SCM sym, SCM val);
 };
 
-DECLARE_UNSMOB (Prob, prob);
 
 SCM ly_prob_set_property_x (SCM system, SCM sym, SCM value);
 SCM ly_prob_property (SCM prob, SCM sym, SCM val);
index 7fe68796ec17c3d57aecc5490ff5cec957ac7477..8cc40c84cb169e12811fea9c1a7a1c3a78a18a53 100644 (file)
@@ -53,7 +53,6 @@ public:
   void set_header (SCM module);
 };
 
-DECLARE_UNSMOB (Score, score);
 
 SCM ly_run_translator (SCM, SCM);
 
index 49c29325f0031f4e61908a1ee9035fa7f844cfc5..e775a70bc5cb6078e6004c334e205b39514bd9bb 100644 (file)
   SCM self_scm () const { return self_scm_; }   \
   private:
 
-#define DECLARE_UNSMOB(CL, name)                \
-  inline CL *                                   \
-  unsmob_ ## name (SCM s)                       \
-  {                                             \
-    return CL::unsmob (s);                      \
-  }
-
-#define DECLARE_TYPE_P(CL) extern SCM CL ## _type_p_proc
-
 void protect_smob (SCM smob, SCM *prot_cons);
 void unprotect_smob (SCM smob, SCM *prot_cons);
 
index 40b3473dcaef4046886decbc27e2852db8d9d707..b56cc2264de02372fa8ae4f41fc7881bd73f8a75 100644 (file)
@@ -52,6 +52,8 @@ public:
   DECLARE_SCHEME_CALLBACK (bounds_width, (SCM));
   DECLARE_SCHEME_CALLBACK (kill_zero_spanned_time, (SCM));
 
+  static Spanner *unsmob (SCM);
+
   vector<Spanner *> broken_intos_;
 
   vsize get_break_index () const;
index d6fda83d32f91c76f7b8fd4c6b34c9309d748334..1f6aa3b70cd8e22e54c086da79b772e9f19e3be3 100644 (file)
@@ -61,7 +61,6 @@ public:
   void operator *= (Real);
   bool operator > (Spring const &) const;
 };
-DECLARE_UNSMOB (Spring, spring);
 
 Spring merge_springs (vector<Spring> const &springs);
 
index 11baeaf76e0a1bbc52de69a19f3b3331665bea00..cc8d750c1ffba583f35e3989cd9a3c52ee507e27 100644 (file)
@@ -47,7 +47,7 @@ using namespace std;
     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
+    around Stencil* which are produced by Stencil::unsmob(). Either
     copy Stencil objects, or use SCM references.
 
     * Empty stencils have empty dimensions.  If add_at_edge is used to
@@ -90,7 +90,6 @@ public:
   static SCM skylines_from_stencil (SCM, Real, Axis);
 };
 
-DECLARE_UNSMOB (Stencil, stencil);
 
 void interpret_stencil_expression (SCM expr,
                                    SCM (*func) (void *, SCM),
index 3234c03d9f039b50332107d2ba15b829cf005731..14a8af41dca73f2559765398d227a04445163afa 100644 (file)
@@ -30,6 +30,8 @@ public:
   Stream_event ();
   VIRTUAL_COPY_CONSTRUCTOR (Stream_event, Stream_event);
 
+  static Stream_event *unsmob (SCM);
+
   Stream_event (SCM event_class, SCM immutable_props = SCM_EOL);
   Stream_event (SCM class_name, Input *);
 
@@ -46,7 +48,6 @@ public:
 
 #define in_event_class(class_name) internal_in_event_class (ly_symbol2scm (class_name))
 
-Stream_event *unsmob_stream_event (SCM);
 SCM ly_event_deep_copy (SCM);
 
 #endif /* STREAM_EVENT_HH */
index edad599eea6d6ff03babaa0be125ef11187c83a5..0774930bf76663671d55934ef73e6fcdc6f094cd 100644 (file)
@@ -102,6 +102,5 @@ Translator_group *get_translator_group (SCM sym);
 #define foobar
 #define ADD_TRANSLATOR_GROUP(classname, desc, grobs, read, write) foobar
 
-DECLARE_UNSMOB (Translator_group, translator_group);
 
 #endif // TRANSLATOR_GROUP_HH
index 858af4ce21454b4a6b710811c269cdb022b0626a..0f8202e6be8dd7c2f10c0caf8edd664cc1c39fa9 100644 (file)
@@ -172,7 +172,6 @@ void add_translator (Translator *trans);
 Translator *get_translator (SCM s);
 Moment get_event_length (Stream_event *s, Moment now);
 Moment get_event_length (Stream_event *s);
-DECLARE_UNSMOB (Translator, translator);
 
 /*
   This helper is only meaningful inside listen_* methods.
index 53697b38e63d4eb0040738c11f8137b27963449b..eca9a787882c5bd3a141dfa09323f59d3489fc75 100644 (file)
@@ -153,7 +153,7 @@ IMPLEMENT_LISTENER (cl, _listen_scm_ ## m)              \
 void                                                    \
 cl::_listen_scm_ ## m (SCM sev)                         \
 {                                                       \
-  Stream_event *ev = unsmob_stream_event (sev);         \
+  Stream_event *ev = Stream_event::unsmob (sev);         \
   protect_event (sev);                                  \
   listen_ ## m (ev);                                    \
 }
index 01cad8c9d76779084c4e5f2588cd5ac410d61982..814499c4709b7c165bd073d4c459fe4313402e9d 100644 (file)
@@ -26,7 +26,7 @@ LY_DEFINE (ly_input_location_p, "ly:input-location?", 1, 0, 0,
            (SCM x),
            "Is @var{x} an @code{input-location}?")
 {
-  return unsmob_input (x) ? SCM_BOOL_T : SCM_BOOL_F;
+  return Input::unsmob (x) ? SCM_BOOL_T : SCM_BOOL_F;
 }
 
 LY_DEFINE (ly_input_warning, "ly:input-warning", 2, 0, 1, (SCM sip, SCM msg, SCM rest),
@@ -34,9 +34,9 @@ LY_DEFINE (ly_input_warning, "ly:input-warning", 2, 0, 1, (SCM sip, SCM msg, SCM
            " to the location in @var{sip}.  @var{msg} is interpreted"
            " similar to @code{format}'s argument, using @var{rest}.")
 {
-  Input *ip = unsmob_input (sip);
+  Input *ip = Input::unsmob (sip);
 
-  LY_ASSERT_TYPE (unsmob_input, sip, 1);
+  LY_ASSERT_TYPE (Input::unsmob, sip, 1);
   LY_ASSERT_TYPE (scm_is_string, msg, 2);
 
   msg = scm_simple_format (SCM_BOOL_F, msg, rest);
@@ -52,9 +52,9 @@ LY_DEFINE (ly_input_message, "ly:input-message", 2, 0, 1, (SCM sip, SCM msg, SCM
            " to the location in @var{sip}.  @var{msg} is interpreted"
            " similar to @code{format}'s argument, using @var{rest}.")
 {
-  Input *ip = unsmob_input (sip);
+  Input *ip = Input::unsmob (sip);
 
-  LY_ASSERT_TYPE (unsmob_input, sip, 1);
+  LY_ASSERT_TYPE (Input::unsmob, sip, 1);
   LY_ASSERT_TYPE (scm_is_string, msg, 2);
 
   msg = scm_simple_format (SCM_BOOL_F, msg, rest);
@@ -71,8 +71,8 @@ LY_DEFINE (ly_input_file_line_char_column,
            "Return input location in @var{sip} as"
            " @code{(file-name line char column)}.")
 {
-  LY_ASSERT_TYPE (unsmob_input, sip, 1);
-  Input *ip = unsmob_input (sip);
+  LY_ASSERT_TYPE (Input::unsmob, sip, 1);
+  Input *ip = Input::unsmob (sip);
 
   int l, ch, col, offset = 0;
   ip->get_counts (&l, &ch, &col, &offset);
@@ -89,8 +89,8 @@ LY_DEFINE (ly_input_both_locations,
            " @code{(file-name first-line first-column last-line last-column)}.")
 {
 
-  LY_ASSERT_TYPE (unsmob_input, sip, 1);
-  Input *ip = unsmob_input (sip);
+  LY_ASSERT_TYPE (Input::unsmob, sip, 1);
+  Input *ip = Input::unsmob (sip);
 
   return scm_list_5 (ly_string2scm (ip->file_string ()),
                      scm_from_int (ip->line_number ()),
index 4aef6f122d09418ae043ddd750eb6e3a131e5a88..07748ad48f5e4c9d4f270a04b540e32871deb942 100644 (file)
@@ -42,7 +42,7 @@ mark_smob (SCM s)
 static int
 print_smob (SCM s, SCM port, scm_print_state *)
 {
-  string str = "#<location " + unsmob_input (s)->location_string () + ">";
+  string str = "#<location " + Input::unsmob (s)->location_string () + ">";
   scm_puts (str.c_str (), port);
   return 1;
 }
@@ -50,7 +50,7 @@ print_smob (SCM s, SCM port, scm_print_state *)
 static size_t
 free_smob (SCM s)
 {
-  delete unsmob_input (s);
+  delete Input::unsmob (s);
   return 0;
 }
 
@@ -88,7 +88,7 @@ make_input (Input ip)
 }
 
 Input *
-unsmob_input (SCM s)
+Input::unsmob (SCM s)
 {
   if (SCM_IMP (s))
     return 0;
index 879914a81de2032db6dd6e6f3a57cd26938a1001..1fe860fa4a411d884791641de3be10566eb4845f 100644 (file)
@@ -107,7 +107,7 @@ Instrument_name_engraver::start_spanner ()
 {
   text_spanner_ = make_spanner ("InstrumentName", SCM_EOL);
 
-  Grob *col = unsmob_grob (get_property ("currentCommandColumn"));
+  Grob *col = Grob::unsmob (get_property ("currentCommandColumn"));
   text_spanner_->set_bound (LEFT, col);
   text_spanner_->set_property ("text", short_text_);
   text_spanner_->set_property ("long-text", long_text_);
@@ -115,7 +115,7 @@ Instrument_name_engraver::start_spanner ()
   /*
     UGH, should handle this in Score_engraver.
   */
-  Grob *system = unsmob_grob (get_property ("rootSystem"));
+  Grob *system = Grob::unsmob (get_property ("rootSystem"));
   if (system)
     Axis_group_interface::add_element (system, text_spanner_);
   else
@@ -164,7 +164,7 @@ Instrument_name_engraver::stop_spanner ()
                                        axis_groups_[i]);
 
   text_spanner_->set_bound (RIGHT,
-                            unsmob_grob (get_property ("currentCommandColumn")));
+                            Grob::unsmob (get_property ("currentCommandColumn")));
 
   Pointer_group_interface::set_ordered (text_spanner_,
                                         ly_symbol2scm ("elements"),
index d2188194324919fc86152be284bf2dde657c397a..0887ac3d9af71a7f60577bb23667d8a98e76318e 100644 (file)
@@ -24,7 +24,7 @@ LY_DEFINE (ly_item_p, "ly:item?",
            1, 0, 0, (SCM g),
            "Is @var{g} an @code{Item} object?")
 {
-  Grob *me = unsmob_grob (g);
+  Grob *me = Grob::unsmob (g);
   bool b = dynamic_cast<Item *> (me);
   return ly_bool2scm (b);
 }
@@ -35,7 +35,7 @@ LY_DEFINE (ly_item_break_dir, "ly:item-break-dir",
            " end of line, @code{0}@tie{}unbroken, and"
            " @code{1}@tie{}beginning of line.")
 {
-  LY_ASSERT_TYPE (unsmob_item, it, 1);
-  Item *me = unsmob_item (it);
+  LY_ASSERT_TYPE (Item::unsmob, it, 1);
+  Item *me = Item::unsmob (it);
   return scm_from_int (me->break_status_dir ());
 }
index e71bc4190b4f5f3fe8aa3d8026bdf5eb4520f29f..f007670e7ae8974fa184b612f997bb1a83bec344 100644 (file)
@@ -224,9 +224,9 @@ Item::derived_mark () const
 }
 
 Item *
-unsmob_item (SCM s)
+Item::unsmob (SCM s)
 {
-  return dynamic_cast<Item *> (unsmob_grob (s));
+  return dynamic_cast<Item *> (Grob::unsmob (s));
 }
 
 Interval
index 008a024e5afaf8364d00537395bea1c27a10a421..78a10050cd24ff55544f52c65618084d166aa0ba 100644 (file)
@@ -52,7 +52,7 @@ Keep_alive_together_engraver::finalize ()
   for (vsize i = 0; i < group_spanners_.size (); ++i)
     {
       SCM grob_array_scm = Grob_array::make_array ();
-      Grob_array *ga = unsmob_grob_array (grob_array_scm);
+      Grob_array *ga = Grob_array::unsmob (grob_array_scm);
 
       // It would make Hara_kiri_group_spanner::request_suicide a _little_
       // faster if we removed each grob from its own array. It seems
index 9181071aeefad9c7231e832d7544e74f780d7671..e345e9d132308b768584cea3daf40919f5439a00 100644 (file)
@@ -42,7 +42,7 @@ MAKE_SCHEME_CALLBACK (Key_signature_interface, print, 1);
 SCM
 Key_signature_interface::print (SCM smob)
 {
-  Item *me = dynamic_cast<Item *> (unsmob_grob (smob));
+  Item *me = dynamic_cast<Item *> (Grob::unsmob (smob));
 
   Real inter = Staff_symbol_referencer::staff_space (me) / 2.0;
 
index 85d6d8dc0fb66dcf0eb85d9cb4603908c24e0eef..543753820430a28dfb8acc74deead1e0a8edca21 100644 (file)
@@ -81,7 +81,7 @@ Kievan_ligature_engraver::fold_up_primitives (vector<Grob_info> const &primitive
          first = current;
 
       // must keep track of accidentals in spacing problem
-      Grob *acc_gr = unsmob_grob (current->get_object ("accidental-grob"));
+      Grob *acc_gr = Grob::unsmob (current->get_object ("accidental-grob"));
       if (acc_gr && i > 0)
         {
            Interval acc_ext = acc_gr->extent (acc_gr, X_AXIS);
@@ -107,7 +107,7 @@ Kievan_ligature_engraver::fold_up_primitives (vector<Grob_info> const &primitive
       if (i < primitives.size () - 1)
         {
            Item *next = dynamic_cast<Item *> (primitives[i + 1].grob ());
-           Grob *acc_gr = unsmob_grob (next->get_object ("accidental-grob"));
+           Grob *acc_gr = Grob::unsmob (next->get_object ("accidental-grob"));
            if (acc_gr)
              {
                 Interval acc_ext = acc_gr->extent (acc_gr, X_AXIS);
index f707964eb77970613deddc46a4014c2b36387e6d..ba38cdae1e0c2c7a409c6b8e238f0fc1a9b58f89 100644 (file)
@@ -67,13 +67,13 @@ Laissez_vibrer_engraver::acknowledge_note_head (Grob_info inf)
    * a single note head (attached as an articulation inside a chord) */
   Stream_event *tie_ev = event_;
   Grob *head = inf.grob ();
-  Stream_event *note_ev = unsmob_stream_event (head->get_property ("cause"));
+  Stream_event *note_ev = Stream_event::unsmob (head->get_property ("cause"));
   if (!tie_ev && note_ev && note_ev->in_event_class ("note-event"))
     {
       SCM articulations = note_ev->get_property ("articulations");
       for (SCM s = articulations; !tie_ev && scm_is_pair (s); s = scm_cdr (s))
         {
-          Stream_event *ev = unsmob_stream_event (scm_car (s));
+          Stream_event *ev = Stream_event::unsmob (scm_car (s));
           if (ev && ev->in_event_class ("laissez-vibrer-event"))
             tie_ev = ev;
         }
@@ -93,9 +93,9 @@ Laissez_vibrer_engraver::acknowledge_note_head (Grob_info inf)
   Pointer_group_interface::add_grob (lv_column_, ly_symbol2scm ("ties"),
                                      lv_tie);
 
-  if (is_direction (unsmob_stream_event (cause)->get_property ("direction")))
+  if (is_direction (Stream_event::unsmob (cause)->get_property ("direction")))
     {
-      Direction d = to_dir (unsmob_stream_event (cause)->get_property ("direction"));
+      Direction d = to_dir (Stream_event::unsmob (cause)->get_property ("direction"));
       lv_tie->set_property ("direction", scm_from_int (d));
     }
 
index a596721f612ba4e826f839ae8109272f55766415..1bb85695baaa4de59749818258d3a081f89b9b96 100644 (file)
@@ -53,7 +53,7 @@ Ledger_line_engraver::start_spanner ()
   assert (!span_);
 
   span_ = make_spanner ("LedgerLineSpanner", SCM_EOL);
-  span_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn")));
+  span_->set_bound (LEFT, Grob::unsmob (get_property ("currentCommandColumn")));
 }
 
 void
@@ -94,7 +94,7 @@ Ledger_line_engraver::stop_spanner ()
 {
   if (span_)
     {
-      span_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn")));
+      span_->set_bound (RIGHT, Grob::unsmob (get_property ("currentCommandColumn")));
       span_ = 0;
     }
 }
index 7a45bef2de731d78fba6ef3b064feaae62d29876..f4bf36ef48cf8e64f574d5ad9d19fccb190a1fe1 100644 (file)
@@ -66,7 +66,7 @@ MAKE_SCHEME_CALLBACK (Ledger_line_spanner, set_spacing_rods, 1);
 SCM
 Ledger_line_spanner::set_spacing_rods (SCM smob)
 {
-  Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (smob));
+  Spanner *me = dynamic_cast<Spanner *> (Grob::unsmob (smob));
 
   // find size of note heads.
   Grob *staff = Staff_symbol_referencer::get_staff_symbol (me);
@@ -164,7 +164,7 @@ MAKE_SCHEME_CALLBACK (Ledger_line_spanner, print, 1);
 SCM
 Ledger_line_spanner::print (SCM smob)
 {
-  Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (smob));
+  Spanner *me = dynamic_cast<Spanner *> (Grob::unsmob (smob));
 
   extract_grob_set (me, "note-heads", heads);
 
@@ -193,7 +193,7 @@ Ledger_line_spanner::print (SCM smob)
       Axis a = Axis (i);
       common[a] = common_refpoint_of_array (heads, me, a);
       for (vsize i = heads.size (); i--;)
-        if (Grob *g = unsmob_grob (me->get_object ("accidental-grob")))
+        if (Grob *g = Grob::unsmob (me->get_object ("accidental-grob")))
           common[a] = common[a]->common_refpoint (g, a);
     }
 
@@ -287,7 +287,7 @@ Ledger_line_spanner::print (SCM smob)
               Interval x_extent = ledger_size;
 
               if (i == 0)
-                if (Grob *g = unsmob_grob (h->get_object ("accidental-grob")))
+                if (Grob *g = Grob::unsmob (h->get_object ("accidental-grob")))
                   {
                     Interval accidental_size = g->extent (common[X_AXIS], X_AXIS);
                     Real d
index 66da12433604f8a484564883fc057ae0bda8ffb8..8b0859630ec04dcd0ea9c0a5fd1b3a1d0ad61843 100644 (file)
@@ -827,7 +827,7 @@ Lily_lexer::pop_extra_token ()
                return -1;
 
   /* produce requested token */
-       yylloc = *unsmob_input (scm_caar (extra_tokens_));
+       yylloc = *Input::unsmob (scm_caar (extra_tokens_));
        int type = scm_to_int (scm_cadar (extra_tokens_));
        yylval = scm_cddar (extra_tokens_);
        extra_tokens_ = scm_cdr (extra_tokens_);
@@ -914,7 +914,7 @@ Lily_lexer::scan_escaped_word (const string &str)
                return i;
 
        SCM sid = lookup_identifier (str);
-       if (Music *m = unsmob_music (sid))
+       if (Music *m = Music::unsmob (sid))
        {
                m->set_spot (override_input (here_input ()));
        }
@@ -934,7 +934,7 @@ int
 Lily_lexer::scan_shorthand (const string &str)
 {
        SCM sid = lookup_identifier (str);
-       if (Music *m = unsmob_music (sid))
+       if (Music *m = Music::unsmob (sid))
        {
                m->set_spot (override_input (here_input ()));
        }
@@ -1014,7 +1014,7 @@ Lily_lexer::scan_bare_word (const string &str)
                
                if (scm_is_pair (handle)) {
                        yylval = scm_cdr (handle);
-                       if (unsmob_pitch (yylval))
+                       if (Pitch::unsmob (yylval))
                            return (YYSTATE == notes) ? NOTENAME_PITCH : TONICNAME_PITCH;
                        else if (scm_is_symbol (yylval))
                            return DRUM_PITCH;
@@ -1096,9 +1096,9 @@ Lily_lexer::eval_scm (SCM readerdata, Input hi, char extra_token)
                             p = scm_cdr (p))
                        {
                                SCM v = scm_car (p);
-                               if (Music *m = unsmob_music (v))
+                               if (Music *m = Music::unsmob (v))
                                {
-                                       if (!unsmob_input (m->get_property ("origin")))
+                                       if (!Input::unsmob (m->get_property ("origin")))
                                                m->set_spot (override_input (here_input ()));
                                }
                                        
@@ -1121,9 +1121,9 @@ Lily_lexer::eval_scm (SCM readerdata, Input hi, char extra_token)
                        sval = SCM_UNSPECIFIED;
        }
 
-       if (Music *m = unsmob_music (sval))
+       if (Music *m = Music::unsmob (sval))
        {
-               if (!unsmob_input (m->get_property ("origin")))
+               if (!Input::unsmob (m->get_property ("origin")))
                        m->set_spot (override_input (here_input ()));
        }
 
index 8bd4d66137b4907c832bd0981ce739f507d81ed3..3ebe65f77cefe285ec5fdb746caeb160200b4af9 100644 (file)
@@ -121,7 +121,7 @@ Ligature_engraver::process_music ()
       primitives_.clear ();
       ligature_ = 0;
     }
-  last_bound_ = unsmob_grob (get_property ("currentMusicalColumn"));
+  last_bound_ = Grob::unsmob (get_property ("currentMusicalColumn"));
 
   if (ligature_)
     {
@@ -140,7 +140,7 @@ Ligature_engraver::process_music ()
       prev_start_event_ = events_drul_[START];
       ligature_ = create_ligature_spanner ();
 
-      Grob *bound = unsmob_grob (get_property ("currentMusicalColumn"));
+      Grob *bound = Grob::unsmob (get_property ("currentMusicalColumn"));
       if (!bound)
         events_drul_[START]->origin ()->warning (_ ("no left bound"));
       else
index d2d57fdbd7e43b7fcb5fea803b833e17e9b90076..857aa6463fa93b97c5e74b69ed5e7f3bd6702c0d 100644 (file)
@@ -123,8 +123,8 @@ Lily_lexer::Lily_lexer (Lily_lexer const &src, Lily_parser *parser,
   main_input_level_ = 0;
 
   extra_tokens_ = SCM_EOL;
-  if (unsmob_input (override_input))
-    override_input_ = *unsmob_input (override_input);
+  if (Input::unsmob (override_input))
+    override_input_ = *Input::unsmob (override_input);
 
   smobify_self ();
 
index 0da04c9296003f6df730bca8c54cc00d8361d368..5fdff0fef918d9477ddca708cbbbd5d01f68d088 100644 (file)
@@ -141,7 +141,7 @@ LY_DEFINE (ly_parser_lexer, "ly:parser-lexer",
            1, 0, 0, (SCM parser_smob),
            "Return the lexer for @var{parser-smob}.")
 {
-  Lily_parser *parser = unsmob_lily_parser (parser_smob);
+  Lily_parser *parser = Lily_parser::unsmob (parser_smob);
   return parser->lexer_->self_scm ();
 }
 
@@ -154,7 +154,7 @@ LY_DEFINE (ly_parser_clone, "ly:parser-clone",
            " it becomes the source of all music expressions inside.")
 {
   LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
-  Lily_parser *parser = unsmob_lily_parser (parser_smob);
+  Lily_parser *parser = Lily_parser::unsmob (parser_smob);
   if (SCM_UNBNDP (closures))
     closures = SCM_EOL;
   else
@@ -170,7 +170,7 @@ LY_DEFINE (ly_parser_define_x, "ly:parser-define!",
 {
 
   LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
-  Lily_parser *parser = unsmob_lily_parser (parser_smob);
+  Lily_parser *parser = Lily_parser::unsmob (parser_smob);
 
   LY_ASSERT_TYPE (ly_is_symbol, symbol, 2);
 
@@ -185,7 +185,7 @@ LY_DEFINE (ly_parser_lookup, "ly:parser-lookup",
 {
   LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
 
-  Lily_parser *parser = unsmob_lily_parser (parser_smob);
+  Lily_parser *parser = Lily_parser::unsmob (parser_smob);
 
   LY_ASSERT_TYPE (ly_is_symbol, symbol, 2);
 
@@ -202,7 +202,7 @@ LY_DEFINE (ly_parser_parse_string, "ly:parser-parse-string",
            "  Upon failure, throw @code{ly-file-failed} key.")
 {
   LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
-  Lily_parser *parser = unsmob_lily_parser (parser_smob);
+  Lily_parser *parser = Lily_parser::unsmob (parser_smob);
   LY_ASSERT_TYPE (scm_is_string, ly_code, 2);
 
   if (!parser->lexer_->is_clean ())
@@ -222,7 +222,7 @@ LY_DEFINE (ly_parse_string_expression, "ly:parse-string-expression",
            " @var{filename} and @var{line} are optional source indicators.")
 {
   LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
-  Lily_parser *parser = unsmob_lily_parser (parser_smob);
+  Lily_parser *parser = Lily_parser::unsmob (parser_smob);
   LY_ASSERT_TYPE (scm_is_string, ly_code, 2);
   string fn;
   if (SCM_UNBNDP (filename) || !scm_is_string (filename))
@@ -253,7 +253,7 @@ LY_DEFINE (ly_parser_include_string, "ly:parser-include-string",
            " Scheme expressions (@code{$} instead of @code{#}).")
 {
   LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
-  Lily_parser *parser = unsmob_lily_parser (parser_smob);
+  Lily_parser *parser = Lily_parser::unsmob (parser_smob);
   LY_ASSERT_TYPE (scm_is_string, ly_code, 2);
 
   parser->include_string (ly_scm2string (ly_code));
@@ -268,7 +268,7 @@ LY_DEFINE (ly_parser_set_note_names, "ly:parser-set-note-names",
            " if the current mode is notes.")
 {
   LY_ASSERT_SMOB (Lily_parser, parser, 1);
-  Lily_parser *p = unsmob_lily_parser (parser);
+  Lily_parser *p = Lily_parser::unsmob (parser);
 
   if (p->lexer_->is_note_state ())
     {
@@ -284,7 +284,7 @@ LY_DEFINE (ly_parser_output_name, "ly:parser-output-name",
            "Return the base name of the output file.")
 {
   LY_ASSERT_SMOB (Lily_parser, parser, 1);
-  Lily_parser *p = unsmob_lily_parser (parser);
+  Lily_parser *p = Lily_parser::unsmob (parser);
 
   return ly_string2scm (p->output_basename_);
 }
@@ -294,12 +294,12 @@ LY_DEFINE (ly_parser_error, "ly:parser-error",
            "Display an error message and make the parser fail.")
 {
   LY_ASSERT_SMOB (Lily_parser, parser, 1);
-  Lily_parser *p = unsmob_lily_parser (parser);
+  Lily_parser *p = Lily_parser::unsmob (parser);
 
   LY_ASSERT_TYPE (scm_is_string, msg, 2);
   string s = ly_scm2string (msg);
 
-  Input *i = unsmob_input (input);
+  Input *i = Input::unsmob (input);
   if (i)
     p->parser_error (*i, s);
   else
@@ -313,7 +313,7 @@ LY_DEFINE (ly_parser_clear_error, "ly:parser-clear-error",
            "Clear the error flag for the parser.")
 {
   LY_ASSERT_SMOB (Lily_parser, parser, 1);
-  Lily_parser *p = unsmob_lily_parser (parser);
+  Lily_parser *p = Lily_parser::unsmob (parser);
 
   p->error_level_ = 0;
   p->lexer_->error_level_ = 0;
@@ -326,7 +326,7 @@ LY_DEFINE (ly_parser_has_error_p, "ly:parser-has-error?",
            "Does @var{parser} have an error flag?")
 {
   LY_ASSERT_SMOB (Lily_parser, parser, 1);
-  Lily_parser *p = unsmob_lily_parser (parser);
+  Lily_parser *p = Lily_parser::unsmob (parser);
 
   return scm_from_bool (p->error_level_ || p->lexer_->error_level_);
 }
index a82ec94bed4c79034caf28e128fa8dcfc309c56a..1cdd8d042969ca195d39bc95d265892c491afb86 100644 (file)
@@ -223,7 +223,7 @@ Output_def *
 get_layout (Lily_parser *parser)
 {
   SCM id = parser->lexer_->lookup_identifier ("$defaultlayout");
-  Output_def *layout = unsmob_output_def (id);
+  Output_def *layout = Output_def::unsmob (id);
   layout = layout ? layout->clone () : new Output_def;
   layout->set_variable (ly_symbol2scm ("is-layout"), SCM_BOOL_T);
 
@@ -234,7 +234,7 @@ Output_def *
 get_midi (Lily_parser *parser)
 {
   SCM id = parser->lexer_->lookup_identifier ("$defaultmidi");
-  Output_def *layout = unsmob_output_def (id);
+  Output_def *layout = Output_def::unsmob (id);
   layout = layout ? layout->clone () : new Output_def;
   layout->set_variable (ly_symbol2scm ("is-midi"), SCM_BOOL_T);
   return layout;
@@ -247,9 +247,9 @@ get_paper (Lily_parser *parser)
 {
   SCM papers = parser->lexer_->lookup_identifier ("$papers");
   Output_def *layout = ((papers == SCM_UNDEFINED) || scm_is_null (papers))
-                       ? 0 : unsmob_output_def (scm_car (papers));
+                       ? 0 : Output_def::unsmob (scm_car (papers));
   SCM default_paper = parser->lexer_->lookup_identifier ("$defaultpaper");
-  layout = layout ? layout : unsmob_output_def (default_paper);
+  layout = layout ? layout : Output_def::unsmob (default_paper);
 
   layout = layout ? dynamic_cast<Output_def *> (layout->clone ()) : new Output_def;
   layout->set_variable (ly_symbol2scm ("is-paper"), SCM_BOOL_T);
index 2c7cfdda1d5d12fd92a29cccfefd8b751b559498..ddc4d7d178440b37faf8211d840b1aba174fe39d 100644 (file)
@@ -56,7 +56,7 @@ Spanner *parent_spanner (Grob *g)
 SCM
 Line_spanner::calc_bound_info (SCM smob, Direction dir)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
 
   Grob *commonx = me->get_bound (LEFT)->common_refpoint (me->get_bound (RIGHT), X_AXIS);
   commonx = me->common_refpoint (commonx, X_AXIS);
@@ -114,7 +114,7 @@ Line_spanner::calc_bound_info (SCM smob, Direction dir)
                       ? Axis_group_interface::generic_bound_extent (bound_grob, commonx, X_AXIS)
                       : robust_relative_extent (bound_grob, commonx, X_AXIS)).linear_combination (attach);
 
-      Grob *acc = unsmob_grob (bound_grob->get_object ("accidental-grob"));
+      Grob *acc = Grob::unsmob (bound_grob->get_object ("accidental-grob"));
       if (acc && to_boolean (ly_assoc_get (ly_symbol2scm ("end-on-accidental"), details, SCM_BOOL_F)))
         x_coord = robust_relative_extent (acc, commonx, X_AXIS).linear_combination (attach);
 
@@ -206,7 +206,7 @@ MAKE_SCHEME_CALLBACK (Line_spanner, calc_cross_staff, 1);
 SCM
 Line_spanner::calc_cross_staff (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
   if (!me)
     return SCM_BOOL_F;
 
@@ -237,7 +237,7 @@ SCM
 Line_spanner::calc_left_bound_info_and_text (SCM smob)
 {
   SCM alist = Line_spanner::calc_bound_info (smob, LEFT);
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
 
   SCM text = me->get_property ("text");
   if (Text_interface::is_markup (text)
@@ -259,7 +259,7 @@ MAKE_SCHEME_CALLBACK (Line_spanner, print, 1);
 SCM
 Line_spanner::print (SCM smob)
 {
-  Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (smob));
+  Spanner *me = dynamic_cast<Spanner *> (Grob::unsmob (smob));
 
   // Triggers simple-Y calculations
   bool simple_y = to_boolean (me->get_property ("simple-Y")) && !to_boolean (me->get_property ("cross-staff"));
@@ -297,9 +297,9 @@ Line_spanner::print (SCM smob)
                                                  bounds[d], SCM_BOOL_F), 0.0);
       arrows[d] = to_boolean (ly_assoc_get (ly_symbol2scm ("arrow"),
                                             bounds[d], SCM_BOOL_F));
-      stencils[d] = unsmob_stencil (ly_assoc_get (ly_symbol2scm ("stencil"),
+      stencils[d] = Stencil::unsmob (ly_assoc_get (ly_symbol2scm ("stencil"),
                                                   bounds[d], SCM_BOOL_F));
-      common_y[d] = unsmob_grob (ly_assoc_get (ly_symbol2scm ("common-Y"),
+      common_y[d] = Grob::unsmob (ly_assoc_get (ly_symbol2scm ("common-Y"),
                                                bounds[d], SCM_BOOL_F));
       if (!common_y[d])
         common_y[d] = me;
index c785ff3d72d502302f4f6ba98fbaaa91fbf6d018..cb966adc9a9c20e5b4117b7412c7340ec0b2073a 100644 (file)
@@ -63,8 +63,8 @@ Listener::print_smob (SCM, SCM p, scm_print_state *)
 SCM
 Listener::equal_p (SCM a, SCM b)
 {
-  Listener *l1 = unsmob_listener (a);
-  Listener *l2 = unsmob_listener (b);
+  Listener *l1 = Listener::unsmob (a);
+  Listener *l2 = Listener::unsmob (b);
 
   return (*l1 == *l2) ? SCM_BOOL_T : SCM_BOOL_F;
 }
index f81cb0a5351e96cbccfa3dbd2091a2f40d9250df..dfc616e0d5f00b8ab6fe91d06600e4ee6ddfd5c7 100644 (file)
@@ -94,7 +94,7 @@ IMPLEMENT_LISTENER (Lyric_combine_music_iterator, set_busy)
 void
 Lyric_combine_music_iterator::set_busy (SCM se)
 {
-  Stream_event *e = unsmob_stream_event (se);
+  Stream_event *e = Stream_event::unsmob (se);
 
   if ((e->in_event_class ("note-event") || e->in_event_class ("cluster-note-event"))
       && music_context_)
@@ -187,8 +187,8 @@ Lyric_combine_music_iterator::derived_substitute (Context *f, Context *t)
 void
 Lyric_combine_music_iterator::construct_children ()
 {
-  Music *m = unsmob_music (get_music ()->get_property ("element"));
-  lyric_iter_ = unsmob_iterator (get_iterator (m));
+  Music *m = Music::unsmob (get_music ()->get_property ("element"));
+  lyric_iter_ = Music_iterator::unsmob (get_iterator (m));
   if (!lyric_iter_)
     return;
   lyrics_context_ = find_context_below (lyric_iter_->get_outlet (),
index ec254e755a1b6bc5e7d3902baaf23acd005ec93e..de6e2d0493037e718e8274f738860878a0633806 100644 (file)
@@ -29,7 +29,7 @@ MAKE_SCHEME_CALLBACK (Lyric_combine_music, length_callback, 1);
 SCM
 Lyric_combine_music::length_callback (SCM m)
 {
-  Music *me = unsmob_music (m);
-  Music *melody = unsmob_music (scm_car (me->get_property ("elements")));
+  Music *me = Music::unsmob (m);
+  Music *melody = Music::unsmob (scm_car (me->get_property ("elements")));
   return melody->get_length ().smobbed_copy ();
 }
index bbe15845a61a77379c070b6839637d69c4c1a507..afcfdf90153be10d9ab954ca2263c1306320115e 100644 (file)
@@ -95,7 +95,7 @@ get_voice_to_lyrics (Context *lyrics)
   bool searchForVoice = to_boolean (lyrics->get_property ("searchForVoice"));
 
   SCM avc = lyrics->get_property ("associatedVoiceContext");
-  if (Context *c = unsmob_context (avc))
+  if (Context *c = Context::unsmob (avc))
     return c;
 
   SCM voice_name = lyrics->get_property ("associatedVoice");
@@ -141,8 +141,8 @@ get_current_note_head (Context *voice, bool include_grace_notes)
   for (SCM s = voice->get_property ("busyGrobs");
        scm_is_pair (s); s = scm_cdr (s))
     {
-      Grob *g = unsmob_grob (scm_cdar (s));;
-      Moment *end_mom = unsmob_moment (scm_caar (s));
+      Grob *g = Grob::unsmob (scm_cdar (s));;
+      Moment *end_mom = Moment::unsmob (scm_caar (s));
       if (!end_mom || !g)
         {
           programming_error ("busyGrobs invalid");
index 1ed47703f88eb3a3625081cd0a71171a923fbbed..9d4c443637d8fd79c9703ae261986d4becc84dce 100644 (file)
@@ -32,9 +32,9 @@ MAKE_SCHEME_CALLBACK (Lyric_extender, print, 1);
 SCM
 Lyric_extender::print (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
   Item *left_edge = me->get_bound (LEFT);
-  Item *right_text = unsmob_item (me->get_object ("next"));
+  Item *right_text = Item::unsmob (me->get_object ("next"));
 
   Grob *common = left_edge;
 
index 33c4d8d3fe0479c4dff5c44f7592d66d63061ed3..584a0e74251dfc2f05dbca88b82afb7cbadf0510 100644 (file)
@@ -35,7 +35,7 @@ MAKE_SCHEME_CALLBACK (Lyric_hyphen, print, 1);
 SCM
 Lyric_hyphen::print (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
   Drul_array<Item *> bounds (me->get_bound (LEFT),
                              me->get_bound (RIGHT));
 
@@ -115,7 +115,7 @@ MAKE_SCHEME_CALLBACK (Lyric_hyphen, set_spacing_rods, 1);
 SCM
 Lyric_hyphen::set_spacing_rods (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   Rod r;
   Spanner *sp = dynamic_cast<Spanner *> (me);
index 758ce5f17428aabc024ab974aa3739786848bdad..003e8b418b54832b1b52ed08d00a3b1a43b4dcc4 100644 (file)
@@ -44,7 +44,7 @@ Measure_grouping_engraver::finalize ()
 {
   if (grouping_)
     {
-      grouping_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn")));
+      grouping_->set_bound (RIGHT, Grob::unsmob (get_property ("currentCommandColumn")));
       grouping_->suicide ();
       grouping_ = 0;
     }
@@ -64,7 +64,7 @@ Measure_grouping_engraver::process_music ()
   if (grouping_ && now.main_part_ >= stop_grouping_mom_ && !now.grace_part_)
     {
       grouping_->set_bound (RIGHT,
-                            unsmob_grob (get_property ("currentMusicalColumn")));
+                            Grob::unsmob (get_property ("currentMusicalColumn")));
 
       grouping_ = 0;
     }
@@ -75,10 +75,10 @@ Measure_grouping_engraver::process_music ()
   SCM grouping = get_property ("beatStructure");
   if (scm_is_pair (grouping))
     {
-      Moment *measpos = unsmob_moment (get_property ("measurePosition"));
+      Moment *measpos = Moment::unsmob (get_property ("measurePosition"));
       Rational mp = measpos->main_part_;
 
-      Moment *base_mom = unsmob_moment (get_property ("baseMoment"));
+      Moment *base_mom = Moment::unsmob (get_property ("baseMoment"));
       Rational base_moment = base_mom->main_part_;
 
       Rational where (0);
@@ -97,7 +97,7 @@ Measure_grouping_engraver::process_music ()
               if (grouplen > 1)
                 {
                   grouping_ = make_spanner ("MeasureGrouping", SCM_EOL);
-                  grouping_->set_bound (LEFT, unsmob_grob (get_property ("currentMusicalColumn")));
+                  grouping_->set_bound (LEFT, Grob::unsmob (get_property ("currentMusicalColumn")));
 
                   stop_grouping_mom_ = now.main_part_ + Rational (grouplen - 1) * base_moment;
                   get_global_context ()->add_moment_to_process (Moment (stop_grouping_mom_));
index ca982760e214fa2de69943c584fa94beeb787f2c..2c2299ccc2fe2083807e9f84164a714813f1f683 100644 (file)
@@ -29,7 +29,7 @@ MAKE_SCHEME_CALLBACK (Measure_grouping, print, 1);
 SCM
 Measure_grouping::print (SCM grob)
 {
-  Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (grob));
+  Spanner *me = dynamic_cast<Spanner *> (Grob::unsmob (grob));
 
   SCM which = me->get_property ("style");
   Real height = robust_scm2double (me->get_property ("height"), 1);
index 7ee731a9bc43debfe44172cd014e689083cdf0c0..9c81cade5d393322cc78359ae4d3f32b37937f1d 100644 (file)
@@ -34,8 +34,8 @@ MAKE_SCHEME_CALLBACK (Melody_spanner, calc_neutral_stem_direction, 1);
 SCM
 Melody_spanner::calc_neutral_stem_direction (SCM smob)
 {
-  Grob *stem = unsmob_grob (smob);
-  Grob *me = unsmob_grob (stem->get_object ("melody-spanner"));
+  Grob *stem = Grob::unsmob (smob);
+  Grob *me = Grob::unsmob (stem->get_object ("melody-spanner"));
   if (!me || !me->is_live ())
     return scm_from_int (DOWN);
 
index ab7e7d81d633fd1bc462b50edeaef15dbbc41f30..73009a3c0d4088574b48f408bb7c59f0af346485 100644 (file)
@@ -129,7 +129,7 @@ Mensural_ligature_engraver::transform_heads (vector<Grob_info> const &primitives
           continue;
         }
 
-      int pitch = unsmob_pitch (nr->get_property ("pitch"))->steps ();
+      int pitch = Pitch::unsmob (nr->get_property ("pitch"))->steps ();
       int prim = 0;
 
       if (at_beginning)
@@ -182,7 +182,7 @@ Mensural_ligature_engraver::transform_heads (vector<Grob_info> const &primitives
             }
           // b. descendens longa or brevis
           else if (i < s - 1
-                   && (unsmob_pitch (primitives[i + 1].event_cause ()
+                   && (Pitch::unsmob (primitives[i + 1].event_cause ()
                                      ->get_property ("pitch"))->steps () < pitch)
                    && duration_log > -3)
             {
@@ -275,7 +275,7 @@ Mensural_ligature_engraver::transform_heads (vector<Grob_info> const &primitives
                   /*
                     breve: check whether descending
                   */
-                  int const next_pitch = unsmob_pitch
+                  int const next_pitch = Pitch::unsmob
                                          (next_info.event_cause ()->get_property ("pitch"))->steps ();
                   if (next_pitch < pitch)
                     /*
index 2c1059eb87b9995ae7829e1f1236ab3d082d88e5..92a1c9d36c42a55614cdd5586a0d123aa2536abe 100644 (file)
@@ -270,7 +270,7 @@ MAKE_SCHEME_CALLBACK (Mensural_ligature, brew_ligature_primitive, 1);
 SCM
 Mensural_ligature::brew_ligature_primitive (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   return internal_brew_primitive (me).smobbed_copy ();
 }
 
index 7c0856e654708849732c3cf4d453cacf9a2b26ca..1b2d4226c52b9073cf47287d9fefe42133f3751a 100644 (file)
@@ -139,9 +139,9 @@ Metronome_mark_engraver::stop_translation_timestep ()
             first notational element of the measure if no time
             signature is present in that measure).
           */
-          if (Grob *mc = unsmob_grob (get_property ("currentMusicalColumn")))
+          if (Grob *mc = Grob::unsmob (get_property ("currentMusicalColumn")))
             text_->set_parent (mc, X_AXIS);
-          else if (Grob *cc = unsmob_grob (get_property ("currentCommandColumn")))
+          else if (Grob *cc = Grob::unsmob (get_property ("currentCommandColumn")))
             text_->set_parent (cc, X_AXIS);
         }
       text_->set_object ("side-support-elements",
index 36f21637763e5bf94686a6abcdc1c52157831156..f1bd36f71af2aa58339180f5cdf35d43fe72f5b3 100644 (file)
@@ -75,7 +75,7 @@ IMPLEMENT_LISTENER (Midi_control_function_performer,
 void
 Midi_control_function_performer::announce_function_value_change (SCM sev)
 {
-  Stream_event *ev = unsmob_stream_event (sev);
+  Stream_event *ev = Stream_event::unsmob (sev);
   SCM sym = ev->get_property ("symbol");
   if (!scm_is_symbol (sym))
     return;
@@ -125,6 +125,7 @@ ADD_TRANSLATOR (Midi_control_function_performer,
                 /* read */
                 "midiBalance "
                 "midiPanPosition "
+                "midiExpression "
                 "midiReverbLevel "
                 "midiChorusLevel ",
 
index 4909217c4319c108cca8aba6b22ea9533e5c9b37..514436c79c6a2763533713850a2e91d2ac219516 100644 (file)
@@ -393,6 +393,7 @@ Midi_control_function_value_change::to_string () const
 
       {  8, 40 }, // balance
       { 10, 42 }, // pan position
+      { 11, 43 }, // expression
       { 91, -1 }, // reverb level (only coarse resolution available)
       { 93, -1 }  // chorus level (only coarse resolution available)
     };
index c0422b43609ed9caff5f88bdab51745b7154c9c9..ef0248338534bfecbbddee341f209c6fe562954d 100644 (file)
@@ -78,8 +78,8 @@ LY_DEFINE (ly_moment_sub, "ly:moment-sub",
   LY_ASSERT_SMOB (Moment, a, 1);
   LY_ASSERT_SMOB (Moment, b, 2);
 
-  Moment *ma = unsmob_moment (a);
-  Moment *mb = unsmob_moment (b);
+  Moment *ma = Moment::unsmob (a);
+  Moment *mb = Moment::unsmob (b);
 
   return (*ma - *mb).smobbed_copy ();
 }
@@ -91,8 +91,8 @@ LY_DEFINE (ly_moment_add, "ly:moment-add",
   LY_ASSERT_SMOB (Moment, a, 1);
   LY_ASSERT_SMOB (Moment, b, 2);
 
-  Moment *ma = unsmob_moment (a);
-  Moment *mb = unsmob_moment (b);
+  Moment *ma = Moment::unsmob (a);
+  Moment *mb = Moment::unsmob (b);
 
   return (*ma + *mb).smobbed_copy ();
 }
@@ -104,8 +104,8 @@ LY_DEFINE (ly_moment_mul, "ly:moment-mul",
   LY_ASSERT_SMOB (Moment, a, 1);
   LY_ASSERT_SMOB (Moment, b, 2);
 
-  Moment *ma = unsmob_moment (a);
-  Moment *mb = unsmob_moment (b);
+  Moment *ma = Moment::unsmob (a);
+  Moment *mb = Moment::unsmob (b);
   return (*ma * * mb).smobbed_copy ();
 }
 
@@ -116,8 +116,8 @@ LY_DEFINE (ly_moment_div, "ly:moment-div",
   LY_ASSERT_SMOB (Moment, a, 1);
   LY_ASSERT_SMOB (Moment, b, 2);
 
-  Moment *ma = unsmob_moment (a);
-  Moment *mb = unsmob_moment (b);
+  Moment *ma = Moment::unsmob (a);
+  Moment *mb = Moment::unsmob (b);
 
   return (*ma / * mb).smobbed_copy ();
 }
@@ -129,8 +129,8 @@ LY_DEFINE (ly_moment_mod, "ly:moment-mod",
   LY_ASSERT_SMOB (Moment, a, 1);
   LY_ASSERT_SMOB (Moment, b, 2);
 
-  Moment *ma = unsmob_moment (a);
-  Moment *mb = unsmob_moment (b);
+  Moment *ma = Moment::unsmob (a);
+  Moment *mb = Moment::unsmob (b);
   return (*ma % * mb).smobbed_copy ();
 }
 
@@ -140,7 +140,7 @@ LY_DEFINE (ly_moment_grace, "ly:moment-grace",
 {
   LY_ASSERT_SMOB (Moment, mom, 1);
 
-  return ly_rational2scm (unsmob_moment (mom)->grace_part_);
+  return ly_rational2scm (Moment::unsmob (mom)->grace_part_);
 }
 
 LY_DEFINE (ly_moment_grace_numerator, "ly:moment-grace-numerator",
@@ -149,7 +149,7 @@ LY_DEFINE (ly_moment_grace_numerator, "ly:moment-grace-numerator",
 {
   LY_ASSERT_SMOB (Moment, mom, 1);
 
-  Moment *ma = unsmob_moment (mom);
+  Moment *ma = Moment::unsmob (mom);
 
   return scm_from_int64 (ma->grace_part_.numerator ());
 }
@@ -159,7 +159,7 @@ LY_DEFINE (ly_moment_grace_denominator, "ly:moment-grace-denominator",
            "Extract denominator from grace timing.")
 {
   LY_ASSERT_SMOB (Moment, mom, 1);
-  Moment *ma = unsmob_moment (mom);
+  Moment *ma = Moment::unsmob (mom);
 
   return scm_from_int64 (ma->grace_part_.denominator ());
 }
@@ -170,7 +170,7 @@ LY_DEFINE (ly_moment_main, "ly:moment-main",
 {
   LY_ASSERT_SMOB (Moment, mom, 1);
 
-  return ly_rational2scm (unsmob_moment (mom)->main_part_);
+  return ly_rational2scm (Moment::unsmob (mom)->main_part_);
 }
 
 LY_DEFINE (ly_moment_main_numerator, "ly:moment-main-numerator",
@@ -178,7 +178,7 @@ LY_DEFINE (ly_moment_main_numerator, "ly:moment-main-numerator",
            "Extract numerator from main timing.")
 {
   LY_ASSERT_SMOB (Moment, mom, 1);
-  Moment *ma = unsmob_moment (mom);
+  Moment *ma = Moment::unsmob (mom);
 
   return scm_from_int64 (ma->main_part_.numerator ());
 }
@@ -188,7 +188,7 @@ LY_DEFINE (ly_moment_main_denominator, "ly:moment-main-denominator",
            "Extract denominator from main timing.")
 {
   LY_ASSERT_SMOB (Moment, mom, 1);
-  Moment *ma = unsmob_moment (mom);
+  Moment *ma = Moment::unsmob (mom);
 
   return scm_from_int64 (ma->main_part_.denominator ());
 }
@@ -200,8 +200,8 @@ LY_DEFINE (ly_moment_less_p, "ly:moment<?",
   LY_ASSERT_SMOB (Moment, a, 1);
   LY_ASSERT_SMOB (Moment, b, 2);
 
-  Moment *ma = unsmob_moment (a);
-  Moment *mb = unsmob_moment (b);
+  Moment *ma = Moment::unsmob (a);
+  Moment *mb = Moment::unsmob (b);
 
   return ly_bool2scm (*ma < *mb);
 }
index e1e3478c6ed71e607619cdb2bba6ce26074f2374..adcecff767140095dd22e5fbb5aa3d8a5453fdb5 100644 (file)
@@ -80,8 +80,8 @@ Moment::as_scheme () const
 SCM
 Moment::equal_p (SCM a, SCM b)
 {
-  Moment *m1 = unsmob_moment (a);
-  Moment *m2 = unsmob_moment (b);
+  Moment *m1 = Moment::unsmob (a);
+  Moment *m2 = Moment::unsmob (b);
 
   return (*m1 == *m2) ? SCM_BOOL_T : SCM_BOOL_F;
 }
@@ -195,7 +195,7 @@ operator << (ostream &os, Moment const &m)
 Moment
 robust_scm2moment (SCM m, Moment d)
 {
-  Moment *p = unsmob_moment (m);
+  Moment *p = Moment::unsmob (m);
   if (!p)
     return d;
   else
@@ -205,6 +205,6 @@ robust_scm2moment (SCM m, Moment d)
 bool
 moment_less (SCM a, SCM b)
 {
-  return *unsmob_moment (a) < *unsmob_moment (b);
+  return *Moment::unsmob (a) < *Moment::unsmob (b);
 }
 
index 3b968e654f87a2c5f3276d4426929e4140df9a9e..83cd3777a8b8173dae8f91462e223ad2cd10c017 100644 (file)
@@ -166,7 +166,7 @@ Multi_measure_rest_engraver::stop_translation_timestep ()
      -- jneem */
   if (bar_seen_)
     {
-      Grob *cmc = unsmob_grob (get_property ("currentCommandColumn"));
+      Grob *cmc = Grob::unsmob (get_property ("currentCommandColumn"));
 
       /* Ugh, this is a kludge - need this for multi-measure-rest-grace.ly  */
       last_command_item_ = dynamic_cast<Item *> (cmc);
index e4257886552785305d7caa1a6930054891bcbf72..8d653d0c167ccbab4b9167cc25495a08437d2041 100644 (file)
@@ -63,7 +63,7 @@ MAKE_SCHEME_CALLBACK (Multi_measure_rest, percent, 1);
 SCM
 Multi_measure_rest::percent (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Spanner *sp = dynamic_cast<Spanner *> (me);
 
   Stencil r = Percent_repeat_item_interface::x_percent (me, 1);
@@ -97,7 +97,7 @@ MAKE_SCHEME_CALLBACK (Multi_measure_rest, print, 1);
 SCM
 Multi_measure_rest::print (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Spanner *sp = dynamic_cast<Spanner *> (me);
 
   Interval sp_iv = bar_width (sp);
@@ -121,7 +121,7 @@ MAKE_SCHEME_CALLBACK (Multi_measure_rest, height, 1);
 SCM
 Multi_measure_rest::height (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   Real space = 1000000; // something very large...
 
@@ -191,7 +191,7 @@ calc_measure_duration_log (Grob *me, bool paranoid)
 {
   SCM sml = dynamic_cast<Spanner *> (me)->get_bound (LEFT)
             ->get_property ("measure-length");
-  Rational ml = (unsmob_moment (sml)) ? unsmob_moment (sml)->main_part_
+  Rational ml = (Moment::unsmob (sml)) ? Moment::unsmob (sml)->main_part_
                 : Rational (1);
   double measure_duration = ml.Rational::to_double ();
   bool force_round_up = to_boolean (scm_list_p (scm_member (scm_cons (scm_from_int64 (ml.numerator ()),
@@ -329,7 +329,7 @@ Multi_measure_rest::church_rest (Grob *me, Font_metric *musfont, int measure_cou
 
   Stencil mol;
   for (SCM s = mols; scm_is_pair (s); s = scm_cdr (s))
-    mol.add_at_edge (X_AXIS, LEFT, *unsmob_stencil (scm_car (s)),
+    mol.add_at_edge (X_AXIS, LEFT, *Stencil::unsmob (scm_car (s)),
                      inner_padding);
   mol.align_to (X_AXIS, LEFT);
   mol.translate_axis (outer_padding_factor * inner_padding, X_AXIS);
@@ -357,9 +357,9 @@ Multi_measure_rest::calculate_spacing_rods (Grob *me, Real length)
   Item *ri = sp->get_bound (RIGHT)->get_column ();
   Item *lb = li->find_prebroken_piece (RIGHT);
   Item *rb = ri->find_prebroken_piece (LEFT);
-  Grob *spacing = unsmob_grob (li->get_object ("spacing"));
+  Grob *spacing = Grob::unsmob (li->get_object ("spacing"));
   if (!spacing)
-    spacing = unsmob_grob (ri->get_object ("spacing"));
+    spacing = Grob::unsmob (ri->get_object ("spacing"));
   if (!spacing)
     me->warning (_ ("Using naive multi measure rest spacing."));
   else
@@ -404,7 +404,7 @@ MAKE_SCHEME_CALLBACK (Multi_measure_rest, set_spacing_rods, 1);
 SCM
 Multi_measure_rest::set_spacing_rods (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Real sym_width = symbol_stencil (me, 0.0).extent (X_AXIS).length ();
   calculate_spacing_rods (me, sym_width);
 
@@ -415,7 +415,7 @@ MAKE_SCHEME_CALLBACK (Multi_measure_rest, set_text_rods, 1);
 SCM
 Multi_measure_rest::set_text_rods (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Stencil *stil = me->get_stencil ();
 
   /* FIXME uncached */
index f6367db129620230d1d56be339a194a0a9f163d0..009583d8e3dbb9a45c8b0750b6f364c354528ac8 100644 (file)
@@ -91,7 +91,7 @@ Music_iterator::get_static_get_iterator (Music *m)
   if (ly_is_procedure (ctor))
     {
       iter = scm_call_0 (ctor);
-      p = unsmob_iterator (iter);
+      p = Music_iterator::unsmob (iter);
     }
   else
     {
@@ -152,7 +152,7 @@ SCM
 Music_iterator::get_iterator (Music *m) const
 {
   SCM ip = get_static_get_iterator (m);
-  Music_iterator *p = unsmob_iterator (ip);
+  Music_iterator *p = Music_iterator::unsmob (ip);
 
   p->init_context (m, get_outlet ());
 
@@ -223,7 +223,7 @@ Music_iterator::print_smob (SCM sm, SCM port, scm_print_state *)
 {
   char s[1000];
 
-  Music_iterator *iter = unsmob_iterator (sm);
+  Music_iterator *iter = Music_iterator::unsmob (sm);
   sprintf (s, "#<%s>", iter->class_name ());
   scm_puts (s, port);
   return 1;
index ffd3f35a0f0204e7dbff4434c7e68daa92bde73c..42b6b50950bb013697ef5ac9744a7f7aefff2115 100644 (file)
@@ -28,8 +28,8 @@ LY_DEFINE (ly_music_length, "ly:music-length",
            "Get the length of music expression @var{mus} and return"
            " it as a @code{Moment} object.")
 {
-  LY_ASSERT_TYPE (unsmob_music, mus, 1);
-  Music *sc = unsmob_music (mus);
+  LY_ASSERT_TYPE (Music::unsmob, mus, 1);
+  Music *sc = Music::unsmob (mus);
   return sc->get_length ().smobbed_copy ();
 }
 
@@ -39,7 +39,7 @@ LY_DEFINE (ly_music_property, "ly:music-property",
            " @var{mus}.  If no value is found, return @var{val} or"
            " @code{'()} if @var{val} is not specified.")
 {
-  LY_ASSERT_TYPE (unsmob_music, mus, 1);
+  LY_ASSERT_TYPE (Music::unsmob, mus, 1);
   return ly_prob_property (mus, sym, val);
 }
 
@@ -48,7 +48,7 @@ LY_DEFINE (ly_music_set_property_x, "ly:music-set-property!",
            "Set property @var{sym} in music expression @var{mus} to"
            " @var{val}.")
 {
-  LY_ASSERT_TYPE (unsmob_music, mus, 1);
+  LY_ASSERT_TYPE (Music::unsmob, mus, 1);
 
   return ly_prob_set_property_x (mus, sym, val);
 }
@@ -71,14 +71,14 @@ LY_DEFINE (ly_music_p, "ly:music?",
            1, 0, 0, (SCM obj),
            "Is @var{obj} a music object?")
 {
-  return scm_from_bool (unsmob_music (obj));
+  return scm_from_bool (Music::unsmob (obj));
 }
 
 LY_DEFINE (ly_event_p, "ly:event?",
            1, 0, 0, (SCM obj),
            "Is @var{obj} a proper (non-rhythmic) event object?")
 {
-  if (Music *m = unsmob_music (obj))
+  if (Music *m = Music::unsmob (obj))
     {
       return scm_from_bool (m->is_mus_type ("post-event"));
     }
@@ -92,8 +92,8 @@ LY_DEFINE (ly_music_mutable_properties, "ly:music-mutable-properties",
            "  The immutable properties are not available, since they are"
            " constant and initialized by the @code{make-music} function.")
 {
-  LY_ASSERT_TYPE (unsmob_music, mus, 1);
-  Music *m = unsmob_music (mus);
+  LY_ASSERT_TYPE (Music::unsmob, mus, 1);
+  Music *m = Music::unsmob (mus);
   return m->get_property_alist (true);
 }
 
@@ -106,7 +106,7 @@ LY_DEFINE (ly_music_list_p, "ly:music-list?",
 
   while (scm_is_pair (lst))
     {
-      if (!unsmob_music (scm_car (lst)))
+      if (!Music::unsmob (scm_car (lst)))
         return SCM_BOOL_F;
       lst = scm_cdr (lst);
     }
@@ -120,8 +120,8 @@ LY_DEFINE (ly_music_deep_copy, "ly:music-deep-copy",
            " @var{m} may be an arbitrary type; cons cells and music"
            " are copied recursively.")
 {
-  if (unsmob_music (m))
-      return unsmob_music (m)->clone ()->unprotect ();
+  if (Music::unsmob (m))
+      return Music::unsmob (m)->clone ()->unprotect ();
   if (scm_is_pair (m))
     {
       SCM copy = SCM_EOL;
@@ -147,11 +147,11 @@ LY_DEFINE (ly_music_transpose, "ly:music-transpose",
            "Transpose @var{m} such that central@tie{}C is mapped"
            " to@tie{}@var{p}.  Return@tie{}@var{m}.")
 {
-  LY_ASSERT_TYPE (unsmob_music, m, 1);
+  LY_ASSERT_TYPE (Music::unsmob, m, 1);
   LY_ASSERT_SMOB (Pitch, p, 2);
 
-  Music *sc = unsmob_music (m);
-  Pitch *sp = unsmob_pitch (p);
+  Music *sc = Music::unsmob (m);
+  Pitch *sp = Pitch::unsmob (p);
 
   sc->transpose (*sp);
   // SCM_UNDEFINED ?
@@ -165,11 +165,11 @@ LY_DEFINE (ly_music_compress, "ly:music-compress",
            2, 0, 0, (SCM m, SCM factor),
            "Compress music object@tie{}@var{m} by moment @var{factor}.")
 {
-  LY_ASSERT_TYPE (unsmob_music, m, 1);
-  LY_ASSERT_TYPE (unsmob_moment, factor, 2);
+  LY_ASSERT_TYPE (Music::unsmob, m, 1);
+  LY_ASSERT_TYPE (Moment::unsmob, factor, 2);
 
-  Music *sc = unsmob_music (m);
-  sc->compress (*unsmob_moment (factor));
+  Music *sc = Music::unsmob (m);
+  sc->compress (*Moment::unsmob (factor));
   return sc->self_scm ();
 }
 
@@ -178,11 +178,11 @@ LY_DEFINE (ly_make_music_relative_x, "ly:make-music-relative!",
            "Make @var{music} relative to @var{pitch},"
            " return final pitch.")
 {
-  LY_ASSERT_TYPE (unsmob_music, music, 1);
-  LY_ASSERT_TYPE (unsmob_pitch, pitch, 2);
+  LY_ASSERT_TYPE (Music::unsmob, music, 1);
+  LY_ASSERT_TYPE (Pitch::unsmob, pitch, 2);
 
-  Pitch start = *unsmob_pitch (pitch);
-  Music *m = unsmob_music (music);
+  Pitch start = *Pitch::unsmob (pitch);
+  Music *m = Music::unsmob (music);
   Pitch last = m->to_relative_octave (start);
 
   return last.smobbed_copy ();
@@ -193,10 +193,10 @@ LY_DEFINE (ly_music_duration_length, "ly:music-duration-length", 1, 0, 0,
            "Extract the duration field from @var{mus} and return the"
            " length.")
 {
-  LY_ASSERT_TYPE (unsmob_music, mus, 1);
-  Music *m = unsmob_music (mus);
+  LY_ASSERT_TYPE (Music::unsmob, mus, 1);
+  Music *m = Music::unsmob (mus);
 
-  Duration *d = unsmob_duration (m->get_property ("duration"));
+  Duration *d = Duration::unsmob (m->get_property ("duration"));
   Moment len;
 
   if (d)
@@ -211,13 +211,13 @@ LY_DEFINE (ly_music_duration_compress, "ly:music-duration-compress", 2, 0, 0,
            "Compress @var{mus} by factor @var{fact}, which is a"
            " @code{Moment}.")
 {
-  LY_ASSERT_TYPE (unsmob_music, mus, 1);
+  LY_ASSERT_TYPE (Music::unsmob, mus, 1);
   LY_ASSERT_SMOB (Moment, fact, 2);
 
-  Music *m = unsmob_music (mus);
-  Moment *f = unsmob_moment (fact);
+  Music *m = Music::unsmob (mus);
+  Moment *f = Moment::unsmob (fact);
 
-  Duration *d = unsmob_duration (m->get_property ("duration"));
+  Duration *d = Duration::unsmob (m->get_property ("duration"));
   if (d)
     m->set_property ("duration", d->compressed (f->main_part_).smobbed_copy ());
   return SCM_UNSPECIFIED;
@@ -236,7 +236,7 @@ LY_DEFINE (ly_transpose_key_alist, "ly:transpose-key-alist",
            " pitch @var{pit}.")
 {
   SCM newlist = SCM_EOL;
-  Pitch *p = unsmob_pitch (pit);
+  Pitch *p = Pitch::unsmob (pit);
 
   for (SCM s = l; scm_is_pair (s); s = scm_cdr (s))
     {
index fea62f89d65f9499265c394526c59aaa0a4d9b7c..ec700d346523cf0b1e405fd2ff3f71a0b1ad86c6 100644 (file)
@@ -30,7 +30,7 @@ void
 transpose_music_list (SCM lst, Pitch rq)
 {
   for (SCM s = lst; scm_is_pair (s); s = scm_cdr (s))
-    unsmob_music (scm_car (s))->transpose (rq);
+    Music::unsmob (scm_car (s))->transpose (rq);
 }
 
 Moment
@@ -41,7 +41,7 @@ Music_sequence::cumulative_length (SCM l)
 
   for (SCM s = l; scm_is_pair (s); s = scm_cdr (s))
     {
-      Moment l = unsmob_music (scm_car (s))->get_length ();
+      Moment l = Music::unsmob (scm_car (s))->get_length ();
       if (last_len.grace_part_ && l.main_part_)
         last_len.grace_part_ = Rational (0);
       cumulative += last_len;
@@ -60,7 +60,7 @@ Music_sequence::maximum_length (SCM l)
   Moment dur = 0;
   for (SCM s = l; scm_is_pair (s); s = scm_cdr (s))
     {
-      Music *m = unsmob_music (scm_car (s));
+      Music *m = Music::unsmob (scm_car (s));
       if (!m)
         programming_error ("Music sequence should have music elements");
       else
@@ -77,7 +77,7 @@ MAKE_SCHEME_CALLBACK (Music_sequence, maximum_length_callback, 1);
 SCM
 Music_sequence::maximum_length_callback (SCM m)
 {
-  Music *me = unsmob_music (m);
+  Music *me = Music::unsmob (m);
   return maximum_length (me->get_property ("elements")).smobbed_copy ();
 }
 
@@ -85,8 +85,8 @@ MAKE_SCHEME_CALLBACK (Music_sequence, event_chord_length_callback, 1);
 SCM
 Music_sequence::event_chord_length_callback (SCM m)
 {
-  Music *me = unsmob_music (m);
-  Duration *d = unsmob_duration (me->get_property ("duration"));
+  Music *me = Music::unsmob (m);
+  Duration *d = Duration::unsmob (me->get_property ("duration"));
   // Preset duration is used in chord repetitions.
   if (d)
     {
@@ -100,7 +100,7 @@ MAKE_SCHEME_CALLBACK (Music_sequence, cumulative_length_callback, 1);
 SCM
 Music_sequence::cumulative_length_callback (SCM m)
 {
-  Music *me = unsmob_music (m);
+  Music *me = Music::unsmob (m);
   return cumulative_length (me->get_property ("elements")).smobbed_copy ();
 }
 
@@ -108,7 +108,7 @@ MAKE_SCHEME_CALLBACK (Music_sequence, minimum_start_callback, 1);
 SCM
 Music_sequence::minimum_start_callback (SCM m)
 {
-  Music *me = unsmob_music (m);
+  Music *me = Music::unsmob (m);
   return minimum_start (me->get_property ("elements")).smobbed_copy ();
 }
 
@@ -116,7 +116,7 @@ MAKE_SCHEME_CALLBACK (Music_sequence, first_start_callback, 1);
 SCM
 Music_sequence::first_start_callback (SCM m)
 {
-  Music *me = unsmob_music (m);
+  Music *me = Music::unsmob (m);
   return first_start (me->get_property ("elements")).smobbed_copy ();
 }
 
@@ -129,7 +129,7 @@ music_list_to_relative (SCM l, Pitch p, bool ret_first)
   Pitch last = p;
   for (SCM s = l; scm_is_pair (s); s = scm_cdr (s))
     {
-      if (Music *m = unsmob_music (scm_car (s)))
+      if (Music *m = Music::unsmob (scm_car (s)))
         {
           last = m->to_relative_octave (last);
           if (!count++)
@@ -144,7 +144,7 @@ void
 compress_music_list (SCM l, Moment m)
 {
   for (SCM s = l; scm_is_pair (s); s = scm_cdr (s))
-    unsmob_music (scm_car (s))->compress (m);
+    Music::unsmob (scm_car (s))->compress (m);
 }
 
 Moment
@@ -153,7 +153,7 @@ Music_sequence::minimum_start (SCM l)
   Moment m;
 
   for (SCM s = l; scm_is_pair (s); s = scm_cdr (s))
-    m = min (m, unsmob_music (scm_car (s))->start_mom ());
+    m = min (m, Music::unsmob (scm_car (s))->start_mom ());
   return m;
 }
 
@@ -163,7 +163,7 @@ Music_sequence::first_start (SCM l)
 
   for (SCM s = l; scm_is_pair (s); s = scm_cdr (s))
     {
-      Music *mus = unsmob_music (scm_car (s));
+      Music *mus = Music::unsmob (scm_car (s));
       Moment start = mus->start_mom ();
       if (mus->get_length ().to_bool () || start.to_bool ())
         return start;
@@ -175,8 +175,8 @@ MAKE_SCHEME_CALLBACK (Music_sequence, simultaneous_relative_callback, 2);
 SCM
 Music_sequence::simultaneous_relative_callback (SCM music, SCM pitch)
 {
-  Music *me = unsmob_music (music);
-  Pitch p = *unsmob_pitch (pitch);
+  Music *me = Music::unsmob (music);
+  Pitch p = *Pitch::unsmob (pitch);
   return music_list_to_relative (me->get_property ("elements"),
                                  p, false).smobbed_copy ();
 }
@@ -185,8 +185,8 @@ MAKE_SCHEME_CALLBACK (Music_sequence, event_chord_relative_callback, 2);
 SCM
 Music_sequence::event_chord_relative_callback (SCM music, SCM pitch)
 {
-  Music *me = unsmob_music (music);
-  Pitch p = *unsmob_pitch (pitch);
+  Music *me = Music::unsmob (music);
+  Pitch p = *Pitch::unsmob (pitch);
   return music_list_to_relative (me->get_property ("elements"),
                                  p, true).smobbed_copy ();
 }
index d46415869c658c39d88b944c28fe94f72fbc7fa0..46ad77c6da9a1e305c52bafc5972a0c30c8664c7 100644 (file)
@@ -51,9 +51,9 @@ void
 Music_wrapper_iterator::construct_children ()
 {
   Music *my_music = get_music ();
-  Music *child = unsmob_music (my_music->get_property ("element"));
+  Music *child = Music::unsmob (my_music->get_property ("element"));
   child_iter_ = (child)
-                ? unsmob_iterator (get_iterator (child))
+                ? Music_iterator::unsmob (get_iterator (child))
                 : 0;
 }
 
index babec206b70ed694cf8f5a680b779b68c59c7a19..c03f08b5c41a6c0b4e02a8302b1d6a841beb1a0b 100644 (file)
@@ -25,8 +25,8 @@ MAKE_SCHEME_CALLBACK (Music_wrapper, start_callback, 1);
 SCM
 Music_wrapper::start_callback (SCM m)
 {
-  Music *me = unsmob_music (m);
-  Music *elt = unsmob_music (me->get_property ("element"));
+  Music *me = Music::unsmob (m);
+  Music *elt = Music::unsmob (me->get_property ("element"));
   if (elt)
     return elt->start_mom ().smobbed_copy ();
   else
@@ -37,8 +37,8 @@ MAKE_SCHEME_CALLBACK (Music_wrapper, length_callback, 1);
 SCM
 Music_wrapper::length_callback (SCM m)
 {
-  Music *me = unsmob_music (m);
-  Music *elt = unsmob_music (me->get_property ("element"));
+  Music *me = Music::unsmob (m);
+  Music *elt = Music::unsmob (me->get_property ("element"));
   if (elt)
     return elt->get_length ().smobbed_copy ();
   else
index 351051e6a624c13684030eafe17ce824976d88e1..31bda8a26397208a73e711c911cfb3d67070475d 100644 (file)
@@ -91,13 +91,13 @@ Moment
 Music::get_length () const
 {
   SCM lst = get_property ("length");
-  if (unsmob_moment (lst))
-    return *unsmob_moment (lst);
+  if (Moment::unsmob (lst))
+    return *Moment::unsmob (lst);
 
   if (ly_is_procedure (length_callback_))
     {
       SCM res = scm_call_1 (length_callback_, self_scm ());
-      return *unsmob_moment (res);
+      return *Moment::unsmob (res);
     }
 
   return Moment (0);
@@ -110,7 +110,7 @@ Music::start_mom () const
   if (ly_is_procedure (lst))
     {
       SCM res = scm_call_1 (lst, self_scm ());
-      return *unsmob_moment (res);
+      return *Moment::unsmob (res);
     }
 
   Moment m;
@@ -134,7 +134,7 @@ Pitch
 Music::generic_to_relative_octave (Pitch last)
 {
   SCM elt = get_property ("element");
-  Pitch *old_pit = unsmob_pitch (get_property ("pitch"));
+  Pitch *old_pit = Pitch::unsmob (get_property ("pitch"));
   if (old_pit)
     {
       Pitch new_pit = *old_pit;
@@ -158,7 +158,7 @@ Music::generic_to_relative_octave (Pitch last)
       last = new_pit;
     }
 
-  if (Music *m = unsmob_music (elt))
+  if (Music *m = Music::unsmob (elt))
     last = m->to_relative_octave (last);
 
   (void) music_list_to_relative (get_property ("articulations"), last, true);
@@ -172,7 +172,7 @@ Music::to_relative_octave (Pitch last)
   SCM callback = get_property ("to-relative-callback");
   if (ly_is_procedure (callback))
     {
-      Pitch *p = unsmob_pitch (scm_call_2 (callback, self_scm (),
+      Pitch *p = Pitch::unsmob (scm_call_2 (callback, self_scm (),
                                            last.smobbed_copy ()));
       return *p;
     }
@@ -185,11 +185,11 @@ Music::compress (Moment factor)
 {
   SCM elt = get_property ("element");
 
-  if (Music *m = unsmob_music (elt))
+  if (Music *m = Music::unsmob (elt))
     m->compress (factor);
 
   compress_music_list (get_property ("elements"), factor);
-  Duration *d = unsmob_duration (get_property ("duration"));
+  Duration *d = Duration::unsmob (get_property ("duration"));
   if (d)
     set_property ("duration",
                   d->compressed (factor.main_part_).smobbed_copy ());
@@ -208,7 +208,7 @@ transpose_mutable (SCM alist, Pitch delta)
       SCM val = scm_cdr (entry);
       SCM new_val = val;
 
-      if (Pitch *p = unsmob_pitch (val))
+      if (Pitch *p = Pitch::unsmob (val))
         {
           Pitch transposed = p->transposed (delta);
 
@@ -220,7 +220,7 @@ transpose_mutable (SCM alist, Pitch delta)
         }
       else if (prop == ly_symbol2scm ("element"))
         {
-          if (Music *m = unsmob_music (val))
+          if (Music *m = Music::unsmob (val))
             m->transpose (delta);
         }
       else if (prop == ly_symbol2scm ("elements")
@@ -253,7 +253,7 @@ Music::set_spot (Input ip)
 Input *
 Music::origin () const
 {
-  Input *ip = unsmob_input (get_property ("origin"));
+  Input *ip = Input::unsmob (get_property ("origin"));
   return ip ? ip : &dummy_input_global;
 }
 
@@ -283,7 +283,7 @@ Music::to_event () const
       SCM art_ev = SCM_EOL;
       for (; scm_is_pair (art_mus); art_mus = scm_cdr (art_mus))
         {
-          Music *m = unsmob_music (scm_car (art_mus));
+          Music *m = Music::unsmob (scm_car (art_mus));
           art_ev = scm_cons (m->to_event ()->unprotect (), art_ev);
         }
       e->set_property ("articulations", scm_reverse_x (art_ev, SCM_EOL));
@@ -313,7 +313,7 @@ make_music_by_name (SCM sym)
   SCM rv = scm_call_1 (make_music_proc, sym);
 
   /* UGH. */
-  Music *m = unsmob_music (rv);
+  Music *m = Music::unsmob (rv);
   m->protect ();
   return m;
 }
@@ -322,8 +322,8 @@ MAKE_SCHEME_CALLBACK (Music, duration_length_callback, 1);
 SCM
 Music::duration_length_callback (SCM m)
 {
-  Music *me = unsmob_music (m);
-  Duration *d = unsmob_duration (me->get_property ("duration"));
+  Music *me = Music::unsmob (m);
+  Duration *d = Duration::unsmob (me->get_property ("duration"));
 
   Moment mom;
   if (d)
@@ -332,7 +332,7 @@ Music::duration_length_callback (SCM m)
 }
 
 Music *
-unsmob_music (SCM m)
+Music::unsmob (SCM m)
 {
-  return dynamic_cast<Music *> (unsmob_prob (m));
+  return dynamic_cast<Music *> (Prob::unsmob (m));
 }
index 7f504ae4521115214e411399547634e3aac7b32b..3db7d7010c37a73df72cdc5e827e7a5f954e4f84 100644 (file)
@@ -99,7 +99,7 @@ New_fingering_engraver::acknowledge_rhythmic_head (Grob_info inf)
 
   for (SCM s = arts; scm_is_pair (s); s = scm_cdr (s))
     {
-      Stream_event *ev = unsmob_stream_event (scm_car (s));
+      Stream_event *ev = Stream_event::unsmob (scm_car (s));
 
       if (!ev)
         continue;
@@ -132,7 +132,7 @@ New_fingering_engraver::acknowledge_rhythmic_head (Grob_info inf)
       else if (ev->in_event_class ("harmonic-event"))
         {
           inf.grob ()->set_property ("style", ly_symbol2scm ("harmonic"));
-          Grob *d = unsmob_grob (inf.grob ()->get_object ("dot"));
+          Grob *d = Grob::unsmob (inf.grob ()->get_object ("dot"));
           if (d && !to_boolean (get_property ("harmonicDots")))
             d->suicide ();
         }
@@ -197,7 +197,7 @@ New_fingering_engraver::position_scripts (SCM orientations,
     if (stem_)
       {
         Side_position_interface::add_support (scripts->at (i).script_, stem_);
-        if (Grob *flag = unsmob_grob (stem_->get_object ("flag")))
+        if (Grob *flag = Grob::unsmob (stem_->get_object ("flag")))
           Side_position_interface::add_support (scripts->at (i).script_, flag);
       }
 
@@ -281,12 +281,12 @@ New_fingering_engraver::position_scripts (SCM orientations,
       f->set_parent (ft.head_, Y_AXIS);
       f->set_property ("avoid-slur", ly_symbol2scm ("inside"));
       if (hordir == LEFT
-          && unsmob_grob (ft.head_->get_object ("accidental-grob")))
+          && Grob::unsmob (ft.head_->get_object ("accidental-grob")))
         Side_position_interface::add_support (f,
-                                              unsmob_grob (ft.head_->get_object ("accidental-grob")));
-      else if (unsmob_grob (ft.head_->get_object ("dot")))
+                                              Grob::unsmob (ft.head_->get_object ("accidental-grob")));
+      else if (Grob::unsmob (ft.head_->get_object ("dot")))
         Side_position_interface::add_support (f,
-                                              unsmob_grob (ft.head_->get_object ("dot")));
+                                              Grob::unsmob (ft.head_->get_object ("dot")));
 
       Self_alignment_interface::set_aligned_on_parent (f, Y_AXIS);
       Side_position_interface::set_axis (f, X_AXIS);
index 1430463ab958d506856deee33669fcb414933b60..79a65845759b259e6b1bb6e9fafa84ca51b9b979 100644 (file)
@@ -272,7 +272,7 @@ check_meshing_chords (Grob *me,
 
       if (dot_wipe_head)
         {
-          if (Grob *d = unsmob_grob (dot_wipe_head->get_object ("dot")))
+          if (Grob *d = Grob::unsmob (dot_wipe_head->get_object ("dot")))
             d->suicide ();
         }
 
@@ -313,18 +313,18 @@ check_meshing_chords (Grob *me,
   if (shift_amount < -1e-6
       && Rhythmic_head::dot_count (head_up))
     {
-      Grob *d = unsmob_grob (head_up->get_object ("dot"));
+      Grob *d = Grob::unsmob (head_up->get_object ("dot"));
       Grob *parent = d->get_parent (X_AXIS);
       if (Dot_column::has_interface (parent))
         Side_position_interface::add_support (parent, head_down);
     }
   else if (Rhythmic_head::dot_count (head_down))
     {
-      Grob *d = unsmob_grob (head_down->get_object ("dot"));
+      Grob *d = Grob::unsmob (head_down->get_object ("dot"));
       Grob *parent = d->get_parent (X_AXIS);
       if (Dot_column::has_interface (parent))
         {
-          Grob *stem = unsmob_grob (head_up->get_object ("stem"));
+          Grob *stem = Grob::unsmob (head_up->get_object ("stem"));
           // Loop over all heads on an up-pointing-stem to see if dots
           // need to clear any heads suspended on its right side.
           extract_grob_set (stem, "note-heads", heads);
@@ -337,12 +337,12 @@ check_meshing_chords (Grob *me,
   if (shift_amount > 1e-6
       && Rhythmic_head::dot_count (head_down))
     {
-      Grob *dot_down = unsmob_grob (head_down->get_object ("dot"));
+      Grob *dot_down = Grob::unsmob (head_down->get_object ("dot"));
       Grob *col_down = dot_down->get_parent (X_AXIS);
       Direction dir = UP;
       if (Rhythmic_head::dot_count (head_up))
         {
-          Grob *dot_up = unsmob_grob (head_up->get_object ("dot"));
+          Grob *dot_up = Grob::unsmob (head_up->get_object ("dot"));
           Grob *col_up = dot_up->get_parent (X_AXIS);
           if (col_up == col_down) // let the common DotColumn arrange dots
             dir = CENTER;
@@ -351,10 +351,10 @@ check_meshing_chords (Grob *me,
         }
       if (dir != CENTER)
         {
-          Grob *stem = unsmob_grob (head_down->get_object ("stem"));
+          Grob *stem = Grob::unsmob (head_down->get_object ("stem"));
           extract_grob_set (stem, "note-heads", heads);
           for (vsize i = 0; i < heads.size (); i++)
-            if (Grob *dot = unsmob_grob (heads[i]->get_object ("dot")))
+            if (Grob *dot = Grob::unsmob (heads[i]->get_object ("dot")))
               dot->set_property ("direction", scm_from_int (dir));
         }
     }
@@ -370,7 +370,7 @@ MAKE_SCHEME_CALLBACK (Note_collision_interface, calc_positioning_done, 1)
 SCM
 Note_collision_interface::calc_positioning_done (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   me->set_property ("positioning-done", SCM_BOOL_T);
 
   Drul_array<vector<Grob *> > clash_groups = get_clash_groups (me);
@@ -407,7 +407,7 @@ Note_collision_interface::calc_positioning_done (SCM smob)
   vector<Real> amounts;
   for (; scm_is_pair (hand); hand = scm_cdr (hand))
     {
-      Grob *s = unsmob_grob (scm_caar (hand));
+      Grob *s = Grob::unsmob (scm_caar (hand));
       Real amount = scm_to_double (scm_cdar (hand)) * wid;
 
       done.push_back (s);
@@ -417,7 +417,7 @@ Note_collision_interface::calc_positioning_done (SCM smob)
     }
   for (; scm_is_pair (autos); autos = scm_cdr (autos))
     {
-      Grob *s = unsmob_grob (scm_caar (autos));
+      Grob *s = Grob::unsmob (scm_caar (autos));
       Real amount = scm_to_double (scm_cdar (autos)) * wid;
 
       vsize x = find (done, s) - done.begin ();
@@ -600,7 +600,7 @@ Note_collision_interface::note_head_positions (Grob *me)
   vector<int> out;
   extract_grob_set (me, "elements", elts);
   for (vsize i = 0; i < elts.size (); i++)
-    if (Grob *stem = unsmob_grob (elts[i]->get_object ("stem")))
+    if (Grob *stem = Grob::unsmob (elts[i]->get_object ("stem")))
       {
         vector<int> nhp = Stem::note_head_positions (stem);
         out.insert (out.end (), nhp.begin (), nhp.end ());
index a20d886cb244b0597ca51d47df0798b1954a9bdf..ed2b04ef95c67b5a8b85a8916cc2bf457d1e28e0 100644 (file)
@@ -26,7 +26,7 @@ LY_DEFINE (ly_note_column_accidentals, "ly:note-column-accidentals",
            "Return the @code{AccidentalPlacement} grob from @var{note-column}"
            " if any, or @code{SCM_EOL} otherwise.")
 {
-  Grob *grob = unsmob_grob (note_column);
+  Grob *grob = Grob::unsmob (note_column);
   LY_ASSERT_SMOB (Grob, note_column, 1);
   Grob *acc = Note_column::accidentals (grob);
   if (acc)
@@ -39,7 +39,7 @@ LY_DEFINE (ly_note_column_dot_column, "ly:note-column-dot-column",
            "Return the @code{DotColumn} grob from @var{note-column}"
            " if any, or @code{SCM_EOL} otherwise.")
 {
-  Grob *grob = unsmob_grob (note_column);
+  Grob *grob = Grob::unsmob (note_column);
   LY_ASSERT_SMOB (Grob, note_column, 1);
   Grob *dot_column = Note_column::dot_column (grob);
   if (dot_column)
index 625bed1b2f4cbc27fc507c2be414a2066cae7be9..c5d06cfb6831a6bd678c27289132a0120129c349 100644 (file)
@@ -43,7 +43,7 @@ using namespace std;
 bool
 Note_column::has_rests (Grob *me)
 {
-  return unsmob_grob (me->get_object ("rest"));
+  return Grob::unsmob (me->get_object ("rest"));
 }
 
 bool
@@ -61,7 +61,7 @@ Item *
 Note_column::get_stem (Grob *me)
 {
   SCM s = me->get_object ("stem");
-  return unsmob_item (s);
+  return Item::unsmob (s);
 }
 
 Item *
@@ -71,7 +71,7 @@ Note_column::get_flag (Grob *me)
   if (stem)
     {
       SCM s = stem->get_object ("flag");
-      return unsmob_item (s);
+      return Item::unsmob (s);
     }
   return 0;
 }
@@ -97,7 +97,7 @@ Note_column::head_positions_interval (Grob *me)
 Direction
 Note_column::dir (Grob *me)
 {
-  Grob *stem = unsmob_grob (me->get_object ("stem"));
+  Grob *stem = Grob::unsmob (me->get_object ("stem"));
   if (stem && Stem::has_interface (stem))
     return get_grob_direction (stem);
   else
@@ -121,7 +121,7 @@ Note_column::set_stem (Grob *me, Grob *stem)
 Grob *
 Note_column::get_rest (Grob *me)
 {
-  return unsmob_grob (me->get_object ("rest"));
+  return Grob::unsmob (me->get_object ("rest"));
 }
 
 void
@@ -138,7 +138,7 @@ Note_column::add_head (Grob *me, Grob *h)
     }
   else if (Note_head::has_interface (h))
     {
-      if (unsmob_grob (me->get_object ("rest")))
+      if (Grob::unsmob (me->get_object ("rest")))
         both = true;
       Pointer_group_interface::add_grob (me, ly_symbol2scm ("note-heads"), h);
     }
@@ -187,7 +187,7 @@ Note_column::accidentals (Grob *me)
   for (vsize i = 0; i < heads.size (); i++)
     {
       Grob *h = heads[i];
-      acc = h ? unsmob_grob (h->get_object ("accidental-grob")) : 0;
+      acc = h ? Grob::unsmob (h->get_object ("accidental-grob")) : 0;
       if (acc)
         break;
     }
@@ -208,7 +208,7 @@ Note_column::dot_column (Grob *me)
   extract_grob_set (me, "note-heads", heads);
   for (vsize i = 0; i < heads.size (); i++)
     {
-      Grob *dots = unsmob_grob (heads[i]->get_object ("dot"));
+      Grob *dots = Grob::unsmob (heads[i]->get_object ("dot"));
       if (dots)
         return dots->get_parent (X_AXIS);
     }
index f1505358e5a7de5998ca99768a439890306dbc74..56347ce5f9546c789c6e1e0b53136410705a9278 100644 (file)
@@ -27,7 +27,7 @@ LY_DEFINE (ly_note_head__stem_attachment, "ly:note-head::stem-attachment",
            " notehead @var{glyph-name}.")
 {
   LY_ASSERT_SMOB (Font_metric, font_metric, 1);
-  Font_metric *fm = unsmob_metrics (font_metric);
+  Font_metric *fm = Font_metric::unsmob (font_metric);
   LY_ASSERT_TYPE (scm_is_string, glyph_name, 2);
 
   return ly_offset2scm (Note_head::get_stem_attachment (fm, ly_scm2string (glyph_name)));
index 80624c40a81441b6da7fa3339e8b423a7d8adbc1..33128589c0550720f80123c1c5b8150746f34d36 100644 (file)
@@ -51,7 +51,7 @@ internal_print (Grob *me, string *font_char)
   Stencil out = fm->find_by_name (idx_either + suffix);
   if (out.is_empty ())
     {
-      Grob *stem = unsmob_grob (me->get_object ("stem"));
+      Grob *stem = Grob::unsmob (me->get_object ("stem"));
       Direction stem_dir = stem ? get_grob_direction (stem) : CENTER;
 
       if (stem_dir == CENTER)
@@ -83,8 +83,8 @@ internal_print (Grob *me, string *font_char)
   if (style == "kievan"
       && 3 == robust_scm2int (me->get_property ("duration-log"), 2))
     {
-      Grob *stem = unsmob_grob (me->get_object ("stem"));
-      Grob *beam = unsmob_grob (stem->get_object ("beam"));
+      Grob *stem = Grob::unsmob (me->get_object ("stem"));
+      Grob *beam = Grob::unsmob (stem->get_object ("beam"));
       if (beam)
         out = fm->find_by_name (idx_either + "2kievan");
     }
@@ -109,8 +109,8 @@ MAKE_SCHEME_CALLBACK (Note_head, stem_x_shift, 1);
 SCM
 Note_head::stem_x_shift (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
-  Grob *stem = unsmob_grob (me->get_object ("stem"));
+  Grob *me = Grob::unsmob (smob);
+  Grob *stem = Grob::unsmob (me->get_object ("stem"));
   if (stem)
     (void) stem->get_property ("positioning-done");
 
@@ -121,7 +121,7 @@ MAKE_SCHEME_CALLBACK (Note_head, print, 1);
 SCM
 Note_head::print (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   string idx;
   return internal_print (me, &idx).smobbed_copy ();
@@ -131,7 +131,7 @@ MAKE_SCHEME_CALLBACK (Note_head, include_ledger_line_height, 1);
 SCM
 Note_head::include_ledger_line_height (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Grob *staff = Staff_symbol_referencer::get_staff_symbol (me);
 
   if (staff)
@@ -190,7 +190,7 @@ MAKE_SCHEME_CALLBACK (Note_head, calc_stem_attachment, 1);
 SCM
 Note_head::calc_stem_attachment (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Font_metric *fm = Font_interface::get_default_font (me);
   string key;
   internal_print (me, &key);
index 2aec7501b57e5073d7dbb7277925d71d526ad48d..1b46789e76d28346d49c79182b8072973333863b 100644 (file)
@@ -68,7 +68,7 @@ Note_heads_engraver::process_music ()
       Stream_event *ev = note_evs_[i];
       Item *note = make_item ("NoteHead", ev->self_scm ());
 
-      Pitch *pit = unsmob_pitch (ev->get_property ("pitch"));
+      Pitch *pit = Pitch::unsmob (ev->get_property ("pitch"));
 
 #if 0 /* TODO: should have a mechanism to switch off these warnings. */
 
@@ -100,8 +100,8 @@ Note_heads_engraver::process_music ()
         {
           SCM scm_tonic = get_property ("tonic");
           Pitch tonic;
-          if (unsmob_pitch (scm_tonic))
-            tonic = *unsmob_pitch (scm_tonic);
+          if (Pitch::unsmob (scm_tonic))
+            tonic = *Pitch::unsmob (scm_tonic);
 
           unsigned int delta = (pit->get_notename () - tonic.get_notename () + 7) % 7;
 
index cd9676a4286608fa286e190d923fe3f0e39c550b..c7ea5ea6042f5868be45c28909ea3147e995444e 100644 (file)
@@ -50,7 +50,7 @@ Note_name_engraver::process_music ()
     {
       if (i)
         s += " ";
-      Pitch p = *unsmob_pitch (events_[i]->get_property ("pitch"));
+      Pitch p = *Pitch::unsmob (events_[i]->get_property ("pitch"));
 
       if (!to_boolean (get_property ("printOctaveNames")))
         p = Pitch (-1, p.get_notename (), p.get_alteration ());
index 59ac69ac9842c895d9ceb8bd618cf0af4ffb3031..2ab1178472db4049e646ff2dc73088736324d8f3 100644 (file)
@@ -54,15 +54,15 @@ Note_performer::process_music ()
 
   Pitch transposing;
   SCM prop = get_property ("instrumentTransposition");
-  if (unsmob_pitch (prop))
-    transposing = *unsmob_pitch (prop);
+  if (Pitch::unsmob (prop))
+    transposing = *Pitch::unsmob (prop);
 
   for (vsize i = 0; i < note_evs_.size (); i++)
     {
       Stream_event *n = note_evs_[i];
       SCM pit = n->get_property ("pitch");
 
-      if (Pitch *pitp = unsmob_pitch (pit))
+      if (Pitch *pitp = Pitch::unsmob (pit))
         {
           SCM articulations = n->get_property ("articulations");
           Stream_event *tie_event = 0;
@@ -70,7 +70,7 @@ Note_performer::process_music ()
           int velocity = 0;
           for (SCM s = articulations; scm_is_pair (s); s = scm_cdr (s))
             {
-              Stream_event *ev = unsmob_stream_event (scm_car (s));
+              Stream_event *ev = Stream_event::unsmob (scm_car (s));
               if (!ev)
                 continue;
 
index 5accbc5f96daa122261b58b1ab8efaa01134d753..b3d60bb7bf51aa5b4f75a3f2f794bd910781def7 100644 (file)
@@ -101,9 +101,9 @@ Note_spacing_engraver::finalize ()
   Grob *last_spacing = last_spacings_[parent];
 
   if (last_spacing
-      && !unsmob_grob_array (last_spacing->get_object ("right-items")))
+      && !Grob_array::unsmob (last_spacing->get_object ("right-items")))
     {
-      Grob *col = unsmob_grob (get_property ("currentCommandColumn"));
+      Grob *col = Grob::unsmob (get_property ("currentCommandColumn"));
 
       Pointer_group_interface::add_grob (last_spacing,
                                          ly_symbol2scm ("right-items"),
@@ -120,7 +120,7 @@ Note_spacing_engraver::stop_translation_timestep ()
   if (last_spacing
       && to_boolean (get_property ("hasStaffSpacing")))
     {
-      Grob *col = unsmob_grob (get_property ("currentCommandColumn"));
+      Grob *col = Grob::unsmob (get_property ("currentCommandColumn"));
       Pointer_group_interface::add_grob (last_spacing,
                                          ly_symbol2scm ("right-items"),
                                          col);
index a21543ed3dd1ca59a0b4186b2e61a31a1fa5e6f7..7e17027cb20fcad5693f7e1a4ba21429c796965f 100644 (file)
@@ -49,7 +49,7 @@ Note_spacing::get_spacing (Grob *me, Item *right_col,
   for (vsize i = 0; i < note_columns.size (); i++)
     {
       SCM r = note_columns[i]->get_object ("rest");
-      Grob *g = unsmob_grob (r);
+      Grob *g = Grob::unsmob (r);
       Grob *col = note_columns[i]->get_column ();
 
       if (!g)
index 9237923e3ec1d3ff0770181e6c7ffe68566071d5..3ec403c9fcbe7f3b7c8021f926eab0c4aed8a214 100644 (file)
@@ -27,7 +27,7 @@ LY_DEFINE (ly_font_sub_fonts, "ly:font-sub-fonts", 1, 0, 0,
 {
   LY_ASSERT_SMOB (Font_metric, font, 1);
 
-  Font_metric *fm = unsmob_metrics (font);
+  Font_metric *fm = Font_metric::unsmob (font);
   return fm->sub_fonts ();
 }
 
@@ -37,10 +37,10 @@ LY_DEFINE (ly_otf_font_glyph_info, "ly:otf-font-glyph-info", 2, 0, 0,
            " information about named glyph @var{glyph} (a string).")
 {
   Modified_font_metric *fm
-    = dynamic_cast<Modified_font_metric *> (unsmob_metrics (font));
+    = dynamic_cast<Modified_font_metric *> (Font_metric::unsmob (font));
   Open_type_font *otf = fm
                         ? dynamic_cast<Open_type_font *> (fm->original_font ())
-                        : dynamic_cast<Open_type_font *> (unsmob_metrics (font));
+                        : dynamic_cast<Open_type_font *> (Font_metric::unsmob (font));
 
   SCM_ASSERT_TYPE (otf, font, SCM_ARG1, __FUNCTION__, "OpenType font");
   LY_ASSERT_TYPE (scm_is_string, glyph, 2);
@@ -55,10 +55,10 @@ LY_DEFINE (ly_otf_font_table_data, "ly:otf-font-table-data", 2, 0, 0,
            " for non-existent @var{tag}.")
 {
   Modified_font_metric *fm
-    = dynamic_cast<Modified_font_metric *> (unsmob_metrics (font));
+    = dynamic_cast<Modified_font_metric *> (Font_metric::unsmob (font));
   Open_type_font *otf = fm
                         ? dynamic_cast<Open_type_font *> (fm->original_font ())
-                        : dynamic_cast<Open_type_font *> (unsmob_metrics (font));
+                        : dynamic_cast<Open_type_font *> (Font_metric::unsmob (font));
 
   SCM_ASSERT_TYPE (otf, font, SCM_ARG1, __FUNCTION__, "OpenType font");
   LY_ASSERT_TYPE (scm_is_string, tag, 2);
@@ -78,10 +78,10 @@ LY_DEFINE (ly_otf_font_p, "ly:otf-font?", 1, 0, 0,
            "Is @var{font} an OpenType font?")
 {
   Modified_font_metric *fm
-    = dynamic_cast<Modified_font_metric *> (unsmob_metrics (font));
+    = dynamic_cast<Modified_font_metric *> (Font_metric::unsmob (font));
   Open_type_font *otf = fm
                         ? dynamic_cast<Open_type_font *> (fm->original_font ())
-                        : dynamic_cast<Open_type_font *> (unsmob_metrics (font));
+                        : dynamic_cast<Open_type_font *> (Font_metric::unsmob (font));
 
   return scm_from_bool (otf);
 }
@@ -91,10 +91,10 @@ LY_DEFINE (ly_otf_glyph_count, "ly:otf-glyph-count", 1, 0, 0,
            "Return the number of glyphs in @var{font}.")
 {
   Modified_font_metric *fm
-    = dynamic_cast<Modified_font_metric *> (unsmob_metrics (font));
+    = dynamic_cast<Modified_font_metric *> (Font_metric::unsmob (font));
   Open_type_font *otf = fm
                         ? dynamic_cast<Open_type_font *> (fm->original_font ())
-                        : dynamic_cast<Open_type_font *> (unsmob_metrics (font));
+                        : dynamic_cast<Open_type_font *> (Font_metric::unsmob (font));
 
   SCM_ASSERT_TYPE (otf, font, SCM_ARG1, __FUNCTION__, "OpenType font");
 
@@ -106,10 +106,10 @@ LY_DEFINE (ly_otf_glyph_list, "ly:otf-glyph-list", 1, 0, 0,
            "Return a list of glyph names for @var{font}.")
 {
   Modified_font_metric *fm
-    = dynamic_cast<Modified_font_metric *> (unsmob_metrics (font));
+    = dynamic_cast<Modified_font_metric *> (Font_metric::unsmob (font));
   Open_type_font *otf = fm
                         ? dynamic_cast<Open_type_font *> (fm->original_font ())
-                        : dynamic_cast<Open_type_font *> (unsmob_metrics (font));
+                        : dynamic_cast<Open_type_font *> (Font_metric::unsmob (font));
 
   SCM_ASSERT_TYPE (otf, font, SCM_ARG1, __FUNCTION__, "OpenType font");
 
index 0639fee71991bc6ae8673df800bc817da7d103ca..7def9bf96cf9887297de6432997f3a7e7acab80c 100644 (file)
@@ -49,7 +49,7 @@ MAKE_SCHEME_CALLBACK (Ottava_bracket, print, 1);
 SCM
 Ottava_bracket::print (SCM smob)
 {
-  Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (smob));
+  Spanner *me = dynamic_cast<Spanner *> (Grob::unsmob (smob));
   Interval span_points;
 
   Grob *common = me->get_bound (LEFT)->common_refpoint (me->get_bound (RIGHT), X_AXIS);
@@ -79,7 +79,7 @@ Ottava_bracket::print (SCM smob)
   SCM markup = me->get_property ("text");
   Stencil text;
   if (Text_interface::is_markup (markup))
-    text = *unsmob_stencil (Text_interface::interpret_markup (layout->self_scm (),
+    text = *Stencil::unsmob (Text_interface::interpret_markup (layout->self_scm (),
                                                               properties, markup));
 
   Drul_array<Real> shorten = robust_scm2interval (me->get_property ("shorten-pair"),
index 6296e8c8a2092c9adaf2732a9150d8d81c6e9f69..67eb00ba11f2c9397770618b3d1de9aee3ab7771 100644 (file)
@@ -103,7 +103,7 @@ Ottava_spanner_engraver::typeset_all ()
         {
           if (!finished_->get_bound (RIGHT))
             {
-              Grob *e = unsmob_grob (get_property ("currentMusicalColumn"));
+              Grob *e = Grob::unsmob (get_property ("currentMusicalColumn"));
               finished_->set_bound (d, e);
             }
         }
@@ -117,7 +117,7 @@ Ottava_spanner_engraver::stop_translation_timestep ()
 {
   if (span_ && !span_->get_bound (LEFT))
     {
-      Grob *e = unsmob_grob (get_property ("currentMusicalColumn"));
+      Grob *e = Grob::unsmob (get_property ("currentMusicalColumn"));
       span_->set_bound (LEFT, e);
     }
 
index 91a3adfb2df55a5cb3688439cb1e84e1f6cbc5fe..552ccbe36b3283f65bf7bd568ab4bdf6e172aaf3 100644 (file)
@@ -32,7 +32,7 @@ LY_DEFINE (ly_output_def_lookup, "ly:output-def-lookup",
           " @var{val} or @code{'()} if @var{val} is undefined.")
 {
   LY_ASSERT_SMOB (Output_def, def, 1);
-  Output_def *op = unsmob_output_def (def);
+  Output_def *op = Output_def::unsmob (def);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
 
   SCM answer = op->lookup_variable (sym);
@@ -52,7 +52,7 @@ LY_DEFINE (ly_output_def_scope, "ly:output-def-scope",
           "Return the variable scope inside @var{def}.")
 {
   LY_ASSERT_SMOB (Output_def, def, 1);
-  Output_def *op = unsmob_output_def (def);
+  Output_def *op = Output_def::unsmob (def);
   return op->scope_;
 }
 
@@ -61,7 +61,7 @@ LY_DEFINE (ly_output_def_parent, "ly:output-def-parent",
           "Return the parent output definition of @var{def}.")
 {
   LY_ASSERT_SMOB (Output_def, def, 1);
-  Output_def *op = unsmob_output_def (def);
+  Output_def *op = Output_def::unsmob (def);
   return op->parent_ ? op->parent_->self_scm () : SCM_EOL;
 }
 
@@ -70,7 +70,7 @@ LY_DEFINE (ly_output_def_set_variable_x, "ly:output-def-set-variable!",
            "Set an output definition @var{def} variable @var{sym} to @var{val}.")
 {
   LY_ASSERT_SMOB (Output_def, def, 1);
-  Output_def *output_def = unsmob_output_def (def);
+  Output_def *output_def = Output_def::unsmob (def);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
   output_def->set_variable (sym, val);
   return SCM_UNSPECIFIED;
@@ -81,7 +81,7 @@ LY_DEFINE (ly_output_def_clone, "ly:output-def-clone",
           "Clone output definition @var{def}.")
 {
   LY_ASSERT_SMOB (Output_def, def, 1);
-  Output_def *op = unsmob_output_def (def);
+  Output_def *op = Output_def::unsmob (def);
 
   Output_def *clone = op->clone ();
   return clone->unprotect ();
@@ -93,13 +93,13 @@ LY_DEFINE (ly_output_description, "ly:output-description",
 {
   LY_ASSERT_SMOB (Output_def, output_def, 1);
 
-  Output_def *id = unsmob_output_def (output_def);
+  Output_def *id = Output_def::unsmob (output_def);
 
   SCM al = ly_module_2_alist (id->scope_);
   SCM ell = SCM_EOL;
   for (SCM s = al; scm_is_pair (s); s = scm_cdr (s))
     {
-      Context_def *td = unsmob_context_def (scm_cdar (s));
+      Context_def *td = Context_def::unsmob (scm_cdar (s));
       SCM key = scm_caar (s);
       if (td && key == td->get_context_name ())
        ell = scm_cons (scm_cons (key, td->to_alist ()), ell);
@@ -116,14 +116,14 @@ LY_DEFINE (ly_output_find_context_def, "ly:output-find-context-def",
   if (!SCM_UNBNDP (context_name))
     LY_ASSERT_TYPE (ly_is_symbol, context_name, 2);
 
-  Output_def *id = unsmob_output_def (output_def);
+  Output_def *id = Output_def::unsmob (output_def);
 
   SCM al = ly_module_2_alist (id->scope_);
   SCM ell = SCM_EOL;
   for (SCM s = al; scm_is_pair (s); s = scm_cdr (s))
     {
       SCM p = scm_car (s);
-      Context_def *td = unsmob_context_def (scm_cdr (p));
+      Context_def *td = Context_def::unsmob (scm_cdr (p));
       if (td && scm_is_eq (scm_car (p), td->get_context_name ())
          && (SCM_UNBNDP (context_name) || td->is_alias (context_name)))
        ell = scm_cons (p, ell);
@@ -136,7 +136,7 @@ LY_DEFINE (ly_output_def_p, "ly:output-def?",
           1, 0, 0, (SCM def),
           "Is @var{def} an output definition?")
 {
-  return ly_bool2scm (unsmob_output_def (def));
+  return ly_bool2scm (Output_def::unsmob (def));
 }
 
 LY_DEFINE (ly_paper_outputscale, "ly:paper-outputscale",
@@ -144,7 +144,7 @@ LY_DEFINE (ly_paper_outputscale, "ly:paper-outputscale",
           "Return the output-scale for output definition @var{def}.")
 {
   LY_ASSERT_SMOB (Output_def, def, 1);
-  Output_def *b = unsmob_output_def (def);
+  Output_def *b = Output_def::unsmob (def);
   return scm_from_double (output_scale (b));
 }
 
@@ -165,7 +165,7 @@ LY_DEFINE (ly_paper_get_font, "ly:paper-get-font",
 {
   LY_ASSERT_SMOB (Output_def, def, 1);
 
-  Output_def *paper = unsmob_output_def (def);
+  Output_def *paper = Output_def::unsmob (def);
   Font_metric *fm = select_font (paper, chain);
   return fm->self_scm ();
 }
@@ -176,7 +176,7 @@ LY_DEFINE (ly_paper_get_number, "ly:paper-get-number",
           " @var{def} as a double.")
 {
   LY_ASSERT_SMOB (Output_def, def, 1);
-  Output_def *layout = unsmob_output_def (def);
+  Output_def *layout = Output_def::unsmob (def);
   return scm_from_double (layout->get_dimension (sym));
 }
 
@@ -186,7 +186,7 @@ LY_DEFINE (ly_paper_fonts, "ly:paper-fonts",
           " @var{def} (e.g., @code{\\paper}).")
 {
   LY_ASSERT_SMOB (Output_def, def, 1);
-  Output_def *b = unsmob_output_def (def);
+  Output_def *b = Output_def::unsmob (def);
 
   SCM tab1 = b->lookup_variable (ly_symbol2scm ("scaled-fonts"));
   SCM tab2 = b->lookup_variable (ly_symbol2scm ("pango-fonts"));
@@ -215,7 +215,7 @@ LY_DEFINE (ly_paper_fonts, "ly:paper-fonts",
     {
       SCM entry = scm_car (s);
 
-      Font_metric *fm = unsmob_metrics (entry);
+      Font_metric *fm = Font_metric::unsmob (entry);
 
       if (dynamic_cast<Modified_font_metric *> (fm)
          || dynamic_cast<Pango_font *> (fm))
index 898d1b102e770fca72e6e5ca9034520b078d8d60..9c93dc68810907af158dc120a448637afa0c4f4c 100644 (file)
@@ -80,7 +80,7 @@ Output_def::mark_smob (SCM m)
 void
 assign_context_def (Output_def * m, SCM transdef)
 {
-  Context_def *tp = unsmob_context_def (transdef);
+  Context_def *tp = Context_def::unsmob (transdef);
   assert (tp);
 
   if (tp)
@@ -94,14 +94,14 @@ assign_context_def (Output_def * m, SCM transdef)
 SCM
 find_context_def (Output_def const *m, SCM name)
 {
-  Context_def *cd = unsmob_context_def (m->lookup_variable (name));
+  Context_def *cd = Context_def::unsmob (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);
+  Output_def * def = Output_def::unsmob (s);
   scm_puts ("#< ", p);
   scm_puts (def->class_name (), p);
   scm_puts (">", p);
index 8f66a576771425dad896b88be98a43b38bf738e9..79619e7d92db4cfd66667ce2e83c157a0abcb331 100644 (file)
@@ -29,7 +29,7 @@ LY_DEFINE (ly_page_turn_breaking, "ly:page-turn-breaking",
            " @var{pb} such that page turns only happen in specified places,"
            " returning its pages.")
 {
-  Page_turn_page_breaking b (unsmob_paper_book (pb));
+  Page_turn_page_breaking b (Paper_book::unsmob (pb));
   return b.solve ();
 }
 
@@ -39,7 +39,7 @@ LY_DEFINE (ly_optimal_breaking, "ly:optimal-breaking",
            " @var{pb} to minimize badness in bother vertical and horizontal"
            " spacing.")
 {
-  Optimal_page_breaking b (unsmob_paper_book (pb));
+  Optimal_page_breaking b (Paper_book::unsmob (pb));
   return b.solve ();
 }
 
@@ -49,7 +49,7 @@ LY_DEFINE (ly_minimal_breaking, "ly:minimal-breaking",
            " without looking for optimal spacing: stack as many lines on"
            " a page before moving to the next one.")
 {
-  Minimal_page_breaking b (unsmob_paper_book (pb));
+  Minimal_page_breaking b (Paper_book::unsmob (pb));
   return b.solve ();
 }
 
@@ -59,6 +59,6 @@ LY_DEFINE (ly_one_line_breaking, "ly:one-line-breaking",
            " page.  The paper-width setting will be modified so that"
            " every page will be wider than the widest line.")
 {
-  One_line_page_breaking b (unsmob_paper_book (pb));
+  One_line_page_breaking b (Paper_book::unsmob (pb));
   return b.solve ();
 }
index 29a7f27b5bcad2fb5eb83a132b282c595e93c509..252e24c5df61c2685d2b5ac415cc2292c4d7b9d5 100644 (file)
@@ -554,7 +554,7 @@ Page_breaking::draw_page (SCM systems, SCM configuration, int page_num, bool las
   for (SCM s = systems; scm_is_pair (s); s = scm_cdr (s))
     {
       SCM paper_system = scm_car (s);
-      if (Grob *g = unsmob_grob (scm_car (s)))
+      if (Grob *g = Grob::unsmob (scm_car (s)))
         {
           System *sys = dynamic_cast<System *> (g);
           paper_system = sys->get_paper_system ();
@@ -567,11 +567,11 @@ Page_breaking::draw_page (SCM systems, SCM configuration, int page_num, bool las
   // Create the page and draw it.
   SCM page = make_page (page_num, last);
 
-  Prob *p = unsmob_prob (page);
+  Prob *p = Prob::unsmob (page);
   p->set_property ("lines", paper_systems);
   p->set_property ("configuration", configuration);
 
-  Stencil *foot_p = unsmob_stencil (p->get_property ("foot-stencil"));
+  Stencil *foot_p = Stencil::unsmob (p->get_property ("foot-stencil"));
   Stencil foot = foot_p ? *foot_p : Stencil ();
 
   SCM footnotes = Page_layout_problem::get_footnotes_from_lines (systems);
@@ -658,12 +658,12 @@ Page_breaking::make_pages (vector<vsize> lines_per_page, SCM systems)
       for (SCM l = lines; scm_is_pair (l); l = scm_cdr (l))
         {
           SCM labels = SCM_EOL;
-          if (Grob *line = unsmob_grob (scm_car (l)))
+          if (Grob *line = Grob::unsmob (scm_car (l)))
             {
               System *system = dynamic_cast<System *> (line);
               labels = system->get_property ("labels");
             }
-          else if (Prob *prob = unsmob_prob (scm_car (l)))
+          else if (Prob *prob = Prob::unsmob (scm_car (l)))
             labels = prob->get_property ("labels");
 
           for (SCM lbls = labels; scm_is_pair (lbls); lbls = scm_cdr (lbls))
@@ -689,13 +689,13 @@ Page_breaking::create_system_list ()
   SCM specs = book_->get_system_specs ();
   for (SCM s = specs; scm_is_pair (s); s = scm_cdr (s))
     {
-      if (Paper_score *ps = dynamic_cast<Paper_score *> (unsmob_music_output (scm_car (s))))
+      if (Paper_score *ps = dynamic_cast<Paper_score *> (Music_output::unsmob (scm_car (s))))
         {
           system_specs_.push_back (System_spec (ps));
         }
       else
         {
-          Prob *pb = unsmob_prob (scm_car (s));
+          Prob *pb = Prob::unsmob (scm_car (s));
           assert (pb);
 
           pb->protect ();
index 9a7c8a416d77538070fe1033d6a44a795903a905..933368517c8f7e43b3571e72ae232031ab96decc 100644 (file)
@@ -29,8 +29,8 @@ LY_DEFINE (ly_get_spacing_spec, "ly:get-spacing-spec", 2, 0, 0,
   LY_ASSERT_SMOB (Grob, from_scm, 1);
   LY_ASSERT_SMOB (Grob, to_scm, 2);
 
-  Grob *from = unsmob_grob (from_scm);
-  Grob *to = unsmob_grob (to_scm);
+  Grob *from = Grob::unsmob (from_scm);
+  Grob *to = Grob::unsmob (to_scm);
 
   return Page_layout_problem::get_spacing_spec (from, to, false, 0, 0);
 }
index 3a1a84cfc5add27da5165e2f8bcffe7399040bbf..471a5be7c16af74f3ea8c68a352af452f233db46 100644 (file)
@@ -44,7 +44,7 @@ Page_layout_problem::get_footnote_grobs (SCM lines)
   vector<Grob *> footnotes;
   for (SCM s = lines; scm_is_pair (s); s = scm_cdr (s))
     {
-      if (Grob *g = unsmob_grob (scm_car (s)))
+      if (Grob *g = Grob::unsmob (scm_car (s)))
         {
           System *sys = dynamic_cast<System *> (g);
           if (!sys)
@@ -55,7 +55,7 @@ Page_layout_problem::get_footnote_grobs (SCM lines)
           extract_grob_set (sys, "footnotes-after-line-breaking", footnote_grobs);
           footnotes.insert (footnotes.end (), footnote_grobs.begin (), footnote_grobs.end ());
         }
-      else if (Prob *p = unsmob_prob (scm_car (s)))
+      else if (Prob *p = Prob::unsmob (scm_car (s)))
         {
           SCM stencils = p->get_property ("footnotes");
           if (stencils == SCM_EOL)
@@ -82,9 +82,9 @@ Page_layout_problem::get_footnotes_from_lines (SCM lines)
     return SCM_EOL;
 
   bool footnotes_added;
-  if (Grob *g = unsmob_grob (scm_car (lines)))
+  if (Grob *g = Grob::unsmob (scm_car (lines)))
     footnotes_added = !scm_is_null (g->get_property ("footnote-stencil"));
-  else if (Prob *p = unsmob_prob (scm_car (lines)))
+  else if (Prob *p = Prob::unsmob (scm_car (lines)))
     footnotes_added = !scm_is_null (p->get_property ("footnote-stencil"));
   else
     {
@@ -100,9 +100,9 @@ Page_layout_problem::get_footnotes_from_lines (SCM lines)
   SCM out = SCM_EOL;
   for (SCM s = lines; scm_is_pair (s); s = scm_cdr (s))
     {
-      if (Grob *g = unsmob_grob (scm_car (s)))
+      if (Grob *g = Grob::unsmob (scm_car (s)))
         out = scm_cons (g->get_property ("footnote-stencil"), out);
-      else if (Prob *p = unsmob_prob (scm_car (s)))
+      else if (Prob *p = Prob::unsmob (scm_car (s)))
         out = scm_cons (p->get_property ("footnote-stencil"), out);
       else
         programming_error ("Systems on a page must be a prob or grob.");
@@ -175,13 +175,13 @@ Page_layout_problem::add_footnotes_to_lines (SCM lines, int counter, Paper_book
         }
       SCM markup = scm_call_1 (numbering_function, scm_from_int (counter));
       SCM stencil = Text_interface::interpret_markup (layout, props, markup);
-      Stencil *st = unsmob_stencil (stencil);
+      Stencil *st = Stencil::unsmob (stencil);
       if (!st)
         {
           programming_error ("Your numbering function needs to return a stencil.");
           markup = SCM_EOL;
           stencil = Stencil (Box (Interval (0, 0), Interval (0, 0)), SCM_EOL).smobbed_copy ();
-          st = unsmob_stencil (stencil);
+          st = Stencil::unsmob (stencil);
         }
       in_text_numbers = scm_cons (markup, in_text_numbers);
       numbers = scm_cons (stencil, numbers);
@@ -202,7 +202,7 @@ Page_layout_problem::add_footnotes_to_lines (SCM lines, int counter, Paper_book
 
   for (SCM p = numbers; scm_is_pair (p); p = scm_cdr (p))
     {
-      Stencil *st = unsmob_stencil (scm_car (p));
+      Stencil *st = Stencil::unsmob (scm_car (p));
       if (!st->extent (X_AXIS).is_empty ())
         st->translate_axis ((max_length - st->extent (X_AXIS)[RIGHT]),
                             X_AXIS);
@@ -213,7 +213,7 @@ Page_layout_problem::add_footnotes_to_lines (SCM lines, int counter, Paper_book
   for (SCM s = lines; scm_is_pair (s); s = scm_cdr (s))
     {
       // Take care of musical systems.
-      if (Grob *g = unsmob_grob (scm_car (s)))
+      if (Grob *g = Grob::unsmob (scm_car (s)))
         {
           System *sys = dynamic_cast<System *> (g);
           if (!sys)
@@ -238,7 +238,7 @@ Page_layout_problem::add_footnotes_to_lines (SCM lines, int counter, Paper_book
               SCM footnote_stl = Text_interface::interpret_markup (paper->self_scm (),
                                                                    props, footnote_markup);
 
-              Stencil footnote_stencil = *unsmob_stencil (footnote_stl);
+              Stencil footnote_stencil = *Stencil::unsmob (footnote_stl);
               bool do_numbering = to_boolean (footnote->get_property ("automatically-numbered"));
               if (Spanner *orig = dynamic_cast<Spanner *>(footnote))
                 {
@@ -259,7 +259,7 @@ Page_layout_problem::add_footnotes_to_lines (SCM lines, int counter, Paper_book
                           orig->broken_intos_[i]->set_property ("text", annotation_scm);
                     }
 
-                  Stencil annotation = *unsmob_stencil (scm_car (numbers));
+                  Stencil annotation = *Stencil::unsmob (scm_car (numbers));
                   annotation.translate_axis ((footnote_stencil.extent (Y_AXIS)[UP]
                                               + number_raise
                                               - annotation.extent (Y_AXIS)[UP]),
@@ -280,24 +280,24 @@ Page_layout_problem::add_footnotes_to_lines (SCM lines, int counter, Paper_book
           sys->set_property ("footnote-stencil", mol.smobbed_copy ());
         }
       // Take care of top-level markups
-      else if (Prob *p = unsmob_prob (scm_car (s)))
+      else if (Prob *p = Prob::unsmob (scm_car (s)))
         {
           SCM stencils = p->get_property ("footnotes");
           Stencil mol;
 
           for (SCM st = stencils; scm_is_pair (st); st = scm_cdr (st))
             {
-              Stencil footnote_stencil = *unsmob_stencil (scm_caddar (st));
+              Stencil footnote_stencil = *Stencil::unsmob (scm_caddar (st));
               bool do_numbering = to_boolean (scm_cadar (st));
               SCM in_text_stencil = Stencil ().smobbed_copy ();
               if (do_numbering)
                 {
-                  Stencil annotation = *unsmob_stencil (scm_car (numbers));
+                  Stencil annotation = *Stencil::unsmob (scm_car (numbers));
                   SCM in_text_annotation = scm_car (in_text_numbers);
                   in_text_stencil = Text_interface::interpret_markup (layout,
                                                                       props,
                                                                       in_text_annotation);
-                  if (!unsmob_stencil (in_text_stencil))
+                  if (!Stencil::unsmob (in_text_stencil))
                     in_text_stencil = SCM_EOL;
                   annotation.translate_axis ((footnote_stencil.extent (Y_AXIS)[UP]
                                               + number_raise
@@ -335,7 +335,7 @@ Page_layout_problem::get_footnote_separator_stencil (Output_def *paper)
   SCM footnote_stencil = Text_interface::interpret_markup (paper->self_scm (),
                                                            props, markup);
 
-  Stencil *footnote_separator = unsmob_stencil (footnote_stencil);
+  Stencil *footnote_separator = Stencil::unsmob (footnote_stencil);
 
   return footnote_separator ? *footnote_separator : Stencil ();
 }
@@ -352,7 +352,7 @@ Page_layout_problem::add_footnotes_to_footer (SCM footnotes, Stencil foot, Paper
 
   for (SCM s = footnotes; scm_is_pair (s); s = scm_cdr (s))
     {
-      Stencil *stencil = unsmob_stencil (scm_car (s));
+      Stencil *stencil = Stencil::unsmob (scm_car (s));
 
       if (!stencil)
         continue;
@@ -377,7 +377,7 @@ Page_layout_problem::add_footnotes_to_footer (SCM footnotes, Stencil foot, Paper
 Page_layout_problem::Page_layout_problem (Paper_book *pb, SCM page_scm, SCM systems)
   : bottom_skyline_ (DOWN)
 {
-  Prob *page = unsmob_prob (page_scm);
+  Prob *page = Prob::unsmob (page_scm);
   bottom_loose_baseline_ = 0;
   header_height_ = 0;
   footer_height_ = 0;
@@ -388,8 +388,8 @@ Page_layout_problem::Page_layout_problem (Paper_book *pb, SCM page_scm, SCM syst
 
   if (page)
     {
-      Stencil *head = unsmob_stencil (page->get_property ("head-stencil"));
-      Stencil *foot = unsmob_stencil (page->get_property ("foot-stencil"));
+      Stencil *head = Stencil::unsmob (page->get_property ("head-stencil"));
+      Stencil *foot = Stencil::unsmob (page->get_property ("foot-stencil"));
 
       Stencil foot_stencil = foot ? *foot : Stencil ();
 
@@ -433,7 +433,7 @@ Page_layout_problem::Page_layout_problem (Paper_book *pb, SCM page_scm, SCM syst
       markup_markup_spacing = paper->c_variable ("markup-markup-spacing");
       last_bottom_spacing = paper->c_variable ("last-bottom-spacing");
       top_system_spacing = paper->c_variable ("top-system-spacing");
-      if (scm_is_pair (systems) && unsmob_prob (scm_car (systems)))
+      if (scm_is_pair (systems) && Prob::unsmob (scm_car (systems)))
         top_system_spacing = paper->c_variable ("top-markup-spacing");
 
       // Note: the page height here does _not_ reserve space for headers and
@@ -453,7 +453,7 @@ Page_layout_problem::Page_layout_problem (Paper_book *pb, SCM page_scm, SCM syst
     {
       bool first = (s == systems);
 
-      if (Grob *g = unsmob_grob (scm_car (s)))
+      if (Grob *g = Grob::unsmob (scm_car (s)))
         {
           System *sys = dynamic_cast<System *> (g);
           if (!sys)
@@ -479,7 +479,7 @@ Page_layout_problem::Page_layout_problem (Paper_book *pb, SCM page_scm, SCM syst
           append_system (sys, spring, indent, padding);
           last_system_was_title = false;
         }
-      else if (Prob *p = unsmob_prob (scm_car (s)))
+      else if (Prob *p = Prob::unsmob (scm_car (s)))
         {
           SCM spec = first ? top_system_spacing
                      : (last_system_was_title ? markup_markup_spacing : score_markup_spacing);
@@ -538,7 +538,7 @@ Page_layout_problem::set_footer_height (Real height)
 void
 Page_layout_problem::append_system (System *sys, Spring const &spring, Real indent, Real padding)
 {
-  Grob *align = unsmob_grob (sys->get_object ("vertical-alignment"));
+  Grob *align = Grob::unsmob (sys->get_object ("vertical-alignment"));
   if (!align)
     return;
 
@@ -554,7 +554,7 @@ Page_layout_problem::append_system (System *sys, Spring const &spring, Real inde
   build_system_skyline (elts, minimum_offsets_with_min_dist, &up_skyline, &down_skyline);
   up_skyline.shift (indent);
   down_skyline.shift (indent);
-  Stencil *in_note_stencil = unsmob_stencil (sys->get_property ("in-note-stencil"));
+  Stencil *in_note_stencil = Stencil::unsmob (sys->get_property ("in-note-stencil"));
 
   if (in_note_stencil && in_note_stencil->extent (Y_AXIS).length () > 0)
     {
@@ -669,7 +669,7 @@ Page_layout_problem::append_prob (Prob *prob, Spring const &spring, Real padding
                               bottom_loose_baseline_);
       bottom_skyline_ = (*sky)[DOWN];
     }
-  else if (Stencil *sten = unsmob_stencil (prob->get_property ("stencil")))
+  else if (Stencil *sten = Stencil::unsmob (prob->get_property ("stencil")))
     {
       Interval iv = sten->extent (Y_AXIS);
       minimum_distance = iv[UP] - bottom_skyline_.max_height ();
@@ -772,7 +772,7 @@ Page_layout_problem::find_system_offsets ()
         {
           *tail = scm_cons (scm_from_double (solution_[spring_idx]), SCM_EOL);
           tail = SCM_CDRLOC (*tail);
-          Interval prob_extent = unsmob_stencil (elements_[i].prob->get_property ("stencil"))->extent (Y_AXIS);
+          Interval prob_extent = Stencil::unsmob (elements_[i].prob->get_property ("stencil"))->extent (Y_AXIS);
 
           // Lay out any non-spaceable lines between this line and
           // the last one.
@@ -1025,7 +1025,7 @@ Page_layout_problem::build_system_skyline (vector<Grob *> const &staves,
 Interval
 Page_layout_problem::prob_extent (Prob *p)
 {
-  Stencil *sten = unsmob_stencil (p->get_property ("stencil"));
+  Stencil *sten = Stencil::unsmob (p->get_property ("stencil"));
   return sten ? sten->extent (Y_AXIS) : Interval (0, 0);
 }
 
index d9c1bd12fa4c17b8520e0f344ef39d768cdcdc3e..a3127e0706cc25b00a5e2fe00fd01072daa7598f 100644 (file)
@@ -148,7 +148,7 @@ Page_turn_engraver::acknowledge_note_head (Grob_info gi)
   Stream_event *cause = gi.event_cause ();
 
   Duration *dur_ptr = cause
-                      ? unsmob_duration (cause->get_property ("duration"))
+                      ? Duration::unsmob (cause->get_property ("duration"))
                       : 0;
 
   if (!dur_ptr)
@@ -208,7 +208,7 @@ Page_turn_engraver::start_translation_timestep ()
 void
 Page_turn_engraver::stop_translation_timestep ()
 {
-  Grob *pc = unsmob_grob (get_property ("currentCommandColumn"));
+  Grob *pc = Grob::unsmob (get_property ("currentCommandColumn"));
 
   if (pc)
     {
@@ -239,7 +239,7 @@ Page_turn_engraver::stop_translation_timestep ()
     {
       Rational now = now_mom ().main_part_;
       Real pen = penalty ((now_mom () - rest_begin_).main_part_ + repeat_begin_rest_length_);
-      Moment *m = unsmob_moment (get_property ("minimumRepeatLengthForPageTurn"));
+      Moment *m = Moment::unsmob (get_property ("minimumRepeatLengthForPageTurn"));
       if (m && *m > (now_mom () - repeat_begin_))
         pen = infinity_f;
 
index 0d997b61ddf4159d03f613c075967cc219724560..aec08689327b0a773c77f4726fb1931120420d1b 100644 (file)
@@ -35,7 +35,7 @@ LY_DEFINE (ly_pango_font_p, "ly:pango-font?",
            (SCM f),
            "Is @var{f} a pango font?")
 {
-  return scm_from_bool (dynamic_cast<Pango_font *> (unsmob_metrics (f)));
+  return scm_from_bool (dynamic_cast<Pango_font *> (Font_metric::unsmob (f)));
 }
 
 LY_DEFINE (ly_pango_font_physical_fonts, "ly:pango-font-physical-fonts",
@@ -44,7 +44,7 @@ LY_DEFINE (ly_pango_font_physical_fonts, "ly:pango-font-physical-fonts",
            "Return alist of @code{(ps-name file-name font-index)} lists"
            " for Pango font@tie{}@var{f}.")
 {
-  Pango_font *pf = dynamic_cast<Pango_font *> (unsmob_metrics (f));
+  Pango_font *pf = dynamic_cast<Pango_font *> (Font_metric::unsmob (f));
 
   SCM alist = SCM_EOL;
   if (pf)
index 9b3d1a45dde487df878a08213d37afe5f1e6b613..5023f000c8918807a5bde99b20922d4747391154 100644 (file)
@@ -26,7 +26,7 @@ LY_DEFINE (ly_paper_book_pages, "ly:paper-book-pages",
            "Return pages in @code{Paper_book} object @var{pb}.")
 {
   LY_ASSERT_SMOB (Paper_book, pb, 1);
-  return unsmob_paper_book (pb)->pages ();
+  return Paper_book::unsmob (pb)->pages ();
 }
 
 LY_DEFINE (ly_paper_book_scopes, "ly:paper-book-scopes",
@@ -34,7 +34,7 @@ LY_DEFINE (ly_paper_book_scopes, "ly:paper-book-scopes",
            "Return scopes in @code{Paper_book} object @var{pb}.")
 {
   LY_ASSERT_SMOB (Paper_book, pb, 1);
-  Paper_book *book = unsmob_paper_book (pb);
+  Paper_book *book = Paper_book::unsmob (pb);
 
   SCM scopes = SCM_EOL;
   if (book->parent_)
@@ -52,7 +52,7 @@ LY_DEFINE (ly_paper_book_performances, "ly:paper-book-performances",
            "Return performances in @code{Paper_book} object @var{pb}.")
 {
   LY_ASSERT_SMOB (Paper_book, pb, 1);
-  return unsmob_paper_book (pb)->performances ();
+  return Paper_book::unsmob (pb)->performances ();
 }
 
 LY_DEFINE (ly_paper_book_systems, "ly:paper-book-systems",
@@ -60,7 +60,7 @@ LY_DEFINE (ly_paper_book_systems, "ly:paper-book-systems",
            "Return systems in @code{Paper_book} object @var{pb}.")
 {
   LY_ASSERT_SMOB (Paper_book, pb, 1);
-  return unsmob_paper_book (pb)->systems ();
+  return Paper_book::unsmob (pb)->systems ();
 }
 
 LY_DEFINE (ly_paper_book_paper, "ly:paper-book-paper",
@@ -69,7 +69,7 @@ LY_DEFINE (ly_paper_book_paper, "ly:paper-book-paper",
            " in @code{Paper_book} object @var{pb}.")
 {
   LY_ASSERT_SMOB (Paper_book, pb, 1);
-  Paper_book *pbook = unsmob_paper_book (pb);
+  Paper_book *pbook = Paper_book::unsmob (pb);
   return pbook->paper_->self_scm ();
 }
 
@@ -79,6 +79,6 @@ LY_DEFINE (ly_paper_book_header, "ly:paper-book-header",
            " in @code{Paper_book} object @var{pb}.")
 {
   LY_ASSERT_SMOB (Paper_book, pb, 1);
-  Paper_book *pbook = unsmob_paper_book (pb);
+  Paper_book *pbook = Paper_book::unsmob (pb);
   return pbook->header_;
 }
index 9035d355a2adea0535b9e873887535f1b7871efd..fba89c2c83abf249666b15b8b82b64c1db393ae3 100644 (file)
@@ -141,7 +141,7 @@ Paper_book::output_aux (SCM output_channel,
   if (scm_is_pair (bookparts_))
     {
       for (SCM p = bookparts_; scm_is_pair (p); p = scm_cdr (p))
-        if (Paper_book *pbookpart = unsmob_paper_book (scm_car (p)))
+        if (Paper_book *pbookpart = Paper_book::unsmob (scm_car (p)))
           {
             bool is_last_part = (is_last && !scm_is_pair (scm_cdr (p)));
             page_nb += pbookpart->output_aux (output_channel,
@@ -204,11 +204,11 @@ Paper_book::output (SCM output_channel)
       if (framework != SCM_BOOL_F)
         {
           SCM func = scm_variable_ref (framework);
-          scm_apply_0 (func, scm_list_n (output_channel,
-                                         self_scm (),
-                                         scopes,
-                                         dump_fields (),
-                                         SCM_UNDEFINED));
+          scm_call_4 (func,
+                      output_channel,
+                      self_scm (),
+                      scopes,
+                      dump_fields ());
         }
       else
         warning (_f ("program option -dprint-pages not supported by backend `%s'",
@@ -223,11 +223,11 @@ Paper_book::output (SCM output_channel)
       if (framework != SCM_BOOL_F)
         {
           SCM func = scm_variable_ref (framework);
-          scm_apply_0 (func, scm_list_n (output_channel,
-                                         self_scm (),
-                                         scopes,
-                                         dump_fields (),
-                                         SCM_UNDEFINED));
+          scm_call_4 (func,
+                      output_channel,
+                      self_scm (),
+                      scopes,
+                      dump_fields ());
         }
       else
         warning (_f ("program option -dpreview not supported by backend `%s'",
@@ -273,12 +273,11 @@ Paper_book::classic_output (SCM output)
   SCM func = scm_c_module_lookup (mod, "output-classic-framework");
 
   func = scm_variable_ref (func);
-  scm_apply_0 (func, scm_list_n (output,
-                                 self_scm (),
-                                 scopes,
-                                 dump_fields (),
-                                 SCM_UNDEFINED));
-
+  scm_call_4 (func,
+              output,
+              self_scm (),
+              scopes,
+              dump_fields ());
   progress_indication ("\n");
 }
 
@@ -299,8 +298,8 @@ Paper_book::book_title ()
                       paper_->self_scm (),
                       scopes);
 
-  if (unsmob_stencil (tit))
-    title = *unsmob_stencil (tit);
+  if (Stencil::unsmob (tit))
+    title = *Stencil::unsmob (tit);
 
   if (!title.is_empty ())
     title.align_to (Y_AXIS, UP);
@@ -328,8 +327,8 @@ Paper_book::score_title (SCM header)
                       paper_->self_scm (),
                       scopes);
 
-  if (unsmob_stencil (tit))
-    title = *unsmob_stencil (tit);
+  if (Stencil::unsmob (tit))
+    title = *Stencil::unsmob (tit);
 
   if (!title.is_empty ())
     title.align_to (Y_AXIS, UP);
@@ -340,7 +339,7 @@ Paper_book::score_title (SCM header)
 void
 set_page_permission (SCM sys, SCM symbol, SCM permission)
 {
-  if (Paper_score *ps = dynamic_cast<Paper_score *> (unsmob_music_output (sys)))
+  if (Paper_score *ps = dynamic_cast<Paper_score *> (Music_output::unsmob (sys)))
     {
       vector<Grob *> cols = ps->get_columns ();
       if (cols.size ())
@@ -350,7 +349,7 @@ set_page_permission (SCM sys, SCM symbol, SCM permission)
           col->find_prebroken_piece (LEFT)->set_property (symbol, permission);
         }
     }
-  else if (Prob *pb = unsmob_prob (sys))
+  else if (Prob *pb = Prob::unsmob (sys))
     pb->set_property (symbol, permission);
 }
 
@@ -384,7 +383,7 @@ set_system_penalty (SCM sys, SCM header)
 void
 set_labels (SCM sys, SCM labels)
 {
-  if (Paper_score *ps = dynamic_cast<Paper_score *> (unsmob_music_output (sys)))
+  if (Paper_score *ps = dynamic_cast<Paper_score *> (Music_output::unsmob (sys)))
     {
       vector<Grob *> cols = ps->get_columns ();
       if (cols.size ())
@@ -400,7 +399,7 @@ set_labels (SCM sys, SCM labels)
                                                              labels)));
         }
     }
-  else if (Prob *pb = unsmob_prob (sys))
+  else if (Prob *pb = Prob::unsmob (sys))
     pb->set_property ("labels",
                       scm_append_x (scm_list_2 (pb->get_property ("labels"),
                                                 labels)));
@@ -461,7 +460,7 @@ Paper_book::get_system_specs ()
           if (header_0_ == SCM_EOL)
             header_0_ = header;
         }
-      else if (Page_marker *page_marker = unsmob_page_marker (scm_car (s)))
+      else if (Page_marker *page_marker = Page_marker::unsmob (scm_car (s)))
         {
           /* page markers are used to set page breaking/turning permission,
              or to place bookmarking labels */
@@ -479,7 +478,7 @@ Paper_book::get_system_specs ()
               labels = scm_cons (page_marker->label (), labels);
             }
         }
-      else if (Music_output *mop = unsmob_music_output (scm_car (s)))
+      else if (Music_output *mop = Music_output::unsmob (scm_car (s)))
         {
           if (Paper_score *pscore = dynamic_cast<Paper_score *> (mop))
             {
@@ -488,10 +487,10 @@ Paper_book::get_system_specs ()
               if (scm_is_pair (system_specs))
                 set_system_penalty (scm_car (system_specs), header);
 
-              if (unsmob_prob (title))
+              if (Prob::unsmob (title))
                 {
                   system_specs = scm_cons (title, system_specs);
-                  unsmob_prob (title)->unprotect ();
+                  Prob::unsmob (title)->unprotect ();
                 }
 
               header = SCM_EOL;
@@ -529,9 +528,9 @@ Paper_book::get_system_specs ()
               ps->set_property ("last-markup-line", SCM_BOOL_F);
               ps->set_property ("first-markup-line", SCM_BOOL_F);
 
-              paper_system_set_stencil (ps, *unsmob_stencil (t));
+              paper_system_set_stencil (ps, *Stencil::unsmob (t));
 
-              SCM footnotes = get_footnotes (unsmob_stencil (t)->expr ());
+              SCM footnotes = get_footnotes (Stencil::unsmob (t)->expr ());
               ps->set_property ("footnotes", footnotes);
               ps->set_property ("is-title", SCM_BOOL_T);
               if (list == texts)
@@ -582,7 +581,7 @@ Paper_book::systems ()
     {
       SCM system_list = SCM_EOL;
       for (SCM p = bookparts_; scm_is_pair (p); p = scm_cdr (p))
-        if (Paper_book *pbookpart = unsmob_paper_book (scm_car (p)))
+        if (Paper_book *pbookpart = Paper_book::unsmob (scm_car (p)))
           system_list = scm_cons (pbookpart->systems (), system_list);
       systems_ = scm_append (scm_reverse_x (system_list, SCM_EOL));
     }
@@ -592,7 +591,7 @@ Paper_book::systems ()
       for (SCM s = specs; scm_is_pair (s); s = scm_cdr (s))
         {
           if (Paper_score * pscore
-              = dynamic_cast<Paper_score *> (unsmob_music_output (scm_car (s))))
+              = dynamic_cast<Paper_score *> (Music_output::unsmob (scm_car (s))))
             {
               SCM system_list
                 = scm_vector_to_list (pscore->get_paper_systems ());
@@ -611,7 +610,7 @@ Paper_book::systems ()
       Prob *last = 0;
       for (SCM s = systems_; scm_is_pair (s); s = scm_cdr (s))
         {
-          Prob *ps = unsmob_prob (scm_car (s));
+          Prob *ps = Prob::unsmob (scm_car (s));
           ps->set_property ("number", scm_from_int (++i));
 
           if (last
@@ -623,7 +622,7 @@ Paper_book::systems ()
           if (scm_is_pair (scm_cdr (s)))
             {
               SCM perm = ps->get_property ("page-break-permission");
-              Prob *next = unsmob_prob (scm_cadr (s));
+              Prob *next = Prob::unsmob (scm_cadr (s));
               if (perm == SCM_EOL)
                 next->set_property ("penalty", scm_from_int (10001));
               else if (perm == ly_symbol2scm ("force"))
@@ -645,25 +644,26 @@ Paper_book::pages ()
   if (scm_is_pair (bookparts_))
     {
       for (SCM p = bookparts_; scm_is_pair (p); p = scm_cdr (p))
-        if (Paper_book *pbookpart = unsmob_paper_book (scm_car (p)))
-          pages_ = scm_append_x (scm_list_2 (pages_, pbookpart->pages ()));
+        if (Paper_book *pbookpart = Paper_book::unsmob (scm_car (p)))
+          pages_ = scm_cons (pbookpart->pages (), pages_);
+      pages_ = scm_append (scm_reverse_x (pages_, SCM_EOL));
     }
   else if (scm_is_pair (scores_))
     {
       SCM page_breaking = paper_->c_variable ("page-breaking");
-      pages_ = scm_apply_0 (page_breaking, scm_list_1 (self_scm ()));
+      pages_ = scm_call_1 (page_breaking, self_scm ());
 
       // Create all the page stencils.
       SCM page_module = scm_c_resolve_module ("scm page");
       SCM page_stencil = scm_c_module_lookup (page_module, "page-stencil");
       page_stencil = scm_variable_ref (page_stencil);
       for (SCM pages = pages_; scm_is_pair (pages); pages = scm_cdr (pages))
-        scm_apply_1 (page_stencil, scm_car (pages), SCM_EOL);
+        scm_call_1 (page_stencil, scm_car (pages));
 
       // Perform any user-supplied post-processing.
       SCM post_process = paper_->c_variable ("page-post-process");
       if (ly_is_procedure (post_process))
-        scm_apply_2 (post_process, paper_->self_scm (), pages_, SCM_EOL);
+        scm_call_2 (post_process, paper_->self_scm (), pages_);
 
       /* set systems_ from the pages */
       if (systems_ == SCM_BOOL_F)
@@ -671,10 +671,11 @@ Paper_book::pages ()
           systems_ = SCM_EOL;
           for (SCM p = pages_; scm_is_pair (p); p = scm_cdr (p))
             {
-              Prob *page = unsmob_prob (scm_car (p));
+              Prob *page = Prob::unsmob (scm_car (p));
               SCM systems = page->get_property ("lines");
-              systems_ = scm_append (scm_list_2 (systems_, systems));
+              systems_ = scm_cons (systems, systems_);
             }
+          systems_ = scm_append (scm_reverse_x (systems_, SCM_EOL));
         }
     }
   return pages_;
index 0620bafdbd4385a22e400bdeaf165a6a8e58b368..97884e26432f9342824efd2185e682e9c2c3423c 100644 (file)
@@ -98,7 +98,7 @@ Paper_column_engraver::make_columns ()
 void
 Paper_column_engraver::initialize ()
 {
-  system_ = dynamic_cast<System *> (unsmob_grob (get_property ("rootSystem")));
+  system_ = dynamic_cast<System *> (Grob::unsmob (get_property ("rootSystem")));
   make_columns ();
 
   system_->set_bound (LEFT, command_column_);
@@ -214,7 +214,7 @@ Paper_column_engraver::process_music ()
   if (start_of_measure)
     {
       Moment mlen = Moment (measure_length (context ()));
-      Grob *column = unsmob_grob (get_property ("currentCommandColumn"));
+      Grob *column = Grob::unsmob (get_property ("currentCommandColumn"));
       if (column)
         column->set_property ("measure-length", mlen.smobbed_copy ());
       else
@@ -239,7 +239,7 @@ Paper_column_engraver::stop_translation_timestep ()
 
       if (!elem->get_parent (X_AXIS))
         elem->set_parent (col, X_AXIS);
-      if (!unsmob_grob (elem->get_object ("axis-group-parent-X")))
+      if (!Grob::unsmob (elem->get_object ("axis-group-parent-X")))
         elem->set_object ("axis-group-parent-X", col->self_scm ());
 
       if (Accidental_placement::has_interface (elem)
@@ -279,7 +279,7 @@ Paper_column_engraver::stop_translation_timestep ()
 
   SCM mpos = get_property ("measurePosition");
   SCM barnum = get_property ("internalBarNumber");
-  if (unsmob_moment (mpos)
+  if (Moment::unsmob (mpos)
       && scm_is_integer (barnum))
     {
       SCM where = scm_cons (barnum,
index 1cb1452c852dba5eef1ad055387bbab354df5aa4..c6f8f0d742d6676c22478d9573112b113e18db0d 100644 (file)
@@ -118,7 +118,7 @@ Moment
 Paper_column::when_mom (Grob *me)
 {
   SCM m = me->get_property ("when");
-  if (Moment *when = unsmob_moment (m))
+  if (Moment *when = Moment::unsmob (m))
     return *when;
   return Moment (0);
 }
@@ -128,8 +128,8 @@ Paper_column::is_musical (Grob *me)
 {
   SCM m = me->get_property ("shortest-starter-duration");
   Moment s (0);
-  if (unsmob_moment (m))
-    s = *unsmob_moment (m);
+  if (Moment::unsmob (m))
+    s = *Moment::unsmob (m);
   return s != Moment (0);
 }
 
@@ -252,11 +252,11 @@ MAKE_SCHEME_CALLBACK (Paper_column, print, 1);
 SCM
 Paper_column::print (SCM p)
 {
-  Paper_column *me = dynamic_cast<Paper_column *> (unsmob_grob (p));
+  Paper_column *me = dynamic_cast<Paper_column *> (Grob::unsmob (p));
 
   string r = ::to_string (Paper_column::get_rank (me));
 
-  Moment *mom = unsmob_moment (me->get_property ("when"));
+  Moment *mom = Moment::unsmob (me->get_property ("when"));
   string when = mom ? mom->to_string () : "?/?";
 
   Font_metric *musfont = Font_interface::get_default_font (me);
@@ -267,9 +267,9 @@ Paper_column::print (SCM p)
   SCM when_mol = Text_interface::interpret_markup (me->layout ()->self_scm (),
                                                    properties,
                                                    ly_string2scm (when));
-  Stencil t = *unsmob_stencil (scm_mol);
+  Stencil t = *Stencil::unsmob (scm_mol);
   t.scale (1.2, 1.4);
-  t.add_at_edge (Y_AXIS, DOWN, *unsmob_stencil (when_mol), 0.1);
+  t.add_at_edge (Y_AXIS, DOWN, *Stencil::unsmob (when_mol), 0.1);
   t.align_to (X_AXIS, LEFT);
   // compensate for font serifs and half letter-distance
   t.translate (Offset (-0.1, 0));
@@ -287,9 +287,9 @@ Paper_column::print (SCM p)
   for (SCM s = me->get_object ("ideal-distances");
        scm_is_pair (s); s = scm_cdr (s))
     {
-      Spring *sp = unsmob_spring (scm_caar (s));
-      if (!unsmob_grob (scm_cdar (s))
-          || !unsmob_grob (scm_cdar (s))->get_system ())
+      Spring *sp = Spring::unsmob (scm_caar (s));
+      if (!Grob::unsmob (scm_cdar (s))
+          || !Grob::unsmob (scm_cdar (s))->get_system ())
         continue;
 
       j++;
@@ -302,7 +302,7 @@ Paper_column::print (SCM p)
       SCM stil = Text_interface::interpret_markup (me->layout ()->self_scm (),
                                                    properties,
                                                    ly_string2scm (String_convert::form_string ("%5.2lf", sp->distance ())));
-      Stencil *number_stc = unsmob_stencil (stil);
+      Stencil *number_stc = Stencil::unsmob (stil);
       number_stc->scale (1, 1.1);
       Real num_height = number_stc->extent (Y_AXIS).length ();
       Real num_len = number_stc->extent (X_AXIS).length ();
@@ -333,7 +333,7 @@ Paper_column::print (SCM p)
        scm_is_pair (s); s = scm_cdr (s))
     {
       Real dist = scm_to_double (scm_cdar (s));
-      Grob *other = unsmob_grob (scm_caar (s));
+      Grob *other = Grob::unsmob (scm_caar (s));
       if (!other || other->get_system () != me->get_system ())
         continue;
 
@@ -347,7 +347,7 @@ Paper_column::print (SCM p)
       SCM stil = Text_interface::interpret_markup (me->layout ()->self_scm (),
                                                    properties,
                                                    ly_string2scm (String_convert::form_string ("%5.2lf", dist)));
-      Stencil *number_stc = unsmob_stencil (stil);
+      Stencil *number_stc = Stencil::unsmob (stil);
       number_stc->scale (1, 1.1);
       Real num_height = number_stc->extent (Y_AXIS).length ();
       Real num_len = number_stc->extent (X_AXIS).length ();
@@ -389,10 +389,10 @@ MAKE_SCHEME_CALLBACK (Paper_column, before_line_breaking, 1);
 SCM
 Paper_column::before_line_breaking (SCM grob)
 {
-  Grob *me = unsmob_grob (grob);
+  Grob *me = Grob::unsmob (grob);
 
   SCM bbm = me->get_object ("bounded-by-me");
-  Grob_array *ga = unsmob_grob_array (bbm);
+  Grob_array *ga = Grob_array::unsmob (bbm);
   if (!ga)
     return SCM_UNSPECIFIED;
 
index d3526bbfce5e33ef55650f8b58ccacdb7e8e03ff..34ce9cc1a4ddc02e33c4eccdad13aa0732f83f88 100644 (file)
@@ -67,14 +67,14 @@ find_scaled_font (Output_def *mod, Font_metric *f, Real m)
   SCM sizes = scm_hashq_ref (font_table, f->self_scm (), SCM_EOL);
   SCM handle = scm_assoc (scm_from_double (lookup_mag), sizes);
   if (scm_is_pair (handle))
-    return unsmob_metrics (scm_cdr (handle));
+    return Font_metric::unsmob (scm_cdr (handle));
 
   SCM val = Modified_font_metric::make_scaled_font_metric (f, lookup_mag);
 
   sizes = scm_acons (scm_from_double (lookup_mag), val, sizes);
-  unsmob_metrics (val)->unprotect ();
+  Font_metric::unsmob (val)->unprotect ();
   scm_hashq_set_x (font_table, f->self_scm (), sizes);
-  return unsmob_metrics (val);
+  return Font_metric::unsmob (val);
 }
 
 Font_metric *
@@ -88,7 +88,7 @@ find_pango_font (Output_def *layout, SCM descr, Real factor)
   SCM size_key = scm_from_double (factor);
   SCM handle = scm_assoc (size_key, sizes);
   if (scm_is_pair (handle))
-    return unsmob_metrics (scm_cdr (handle));
+    return Font_metric::unsmob (scm_cdr (handle));
 
   PangoFontDescription *description
     = pango_font_description_from_string (scm_i_string_chars (descr));
@@ -117,7 +117,7 @@ scale_output_def (Output_def *o, Real amount)
   SCM proc = ly_lily_module_constant ("scale-layout");
   SCM new_pap = scm_call_2 (proc, o->self_scm (), scm_from_double (amount));
 
-  o = unsmob_output_def (new_pap);
+  o = Output_def::unsmob (new_pap);
   o->protect ();
   return o;
 }
index 0d6f11de6bbc71f5d0177063cd7e3015e3b08552..33b2645f212618dd50627bdfa4edddd21e08c664 100644 (file)
@@ -57,8 +57,8 @@ LY_DEFINE (ly_outputter_dump_stencil, "ly:outputter-dump-stencil",
   LY_ASSERT_SMOB (Paper_outputter, outputter, 1);
   LY_ASSERT_SMOB (Stencil, stencil, 2);
 
-  Paper_outputter *po = unsmob_outputter (outputter);
-  Stencil *st = unsmob_stencil (stencil);
+  Paper_outputter *po = Paper_outputter::unsmob (outputter);
+  Stencil *st = Stencil::unsmob (stencil);
 
   po->output_stencil (*st);
   return SCM_UNSPECIFIED;
@@ -71,7 +71,7 @@ LY_DEFINE (ly_outputter_dump_string, "ly:outputter-dump-string",
   LY_ASSERT_SMOB (Paper_outputter, outputter, 1);
   LY_ASSERT_TYPE (scm_is_string, str, 2);
 
-  Paper_outputter *po = unsmob_outputter (outputter);
+  Paper_outputter *po = Paper_outputter::unsmob (outputter);
 
   return po->dump_string (str);
 }
@@ -81,7 +81,7 @@ LY_DEFINE (ly_outputter_port, "ly:outputter-port",
            "Return output port for @var{outputter}.")
 {
   LY_ASSERT_SMOB (Paper_outputter, outputter, 1);
-  Paper_outputter *po = unsmob_outputter (outputter);
+  Paper_outputter *po = Paper_outputter::unsmob (outputter);
 
   return po->file ();
 }
@@ -91,7 +91,7 @@ LY_DEFINE (ly_outputter_close, "ly:outputter-close",
            "Close port of @var{outputter}.")
 {
   LY_ASSERT_SMOB (Paper_outputter, outputter, 1);
-  Paper_outputter *po = unsmob_outputter (outputter);
+  Paper_outputter *po = Paper_outputter::unsmob (outputter);
 
   po->close ();
   return SCM_UNSPECIFIED;
@@ -102,7 +102,7 @@ LY_DEFINE (ly_outputter_output_scheme, "ly:outputter-output-scheme",
            "Eval @var{expr} in module of @var{outputter}.")
 {
   LY_ASSERT_SMOB (Paper_outputter, outputter, 1);
-  Paper_outputter *po = unsmob_outputter (outputter);
+  Paper_outputter *po = Paper_outputter::unsmob (outputter);
 
   po->output_scheme (expr);
 
@@ -115,6 +115,6 @@ LY_DEFINE (ly_outputter_module, "ly:outputter-module",
 {
   LY_ASSERT_SMOB (Paper_outputter, outputter, 1);
 
-  Paper_outputter *po = unsmob_outputter (outputter);
+  Paper_outputter *po = Paper_outputter::unsmob (outputter);
   return po->module ();
 }
index 372cd863d873306eb715355924de0f9209a0ca61..081ff686ae459cc9905fdb0dbf923ef1e3513ebd 100644 (file)
@@ -25,8 +25,8 @@ LY_DEFINE (ly_paper_score_paper_systems, "ly:paper-score-paper-systems",
            "Return vector of @code{paper_system} objects from"
            " @var{paper-score}.")
 {
-  LY_ASSERT_TYPE (unsmob_paper_score, paper_score, 1);
+  LY_ASSERT_TYPE (Paper_score::unsmob, paper_score, 1);
 
-  Paper_score *pscore = dynamic_cast<Paper_score *> (unsmob_music_output (paper_score));
+  Paper_score *pscore = dynamic_cast<Paper_score *> (Music_output::unsmob (paper_score));
   return pscore->get_paper_systems ();
 }
index de4c9fb50e1d35a54b563c32ba4d128791b8ee6e..bcc6e12e870274a00ad3e27e8ca117c8ea5e4ef7 100644 (file)
@@ -167,7 +167,7 @@ Paper_score::get_paper_systems ()
 }
 
 Paper_score *
-unsmob_paper_score (SCM x)
+Paper_score::unsmob (SCM x)
 {
-  return dynamic_cast<Paper_score *> (unsmob_music_output (x));
+  return dynamic_cast<Paper_score *> (Music_output::unsmob (x));
 }
index b20609a40d5658d9f269c6b611c96d1a9fcbdc49..b679d87c5ce6141ddebf1b086c135cd031278e92 100644 (file)
@@ -37,8 +37,8 @@ LY_DEFINE (ly_paper_system_minimum_distance, "ly:paper-system-minimum-distance",
            " their extents otherwise.")
 {
   Real ret = 0;
-  Prob *p1 = unsmob_prob (sys1);
-  Prob *p2 = unsmob_prob (sys2);
+  Prob *p1 = Prob::unsmob (sys1);
+  Prob *p2 = Prob::unsmob (sys2);
   Skyline_pair *sky1 = Skyline_pair::unsmob (p1->get_property ("vertical-skylines"));
   Skyline_pair *sky2 = Skyline_pair::unsmob (p2->get_property ("vertical-skylines"));
 
@@ -46,8 +46,8 @@ LY_DEFINE (ly_paper_system_minimum_distance, "ly:paper-system-minimum-distance",
     ret = (*sky1)[DOWN].distance ((*sky2)[UP]);
   else
     {
-      Stencil *s1 = unsmob_stencil (p1->get_property ("stencil"));
-      Stencil *s2 = unsmob_stencil (p2->get_property ("stencil"));
+      Stencil *s1 = Stencil::unsmob (p1->get_property ("stencil"));
+      Stencil *s2 = Stencil::unsmob (p2->get_property ("stencil"));
       Interval iv1 = s1->extent (Y_AXIS);
       Interval iv2 = s2->extent (Y_AXIS);
       ret = iv2[UP] - iv1[DOWN];
index d47fa7ce10f9ede0263f7818df3b955a5083371b..c8365abf13e05a62bda7fb9a0e6efcead001e195 100644 (file)
@@ -408,7 +408,7 @@ toplevel_expression:
        }
        | BOOK_IDENTIFIER {
                SCM proc = parser->lexer_->lookup_identifier
-                       (unsmob_book($1)->paper_
+                       (Book::unsmob($1)->paper_
                         ? "toplevel-book-handler"
                         : "toplevel-bookpart-handler");
                scm_call_2 (proc, parser->self_scm (), $1);
@@ -444,11 +444,11 @@ toplevel_expression:
                {
                        SCM proc = parser->lexer_->lookup_identifier ("toplevel-text-handler");
                        scm_call_2 (proc, parser->self_scm (), out);
-               } else if (unsmob_score ($1))
+               } else if (Score::unsmob ($1))
                {
                        SCM proc = parser->lexer_->lookup_identifier ("toplevel-score-handler");
                        scm_call_2 (proc, parser->self_scm (), $1);
-               } else if (Output_def * od = unsmob_output_def ($1)) {
+               } else if (Output_def * od = Output_def::unsmob ($1)) {
                        SCM id = SCM_EOL;
 
                        if (od->c_variable ("is-paper") == SCM_BOOL_T)
@@ -464,7 +464,7 @@ toplevel_expression:
        }
        | output_def {
                SCM id = SCM_EOL;
-               Output_def * od = unsmob_output_def ($1);
+               Output_def * od = Output_def::unsmob ($1);
 
                if (od->c_variable ("is-paper") == SCM_BOOL_T)
                        id = ly_symbol2scm ("$defaultpaper");
@@ -561,7 +561,7 @@ embedded_lilypond:
        | post_event post_events
        {
                $$ = scm_reverse_x ($2, SCM_EOL);
-               if (Music *m = unsmob_music ($1))
+               if (Music *m = Music::unsmob ($1))
                {
                        if (m->is_mus_type ("post-event-wrapper"))
                                $$ = scm_append
@@ -583,9 +583,9 @@ embedded_lilypond:
        | multiplied_duration
        | music_embedded music_embedded music_list {
                $3 = scm_reverse_x ($3, SCM_EOL);
-               if (unsmob_music ($2))
+               if (Music::unsmob ($2))
                        $3 = scm_cons ($2, $3);
-               if (unsmob_music ($1))
+               if (Music::unsmob ($1))
                        $3 = scm_cons ($1, $3);
                $$ = MAKE_SYNTAX ("sequential-music", @$, $3);
        }
@@ -647,7 +647,7 @@ identifier_init:
        | post_event_nofinger post_events
        {
                $$ = scm_reverse_x ($2, SCM_EOL);
-               if (Music *m = unsmob_music ($1))
+               if (Music *m = Music::unsmob ($1))
                {
                        if (m->is_mus_type ("post-event-wrapper"))
                                $$ = scm_append
@@ -687,10 +687,10 @@ context_def_spec_block:
        CONTEXT '{' context_def_spec_body '}'
        {
                $$ = $3;
-               Context_def *td = unsmob_context_def ($$);
+               Context_def *td = Context_def::unsmob ($$);
                if (!td) {
                        $$ = Context_def::make_scm ();
-                       td = unsmob_context_def ($$);
+                       td = Context_def::unsmob ($$);
                }
                td->origin ()->set_spot (@$);
        }
@@ -717,41 +717,41 @@ context_def_spec_body:
        }
        | context_def_spec_body context_mod {
                if (!SCM_UNBNDP ($2)) {
-                       Context_def *td = unsmob_context_def ($$);
+                       Context_def *td = Context_def::unsmob ($$);
                        if (!td) {
                                $$ = Context_def::make_scm ();
-                               td = unsmob_context_def ($$);
+                               td = Context_def::unsmob ($$);
                        }
-                       unsmob_context_def ($$)->add_context_mod ($2);
+                       Context_def::unsmob ($$)->add_context_mod ($2);
                }
        }
        | context_def_spec_body context_modification {
-                Context_def *td = unsmob_context_def ($$);
+                Context_def *td = Context_def::unsmob ($$);
                if (!td) {
                        $$ = Context_def::make_scm ();
-                       td = unsmob_context_def ($$);
+                       td = Context_def::unsmob ($$);
                }
-                SCM new_mods = unsmob_context_mod ($2)->get_mods ();
+                SCM new_mods = Context_mod::unsmob ($2)->get_mods ();
                 for (SCM m = new_mods; scm_is_pair (m); m = scm_cdr (m)) {
                     td->add_context_mod (scm_car (m));
                 }
        }
        | context_def_spec_body context_mod_arg {
-               Context_def *td = unsmob_context_def ($1);
+               Context_def *td = Context_def::unsmob ($1);
                if (scm_is_eq ($2, SCM_UNSPECIFIED))
                        ;
-               else if (!td && unsmob_context_def ($2))
+               else if (!td && Context_def::unsmob ($2))
                        $$ = $2;
                else {
                        if (!td) {
                                $$ = Context_def::make_scm ();
-                               td = unsmob_context_def ($$);
+                               td = Context_def::unsmob ($$);
                        }
-                       if (unsmob_music ($2)) {
+                       if (Music::unsmob ($2)) {
                                SCM proc = parser->lexer_->lookup_identifier ("context-mod-music-handler");
                                $2 = scm_call_2 (proc, parser->self_scm (), $2);
                        }
-                       if (Context_mod *cm = unsmob_context_mod ($2)) {
+                       if (Context_mod *cm = Context_mod::unsmob ($2)) {
                                for (SCM m = cm->get_mods (); scm_is_pair (m); m = scm_cdr (m)) {
                                        td->add_context_mod (scm_car (m));
                                }
@@ -766,7 +766,7 @@ context_def_spec_body:
 book_block:
        BOOK '{' book_body '}'  {
                $$ = $3;
-               unsmob_book ($$)->origin ()->set_spot (@$);
+               Book::unsmob ($$)->origin ()->set_spot (@$);
                pop_paper (parser);
                parser->lexer_->set_identifier (ly_symbol2scm ("$current-book"), SCM_BOOL_F);
        }
@@ -779,7 +779,7 @@ book_body:
        {
                Book *book = new Book;
                init_papers (parser);
-               book->paper_ = dynamic_cast<Output_def*> (unsmob_output_def (parser->lexer_->lookup_identifier ("$defaultpaper"))->clone ());
+               book->paper_ = dynamic_cast<Output_def*> (Output_def::unsmob (parser->lexer_->lookup_identifier ("$defaultpaper"))->clone ());
                book->paper_->unprotect ();
                push_paper (parser, book->paper_);
                book->header_ = get_header (parser);
@@ -790,8 +790,8 @@ book_body:
                parser->lexer_->set_identifier (ly_symbol2scm ("$current-book"), $1);
        }
        | book_body paper_block {
-               unsmob_book ($1)->paper_ = unsmob_output_def ($2);
-               set_paper (parser, unsmob_output_def ($2));
+               Book::unsmob ($1)->paper_ = Output_def::unsmob ($2);
+               set_paper (parser, Output_def::unsmob ($2));
        }
        | book_body bookpart_block {
                SCM proc = parser->lexer_->lookup_identifier ("book-bookpart-handler");
@@ -828,11 +828,11 @@ book_body:
                {
                        SCM proc = parser->lexer_->lookup_identifier ("book-text-handler");
                        scm_call_2 (proc, $1, out);
-               } else if (unsmob_score ($2))
+               } else if (Score::unsmob ($2))
                {
                        SCM proc = parser->lexer_->lookup_identifier ("book-score-handler");
                        scm_call_2 (proc, $1, $2);
-               } else if (Output_def *od = unsmob_output_def ($2)) {
+               } else if (Output_def *od = Output_def::unsmob ($2)) {
                        SCM id = SCM_EOL;
 
                        if (od->c_variable ("is-paper") == SCM_BOOL_T)
@@ -848,10 +848,10 @@ book_body:
        }
        | book_body
        {
-               parser->lexer_->add_scope (unsmob_book ($1)->header_);
+               parser->lexer_->add_scope (Book::unsmob ($1)->header_);
        } lilypond_header
        | book_body error {
-                Book *book = unsmob_book ($1);
+                Book *book = Book::unsmob ($1);
                book->paper_ = 0;
                book->scores_ = SCM_EOL;
                book->bookparts_ = SCM_EOL;
@@ -861,7 +861,7 @@ book_body:
 bookpart_block:
        BOOKPART '{' bookpart_body '}' {
                $$ = $3;
-               unsmob_book ($$)->origin ()->set_spot (@$);
+               Book::unsmob ($$)->origin ()->set_spot (@$);
                parser->lexer_->set_identifier (ly_symbol2scm ("$current-bookpart"), SCM_BOOL_F);
        }
        ;
@@ -876,7 +876,7 @@ bookpart_body:
                parser->lexer_->set_identifier (ly_symbol2scm ("$current-bookpart"), $1);
        }
        | bookpart_body paper_block {
-               unsmob_book ($$)->paper_ = unsmob_output_def ($2);
+               Book::unsmob ($$)->paper_ = Output_def::unsmob ($2);
        }
        | bookpart_body score_block {
                SCM proc = parser->lexer_->lookup_identifier ("bookpart-score-handler");
@@ -909,11 +909,11 @@ bookpart_body:
                {
                        SCM proc = parser->lexer_->lookup_identifier ("bookpart-text-handler");
                        scm_call_2 (proc, $1, out);
-               } else if (unsmob_score ($2))
+               } else if (Score::unsmob ($2))
                {
                        SCM proc = parser->lexer_->lookup_identifier ("bookpart-score-handler");
                        scm_call_2 (proc, $1, $2);
-               } else if (Output_def *od = unsmob_output_def ($2)) {
+               } else if (Output_def *od = Output_def::unsmob ($2)) {
                        SCM id = SCM_EOL;
 
                        if (od->c_variable ("is-paper") == SCM_BOOL_T)
@@ -929,13 +929,13 @@ bookpart_body:
        }
        | bookpart_body
        {
-                Book *book = unsmob_book ($1);
+                Book *book = Book::unsmob ($1);
                if (!ly_is_module (book->header_))
                        book->header_ = ly_make_module (false);
                parser->lexer_->add_scope (book->header_);
        } lilypond_header
        | bookpart_body error {
-                Book *book = unsmob_book ($1);
+                Book *book = Book::unsmob ($1);
                book->paper_ = 0;
                book->scores_ = SCM_EOL;
        }
@@ -943,31 +943,31 @@ bookpart_body:
 
 score_block:
        SCORE '{' score_body '}'        {
-               unsmob_score ($3)->origin ()->set_spot (@$);
+               Score::unsmob ($3)->origin ()->set_spot (@$);
                $$ = $3;
        }
        ;
 
 score_body:
        score_items {
-               if (!unsmob_score ($1)) {
+               if (!Score::unsmob ($1)) {
                        parser->parser_error (@1, _("Missing music in \\score"));
                        $$ = (new Score)->unprotect ();
                        if (scm_is_pair ($1) && ly_is_module (scm_car ($1)))
                        {
-                               unsmob_score ($$)->set_header (scm_car ($1));
+                               Score::unsmob ($$)->set_header (scm_car ($1));
                                $1 = scm_cdr ($1);
                        }
                        for (SCM p = scm_reverse_x ($1, SCM_EOL);
                             scm_is_pair (p); p = scm_cdr (p))
                        {
-                               unsmob_score ($$)->
-                                       add_output_def (unsmob_output_def (scm_car (p)));
+                               Score::unsmob ($$)->
+                                       add_output_def (Output_def::unsmob (scm_car (p)));
                        }
                }
        }
        | score_body error {
-               unsmob_score ($$)->error_found_ = true;
+               Score::unsmob ($$)->error_found_ = true;
        }
        ;
 
@@ -984,7 +984,7 @@ score_items:
        }
        | score_items score_item
        {
-               Output_def *od = unsmob_output_def ($2);
+               Output_def *od = Output_def::unsmob ($2);
                if (od) {
                        if (od->lookup_variable (ly_symbol2scm ("is-paper")) == SCM_BOOL_T)
                        {
@@ -992,18 +992,18 @@ score_items:
                                od = 0;
                                $2 = SCM_UNSPECIFIED;
                        }
-               } else if (!unsmob_score ($$)) {
-                       if (unsmob_music ($2)) {
+               } else if (!Score::unsmob ($$)) {
+                       if (Music::unsmob ($2)) {
                                SCM scorify = ly_lily_module_constant ("scorify-music");
                                $2 = scm_call_2 (scorify, $2, parser->self_scm ());
                        }
-                       if (unsmob_score ($2))
+                       if (Score::unsmob ($2))
                        {
                                $$ = $2;
                                $2 = SCM_UNSPECIFIED;
                        }
                }
-               Score *score = unsmob_score ($$);
+               Score *score = Score::unsmob ($$);
                if (score && scm_is_pair ($1)) {
                        if (ly_is_module (scm_car ($1)))
                        {
@@ -1013,7 +1013,7 @@ score_items:
                        for (SCM p = scm_reverse_x ($1, SCM_EOL);
                             scm_is_pair (p); p = scm_cdr (p))
                        {
-                               score->add_output_def (unsmob_output_def (scm_car (p)));
+                               score->add_output_def (Output_def::unsmob (scm_car (p)));
                        }
                }
                if (od) {
@@ -1028,7 +1028,7 @@ score_items:
        }
        | score_items
        {
-               if (Score *score = unsmob_score ($1)) {
+               if (Score *score = Score::unsmob ($1)) {
                        if (!ly_is_module (score->get_header ()))
                                score->set_header (ly_make_module (false));
                        parser->lexer_->add_scope (score->get_header ());
@@ -1050,7 +1050,7 @@ score_items:
 
 paper_block:
        output_def {
-                Output_def *od = unsmob_output_def ($1);
+                Output_def *od = Output_def::unsmob ($1);
 
                if (od->lookup_variable (ly_symbol2scm ("is-paper")) != SCM_BOOL_T)
                {
@@ -1110,7 +1110,7 @@ music_or_context_def:
 
 output_def_body:
        output_def_head_with_mode_switch '{' {
-               unsmob_output_def ($1)->input_origin_.set_spot (@$);
+               Output_def::unsmob ($1)->input_origin_.set_spot (@$);
                // This is a stupid trick to mark the beginning of the
                // body for deciding whether to allow
                // embedded_scm_active to have an output definition
@@ -1127,7 +1127,7 @@ output_def_body:
                // definitions.
                if (scm_is_pair ($1))
                {
-                       Output_def *o = unsmob_output_def ($2);
+                       Output_def *o = Output_def::unsmob ($2);
                        if (o) {
                                o->input_origin_.set_spot (@$);
                                $1 = o->self_scm ();
@@ -1137,10 +1137,10 @@ output_def_body:
                        } else
                                $1 = scm_car ($1);
                }
-               if (unsmob_context_def ($2))
-                       assign_context_def (unsmob_output_def ($1), $2);
+               if (Context_def::unsmob ($2))
+                       assign_context_def (Output_def::unsmob ($1), $2);
                // Seems unlikely, but let's be complete:
-               else if (unsmob_music ($2))
+               else if (Music::unsmob ($2))
                {
                        SCM proc = parser->lexer_->lookup_identifier
                                ("output-def-music-handler");
@@ -1165,8 +1165,8 @@ output_def_body:
        } music_or_context_def
        {
                parser->lexer_->pop_state ();
-               if (unsmob_context_def ($3))
-                       assign_context_def (unsmob_output_def ($1), $3);
+               if (Context_def::unsmob ($3))
+                       assign_context_def (Output_def::unsmob ($1), $3);
                else {
 
                        SCM proc = parser->lexer_->lookup_identifier
@@ -1201,7 +1201,7 @@ music_list:
                $$ = SCM_EOL;
        }
        | music_list music_embedded {
-               if (unsmob_music ($2))
+               if (Music::unsmob ($2))
                        $$ = scm_cons ($2, $1);
        }
        | music_list error {
@@ -1225,7 +1225,7 @@ music:    music_assign
        | pitch_or_music
        {
                $$ = make_music_from_simple (parser, @1, $1);
-                if (!unsmob_music ($$))
+                if (!Music::unsmob ($$))
                {
                         parser->parser_error (@1, _ ("music expected"));
                        $$ = MAKE_SYNTAX ("void-music", @$);
@@ -1236,7 +1236,7 @@ music:    music_assign
 music_embedded:
        music
        {
-               if (unsmob_music ($1)->is_mus_type ("post-event")) {
+               if (Music::unsmob ($1)->is_mus_type ("post-event")) {
                        parser->parser_error (@1, _ ("unexpected post-event"));
                        $$ = SCM_UNSPECIFIED;
                }
@@ -1253,7 +1253,7 @@ music_embedded:
        {
                Music *n = MY_MAKE_MUSIC ("NoteEvent", @$);
 
-               parser->default_duration_ = *unsmob_duration ($1);
+               parser->default_duration_ = *Duration::unsmob ($1);
                n->set_property ("duration", $1);
 
                if (scm_is_pair ($2))
@@ -1268,7 +1268,7 @@ music_embedded_backup:
        {
                if (scm_is_eq ($1, SCM_UNSPECIFIED))
                        $$ = $1;
-               else if (Music *m = unsmob_music ($1)) {
+               else if (Music *m = Music::unsmob ($1)) {
                        if (m->is_mus_type ("post-event")) {
                                parser->parser_error
                                        (@1, _ ("unexpected post-event"));
@@ -1347,11 +1347,11 @@ context_modification:
         }
        | WITH context_modification_arg
        {
-               if (unsmob_music ($2)) {
+               if (Music::unsmob ($2)) {
                        SCM proc = parser->lexer_->lookup_identifier ("context-mod-music-handler");
                        $2 = scm_call_2 (proc, parser->self_scm (), $2);
                }
-               if (unsmob_context_mod ($2))
+               if (Context_mod::unsmob ($2))
                        $$ = $2;
                else {
                        parser->parser_error (@2, _ ("not a context mod"));
@@ -1381,23 +1381,23 @@ context_mod_list:
         }
         | context_mod_list context_mod  {
                if (!SCM_UNBNDP ($2))
-                       unsmob_context_mod ($1)->add_context_mod ($2);
+                       Context_mod::unsmob ($1)->add_context_mod ($2);
         }
         | context_mod_list CONTEXT_MOD_IDENTIFIER {
-                 Context_mod *md = unsmob_context_mod ($2);
+                 Context_mod *md = Context_mod::unsmob ($2);
                  if (md)
-                     unsmob_context_mod ($1)->add_context_mods (md->get_mods ());
+                     Context_mod::unsmob ($1)->add_context_mods (md->get_mods ());
         }
        | context_mod_list context_mod_arg {
                if (scm_is_eq ($2, SCM_UNSPECIFIED))
                        ;
-               else if (unsmob_music ($2)) {
+               else if (Music::unsmob ($2)) {
                        SCM proc = parser->lexer_->lookup_identifier ("context-mod-music-handler");
                        $2 = scm_call_2 (proc, parser->self_scm (), $2);
                }
-               if (unsmob_context_mod ($2))
-                       unsmob_context_mod ($$)->add_context_mods
-                               (unsmob_context_mod ($2)->get_mods ());
+               if (Context_mod::unsmob ($2))
+                       Context_mod::unsmob ($$)->add_context_mods
+                               (Context_mod::unsmob ($2)->get_mods ());
                else {
                        parser->parser_error (@2, _ ("not a context mod"));
                }
@@ -2150,14 +2150,14 @@ complex_music:
 
 complex_music_prefix:
        CONTEXT symbol optional_id optional_context_mod {
-                Context_mod *ctxmod = unsmob_context_mod ($4);
+                Context_mod *ctxmod = Context_mod::unsmob ($4);
                 SCM mods = SCM_EOL;
                 if (ctxmod)
                         mods = ctxmod->get_mods ();
                $$ = START_MAKE_SYNTAX ("context-specification", $2, $3, mods, SCM_BOOL_F);
        }
        | NEWCONTEXT symbol optional_id optional_context_mod {
-                Context_mod *ctxmod = unsmob_context_mod ($4);
+                Context_mod *ctxmod = Context_mod::unsmob ($4);
                 SCM mods = SCM_EOL;
                 if (ctxmod)
                         mods = ctxmod->get_mods ();
@@ -2178,7 +2178,7 @@ mode_changed_music:
                parser->lexer_->pop_state ();
        }
        | mode_changing_head_with_context optional_context_mod grouped_music_list {
-                Context_mod *ctxmod = unsmob_context_mod ($2);
+                Context_mod *ctxmod = Context_mod::unsmob ($2);
                 SCM mods = SCM_EOL;
                 if (ctxmod)
                         mods = ctxmod->get_mods ();
@@ -2597,7 +2597,7 @@ event_chord:
        simple_element post_events {
                // Let the rhythmic music iterator sort this mess out.
                if (scm_is_pair ($2)) {
-                       unsmob_music ($$)->set_property ("articulations",
+                       Music::unsmob ($$)->set_property ("articulations",
                                                         scm_reverse_x ($2, SCM_EOL));
                }
        } %prec ':'
@@ -2621,13 +2621,13 @@ event_chord:
 note_chord_element:
        chord_body optional_notemode_duration post_events
        {
-               Music *m = unsmob_music ($1);
-               SCM dur = unsmob_duration ($2)->smobbed_copy ();
+               Music *m = Music::unsmob ($1);
+               SCM dur = Duration::unsmob ($2)->smobbed_copy ();
                SCM es = m->get_property ("elements");
                SCM postevs = scm_reverse_x ($3, SCM_EOL);
 
                for (SCM s = es; scm_is_pair (s); s = scm_cdr (s))
-                 unsmob_music (scm_car (s))->set_property ("duration", dur);
+                 Music::unsmob (scm_car (s))->set_property ("duration", dur);
                es = ly_append2 (es, postevs);
 
                m-> set_property ("elements", es);
@@ -2694,11 +2694,11 @@ chord_body_element:
        }
        | music_function_chord_body
        {
-               Music *m = unsmob_music ($1);
+               Music *m = Music::unsmob ($1);
 
                while (m && m->is_mus_type ("music-wrapper-music")) {
                        $$ = m->get_property ("element");
-                       m = unsmob_music ($$);
+                       m = Music::unsmob ($$);
                }
 
                if (!(m && m->is_mus_type ("rhythmic-event"))) {
@@ -2727,7 +2727,7 @@ post_events:
        }
        | post_events post_event {
                $$ = $1;
-               if (Music *m = unsmob_music ($2))
+               if (Music *m = Music::unsmob ($2))
                {
                        if (m->is_mus_type ("post-event-wrapper"))
                        {
@@ -2751,12 +2751,12 @@ post_event_nofinger:
        }
        | script_dir music_function_call {
                $$ = $2;
-               if (!unsmob_music ($2)->is_mus_type ("post-event")) {
+               if (!Music::unsmob ($2)->is_mus_type ("post-event")) {
                        parser->parser_error (@2, _ ("post-event expected"));
                        $$ = SCM_UNSPECIFIED;
                } else if (!SCM_UNBNDP ($1))
                {
-                       unsmob_music ($$)->set_property ("direction", $1);
+                       Music::unsmob ($$)->set_property ("direction", $1);
                }
        }
        | HYPHEN {
@@ -2772,7 +2772,7 @@ post_event_nofinger:
        | script_dir direction_reqd_event {
                if (!SCM_UNBNDP ($1))
                {
-                       Music *m = unsmob_music ($2);
+                       Music *m = Music::unsmob ($2);
                        m->set_property ("direction", $1);
                }
                $$ = $2;
@@ -2780,7 +2780,7 @@ post_event_nofinger:
        | script_dir direction_less_event {
                if (!SCM_UNBNDP ($1))
                {
-                       Music *m = unsmob_music ($2);
+                       Music *m = Music::unsmob ($2);
                        m->set_property ("direction", $1);
                }
                $$ = $2;
@@ -2788,12 +2788,12 @@ post_event_nofinger:
        | '^' fingering
        {
                $$ = $2;
-               unsmob_music ($$)->set_property ("direction", scm_from_int (UP));
+               Music::unsmob ($$)->set_property ("direction", scm_from_int (UP));
        }
        | '_' fingering
        {
                $$ = $2;
-               unsmob_music ($$)->set_property ("direction", scm_from_int (DOWN));
+               Music::unsmob ($$)->set_property ("direction", scm_from_int (DOWN));
        }
        ;
 
@@ -2836,7 +2836,7 @@ direction_reqd_event:
                        a->set_property ("articulation-type", s);
                        $$ = a->unprotect ();
                } else {
-                       Music *original = unsmob_music (s);
+                       Music *original = Music::unsmob (s);
                        if (original && original->is_mus_type ("post-event")) {
                                Music *a = original->clone ();
                                a->set_spot (parser->lexer_->override_input (@$));
@@ -2885,7 +2885,7 @@ steno_pitch:
        NOTENAME_PITCH quotes {
                 if (!scm_is_eq (SCM_INUM0, $2))
                 {
-                        Pitch p = *unsmob_pitch ($1);
+                        Pitch p = *Pitch::unsmob ($1);
                         p = p.transposed (Pitch (scm_to_int ($2), 0));
                         $$ = p.smobbed_copy ();
                 }
@@ -2900,7 +2900,7 @@ steno_tonic_pitch:
        TONICNAME_PITCH quotes {
                 if (!scm_is_eq (SCM_INUM0, $2))
                 {
-                        Pitch p = *unsmob_pitch ($1);
+                        Pitch p = *Pitch::unsmob ($1);
                         p = p.transposed (Pitch (scm_to_int ($2), 0));
                         $$ = p.smobbed_copy ();
                 }
@@ -2912,7 +2912,7 @@ pitch:
        | PITCH_IDENTIFIER quotes {
                 if (!scm_is_eq (SCM_INUM0, $2))
                 {
-                        Pitch p = *unsmob_pitch ($1);
+                        Pitch p = *Pitch::unsmob ($1);
                         p = p.transposed (Pitch (scm_to_int ($2), 0));
                         $$ = p.smobbed_copy ();
                 }
@@ -2933,7 +2933,7 @@ gen_text_def:
        }
        | embedded_scm
        {
-               Music *m = unsmob_music ($1);
+               Music *m = Music::unsmob ($1);
                if (m && m->is_mus_type ("post-event"))
                        $$ = $1;
                else if (Text_interface::is_markup ($1)) {
@@ -2995,7 +2995,7 @@ maybe_notemode_duration:
        } %prec ':'
        | multiplied_duration   {
                $$ = $1;
-               parser->default_duration_ = *unsmob_duration ($$);
+               parser->default_duration_ = *Duration::unsmob ($$);
        }
 ;
 
@@ -3018,7 +3018,7 @@ steno_duration:
                }
        }
        | DURATION_IDENTIFIER dots      {
-               Duration *d = unsmob_duration ($1);
+               Duration *d = Duration::unsmob ($1);
                Duration k (d->duration_log (),
                             d->dot_count () + scm_to_int ($2));
                k = k.compressed (d->factor ());
@@ -3032,12 +3032,12 @@ multiplied_duration:
                $$ = $1;
        }
        | multiplied_duration '*' UNSIGNED {
-               $$ = unsmob_duration ($$)->compressed (scm_to_int ($3)).smobbed_copy ();
+               $$ = Duration::unsmob ($$)->compressed (scm_to_int ($3)).smobbed_copy ();
        }
        | multiplied_duration '*' FRACTION {
                Rational  m (scm_to_int (scm_car ($3)), scm_to_int (scm_cdr ($3)));
 
-               $$ = unsmob_duration ($$)->compressed (m).smobbed_copy ();
+               $$ = Duration::unsmob ($$)->compressed (m).smobbed_copy ();
        }
        ;
 
@@ -3107,10 +3107,10 @@ bass_figure:
        }
        | bass_figure ']' {
                $$ = $1;
-               unsmob_music ($1)->set_property ("bracket-stop", SCM_BOOL_T);
+               Music::unsmob ($1)->set_property ("bracket-stop", SCM_BOOL_T);
        }
        | bass_figure figured_bass_alteration {
-               Music *m = unsmob_music ($1);
+               Music *m = Music::unsmob ($1);
                if (scm_to_double ($2)) {
                        SCM salter = m->get_property ("alteration");
                        SCM alter = scm_is_number (salter) ? salter : scm_from_int (0);
@@ -3121,7 +3121,7 @@ bass_figure:
                }
        }
        | bass_figure figured_bass_modification  {
-               Music *m = unsmob_music ($1);
+               Music *m = Music::unsmob ($1);
                m->set_property ($2, SCM_BOOL_T);
        }
        ;
@@ -3148,7 +3148,7 @@ br_bass_figure:
        }
        | '[' bass_figure {
                $$ = $2;
-               unsmob_music ($$)->set_property ("bracket-start", SCM_BOOL_T);
+               Music::unsmob ($$)->set_property ("bracket-start", SCM_BOOL_T);
        }
        ;
 
@@ -3210,7 +3210,7 @@ pitch_or_music:
                if (!parser->lexer_->is_chord_state ())
                         parser->parser_error (@1, _ ("have to be in Chord mode for chords"));
                if (scm_is_pair ($2)) {
-                       if (unsmob_pitch ($1))
+                       if (Pitch::unsmob ($1))
                                $1 = make_chord_elements (@1,
                                                          $1,
                                                          parser->default_duration_.smobbed_copy (),
@@ -3219,7 +3219,7 @@ pitch_or_music:
                        SCM elts = ly_append2 ($1, scm_reverse_x ($2, SCM_EOL));
 
                        $$ = MAKE_SYNTAX ("event-chord", @1, elts);
-               } else if (!unsmob_pitch ($1))
+               } else if (!Pitch::unsmob ($1))
                        $$ = MAKE_SYNTAX ("event-chord", @1, $1);
                // A mere pitch drops through.
        } %prec ':'
@@ -3266,7 +3266,7 @@ lyric_element_music:
        lyric_element optional_notemode_duration post_events {
                $$ = MAKE_SYNTAX ("lyric-event", @$, $1, $2);
                if (scm_is_pair ($3))
-                       unsmob_music ($$)->set_property
+                       Music::unsmob ($$)->set_property
                                ("articulations", scm_reverse_x ($3, SCM_EOL));
        } %prec ':'
        ;
@@ -3520,7 +3520,7 @@ markup_uncomposed_list:
                SCM nn = parser->lexer_->lookup_identifier ("pitchnames");
                parser->lexer_->push_note_state (nn);
        } '{' score_body '}' {
-               Score *sc = unsmob_score ($4);
+               Score *sc = Score::unsmob ($4);
                sc->origin ()->set_spot (@$);
                if (sc->defs_.empty ()) {
                        Output_def *od = get_layout (parser);
@@ -3603,7 +3603,7 @@ simple_markup:
                SCM nn = parser->lexer_->lookup_identifier ("pitchnames");
                parser->lexer_->push_note_state (nn);
        } '{' score_body '}' {
-               Score *sc = unsmob_score ($4);
+               Score *sc = Score::unsmob ($4);
                sc->origin ()->set_spot (@$);
                if (sc->defs_.empty ()) {
                        Output_def *od = get_layout (parser);
@@ -3662,8 +3662,8 @@ otherwise, we have to import music classes into the lexer.
 int
 Lily_lexer::try_special_identifiers (SCM *destination, SCM sid)
 {
-       if (unsmob_book (sid)) {
-               Book *book =  unsmob_book (sid)->clone ();
+       if (Book::unsmob (sid)) {
+               Book *book =  Book::unsmob (sid)->clone ();
                *destination = book->self_scm ();
                book->unprotect ();
 
@@ -3671,30 +3671,30 @@ Lily_lexer::try_special_identifiers (SCM *destination, SCM sid)
        } else if (scm_is_number (sid)) {
                *destination = sid;
                return NUMBER_IDENTIFIER;
-       } else if (unsmob_context_def (sid))
+       } else if (Context_def::unsmob (sid))
        {
-               *destination = unsmob_context_def (sid)->clone ()->unprotect ();
+               *destination = Context_def::unsmob (sid)->clone ()->unprotect ();
                return SCM_IDENTIFIER;
-        } else if (unsmob_context_mod (sid)) {
-                *destination = unsmob_context_mod (sid)->smobbed_copy ();
+        } else if (Context_mod::unsmob (sid)) {
+                *destination = Context_mod::unsmob (sid)->smobbed_copy ();
                 return CONTEXT_MOD_IDENTIFIER;
-       } else if (Music *mus = unsmob_music (sid)) {
+       } else if (Music *mus = Music::unsmob (sid)) {
                mus = mus->clone ();
                *destination = mus->self_scm ();
                bool is_event = mus->is_mus_type ("post-event");
                mus->unprotect ();
                return is_event ? EVENT_IDENTIFIER : MUSIC_IDENTIFIER;
-       } else if (unsmob_pitch (sid)) {
-               *destination = unsmob_pitch (sid)->smobbed_copy ();
+       } else if (Pitch::unsmob (sid)) {
+               *destination = Pitch::unsmob (sid)->smobbed_copy ();
                return PITCH_IDENTIFIER;
-       } else if (unsmob_duration (sid)) {
-               *destination = unsmob_duration (sid)->smobbed_copy ();
+       } else if (Duration::unsmob (sid)) {
+               *destination = Duration::unsmob (sid)->smobbed_copy ();
                return DURATION_IDENTIFIER;
-       } else if (unsmob_output_def (sid)) {
-               *destination = unsmob_output_def (sid)->clone ()->unprotect ();
+       } else if (Output_def::unsmob (sid)) {
+               *destination = Output_def::unsmob (sid)->clone ()->unprotect ();
                return SCM_IDENTIFIER;
-       } else if (unsmob_score (sid)) {
-               *destination = unsmob_score (sid)->clone ()->unprotect ();
+       } else if (Score::unsmob (sid)) {
+               *destination = Score::unsmob (sid)->clone ()->unprotect ();
                return SCM_IDENTIFIER;
        }
 
@@ -3751,7 +3751,7 @@ SCM check_scheme_arg (Lily_parser *parser, Input loc,
 
 SCM loc_on_music (Input loc, SCM arg)
 {
-       if (Music *m = unsmob_music (arg))
+       if (Music *m = Music::unsmob (arg))
        {
                m = m->clone ();
                m->set_spot (loc);
@@ -3830,7 +3830,7 @@ is_regular_identifier (SCM id, bool multiple)
 SCM
 make_music_from_simple (Lily_parser *parser, Input loc, SCM simple)
 {
-       if (unsmob_music (simple))
+       if (Music::unsmob (simple))
                return simple;
        if (parser->lexer_->is_note_state ()) {
                if (scm_is_symbol (simple)) {
@@ -3839,7 +3839,7 @@ make_music_from_simple (Lily_parser *parser, Input loc, SCM simple)
                        n->set_property ("drum-type", simple);
                        return n->unprotect ();
                }
-               if (unsmob_pitch (simple)) {
+               if (Pitch::unsmob (simple)) {
                        Music *n = MY_MAKE_MUSIC ("NoteEvent", loc);
                        n->set_property ("duration", parser->default_duration_.smobbed_copy ());
                        n->set_property ("pitch", simple);
@@ -3851,7 +3851,7 @@ make_music_from_simple (Lily_parser *parser, Input loc, SCM simple)
                        return MAKE_SYNTAX ("lyric-event", loc, simple,
                                            parser->default_duration_.smobbed_copy ());
        } else if (parser->lexer_->is_chord_state ()) {
-               if (unsmob_pitch (simple))
+               if (Pitch::unsmob (simple))
                        return MAKE_SYNTAX
                                ("event-chord",
                                 loc,
@@ -3908,7 +3908,7 @@ make_chord_elements (Input loc, SCM pitch, SCM dur, SCM modification_list)
        SCM res = scm_call_3 (chord_ctor, pitch, dur, modification_list);
        for (SCM s = res; scm_is_pair (s); s = scm_cdr (s))
        {
-               unsmob_music (scm_car (s))->set_spot (loc);
+               Music::unsmob (scm_car (s))->set_spot (loc);
        }
        return res;
 }
index 922016b15cae8336190f052490e25d3b63b70abc..01039d66ab42ecd65372ccbcbd9eeccf4cbcf62b 100644 (file)
@@ -390,10 +390,10 @@ Part_combine_iterator::construct_children ()
   SCM lst = get_music ()->get_property ("elements");
   Context *one = handles_[CONTEXT_ONE].get_context ();
   set_context (one);
-  first_iter_ = unsmob_iterator (get_iterator (unsmob_music (scm_car (lst))));
+  first_iter_ = Music_iterator::unsmob (get_iterator (Music::unsmob (scm_car (lst))));
   Context *two = handles_[CONTEXT_TWO].get_context ();
   set_context (two);
-  second_iter_ = unsmob_iterator (get_iterator (unsmob_music (scm_cadr (lst))));
+  second_iter_ = Music_iterator::unsmob (get_iterator (Music::unsmob (scm_cadr (lst))));
   Context *shared = handles_[CONTEXT_SHARED].get_context ();
   set_context (shared);
 
@@ -443,7 +443,7 @@ Part_combine_iterator::set_busy (SCM se)
   if (!notice_busy_)
     return;
 
-  Stream_event *e = unsmob_stream_event (se);
+  Stream_event *e = Stream_event::unsmob (se);
 
   if (e->in_event_class ("note-event") || e->in_event_class ("cluster-note-event"))
     busy_ = true;
@@ -478,7 +478,7 @@ Part_combine_iterator::process (Moment m)
 
   for (; scm_is_pair (split_list_); split_list_ = scm_cdr (split_list_))
     {
-      splitm = unsmob_moment (scm_caar (split_list_));
+      splitm = Moment::unsmob (scm_caar (split_list_));
       if (splitm && *splitm + start_moment_ > now)
         break;
 
index 9ed7debe2f0820d8f66e0c21abb0d9dab76dda53..13223297f551c5fa972e1581d94d39595d59b387 100644 (file)
@@ -36,7 +36,7 @@ void
 Partial_iterator::process (Moment m)
 {
   if (Duration * dur
-      = unsmob_duration (get_music ()->get_property ("duration")))
+      = Duration::unsmob (get_music ()->get_property ("duration")))
     {
       // Partial_iterator is an iterator rather than an engraver, so
       // the active context it is getting called in does not depend on
@@ -47,7 +47,7 @@ Partial_iterator::process (Moment m)
       // Timing_translator does not set measurePosition when
       // initializing.
 
-      Context *timing = unsmob_context (scm_call_2 (ly_lily_module_constant ("ly:context-find"),
+      Context *timing = Context::unsmob (scm_call_2 (ly_lily_module_constant ("ly:context-find"),
                                                     get_outlet ()->self_scm (),
                                                     ly_symbol2scm ("Timing")));
 
index 98d840e0c72c2a13dd104975fef39f836e16f2f3..b2ba05f1ecd5ff99cfe0c6f35dd9c7a71cee0830 100644 (file)
@@ -73,7 +73,7 @@ Percent_repeat_engraver::start_translation_timestep ()
   if (now_mom ().main_part_ != command_moment_.main_part_)
     {
       first_command_column_
-        = unsmob_grob (get_property ("currentCommandColumn"));
+        = Grob::unsmob (get_property ("currentCommandColumn"));
       command_moment_ = now_mom ();
     }
 
index faf14c40f3d6bdf44d00cb13de2227ae66fb0920..f3509dd96ab25779ec19177612b07db5d48b6c41 100644 (file)
@@ -69,7 +69,7 @@ MAKE_SCHEME_CALLBACK (Percent_repeat_item_interface, double_percent, 1);
 SCM
 Percent_repeat_item_interface::double_percent (SCM grob)
 {
-  Grob *me = unsmob_grob (grob);
+  Grob *me = Grob::unsmob (grob);
   Stencil m = x_percent (me, 2);
   m.translate_axis (-m.extent (X_AXIS).center (), X_AXIS);
   return m.smobbed_copy ();
@@ -79,8 +79,8 @@ MAKE_SCHEME_CALLBACK (Percent_repeat_item_interface, beat_slash, 1);
 SCM
 Percent_repeat_item_interface::beat_slash (SCM grob)
 {
-  Grob *me = unsmob_grob (grob);
-  Stream_event *cause = unsmob_stream_event (me->get_property ("cause"));
+  Grob *me = Grob::unsmob (grob);
+  Stream_event *cause = Stream_event::unsmob (me->get_property ("cause"));
   int count = robust_scm2int (cause->get_property ("slash-count"), 1);
 
   Stencil m;
index ab8e234b17c145da517539666cdbf71aa86afbe9..874f44038c6c17d717f5aa3d90a6d17bb7ff1d4d 100644 (file)
@@ -23,10 +23,10 @@ LY_DEFINE (ly_performance_write, "ly:performance-write",
            2, 0, 0, (SCM performance, SCM filename),
            "Write @var{performance} to @var{filename}.")
 {
-  LY_ASSERT_TYPE (unsmob_performance, performance, 1);
+  LY_ASSERT_TYPE (Performance::unsmob, performance, 1);
   LY_ASSERT_TYPE (scm_is_string, filename, 2);
 
-  unsmob_performance (performance)->write_output (ly_scm2string (filename));
+  Performance::unsmob (performance)->write_output (ly_scm2string (filename));
   return SCM_UNSPECIFIED;
 }
 
index 4aa03331e8a79f05345c747303459683e14fecc8..f0b9c001927a39ceab84b46b1de6e3080aa33ad7 100644 (file)
@@ -99,7 +99,7 @@ Performance::process ()
 }
 
 Performance *
-unsmob_performance (SCM x)
+Performance::unsmob (SCM x)
 {
-  return dynamic_cast<Performance *> (unsmob_music_output (x));
+  return dynamic_cast<Performance *> (Music_output::unsmob (x));
 }
index d7cda2bca9b3d4fd423b50bcc9c06a3ad14cc20e..78c52f59bc57312f6d507799cc51feff4a86f60c 100644 (file)
@@ -58,7 +58,7 @@ Performer_group::acknowledge_audio_elements ()
 
       for (SCM p = get_simple_trans_list (); scm_is_pair (p); p = scm_cdr (p))
         {
-          Translator *t = unsmob_translator (scm_car (p));
+          Translator *t = Translator::unsmob (scm_car (p));
           Performer *eng = dynamic_cast<Performer *> (t);
           if (eng && eng != info.origin_trans_)
             eng->acknowledge_audio_element (info);
@@ -71,7 +71,7 @@ performer_each (SCM list, Performer_method method)
 {
   for (SCM p = list; scm_is_pair (p); p = scm_cdr (p))
     {
-      Performer *e = dynamic_cast<Performer *> (unsmob_translator (scm_car (p)));
+      Performer *e = dynamic_cast<Performer *> (Translator::unsmob (scm_car (p)));
       if (e)
         (e->*method) ();
     }
@@ -83,7 +83,7 @@ Performer_group::do_announces ()
   for (SCM s = context ()->children_contexts ();
        scm_is_pair (s); s = scm_cdr (s))
     {
-      Context *c = unsmob_context (scm_car (s));
+      Context *c = Context::unsmob (scm_car (s));
       Performer_group *group
         = dynamic_cast<Performer_group *> (c->implementation ());
       if (group)
index bc6bd3b5ada39d6518a56745d68f2e7332fb09cd..fad7db5959a617fad7abd540c427daa51860ab60 100644 (file)
@@ -50,7 +50,7 @@ Performer::announce_element (Audio_element_info i)
 }
 
 Performer *
-unsmob_performer (SCM perf)
+Performer::unsmob (SCM perf)
 {
-  return dynamic_cast<Performer *> (unsmob_translator (perf));
+  return dynamic_cast<Performer *> (Translator::unsmob (perf));
 }
index e05cee9e058c4d47cea7c1f7093b64e972a0b2d3..4c984f253e7b32b31a87080528be0242a78c3e48 100644 (file)
@@ -238,7 +238,7 @@ Piano_pedal_align_engraver::finalize ()
       if (pedal_info_[i].line_spanner_)
         {
           SCM cc = get_property ("currentCommandColumn");
-          Item *c = unsmob_item (cc);
+          Item *c = Item::unsmob (cc);
           pedal_info_[i].line_spanner_->set_bound (RIGHT, c);
 
           pedal_info_[i].clear ();
index 821067bee65f19520a21b6409fb5133d65b529db..f6338ce8da724682d612815bc9ac444abc4a6704 100644 (file)
@@ -33,7 +33,7 @@ MAKE_SCHEME_CALLBACK (Piano_pedal_bracket, print, 1);
 SCM
 Piano_pedal_bracket::print (SCM smob)
 {
-  Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (smob));
+  Spanner *me = dynamic_cast<Spanner *> (Grob::unsmob (smob));
   Spanner *orig = dynamic_cast<Spanner *> (me->original ());
 
   Drul_array<bool> broken (false, false);
@@ -46,7 +46,7 @@ Piano_pedal_bracket::print (SCM smob)
 
   Grob *common = me->get_bound (LEFT)
                  ->common_refpoint (me->get_bound (RIGHT), X_AXIS);
-  Grob *textbit = unsmob_grob (me->get_object ("pedal-text"));
+  Grob *textbit = Grob::unsmob (me->get_object ("pedal-text"));
 
   if (textbit)
     common = common->common_refpoint (textbit, X_AXIS);
index 5cbb10954e39f4075c8f08ab6a67c582e913a4fe..250dfb458dd5a9f03791f9598fc72344fda95820 100644 (file)
@@ -346,7 +346,7 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
     {
       assert (!p->finished_bracket_);
 
-      Grob *cmc = unsmob_grob (get_property ("currentMusicalColumn"));
+      Grob *cmc = Grob::unsmob (get_property ("currentMusicalColumn"));
       p->bracket_->set_bound (RIGHT, cmc);
 
       /*
@@ -424,7 +424,7 @@ Piano_pedal_engraver::finalize ()
       if (p->bracket_)
         {
           SCM cc = get_property ("currentCommandColumn");
-          Item *c = unsmob_item (cc);
+          Item *c = Item::unsmob (cc);
           p->bracket_->set_bound (RIGHT, c);
 
           p->finished_bracket_ = p->bracket_;
@@ -444,7 +444,7 @@ Piano_pedal_engraver::stop_translation_timestep ()
       typeset_all (p);
       if (p->bracket_ && !p->bracket_->get_bound (LEFT))
         {
-          Grob *cmc = unsmob_grob (get_property ("currentMusicalColumn"));
+          Grob *cmc = Grob::unsmob (get_property ("currentMusicalColumn"));
           p->bracket_->set_bound (LEFT, cmc);
         }
     }
@@ -473,7 +473,7 @@ Piano_pedal_engraver::typeset_all (Pedal_info *p)
     {
       Grob *r = p->finished_bracket_->get_bound (RIGHT);
       if (!r)
-        p->finished_bracket_->set_bound (RIGHT, unsmob_grob (get_property ("currentMusicalColumn")));
+        p->finished_bracket_->set_bound (RIGHT, Grob::unsmob (get_property ("currentMusicalColumn")));
 
       p->finished_bracket_ = 0;
     }
index 377c4d0ff3b51cf3375805f5b646068943213750..22b18c4bbe555c9c2b8b54681c5e737834e0a03c 100644 (file)
@@ -27,8 +27,8 @@ LY_DEFINE (ly_pitch_transpose, "ly:pitch-transpose",
   LY_ASSERT_SMOB (Pitch, p, 1);
   LY_ASSERT_SMOB (Pitch, delta, 2);
 
-  Pitch *t = unsmob_pitch (p);
-  Pitch *d = unsmob_pitch (delta);
+  Pitch *t = Pitch::unsmob (p);
+  Pitch *d = Pitch::unsmob (delta);
   return t->transposed (*d).smobbed_copy ();
 }
 
@@ -59,7 +59,7 @@ LY_DEFINE (ly_pitch_negate, "ly:pitch-negate", 1, 0, 0,
            "Negate @var{p}.")
 {
   LY_ASSERT_SMOB (Pitch, p, 1);
-  Pitch *pp = unsmob_pitch (p);
+  Pitch *pp = Pitch::unsmob (p);
   return pp->negated ().smobbed_copy ();
 }
 
@@ -69,7 +69,7 @@ LY_DEFINE (ly_pitch_steps, "ly:pitch-steps", 1, 0, 0,
            " pitch@tie{}@var{p}.")
 {
   LY_ASSERT_SMOB (Pitch, p, 1);
-  Pitch *pp = unsmob_pitch (p);
+  Pitch *pp = Pitch::unsmob (p);
   return scm_from_int (pp->steps ());
 }
 
@@ -78,7 +78,7 @@ LY_DEFINE (ly_pitch_octave, "ly:pitch-octave",
            "Extract the octave from pitch@tie{}@var{pp}.")
 {
   LY_ASSERT_SMOB (Pitch, pp, 1);
-  Pitch *p = unsmob_pitch (pp);
+  Pitch *p = Pitch::unsmob (pp);
   int q = p->get_octave ();
   return scm_from_int (q);
 }
@@ -88,7 +88,7 @@ LY_DEFINE (ly_pitch_alteration, "ly:pitch-alteration",
            "Extract the alteration from pitch@tie{}@var{pp}.")
 {
   LY_ASSERT_SMOB (Pitch, pp, 1);
-  Pitch *p = unsmob_pitch (pp);
+  Pitch *p = Pitch::unsmob (pp);
   Rational q = p->get_alteration ();
 
   return ly_rational2scm (q);
@@ -99,7 +99,7 @@ LY_DEFINE (ly_pitch_notename, "ly:pitch-notename",
            "Extract the note name from pitch @var{pp}.")
 {
   LY_ASSERT_SMOB (Pitch, pp, 1);
-  Pitch *p = unsmob_pitch (pp);
+  Pitch *p = Pitch::unsmob (pp);
   int q = p->get_notename ();
   return scm_from_int (q);
 }
@@ -110,7 +110,7 @@ LY_DEFINE (ly_pitch_tones, "ly:pitch-tones",
            " middle@tie{}C as a rational number.")
 {
   LY_ASSERT_SMOB (Pitch, pp, 1);
-  return ly_rational2scm (unsmob_pitch (pp)->tone_pitch ());
+  return ly_rational2scm (Pitch::unsmob (pp)->tone_pitch ());
 }
 
 LY_DEFINE (ly_pitch_quartertones, "ly:pitch-quartertones",
@@ -119,7 +119,7 @@ LY_DEFINE (ly_pitch_quartertones, "ly:pitch-quartertones",
            " middle@tie{}C.")
 {
   LY_ASSERT_SMOB (Pitch, pp, 1);
-  Pitch *p = unsmob_pitch (pp);
+  Pitch *p = Pitch::unsmob (pp);
   int q = p->rounded_quartertone_pitch ();
   return scm_from_int (q);
 }
@@ -130,7 +130,7 @@ LY_DEFINE (ly_pitch_semitones, "ly:pitch-semitones",
            " middle@tie{}C.")
 {
   LY_ASSERT_SMOB (Pitch, pp, 1);
-  Pitch *p = unsmob_pitch (pp);
+  Pitch *p = Pitch::unsmob (pp);
   int q = p->rounded_semitone_pitch ();
   return scm_from_int (q);
 }
@@ -142,8 +142,8 @@ LY_DEFINE (ly_pitch_less_p, "ly:pitch<?",
   LY_ASSERT_SMOB (Pitch, p1, 1);
   LY_ASSERT_SMOB (Pitch, p2, 2);
 
-  Pitch *a = unsmob_pitch (p1);
-  Pitch *b = unsmob_pitch (p2);
+  Pitch *a = Pitch::unsmob (p1);
+  Pitch *b = Pitch::unsmob (p2);
 
   if (Pitch::compare (*a, *b) < 0)
     return SCM_BOOL_T;
@@ -160,8 +160,8 @@ LY_DEFINE (ly_pitch_diff, "ly:pitch-diff",
   LY_ASSERT_SMOB (Pitch, pitch, 1);
   LY_ASSERT_SMOB (Pitch, root, 2);
 
-  Pitch *p = unsmob_pitch (pitch);
-  Pitch *r = unsmob_pitch (root);
+  Pitch *p = Pitch::unsmob (pitch);
+  Pitch *r = Pitch::unsmob (root);
 
   return pitch_interval (*r, *p).smobbed_copy ();
 }
@@ -176,7 +176,7 @@ LY_DEFINE (ly_set_middle_C_x, "ly:set-middle-C!",
 {
   LY_ASSERT_SMOB (Context, context, 1);
 
-  Context *c = unsmob_context (context);
+  Context *c = Context::unsmob (context);
   int clef_pos = robust_scm2int (c->get_property ("middleCClefPosition"), 0);
   int offset = robust_scm2int (c->get_property ("middleCOffset"), 0);
   /* middleCCuePosition overrides the clef! */
index bf2fd714ac4a61fb0aac0c9b057980f1cb8f413c..a030f1281cff3bf251001081b1f5a3103727d3da 100644 (file)
@@ -255,8 +255,8 @@ MAKE_SCHEME_CALLBACK (Pitch, less_p, 2);
 SCM
 Pitch::less_p (SCM p1, SCM p2)
 {
-  Pitch *a = unsmob_pitch (p1);
-  Pitch *b = unsmob_pitch (p2);
+  Pitch *a = Pitch::unsmob (p1);
+  Pitch *b = Pitch::unsmob (p2);
 
   if (compare (*a, *b) < 0)
     return SCM_BOOL_T;
index 0e97853f7ece5992f045fbc183e1fb9596a07e06..40f1fc9bd23bb575b4e3fb7ccc560cf096f08e9b 100644 (file)
@@ -88,7 +88,7 @@ Pitched_trill_engraver::acknowledge_trill_spanner (Grob_info info)
   if (ev
       && ev->in_event_class ("trill-span-event")
       && to_dir (ev->get_property ("span-direction")) == START
-      && unsmob_pitch (ev->get_property ("pitch")))
+      && Pitch::unsmob (ev->get_property ("pitch")))
     make_trill (ev);
 }
 
@@ -96,7 +96,7 @@ void
 Pitched_trill_engraver::make_trill (Stream_event *ev)
 {
   SCM scm_pitch = ev->get_property ("pitch");
-  Pitch *p = unsmob_pitch (scm_pitch);
+  Pitch *p = Pitch::unsmob (scm_pitch);
 
   SCM keysig = get_property ("localAlterations");
 
@@ -132,7 +132,7 @@ Pitched_trill_engraver::make_trill (Stream_event *ev)
   int c0 = scm_is_number (c0scm) ? scm_to_int (c0scm) : 0;
 
   trill_head_->set_property ("staff-position",
-                             scm_from_int (unsmob_pitch (scm_pitch)->steps ()
+                             scm_from_int (Pitch::unsmob (scm_pitch)->steps ()
                                            + c0));
 
   trill_group_ = make_item ("TrillPitchGroup", ev->self_scm ());
index 0c64ca1c4d6a83b74862354b50fde5a7188eb187..930fe7175bee5daf20b9fa8e125dc1c2ddc3766c 100644 (file)
@@ -24,13 +24,13 @@ LY_DEFINE (ly_pointer_group_interface__add_grob, "ly:pointer-group-interface::ad
            3, 0, 0, (SCM grob, SCM sym, SCM grob_element),
            "Add @var{grob-element} to @var{grob}'s @var{sym} grob array.")
 {
-  LY_ASSERT_TYPE (unsmob_grob, grob, 1);
+  LY_ASSERT_TYPE (Grob::unsmob, grob, 1);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
-  LY_ASSERT_TYPE (unsmob_grob, grob_element, 3);
+  LY_ASSERT_TYPE (Grob::unsmob, grob_element, 3);
 
-  Pointer_group_interface::add_grob (unsmob_grob (grob),
+  Pointer_group_interface::add_grob (Grob::unsmob (grob),
                                      sym,
-                                     unsmob_grob (grob_element));
+                                     Grob::unsmob (grob_element));
   return SCM_UNSPECIFIED;
 }
 
index 62063b1135f0d1ec12a54e446604aed6d25c11f2..2b03999c0ca4e2d37e2366d89fc76cd23009240c 100644 (file)
 int
 Pointer_group_interface::count (Grob *me, SCM sym)
 {
-  Grob_array *arr = unsmob_grob_array (me->internal_get_object (sym));
+  Grob_array *arr = Grob_array::unsmob (me->internal_get_object (sym));
   return arr ? arr->size () : 0;
 }
 
 void
 Pointer_group_interface::add_grob (Grob *me, SCM sym, SCM p)
 {
-  add_grob (me, sym, unsmob_grob (p));
+  add_grob (me, sym, Grob::unsmob (p));
 }
 
 void
@@ -46,11 +46,11 @@ Grob_array *
 Pointer_group_interface::get_grob_array (Grob *me, SCM sym)
 {
   SCM scm_arr = me->internal_get_object (sym);
-  Grob_array *arr = unsmob_grob_array (scm_arr);
+  Grob_array *arr = Grob_array::unsmob (scm_arr);
   if (!arr)
     {
       scm_arr = Grob_array::make_array ();
-      arr = unsmob_grob_array (scm_arr);
+      arr = Grob_array::unsmob (scm_arr);
       me->set_object (sym, scm_arr);
     }
   return arr;
@@ -88,7 +88,7 @@ static vector<Grob *> empty_array;
 vector<Grob *> const &
 ly_scm2link_array (SCM x)
 {
-  Grob_array *arr = unsmob_grob_array (x);
+  Grob_array *arr = Grob_array::unsmob (x);
   return arr ? arr->array () : empty_array;
 }
 
@@ -103,7 +103,7 @@ internal_extract_grob_array (Grob const *elt, SCM symbol)
 vector<Item *>
 internal_extract_item_array (Grob const *elt, SCM symbol)
 {
-  Grob_array *arr = unsmob_grob_array (elt->internal_get_object (symbol));
+  Grob_array *arr = Grob_array::unsmob (elt->internal_get_object (symbol));
   vector<Item *> items;
   for (vsize i = 0; arr && i < arr->size (); i++)
     items.push_back (arr->item (i));
index 51bd53c48aa8b8629ee6e875180ab539b9686aa9..73a5b303da54fa6e3ee9ea7a40ee346a4d7082c9 100644 (file)
@@ -24,7 +24,7 @@ LY_DEFINE (ly_prob_set_property_x, "ly:prob-set-property!",
            "Set property @var{sym} of @var{obj} to @var{value}.")
 {
   LY_ASSERT_SMOB (Prob, obj, 1);
-  Prob *ps = unsmob_prob (obj);
+  Prob *ps = Prob::unsmob (obj);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
 
   ps->set_property (sym, value);
@@ -48,7 +48,7 @@ LY_DEFINE (ly_prob_property, "ly:prob-property",
            " @code{'()} if @var{val} is not specified.")
 {
   LY_ASSERT_SMOB (Prob, prob, 1);
-  Prob *ps = unsmob_prob (prob);
+  Prob *ps = Prob::unsmob (prob);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
 
   if (val == SCM_UNDEFINED)
@@ -66,7 +66,7 @@ LY_DEFINE (ly_prob_type_p, "ly:prob-type?",
            (SCM obj, SCM type),
            "Is @var{obj} the specified prob-type?")
 {
-  Prob *prob = unsmob_prob (obj);
+  Prob *prob = Prob::unsmob (obj);
   return scm_from_bool (prob && prob->type () == type);
 }
 
@@ -95,7 +95,7 @@ LY_DEFINE (ly_prob_mutable_properties, "ly:prob-mutable-properties",
            "Retrieve an alist of mutable properties.")
 {
   LY_ASSERT_SMOB (Prob, prob, 1);
-  Prob *ps = unsmob_prob (prob);
+  Prob *ps = Prob::unsmob (prob);
   return ps->get_property_alist (true);
 }
 
@@ -105,7 +105,7 @@ LY_DEFINE (ly_prob_immutable_properties, "ly:prob-immutable-properties",
            "Retrieve an alist of immutable properties.")
 {
   LY_ASSERT_SMOB (Prob, prob, 1);
-  Prob *ps = unsmob_prob (prob);
+  Prob *ps = Prob::unsmob (prob);
   return ps->get_property_alist (false);
 }
 
index 60ed8915eb08c619488d498dcbb0f82939e65e78..8b14f73416a820ee325d2ea6ea80ae53db5b9ff6 100644 (file)
@@ -38,7 +38,7 @@ Prob::equal_p (SCM sa, SCM sb)
      equality; e.g., that two probs are equal iff they can be
      distinguished by calls to ly:prob-property.
   */
-  Prob *probs[2] = {unsmob_prob (sa), unsmob_prob (sb)};
+  Prob *probs[2] = {Prob::unsmob (sa), Prob::unsmob (sb)};
   SCM props[2][2];
   int i;
 
@@ -64,7 +64,7 @@ Prob::equal_p (SCM sa, SCM sb)
           SCM aval = scm_cdar (aprop);
           SCM bval = scm_cdar (bprop);
           if (scm_caar (aprop) != scm_caar (bprop)
-              || (!(unsmob_input (aval) && unsmob_input (bval))
+              || (!(Input::unsmob (aval) && Input::unsmob (bval))
                   &&
                   !to_boolean (scm_equal_p (aval, bval))))
             return SCM_BOOL_F;
index 076bda4f00477df838e13ff8dc656e08ce936d11..c7cb8108b0b214f8e2c5e1f4209c430c0f37f472 100644 (file)
@@ -93,8 +93,8 @@ MAKE_SCHEME_CALLBACK (Property_iterator, once_finalization, 3);
 SCM
 Property_iterator::once_finalization (SCM ctx, SCM music, SCM previous_value)
 {
-  Music *m = unsmob_music (music);
-  Context *c = unsmob_context (ctx);
+  Music *m = Music::unsmob (music);
+  Context *c = Context::unsmob (ctx);
 
   // Do not use UnsetProperty, which sets the default, but rather
   // cache the value before the \once \set command and restore it now
@@ -163,8 +163,8 @@ MAKE_SCHEME_CALLBACK (Push_property_iterator, once_finalization, 2);
 SCM
 Push_property_iterator::once_finalization (SCM ctx, SCM music)
 {
-  Music *mus = unsmob_music (music);
-  Context *c = unsmob_context (ctx);
+  Music *mus = Music::unsmob (music);
+  Context *c = Context::unsmob (ctx);
 
   SCM sym = mus->get_property ("symbol");
   if (check_grob (mus, sym))
index d0052047847f7fb21bff84b4879ea4ac3ac9e3f2..fc3f238e3bd32d92d84a0e9a6f3a9f2c8a95ce6b 100644 (file)
@@ -31,7 +31,7 @@ MAKE_SCHEME_CALLBACK (Pure_from_neighbor_interface, calc_pure_relevant_grobs, 1)
 SCM
 Pure_from_neighbor_interface::calc_pure_relevant_grobs (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   extract_grob_set ((me->original () && me->original ()->is_live ()
                      ? me->original ()
                      : me),
@@ -45,7 +45,7 @@ Pure_from_neighbor_interface::calc_pure_relevant_grobs (SCM smob)
   if (Grob_array::unsmob (neighbors_scm))
     {
       vector<Grob *> &arr
-        = unsmob_grob_array (neighbors_scm)->array_reference ();
+        = Grob_array::unsmob (neighbors_scm)->array_reference ();
       arr = new_elts;
     }
 
index c8e8a1a42e2c79f0f7fcd1d59e3e651f466ee590..17f7b7143342260173f6f61c4f02db233a8f1e12 100644 (file)
@@ -194,7 +194,7 @@ Moment
 Quote_iterator::vector_moment (int idx) const
 {
   SCM entry = scm_c_vector_ref (event_vector_, idx);
-  return *unsmob_moment (scm_caar (entry));
+  return *Moment::unsmob (scm_caar (entry));
 }
 
 void
@@ -235,15 +235,15 @@ Quote_iterator::process (Moment m)
   if (quote_ok ())
     {
       SCM entry = scm_c_vector_ref (event_vector_, event_idx_);
-      Pitch *quote_pitch = unsmob_pitch (scm_cdar (entry));
+      Pitch *quote_pitch = Pitch::unsmob (scm_cdar (entry));
 
       /*
         The pitch that sounds when written central C is played.
       */
       Pitch temp_pitch;
-      Pitch *me_pitch = unsmob_pitch (get_music ()->get_property ("quoted-transposition"));
+      Pitch *me_pitch = Pitch::unsmob (get_music ()->get_property ("quoted-transposition"));
       if (!me_pitch)
-        me_pitch = unsmob_pitch (get_outlet ()->get_property ("instrumentTransposition"));
+        me_pitch = Pitch::unsmob (get_outlet ()->get_property ("instrumentTransposition"));
       else
         {
           // We are not going to win a beauty contest with this one,
@@ -260,7 +260,7 @@ Quote_iterator::process (Moment m)
         {
           SCM ev_acc = scm_car (s);
 
-          Stream_event *ev = unsmob_stream_event (scm_car (ev_acc));
+          Stream_event *ev = Stream_event::unsmob (scm_car (ev_acc));
           if (!ev)
             programming_error ("no music found in quote");
           else if (accept_music_type (ev, is_cue))
index c403b2ad9d293e01e10f10745e222ae3667c8caa..00973f79fcb0febb845e3fb35294ade388d4a9b3 100644 (file)
@@ -31,9 +31,9 @@ MAKE_SCHEME_CALLBACK (Relative_octave_check, relative_callback, 2)
 SCM
 Relative_octave_check::relative_callback (SCM music, SCM last_pitch)
 {
-  Pitch p = *unsmob_pitch (last_pitch);
-  Music *m = unsmob_music (music);
-  Pitch *check_p = unsmob_pitch (m->get_property ("pitch"));
+  Pitch p = *Pitch::unsmob (last_pitch);
+  Music *m = Music::unsmob (music);
+  Pitch *check_p = Pitch::unsmob (m->get_property ("pitch"));
 
   int delta_oct = 0;
   if (check_p)
index 8cb9334c4731978740b4e1195493bf43ec29006b..14a08e52517aca09b4a00edc53d188b3b256962f 100644 (file)
@@ -80,9 +80,9 @@ Repeat_tie_engraver::acknowledge_note_head (Grob_info inf)
   semi_tie->set_parent (semi_tie_column_, Y_AXIS);
   semi_ties_.push_back (semi_tie);
 
-  if (is_direction (unsmob_stream_event (cause)->get_property ("direction")))
+  if (is_direction (Stream_event::unsmob (cause)->get_property ("direction")))
     {
-      Direction d = to_dir (unsmob_stream_event (cause)->get_property ("direction"));
+      Direction d = to_dir (Stream_event::unsmob (cause)->get_property ("direction"));
       semi_tie->set_property ("direction", scm_from_int (d));
     }
 
index 57bf98e73903882c0ed1b651166ecb3c9b519097..b56c61c64847877d87c29409d96fad3995bb4d58 100644 (file)
@@ -26,7 +26,7 @@
 Music *
 Repeated_music::body (Music *me)
 {
-  return unsmob_music (me->get_property ("element"));
+  return Music::unsmob (me->get_property ("element"));
 }
 
 SCM
@@ -53,7 +53,7 @@ Repeated_music::alternatives_get_length (Music *me, bool fold)
   SCM p = alternative_list;
   while (scm_is_pair (p) && done < count)
     {
-      m = m + unsmob_music (scm_car (p))->get_length ();
+      m = m + Music::unsmob (scm_car (p))->get_length ();
       done++;
       if (count - done < len)
         p = scm_cdr (p);
@@ -78,7 +78,7 @@ Moment
 Repeated_music::body_get_length (Music *me)
 {
   Moment m = 0;
-  if (Music *body = unsmob_music (me->get_property ("element")))
+  if (Music *body = Music::unsmob (me->get_property ("element")))
     m = body->get_length ();
   return m;
 }
@@ -88,7 +88,7 @@ MAKE_SCHEME_CALLBACK (Repeated_music, unfolded_music_length, 1);
 SCM
 Repeated_music::unfolded_music_length (SCM m)
 {
-  Music *me = unsmob_music (m);
+  Music *me = Music::unsmob (m);
 
   Moment l = Moment (repeat_count (me)) * body_get_length (me) + alternatives_get_length (me, false);
   return l.smobbed_copy ();
@@ -98,7 +98,7 @@ MAKE_SCHEME_CALLBACK (Repeated_music, folded_music_length, 1);
 SCM
 Repeated_music::folded_music_length (SCM m)
 {
-  Music *me = unsmob_music (m);
+  Music *me = Music::unsmob (m);
 
   Moment l = body_get_length (me) + alternatives_get_length (me, true);
   return l.smobbed_copy ();
@@ -114,7 +114,7 @@ MAKE_SCHEME_CALLBACK (Repeated_music, volta_music_length, 1);
 SCM
 Repeated_music::volta_music_length (SCM m)
 {
-  Music *me = unsmob_music (m);
+  Music *me = Music::unsmob (m);
   Moment l = body_get_length (me) + alternatives_volta_get_length (me);
   return l.smobbed_copy ();
 }
@@ -123,8 +123,8 @@ MAKE_SCHEME_CALLBACK (Repeated_music, minimum_start, 1);
 SCM
 Repeated_music::minimum_start (SCM m)
 {
-  Music *me = unsmob_music (m);
-  Music *body = unsmob_music (me->get_property ("element"));
+  Music *me = Music::unsmob (m);
+  Music *body = Music::unsmob (me->get_property ("element"));
 
   if (body)
     return body->start_mom ().smobbed_copy ();
@@ -136,8 +136,8 @@ MAKE_SCHEME_CALLBACK (Repeated_music, first_start, 1);
 SCM
 Repeated_music::first_start (SCM m)
 {
-  Music *me = unsmob_music (m);
-  Music *body = unsmob_music (me->get_property ("element"));
+  Music *me = Music::unsmob (m);
+  Music *body = Music::unsmob (me->get_property ("element"));
 
   Moment rv = (body) ? body->start_mom ()
               : Music_sequence::first_start (me->get_property ("elements"));
index 66a2c558a4200796d021295491be1ecbcd43f5e1..e4a39d4fff4a5f9715cfacd418acc26964104528 100644 (file)
@@ -57,8 +57,8 @@ Rest_collision_engraver::process_acknowledged ()
 
   for (SCM s = get_property ("busyGrobs"); scm_is_pair (s); s = scm_cdr (s))
     {
-      Grob *g = unsmob_grob (scm_cdar (s));
-      Moment *m = unsmob_moment (scm_caar (s));
+      Grob *g = Grob::unsmob (scm_cdar (s));
+      Moment *m = Moment::unsmob (scm_caar (s));
       if (!g || !m)
         continue;
 
index e19002ef07bd54937b35a326a7a8281f6d1e5c7c..743f14ad79a2e9b0ef0c6ecdc364240419a1d1dd 100644 (file)
@@ -41,7 +41,7 @@ MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Rest_collision, force_shift_callback_rest, 2,
 SCM
 Rest_collision::force_shift_callback_rest (SCM rest, SCM offset)
 {
-  Grob *rest_grob = unsmob_grob (rest);
+  Grob *rest_grob = Grob::unsmob (rest);
   Grob *parent = rest_grob->get_parent (X_AXIS);
 
   /*
@@ -53,7 +53,7 @@ Rest_collision::force_shift_callback_rest (SCM rest, SCM offset)
 
   if (Note_column::has_interface (parent) && Note_column::has_rests (parent))
     {
-      Grob *collision = unsmob_grob (parent->get_object ("rest-collision"));
+      Grob *collision = Grob::unsmob (parent->get_object ("rest-collision"));
 
       if (collision)
         (void) collision->get_property ("positioning-done");
@@ -69,7 +69,7 @@ Rest_collision::add_column (Grob *me, Grob *p)
 
   p->set_object ("rest-collision", me->self_scm ());
 
-  Grob *rest = unsmob_grob (p->get_object ("rest"));
+  Grob *rest = Grob::unsmob (p->get_object ("rest"));
   if (rest)
     {
       chain_offset_callback (rest,
@@ -96,7 +96,7 @@ MAKE_SCHEME_CALLBACK (Rest_collision, calc_positioning_done, 1);
 SCM
 Rest_collision::calc_positioning_done (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   me->set_property ("positioning-done", SCM_BOOL_T);
 
@@ -108,7 +108,7 @@ Rest_collision::calc_positioning_done (SCM smob)
   for (vsize i = 0; i < elts.size (); i++)
     {
       Grob *e = elts[i];
-      if (unsmob_grob (e->get_object ("rest")))
+      if (Grob::unsmob (e->get_object ("rest")))
         rests.push_back (e);
       else
         notes.push_back (e);
index 4bcca6f9d343c2b987c2af4360729d768eb0ee15..b64dfe4a4d903a78b613d9efed9916df1eed5bc8 100644 (file)
@@ -66,7 +66,7 @@ Rest_engraver::process_music ()
   if (rest_event_ && !rest_)
     {
       rest_ = make_item ("Rest", rest_event_->self_scm ());
-      Pitch *p = unsmob_pitch (rest_event_->get_property ("pitch"));
+      Pitch *p = Pitch::unsmob (rest_event_->get_property ("pitch"));
 
       if (p)
         {
index 2dbb2c9f9b3d465d135f65a376fce240cb709c36..7191b3ba93eeca9134b062eaf08d5c8645baca58 100644 (file)
@@ -35,7 +35,7 @@ MAKE_SCHEME_CALLBACK (Rest, y_offset_callback, 1);
 SCM
 Rest::y_offset_callback (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   int duration_log = scm_to_int (me->get_property ("duration-log"));
   Real ss = Staff_symbol_referencer::staff_space (me);
 
@@ -146,8 +146,8 @@ MAKE_SCHEME_CALLBACK (Rest, calc_cross_staff, 1);
 SCM
 Rest::calc_cross_staff (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
-  Grob *stem = unsmob_grob (me->get_object ("stem"));
+  Grob *me = Grob::unsmob (smob);
+  Grob *stem = Grob::unsmob (me->get_object ("stem"));
 
   if (!stem)
     return SCM_BOOL_F;
@@ -260,7 +260,7 @@ Rest::translate (Grob *me, int dy)
 SCM
 Rest::print (SCM smob)
 {
-  return brew_internal_stencil (unsmob_grob (smob), true);
+  return brew_internal_stencil (Grob::unsmob (smob), true);
 }
 
 MAKE_SCHEME_CALLBACK (Rest, width, 1);
@@ -270,14 +270,14 @@ MAKE_SCHEME_CALLBACK (Rest, width, 1);
 SCM
 Rest::width (SCM smob)
 {
-  return generic_extent_callback (unsmob_grob (smob), X_AXIS);
+  return generic_extent_callback (Grob::unsmob (smob), X_AXIS);
 }
 
 MAKE_SCHEME_CALLBACK (Rest, height, 1);
 SCM
 Rest::height (SCM smob)
 {
-  return generic_extent_callback (unsmob_grob (smob), Y_AXIS);
+  return generic_extent_callback (Grob::unsmob (smob), Y_AXIS);
 }
 
 /*
@@ -295,7 +295,7 @@ Rest::generic_extent_callback (Grob *me, Axis a)
     with ledgered rests.
   */
   SCM m = brew_internal_stencil (me, a != X_AXIS);
-  return ly_interval2scm (unsmob_stencil (m)->extent (a));
+  return ly_interval2scm (Stencil::unsmob (m)->extent (a));
 }
 
 MAKE_SCHEME_CALLBACK (Rest, pure_height, 3);
@@ -304,9 +304,9 @@ Rest::pure_height (SCM smob,
                    SCM /* start */,
                    SCM /* end */)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   SCM m = brew_internal_stencil (me, false);
-  return ly_interval2scm (unsmob_stencil (m)->extent (Y_AXIS));
+  return ly_interval2scm (Stencil::unsmob (m)->extent (Y_AXIS));
 }
 
 ADD_INTERFACE (Rest,
index af410a2cf4e92049f29b4b17a3ec0c5630f01d34..2c6b2bee5f6f99dbe0030b4f0db4fff3a9a80920 100644 (file)
@@ -29,14 +29,14 @@ Item *
 Rhythmic_head::get_dots (Grob *me)
 {
   SCM s = me->get_object ("dot");
-  return unsmob_item (s);
+  return Item::unsmob (s);
 }
 
 Item *
 Rhythmic_head::get_stem (Grob *me)
 {
   SCM s = me->get_object ("stem");
-  return unsmob_item (s);
+  return Item::unsmob (s);
 }
 
 int
index 64daa8ea5b615be924c82bf08cf37d9d5619c315..011d32cd01f1be25cdc9e71d6f7b84ea4fb928ee 100644 (file)
@@ -62,7 +62,7 @@ Rhythmic_music_iterator::process (Moment m)
               SCM art = scm_car (arts);
 
               if (c->event_source ()->is_listened_class
-                  (unsmob_stream_event (art)->get_property ("class")))
+                  (Stream_event::unsmob (art)->get_property ("class")))
                 listened = scm_cons (art, listened);
               else
                 unlistened = scm_cons (art, unlistened);
@@ -71,7 +71,7 @@ Rhythmic_music_iterator::process (Moment m)
           c->event_source ()->broadcast (ev);
           arts = scm_reverse_x (listened, SCM_EOL);
           for (; scm_is_pair (arts); arts = scm_cdr (arts))
-            c->event_source ()->broadcast (unsmob_stream_event (scm_car (arts)));
+            c->event_source ()->broadcast (Stream_event::unsmob (scm_car (arts)));
         }
       else
         c->event_source ()->broadcast (ev);
index cbfb013ddb9e9380d4032e481fb3ac2a2f4c0947..e14fa62638b9f6437330a6d102e0f2e85d66e104 100644 (file)
@@ -106,9 +106,9 @@ IMPLEMENT_LISTENER (Score_performer, prepare);
 void
 Score_performer::prepare (SCM sev)
 {
-  Stream_event *ev = unsmob_stream_event (sev);
+  Stream_event *ev = Stream_event::unsmob (sev);
   SCM sm = ev->get_property ("moment");
-  Moment *m = unsmob_moment (sm);
+  Moment *m = Moment::unsmob (sm);
   audio_column_ = new Audio_column (*m);
   announce_element (Audio_element_info (audio_column_, 0));
   precomputed_recurse_over_translators (context (), START_TRANSLATION_TIMESTEP, UP);
index 1ac2698f58624abef7b5733e0ba92cf723ecc097..fc6985e701f218ee9d13ce7fa582cc498dfad9e7 100644 (file)
@@ -44,7 +44,7 @@ LY_DEFINE (ly_score_output_defs, "ly:score-output-defs",
            "All output definitions in a score.")
 {
   LY_ASSERT_SMOB (Score, score, 1);
-  Score *sc = unsmob_score (score);
+  Score *sc = Score::unsmob (score);
 
   SCM l = SCM_EOL;
   for (vsize i = 0; i < sc->defs_.size (); i++)
@@ -58,8 +58,8 @@ LY_DEFINE (ly_score_add_output_def_x, "ly:score-add-output-def!",
 {
   LY_ASSERT_SMOB (Score, score, 1);
   LY_ASSERT_SMOB (Output_def, def, 2);
-  Score *sc = unsmob_score (score);
-  Output_def *output_def = unsmob_output_def (def);
+  Score *sc = Score::unsmob (score);
+  Output_def *output_def = Output_def::unsmob (def);
   sc->add_output_def (output_def);
   return SCM_UNSPECIFIED;
 }
@@ -69,7 +69,7 @@ LY_DEFINE (ly_score_header, "ly:score-header",
            "Return score header.")
 {
   LY_ASSERT_SMOB (Score, score, 1);
-  Score *sc = unsmob_score (score);
+  Score *sc = Score::unsmob (score);
   return sc->get_header ();
 }
 
@@ -81,7 +81,7 @@ LY_DEFINE (ly_score_set_header_x, "ly:score-set-header!",
   SCM_ASSERT_TYPE (ly_is_module (module), module, SCM_ARG2, __FUNCTION__,
                    "module");
 
-  Score *sc = unsmob_score (score);
+  Score *sc = Score::unsmob (score);
   sc->set_header (module);
   return SCM_UNSPECIFIED;
 }
@@ -91,7 +91,7 @@ LY_DEFINE (ly_score_music, "ly:score-music",
            "Return score music.")
 {
   LY_ASSERT_SMOB (Score, score, 1);
-  Score *sc = unsmob_score (score);
+  Score *sc = Score::unsmob (score);
   return sc->get_music ();
 }
 
@@ -100,7 +100,7 @@ LY_DEFINE (ly_score_error_p, "ly:score-error?",
            "Was there an error in the score?")
 {
   LY_ASSERT_SMOB (Score, score, 1);
-  Score *sc = unsmob_score (score);
+  Score *sc = Score::unsmob (score);
   return scm_from_bool (sc->error_found_);
 }
 
@@ -113,8 +113,8 @@ LY_DEFINE (ly_score_embedded_format, "ly:score-embedded-format",
   LY_ASSERT_SMOB (Score, score, 1);
   LY_ASSERT_SMOB (Output_def, layout, 2);
 
-  Score *sc = unsmob_score (score);
-  Output_def *od = unsmob_output_def (layout);
+  Score *sc = Score::unsmob (score);
+  Output_def *od = Output_def::unsmob (layout);
 
   if (sc->error_found_)
     return SCM_EOL;
index 1f26b8473b46de1d25165dd2812a96e39182a418..81477a118a49d2a2625e041debc0e743fbf5b44f 100644 (file)
@@ -41,7 +41,7 @@ using namespace std;
 Input *
 Score::origin () const
 {
-  return unsmob_input (input_location_);
+  return Input::unsmob (input_location_);
 }
 
 Score::Score ()
@@ -95,7 +95,7 @@ Score::Score (Score const &s)
   smobify_self ();
   input_location_ = make_input (*s.origin ());
 
-  Music *m = unsmob_music (s.music_);
+  Music *m = Music::unsmob (s.music_);
   if (m)
     {
       Music *mclone = m->clone ();
@@ -151,7 +151,7 @@ Score::book_rendering (Output_def *layoutbook,
 
       /* TODO: fix or junk --no-layout.  */
       SCM context = ly_run_translator (music_, scaled);
-      if (dynamic_cast<Global_context *> (unsmob_context (context)))
+      if (dynamic_cast<Global_context *> (Context::unsmob (context)))
         {
           SCM s = ly_format_output (context);
 
@@ -167,12 +167,12 @@ Score::book_rendering (Output_def *layoutbook,
 void
 Score::set_music (SCM music)
 {
-  if (unsmob_music (music_))
+  if (Music::unsmob (music_))
     {
-      unsmob_music (music)->origin ()->error (_ ("already have music in score"));
-      unsmob_music (music_)->origin ()->error (_ ("this is the previous music"));
+      Music::unsmob (music)->origin ()->error (_ ("already have music in score"));
+      Music::unsmob (music_)->origin ()->error (_ ("this is the previous music"));
     }
-  Music *m = unsmob_music (music);
+  Music *m = Music::unsmob (music);
   if (m && to_boolean (m->get_property ("error-found")))
     {
       m->origin ()->error (_ ("errors found, ignoring music expression"));
index e1ee32fd045d98eaef430767f65770cc6e713e60..4735af862f2743ba4ed6b4d2351cd82e3e117c01 100644 (file)
@@ -45,8 +45,8 @@ LY_DEFINE (ly_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.")
 {
-  Grob *i1 = unsmob_grob (a);
-  Grob *i2 = unsmob_grob (b);
+  Grob *i1 = Grob::unsmob (a);
+  Grob *i2 = Grob::unsmob (b);
 
   SCM p1 = i1->get_property ("script-priority");
   SCM p2 = i2->get_property ("script-priority");
@@ -58,7 +58,7 @@ MAKE_SCHEME_CALLBACK (Script_column, row_before_line_breaking, 1);
 SCM
 Script_column::row_before_line_breaking (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   vector<Grob *> horizontal_grobs;
   extract_grob_set (me, "scripts", scripts);
 
@@ -101,7 +101,7 @@ MAKE_SCHEME_CALLBACK (Script_column, before_line_breaking, 1);
 SCM
 Script_column::before_line_breaking (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   vector<Grob *> staff_sided;
 
   extract_grob_set (me, "scripts", scripts);
@@ -146,7 +146,7 @@ Script_column::order_grobs (vector<Grob *> grobs)
       for (SCM s = ss; scm_is_pair (s);
            s = scm_cdr (s), last = g, last_initial_outside_staff = initial_outside_staff)
         {
-          g = unsmob_grob (scm_car (s));
+          g = Grob::unsmob (scm_car (s));
           initial_outside_staff = g->get_property ("outside-staff-priority");
           if (last)    //not the first grob in the list
             {
@@ -157,7 +157,7 @@ Script_column::order_grobs (vector<Grob *> grobs)
               */
               if (!scm_is_number (last_outside_staff))
                 for (SCM t = ss; !scm_is_eq (t, s); t = scm_cdr (t))
-                  Side_position_interface::add_support (g, unsmob_grob (scm_car (t)));
+                  Side_position_interface::add_support (g, Grob::unsmob (scm_car (t)));
               /*
                 if outside_staff_priority is missing or is equal to original
                 outside_staff_priority of previous grob, set new
index 0edbb7b6cf19d092f03ca5bb802c996565d9c434..b30363ebcc81a6006150df86d562109b1c5e8215 100644 (file)
@@ -54,7 +54,7 @@ MAKE_SCHEME_CALLBACK (Script_interface, calc_positioning_done, 1);
 SCM
 Script_interface::calc_positioning_done (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   if (Grob *par = me->get_parent (X_AXIS))
     {
       Grob *stem = Note_column::get_stem (par);
@@ -73,7 +73,7 @@ Script_interface::get_direction (Grob *me)
     relative_dir = to_dir (reldir);
 
   SCM other_elt = me->get_object ("direction-source");
-  Grob *e = unsmob_grob (other_elt);
+  Grob *e = Grob::unsmob (other_elt);
   if (e)
     return (Direction) (relative_dir * get_grob_direction (e));
 
@@ -84,7 +84,7 @@ MAKE_SCHEME_CALLBACK (Script_interface, calc_direction, 1);
 SCM
 Script_interface::calc_direction (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Direction d = Script_interface::get_direction (me);
 
   if (!d)
@@ -101,13 +101,13 @@ MAKE_SCHEME_CALLBACK (Script_interface, calc_cross_staff, 1);
 SCM
 Script_interface::calc_cross_staff (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Grob *stem = Note_column::get_stem (me->get_parent (X_AXIS));
 
   if (stem && to_boolean (stem->get_property ("cross-staff")))
     return SCM_BOOL_T;
 
-  Grob *slur = unsmob_grob (me->get_object ("slur"));
+  Grob *slur = Grob::unsmob (me->get_object ("slur"));
   SCM avoid_slur = me->get_property ("avoid-slur");
   if (slur && to_boolean (slur->get_property ("cross-staff"))
       && (avoid_slur == ly_symbol2scm ("outside")
@@ -122,7 +122,7 @@ MAKE_SCHEME_CALLBACK (Script_interface, print, 1);
 SCM
 Script_interface::print (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   Direction dir = get_grob_direction (me);
 
index 664a111642362ba1174d1715ded14a1a134d65db..27800679701299f0ec4f33eef5eee748a44ca3c9 100644 (file)
@@ -29,21 +29,21 @@ MAKE_SCHEME_CALLBACK (Self_alignment_interface, y_aligned_on_self, 1);
 SCM
 Self_alignment_interface::y_aligned_on_self (SCM element)
 {
-  return aligned_on_self (unsmob_grob (element), Y_AXIS, false, 0, 0);
+  return aligned_on_self (Grob::unsmob (element), Y_AXIS, false, 0, 0);
 }
 
 MAKE_SCHEME_CALLBACK (Self_alignment_interface, x_aligned_on_self, 1);
 SCM
 Self_alignment_interface::x_aligned_on_self (SCM element)
 {
-  return aligned_on_self (unsmob_grob (element), X_AXIS, false, 0, 0);
+  return aligned_on_self (Grob::unsmob (element), X_AXIS, false, 0, 0);
 }
 
 MAKE_SCHEME_CALLBACK (Self_alignment_interface, pure_y_aligned_on_self, 3);
 SCM
 Self_alignment_interface::pure_y_aligned_on_self (SCM smob, SCM start, SCM end)
 {
-  return aligned_on_self (unsmob_grob (smob), Y_AXIS, true, robust_scm2int (start, 0), robust_scm2int (end, INT_MAX));
+  return aligned_on_self (Grob::unsmob (smob), Y_AXIS, true, robust_scm2int (start, 0), robust_scm2int (end, INT_MAX));
 }
 
 SCM
@@ -76,28 +76,28 @@ MAKE_SCHEME_CALLBACK (Self_alignment_interface, centered_on_x_parent, 1);
 SCM
 Self_alignment_interface::centered_on_x_parent (SCM smob)
 {
-  return centered_on_object (unsmob_grob (smob)->get_parent (X_AXIS), X_AXIS);
+  return centered_on_object (Grob::unsmob (smob)->get_parent (X_AXIS), X_AXIS);
 }
 
 MAKE_SCHEME_CALLBACK (Self_alignment_interface, centered_on_y_parent, 1);
 SCM
 Self_alignment_interface::centered_on_y_parent (SCM smob)
 {
-  return centered_on_object (unsmob_grob (smob)->get_parent (Y_AXIS), Y_AXIS);
+  return centered_on_object (Grob::unsmob (smob)->get_parent (Y_AXIS), Y_AXIS);
 }
 
 MAKE_SCHEME_CALLBACK (Self_alignment_interface, aligned_on_x_parent, 1);
 SCM
 Self_alignment_interface::aligned_on_x_parent (SCM smob)
 {
-  return aligned_on_parent (unsmob_grob (smob), X_AXIS);
+  return aligned_on_parent (Grob::unsmob (smob), X_AXIS);
 }
 
 MAKE_SCHEME_CALLBACK (Self_alignment_interface, aligned_on_y_parent, 1);
 SCM
 Self_alignment_interface::aligned_on_y_parent (SCM smob)
 {
-  return aligned_on_parent (unsmob_grob (smob), Y_AXIS);
+  return aligned_on_parent (Grob::unsmob (smob), Y_AXIS);
 }
 
 SCM
index c4c80d27d8e4929e21382b877ce09aa443c56684..ba5707016b0b2e50f1c486f1cd1a82fd33bf3784 100644 (file)
@@ -47,7 +47,7 @@ MAKE_SCHEME_CALLBACK (Semi_tie_column, calc_positioning_done, 1);
 SCM
 Semi_tie_column::calc_positioning_done (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   me->set_property ("positioning-done", SCM_BOOL_T);
 
@@ -84,7 +84,7 @@ MAKE_SCHEME_CALLBACK (Semi_tie_column, calc_head_direction, 1);
 SCM
 Semi_tie_column::calc_head_direction (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   extract_grob_set (me, "ties", ties);
   Direction d = LEFT;
index 8607bea4f452ab43903c95266b2421b1099f48d9..042316079841728750fc9a81f7d542c72460f6c2 100644 (file)
@@ -54,7 +54,7 @@ MAKE_SCHEME_CALLBACK (Semi_tie, calc_control_points, 1)
 SCM
 Semi_tie::calc_control_points (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   (void) me->get_property ("direction");
 
   if (Semi_tie_column::has_interface (me->get_parent (Y_AXIS)))
@@ -73,7 +73,7 @@ Semi_tie::calc_control_points (SCM smob)
 int
 Semi_tie::get_position (Grob *me)
 {
-  Grob *h = unsmob_grob (me->get_object ("note-head"));
+  Grob *h = Grob::unsmob (me->get_object ("note-head"));
   return (int) rint (Staff_symbol_referencer::get_position (h));
 }
 
index fba16bebb90e77ea730a180022673be4168adac1..c63ff065ed7f76764332339dcd7677dd9ab803fc 100644 (file)
@@ -88,7 +88,7 @@ Separating_line_group_engraver::acknowledge_item (Grob_info i)
       && !current_spacings_.staff_spacing_
       && to_boolean (get_property ("createSpacing")))
     {
-      Grob *col = unsmob_grob (get_property ("currentCommandColumn"));
+      Grob *col = Grob::unsmob (get_property ("currentCommandColumn"));
 
       current_spacings_.staff_spacing_ = make_item ("StaffSpacing", SCM_EOL);
       context ()->set_property ("hasStaffSpacing", SCM_BOOL_T);
@@ -101,12 +101,12 @@ Separating_line_group_engraver::acknowledge_item (Grob_info i)
           && last_spacings_.staff_spacing_)
         {
           SCM ri = last_spacings_.staff_spacing_->get_object ("right-items");
-          Grob_array *ga = unsmob_grob_array (ri);
+          Grob_array *ga = Grob_array::unsmob (ri);
           if (!ga)
             {
               SCM ga_scm = Grob_array::make_array ();
               last_spacings_.staff_spacing_->set_object ("right-items", ga_scm);
-              ga = unsmob_grob_array (ga_scm);
+              ga = Grob_array::unsmob (ga_scm);
             }
 
           ga->clear ();
@@ -146,7 +146,7 @@ Separating_line_group_engraver::stop_translation_timestep ()
     last_spacings_ = current_spacings_;
 
   if (Item *sp = current_spacings_.staff_spacing_)
-    if (Grob *col = unsmob_grob (get_property ("currentMusicalColumn")))
+    if (Grob *col = Grob::unsmob (get_property ("currentMusicalColumn")))
       Pointer_group_interface::add_grob (sp, ly_symbol2scm ("right-items"), col);
 
   current_spacings_.clear ();
index 0699b362c8c5ec352d4543c0b0e7a03a6d21f13e..6b50b117ee02540bce0d887a3e4752be6337d02f 100644 (file)
@@ -87,7 +87,7 @@ MAKE_SCHEME_CALLBACK (Separation_item, calc_skylines, 1);
 SCM
 Separation_item::calc_skylines (SCM smob)
 {
-  Item *me = unsmob_item (smob);
+  Item *me = Item::unsmob (smob);
   vector<Box> bs = boxes (me, 0);
   Skyline_pair sp (bs, Y_AXIS);
   /*
@@ -193,7 +193,7 @@ Separation_item::print (SCM smob)
   if (!debug_skylines)
     return SCM_BOOL_F;
 
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Stencil ret;
   if (Skyline_pair *s = Skyline_pair::unsmob (me->get_property ("horizontal-skylines")))
     {
index cdb593c0407ee27ceaac629f7e9bb4b62b3e7985..1429abd51eabbc0df11bcd0d3cfcbf54a95ba5f3 100644 (file)
@@ -33,7 +33,7 @@
 
 
   if (scm_is_pair (cursor_))
-  iter_->music_ == unsmob_music (scm_car (cursor_))
+  iter_->music_ == Music::unsmob (scm_car (cursor_))
   else
   iter_ == 0;
 
@@ -96,7 +96,7 @@ create_grace_fixup_list (SCM cursor)
 
   for (; scm_is_pair (cursor); cursor = scm_cdr (cursor))
     {
-      Music *mus = unsmob_music (scm_car (cursor));
+      Music *mus = Music::unsmob (scm_car (cursor));
       Moment s = mus->start_mom ();
       Moment l = mus->get_length () - s;
 
@@ -134,8 +134,8 @@ Sequential_iterator::construct_children ()
   iter_ = 0;
   if (scm_is_pair (cursor_))
     {
-      Music *m = unsmob_music (scm_car (cursor_));
-      iter_ = unsmob_iterator (get_iterator (m));
+      Music *m = Music::unsmob (scm_car (cursor_));
+      iter_ = Music_iterator::unsmob (get_iterator (m));
     }
 
   while (iter_ && !iter_->ok ())
@@ -195,7 +195,7 @@ Sequential_iterator::next_element (bool)
 
   iter_->quit ();
   if (scm_is_pair (cursor_))
-    iter_ = unsmob_iterator (get_iterator (unsmob_music (scm_car (cursor_))));
+    iter_ = Music_iterator::unsmob (get_iterator (Music::unsmob (scm_car (cursor_))));
   else
     iter_ = 0;
 }
index f702cba7b24061a169a70a18c7ad01e0fd8684e6..30856416d8481c6841cf80dd645482817555e254 100644 (file)
@@ -72,7 +72,7 @@ get_support_set (Grob *me)
                acs = scm_cdr (acs))
             for (SCM s = scm_cdar (acs); scm_is_pair (s); s = scm_cdr (s))
               {
-                Grob *a = unsmob_grob (scm_car (s));
+                Grob *a = Grob::unsmob (scm_car (s));
                 support.insert (a);
               }
         }
@@ -96,7 +96,7 @@ axis_aligned_side_helper (SCM smob, Axis a, bool pure, int start, int end, SCM c
       current_off_ptr = &r;
     }
 
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   // We will only ever want widths of spanners after line breaking
   // so we can set pure to false
   if (dynamic_cast<Spanner *> (me) && a == X_AXIS)
@@ -138,7 +138,7 @@ MAKE_SCHEME_CALLBACK (Side_position_interface, calc_cross_staff, 1)
 SCM
 Side_position_interface::calc_cross_staff (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   extract_grob_set (me, "side-support-elements", elts);
 
   Direction my_dir = get_grob_direction (me) ;
@@ -440,7 +440,7 @@ MAKE_SCHEME_CALLBACK (Side_position_interface, move_to_extremal_staff, 1);
 SCM
 Side_position_interface::move_to_extremal_staff (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   System *sys = dynamic_cast<System *> (me->get_system ());
   Direction dir = get_grob_direction (me);
   if (dir != DOWN)
@@ -465,7 +465,7 @@ Side_position_interface::move_to_extremal_staff (SCM smob)
   Axis_group_interface::add_element (top_staff, me);
 
   // Remove any cross-staff side-support dependencies
-  Grob_array *ga = unsmob_grob_array (me->get_object ("side-support-elements"));
+  Grob_array *ga = Grob_array::unsmob (me->get_object ("side-support-elements"));
   if (ga)
     {
       vector<Grob *> const &elts = ga->array ();
index 2eb545756fd5538f20ce5a47e44c1c7582af3017..e21cbbf0ef7db494d40704cbf5db3b230ed55066 100644 (file)
@@ -380,7 +380,7 @@ get_column_description (vector<Grob *> const &cols, vsize col_index, bool line_s
   for (SCM s = Spaceable_grob::get_minimum_distances (col);
        scm_is_pair (s); s = scm_cdr (s))
     {
-      Grob *other = unsmob_grob (scm_caar (s));
+      Grob *other = Grob::unsmob (scm_caar (s));
       vsize j = binary_search (cols, other, Paper_column::less_than, col_index);
       if (j != VPOS)
         {
index cc262a85d16387a30c152581fd3bb78afee1d8ff..92bf91b25a7cae95c1b97a7200b84b6f1cd8f042 100644 (file)
@@ -39,7 +39,7 @@ void
 Simultaneous_music_iterator::derived_substitute (Context *f, Context *t)
 {
   for (SCM s = children_list_; scm_is_pair (s); s = scm_cdr (s))
-    unsmob_iterator (scm_car (s))->substitute_outlet (f, t);
+    Music_iterator::unsmob (scm_car (s))->substitute_outlet (f, t);
 }
 
 void
@@ -53,10 +53,10 @@ Simultaneous_music_iterator::construct_children ()
   SCM *tail = &children_list_;
   for (; scm_is_pair (i); i = scm_cdr (i), j++)
     {
-      Music *mus = unsmob_music (scm_car (i));
+      Music *mus = Music::unsmob (scm_car (i));
 
       SCM scm_iter = get_static_get_iterator (mus);
-      Music_iterator *mi = unsmob_iterator (scm_iter);
+      Music_iterator *mi = Music_iterator::unsmob (scm_iter);
 
       /* if create_separate_contexts_ is set, create a new context with the
          number number as name */
@@ -88,7 +88,7 @@ Simultaneous_music_iterator::process (Moment until)
   SCM *proc = &children_list_;
   while (scm_is_pair (*proc))
     {
-      Music_iterator *i = unsmob_iterator (scm_car (*proc));
+      Music_iterator *i = Music_iterator::unsmob (scm_car (*proc));
       if (i->run_always ()
           || i->pending_moment () == until)
         i->process (until);
@@ -110,7 +110,7 @@ Simultaneous_music_iterator::pending_moment () const
 
   for (SCM s = children_list_; scm_is_pair (s); s = scm_cdr (s))
     {
-      Music_iterator *it = unsmob_iterator (scm_car (s));
+      Music_iterator *it = Music_iterator::unsmob (scm_car (s));
       next = min (next, it->pending_moment ());
     }
 
@@ -123,7 +123,7 @@ Simultaneous_music_iterator::ok () const
   bool run_always_ok = false;
   for (SCM s = children_list_; scm_is_pair (s); s = scm_cdr (s))
     {
-      Music_iterator *it = unsmob_iterator (scm_car (s));
+      Music_iterator *it = Music_iterator::unsmob (scm_car (s));
       if (!it->run_always ())
         return true;
       else
@@ -137,7 +137,7 @@ Simultaneous_music_iterator::run_always () const
 {
   for (SCM s = children_list_; scm_is_pair (s); s = scm_cdr (s))
     {
-      Music_iterator *it = unsmob_iterator (scm_car (s));
+      Music_iterator *it = Music_iterator::unsmob (scm_car (s));
       if (it->run_always ())
         return true;
     }
@@ -148,7 +148,7 @@ void
 Simultaneous_music_iterator::do_quit ()
 {
   for (SCM s = children_list_; scm_is_pair (s); s = scm_cdr (s))
-    unsmob_iterator (scm_car (s))->quit ();
+    Music_iterator::unsmob (scm_car (s))->quit ();
 }
 
 IMPLEMENT_CTOR_CALLBACK (Simultaneous_music_iterator);
index ccd3225ec182203097cc879c1ee692f8c8a57fb6..a72bbbc5a921fd8b732e0c7a720734f5c11bfd74 100644 (file)
@@ -125,7 +125,7 @@ Slur_proto_engraver::finalize ()
 void
 Slur_proto_engraver::create_slur (const string &spanner_id, Stream_event *ev_cause, Grob *g_cause, Direction dir, bool left_broken)
 {
-  Grob *ccc = unsmob_grob (get_property ("currentCommandColumn"));
+  Grob *ccc = Grob::unsmob (get_property ("currentCommandColumn"));
   SCM cause = ev_cause ? ev_cause->self_scm () : g_cause->self_scm ();
   Spanner *slur = make_spanner (grob_name_, cause);
   slur->set_property ("spanner-id", ly_string2scm (spanner_id));
@@ -176,7 +176,7 @@ Slur_proto_engraver::can_create_slur (const string &id, vsize old_slurs, vsize *
           if (!updown)
             return false;
 
-          Stream_event *c = unsmob_stream_event (slur->get_property ("cause"));
+          Stream_event *c = Stream_event::unsmob (slur->get_property ("cause"));
 
           if (!c)
             {
@@ -266,7 +266,7 @@ Slur_proto_engraver::set_melisma (bool)
 void
 Slur_proto_engraver::stop_translation_timestep ()
 {
-  if (Grob *g = unsmob_grob (get_property ("currentCommandColumn")))
+  if (Grob *g = Grob::unsmob (get_property ("currentCommandColumn")))
     {
       for (vsize i = 0; i < end_slurs_.size (); i++)
         Slur::add_extra_encompass (end_slurs_[i], g);
@@ -280,7 +280,7 @@ Slur_proto_engraver::stop_translation_timestep ()
     {
       Spanner *s = dynamic_cast<Spanner *> (end_slurs_[i]);
       if (!s->get_bound (RIGHT))
-        s->set_bound (RIGHT, unsmob_grob (get_property ("currentMusicalColumn")));
+        s->set_bound (RIGHT, Grob::unsmob (get_property ("currentMusicalColumn")));
       announce_end_grob (s, SCM_EOL);
     }
 
index 61a4423159a4d56792c7c8a8338fe280b6b9f32e..7ffdacee0c93be0be505b1e41fdc93e1f5180054 100644 (file)
@@ -107,7 +107,7 @@ Slur_score_state::slur_direction () const
 Encompass_info
 Slur_score_state::get_encompass_info (Grob *col) const
 {
-  Grob *stem = unsmob_grob (col->get_object ("stem"));
+  Grob *stem = Grob::unsmob (col->get_object ("stem"));
   Encompass_info ei;
 
   if (!stem)
@@ -331,7 +331,7 @@ MAKE_SCHEME_CALLBACK (Slur, calc_control_points, 1)
 SCM
 Slur::calc_control_points (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
 
   Slur_score_state state;
   state.fill (me);
index 7d2ca978c7afb1d46064136dcad85260eeb2e551..9179e1e5609fae5fd59f43d487022d94e572fa18 100644 (file)
@@ -47,7 +47,7 @@ MAKE_SCHEME_CALLBACK (Slur, calc_direction, 1)
 SCM
 Slur::calc_direction (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   extract_grob_set (me, "note-columns", encompasses);
 
   if (encompasses.empty ())
@@ -81,7 +81,7 @@ Slur::pure_height (SCM smob, SCM start_scm, SCM end_scm)
     -- adding extra height for scripts that avoid slurs on the inside
     -- adding extra height for the "bulge" in a slur above a note head
   */
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   int start = scm_to_int (start_scm);
   int end = scm_to_int (end_scm);
   Direction dir = get_grob_direction (me);
@@ -133,7 +133,7 @@ MAKE_SCHEME_CALLBACK (Slur, height, 1);
 SCM
 Slur::height (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   // FIXME uncached
   Stencil *m = me->get_stencil ();
@@ -145,7 +145,7 @@ MAKE_SCHEME_CALLBACK (Slur, print, 1);
 SCM
 Slur::print (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   extract_grob_set (me, "note-columns", encompasses);
   if (encompasses.empty ())
     {
@@ -179,7 +179,7 @@ Slur::print (SCM smob)
         properties = scm_cons (scm_acons (ly_symbol2scm ("font-size"), scm_from_int (-6), SCM_EOL),
                                properties);
 
-      Stencil tm = *unsmob_stencil (Text_interface::interpret_markup
+      Stencil tm = *Stencil::unsmob (Text_interface::interpret_markup
                                     (me->layout ()->self_scm (), properties,
                                      annotation));
       a.add_at_edge (Y_AXIS, get_grob_direction (me), tm, 1.0);
@@ -222,7 +222,7 @@ Slur::replace_breakable_encompass_objects (Grob *me)
   if (Grob_array::unsmob (encompass_scm))
     {
       vector<Grob *> &arr
-        = unsmob_grob_array (encompass_scm)->array_reference ();
+        = Grob_array::unsmob (encompass_scm)->array_reference ();
       arr = new_encompasses;
     }
 }
@@ -258,8 +258,8 @@ Slur::pure_outside_slur_callback (SCM grob, SCM start_scm, SCM end_scm, SCM offs
 {
   int start = robust_scm2int (start_scm, 0);
   int end = robust_scm2int (end_scm, 0);
-  Grob *script = unsmob_grob (grob);
-  Grob *slur = unsmob_grob (script->get_object ("slur"));
+  Grob *script = Grob::unsmob (grob);
+  Grob *slur = Grob::unsmob (script->get_object ("slur"));
   if (!slur)
     return offset_scm;
 
@@ -276,8 +276,8 @@ MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Slur, outside_slur_callback, 2, 1, "");
 SCM
 Slur::outside_slur_callback (SCM grob, SCM offset_scm)
 {
-  Grob *script = unsmob_grob (grob);
-  Grob *slur = unsmob_grob (script->get_object ("slur"));
+  Grob *script = Grob::unsmob (grob);
+  Grob *slur = Grob::unsmob (script->get_object ("slur"));
 
   if (!slur)
     return offset_scm;
@@ -369,7 +369,7 @@ MAKE_SCHEME_CALLBACK (Slur, vertical_skylines, 1);
 SCM
 Slur::vertical_skylines (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   vector<Box> boxes;
 
   if (!me)
@@ -448,8 +448,8 @@ Slur::outside_slur_cross_staff (SCM smob, SCM previous)
   if (previous == SCM_BOOL_T)
     return previous;
 
-  Grob *me = unsmob_grob (smob);
-  Grob *slur = unsmob_grob (me->get_object ("slur"));
+  Grob *me = Grob::unsmob (smob);
+  Grob *slur = Grob::unsmob (me->get_object ("slur"));
 
   if (!slur)
     return SCM_BOOL_F;
@@ -460,7 +460,7 @@ MAKE_SCHEME_CALLBACK (Slur, calc_cross_staff, 1)
 SCM
 Slur::calc_cross_staff (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   extract_grob_set (me, "note-columns", cols);
   extract_grob_set (me, "encompass-objects", extras);
index 19aea8e496a832890c2e7027ebac29ab1576692a..0153e6d804009f4972e772d921df7b87bfb5a960 100644 (file)
@@ -85,9 +85,9 @@ Spaceable_grob::get_spring (Grob *this_col, Grob *next_col)
        s = scm_cdr (s))
     {
       if (scm_is_pair (scm_car (s))
-          && unsmob_grob (scm_cdar (s)) == next_col
-          && unsmob_spring (scm_caar (s)))
-        spring = unsmob_spring (scm_caar (s));
+          && Grob::unsmob (scm_cdar (s)) == next_col
+          && Spring::unsmob (scm_caar (s)))
+        spring = Spring::unsmob (scm_caar (s));
     }
 
   if (!spring)
index df9f9ecec8db19b4cbe8a61e2ae1c4f8587db8bc..53b9de3a2c9fc502adf0fac4f4a59f7638a04162 100644 (file)
@@ -44,7 +44,7 @@ Spacing_spanner::standard_breakable_column_spacing (Grob *me, Item *l, Item *r,
 
   if (Paper_column::is_breakable (l) && Paper_column::is_breakable (r))
     {
-      Moment *dt = unsmob_moment (l->get_property ("measure-length"));
+      Moment *dt = Moment::unsmob (l->get_property ("measure-length"));
       Moment mlen (1);
       if (dt)
         mlen = *dt;
@@ -91,7 +91,7 @@ get_measure_length (Grob *column)
 
   do
     {
-      if (Moment *len = unsmob_moment (cols[col_idx]->get_property ("measure-length")))
+      if (Moment *len = Moment::unsmob (cols[col_idx]->get_property ("measure-length")))
         {
           return len;
         }
@@ -111,8 +111,8 @@ Spacing_spanner::note_spacing (Grob * /* me */,
   Moment shortest_playing_len = 0;
   SCM s = lc->get_property ("shortest-playing-duration");
 
-  if (unsmob_moment (s))
-    shortest_playing_len = *unsmob_moment (s);
+  if (Moment::unsmob (s))
+    shortest_playing_len = *Moment::unsmob (s);
 
   if (! shortest_playing_len.to_bool ())
     {
@@ -161,7 +161,7 @@ Spacing_spanner::note_spacing (Grob * /* me */,
     }
   else if (delta_t.grace_part_)
     {
-      Grob *grace_spacing = unsmob_grob (lc->get_object ("grace-spacing"));
+      Grob *grace_spacing = Grob::unsmob (lc->get_object ("grace-spacing"));
       if (grace_spacing)
         {
           Spacing_options grace_opts;
index d7fd373cbab3dc92021e0e5b2a3edc219d25609f..efefddba893729dab17a0fb5abe24f05c6d77b2c 100644 (file)
@@ -80,8 +80,8 @@ is_loose_column (Grob *l, Grob *col, Grob *r, Spacing_options const *options)
 
   */
 
-  Item *r_neighbor = unsmob_item (col->get_object ("right-neighbor"));
-  Item *l_neighbor = unsmob_item (col->get_object ("left-neighbor"));
+  Item *r_neighbor = Item::unsmob (col->get_object ("right-neighbor"));
+  Item *l_neighbor = Item::unsmob (col->get_object ("left-neighbor"));
 
   if (!l_neighbor || !r_neighbor)
     return false;
@@ -219,8 +219,8 @@ Spacing_spanner::prune_loose_columns (Grob *me,
 
       if (loose)
         {
-          Grob *right_neighbor = unsmob_grob (c->get_object ("right-neighbor"));
-          Grob *left_neighbor = unsmob_grob (c->get_object ("left-neighbor"));
+          Grob *right_neighbor = Grob::unsmob (c->get_object ("right-neighbor"));
+          Grob *left_neighbor = Grob::unsmob (c->get_object ("left-neighbor"));
 
           /*
             Either object can be non existent, if the score ends
@@ -282,7 +282,7 @@ Spacing_spanner::set_explicit_neighbor_columns (vector<Grob *> const &cols)
                   min_right_rank = right_rank;
                 }
 
-              Grob *old_left_neighbor = unsmob_grob (right_col->get_object ("left-neighbor"));
+              Grob *old_left_neighbor = Grob::unsmob (right_col->get_object ("left-neighbor"));
               if (!old_left_neighbor || left_rank > Paper_column::get_rank (old_left_neighbor))
                 right_col->set_object ("left-neighbor", left_col->self_scm ());
             }
@@ -304,9 +304,9 @@ Spacing_spanner::set_implicit_neighbor_columns (vector<Grob *> const &cols)
       if (!Paper_column::is_breakable (it) && !Paper_column::is_musical (it))
         continue;
 
-      if (i && !unsmob_grob (cols[i]->get_object ("left-neighbor")))
+      if (i && !Grob::unsmob (cols[i]->get_object ("left-neighbor")))
         cols[i]->set_object ("left-neighbor", cols[i - 1]->self_scm ());
-      if (i + 1 < cols.size () && !unsmob_grob (cols[i]->get_object ("right-neighbor")))
+      if (i + 1 < cols.size () && !Grob::unsmob (cols[i]->get_object ("right-neighbor")))
         cols[i]->set_object ("right-neighbor", cols[i + 1]->self_scm ());
     }
 }
index 80892fac6bed75ba90fdab2c27f04e496fcce436..b0d43ec8bb86fad20be2775b6430f71f1bdff72b 100644 (file)
@@ -123,7 +123,7 @@ Spacing_engraver::start_spanner ()
 
   spacing_ = make_spanner ("SpacingSpanner", SCM_EOL);
   spacing_->set_bound (LEFT,
-                       unsmob_grob (get_property ("currentCommandColumn")));
+                       Grob::unsmob (get_property ("currentCommandColumn")));
 }
 
 void
@@ -137,7 +137,7 @@ Spacing_engraver::stop_spanner ()
 {
   if (spacing_)
     {
-      Grob *p = unsmob_grob (get_property ("currentCommandColumn"));
+      Grob *p = Grob::unsmob (get_property ("currentCommandColumn"));
 
       spacing_->set_bound (RIGHT, p);
       spacing_ = 0;
@@ -194,17 +194,17 @@ void
 Spacing_engraver::stop_translation_timestep ()
 {
   Paper_column *musical_column
-    = dynamic_cast<Paper_column *> (unsmob_grob (get_property ("currentMusicalColumn")));
+    = dynamic_cast<Paper_column *> (Grob::unsmob (get_property ("currentMusicalColumn")));
 
   if (!spacing_)
     start_spanner ();
 
   musical_column->set_object ("spacing", spacing_->self_scm ());
-  unsmob_grob (get_property ("currentCommandColumn"))
+  Grob::unsmob (get_property ("currentCommandColumn"))
   ->set_object ("spacing", spacing_->self_scm ());
 
   SCM proportional = get_property ("proportionalNotationDuration");
-  if (unsmob_moment (proportional))
+  if (Moment::unsmob (proportional))
     {
       musical_column->set_property ("shortest-playing-duration", proportional);
       musical_column->set_property ("shortest-starter-duration", proportional);
index 9e11cfa73a3545b3329c62f03ed22a7aa48585dc..b7bef8d2c3f59fbc453a2c07e606323c025df27b 100644 (file)
@@ -108,7 +108,7 @@ Spacing_interface::right_column (Grob *me)
   if (!me->is_live ())
     return 0;
 
-  Grob_array *a = unsmob_grob_array (me->get_object ("right-items"));
+  Grob_array *a = Grob_array::unsmob (me->get_object ("right-items"));
   Item *mincol = 0;
   int min_rank = INT_MAX;
   for (vsize i = 0; a && i < a->size (); i++)
index bcac6ff4937a1ca9864212e86c247926d9eadbf9..2a70a5546e2c69020154dbe20f3a5d980b353512 100644 (file)
@@ -60,8 +60,8 @@ set_loose_columns (System *which, Column_x_positions const *posns)
           if (!loose->get_system ())
             break;
 
-          Paper_column *le = dynamic_cast<Paper_column *> (unsmob_grob (scm_car (between)));
-          Paper_column *re = dynamic_cast<Paper_column *> (unsmob_grob (scm_cdr (between)));
+          Paper_column *le = dynamic_cast<Paper_column *> (Grob::unsmob (scm_car (between)));
+          Paper_column *re = dynamic_cast<Paper_column *> (Grob::unsmob (scm_cdr (between)));
 
           if (! (le && re))
             break;
@@ -135,8 +135,8 @@ set_loose_columns (System *which, Column_x_positions const *posns)
           Paper_column *loose_col = dynamic_cast<Paper_column *> (clique[j]);
           Paper_column *next_col = dynamic_cast<Paper_column *> (clique[j + 1]);
 
-          Grob *spacing = unsmob_grob (clique_col->get_object ("spacing"));
-          if (Grob *grace_spacing = unsmob_grob (clique_col->get_object ("grace-spacing")))
+          Grob *spacing = Grob::unsmob (clique_col->get_object ("spacing"));
+          if (Grob *grace_spacing = Grob::unsmob (clique_col->get_object ("grace-spacing")))
             {
               spacing = grace_spacing;
             }
index 2f2724689d6e99cf1493fd3259694d2eec34547b..204893627debfc77f67c4f3e839f8ff4c6d2fc5a 100644 (file)
@@ -58,7 +58,7 @@ MAKE_SCHEME_CALLBACK (Spacing_spanner, set_springs, 1);
 SCM
 Spacing_spanner::set_springs (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
 
   /*
     can't use get_system () ? --hwn.
@@ -89,7 +89,7 @@ MAKE_SCHEME_CALLBACK (Spacing_spanner, calc_common_shortest_duration, 1);
 SCM
 Spacing_spanner::calc_common_shortest_duration (SCM grob)
 {
-  Spanner *me = unsmob_spanner (grob);
+  Spanner *me = Spanner::unsmob (grob);
 
   vector<Grob *> cols (get_columns (me));
 
@@ -106,7 +106,7 @@ Spacing_spanner::calc_common_shortest_duration (SCM grob)
     {
       if (Paper_column::is_musical (cols[i]))
         {
-          Moment *when = unsmob_moment (cols[i]->get_property ("when"));
+          Moment *when = Moment::unsmob (cols[i]->get_property ("when"));
 
           /*
             ignore grace notes for shortest notes.
@@ -115,7 +115,7 @@ Spacing_spanner::calc_common_shortest_duration (SCM grob)
             continue;
 
           SCM st = cols[i]->get_property ("shortest-starter-duration");
-          Moment this_shortest = *unsmob_moment (st);
+          Moment this_shortest = *Moment::unsmob (st);
           assert (this_shortest.to_bool ());
           shortest_in_measure = min (shortest_in_measure, this_shortest.main_part_);
         }
@@ -161,7 +161,7 @@ Spacing_spanner::calc_common_shortest_duration (SCM grob)
 
   SCM bsd = me->get_property ("base-shortest-duration");
   Rational d = Rational (1, 8);
-  if (Moment *m = unsmob_moment (bsd))
+  if (Moment *m = Moment::unsmob (bsd))
     d = m->main_part_;
 
   if (max_idx != VPOS)
@@ -354,7 +354,7 @@ Spacing_spanner::musical_column_spacing (Grob *me,
           if (found_matching_column && Note_spacing::has_interface (wish))
             {
               Real inc = options->increment_;
-              Grob *gsp = unsmob_grob (left_col->get_object ("grace-spacing"));
+              Grob *gsp = Grob::unsmob (left_col->get_object ("grace-spacing"));
               if (gsp && Paper_column::when_mom (left_col).grace_part_)
                 {
                   Spacing_options grace_opts;
@@ -447,7 +447,7 @@ Spacing_spanner::fills_measure (Grob *me, Item *left, Item *col)
   Moment dt
     = Paper_column::when_mom (next) - Paper_column::when_mom (col);
 
-  Moment *len = unsmob_moment (left->get_property ("measure-length"));
+  Moment *len = Moment::unsmob (left->get_property ("measure-length"));
   if (!len)
     return false;
 
index 88d82b36c6dedbb32879eb67268e24893bce539e..d02ff4ae54873006e1b60228684194381207b3fe 100644 (file)
@@ -93,7 +93,7 @@ Span_bar_stub_engraver::process_acknowledged ()
       programming_error ("At least one vertical axis group needs to be created in the first time step.");
       return;
     }
-  Grob *vertical_alignment = Grob::get_root_vertical_alignment (unsmob_grob (scm_caar (axis_groups_)));
+  Grob *vertical_alignment = Grob::get_root_vertical_alignment (Grob::unsmob (scm_caar (axis_groups_)));
   if (!vertical_alignment) // we are at the beginning of a score, so no need for stubs
     return;
 
@@ -112,8 +112,8 @@ Span_bar_stub_engraver::process_acknowledged ()
       vector<bool> keep_extent;
       for (SCM s = axis_groups_; scm_is_pair (s); s = scm_cdr (s))
         {
-          Context *c = unsmob_context (scm_cdar (s));
-          Grob *g = unsmob_grob (scm_caar (s));
+          Context *c = Context::unsmob (scm_cdar (s));
+          Grob *g = Grob::unsmob (scm_caar (s));
           if (!c || !g)
             continue;
           if (c->is_removable ())
@@ -162,8 +162,8 @@ Span_bar_stub_engraver::stop_translation_timestep ()
   SCM axis_groups = SCM_EOL;
   for (SCM s = axis_groups_; scm_is_pair (s); s = scm_cdr (s))
     {
-      Context *c = unsmob_context (scm_cdar (s));
-      Grob *g = unsmob_grob (scm_caar (s));
+      Context *c = Context::unsmob (scm_cdar (s));
+      Grob *g = Grob::unsmob (scm_caar (s));
       if (!c || !g)
         continue;
       if (c->is_removable ())
index f14c69c76f01763549cf0be8fa0ca9f6750886d9..4c77ccc01a3fc09442bb774788a98ee4e2797b38 100644 (file)
@@ -26,9 +26,9 @@ LY_DEFINE (ly_spanner_bound, "ly:spanner-bound",
            "Get one of the bounds of @var{spanner}.  @var{dir} is @w{@code{-1}}"
            " for left, and @code{1} for right.")
 {
-  LY_ASSERT_TYPE (unsmob_spanner, spanner, 1);
+  LY_ASSERT_TYPE (Spanner::unsmob, spanner, 1);
   LY_ASSERT_TYPE (is_direction, dir, 2);
-  Item *bound = unsmob_spanner (spanner)->get_bound (to_dir (dir));
+  Item *bound = Spanner::unsmob (spanner)->get_bound (to_dir (dir));
   return bound ? bound->self_scm () : SCM_EOL;
 }
 
@@ -37,11 +37,11 @@ LY_DEFINE (ly_spanner_set_bound_x, "ly:spanner-set-bound!",
            "Set grob @var{item} as bound in direction @var{dir} for"
            " @var{spanner}.")
 {
-  LY_ASSERT_TYPE (unsmob_spanner, spanner, 1);
+  LY_ASSERT_TYPE (Spanner::unsmob, spanner, 1);
   LY_ASSERT_TYPE (is_direction, dir, 2);
-  LY_ASSERT_TYPE (unsmob_item, item, 3);
+  LY_ASSERT_TYPE (Item::unsmob, item, 3);
 
-  unsmob_spanner (spanner)->set_bound (to_dir (dir), unsmob_item (item));
+  Spanner::unsmob (spanner)->set_bound (to_dir (dir), Item::unsmob (item));
   return SCM_UNSPECIFIED;
 }
 
@@ -51,8 +51,8 @@ LY_DEFINE (ly_spanner_broken_into, "ly:spanner-broken-into",
            1, 0, 0, (SCM spanner),
            "Return broken-into list for @var{spanner}.")
 {
-  LY_ASSERT_TYPE (unsmob_spanner, spanner, 1);
-  Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (spanner));
+  LY_ASSERT_TYPE (Spanner::unsmob, spanner, 1);
+  Spanner *me = dynamic_cast<Spanner *> (Grob::unsmob (spanner));
 
   SCM s = SCM_EOL;
   for (vsize i = me->broken_intos_.size (); i--;)
@@ -64,7 +64,7 @@ LY_DEFINE (ly_spanner_p, "ly:spanner?",
            1, 0, 0, (SCM g),
            "Is @var{g} a spanner object?")
 {
-  Grob *me = unsmob_grob (g);
+  Grob *me = Grob::unsmob (g);
   bool b = dynamic_cast<Spanner *> (me);
 
   return ly_bool2scm (b);
index 7c36f1755b5701a45d2ea42aea9b7b0bf7a60963..52745136fc54a891498ca96ba53b8273465e3ccd 100644 (file)
@@ -364,7 +364,7 @@ MAKE_SCHEME_CALLBACK (Spanner, set_spacing_rods, 1);
 SCM
 Spanner::set_spacing_rods (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   SCM num_length = me->get_property ("minimum-length");
   if (scm_is_number (num_length))
     {
@@ -422,7 +422,7 @@ MAKE_SCHEME_CALLBACK (Spanner, calc_normalized_endpoints, 1);
 SCM
 Spanner::calc_normalized_endpoints (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
   SCM result = SCM_EOL;
 
   Spanner *orig = dynamic_cast<Spanner *> (me->original ());
@@ -466,16 +466,16 @@ Spanner::calc_normalized_endpoints (SCM smob)
 }
 
 Spanner *
-unsmob_spanner (SCM s)
+Spanner::unsmob (SCM s)
 {
-  return dynamic_cast<Spanner *> (unsmob_grob (s));
+  return dynamic_cast<Spanner *> (Grob::unsmob (s));
 }
 
 MAKE_SCHEME_CALLBACK (Spanner, bounds_width, 1);
 SCM
 Spanner::bounds_width (SCM grob)
 {
-  Spanner *me = unsmob_spanner (grob);
+  Spanner *me = Spanner::unsmob (grob);
 
   Grob *common = me->get_bound (LEFT)->common_refpoint (me->get_bound (RIGHT), X_AXIS);
 
@@ -491,7 +491,7 @@ MAKE_SCHEME_CALLBACK (Spanner, kill_zero_spanned_time, 1);
 SCM
 Spanner::kill_zero_spanned_time (SCM grob)
 {
-  Spanner *me = unsmob_spanner (grob);
+  Spanner *me = Spanner::unsmob (grob);
   /*
     Remove the line or hairpin at the start of the line.  For
     piano voice indicators, it makes no sense to have them at
index 8e3ce16640914d0df892738b197a210855c6129e..5caa8e50628dd389c9859f81c22ab3a1b5e15d81 100644 (file)
@@ -62,7 +62,7 @@ LY_DEFINE (ly_spring_set_inverse_compress_strength_x, "ly:spring-set-inverse-com
   LY_ASSERT_SMOB (Spring, spring, 1);
   LY_ASSERT_TYPE (scm_is_number, strength, 2);
 
-  Spring *s = unsmob_spring (spring);
+  Spring *s = Spring::unsmob (spring);
   s->set_inverse_compress_strength (scm_to_double (strength));
   return s->smobbed_copy ();
 }
@@ -74,7 +74,7 @@ LY_DEFINE (ly_spring_set_inverse_stretch_strength_x, "ly:spring-set-inverse-stre
   LY_ASSERT_SMOB (Spring, spring, 1);
   LY_ASSERT_TYPE (scm_is_number, strength, 2);
 
-  Spring *s = unsmob_spring (spring);
+  Spring *s = Spring::unsmob (spring);
   s->set_inverse_stretch_strength (scm_to_double (strength));
   return s->smobbed_copy ();
 }
index d9c430f316823dc2670c81e23fa61c0ff6694188..0b0dcd38d2f5d88a242b3461f1616f762bb3ec9f 100644 (file)
@@ -41,7 +41,7 @@ Staff_grouper_interface::maybe_pure_within_group (Grob *me, Grob *child, bool pu
     if (Page_layout_problem::is_spaceable (*i)
         && ((pure && !Hara_kiri_group_spanner::request_suicide (*i, start, end))
             || (!pure && (*i)->is_live ())))
-      return me == unsmob_grob ((*i)->get_object ("staff-grouper"));
+      return me == Grob::unsmob ((*i)->get_object ("staff-grouper"));
 
   // If there was no spaceable, living child after me, I don't
   // count as within the group.
index 3a1a1fb32b55d695c04284d1716c8874aeef79a8..12ec0c704b135a055973611d596726481ed40c33 100644 (file)
@@ -110,7 +110,7 @@ Staff_symbol_engraver::start_spanner ()
     {
       span_ = make_spanner ("StaffSymbol", SCM_EOL);
       span_->set_bound (LEFT,
-                        unsmob_grob (get_property ("currentCommandColumn")));
+                        Grob::unsmob (get_property ("currentCommandColumn")));
     }
 }
 
@@ -121,7 +121,7 @@ Staff_symbol_engraver::stop_spanner ()
     return;
 
   if (!finished_span_->get_bound (RIGHT))
-    finished_span_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn")));
+    finished_span_->set_bound (RIGHT, Grob::unsmob (get_property ("currentCommandColumn")));
 
   announce_end_grob (finished_span_,
                      span_events_[STOP]
index f72605fc26496c6d69cd7919e6bbf5099df20c52..22e6790f74a6a051baeb6697451f29fb3fe1a4dd 100644 (file)
@@ -27,7 +27,7 @@ LY_DEFINE (ly_grob_staff_position, "ly:grob-staff-position",
            "Return the Y-position of @var{sg} relative to the staff.")
 {
   LY_ASSERT_SMOB (Grob, sg, 1);
-  Grob *g = unsmob_grob (sg);
+  Grob *g = Grob::unsmob (sg);
   Real pos = Staff_symbol_referencer::get_position (g);
 
   if (fabs (rint (pos) - pos) < 1e-6) // ugh.
@@ -43,7 +43,7 @@ LY_DEFINE (ly_position_on_line_p, "ly:position-on-line?",
 {
   LY_ASSERT_SMOB (Grob, sg, 1);
   LY_ASSERT_TYPE (scm_is_number, spos, 2);
-  Grob *g = unsmob_grob (sg);
+  Grob *g = Grob::unsmob (sg);
   Grob *st = Staff_symbol_referencer::get_staff_symbol (g);
   int pos = scm_to_int (spos);
   bool on_line = st ? Staff_symbol::on_line (g, pos) : false;
@@ -57,7 +57,7 @@ LY_DEFINE (ly_staff_symbol_line_thickness, "ly:staff-symbol-line-thickness",
            " current staff-space height.")
 {
   LY_ASSERT_SMOB (Grob, grob, 1);
-  Grob *g = unsmob_grob (grob);
+  Grob *g = Grob::unsmob (grob);
   Real thickness = Staff_symbol_referencer::line_thickness (g);
   return scm_from_double (thickness);
 }
@@ -70,7 +70,7 @@ LY_DEFINE (ly_staff_symbol_staff_space, "ly:staff-symbol-staff-space",
            " five-line staff.")
 {
   LY_ASSERT_SMOB (Grob, grob, 1);
-  Grob *g = unsmob_grob (grob);
+  Grob *g = Grob::unsmob (grob);
   Real staff_space = Staff_symbol_referencer::staff_space (g);
   return scm_from_double (staff_space);
 }
@@ -81,7 +81,7 @@ LY_DEFINE (ly_staff_symbol_staff_radius, "ly:staff-symbol-staff-radius",
            " @var{grob}.")
 {
   LY_ASSERT_SMOB (Grob, grob, 1);
-  Grob *g = unsmob_grob (grob);
+  Grob *g = Grob::unsmob (grob);
   Real staff_radius = Staff_symbol_referencer::staff_radius (g);
   return scm_from_double (staff_radius);
 }
index ffad2e6fdd4c7bd07e8f0d69c76025a650a496cb..6fc5f1763982ae2ffa0dac2660b07c0887132a64 100644 (file)
@@ -52,7 +52,7 @@ Staff_symbol_referencer::get_staff_symbol (Grob *me)
     return me;
 
   SCM st = me->get_object ("staff-symbol");
-  return unsmob_grob (st);
+  return Grob::unsmob (st);
 }
 
 Real
@@ -138,7 +138,7 @@ MAKE_SCHEME_CALLBACK (Staff_symbol_referencer, callback, 1);
 SCM
 Staff_symbol_referencer::callback (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   SCM pos = me->get_property ("staff-position");
   Real off = 0.0;
index 9ee7f3a52d6ff89b8dc0630ac0b7cc9bb2271b91..a5db48de46887a1e44527fb0ce13551a1c683d65 100644 (file)
@@ -33,7 +33,7 @@ MAKE_SCHEME_CALLBACK (Staff_symbol, print, 1);
 SCM
 Staff_symbol::print (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Spanner *sp = dynamic_cast<Spanner *> (me);
   Grob *common
     = sp->get_bound (LEFT)->common_refpoint (sp->get_bound (RIGHT), X_AXIS);
@@ -279,7 +279,7 @@ MAKE_SCHEME_CALLBACK (Staff_symbol, height, 1);
 SCM
 Staff_symbol::height (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Real t = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
   t *= robust_scm2double (me->get_property ("thickness"), 1.0);
 
index 8a20d6184eb5327f0561d34b5686ccd2ba91ec67..85204b09d67d9adbe89a5ea097f987e4615080fd 100644 (file)
@@ -91,7 +91,7 @@ Stem_engraver::make_stem (Grob_info gi, bool tuplet_start)
         for a note head is always <= 2.
       */
       Stream_event *ev = gi.event_cause ();
-      Duration *dur = unsmob_duration (ev->get_property ("duration"));
+      Duration *dur = Duration::unsmob (ev->get_property ("duration"));
 
       int tremolo_flags = intlog2 (requested_type) - 2
                           - (dur->duration_log () > 2 ? dur->duration_log () - 2 : 0);
@@ -124,7 +124,7 @@ Stem_engraver::acknowledge_rhythmic_head (Grob_info gi)
   Stream_event *cause = gi.event_cause ();
   if (!cause)
     return;
-  Duration *d = unsmob_duration (cause->get_property ("duration"));
+  Duration *d = Duration::unsmob (cause->get_property ("duration"));
   if (!d)
     return;
 
@@ -173,7 +173,7 @@ void
 Stem_engraver::kill_unused_flags ()
 {
   for (vsize i = 0; i < maybe_flags_.size (); i++)
-    if (unsmob_grob (maybe_flags_[i]->get_parent (X_AXIS)->get_object ("beam")))
+    if (Grob::unsmob (maybe_flags_[i]->get_parent (X_AXIS)->get_object ("beam")))
       maybe_flags_[i]->suicide ();
 }
 
index 8879456fbe8285576c1959127c54d9777bd33678..b3bb3bec9ee383f8199b9973bcc5f2c9f52d27f3 100644 (file)
@@ -35,8 +35,8 @@ MAKE_SCHEME_CALLBACK (Stem_tremolo, calc_slope, 1)
 SCM
 Stem_tremolo::calc_slope (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
-  Grob *stem = unsmob_grob (me->get_object ("stem"));
+  Grob *me = Grob::unsmob (smob);
+  Grob *stem = Grob::unsmob (me->get_object ("stem"));
   Spanner *beam = Stem::get_beam (stem);
 
   if (beam)
@@ -66,8 +66,8 @@ MAKE_SCHEME_CALLBACK (Stem_tremolo, calc_width, 1)
 SCM
 Stem_tremolo::calc_width (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
-  Grob *stem = unsmob_grob (me->get_object ("stem"));
+  Grob *me = Grob::unsmob (smob);
+  Grob *stem = Grob::unsmob (me->get_object ("stem"));
   Direction dir = get_grob_direction (me);
   bool beam = Stem::get_beam (stem);
   bool flag = Stem::duration_log (stem) >= 3 && !beam;
@@ -80,8 +80,8 @@ MAKE_SCHEME_CALLBACK (Stem_tremolo, calc_style, 1)
 SCM
 Stem_tremolo::calc_style (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
-  Grob *stem = unsmob_grob (me->get_object ("stem"));
+  Grob *me = Grob::unsmob (smob);
+  Grob *stem = Grob::unsmob (me->get_object ("stem"));
   Direction dir = get_grob_direction (me);
   bool beam = Stem::get_beam (stem);
   bool flag = Stem::duration_log (stem) >= 3 && !beam;
@@ -92,7 +92,7 @@ Stem_tremolo::calc_style (SCM smob)
 Real
 Stem_tremolo::get_beam_translation (Grob *me)
 {
-  Grob *stem = unsmob_grob (me->get_object ("stem"));
+  Grob *stem = Grob::unsmob (me->get_object ("stem"));
   Spanner *beam = Stem::get_beam (stem);
 
   return (beam && beam->is_live ())
@@ -149,13 +149,13 @@ MAKE_SCHEME_CALLBACK (Stem_tremolo, pure_height, 3);
 SCM
 Stem_tremolo::pure_height (SCM smob, SCM, SCM)
 {
-  Item *me = unsmob_item (smob);
+  Item *me = Item::unsmob (smob);
 
   /*
     Cannot use the real slope, since it looks at the Beam.
    */
   Stencil s1 (untranslated_stencil (me, 0.35));
-  Item *stem = unsmob_item (me->get_object ("stem"));
+  Item *stem = Item::unsmob (me->get_object ("stem"));
   if (!stem)
     return ly_interval2scm (s1.extent (Y_AXIS));
 
@@ -182,7 +182,7 @@ MAKE_SCHEME_CALLBACK (Stem_tremolo, width, 1);
 SCM
 Stem_tremolo::width (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   /*
     Cannot use the real slope, since it looks at the Beam.
@@ -201,7 +201,7 @@ Stem_tremolo::vertical_length (Grob *me)
 Stencil
 Stem_tremolo::untranslated_stencil (Grob *me, Real slope)
 {
-  Grob *stem = unsmob_grob (me->get_object ("stem"));
+  Grob *stem = Grob::unsmob (me->get_object ("stem"));
   if (!stem)
     {
       programming_error ("no stem for stem-tremolo");
@@ -222,7 +222,7 @@ MAKE_SCHEME_CALLBACK (Stem_tremolo, calc_y_offset, 1);
 SCM
 Stem_tremolo::calc_y_offset (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   return scm_from_double (y_offset (me, false));
 }
 
@@ -232,7 +232,7 @@ Stem_tremolo::pure_calc_y_offset (SCM smob,
                                   SCM, /* start */
                                   SCM /* end */)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   return scm_from_double (y_offset (me, true));
 }
 
@@ -240,9 +240,9 @@ MAKE_SCHEME_CALLBACK (Stem_tremolo, calc_direction, 1);
 SCM
 Stem_tremolo::calc_direction (SCM smob)
 {
-  Item *me = unsmob_item (smob);
+  Item *me = Item::unsmob (smob);
 
-  Item *stem = unsmob_item (me->get_object ("stem"));
+  Item *stem = Item::unsmob (me->get_object ("stem"));
   if (!stem)
     return scm_from_int (CENTER);
 
@@ -279,7 +279,7 @@ Stem_tremolo::calc_direction (SCM smob)
 Real
 Stem_tremolo::y_offset (Grob *me, bool pure)
 {
-  Item *stem = unsmob_item (me->get_object ("stem"));
+  Item *stem = Item::unsmob (me->get_object ("stem"));
   if (!stem)
     return 0.0;
 
@@ -331,7 +331,7 @@ MAKE_SCHEME_CALLBACK (Stem_tremolo, print, 1);
 SCM
 Stem_tremolo::print (SCM grob)
 {
-  Grob *me = unsmob_grob (grob);
+  Grob *me = Grob::unsmob (grob);
 
   Stencil s = untranslated_stencil (me, robust_scm2double (me->get_property ("slope"), 0.25));
   return s.smobbed_copy ();
index cc488e312570ede4a4cc6270ab46b110c0431dee..0a72fcf01953b1d276c57a64c9782e82a6844d6a 100644 (file)
@@ -123,7 +123,7 @@ Stem::set_stem_positions (Grob *me, Real se)
   // todo: margins
   Direction d = get_grob_direction (me);
 
-  Grob *beam = unsmob_grob (me->get_object ("beam"));
+  Grob *beam = Grob::unsmob (me->get_object ("beam"));
   if (d && d * head_positions (me)[get_grob_direction (me)] >= se * d)
     me->warning (_ ("weird stem size, check for narrow beams"));
 
@@ -298,7 +298,7 @@ Stem::pure_height (SCM smob,
                    SCM /* start */,
                    SCM /* end */)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   return ly_interval2scm (internal_pure_height (me, true));
 }
 
@@ -308,7 +308,7 @@ Stem::internal_pure_height (Grob *me, bool calc_beam)
   if (!is_normal_stem (me))
     return Interval (0.0, 0.0);
 
-  Grob *beam = unsmob_grob (me->get_object ("beam"));
+  Grob *beam = Grob::unsmob (me->get_object ("beam"));
 
   Interval iv = internal_height (me, false);
 
@@ -378,7 +378,7 @@ MAKE_SCHEME_CALLBACK (Stem, calc_stem_end_position, 1)
 SCM
 Stem::calc_stem_end_position (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   return scm_from_double (internal_calc_stem_end_position (me, true));
 }
 
@@ -388,7 +388,7 @@ Stem::pure_calc_stem_end_position (SCM smob,
                                    SCM, /* start */
                                    SCM /* end */)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   return scm_from_double (internal_calc_stem_end_position (me, false));
 }
 
@@ -455,8 +455,8 @@ Stem::internal_calc_stem_end_position (Grob *me, bool calc_beam)
   length *= robust_scm2double (me->get_property ("length-fraction"), 1.0);
 
   /* Tremolo stuff.  */
-  Grob *t_flag = unsmob_grob (me->get_object ("tremolo-flag"));
-  if (t_flag && (!unsmob_grob (me->get_object ("beam")) || !calc_beam))
+  Grob *t_flag = Grob::unsmob (me->get_object ("tremolo-flag"));
+  if (t_flag && (!Grob::unsmob (me->get_object ("beam")) || !calc_beam))
     {
       /* Crude hack: add extra space if tremolo flag is there.
 
@@ -506,7 +506,7 @@ MAKE_SCHEME_CALLBACK (Stem, calc_positioning_done, 1);
 SCM
 Stem::calc_positioning_done (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   if (!head_count (me))
     return SCM_BOOL_T;
 
@@ -613,9 +613,9 @@ MAKE_SCHEME_CALLBACK (Stem, calc_direction, 1);
 SCM
 Stem::calc_direction (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Direction dir = CENTER;
-  if (Grob *beam = unsmob_grob (me->get_object ("beam")))
+  if (Grob *beam = Grob::unsmob (me->get_object ("beam")))
     {
       SCM ignore_me = beam->get_property ("direction");
       (void) ignore_me;
@@ -636,7 +636,7 @@ MAKE_SCHEME_CALLBACK (Stem, calc_default_direction, 1);
 SCM
 Stem::calc_default_direction (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   Direction dir = CENTER;
   int staff_center = 0;
@@ -658,7 +658,7 @@ MAKE_SCHEME_CALLBACK (Stem, height, 1);
 SCM
 Stem::height (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   return ly_interval2scm (internal_height (me, true));
 }
 
@@ -673,7 +673,7 @@ Stem::get_reference_head (Grob *me)
 Real
 Stem::beam_end_corrective (Grob *me)
 {
-  Grob *beam = unsmob_grob (me->get_object ("beam"));
+  Grob *beam = Grob::unsmob (me->get_object ("beam"));
   Direction dir = get_grob_direction (me);
   if (beam)
     {
@@ -706,7 +706,7 @@ Stem::internal_height (Grob *me, bool calc_beam)
     If there is a beam but no stem, slope calculations depend on this
     routine to return where the stem end /would/ be.
   */
-  if (calc_beam && !beam && !unsmob_stencil (me->get_property ("stencil")))
+  if (calc_beam && !beam && !Stencil::unsmob (me->get_property ("stencil")))
     return Interval ();
 
   Real y1 = robust_scm2double ((calc_beam
@@ -731,7 +731,7 @@ MAKE_SCHEME_CALLBACK (Stem, width, 1);
 SCM
 Stem::width (SCM e)
 {
-  Grob *me = unsmob_grob (e);
+  Grob *me = Grob::unsmob (e);
 
   Interval r;
 
@@ -757,7 +757,7 @@ MAKE_SCHEME_CALLBACK (Stem, calc_stem_begin_position, 1);
 SCM
 Stem::calc_stem_begin_position (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   return scm_from_double (internal_calc_stem_begin_position (me, true));
 }
 
@@ -767,7 +767,7 @@ Stem::pure_calc_stem_begin_position (SCM smob,
                                      SCM, /* start */
                                      SCM /* end */)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   return scm_from_double (internal_calc_stem_begin_position (me, false));
 }
 
@@ -808,7 +808,7 @@ MAKE_SCHEME_CALLBACK (Stem, pure_calc_length, 3);
 SCM
 Stem::pure_calc_length (SCM smob, SCM /*start*/, SCM /*end*/)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Real beg = robust_scm2double (me->get_pure_property ("stem-begin-position", 0, INT_MAX), 0.0);
   Real res = fabs (internal_calc_stem_end_position (me, false) - beg);
   return scm_from_double (res);
@@ -818,8 +818,8 @@ MAKE_SCHEME_CALLBACK (Stem, calc_length, 1);
 SCM
 Stem::calc_length (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
-  if (unsmob_grob (me->get_object ("beam")))
+  Grob *me = Grob::unsmob (smob);
+  if (Grob::unsmob (me->get_object ("beam")))
     {
       me->programming_error ("ly:stem::calc-length called but will not be used for beamed stem.");
       return scm_from_double (0.0);
@@ -836,7 +836,7 @@ Stem::is_valid_stem (Grob *me)
   /* TODO: make the stem start a direction ?
      This is required to avoid stems passing in tablature chords.  */
   Grob *lh = get_reference_head (me);
-  Grob *beam = unsmob_grob (me->get_object ("beam"));
+  Grob *beam = Grob::unsmob (me->get_object ("beam"));
 
   if (!lh && !beam)
     return false;
@@ -851,7 +851,7 @@ MAKE_SCHEME_CALLBACK (Stem, print, 1);
 SCM
 Stem::print (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   if (!is_valid_stem (me))
     return SCM_EOL;
 
@@ -887,7 +887,7 @@ MAKE_SCHEME_CALLBACK (Stem, offset_callback, 1);
 SCM
 Stem::offset_callback (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   extract_grob_set (me, "rests", rests);
   if (rests.size ())
@@ -931,7 +931,7 @@ Spanner *
 Stem::get_beam (Grob *me)
 {
   SCM b = me->get_object ("beam");
-  return dynamic_cast<Spanner *> (unsmob_grob (b));
+  return dynamic_cast<Spanner *> (Grob::unsmob (b));
 }
 
 Stem_info
@@ -950,7 +950,7 @@ MAKE_SCHEME_CALLBACK (Stem, calc_stem_info, 1);
 SCM
 Stem::calc_stem_info (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Direction my_dir = get_grob_direction (me);
 
   if (!my_dir)
@@ -1000,7 +1000,7 @@ Stem::calc_stem_info (SCM smob)
        : 0.0);
 
   Real height_of_my_trem = 0.0;
-  Grob *trem = unsmob_grob (me->get_object ("tremolo-flag"));
+  Grob *trem = Grob::unsmob (me->get_object ("tremolo-flag"));
   if (trem)
     {
       height_of_my_trem
@@ -1099,7 +1099,7 @@ Stem::beam_multiplicity (Grob *stem)
 bool
 Stem::is_cross_staff (Grob *stem)
 {
-  Grob *beam = unsmob_grob (stem->get_object ("beam"));
+  Grob *beam = Grob::unsmob (stem->get_object ("beam"));
   return beam && Beam::is_cross_staff (beam);
 }
 
@@ -1107,13 +1107,13 @@ MAKE_SCHEME_CALLBACK (Stem, calc_cross_staff, 1)
 SCM
 Stem::calc_cross_staff (SCM smob)
 {
-  return scm_from_bool (is_cross_staff (unsmob_grob (smob)));
+  return scm_from_bool (is_cross_staff (Grob::unsmob (smob)));
 }
 
 Grob *
 Stem::flag (Grob *me)
 {
-  return unsmob_grob (me->get_object ("flag"));
+  return Grob::unsmob (me->get_object ("flag"));
 }
 
 /* FIXME:  Too many properties  */
index 4ae14e4609a361b95170859d997a20200187ed01..c455503c2fd3beb8646de5f2a8b7e3f355bd6173 100644 (file)
@@ -692,7 +692,7 @@ void
 make_named_glyph_boxes (vector<Box> &boxes, vector<Drul_array<Offset> > &buildings, PangoMatrix trans, SCM expr)
 {
   SCM fm_scm = scm_car (expr);
-  Font_metric *fm = unsmob_metrics (fm_scm);
+  Font_metric *fm = Font_metric::unsmob (fm_scm);
   expr = scm_cdr (expr);
   SCM glyph = scm_car (expr);
   string glyph_s = ly_scm2string (glyph);
@@ -731,7 +731,7 @@ void
 make_glyph_string_boxes (vector<Box> &boxes, vector<Drul_array<Offset> > &buildings, PangoMatrix trans, SCM expr)
 {
   SCM fm_scm = scm_car (expr);
-  Font_metric *fm = unsmob_metrics (fm_scm);
+  Font_metric *fm = Font_metric::unsmob (fm_scm);
   expr = scm_cdr (expr);
   expr = scm_cdr (expr); // font-name
   expr = scm_cdr (expr); // size
@@ -995,7 +995,7 @@ MAKE_SCHEME_CALLBACK (Grob, pure_simple_vertical_skylines_from_extents, 3);
 SCM
 Grob::pure_simple_vertical_skylines_from_extents (SCM smob, SCM begscm, SCM endscm)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   int beg = robust_scm2int (begscm, 0);
   int end = robust_scm2int (endscm, INT_MAX);
   // We cannot measure the widths before line breaking,
@@ -1007,7 +1007,7 @@ MAKE_SCHEME_CALLBACK (Grob, simple_vertical_skylines_from_extents, 1);
 SCM
 Grob::simple_vertical_skylines_from_extents (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   return maybe_pure_internal_simple_skylines_from_extents (me, X_AXIS, false, 0, 0, false, false);
 }
 
@@ -1015,7 +1015,7 @@ MAKE_SCHEME_CALLBACK (Grob, pure_simple_horizontal_skylines_from_extents, 3);
 SCM
 Grob::pure_simple_horizontal_skylines_from_extents (SCM smob, SCM begscm, SCM endscm)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   int beg = robust_scm2int (begscm, 0);
   int end = robust_scm2int (endscm, INT_MAX);
   // If the grob is cross staff, we cannot measure its Y-extent before
@@ -1028,7 +1028,7 @@ MAKE_SCHEME_CALLBACK (Grob, simple_horizontal_skylines_from_extents, 1);
 SCM
 Grob::simple_horizontal_skylines_from_extents (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   // See comment in function above.
   return maybe_pure_internal_simple_skylines_from_extents (me, Y_AXIS, false, 0, 0, false, to_boolean (me->get_property ("cross-staff")));
 }
@@ -1036,7 +1036,7 @@ Grob::simple_horizontal_skylines_from_extents (SCM smob)
 SCM
 Stencil::skylines_from_stencil (SCM sten, Real pad, Axis a)
 {
-  Stencil *s = unsmob_stencil (sten);
+  Stencil *s = Stencil::unsmob (sten);
   if (!s)
     return Skyline_pair ().smobbed_copy ();
 
@@ -1066,7 +1066,7 @@ MAKE_SCHEME_CALLBACK (Grob, vertical_skylines_from_stencil, 1);
 SCM
 Grob::vertical_skylines_from_stencil (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   Real pad = robust_scm2double (me->get_property ("skyline-horizontal-padding"), 0.0);
   SCM out = Stencil::skylines_from_stencil (me->get_property ("stencil"), pad, X_AXIS);
@@ -1078,7 +1078,7 @@ MAKE_SCHEME_CALLBACK (Grob, horizontal_skylines_from_stencil, 1);
 SCM
 Grob::horizontal_skylines_from_stencil (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   Real pad = robust_scm2double (me->get_property ("skyline-vertical-padding"), 0.0);
   SCM out = Stencil::skylines_from_stencil (me->get_property ("stencil"), pad, Y_AXIS);
@@ -1140,7 +1140,7 @@ MAKE_SCHEME_CALLBACK (Grob, vertical_skylines_from_element_stencils, 1);
 SCM
 Grob::vertical_skylines_from_element_stencils (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   return internal_skylines_from_element_stencils (me, X_AXIS, false, 0, INT_MAX);
 }
 
@@ -1148,7 +1148,7 @@ MAKE_SCHEME_CALLBACK (Grob, horizontal_skylines_from_element_stencils, 1);
 SCM
 Grob::horizontal_skylines_from_element_stencils (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   return internal_skylines_from_element_stencils (me, Y_AXIS, false, 0, INT_MAX);
 }
 
@@ -1156,7 +1156,7 @@ MAKE_SCHEME_CALLBACK (Grob, pure_vertical_skylines_from_element_stencils, 3);
 SCM
 Grob::pure_vertical_skylines_from_element_stencils (SCM smob, SCM beg_scm, SCM end_scm)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   int beg = robust_scm2int (beg_scm, 0);
   int end = robust_scm2int (end_scm, 0);
   return internal_skylines_from_element_stencils (me, X_AXIS, true, beg, end);
@@ -1166,7 +1166,7 @@ MAKE_SCHEME_CALLBACK (Grob, pure_horizontal_skylines_from_element_stencils, 3);
 SCM
 Grob::pure_horizontal_skylines_from_element_stencils (SCM smob, SCM beg_scm, SCM end_scm)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   int beg = robust_scm2int (beg_scm, 0);
   int end = robust_scm2int (end_scm, 0);
   return internal_skylines_from_element_stencils (me, Y_AXIS, true, beg, end);
index 5764b8fd60d5443f3488fef7f8e2a04c0679f452..09ae2dade9fbed71cd585a9b78b63adacda4d990 100644 (file)
@@ -31,7 +31,7 @@ LY_DEFINE (ly_stencil_translate_axis, "ly:stencil-translate-axis",
            "Return a copy of @var{stil} but translated by @var{amount}"
            " in @var{axis} direction.")
 {
-  Stencil *s = unsmob_stencil (stil);
+  Stencil *s = Stencil::unsmob (stil);
   LY_ASSERT_SMOB (Stencil, stil, 1);
   LY_ASSERT_TYPE (scm_is_number, amount, 2);
 
@@ -42,7 +42,7 @@ LY_DEFINE (ly_stencil_translate_axis, "ly:stencil-translate-axis",
   SCM new_s = s->smobbed_copy ();
   scm_remember_upto_here_1 (stil);
 
-  Stencil *q = unsmob_stencil (new_s);
+  Stencil *q = Stencil::unsmob (new_s);
   q->translate_axis (real_amount, Axis (scm_to_int (axis)));
   return new_s;
 }
@@ -52,7 +52,7 @@ LY_DEFINE (ly_stencil_translate, "ly:stencil-translate",
            "Return a @var{stil}, but translated by @var{offset}"
            " (a pair of numbers).")
 {
-  Stencil *s = unsmob_stencil (stil);
+  Stencil *s = Stencil::unsmob (stil);
   LY_ASSERT_SMOB (Stencil, stil, 1);
   LY_ASSERT_TYPE (is_number_pair, offset, 2);
   Offset o = ly_scm2offset (offset);
@@ -60,7 +60,7 @@ LY_DEFINE (ly_stencil_translate, "ly:stencil-translate",
   SCM new_s = s->smobbed_copy ();
   scm_remember_upto_here_1 (stil);
 
-  Stencil *q = unsmob_stencil (new_s);
+  Stencil *q = Stencil::unsmob (new_s);
   q->translate (o);
   return new_s;
 }
@@ -69,7 +69,7 @@ LY_DEFINE (ly_stencil_expr, "ly:stencil-expr",
            1, 0, 0, (SCM stil),
            "Return the expression of @var{stil}.")
 {
-  Stencil *s = unsmob_stencil (stil);
+  Stencil *s = Stencil::unsmob (stil);
   LY_ASSERT_SMOB (Stencil, stil, 1);
   return s->expr ();
 }
@@ -80,7 +80,7 @@ LY_DEFINE (ly_stencil_extent, "ly:stencil-extent",
            " @var{axis} direction (@code{0} or @code{1} for x and"
            " y@tie{}axis, respectively).")
 {
-  Stencil *s = unsmob_stencil (stil);
+  Stencil *s = Stencil::unsmob (stil);
   LY_ASSERT_SMOB (Stencil, stil, 1);
   LY_ASSERT_TYPE (is_axis, axis, 2);
 
@@ -93,7 +93,7 @@ LY_DEFINE (ly_stencil_empty_p, "ly:stencil-empty?",
            " @var{axis} is supplied, the emptiness check is"
            " restricted to that axis.")
 {
-  Stencil *s = unsmob_stencil (stil);
+  Stencil *s = Stencil::unsmob (stil);
   LY_ASSERT_SMOB (Stencil, stil, 1);
   if (SCM_UNBNDP (axis))
     return scm_from_bool (s->is_empty ());
@@ -112,8 +112,8 @@ LY_DEFINE (ly_stencil_combine_at_edge, "ly:stencil-combine-at-edge",
            " space.  @var{first} and @var{second} may also be @code{'()} or"
            " @code{#f}.")
 {
-  Stencil *s1 = unsmob_stencil (first);
-  Stencil *s2 = unsmob_stencil (second);
+  Stencil *s1 = Stencil::unsmob (first);
+  Stencil *s2 = Stencil::unsmob (second);
   Stencil result;
 
   SCM_ASSERT_TYPE (s1 || first == SCM_BOOL_F || first == SCM_EOL,
@@ -159,8 +159,8 @@ LY_DEFINE (ly_stencil_stack, "ly:stencil-stack",
            " apart at least by this distance.  If either of the stencils"
            " is spacing, @var{padding} and @var{mindist} do not apply.")
 {
-  Stencil *s1 = unsmob_stencil (first);
-  Stencil *s2 = unsmob_stencil (second);
+  Stencil *s1 = Stencil::unsmob (first);
+  Stencil *s2 = Stencil::unsmob (second);
   Stencil result;
 
   SCM_ASSERT_TYPE (s1 || first == SCM_BOOL_F || first == SCM_EOL,
@@ -210,7 +210,7 @@ LY_DEFINE (ly_stencil_add, "ly:stencil-add",
 
   while (!SCM_NULLP (args))
     {
-      Stencil *s = unsmob_stencil (scm_car (args));
+      Stencil *s = Stencil::unsmob (scm_car (args));
       if (!s)
         SCM_ASSERT_TYPE (s, scm_car (args), SCM_ARGn, __FUNCTION__, "Stencil");
 
@@ -280,7 +280,7 @@ LY_DEFINE (ly_stencil_aligned_to, "ly:stencil-aligned-to",
   LY_ASSERT_TYPE (is_axis, axis, 2);
   LY_ASSERT_TYPE (scm_is_number, dir, 3);
 
-  Stencil target = *unsmob_stencil (stil);
+  Stencil target = *Stencil::unsmob (stil);
 
   target.align_to ((Axis)scm_to_int (axis),
                    scm_to_double (dir));
@@ -293,7 +293,7 @@ LY_DEFINE (ly_stencil_fonts, "ly:stencil-fonts",
            " in@tie{}@var{s}.")
 {
   LY_ASSERT_SMOB (Stencil, s, 1);
-  Stencil *stil = unsmob_stencil (s);
+  Stencil *stil = Stencil::unsmob (s);
   return find_expression_fonts (stil->expr ());
 }
 
@@ -302,7 +302,7 @@ LY_DEFINE (ly_stencil_in_color, "ly:stencil-in-color",
            "Put @var{stc} in a different color.")
 {
   LY_ASSERT_SMOB (Stencil, stc, 1);
-  Stencil *stil = unsmob_stencil (stc);
+  Stencil *stil = Stencil::unsmob (stc);
   return Stencil (stil->extent_box (),
                   scm_list_3 (ly_symbol2scm ("color"),
                               scm_list_3 (r, g, b),
@@ -363,7 +363,7 @@ LY_DEFINE (ly_stencil_rotate, "ly:stencil-rotate",
            " the relative offset (@var{x}, @var{y}).  E.g., an offset of"
            " (-1, 1) will rotate the stencil around the left upper corner.")
 {
-  Stencil *s = unsmob_stencil (stil);
+  Stencil *s = Stencil::unsmob (stil);
   LY_ASSERT_SMOB (Stencil, stil, 1);
   LY_ASSERT_TYPE (scm_is_number, angle, 2);
   LY_ASSERT_TYPE (scm_is_number, x, 3);
@@ -373,7 +373,7 @@ LY_DEFINE (ly_stencil_rotate, "ly:stencil-rotate",
   Real y_off = scm_to_double (y);
 
   SCM new_s = s->smobbed_copy ();
-  Stencil *q = unsmob_stencil (new_s);
+  Stencil *q = Stencil::unsmob (new_s);
   q->rotate_degrees (a, Offset (x_off, y_off));
   return new_s;
 }
@@ -383,7 +383,7 @@ LY_DEFINE (ly_stencil_rotate_absolute, "ly:stencil-rotate-absolute",
            "Return a stencil @var{stil} rotated @var{angle} degrees around"
            " point (@var{x}, @var{y}), given in absolute coordinates.")
 {
-  Stencil *s = unsmob_stencil (stil);
+  Stencil *s = Stencil::unsmob (stil);
   LY_ASSERT_SMOB (Stencil, stil, 1);
   LY_ASSERT_TYPE (scm_is_number, angle, 2);
   LY_ASSERT_TYPE (scm_is_number, x, 3);
@@ -393,7 +393,7 @@ LY_DEFINE (ly_stencil_rotate_absolute, "ly:stencil-rotate-absolute",
   Real y_off = scm_to_double (y);
 
   SCM new_s = s->smobbed_copy ();
-  Stencil *q = unsmob_stencil (new_s);
+  Stencil *q = Stencil::unsmob (new_s);
   q->rotate_degrees_absolute (a, Offset (x_off, y_off));
   return new_s;
 }
@@ -460,13 +460,13 @@ LY_DEFINE (ly_stencil_scale, "ly:stencil-scale",
            "Scale @var{stil} using the horizontal and vertical scaling"
            " factors @var{x} and @var{y}.")
 {
-  Stencil *s = unsmob_stencil (stil);
+  Stencil *s = Stencil::unsmob (stil);
   LY_ASSERT_SMOB (Stencil, stil, 1);
   LY_ASSERT_TYPE (scm_is_number, x, 2);
   LY_ASSERT_TYPE (scm_is_number, y, 3);
 
   SCM new_s = s->smobbed_copy ();
-  Stencil *q = unsmob_stencil (new_s);
+  Stencil *q = Stencil::unsmob (new_s);
 
   q->scale (scm_to_double (x), scm_to_double (y));
   return new_s;
index 2a3dfa3cd10ee70bcc340a8c673ee463c033cd5a..7ac17dac408ee2051fcab589cad8ac492b2edd9b 100644 (file)
@@ -23,7 +23,7 @@ LY_DEFINE (ly_stream_event_p, "ly:stream-event?",
            1, 0, 0, (SCM obj),
            "Is @code{@var{obj}} a @code{Stream_event} object?")
 {
-  return scm_from_bool (unsmob_stream_event (obj));
+  return scm_from_bool (Stream_event::unsmob (obj));
 }
 
 LY_DEFINE (ly_make_stream_event, "ly:make-stream-event",
@@ -49,7 +49,7 @@ LY_DEFINE (ly_event_property, "ly:event-property",
            "  If @var{sym} is undefined, return @var{val} or"
            " @code{'()} if @var{val} is not specified.")
 {
-  LY_ASSERT_TYPE (unsmob_stream_event, sev, 1)
+  LY_ASSERT_TYPE (Stream_event::unsmob, sev, 1)
   return ly_prob_property (sev, sym, val);
 }
 
@@ -57,7 +57,7 @@ LY_DEFINE (ly_event_set_property_x, "ly:event-set-property!",
            3, 0, 0, (SCM ev, SCM sym, SCM val),
            "Set property @var{sym} in event @var{ev} to @var{val}.")
 {
-  LY_ASSERT_TYPE (unsmob_stream_event, ev, 1);
+  LY_ASSERT_TYPE (Stream_event::unsmob, ev, 1);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
 
   return ly_prob_set_property_x (ev, sym, val);
@@ -68,7 +68,7 @@ LY_DEFINE (ly_event_deep_copy, "ly:event-deep-copy",
            "Copy @var{m} and all sub expressions of@tie{}@var{m}.")
 {
   SCM copy = m;
-  if (Stream_event *ev = unsmob_stream_event (m))
+  if (Stream_event *ev = Stream_event::unsmob (m))
     {
       ev = ev->clone ();
       copy = ev->unprotect ();
index 24a022b4c969ec2427953e503e9172568189c2b7..f8c9f8fc8b619235eb78baa87cf314a5381ac163 100644 (file)
@@ -55,7 +55,7 @@ Stream_event::copy_mutable_properties () const
 Input *
 Stream_event::origin () const
 {
-  Input *i = unsmob_input (get_property ("origin"));
+  Input *i = Input::unsmob (get_property ("origin"));
   return i ? i : &dummy_input_global;
 }
 
@@ -87,8 +87,8 @@ Stream_event::make_transposable ()
       SCM prop = scm_car (entry);
       SCM val = scm_cdr (entry);
 
-      if ((unsmob_pitch (val)
-           || (prop == ly_symbol2scm ("element") && unsmob_music (val))
+      if ((Pitch::unsmob (val)
+           || (prop == ly_symbol2scm ("element") && Music::unsmob (val))
            || (prop == ly_symbol2scm ("elements") && scm_is_pair (val))
            || (prop == ly_symbol2scm ("pitch-alist") && scm_is_pair (val)))
           && scm_is_false (scm_assq (prop, mutable_property_alist_)))
@@ -100,7 +100,7 @@ Stream_event::make_transposable ()
 SCM
 Stream_event::dump (SCM self)
 {
-  Stream_event *ev = unsmob_stream_event (self);
+  Stream_event *ev = Stream_event::unsmob (self);
   // Reversed alists look prettier.
   return scm_cons (scm_reverse (ev->immutable_property_alist_),
                    scm_reverse (ev->mutable_property_alist_));
@@ -116,7 +116,7 @@ Stream_event::undump (SCM data)
 }
 
 Stream_event *
-unsmob_stream_event (SCM m)
+Stream_event::unsmob (SCM m)
 {
-  return dynamic_cast<Stream_event *> (unsmob_prob (m));
+  return dynamic_cast<Stream_event *> (Prob::unsmob (m));
 }
index efefae39b4890c91351d7ab677bc985c72a55163..5cd6dfeba16eb73a81ddac63471d86376ff9afb8 100644 (file)
@@ -48,7 +48,7 @@ MAKE_SCHEME_CALLBACK (Sustain_pedal, print, 1);
 SCM
 Sustain_pedal::print (SCM smob)
 {
-  Grob *e = unsmob_grob (smob);
+  Grob *e = Grob::unsmob (smob);
 
   Stencil mol;
   SCM glyph = e->get_property ("text");
index 30d62dbe9dc43286d01a7d7de60e70b91c9f3db5..96349d9ba65b958e68a58ac27e2e44d4172810b6 100644 (file)
@@ -191,7 +191,7 @@ System_start_delimiter_engraver::process_music ()
       nesting_->from_list (hierarchy);
       nesting_->create_grobs (this, delimiter_name);
       nesting_->set_bound (LEFT,
-                           unsmob_grob (get_property ("currentCommandColumn")));
+                           Grob::unsmob (get_property ("currentCommandColumn")));
     }
 }
 
@@ -201,7 +201,7 @@ System_start_delimiter_engraver::finalize ()
   if (nesting_)
     {
       nesting_->set_bound (RIGHT,
-                           unsmob_grob (get_property ("currentCommandColumn")));
+                           Grob::unsmob (get_property ("currentCommandColumn")));
       nesting_->set_nesting_support (0);
 
       delete nesting_;
index f96becff75e0f4a6dcbb4f385947e21fc21af59d..8987c4460186c5f558808a82008eb2bbe6245182 100644 (file)
@@ -93,7 +93,7 @@ MAKE_SCHEME_CALLBACK (System_start_delimiter, print, 1);
 SCM
 System_start_delimiter::print (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
   extract_grob_set (me, "elements", elts);
   Grob *common = common_refpoint_of_array (elts, me, Y_AXIS);
 
index 91015be3ca31dbaa660d2be6a432215bce09d243..959b85c46a8ffa8ddf9d5915829c4d2c0665ce2f 100644 (file)
@@ -62,7 +62,7 @@ void
 System::init_elements ()
 {
   SCM scm_arr = Grob_array::make_array ();
-  all_elements_ = unsmob_grob_array (scm_arr);
+  all_elements_ = Grob_array::unsmob (scm_arr);
   all_elements_->set_ordered (false);
   set_object ("all-elements", scm_arr);
 }
@@ -333,7 +333,7 @@ System::internal_get_note_heights_in_range (vsize start, vsize end, bool foot)
       SCM footnote_stl = Text_interface::interpret_markup (pscore_->layout ()->self_scm (),
                                                            props, footnote_markup);
 
-      Stencil *footnote_stencil = unsmob_stencil (footnote_stl);
+      Stencil *footnote_stencil = Stencil::unsmob (footnote_stl);
       out.push_back (footnote_stencil->extent (Y_AXIS).length ());
     }
 
@@ -378,7 +378,7 @@ MAKE_SCHEME_CALLBACK (System, footnotes_before_line_breaking, 1);
 SCM
 System::footnotes_before_line_breaking (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   vector<Grob *> footnotes;
   SCM grobs_scm = Grob_array::make_array ();
   extract_grob_set (me, "all-elements", elts);
@@ -386,7 +386,7 @@ System::footnotes_before_line_breaking (SCM smob)
     if (elts[i]->internal_has_interface (ly_symbol2scm ("footnote-interface")))
       footnotes.push_back (elts[i]);
 
-  unsmob_grob_array (grobs_scm)->set_array (footnotes);
+  Grob_array::unsmob (grobs_scm)->set_array (footnotes);
   return grobs_scm;
 }
 
@@ -394,14 +394,14 @@ MAKE_SCHEME_CALLBACK (System, footnotes_after_line_breaking, 1);
 SCM
 System::footnotes_after_line_breaking (SCM smob)
 {
-  Spanner *sys_span = unsmob_spanner (smob);
+  Spanner *sys_span = Spanner::unsmob (smob);
   System *sys = dynamic_cast<System *> (sys_span);
   Interval_t<int> sri = sys->spanned_rank_interval ();
   vector<Grob *> footnote_grobs = sys->get_footnote_grobs_in_range (sri[LEFT], sri[RIGHT]);
   vector_sort (footnote_grobs, grob_2D_less);
 
   SCM grobs_scm = Grob_array::make_array ();
-  unsmob_grob_array (grobs_scm)->set_array (footnote_grobs);
+  Grob_array::unsmob (grobs_scm)->set_array (footnote_grobs);
   return grobs_scm;
 }
 
@@ -409,7 +409,7 @@ MAKE_SCHEME_CALLBACK (System, vertical_skyline_elements, 1);
 SCM
 System::vertical_skyline_elements (SCM smob)
 {
-  Grob *me_grob = unsmob_grob (smob);
+  Grob *me_grob = Grob::unsmob (smob);
   vector<Grob *> vertical_skyline_grobs;
   extract_grob_set (me_grob, "elements", my_elts);
   for (vsize i = 0; i < my_elts.size (); i++)
@@ -417,11 +417,11 @@ System::vertical_skyline_elements (SCM smob)
       vertical_skyline_grobs.push_back (my_elts[i]);
 
   System *me = dynamic_cast<System *> (me_grob);
-  Grob *align = unsmob_grob (me->get_object ("vertical-alignment"));
+  Grob *align = Grob::unsmob (me->get_object ("vertical-alignment"));
   if (!align)
     {
       SCM grobs_scm = Grob_array::make_array ();
-      unsmob_grob_array (grobs_scm)->set_array (vertical_skyline_grobs);
+      Grob_array::unsmob (grobs_scm)->set_array (vertical_skyline_grobs);
       return grobs_scm;
     }
 
@@ -432,7 +432,7 @@ System::vertical_skyline_elements (SCM smob)
       vertical_skyline_grobs.push_back (elts[i]);
 
   SCM grobs_scm = Grob_array::make_array ();
-  unsmob_grob_array (grobs_scm)->set_array (vertical_skyline_grobs);
+  Grob_array::unsmob (grobs_scm)->set_array (vertical_skyline_grobs);
   return grobs_scm;
 }
 
@@ -489,12 +489,12 @@ void
 System::add_column (Paper_column *p)
 {
   Grob *me = this;
-  Grob_array *ga = unsmob_grob_array (me->get_object ("columns"));
+  Grob_array *ga = Grob_array::unsmob (me->get_object ("columns"));
   if (!ga)
     {
       SCM scm_ga = Grob_array::make_array ();
       me->set_object ("columns", scm_ga);
-      ga = unsmob_grob_array (scm_ga);
+      ga = Grob_array::unsmob (scm_ga);
     }
 
   p->set_rank (ga->size ());
@@ -653,7 +653,7 @@ System::get_paper_system ()
     pl->set_property ("last-in-score", SCM_BOOL_T);
 
   Interval staff_refpoints;
-  if (Grob *align = unsmob_grob (get_object ("vertical-alignment")))
+  if (Grob *align = Grob::unsmob (get_object ("vertical-alignment")))
     {
       extract_grob_set (align, "elements", staves);
       for (vsize i = 0; i < staves.size (); i++)
@@ -758,7 +758,7 @@ MAKE_SCHEME_CALLBACK (System, get_vertical_alignment, 1);
 SCM
 System::get_vertical_alignment (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   extract_grob_set (me, "elements", elts);
   Grob *ret = 0;
   for (vsize i = 0; i < elts.size (); i++)
@@ -782,7 +782,7 @@ System::get_vertical_alignment (SCM smob)
 Grob *
 System::get_extremal_staff (Direction dir, Interval const &iv)
 {
-  Grob *align = unsmob_grob (get_object ("vertical-alignment"));
+  Grob *align = Grob::unsmob (get_object ("vertical-alignment"));
   if (!align)
     return 0;
 
@@ -806,7 +806,7 @@ System::get_extremal_staff (Direction dir, Interval const &iv)
 Grob *
 System::get_neighboring_staff (Direction dir, Grob *vertical_axis_group, Interval_t<int> bounds)
 {
-  Grob *align = unsmob_grob (get_object ("vertical-alignment"));
+  Grob *align = Grob::unsmob (get_object ("vertical-alignment"));
   if (!align)
     return 0;
 
@@ -836,7 +836,7 @@ Interval
 System::pure_refpoint_extent (vsize start, vsize end)
 {
   Interval ret;
-  Grob *alignment = unsmob_grob (get_object ("vertical-alignment"));
+  Grob *alignment = Grob::unsmob (get_object ("vertical-alignment"));
   if (!alignment)
     return Interval ();
 
@@ -863,7 +863,7 @@ System::pure_refpoint_extent (vsize start, vsize end)
 Interval
 System::part_of_line_pure_height (vsize start, vsize end, bool begin)
 {
-  Grob *alignment = unsmob_grob (get_object ("vertical-alignment"));
+  Grob *alignment = Grob::unsmob (get_object ("vertical-alignment"));
   if (!alignment)
     return Interval ();
 
@@ -909,7 +909,7 @@ MAKE_SCHEME_CALLBACK (System, calc_pure_relevant_grobs, 1);
 SCM
 System::calc_pure_relevant_grobs (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   extract_grob_set (me, "elements", elts);
   vector<Grob *> relevant_grobs;
@@ -934,7 +934,7 @@ System::calc_pure_relevant_grobs (SCM smob)
 
   SCM grobs_scm = Grob_array::make_array ();
 
-  unsmob_grob_array (grobs_scm)->set_array (relevant_grobs);
+  Grob_array::unsmob (grobs_scm)->set_array (relevant_grobs);
   return grobs_scm;
 }
 
@@ -949,7 +949,7 @@ MAKE_SCHEME_CALLBACK (System, calc_pure_height, 3);
 SCM
 System::calc_pure_height (SCM smob, SCM start_scm, SCM end_scm)
 {
-  System *me = dynamic_cast<System *> (unsmob_grob (smob));
+  System *me = dynamic_cast<System *> (Grob::unsmob (smob));
   int start = scm_to_int (start_scm);
   int end = scm_to_int (end_scm);
 
@@ -993,8 +993,8 @@ enum
 static SCM
 get_maybe_spaceable_staves (SCM smob, int filter)
 {
-  System *me = dynamic_cast<System *> (unsmob_grob (smob));
-  Grob *align = unsmob_grob (me->get_object ("vertical_alignment"));
+  System *me = dynamic_cast<System *> (Grob::unsmob (smob));
+  Grob *align = Grob::unsmob (me->get_object ("vertical_alignment"));
   SCM ret = SCM_EOL;
 
   if (align)
index 9f80749e03490729721caf3b4de3a6263873cc63..bbe5fca91e59950c7976b5dbf66b5a1c0252a7ea 100644 (file)
@@ -85,7 +85,7 @@ Tab_tie_follow_engraver::stop_translation_timestep ()
           if (left_item)
             {
               SCM left_cause = left_item->get_property ("cause");
-              Item *slur_cause = unsmob_item (left_cause);
+              Item *slur_cause = Item::unsmob (left_cause);
               if (slur_cause == note_heads_[k])
                 {
                   note_heads_[k]->set_property ("span-start", SCM_BOOL_T);
index d705abb3a8ca3d5582c8d7cd9c94a2ee725779d7..410b0b6a4129c91bcf68569a6bec2004946ffba5 100644 (file)
@@ -61,10 +61,10 @@ void
 Tempo_performer::process_music ()
 {
   SCM w = get_property ("tempoWholesPerMinute");
-  if (unsmob_moment (w)
+  if (Moment::unsmob (w)
       && !ly_is_equal (w, last_tempo_))
     {
-      Rational r = unsmob_moment (w)->main_part_;
+      Rational r = Moment::unsmob (w)->main_part_;
       r *= Rational (4, 1);
 
       audio_ = new Audio_tempo (r.to_int ());
index 373cbf7ac7ad9119b25029019fa685ff4551b9c3..52a7e3a4a338e07d2a4d1d41adc65483e4e808d5 100644 (file)
@@ -88,7 +88,7 @@ Text_engraver::acknowledge_note_column (Grob_info info)
   extract_grob_set (info.grob (), "note-heads", heads);
   Grob *x_parent = (heads.size ()
                     ? info.grob ()
-                    : unsmob_grob (info.grob ()->get_object ("rest")));
+                    : Grob::unsmob (info.grob ()->get_object ("rest")));
 
   for (vsize i = 0; i < scripts_.size (); i++)
     {
index a1f8fa083a5102fe8a416e9bbb54aac5eec43706..0dc4f36360c5a83f1114c26e4a4b3cf6250372fa 100644 (file)
@@ -76,7 +76,7 @@ Text_interface::interpret_string (SCM layout_smob,
   LY_ASSERT_TYPE (scm_is_string, markup, 3);
 
   string str = ly_scm2string (markup);
-  Output_def *layout = unsmob_output_def (layout_smob);
+  Output_def *layout = Output_def::unsmob (layout_smob);
   Font_metric *fm = select_encoded_font (layout, props);
 
   replace_special_characters (str, props);
@@ -164,7 +164,7 @@ MAKE_SCHEME_CALLBACK (Text_interface, print, 1);
 SCM
 Text_interface::print (SCM grob)
 {
-  Grob *me = unsmob_grob (grob);
+  Grob *me = Grob::unsmob (grob);
 
   SCM t = me->get_property ("text");
   SCM chain = Font_interface::text_font_alist_chain (me);
index 52ad7201b1199d123b9ea274785c835a4bc61c20..6a4b32b27d9a33600031f6b9b820b7315f333686 100644 (file)
@@ -101,7 +101,7 @@ Text_spanner_engraver::typeset_all ()
     {
       if (!finished_->get_bound (RIGHT))
         {
-          Grob *e = unsmob_grob (get_property ("currentMusicalColumn"));
+          Grob *e = Grob::unsmob (get_property ("currentMusicalColumn"));
           finished_->set_bound (RIGHT, e);
         }
       finished_ = 0;
@@ -113,7 +113,7 @@ Text_spanner_engraver::stop_translation_timestep ()
 {
   if (span_ && !span_->get_bound (LEFT))
     {
-      Grob *e = unsmob_grob (get_property ("currentMusicalColumn"));
+      Grob *e = Grob::unsmob (get_property ("currentMusicalColumn"));
       span_->set_bound (LEFT, e);
     }
 
index 44bf5408b7c874f62daa155ddbdece275b1baae7..6c25883812920c82fc6ca827a5c344f04c98c736 100644 (file)
@@ -62,10 +62,10 @@ MAKE_SCHEME_CALLBACK (Tie_column, before_line_breaking, 1);
 SCM
 Tie_column::before_line_breaking (SCM smob)
 {
-  Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (smob));
+  Spanner *me = dynamic_cast<Spanner *> (Grob::unsmob (smob));
   for (SCM s = me->get_property ("ties"); scm_is_pair (s); s = scm_cdr (s))
     {
-      Spanner *tie = dynamic_cast<Spanner *> (unsmob_grob (scm_car (s)));
+      Spanner *tie = dynamic_cast<Spanner *> (Grob::unsmob (scm_car (s)));
       for (LEFT_and_RIGHT (dir))
         {
           if (dir * tie->get_bound (dir)->get_column ()->get_rank ()
@@ -81,7 +81,7 @@ MAKE_SCHEME_CALLBACK (Tie_column, calc_positioning_done, 1)
 SCM
 Tie_column::calc_positioning_done (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   extract_grob_set (me, "ties", ro_ties);
   vector<Grob *> ties (ro_ties);
   if (!ties.size ())
index a099d9c7ab7b5573fa1e4b25d7f90a8b34ddb3a2..fa1617612a39b44531f946e045efdb7b7f0b24df 100644 (file)
@@ -154,8 +154,8 @@ Tie_engraver::acknowledge_note_head (Grob_info i)
   for (vsize i = heads_to_tie_.size (); i--;)
     {
       Grob *th = heads_to_tie_[i].head_;
-      Stream_event *right_ev = unsmob_stream_event (h->get_property ("cause"));
-      Stream_event *left_ev = unsmob_stream_event (th->get_property ("cause"));
+      Stream_event *right_ev = Stream_event::unsmob (h->get_property ("cause"));
+      Stream_event *left_ev = Stream_event::unsmob (th->get_property ("cause"));
 
       /*
         maybe should check positions too.
@@ -261,7 +261,7 @@ Tie_engraver::process_acknowledged ()
     {
       Grob *head = now_heads_[i];
       Stream_event *left_ev
-        = unsmob_stream_event (head->get_property ("cause"));
+        = Stream_event::unsmob (head->get_property ("cause"));
 
       if (!left_ev)
         {
@@ -281,7 +281,7 @@ Tie_engraver::process_acknowledged ()
            !tie_event && !tie_stream_event && scm_is_pair (s);
            s = scm_cdr (s))
         {
-          Stream_event *ev = unsmob_stream_event (scm_car (s));
+          Stream_event *ev = Stream_event::unsmob (scm_car (s));
           if (!ev)
             continue;
 
index b15536a863a1bd296054fc5fae75ca7ef75ff635..d4755f1b9a019344f1019819e9264b036cb8f9d9 100644 (file)
@@ -102,7 +102,7 @@ Tie_formatting_problem::set_column_chord_outline (vector<Item *> bounds,
         continue;
 
       if (!stem)
-        stem = unsmob_grob (head->get_object ("stem"));
+        stem = Grob::unsmob (head->get_object ("stem"));
 
       Real p = Staff_symbol_referencer::get_position (head);
       Interval y ((p - 1) * 0.5 * staff_space,
@@ -211,7 +211,7 @@ Tie_formatting_problem::set_column_chord_outline (vector<Item *> bounds,
               boxes.push_back (Box (x, y));
             }
 
-          Grob *acc = unsmob_grob (heads[i]->get_object ("accidental-grob"));
+          Grob *acc = Grob::unsmob (heads[i]->get_object ("accidental-grob"));
           if (acc)
             acc->get_property ("stencil"); /* trigger tie-related suicide */
 
@@ -380,7 +380,7 @@ Tie_formatting_problem::from_semi_ties (vector<Grob *> const &semi_ties, Directi
   for (vsize i = 0; i < semi_ties.size (); i++)
     {
       Tie_specification spec;
-      Item *head = unsmob_item (semi_ties[i]->get_object ("note-head"));
+      Item *head = Item::unsmob (semi_ties[i]->get_object ("note-head"));
 
       if (!head)
         programming_error ("LV tie without head?!");
@@ -655,7 +655,7 @@ Tie_formatting_problem::score_aptitude (Tie_configuration *conf,
           if (!spec.note_head_drul_[d])
             continue;
 
-          Grob *stem = unsmob_grob (spec.note_head_drul_[d]->get_object ("stem"));
+          Grob *stem = Grob::unsmob (spec.note_head_drul_[d]->get_object ("stem"));
           if (stem
               && Stem::is_normal_stem (stem))
             stems[d] = stem;
index 4e3460f79bb76a5a75c09472abe78c79b67557e5..b2a138e1a68b283a3465da295aecd4abdce48aa0 100644 (file)
@@ -60,7 +60,7 @@ Tie::head (Grob *me, Direction d)
       Direction hd = to_dir (me->get_property ("head-direction"));
 
       return (hd == d)
-             ? unsmob_grob (me->get_object ("note-head"))
+             ? Grob::unsmob (me->get_object ("note-head"))
              : 0;
     }
 
@@ -157,12 +157,12 @@ MAKE_SCHEME_CALLBACK (Tie, calc_direction, 1);
 SCM
 Tie::calc_direction (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Grob *yparent = me->get_parent (Y_AXIS);
   if ((Tie_column::has_interface (yparent)
        || Semi_tie_column::has_interface (yparent))
-      && unsmob_grob_array (yparent->get_object ("ties"))
-      //      && unsmob_grob_array (yparent->get_object ("ties"))->size () > 1
+      && Grob_array::unsmob (yparent->get_object ("ties"))
+      //      && Grob_array::unsmob (yparent->get_object ("ties"))->size () > 1
      )
     {
       /* trigger positioning. */
@@ -218,12 +218,12 @@ MAKE_SCHEME_CALLBACK (Tie, calc_control_points, 1);
 SCM
 Tie::calc_control_points (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   Grob *yparent = me->get_parent (Y_AXIS);
   if ((Tie_column::has_interface (yparent)
        || Semi_tie_column::has_interface (yparent))
-      && unsmob_grob_array (yparent->get_object ("ties")))
+      && Grob_array::unsmob (yparent->get_object ("ties")))
     {
       extract_grob_set (yparent, "ties", ties);
       if (me->original () && ties.size () == 1
@@ -250,7 +250,7 @@ MAKE_SCHEME_CALLBACK (Tie, print, 1);
 SCM
 Tie::print (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
 
   SCM cp = me->get_property ("control-points");
 
@@ -281,7 +281,7 @@ Tie::print (SCM smob)
       string str;
       SCM properties = Font_interface::text_font_alist_chain (me);
 
-      Stencil tm = *unsmob_stencil (Text_interface::interpret_markup
+      Stencil tm = *Stencil::unsmob (Text_interface::interpret_markup
                                     (me->layout ()->self_scm (), properties,
                                      annotation));
       tm.translate (Offset (b.control_[3][X_AXIS] + 0.5,
index 1b2ed673f402cd1c93faacc8e43c284031a7816d..96ab19758135ee9d5811156c642dcbd5df39ab71 100644 (file)
@@ -36,7 +36,7 @@ MAKE_SCHEME_CALLBACK (Time_signature, print, 1);
 SCM
 Time_signature::print (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   SCM st = me->get_property ("style");
   SCM frac = me->get_property ("fraction");
   int n = 4;
@@ -104,8 +104,8 @@ Time_signature::numbered_time_signature (Grob *me, int num, int den)
   SCM sd = Text_interface::interpret_markup (me->layout ()->self_scm (), chain,
                                              ly_string2scm (::to_string (den)));
 
-  Stencil n = *unsmob_stencil (sn);
-  Stencil d = *unsmob_stencil (sd);
+  Stencil n = *Stencil::unsmob (sn);
+  Stencil d = *Stencil::unsmob (sd);
 
   n.align_to (X_AXIS, CENTER);
   d.align_to (X_AXIS, CENTER);
index 8298a2b56f4ac3154ea0cb017f5ae1723d1e883a..4930d35d03933c6fe6651660e602eea9791f5177 100644 (file)
@@ -47,7 +47,7 @@ Timing_translator::stop_translation_timestep ()
 void
 Timing_translator::initialize ()
 {
-  Context *timing = unsmob_context (scm_call_2 (ly_lily_module_constant ("ly:context-find"),
+  Context *timing = Context::unsmob (scm_call_2 (ly_lily_module_constant ("ly:context-find"),
                                                 context ()->self_scm (),
                                                 ly_symbol2scm ("Timing")));
   if (timing != context ())
@@ -78,7 +78,7 @@ Timing_translator::initialize ()
 
   SCM measureLength = timing->get_property ("measureLength");
 
-  if (!unsmob_moment (measureLength))
+  if (!Moment::unsmob (measureLength))
     {
       measureLength =
         Moment (ly_scm2rational
@@ -115,7 +115,7 @@ Timing_translator::initialize ()
   context ()->set_property ("beamExceptions", beamExceptions);
 
   SCM baseMoment = timing->get_property ("baseMoment");
-  if (!unsmob_moment (baseMoment))
+  if (!Moment::unsmob (baseMoment))
     {
       baseMoment =
         Moment (ly_scm2rational
@@ -130,7 +130,7 @@ Timing_translator::initialize ()
     {
       beatStructure =
         scm_call_3 (ly_lily_module_constant ("beat-structure"),
-                    ly_rational2scm (unsmob_moment (baseMoment)->main_part_),
+                    ly_rational2scm (Moment::unsmob (baseMoment)->main_part_),
                     timeSignatureFraction,
                     timeSignatureSettings);
     }
@@ -147,8 +147,8 @@ Rational
 Timing_translator::measure_length () const
 {
   SCM l = get_property ("measureLength");
-  if (unsmob_moment (l))
-    return unsmob_moment (l)->main_part_;
+  if (Moment::unsmob (l))
+    return Moment::unsmob (l)->main_part_;
   else
     return Rational (1);
 }
@@ -181,8 +181,8 @@ Timing_translator::start_translation_timestep ()
   Moment measposp;
 
   SCM s = get_property ("measurePosition");
-  if (unsmob_moment (s))
-    measposp = *unsmob_moment (s);
+  if (Moment::unsmob (s))
+    measposp = *Moment::unsmob (s);
   else
     {
       measposp = now;
index d9b47995f486242d7811c4d7583cef930f8339a4..a41e7d434a399173af9ebcfe6f635fb3ad80db94 100644 (file)
@@ -66,6 +66,6 @@ get_translator (SCM sym)
       return 0;
     }
 
-  return unsmob_translator (v);
+  return Translator::unsmob (v);
 }
 
index 7ccdddd5169c5685cbd3f4782a5dfa3c9d0d2919..873f707de5d06b83cd529cab0c6d6e6a2019cd83 100644 (file)
@@ -48,7 +48,7 @@ Engraver_dispatch_list::create (SCM trans_list,
   for (SCM s = trans_list; scm_is_pair (s); s = scm_cdr (s))
     {
       Engraver *eng
-        = dynamic_cast<Engraver *> (unsmob_translator (scm_car (s)));
+        = dynamic_cast<Engraver *> (Translator::unsmob (scm_car (s)));
 
       if (!eng)
         continue;
index 638c38bd9ce1c6d68aabe42a21dabf9f4c924520..3f7e129602d7e2480edede441d679a64838bee20 100644 (file)
@@ -39,7 +39,7 @@ void
 translator_each (SCM list, Translator_method method)
 {
   for (SCM p = list; scm_is_pair (p); p = scm_cdr (p))
-    (unsmob_translator (scm_car (p))->*method) ();
+    (Translator::unsmob (scm_car (p))->*method) ();
 }
 
 void
@@ -62,7 +62,7 @@ Translator_group::connect_to_context (Context *c)
                                     ly_symbol2scm ("AnnounceNewContext"));
   for (SCM tr_list = simple_trans_list_; scm_is_pair (tr_list); tr_list = scm_cdr (tr_list))
     {
-      Translator *tr = unsmob_translator (scm_car (tr_list));
+      Translator *tr = Translator::unsmob (scm_car (tr_list));
       tr->connect_to_context (c);
     }
 }
@@ -72,7 +72,7 @@ Translator_group::disconnect_from_context ()
 {
   for (SCM tr_list = simple_trans_list_; scm_is_pair (tr_list); tr_list = scm_cdr (tr_list))
     {
-      Translator *tr = unsmob_translator (scm_car (tr_list));
+      Translator *tr = Translator::unsmob (scm_car (tr_list));
       tr->disconnect_from_context (context_);
     }
   context_->event_source ()->remove_listener (GET_LISTENER (create_child_translator),
@@ -90,7 +90,7 @@ Translator_group::finalize ()
   Both filter_performers and filter_engravers used to use a direct dynamic_cast
   on the unsmobbed translator to be filtered, i.e.,
 
-  if (dynamic_cast<Performer *> (unsmob_translator (scm_car (*tail))))
+  if (dynamic_cast<Performer *> (Translator::unsmob (scm_car (*tail))))
 
   but this caused mysterious optimisation issues in several GUB builds.  See
   issue #818 for the background to this change.
@@ -101,7 +101,7 @@ filter_performers (SCM ell)
   SCM *tail = &ell;
   for (SCM p = ell; scm_is_pair (p); p = scm_cdr (p))
     {
-      if (unsmob_performer (scm_car (*tail)))
+      if (Performer::unsmob (scm_car (*tail)))
         *tail = scm_cdr (*tail);
       else
         tail = SCM_CDRLOC (*tail);
@@ -115,7 +115,7 @@ filter_engravers (SCM ell)
   SCM *tail = &ell;
   for (SCM p = ell; scm_is_pair (p); p = scm_cdr (p))
     {
-      if (unsmob_engraver (scm_car (*tail)))
+      if (Engraver::unsmob (scm_car (*tail)))
         *tail = scm_cdr (*tail);
       else
         tail = SCM_CDRLOC (*tail);
@@ -149,11 +149,11 @@ IMPLEMENT_LISTENER (Translator_group, create_child_translator);
 void
 Translator_group::create_child_translator (SCM sev)
 {
-  Stream_event *ev = unsmob_stream_event (sev);
+  Stream_event *ev = Stream_event::unsmob (sev);
   // get from AnnounceNewContext
   SCM cs = ev->get_property ("context");
-  Context *new_context = unsmob_context (cs);
-  Context_def *def = unsmob_context_def (new_context->get_definition ());
+  Context *new_context = Context::unsmob (cs);
+  Context_def *def = Context_def::unsmob (new_context->get_definition ());
   SCM ops = new_context->get_definition_mods ();
 
   SCM trans_names = def->get_translator_names (ops);
@@ -249,7 +249,7 @@ precomputed_recurse_over_translators (Context *c, Translator_precompute_index id
 
   for (SCM s = c->children_contexts (); scm_is_pair (s);
        s = scm_cdr (s))
-    precomputed_recurse_over_translators (unsmob_context (scm_car (s)), idx, dir);
+    precomputed_recurse_over_translators (Context::unsmob (scm_car (s)), idx, dir);
 
   if (tg && dir == UP)
     {
@@ -273,7 +273,7 @@ recurse_over_translators (Context *c, Translator_method ptr,
 
   for (SCM s = c->children_contexts (); scm_is_pair (s);
        s = scm_cdr (s))
-    recurse_over_translators (unsmob_context (scm_car (s)), ptr, tg_ptr, dir);
+    recurse_over_translators (Context::unsmob (scm_car (s)), ptr, tg_ptr, dir);
 
   if (tg && dir == UP)
     {
@@ -302,7 +302,7 @@ Translator_group::precompute_method_bindings ()
 {
   for (SCM s = simple_trans_list_; scm_is_pair (s); s = scm_cdr (s))
     {
-      Translator *tr = unsmob_translator (scm_car (s));
+      Translator *tr = Translator::unsmob (scm_car (s));
       Translator_void_method_ptr ptrs[TRANSLATOR_METHOD_PRECOMPUTE_COUNT];
       tr->fetch_precomputable_methods (ptrs);
 
index 64f8e680d8c1bd83fa46db96583c240df7d998df..d73c625f1941f5d82ef9230153d9ff0b7512c063 100644 (file)
@@ -28,7 +28,7 @@ LY_DEFINE (ly_translator_name, "ly:translator-name",
            "  The name is a symbol.")
 {
   LY_ASSERT_SMOB (Translator, trans, 1);
-  Translator *tr = unsmob_translator (trans);
+  Translator *tr = Translator::unsmob (trans);
   char const *nm = tr->class_name ();
   return ly_symbol2scm (nm);
 }
@@ -38,7 +38,7 @@ LY_DEFINE (ly_translator_description, "ly:translator-description",
            "Return an alist of properties of translator @var{me}.")
 {
   LY_ASSERT_SMOB (Translator, me, 1);
-  Translator *tr = unsmob_translator (me);
+  Translator *tr = Translator::unsmob (me);
   return tr->translator_description ();
 }
 
@@ -47,7 +47,7 @@ LY_DEFINE (ly_translator_context, "ly:translator-context",
            "Return the context of the translator object @var{trans}.")
 {
   LY_ASSERT_SMOB (Translator, trans, 1);
-  Translator *tr = unsmob_translator (trans);
+  Translator *tr = Translator::unsmob (trans);
 
   Context *c = tr->context ();
   return c ? c->self_scm () : SCM_BOOL_F;
index 116f2849ac702e33bb6e892dd6d8774f36e26c4b..d505e656b71861c3cac310e70270c1395905e14a 100644 (file)
@@ -279,7 +279,7 @@ generic_get_acknowledger (SCM sym, vector<Acknowledge_information> const *ack_ar
 Moment
 get_event_length (Stream_event *e)
 {
-  Moment *m = unsmob_moment (e->get_property ("length"));
+  Moment *m = Moment::unsmob (e->get_property ("length"));
   if (m)
     return *m;
   else
index 914b3fa21fbe6d20a7de2f8d2c49cdd42f3d9e80..f9d6c1b51c12b076fab614ee21b35c2a80e5e2ba 100644 (file)
@@ -121,7 +121,7 @@ Trill_spanner_engraver::typeset_all ()
     {
       if (!finished_->get_bound (RIGHT))
         {
-          Grob *e = unsmob_grob (get_property ("currentMusicalColumn"));
+          Grob *e = Grob::unsmob (get_property ("currentMusicalColumn"));
           finished_->set_bound (RIGHT, e);
         }
       finished_ = 0;
@@ -133,7 +133,7 @@ Trill_spanner_engraver::stop_translation_timestep ()
 {
   if (span_ && !span_->get_bound (LEFT))
     {
-      Grob *e = unsmob_grob (get_property ("currentMusicalColumn"));
+      Grob *e = Grob::unsmob (get_property ("currentMusicalColumn"));
       span_->set_bound (LEFT, e);
     }
 
@@ -147,7 +147,7 @@ Trill_spanner_engraver::finalize ()
   typeset_all ();
   if (span_)
     {
-      Grob *e = unsmob_grob (get_property ("currentCommandColumn"));
+      Grob *e = Grob::unsmob (get_property ("currentCommandColumn"));
       span_->set_bound (RIGHT, e);
     }
 }
index 04e67fbdecd781138e098877c997ec78b69c8daa..020f3939f6592c0d3b07cb7c3a0b21f4e6d7908d 100644 (file)
@@ -133,7 +133,7 @@ MAKE_SCHEME_CALLBACK (Tuplet_bracket, calc_connect_to_neighbors, 1);
 SCM
 Tuplet_bracket::calc_connect_to_neighbors (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
 
   Direction dir = get_grob_direction (me);
   Drul_array<Item *> bounds (get_x_bound_item (me, LEFT, dir),
@@ -184,7 +184,7 @@ MAKE_SCHEME_CALLBACK (Tuplet_bracket, calc_x_positions, 1)
 SCM
 Tuplet_bracket::calc_x_positions (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
   extract_grob_set (me, "note-columns", columns);
 
   Grob *commonx = get_common_x (me);
@@ -255,7 +255,7 @@ MAKE_SCHEME_CALLBACK (Tuplet_bracket, print, 1);
 SCM
 Tuplet_bracket::print (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
   Stencil mol;
 
   extract_grob_set (me, "note-columns", columns);
@@ -303,7 +303,7 @@ Tuplet_bracket::print (SCM smob)
 
   Output_def *pap = me->layout ();
 
-  Grob *number_grob = unsmob_grob (me->get_object ("tuplet-number"));
+  Grob *number_grob = Grob::unsmob (me->get_object ("tuplet-number"));
 
   /*
     Don't print the bracket when it would be smaller than the number.
@@ -364,7 +364,7 @@ Tuplet_bracket::print (SCM smob)
                         = Text_interface::interpret_markup (pap->self_scm (),
                                                             properties, text);
 
-                      Stencil *edge_text = unsmob_stencil (t);
+                      Stencil *edge_text = Stencil::unsmob (t);
                       edge_text->translate_axis (x_span[d] - x_span[LEFT],
                                                  X_AXIS);
                       edge_stencils[d] = *edge_text;
@@ -633,7 +633,7 @@ Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy)
         }
 
       // Check for number-on-bracket collisions
-      Grob *number = unsmob_grob (tuplets[i]->get_object ("tuplet-number"));
+      Grob *number = Grob::unsmob (tuplets[i]->get_object ("tuplet-number"));
       if (number)
         points.push_back (Offset (number->extent (commonx, X_AXIS).center () - x0,
                                   number->extent (commony, Y_AXIS)[dir]));
@@ -652,7 +652,7 @@ Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy)
 
           // assume that if a script is avoiding slurs, it should not get placed
           // under a tuplet bracket
-          if (unsmob_grob (scripts[i]->get_object ("slur")))
+          if (Grob::unsmob (scripts[i]->get_object ("slur")))
             continue;
 
           Interval script_x (scripts[i]->extent (commonx, X_AXIS));
@@ -702,7 +702,7 @@ MAKE_SCHEME_CALLBACK (Tuplet_bracket, calc_direction, 1);
 SCM
 Tuplet_bracket::calc_direction (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   Direction dir = Tuplet_bracket::get_default_dir (me);
   return scm_from_int (dir);
 }
@@ -711,7 +711,7 @@ MAKE_SCHEME_CALLBACK (Tuplet_bracket, calc_positions, 1);
 SCM
 Tuplet_bracket::calc_positions (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
 
   Real dy = 0.0;
   Real offset = 0.0;
@@ -788,7 +788,7 @@ MAKE_SCHEME_CALLBACK (Tuplet_bracket, calc_cross_staff, 1);
 SCM
 Tuplet_bracket::calc_cross_staff (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   extract_grob_set (me, "note-columns", cols);
   extract_grob_set (me, "tuplets", tuplets);
 
@@ -807,7 +807,7 @@ Tuplet_bracket::calc_cross_staff (SCM smob)
 
   for (vsize i = 0; i < cols.size (); i++)
     {
-      Grob *stem = unsmob_grob (cols[i]->get_object ("stem"));
+      Grob *stem = Grob::unsmob (cols[i]->get_object ("stem"));
       if (stem && to_boolean (stem->get_property ("cross-staff")))
         return SCM_BOOL_T;
     }
index c3529de747dde4747f223550595dd84514e81fad..612f661d3bbd677a9ddd4eea578b08b66bdc5fc2 100644 (file)
@@ -138,7 +138,7 @@ Tuplet_engraver::process_music ()
           if (stopped_tuplets_[i].full_length_)
             {
               Item *col
-                = unsmob_item (stopped_tuplets_[i].full_length_note_
+                = Item::unsmob (stopped_tuplets_[i].full_length_note_
                                ? get_property ("currentMusicalColumn")
                                : get_property ("currentCommandColumn"));
 
@@ -263,7 +263,7 @@ Tuplet_engraver::finalize ()
   if (to_boolean (get_property ("tupletFullLength")))
     for (vsize i = 0; i < last_tuplets_.size (); i++)
       {
-        Item *col = unsmob_item (get_property ("currentCommandColumn"));
+        Item *col = Item::unsmob (get_property ("currentCommandColumn"));
         last_tuplets_[i]->set_bound (RIGHT, col);
       }
 }
index ca7533dce903b301d36c1ddd4356b5f165cccbde..e04a0e9de8ee57932af9a3587acdc32043e0a865 100644 (file)
@@ -68,7 +68,7 @@ Tuplet_iterator::create_event (Direction d)
 
   Music *mus = get_music ();
 
-  Music *ev = unsmob_music (ev_scm);
+  Music *ev = Music::unsmob (ev_scm);
   ev->set_spot (*mus->origin ());
   if (d == START)
     {
@@ -126,14 +126,14 @@ Tuplet_iterator::process (Moment m)
 void
 Tuplet_iterator::construct_children ()
 {
-  if (Duration *d = unsmob_duration (get_music ()->get_property ("duration")))
+  if (Duration *d = Duration::unsmob (get_music ()->get_property ("duration")))
     spanner_duration_ = d->get_length ();
   else
     {
       spanner_duration_ = music_get_length ();
 
       Moment *mp
-        = unsmob_moment (get_outlet ()->get_property ("tupletSpannerDuration"));
+        = Moment::unsmob (get_outlet ()->get_property ("tupletSpannerDuration"));
       if (mp)
         spanner_duration_ = min (mp->main_part_, spanner_duration_);
     }
index 9d4ce784b1803460ada4749d9bd232cb38aec69f..039dfaf530603a7d529444635aedcc8b03dafe4d 100644 (file)
@@ -109,7 +109,7 @@ Drul_array<Grob *>
 Tuplet_number::adjacent_note_columns (Grob *me_grob, Grob *ref_stem)
 {
   Spanner *me = dynamic_cast<Spanner *> (me_grob);
-  Spanner *tuplet = unsmob_spanner (me->get_object ("bracket"));
+  Spanner *tuplet = Spanner::unsmob (me->get_object ("bracket"));
 
   extract_grob_set (tuplet, "note-columns", columns);
   Grob *ref_col = ref_stem->get_parent (X_AXIS); // X-parent of Stem = NoteColumn
@@ -156,7 +156,7 @@ bool
 Tuplet_number::knee_position_against_beam (Grob *me_grob, Grob *ref_stem)
 {
   Spanner *me = dynamic_cast<Spanner *> (me_grob);
-  Spanner *tuplet = unsmob_spanner (me->get_object ("bracket"));
+  Spanner *tuplet = Spanner::unsmob (me->get_object ("bracket"));
 
   bool bracket_visible = to_boolean (me->get_property ("bracket-visibility"))
                          || !tuplet->extent (tuplet, Y_AXIS).is_empty ();
@@ -213,8 +213,8 @@ MAKE_SCHEME_CALLBACK (Tuplet_number, print, 1);
 SCM
 Tuplet_number::print (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
-  Spanner *tuplet = unsmob_spanner (me->get_object ("bracket"));
+  Spanner *me = Spanner::unsmob (smob);
+  Spanner *tuplet = Spanner::unsmob (me->get_object ("bracket"));
 
   if (!tuplet || !tuplet->is_live ())
     {
@@ -223,7 +223,7 @@ Tuplet_number::print (SCM smob)
     }
 
   SCM stc_scm = Text_interface::print (smob);
-  Stencil *stc = unsmob_stencil (stc_scm);
+  Stencil *stc = Stencil::unsmob (stc_scm);
 
   stc->align_to (X_AXIS, CENTER);
   stc->align_to (Y_AXIS, CENTER);
@@ -257,13 +257,13 @@ MAKE_SCHEME_CALLBACK (Tuplet_number, calc_x_offset, 1);
 SCM
 Tuplet_number::calc_x_offset (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
 
   Item *left_bound = me->get_bound (LEFT);
   Item *right_bound = me->get_bound (RIGHT);
   Drul_array<Item *> bounds (left_bound, right_bound);
 
-  Spanner *tuplet = unsmob_spanner (me->get_object ("bracket"));
+  Spanner *tuplet = Spanner::unsmob (me->get_object ("bracket"));
 
   Grob *commonx = Tuplet_bracket::get_common_x (tuplet);
   commonx = commonx->common_refpoint (me, X_AXIS);
@@ -347,8 +347,8 @@ MAKE_SCHEME_CALLBACK (Tuplet_number, calc_y_offset, 1);
 SCM
 Tuplet_number::calc_y_offset (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
-  Spanner *tuplet = unsmob_spanner (me->get_object ("bracket"));
+  Spanner *me = Spanner::unsmob (smob);
+  Spanner *tuplet = Spanner::unsmob (me->get_object ("bracket"));
   Drul_array<Real> positions = robust_scm2drul (tuplet->get_property ("positions"),
                                                 Drul_array<Real> (0.0, 0.0));
   SCM to_bracket = scm_from_double ((positions[LEFT] + positions[RIGHT]) / 2.0);
@@ -450,7 +450,7 @@ Tuplet_number::calc_y_offset (SCM smob)
   Interval colliding_acc_ext_y;
 
   for (vsize i = 0; i < heads.size (); i++)
-    if (Grob *acc = unsmob_grob (heads[i]->get_object ("accidental-grob")))
+    if (Grob *acc = Grob::unsmob (heads[i]->get_object ("accidental-grob")))
       {
         commony = commony->common_refpoint (acc, Y_AXIS);
         Interval acc_ext_y = acc->extent (commony, Y_AXIS);
@@ -484,8 +484,8 @@ MAKE_SCHEME_CALLBACK (Tuplet_number, calc_cross_staff, 1)
 SCM
 Tuplet_number::calc_cross_staff (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
-  return unsmob_grob (me->get_object ("bracket"))->get_property ("cross-staff");
+  Grob *me = Grob::unsmob (smob);
+  return Grob::unsmob (me->get_object ("bracket"))->get_property ("cross-staff");
 }
 
 ADD_INTERFACE (Tuplet_number,
index f29be92f12ee0e420aa15d902cb61d073a2b09b3..7163027ede9e985b54f68a972b0814b7d54cf389 100644 (file)
@@ -42,7 +42,7 @@ Unfolded_repeat_iterator::get_music_list () const
 
   for (int i = 0; i < rep_count; i++)
     {
-      if (unsmob_music (body))
+      if (Music::unsmob (body))
         *tail = scm_cons (body, SCM_EOL);
 
       tail = SCM_CDRLOC (*tail);
index 3749b5af882d2a6d8f2094f79fb80dc4a24a407e..626916729b3e80b0af5447ca4d7a5c9cfd2ef6d0 100644 (file)
@@ -455,11 +455,11 @@ Vaticana_ligature_engraver::check_for_ambiguous_dot_pitch (Grob_info primitive)
   // bitmask based O (1) test); where n=<number of primitives in the
   // ligature> (which is typically small (n<10), though).
   Stream_event *new_cause = primitive.event_cause ();
-  int new_pitch = unsmob_pitch (new_cause->get_property ("pitch"))->steps ();
+  int new_pitch = Pitch::unsmob (new_cause->get_property ("pitch"))->steps ();
   for (vsize i = 0; i < augmented_primitives_.size (); i++)
     {
       Stream_event *cause = augmented_primitives_[i].event_cause ();
-      int pitch = unsmob_pitch (cause->get_property ("pitch"))->steps ();
+      int pitch = Pitch::unsmob (cause->get_property ("pitch"))->steps ();
       if (pitch == new_pitch)
         {
           primitive.grob ()->
index d8ac36b9a30c2c8f55b14bbcf8d6e5217a6378e2..a180db6fa29ab862e426d7ddb91a5f1e033981a6 100644 (file)
@@ -290,7 +290,7 @@ MAKE_SCHEME_CALLBACK (Vaticana_ligature, brew_ligature_primitive, 1);
 SCM
 Vaticana_ligature::brew_ligature_primitive (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
+  Grob *me = Grob::unsmob (smob);
   SCM primitive = vaticana_brew_primitive (me).smobbed_copy ();
   return primitive;
 }
index 650669f8c54768e41791ac488f18ae529960227c..2a7ee0eac6a1f2b8703aa65d2bdfdce0e9611c62 100644 (file)
@@ -100,7 +100,7 @@ Vertical_align_engraver::process_music ()
       top_level_ = to_boolean (get_property ("topLevelAlignment"));
 
       valign_ = make_spanner (top_level_ ? "VerticalAlignment" : "StaffGrouper", SCM_EOL);
-      valign_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn")));
+      valign_->set_bound (LEFT, Grob::unsmob (get_property ("currentCommandColumn")));
       Align_interface::set_ordered (valign_);
     }
 }
@@ -110,7 +110,7 @@ Vertical_align_engraver::finalize ()
 {
   if (valign_)
     {
-      valign_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn")));
+      valign_->set_bound (RIGHT, Grob::unsmob (get_property ("currentCommandColumn")));
       valign_ = 0;
     }
 }
@@ -145,14 +145,14 @@ Vertical_align_engraver::acknowledge_axis_group (Grob_info i)
       SCM before = scm_hash_ref (id_to_group_hashtab_, before_id, SCM_BOOL_F);
       SCM after = scm_hash_ref (id_to_group_hashtab_, after_id, SCM_BOOL_F);
 
-      Grob *before_grob = unsmob_grob (before);
-      Grob *after_grob = unsmob_grob (after);
+      Grob *before_grob = Grob::unsmob (before);
+      Grob *after_grob = Grob::unsmob (after);
 
       Align_interface::add_element (valign_, i.grob ());
 
       if (before_grob || after_grob)
         {
-          Grob_array *ga = unsmob_grob_array (valign_->get_object ("elements"));
+          Grob_array *ga = Grob_array::unsmob (valign_->get_object ("elements"));
           vector<Grob *> &arr = ga->array_reference ();
 
           Grob *added = arr.back ();
@@ -182,7 +182,7 @@ Vertical_align_engraver::acknowledge_axis_group (Grob_info i)
   else if (qualifies (i))
     {
       Pointer_group_interface::add_grob (valign_, ly_symbol2scm ("elements"), i.grob ());
-      if (!unsmob_grob (i.grob ()->get_object ("staff-grouper")))
+      if (!Grob::unsmob (i.grob ()->get_object ("staff-grouper")))
         i.grob ()->set_object ("staff-grouper", valign_->self_scm ());
     }
 }
index 99490980e87f4c167733a34300d3fd63be99fd48..d6927b6c12932ed05d60e921fa5c1943ebe9cc44 100644 (file)
@@ -46,7 +46,7 @@ MAKE_SCHEME_CALLBACK (Volta_bracket_interface, print, 1);
 SCM
 Volta_bracket_interface::print (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
   Spanner *orig_span = dynamic_cast<Spanner *> (me->original ());
   bool broken_first_bracket = orig_span && (orig_span->broken_intos_[0]
                                             == (Spanner *)me);
@@ -106,7 +106,7 @@ Volta_bracket_interface::print (SCM smob)
       SCM properties = me->get_property_alist_chain (SCM_EOL);
       SCM snum = Text_interface::interpret_markup (layout->self_scm (),
                                                    properties, text);
-      Stencil num = *unsmob_stencil (snum);
+      Stencil num = *Stencil::unsmob (snum);
       num.align_to (Y_AXIS, UP);
       num.translate_axis (-0.5, Y_AXIS);
       total.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length ()
index de7d08db95e09eb55ce85235eca5625df8dd2984..f92d8f968f973a068ba4e9541df554892f4ee546 100644 (file)
@@ -99,8 +99,8 @@ Volta_engraver::process_music ()
       SCM l (get_property ("voltaSpannerDuration"));
       Moment now = now_mom ();
 
-      bool early_stop = unsmob_moment (l)
-                        && *unsmob_moment (l) <= now - started_mom_;
+      bool early_stop = Moment::unsmob (l)
+                        && *Moment::unsmob (l) <= now - started_mom_;
 
       end = end || early_stop;
     }
@@ -161,7 +161,7 @@ Volta_engraver::acknowledge_bar_line (Grob_info i)
 void
 Volta_engraver::stop_translation_timestep ()
 {
-  Grob *cc = unsmob_grob (get_property ("currentCommandColumn"));
+  Grob *cc = Grob::unsmob (get_property ("currentCommandColumn"));
   Item *ci = dynamic_cast<Item *> (cc);
 
   if (end_volta_bracket_ && !end_volta_bracket_->get_bound (RIGHT))
@@ -173,7 +173,7 @@ Volta_engraver::stop_translation_timestep ()
   if (end_volta_bracket_ && !volta_bracket_)
     {
       for (SCM s = get_property ("stavesFound"); scm_is_pair (s); s = scm_cdr (s))
-        Side_position_interface::add_support (volta_spanner_, unsmob_grob (scm_car (s)));
+        Side_position_interface::add_support (volta_spanner_, Grob::unsmob (scm_car (s)));
       volta_spanner_ = 0;
     }
 
index 5c341cf02896430e9e4b208e6d4ccaa607cdfb76..6e784a1a656df012dc60d2dd4ecd471f8fbedd57 100644 (file)
@@ -23,7 +23,7 @@ That's it.  For more information, visit http://lilypond.org .
 
 %}
 
-\version "2.19.10"  % necessary for upgrading to future LilyPond versions.
+\version "2.19.11"  % necessary for upgrading to future LilyPond versions.
 
 \header{
   title = "A scale in LilyPond"
index 94949cb20c2e943fbe7717b3a9fe528bb6657705..912a4b1a958bcb5d44065f42c2f2ab66c1175126 100644 (file)
@@ -32,7 +32,7 @@ Good luck with LilyPond!  Happy engraving.
 
 %}
 
-\version "2.19.10"  % necessary for upgrading to future LilyPond versions.
+\version "2.19.11"  % necessary for upgrading to future LilyPond versions.
 
 \header{
   title = "A scale in LilyPond"
index 65b4a6db7aff6330e5c55d4d37469c5cafdfb8d8..fea1c9b8884bee6d59a5eb9808b303b3e6d26fb4 100644 (file)
@@ -661,22 +661,30 @@ slurs, ties, and horizontal spacing are adjusted automatically.")
 
    ;; these props ARE allowed to shrink below default size
    (define shrinkable-props
-     '(
-       ;; TODO: uncomment spacing-increment here once Issue 3987 is fixed
-       ;; override at the 'Score level
-       ;(SpacingSpanner spacing-increment)
-
-       ;; lengths and heights
-       (Beam length-fraction)
-       (Stem length-fraction)
-       (Stem beamlet-default-length)
-       (Slur height-limit)
-       (Slur minimum-length)
-       (PhrasingSlur height-limit)
-       (PhrasingSlur minimum-length)
-
-       ;; Beam.beam-thickness is dealt with separately below
-       ))
+     (let ((baseline-skip-props
+             (find-named-props 'baseline-skip all-grob-descriptions))
+           (word-space-props
+             (find-named-props 'word-space all-grob-descriptions)))
+       (append
+         baseline-skip-props
+         word-space-props
+         '(
+           ;; TODO: uncomment spacing-increment here once Issue 3987 is fixed
+           ;; override at the 'Score level
+           ;(SpacingSpanner spacing-increment)
+
+           ;; lengths and heights
+           (Beam length-fraction)
+           (Stem length-fraction)
+           (Stem beamlet-default-length)
+           (Stem double-stem-separation)
+           (Slur height-limit)
+           (Slur minimum-length)
+           (PhrasingSlur height-limit)
+           (PhrasingSlur minimum-length)
+
+           ;; Beam.beam-thickness is dealt with separately below
+           ))))
    #{
      \context Bottom {
        %% TODO: uncomment \newSpacingSection once Issue 3990 is fixed
@@ -709,9 +717,15 @@ horizontal spacing automatically, using @var{mag} as a size factor.")
 
    ;; these props ARE allowed to shrink below default size
    (define shrinkable-props
-     (let ((space-alist-props
-            (find-all-space-alist-props all-grob-descriptions)))
+     (let* ((baseline-skip-props
+              (find-named-props 'baseline-skip all-grob-descriptions))
+            (word-space-props
+              (find-named-props 'word-space all-grob-descriptions))
+            (space-alist-props
+              (find-named-props 'space-alist all-grob-descriptions)))
        (append
+         baseline-skip-props
+         word-space-props
          space-alist-props
          '(
            ;; override at the 'Score level
@@ -723,6 +737,7 @@ horizontal spacing automatically, using @var{mag} as a size factor.")
            (BarLine hair-thickness)
            (BarLine thick-thickness)
            (Stem beamlet-default-length)
+           (Stem double-stem-separation)
            ))))
 
    #{
@@ -736,7 +751,8 @@ horizontal spacing automatically, using @var{mag} as a size factor.")
                                                  shrinkable-props))
 
      %% scale settings
-     %% (but only if staff magnification is changing)
+     %% (but only if staff magnification is changing
+     %% and does not equal 1)
      #(scale-fontSize 'magnifyStaff mag)
      #(scale-props    'magnifyStaff mag #f unshrinkable-props)
      #(scale-props    'magnifyStaff mag #t shrinkable-props)
index ce445c6c9ced39dfa6e296dfad6ff392642a9b11..8ee48b782111cc7492481817d365574f76691871 100644 (file)
@@ -6,10 +6,10 @@
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: lilypond 2.19.10\n"
+"Project-Id-Version: lilypond 2.19.11\n"
 "Report-Msgid-Bugs-To: http://post.gmane.org/post.php?group=gmane.comp.gnu."
 "lilypond.bugs\n"
-"POT-Creation-Date: 2014-07-13 15:39+0100\n"
+"POT-Creation-Date: 2014-08-03 14:21+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -1939,12 +1939,12 @@ msgstr ""
 msgid "Must be footnote-event."
 msgstr ""
 
-#: general-scheme.cc:390
+#: general-scheme.cc:395
 #, c-format
 msgid "failed redirecting stderr to `%s'"
 msgstr ""
 
-#: general-scheme.cc:469 output-ps.scm:48
+#: general-scheme.cc:474 output-ps.scm:48
 msgid "Found infinity or nan in output.  Substituting 0.0"
 msgstr ""
 
@@ -2171,12 +2171,6 @@ msgstr ""
 msgid "cannot find Voice `%s'"
 msgstr ""
 
-#: lyric-engraver.cc:185
-msgid ""
-"Aligning lyric syllables to notes was requested, but there are no notes in "
-"the specified context. Syllable will be attached to a PaperColumn instead."
-msgstr ""
-
 #: main.cc:104
 #, c-format
 msgid ""
@@ -3465,12 +3459,12 @@ msgstr ""
 msgid "pair expected in doc ~s"
 msgstr ""
 
-#: document-backend.scm:192
+#: document-backend.scm:202
 #, scheme-format
 msgid "cannot find interface for property: ~S"
 msgstr ""
 
-#: document-backend.scm:202
+#: document-backend.scm:212
 #, scheme-format
 msgid "unknown Grob interface: ~S"
 msgstr ""
@@ -3729,30 +3723,30 @@ msgstr ""
 msgid "music expected: ~S"
 msgstr ""
 
-#: music-functions.scm:1246
+#: music-functions.scm:1230
 #, scheme-format
 msgid "cannot find quoted music: `~S'"
 msgstr ""
 
-#: music-functions.scm:1386
+#: music-functions.scm:1370
 msgid "Add @var{octave-shift} to the octave of @var{pitch}."
 msgstr ""
 
-#: music-functions.scm:1449
+#: music-functions.scm:1433
 #, scheme-format
 msgid "Unknown octaveness type: ~S "
 msgstr ""
 
-#: music-functions.scm:1450
+#: music-functions.scm:1434
 msgid "Defaulting to 'any-octave."
 msgstr ""
 
-#: music-functions.scm:1838
+#: music-functions.scm:1826
 #, scheme-format
 msgid "unknown accidental style: ~S"
 msgstr ""
 
-#: music-functions.scm:2056
+#: music-functions.scm:2044
 msgid "Missing duration"
 msgstr ""
 
@@ -3780,32 +3774,32 @@ msgstr ""
 msgid "cannot find SVG font ~S"
 msgstr ""
 
-#: paper.scm:120
+#: paper.scm:121
 msgid "set-global-staff-size: not in toplevel scope"
 msgstr ""
 
-#: paper.scm:320
+#: paper.scm:321
 #, scheme-format
 msgid "This is not a \\layout {} object, ~S"
 msgstr ""
 
-#: paper.scm:328
+#: paper.scm:329
 #, scheme-format
 msgid "Unknown paper size: ~a"
 msgstr ""
 
 #. TODO: should raise (generic) exception with throw, and catch
 #. that in parse-scm.cc
-#: paper.scm:347
+#: paper.scm:348
 msgid "Must use #(set-paper-size .. ) within \\paper { ... }"
 msgstr ""
 
-#: parser-clef.scm:176
+#: parser-clef.scm:154
 #, scheme-format
 msgid "unknown clef type `~a'"
 msgstr ""
 
-#: parser-clef.scm:177
+#: parser-clef.scm:155
 #, scheme-format
 msgid "supported clefs: ~a"
 msgstr ""
index b88c8f59f891ce93809c67ba60e081b367afe1c9..5f92397dca3bbe9ad206af59cd302dd9aed82c71 100644 (file)
@@ -458,6 +458,9 @@ associated with the current context.  Ranges from@tie{}@w{-1} to@tie{}1,
 where the values@tie{}@w{-1} (@code{#LEFT}),@tie{}0 (@code{#CENTER})
 and@tie{}1 (@code{#RIGHT}) correspond to hard left, center, and hard
 right, respectively.")
+     (midiExpression ,number? "Expression control for the MIDI
+channel associated with the current context.  Ranges from 0
+to@tie{}1 (0=off,@tie{}1=full effect).")
      (midiReverbLevel ,number? "Reverb effect level for the MIDI
 channel associated with the current context.  Ranges from 0
 to@tie{}1 (0=off,@tie{}1=full effect).")
index cd5b663f3bd1a687aa5fd7b8ae2f538a87582ca7..05cff648d4bdcc06ca1d8fad9cf79d93b1f636ac 100644 (file)
@@ -125,43 +125,47 @@ visibility of the tuplet bracket.  Setting it to false prevents
 printing of the bracket.  Setting the property to @code{if-no-beam}
 makes it print only if there is no beam associated with this tuplet
 bracket.")
-     (break-align-anchor ,number? "Grobs aligned to this break-align
-grob will have their X-offsets shifted by this number.  In bar lines,
+     (break-align-anchor ,number? "Grobs aligned to this breakable
+item will have their X-offsets shifted by this number.  In bar lines,
 for example, this is used to position grobs relative to the (visual)
 center of the bar line.")
      (break-align-anchor-alignment ,number? "Read by
 @code{ly:break-aligned-interface::calc-extent-aligned-anchor} for
 aligning an anchor to a grob's extent.")
-     (break-align-orders ,vector? "Defines the order in which
-prefatory matter (clefs, key signatures) appears.  The format is a
-vector of length@tie{}3, where each element is one order for
-end-of-line, middle of line, and start-of-line, respectively.  An
-order is a list of symbols.
+     (break-align-orders ,vector? "This is a vector of 3@tie{}lists:
+@w{@code{#(@var{end-of-line} @var{unbroken} @var{start-of-line}}}).
+Each list contains @w{@emph{break-align symbols}} that specify an
+order of breakable items (see @rinternals{break-alignment-interface}).
 
-For example, clefs are put after key signatures by setting
+For example, this places time signatures before clefs:
 
 @example
-\\override Score.BreakAlignment #'break-align-orders =
-  #(make-vector 3 '(span-bar
+\\override Score.BreakAlignment.break-align-orders =
+  #(make-vector 3 '(left-edge
+                    cue-end-clef
+                    ambitus
                     breathing-sign
-                    staff-bar
-                    key
+                    time-signature
                     clef
-                    time-signature))
+                    cue-clef
+                    staff-bar
+                    key-cancellation
+                    key-signature
+                    custos))
 @end example")
-     (break-align-symbol ,symbol? "This key is used for aligning and
-spacing breakable items.")
-     (break-align-symbols ,list? "A list of symbols that determine
-which break-aligned grobs to align this to.  If the grob selected by
-the first symbol in the list is invisible due to break-visibility, we
-will align to the next grob (and so on).  Choices are @code{left-edge},
-@code{ambitus}, @code{breathing-sign}, @code{clef}, @code{staff-bar},
-@code{key-cancellation}, @code{key-signature}, @code{time-signature},
-and @code{custos}.")
+     (break-align-symbol ,symbol? "This key is used for aligning,
+ordering, and spacing breakable items.  See
+@rinternals{break-alignment-interface}.")
+     (break-align-symbols ,list? "A list of
+@w{@emph{break-align symbols}} that determines which breakable
+items to align this to.  If the grob selected by the first symbol
+in the list is invisible due to @w{@code{break-visibility}}, we
+will align to the next grob (and so on).  Choices are listed in
+@rinternals{break-alignment-interface}.")
      (break-overshoot ,number-pair? "How much does a broken spanner
 stick out of its bounds?")
      (break-visibility ,vector? "A vector of 3@tie{}booleans,
-@code{#(@var{end-of-line} @var{unbroken} @var{begin-of-line})}.
+@w{@code{#(@var{end-of-line} @var{unbroken} @var{begin-of-line})}}.
 @code{#t} means visible, @code{#f} means killed.")
      (breakable ,boolean? "Allow breaks here.")
      (broken-bound-padding ,number? "The amount of padding to insert
@@ -862,11 +866,69 @@ elements closer together.")
      (slur-padding ,number? "Extra distance between slur and script.")
      (snap-radius ,number? "The maximum distance between two objects that
 will cause them to snap to alignment along an axis.")
-     (space-alist ,list? "A table that specifies distances between
-prefatory items, like clef and time-signature.  The format is an alist
-of spacing tuples: @code{(@var{break-align-symbol} @var{type}
-. @var{distance})}, where @var{type} can be the symbols
-@code{minimum-space} or @code{extra-space}.")
+     (space-alist ,list? "An alist that specifies distances from this
+grob to other breakable items, using the format:
+
+@example
+'((@var{break-align-symbol} . (@var{spacing-style} . @var{space}))
+  (@var{break-align-symbol} . (@var{spacing-style} . @var{space}))
+  ...)
+@end example
+
+Standard choices for @w{@code{@var{break-align-symbol}}} are listed in
+@rinternals{break-alignment-interface}.  Additionally, three special
+@w{break-align} symbols available to @w{@code{space-alist}} are:
+
+@quotation
+@table @code
+@item first-note
+used when the grob is just left of the first note on a line
+
+@item next-note
+used when the grob is just left of any other note
+
+@item right-edge
+used when the grob is the last item on the line (only compatible with
+the @w{@code{extra-space}} spacing style)
+@end table
+@end quotation
+
+Choices for @code{@var{spacing-style}} are:
+
+@quotation
+@table @code
+@item extra-space
+Put this much space between the two grobs.  The space is stretchable
+when paired with @w{@code{first-note}} or @w{@code{next-note}};
+otherwise it is fixed.
+
+@item minimum-space
+Put at least this much space between the left sides of both grobs,
+without allowing them to collide.  The space is stretchable when paired
+with @w{@code{first-note}} or @w{@code{next-note}}; otherwise it
+is fixed.  Not compatible with @w{@code{right-edge}}.
+
+@item fixed-space
+Only compatible with @w{@code{first-note}} and
+@w{@code{next-note}}.  Put this much fixed space between the grob
+and the note.
+
+@item minimum-fixed-space
+Only compatible with @w{@code{first-note}} and
+@w{@code{next-note}}.  Put at least this much fixed space between
+the left side of the grob and the left side of the note, without
+allowing them to collide.
+
+@item semi-fixed-space
+Only compatible with @w{@code{first-note}} and
+@w{@code{next-note}}.  Put this much space between the grob and
+the note, such that half of the space is fixed and half is
+stretchable.
+@end table
+@end quotation
+
+Rules for this spacing are much more complicated than this.
+See [Wanske] page 126--134, [Ross] page 143--147.")
      (space-to-barline ,boolean? "If set, the distance between a note
 and the following non-musical column will be measured to the bar line
 instead of to the beginning of the non-musical column.  If there is a
index ea606ece065b3b0edf7a2b41636b79f08eadab80..73588907e738c1f402346b5190f0141e74efe5c2 100644 (file)
         (self-alignment-X . ,RIGHT)
         (side-axis . ,Y)
         (stencil . ,ly:text-interface::print)
-        (X-offset . ,(ly:make-simple-closure
-                      `(,+
-                        ,(ly:make-simple-closure
-                          (list ly:break-alignable-interface::self-align-callback))
-                        ,(ly:make-simple-closure
-                          (list ly:self-alignment-interface::x-aligned-on-self)))))
+        (X-offset . ,self-alignment-interface::self-aligned-on-breakable)
         (Y-offset . ,side-position-interface::y-aligned-side)
         (Y-extent . ,grob::always-Y-extent-from-stencil)
         (meta .
                  (interfaces . (font-interface
                                 self-alignment-interface
                                 side-position-interface
-                                system-start-text-interface))))))
+                                system-start-text-interface
+                                text-interface))))))
 
     (InstrumentSwitch
      . (
         (stencil . ,ly:text-interface::print)
         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
         (Y-offset . ,side-position-interface::y-aligned-side)
-        (X-offset . ,(ly:make-simple-closure
-                      `(,+
-                        ,(ly:make-simple-closure
-                          (list ly:break-alignable-interface::self-align-callback))
-                        ,(ly:make-simple-closure
-                          (list ly:self-alignment-interface::x-aligned-on-self)))))
+        (X-offset . ,self-alignment-interface::self-aligned-on-breakable)
         (self-alignment-X . ,LEFT)
         (break-align-symbols . (time-signature))
         (non-break-align-symbols . (paper-column-interface))
         (self-alignment-X . ,CENTER)
         (stencil . ,ly:text-interface::print)
         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
-        (X-offset . ,(ly:make-simple-closure
-                      `(,+
-                        ,(ly:make-simple-closure
-                          (list ly:break-alignable-interface::self-align-callback))
-                        ,(ly:make-simple-closure
-                          (list ly:self-alignment-interface::x-aligned-on-self)))))
+        (X-offset . ,self-alignment-interface::self-aligned-on-breakable)
         (Y-offset . ,side-position-interface::y-aligned-side)
         (Y-extent . ,grob::always-Y-extent-from-stencil)
         (meta . ((class . Item)
index c4ed5344780bea8aedeed5aef4176bdee95e51b2..f448ee8bb73c423787f38d4bafe2608a660e367f 100644 (file)
@@ -946,21 +946,26 @@ Otherwise, return @code{#f}."
                                                           (music 'PropertySet
                                                                  value ?clef-transposition
                                                                  symbol 'clefTransposition)
+                                                          (music 'PropertySet
+                                                                 value ?clef-transposition-style
+                                                                 symbol 'clefTranspositionStyle)
                                                           (music 'ApplyContext
                                                                  procedure ly:set-middle-C!)))))
                     (let ((clef-name (assoc-get (list ?clef-glyph ?clef-position 0)
                                                 clef-name-alist)))
-                      (if clef-name
-                          (format #f "\\clef \"~a~{~a~a~}\"~a"
-                                  clef-name
-                                  (cond ((= 0 ?clef-transposition)
-                                         (list "" ""))
-                                        ((> ?clef-transposition 0)
-                                         (list "^" (1+ ?clef-transposition)))
-                                        (else
-                                         (list "_" (- 1 ?clef-transposition))))
-                                  (new-line->lily-string))
-                          #f))))
+                      (and clef-name
+                           (format #f "\\clef \"~a~?\"~a"
+                                   clef-name
+                                   (case ?clef-transposition-style
+                                     ((parenthesized) "~a(~a)")
+                                     ((bracketed) "~a[~a]")
+                                     (else "~a~a"))
+                                   (cond ((zero? ?clef-transposition)
+                                          (list "" ""))
+                                         ((positive? ?clef-transposition)
+                                          (list "^" (1+ ?clef-transposition)))
+                                         (else (list "_" (- 1 ?clef-transposition))))
+                                   (new-line->lily-string))))))
 
 ;;; \bar
 (define-extra-display-method ContextSpeccedMusic (expr parser)
index dcbd1d4f95fe21c18bb7d4a75d4c14147a6d6383..8eba739ce82b69b1eac024563f6f0cedcf658f0b 100644 (file)
 @titlefont{Internals Reference}
 @author The LilyPond development team
 
-@c `Internals Reference' was born 2000-10-21 with git commit 01e371f...
+@c `Internals Reference' was born 2000-10-21 with this commit:
+@c patch::: 1.3.96.jcn9
+@c author: Jan Nieuwenhuizen
+@c commit: 8ecd09ad7514d57630fb611d38c161f3c3c708db
+@c   file: scm/generate-documentation.scm
 Copyright @copyright{} 2000--2014 by the authors
 
 @vskip 20pt
index 867612ae11529c3426a795498a6dc5168481f427..e177a055edb31ca56bcc4030718b2b759da75c4a 100644 (file)
 
 ;; 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 name family design-size-alist factor)
+(define-public (add-music-fonts node family name brace design-size-alist factor)
   "Set up music fonts.
 
 Arguments:
@@ -155,13 +155,16 @@ Arguments:
 @item
 @var{node} is the font tree to modify.
 
+@item
+@var{family} is the family name of the music font.
+
 @item
 @var{name} is the basename for the music font.
 @file{@var{name}-<designsize>.otf} should be the music font,
-@file{@var{name}-brace.otf} should have piano braces.
 
 @item
-@var{family} is the family name of the music font.
+@var{brace} is the basename for the brace font.
+@file{@var{brace}-brace.otf} should have piano braces.
 
 @item
 @var{design-size-alist} is a list of @code{(rounded . designsize)}.
@@ -199,7 +202,7 @@ used.  This is used to select the proper design size for the text fonts.
                        )))
      (fetaBraces ,(ly:pt 20.0)
                  #(,(delay (ly:system-font-load
-                            (format #f "~a-brace" name)))))
+                            (format #f "~a-brace" brace)))))
      )))
 
 (define-public (add-pango-fonts node lily-family family factor)
@@ -229,9 +232,40 @@ used.  This is used to select the proper design size for the text fonts.
   (add-node 'italic 'normal)
   (add-node 'italic 'bold))
 
+; This function allows the user to change the specific fonts, leaving others
+; to the default values. This way, "make-pango-font-tree"'s syntax doesn't
+; have to change from the user's perspective.
+;
+; Usage:
+;   \paper {
+;     #(define fonts
+;       (set-global-fonts
+;        #:music "gonville"  ; (the main notation font)
+;        #:roman "FreeSerif" ; (the main/serif text font)
+;       ))
+;   }
+;
+; Leaving out "#:brace", "#:sans", and "#:typewriter" leave them at 
+; "emmentaler", "sans-serif", and "monospace", respectively. All fonts are
+; still accesible through the usual scheme symbols: 'feta, 'roman, 'sans, and
+; 'typewriter.
+(define*-public (set-global-fonts #:key 
+  (music "emmentaler")
+  (brace "emmentaler")
+  (roman "Century Schoolbook L")
+  (sans "sans-serif")
+  (typewriter "monospace")
+  (factor 1))
+  (let ((n (make-font-tree-node 'font-encoding 'fetaMusic)))
+    (add-music-fonts n 'feta music brace feta-design-size-mapping factor)
+    (add-pango-fonts n 'roman roman factor)
+    (add-pango-fonts n 'sans sans factor)
+    (add-pango-fonts n 'typewriter typewriter factor)
+    n))
+    
 (define-public (make-pango-font-tree roman-str sans-str typewrite-str factor)
   (let ((n (make-font-tree-node 'font-encoding 'fetaMusic)))
-    (add-music-fonts n "emmentaler" 'feta feta-design-size-mapping factor)
+    (add-music-fonts n 'feta "emmentaler" "emmentaler" feta-design-size-mapping factor)
     (add-pango-fonts n 'roman roman-str factor)
     (add-pango-fonts n 'sans sans-str factor)
     (add-pango-fonts n 'typewriter typewrite-str factor)
@@ -240,7 +274,9 @@ used.  This is used to select the proper design size for the text fonts.
 (define-public (make-century-schoolbook-tree factor)
   (make-pango-font-tree
    "Century Schoolbook L"
-   "sans-serif" "monospace" factor))
+   "sans-serif"
+   "monospace"
+   factor))
 
 (define-public all-text-font-encodings
   '(latin1))
index 2638e9997952bb75899a7148f9bc752e30553d63..4a97c1c664f635417366382c51e42891ab209228 100644 (file)
@@ -2393,25 +2393,39 @@ Offsets are restricted to immutable properties and values of type @code{number},
 
 ;; defined as a function instead of a list because the
 ;; all-grob-descriptions alist is not available yet
-(define-public (find-all-space-alist-props grob-descriptions)
-  "Used by @code{\\magnifyStaff}.  When @var{grob-descriptions} is equal
-to the @code{all-grob-descriptions} alist (defined in
-@file{scm/define-grobs.scm}), this will find all grobs that have an
-initialized value for the @code{space-alist} property, and return them
+(define-public (find-named-props prop-name grob-descriptions)
+  "Used by @code{\\magnifyMusic} and @code{\\magnifyStaff}.  When
+@var{grob-descriptions} is equal to the @code{all-grob-descriptions}
+alist (defined in @file{scm/define-grobs.scm}), this will find all grobs
+that can have a value for the @var{prop-name} property, and return them
 as a list in the following format:
 @example
-'((Ambitus space-alist)
-  (BarLine space-alist)
+'((grob prop-name)
+  (grob prop-name)
   ...)
 @end example"
-  (define (has-space-alist? grob-desc)
-    (ly:assoc-get 'space-alist (cdr grob-desc)))
-  (let* ((grob-descriptions-with-space-alist
-           (filter has-space-alist? grob-descriptions))
-         (grob-names-with-space-alist
-           (map car grob-descriptions-with-space-alist)))
-    (map (lambda (grob-name) (list grob-name 'space-alist))
-         grob-names-with-space-alist)))
+  (define (find-grobs-with-interface interface grob-descriptions)
+    (define (has-this-interface? grob-desc)
+      (let* ((meta (ly:assoc-get 'meta (cdr grob-desc)))
+             (interfaces (ly:assoc-get 'interfaces meta '())))
+        (memq interface interfaces)))
+    (let* ((grob-descriptions-with-this-interface
+             (filter has-this-interface? grob-descriptions))
+           (grob-names-with-this-interface
+             (map car grob-descriptions-with-this-interface)))
+      grob-names-with-this-interface))
+  (let* ((interface
+           (case prop-name
+             ((baseline-skip word-space) 'text-interface)
+             ((space-alist)              'break-aligned-interface)
+             (else (ly:programming-error
+                     "find-named-props: no interface associated with ~s"
+                     prop-name))))
+         (grobs-with-this-prop
+           (find-grobs-with-interface interface grob-descriptions)))
+    (map (lambda (x) (list x prop-name))
+         grobs-with-this-prop)))
+
 
 (define (magnifyStaff-is-set? context mag)
   (let* ((Staff (ly:context-find context 'Staff))
@@ -2433,7 +2447,9 @@ magnification factor @var{mag}.  @var{func-name} is either
       (if (or (eq? func-name 'magnifyMusic)
               ;; for \magnifyStaff, only scale the fontSize
               ;; if staff magnification is changing
-              (staff-magnification-is-changing? context mag))
+              ;; and does not equal 1
+              (and (staff-magnification-is-changing? context mag)
+                   (not (= mag 1))))
         (let* ((where (case func-name
                         ((magnifyMusic) context)
                         ((magnifyStaff) (ly:context-find context 'Staff))))
@@ -2508,10 +2524,15 @@ formatted like:
                                           (cons (car x)
                                                 (cons (cadr x)
                                                       (* mag (cddr x))))))
-                   (scaled-tuples (map scale-spacing-tuple space-alist))
+                   (scaled-tuples (if space-alist
+                                      (map scale-spacing-tuple space-alist)
+                                      '()))
                    (new-alist (append scaled-tuples space-alist)))
               (ly:context-pushpop-property where grob prop new-alist))
-            (let* ((val (ly:assoc-get prop grob-def 1))
+            (let* ((val (ly:assoc-get prop grob-def (case prop
+                                                      ((baseline-skip) 3)
+                                                      ((word-space)    0.6)
+                                                      (else            1))))
                    (proc (lambda (x)
                            (if allowed-to-shrink?
                              (* x mag)
@@ -2524,7 +2545,9 @@ formatted like:
       (if (or (eq? func-name 'magnifyMusic)
               ;; for \magnifyStaff, only scale the properties
               ;; if staff magnification is changing
-              (staff-magnification-is-changing? context mag))
+              ;; and does not equal 1
+              (and (staff-magnification-is-changing? context mag)
+                   (not (= mag 1))))
         (for-each scale-prop props)))))
 
 (define-public (revert-props func-name mag props)
index c607fe4122805ab0e3baa92539fc26c8f1ea3ac0..2df06bd528bdd29bcbc3dc73e290c1445618326a 100644 (file)
    ly:self-alignment-interface::y-aligned-on-self
    ly:self-alignment-interface::pure-y-aligned-on-self))
 
+(define-public (self-alignment-interface::self-aligned-on-breakable grob)
+  "Return the @code{X-offset} that places @var{grob} according to its
+   @code{self-alignment-X} over the reference point defined by the
+   @code{break-align-anchor-alignment} of a @code{break-aligned} item
+   such as a @code{Clef}."
+  (+ (ly:break-alignable-interface::self-align-callback grob)
+     (ly:self-alignment-interface::x-aligned-on-self grob)))
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; staff symbol
 
index 6d45dd5376f4ed13c3cbde71518818797ffd3ad1..9ba29937f9b595cdd4bff5b0078f8022ac451cda 100644 (file)
 
 (define-public (make-clef-set clef-name)
   "Generate the clef setting commands for a clef with name @var{clef-name}."
-  (define (make-prop-set props)
-    (let ((m (make-music 'PropertySet)))
-      (for-each (lambda (x) (set! (ly:music-property m (car x)) (cdr x))) props)
-      m))
-  (let ((e '())
-        (c0 0)
-        (oct 0)
-        (style 'default)
-        (match (string-match "^(.*)([_^])([^0-9a-zA-Z]*)([1-9][0-9]*)([^0-9a-zA-Z]*)$" clef-name)))
-    (if match
-        (begin
-          (set! clef-name (match:substring match 1))
-          (set! oct
-                (* (if (equal? (match:substring match 2) "^") -1 1)
-                   (- (string->number (match:substring match 4)) 1)))
-          (set! style
-                (cond ((equal? (match:substring match 3) "(") 'parenthesized)
+  (let* ((match (string-match "^(.*)([_^])([^0-9a-zA-Z]*)([1-9][0-9]*)([^0-9a-zA-Z]*)$" clef-name))
+         (e (assoc-get (if match (match:substring match 1) clef-name) supported-clefs))
+         (oct (if match
+                  ((if (equal? (match:substring match 2) "^") - +)
+                   (1- (string->number (match:substring match 4))))
+                  0))
+         (style (cond ((not match) 'default)
+                      ((equal? (match:substring match 3) "(") 'parenthesized)
                       ((equal? (match:substring match 3) "[") 'bracketed)
-                      (else style)))))
-    (set! e (assoc-get clef-name supported-clefs))
+                      (else 'default))))
     (if e
-        (let* ((prop-list `(((symbol . clefGlyph) (value . ,(car e)))
-                            ((symbol . middleCClefPosition)
-                             (value . ,(+ oct
-                                          (cadr e)
-                                          (assoc-get (car e) c0-pitch-alist))))
-                            ((symbol . clefPosition) (value . ,(cadr e)))
-                            ((symbol . clefTransposition) (value . ,(- oct)))))
-               ;; the clefTranspositionStyle property is set only when
-               ;; not 'default to calm display-lily-tests.scm
-               (prop-list (if (eq? style 'default)
-                              prop-list
-                              (append
-                               prop-list
-                               `(((symbol . clefTranspositionStyle)
-                                  (value . ,style))))))
-               (musics (map make-prop-set prop-list))
-               (recalc-mid-C (make-music 'ApplyContext))
-               (seq (make-music 'SequentialMusic
-                                'elements (append musics (list recalc-mid-C))))
-               (csp (make-music 'ContextSpeccedMusic)))
-          (set! (ly:music-property recalc-mid-C 'procedure) ly:set-middle-C!)
-          (context-spec-music seq 'Staff))
+        (let ((musics (list
+                       (make-property-set 'clefGlyph (car e))
+                       (make-property-set 'middleCClefPosition
+                                          (+ oct (cadr e)
+                                             (assoc-get (car e) c0-pitch-alist)))
+                       (make-property-set 'clefPosition (cadr e))
+                       (make-property-set 'clefTransposition (- oct))
+                       (make-property-set 'clefTranspositionStyle style)
+                       (make-apply-context ly:set-middle-C!))))
+          (context-spec-music (make-sequential-music musics) 'Staff))
         (begin
           (ly:warning (_ "unknown clef type `~a'") clef-name)
           (ly:warning (_ "supported clefs: ~a")
index 41334b36d5f8db4e591045603c9cd62b627de779..bc7c7e3f0c070ea29529c1a0d1a2e35fabfb3191 100755 (executable)
@@ -489,7 +489,7 @@ i
  while (foe);
 
  squiggle. extent;
- 1 && * unsmob_moment (lf);
+ 1 && * Moment::unsmob (lf);
  line_spanner_ = make_spanner ("DynamicLineSpanner", rq ? rq->*self_scm
 (): SCM_EOL);
  case foo: k;