From e7b7a0604ed42dd6de615434031686bbfcdf72f5 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 17 Feb 2004 22:13:17 +0000 Subject: [PATCH] * lily/note-spacing.cc (get_spacing): less space at EOL in case of key/clef/time signatures. * input/test/ossia.ly: revise example. * lily/span-bar.cc (evaluate_glyph): read 'glyph of self first. cleanup. * lily/grob-scheme.cc (LY_DEFINE): change a few function names to comply to Scheme standard. Remove ly:get-paper-variable --- ChangeLog | 13 +++++ Documentation/user/refman.itely | 32 +++++++++++- VERSION | 4 +- input/les-nereides.ly | 2 +- .../J.S.Bach/baerenreiter-sarabande.ly | 8 +-- input/regression/accidental-octave.ly | 2 +- input/regression/accidental-voice.ly | 2 +- input/regression/accidentals.ly | 2 +- input/regression/apply-context.ly | 2 +- input/regression/apply-output.ly | 2 +- input/regression/between-systems.ly | 2 +- input/regression/molecule-hacking.ly | 2 +- input/regression/music-map.ly | 2 +- input/regression/tuplet-nest.ly | 2 +- input/test/add-staccato.ly | 2 +- input/test/add-text-script.ly | 2 +- input/test/ambitus-mixed.ly | 2 +- input/test/count-systems.ly | 14 +++--- input/test/engraver-one-by-one.ly | 2 +- input/test/move-accidentals.ly | 4 +- input/test/move-specific-text.ly | 2 +- input/test/music-box.ly | 4 +- input/test/ossia.ly | 49 ++++++++++++++----- input/test/piano-staff-distance.ly | 8 +-- input/test/polymetric-differing-notes.ly | 2 +- input/test/reverse-music.ly | 2 +- input/test/smart-transpose.ly | 14 +++--- input/test/spanner-after-break-tweak.ly | 6 +-- lily/grob-scheme.cc | 25 +++------- lily/note-spacing.cc | 15 ++++-- lily/span-bar.cc | 21 ++++---- ly/init.ly | 2 +- scm/music-functions.scm | 6 ++- scm/slur.scm | 2 +- scm/stencil.scm | 4 +- scripts/convert-ly.py | 15 ++++++ 36 files changed, 179 insertions(+), 101 deletions(-) diff --git a/ChangeLog b/ChangeLog index 51f9decf7b..aabc7ce5d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2004-02-17 Han-Wen Nienhuys + + * lily/note-spacing.cc (get_spacing): less space at EOL in case of + key/clef/time signatures. + + * input/test/ossia.ly: revise example. + + * lily/span-bar.cc (evaluate_glyph): read 'glyph of self first. + cleanup. + + * lily/grob-scheme.cc (LY_DEFINE): change a few function names to + comply to Scheme standard. Remove ly:get-paper-variable + 2004-02-17 Mats Bengtsson * scripts/convert-ly.py (2.1.22): Corrected documentation printout. diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 03c1784645..ac1b83d073 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -2832,6 +2832,26 @@ down = \drums { bassdrum4 snare8 bd r bd sn4 } >> } @end lilypond +The above example shows verbose polyphonic notation. The short +polyphonic notation, described in @ref{Polyphony}, can also be used if +the @internalsref{DrumVoices} are instantiated by hand first. For example, + +@lilypond[fragment] +\drums \new DrumStaff << + \context DrumVoice = "1" { s1 *2 } + \context DrumVoice = "2" { s1 *2 } + { + bd4 sn4 bd4 sn4 + << + { \repeat unfold 16 hh16 } + \\ + { bd4 sn4 bd4 sn4 } + >> + } +>> +@end lilypond + + There are also other layout possibilities. To use these, set the property @code{drumStyleTable} in context @internalsref{DrumVoice}. The following variables have been predefined: @@ -3029,8 +3049,11 @@ Dynamics are not centered, but kludges do exist. See @cindex cross staff stem @cindex stem, cross staff - -@c fixme: should have hyperlinks as well. +The distance between the two staves is normally fixed across the +entire score. It is possible to tune this per system, but it does +require arcane command incantations. See +@inputfileref{input/test,piano-staff-distance.ly}. + @@ -4558,6 +4581,11 @@ The first page shows all staffs in full. If they should be removed from the first page too, set @code{remove-first} to false in @internalsref{RemoveEmptyVerticalGroup}. +Another application is making ossia sections, i.e. alternative +melodies on a separate piece of staff, with help of a Frenched +staff. See @inputfileref{input/test,ossia.ly} for an example. + + @node Different editions from one source @subsection Different editions from one source diff --git a/VERSION b/VERSION index e8dd6499cc..eda89cd94b 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=1 -PATCH_LEVEL=24 -MY_PATCH_LEVEL=hwn1 +PATCH_LEVEL=25 +MY_PATCH_LEVEL= diff --git a/input/les-nereides.ly b/input/les-nereides.ly index 1aef409f0a..e27d168ba0 100644 --- a/input/les-nereides.ly +++ b/input/les-nereides.ly @@ -1,5 +1,5 @@ #(ly:set-option 'old-relative) -\version "2.1.23" +\version "2.1.25" \header { composer = "ARTHUR GRAY" diff --git a/input/mutopia/J.S.Bach/baerenreiter-sarabande.ly b/input/mutopia/J.S.Bach/baerenreiter-sarabande.ly index 8e8ea65114..b80bb0b971 100644 --- a/input/mutopia/J.S.Bach/baerenreiter-sarabande.ly +++ b/input/mutopia/J.S.Bach/baerenreiter-sarabande.ly @@ -1,4 +1,4 @@ -\version "2.1.23" +\version "2.1.25" % #(ly:set-point-and-click 'line-column) @@ -7,9 +7,9 @@ forcedLastBreak = \notes { \break } %% We want this to perfectly match the Baerenreiter spacing. %% If we're not using 6 systems, there's definately a problem. #(define (assert-system-count smob n) - (let ((systems (length (ly:get-broken-into - (ly:get-original - (ly:get-system smob)))))) + (let ((systems (length (ly:spanner-broken-into + (ly:grob-original + (ly:grob-system smob)))))) (if (not (equal? n systems)) (error ;;(warn diff --git a/input/regression/accidental-octave.ly b/input/regression/accidental-octave.ly index ffe29a2181..eda7014802 100644 --- a/input/regression/accidental-octave.ly +++ b/input/regression/accidental-octave.ly @@ -1,5 +1,5 @@ -\version "2.1.22" +\version "2.1.25" \header { texidoc=" diff --git a/input/regression/accidental-voice.ly b/input/regression/accidental-voice.ly index 1f28742fff..f735632933 100644 --- a/input/regression/accidental-voice.ly +++ b/input/regression/accidental-voice.ly @@ -1,4 +1,4 @@ -\version "2.1.22" +\version "2.1.25" \header{ texidoc=" diff --git a/input/regression/accidentals.ly b/input/regression/accidentals.ly index 52705da294..b4984c908b 100644 --- a/input/regression/accidentals.ly +++ b/input/regression/accidentals.ly @@ -1,4 +1,4 @@ -\version "2.1.22" +\version "2.1.25" \header{ texidoc=" diff --git a/input/regression/apply-context.ly b/input/regression/apply-context.ly index 954a310153..5369dc086d 100644 --- a/input/regression/apply-context.ly +++ b/input/regression/apply-context.ly @@ -1,5 +1,5 @@ -\version "2.1.22" +\version "2.1.25" \header { diff --git a/input/regression/apply-output.ly b/input/regression/apply-output.ly index f8dbe2bbe9..44b6c0393c 100644 --- a/input/regression/apply-output.ly +++ b/input/regression/apply-output.ly @@ -1,5 +1,5 @@ -\version "2.1.22" +\version "2.1.25" \header { texidoc = "The @code{\applyoutput} expression is the most flexible way to diff --git a/input/regression/between-systems.ly b/input/regression/between-systems.ly index d768851989..63acde706b 100644 --- a/input/regression/between-systems.ly +++ b/input/regression/between-systems.ly @@ -1,5 +1,5 @@ -\version "2.1.22" +\version "2.1.25" \header{ texidoc=" diff --git a/input/regression/molecule-hacking.ly b/input/regression/molecule-hacking.ly index d7372e301c..dfa8bf52c9 100644 --- a/input/regression/molecule-hacking.ly +++ b/input/regression/molecule-hacking.ly @@ -1,5 +1,5 @@ -\version "2.1.22" +\version "2.1.25" \header { texidoc=" You can write stencil callbacks in Scheme, thus providing custom glyphs for notation elements. A simple example is diff --git a/input/regression/music-map.ly b/input/regression/music-map.ly index 88b9a6eca0..20bc3cae33 100644 --- a/input/regression/music-map.ly +++ b/input/regression/music-map.ly @@ -10,7 +10,7 @@ dynamics are left over. These are put onto the 2nd measure." } -\version "2.1.22" +\version "2.1.25" #(define (notes-to-skip m) "Convert all stuff with duration (notes, lyrics, bass figures, etc.) to skips. diff --git a/input/regression/tuplet-nest.ly b/input/regression/tuplet-nest.ly index 23733fba19..284832844f 100644 --- a/input/regression/tuplet-nest.ly +++ b/input/regression/tuplet-nest.ly @@ -1,5 +1,5 @@ -\version "2.1.22" +\version "2.1.25" \header { texidoc="Manual hack for nested tuplets, move outer tuplet up." } diff --git a/input/test/add-staccato.ly b/input/test/add-staccato.ly index 3179337db5..fb3a4b8a5c 100644 --- a/input/test/add-staccato.ly +++ b/input/test/add-staccato.ly @@ -1,5 +1,5 @@ -\version "2.1.22" +\version "2.1.25" \header { diff --git a/input/test/add-text-script.ly b/input/test/add-text-script.ly index 15e774d130..f287b6bb5d 100644 --- a/input/test/add-text-script.ly +++ b/input/test/add-text-script.ly @@ -1,4 +1,4 @@ -\version "2.1.22" +\version "2.1.25" \header { texidoc= "@cindex make-music Fingering diff --git a/input/test/ambitus-mixed.ly b/input/test/ambitus-mixed.ly index 895002b34b..644d2cf0a2 100644 --- a/input/test/ambitus-mixed.ly +++ b/input/test/ambitus-mixed.ly @@ -13,7 +13,7 @@ derived context can then be used in parallel in the same score. (this is not dem " } -\version "2.1.23" +\version "2.1.25" #(define (kill-ambitus grob grob-context apply-context) (if (memq 'ambitus-interface (ly:get-grob-property grob 'interfaces)) diff --git a/input/test/count-systems.ly b/input/test/count-systems.ly index baf3e7f380..09a957b203 100644 --- a/input/test/count-systems.ly +++ b/input/test/count-systems.ly @@ -1,5 +1,5 @@ -\version "2.1.22" +\version "2.1.25" \header{ texidoc="@cindex Count Systems @@ -9,9 +9,9 @@ specified number of lines. " } #(define (display-systemno smob) - (let* ((this-system (ly:get-system smob)) - (systems (ly:get-broken-into - (ly:get-original this-system)))) + (let* ((this-system (ly:grob-system smob)) + (systems (ly:spanner-broken-into + (ly:grob-original this-system)))) (display smob) (display (list-index systems this-system)) (newline))) @@ -19,9 +19,9 @@ specified number of lines. #(define (display-system-count smob) (display (length - (ly:get-broken-into - (ly:get-original - (ly:get-system smob)))))) + (ly:spanner-broken-into + (ly:grob-original + (ly:grob-system smob)))))) diff --git a/input/test/engraver-one-by-one.ly b/input/test/engraver-one-by-one.ly index 05d84b7b5b..2bc69fe62e 100644 --- a/input/test/engraver-one-by-one.ly +++ b/input/test/engraver-one-by-one.ly @@ -103,7 +103,7 @@ MyVoiceContext = \translator { \consists "Chord_tremolo_engraver" \consists "Percent_repeat_engraver" \consists "Slash_repeat_engraver" - \consists "Melisma_engraver" + \consists "Melisma_translator" %{ Must come before text_engraver, but after note_column engraver. diff --git a/input/test/move-accidentals.ly b/input/test/move-accidentals.ly index e4edc5c120..ab81caf3fb 100644 --- a/input/test/move-accidentals.ly +++ b/input/test/move-accidentals.ly @@ -1,4 +1,4 @@ -\version "2.1.22" +\version "2.1.25" % possible rename to scheme- or something like that. -gp \header { texidoc= "@cindex Scheme Manual Accidentals @@ -11,7 +11,7 @@ involves some scheme code. " } (not (eq? #f (memq 'accidental-interface (ly:get-grob-property elt 'interfaces)))) (eq? (ly:get-grob-property - (ly:get-parent elt 1) 'staff-position) pos)))) + (ly:grob-parent elt 1) 'staff-position) pos)))) \score { \context Voice \notes \relative c'' { diff --git a/input/test/move-specific-text.ly b/input/test/move-specific-text.ly index 224345ae65..f35dd4e1ee 100644 --- a/input/test/move-specific-text.ly +++ b/input/test/move-specific-text.ly @@ -1,5 +1,5 @@ -\version "2.1.22" +\version "2.1.25" % possible rename to scheme- or something like that. -gp \header { texidoc = "@cindex Scheme Move Text You can move objects around with scheme. This example shows how to diff --git a/input/test/music-box.ly b/input/test/music-box.ly index c0c0d68f61..b94eb9010c 100644 --- a/input/test/music-box.ly +++ b/input/test/music-box.ly @@ -1,4 +1,4 @@ -\version "2.1.23" +\version "2.1.25" \include "deutsch.ly" % possible rename to scheme- something. -gp % TODO: ask if it needs to have so many empty bars in the middle. -gp @@ -62,7 +62,7 @@ using Scheme functions to avoid typing work. " } -\version "2.1.23" +\version "2.1.25" pat = \notes \transpose c c' \repeat unfold 2 { << { \context Staff=up {r8 e16 f g e f g } } diff --git a/input/test/ossia.ly b/input/test/ossia.ly index a5679aa7bd..979203a69b 100644 --- a/input/test/ossia.ly +++ b/input/test/ossia.ly @@ -1,17 +1,44 @@ -\version "2.1.22" -% pretty much a duplicate of extra-staff.ly. candidate for merge or delete. -gp +\header { texidoc = "A temporary ossia in an instrumental part for + just a few bars on a separate staff. Here is an example using + proper short staffs. A simpler solution is to instantiate a full + staff, and let @code{RemoveEmptyStaffContext} take out the unused parts. -\header { texidoc = "@cindex Ossia -Ossias present alternatives for a piece. They are not -really supported, but can be somewhat faked in lily. " -} + Both solutions are demonstrated here. +" } + +\version "2.1.22" \score { -\notes\relative c'' { c1 c1 << - {\clef "treble" c1 c1 } - \new Staff { c1 c1 } + \notes\relative c'' + \new StaffGroup \with { + \remove "System_start_delimiter_engraver" + \override SpanBar #'glyph = #":" + } << + + %% solution 1 + { c1 c1 + << + { c1 c1 } + \new Staff \with { + \remove "Time_signature_engraver" + } { + c,4^"ossia" es f fis g1 + } >> -} - \paper {raggedright= ##t} + c1 \break c c } + + %% solution 2 + \new Staff { R1*2 c,4^"ossia" es f fis g1 R1 * 3 } + >> + + + \paper { + raggedright= ##t + \translator {\RemoveEmptyStaffContext} + \translator { + \ScoreContext + \remove System_start_delimiter_engraver + } + } } diff --git a/input/test/piano-staff-distance.ly b/input/test/piano-staff-distance.ly index e0d6e5b3cb..98bbcf02ad 100644 --- a/input/test/piano-staff-distance.ly +++ b/input/test/piano-staff-distance.ly @@ -8,17 +8,17 @@ this at home. " } -\version "2.1.24" +\version "2.1.25" #(define ((futz-alignment-callback distance count) grob axis) "Check if we're the system number COUNT, and if yes, set fixed distance to DISTANCE; then call the original callback. " (let* - ((a (ly:get-parent grob axis)) - (o (ly:get-original a)) + ((a (ly:grob-parent grob axis)) + (o (ly:grob-original a)) (bs (if (ly:grob? o) - (ly:get-broken-into o) + (ly:spanner-broken-into o) #f)) ) diff --git a/input/test/polymetric-differing-notes.ly b/input/test/polymetric-differing-notes.ly index aaebb712e0..b459b95ff1 100644 --- a/input/test/polymetric-differing-notes.ly +++ b/input/test/polymetric-differing-notes.ly @@ -1,4 +1,4 @@ -\version "2.1.22" +\version "2.1.25" \header{ texidoc=" diff --git a/input/test/reverse-music.ly b/input/test/reverse-music.ly index 1b14a4a0a4..79008c14d6 100644 --- a/input/test/reverse-music.ly +++ b/input/test/reverse-music.ly @@ -1,5 +1,5 @@ -\version "2.1.22" +\version "2.1.25" % possible rename to scheme-something. \header { texidoc="@cindex Scheme Reverse Music Simple customised music apply. " diff --git a/input/test/smart-transpose.ly b/input/test/smart-transpose.ly index c646cebc2d..cb2d0e88f3 100644 --- a/input/test/smart-transpose.ly +++ b/input/test/smart-transpose.ly @@ -1,5 +1,5 @@ -\version "1.9.6" +\version "2.1.25" \header { texidoc="@cindex Smart Transpose @@ -26,13 +26,15 @@ how useful these enharmonic modifications are. Mats B. (n (ly:pitch-notename p))) (cond - ((and (> a 1) (or (eq? n 6) (eq? n 2))) - (set! a (- a 2)) (set! n (+ n 1))) - ((and (< a -1) (or (eq? n 0) (eq? n 3))) - (set! a (+ a 2)) (set! n (- n 1)))) + ((and (> a 2) (or (eq? n 6) (eq? n 2))) + (set! a (- a 2)) + (set! n (+ n 1))) + ((and (< a -2) (or (eq? n 0) (eq? n 3))) + (set! a (+ a 2)) + (set! n (- n 1)))) (cond - ((eq? a 4) (set! a 0) (set! n (+ n 1))) + ((eq? a 4) (set! a 0) (set! n (+ n 1))) ((eq? a -4) (set! a 0) (set! n (- n 1)))) (if (< n 0) (begin (set! o (- o 1)) (set! n (+ n 7)))) diff --git a/input/test/spanner-after-break-tweak.ly b/input/test/spanner-after-break-tweak.ly index df76d873f2..f24fa692a3 100644 --- a/input/test/spanner-after-break-tweak.ly +++ b/input/test/spanner-after-break-tweak.ly @@ -1,5 +1,5 @@ -\version "2.1.22" +\version "2.1.25" \header { texidoc = "@cindex Spanner after break @@ -11,8 +11,8 @@ after the line break is moved around. " #(define (my-callback grob) (let* ( - (o (ly:get-original grob)) - (b (if (ly:grob? o) (ly:get-broken-into o) '() )) + (o (ly:grob-original grob)) + (b (if (ly:grob? o) (ly:spanner-broken-into o) '() )) ) ;; Call the equivalent of Tie::after_line_breaking diff --git a/lily/grob-scheme.cc b/lily/grob-scheme.cc index ca3c5ef046..2906d08dd5 100644 --- a/lily/grob-scheme.cc +++ b/lily/grob-scheme.cc @@ -38,7 +38,7 @@ LY_DEFINE (ly_get_grob_property, return sc->internal_get_grob_property (sym); } -LY_DEFINE (spanner_get_bound, "ly:get-spanner-bound", 2 , 0, 0, +LY_DEFINE (spanner_get_bound, "ly:spanner-get-bound", 2 , 0, 0, (SCM slur, SCM dir), "Get one of the bounds of @var{spanner}. @var{dir} is @code{-1} " "for left, and @code{1} for right.") @@ -49,19 +49,6 @@ LY_DEFINE (spanner_get_bound, "ly:get-spanner-bound", 2 , 0, 0, return sl->get_bound (to_dir (dir))->self_scm (); } -/* TODO: make difference between scaled and unscalead variable in - calling (i.e different funcs.) */ -LY_DEFINE (ly_get_paper_var,"ly:get-paper-variable", 2, 0, 0, - (SCM grob, SCM sym), - "Get a variable from the \\paper block.") -{ - Grob * sc = unsmob_grob (grob); - SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob"); - SCM_ASSERT_TYPE (gh_symbol_p (sym), sym, SCM_ARG2, __FUNCTION__, "symbol"); - - return sc->get_paper () ->lookup_variable (sym); -} - /* TODO: make difference between scaled and unscalead variable in calling (i.e different funcs.) */ LY_DEFINE (ly_grob_paper,"ly:grob-paper", 1, 0, 0, @@ -77,7 +64,7 @@ LY_DEFINE (ly_grob_paper,"ly:grob-paper", 1, 0, 0, -LY_DEFINE (ly_get_extent, "ly:get-extent", 3, 0, 0, +LY_DEFINE (ly_get_extent, "ly:grob-extent", 3, 0, 0, (SCM grob, SCM refp, SCM axis), "Get the extent in @var{axis} direction of @var{grob} relative to " "the grob @var{refp}") @@ -92,7 +79,7 @@ LY_DEFINE (ly_get_extent, "ly:get-extent", 3, 0, 0, return ly_interval2scm ( sc->extent (ref, Axis (gh_scm2int (axis)))); } -LY_DEFINE (ly_get_parent, "ly:get-parent", 2, 0, 0, (SCM grob, SCM axis), +LY_DEFINE (ly_get_parent, "ly:grob-parent", 2, 0, 0, (SCM grob, SCM axis), "Get the parent of @var{grob}. @var{axis} is 0 for the X-axis, " "1 for the Y-axis.") { @@ -105,7 +92,7 @@ LY_DEFINE (ly_get_parent, "ly:get-parent", 2, 0, 0, (SCM grob, SCM axis), } LY_DEFINE (ly_get_system, - "ly:get-system", + "ly:grob-system", 1, 0, 0, (SCM grob), "Return the System Grob of @var{grob}.") { @@ -119,7 +106,7 @@ LY_DEFINE (ly_get_system, } LY_DEFINE (ly_get_original, - "ly:get-original", + "ly:grob-original", 1, 0, 0, (SCM grob), "Return the unbroken original Grob of @var{grob}.") { @@ -134,7 +121,7 @@ LY_DEFINE (ly_get_original, logical for this list? */ LY_DEFINE (get_broken_into, - "ly:get-broken-into", 1, 0, 0, (SCM spanner), + "ly:spanner-broken-into", 1, 0, 0, (SCM spanner), "Return broken-into list for @var{spanner}.") { /// Spanner *me = unsmob_spanner (spanner); diff --git a/lily/note-spacing.cc b/lily/note-spacing.cc index 6a8600e7d4..fca28671ee 100644 --- a/lily/note-spacing.cc +++ b/lily/note-spacing.cc @@ -140,17 +140,22 @@ Note_spacing::get_spacing (Grob *me, Item* right_col, */ *space = (base_space - increment) + *fixed ; - if (Item::breakable_b (right_col) - || right_col->original_) + if (!extents[RIGHT].is_empty () + && (Item::breakable_b (right_col) + || right_col->original_)) { /* This is for the situation rest | 3/4 (eol) - + + Since we only take half of the right-object space above, the + barline will bump into the notes preceding it, if the right + thing is big. We add the rest of the extents here: */ - *space += -extents[RIGHT][LEFT]; - *fixed += -extents[RIGHT][LEFT]; + + *space += -extents[RIGHT][LEFT] / 2; + *fixed += -extents[RIGHT][LEFT] / 2; } stem_dir_correction (me, right_col, increment, space, fixed); diff --git a/lily/span-bar.cc b/lily/span-bar.cc index 97e581e938..9e289e452e 100644 --- a/lily/span-bar.cc +++ b/lily/span-bar.cc @@ -176,17 +176,16 @@ Span_bar::evaluate_empty (Grob*me) void Span_bar::evaluate_glyph (Grob*me) { - SCM elts = me->get_grob_property ("elements"); - SCM glyph_symbol = ly_symbol2scm ("glyph"); - SCM gl = SCM_EOL; + SCM gl = me->get_grob_property ("glyph"); - while (gh_pair_p (elts)) + if (gh_string_p (gl)) + return ; + + for (SCM s = me->get_grob_property ("elements"); + !gh_string_p (gl) && gh_pair_p (s); s = gh_cdr (s)) { - gl = unsmob_grob (gh_car (elts)) - ->internal_get_grob_property (glyph_symbol); - if (gh_string_p (gl)) - break; - elts =gh_cdr (elts); + gl = unsmob_grob (gh_car (s)) + ->get_grob_property ("glyph"); } if (!gh_string_p (gl)) @@ -210,9 +209,9 @@ Span_bar::evaluate_glyph (Grob*me) } gl = scm_makfrom0str (type.to_str0 ()); - if (scm_equal_p (me->internal_get_grob_property (glyph_symbol), gl) + if (scm_equal_p (me->get_grob_property ("glyph"), gl) != SCM_BOOL_T) - me->internal_set_grob_property (glyph_symbol, gl); + me->set_grob_property ("glyph", gl); } Interval diff --git a/ly/init.ly b/ly/init.ly index bf9fc9f2e2..ea1d75d85e 100644 --- a/ly/init.ly +++ b/ly/init.ly @@ -4,7 +4,7 @@ #(define-public midi-debug #f) -\version "2.1.22" +\version "2.1.25" \include "declarations-init.ly" diff --git a/scm/music-functions.scm b/scm/music-functions.scm index 34b02c98c8..0f61658f52 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -507,6 +507,8 @@ Rest can contain a list of beat groupings voicify-list :: [ [Music ] ] -> number -> [Music] LST is a list music-lists. + + NUMBER is 0-base, i.e. Voice=1 (upstems) has number 0. " (if (null? lst) '() @@ -516,7 +518,7 @@ Rest can contain a list of beat groupings (make-voice-props-set number) (make-simultaneous-music (car lst)))) - 'Voice (number->string number)) + 'Voice (number->string (1+ number))) (voicify-list (cdr lst) (1+ number)) )) ) @@ -530,7 +532,7 @@ Rest can contain a list of beat groupings ch )) -(define (voicify-music m) +(define-public (voicify-music m) "Recursively split chords that are separated with \\ " (if (not (ly:music? m)) diff --git a/scm/slur.scm b/scm/slur.scm index 355ed0dce5..0a7ea00cd3 100644 --- a/scm/slur.scm +++ b/scm/slur.scm @@ -11,7 +11,7 @@ (col (if (= dir 1) (car note-columns) (car (last-pair note-columns)))) (stem (ly:get-grob-property col 'stem))) (and - (eq? col (ly:get-spanner-bound slur dir)) + (eq? col (ly:spanner-get-bound slur dir)) (ly:grob? stem) (ly:get-grob-property stem 'heads)))) diff --git a/scm/stencil.scm b/scm/stencil.scm index 81869ae7f2..146a72c3ab 100644 --- a/scm/stencil.scm +++ b/scm/stencil.scm @@ -56,8 +56,8 @@ "Make a box of exactly the extents of the grob. The box precisely encloses the contents. " - (let* ((xext (ly:get-extent grob grob 0)) - (yext (ly:get-extent grob grob 1)) + (let* ((xext (ly:grob-extent grob grob 0)) + (yext (ly:grob-extent grob grob 1)) (thick 0.1)) (ly:stencil-add (make-filled-box-stencil xext (cons (- (car yext) thick) (car yext) )) diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py index a6d4d1aeae..db8c3b5ac9 100644 --- a/scripts/convert-ly.py +++ b/scripts/convert-ly.py @@ -1898,6 +1898,21 @@ def conv (str): conversions.append (((2,1,24), conv, """music-list? -> ly:music-list?""")) +def conv (str): + str = re.sub (r'ly:get-spanner-bound', 'ly:spanner-get-bound', str) + str = re.sub (r'ly:get-extent', 'ly:grob-extent', str) + str = re.sub (r'ly:get-system', 'ly:grob-system', str) + str = re.sub (r'ly:get-original', 'ly:grob-original', str) + str = re.sub (r'ly:get-parent', 'ly:grob-parent', str) + str = re.sub (r'ly:get-broken-into', 'ly:spanner-broken-into', str) + str = re.sub (r'Melisma_engraver', 'Melisma_translator', str) + if re.search ("ly:get-paper-variable", str): + sys.stderr.write ('use (ly:paper-lookup (ly:grob-paper ))') + raise FatalConversionError() + return str + +conversions.append (((2,1,25), conv, """Scheme grob function renaming""")) + ################################ # END OF CONVERSIONS -- 2.39.2