From 79eed18f68000e30c5cabaf2f5d0048dda0cb080 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Mon, 17 Oct 2005 15:34:55 +0000 Subject: [PATCH] * Documentation/topdocs/NEWS.tely (Top): mention John Mandereau. (Top): document #'callbacks. (Top): document nested \override. * input/regression/figured-bass.ly: update for slash and pluses. * input/regression/figured-bass-continuation-forbid.ly (Module): new file. * scm/translation-functions.scm (format-new-bass-figure): use slashed-digit if diminished is set. (format-new-bass-figure): add + if 'augmented is set. * scm/define-markup-commands.scm (slashed-digit): new command slashed-digit. * input/test/piano-staff-distance.ly: remove file. * Documentation/user/advanced-notation.itely (Formatting cue notes): use length-fraction for making stems/beams smaller. * lily/parser.yy (bass_figure): accept \+ \! and / as figured bass modifications. * lily/new-figured-bass-engraver.cc: new property centerFiguredBassContinuations * Documentation/user/changing-defaults.itely (Difficult tweaks): use callbacks. * python/convertrules.py (FatalConversionError.subber): conversion rule for #'callbacks * lily/parser.yy (music_property_def): allow \override #'a #'b = #c too. --- ChangeLog | 26 +++++++ Documentation/topdocs/NEWS.tely | 60 +++++++++++----- Documentation/user/advanced-notation.itely | 5 +- Documentation/user/changing-defaults.itely | 1 - .../figured-bass-continuation-center.ly | 6 +- .../figured-bass-continuation-forbid.ly | 14 ++++ input/regression/figured-bass.ly | 7 +- input/test/+.ly | 2 +- input/test/add-staccato.ly | 2 +- input/test/add-text-script.ly | 2 +- input/test/ambitus-mixed.ly | 2 +- input/test/ancient-accidentals.ly | 2 +- input/test/ancient-font.ly | 2 +- input/test/ancient-time.ly | 2 +- input/test/bar-always.ly | 2 +- input/test/bar-lines-lyric-only.ly | 4 +- input/test/bar-lines.ly | 2 +- input/test/bar-number-every-five-reset.ly | 2 +- input/test/bar-number-regular-interval.ly | 6 +- input/test/bar-number-show-all.ly | 2 +- input/test/beam-alternate.ly | 2 +- input/test/beam-auto-4-8.ly | 2 +- input/test/beam-auto-override.ly | 2 +- input/test/beam-control.ly | 2 +- input/test/beam-count.ly | 2 +- input/test/boxed-stencil.ly | 11 +-- input/test/caps.ly | 2 +- input/test/chord-names-jazz.ly | 2 +- input/test/chord-names-languages.ly | 2 +- input/test/circle.ly | 4 +- input/test/compound-time.ly | 4 +- input/test/coriolan-margin.ly | 2 +- input/test/divisiones.ly | 2 +- input/test/dynamic-extra.ly | 2 +- input/test/embedded-postscript.ly | 2 +- input/test/engraver-contexts.ly | 2 +- input/test/engraver-example.ily | 2 +- input/test/engraver-one-by-one.ly | 2 +- input/test/extra-staff.ly | 2 +- input/test/fret-diagram.ly | 2 +- input/test/gregorian-scripts.ly | 2 +- input/test/header-ifelse.ly | 2 +- input/test/hymn.ly | 2 +- input/test/instrument-name-grandstaff.ly | 2 +- input/test/ligature-vaticana.ly | 2 +- input/test/lilypond-testpage.ly | 2 +- input/test/mensural-ligatures.ly | 2 +- input/test/mensural-note-heads.ly | 2 +- input/test/move-specific-text.ly | 2 +- input/test/music-box.ly | 4 +- input/test/music-creation.ly | 2 +- input/test/no-bar-lines.ly | 2 +- input/test/no-key-at-end-of-line.ly | 2 +- input/test/ossia.ly | 2 +- input/test/partial-blank.ly | 2 +- input/test/piano-staff-distance.ly | 68 ------------------- input/test/preset-extent.ly | 2 +- input/test/rests.ly | 2 +- input/test/reverse-music.ly | 2 +- input/test/script-abbreviations.ly | 2 +- input/test/script-chart.ly | 2 +- input/test/slur-manual.ly | 2 +- input/test/slur-minimum-length.ly | 2 +- input/test/smart-transpose.ly | 2 +- input/test/spacing-optical.ly | 2 +- input/test/staff-bracket.ly | 2 +- input/test/staff-container.ly | 2 +- input/test/staff-lines.ly | 2 +- input/test/staff-size.ly | 2 +- input/test/stem-extend.ly | 2 +- input/test/tablature-hammer.ly | 2 +- input/test/temporary-stave.ly | 2 +- input/test/text-rotate.ly | 2 +- input/test/text-spanner.ly | 2 +- input/test/time-signature-staff.ly | 2 +- input/test/unfold-all-repeats.ly | 2 +- input/test/version-output.ly | 2 +- input/test/vertical-extent.ly | 2 +- input/test/volta-chord-names.ly | 2 +- lily/grob-array-scheme.cc | 41 +++++++++++ lily/lexer.ll | 2 + lily/new-figured-bass-engraver.cc | 14 ++-- lily/parser.yy | 43 +++++++++--- ly/engraver-init.ly | 3 +- python/convertrules.py | 7 ++ scm/define-context-properties.scm | 1 + scm/define-grobs.scm | 9 ++- scm/define-markup-commands.scm | 41 +++++++++++ scm/define-music-properties.scm | 2 + scm/translation-functions.scm | 18 ++++- 90 files changed, 334 insertions(+), 197 deletions(-) create mode 100644 input/regression/figured-bass-continuation-forbid.ly delete mode 100644 input/test/piano-staff-distance.ly create mode 100644 lily/grob-array-scheme.cc diff --git a/ChangeLog b/ChangeLog index 1776338107..1d794b1680 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,31 @@ 2005-10-17 Han-Wen Nienhuys + * Documentation/topdocs/NEWS.tely (Top): mention John Mandereau. + (Top): document #'callbacks. + (Top): document nested \override. + + * input/regression/figured-bass.ly: update for slash and pluses. + + * input/regression/figured-bass-continuation-forbid.ly (Module): + new file. + + * scm/translation-functions.scm (format-new-bass-figure): use + slashed-digit if diminished is set. + (format-new-bass-figure): add + if 'augmented is set. + + * scm/define-markup-commands.scm (slashed-digit): new command slashed-digit. + + * input/test/piano-staff-distance.ly: remove file. + + * Documentation/user/advanced-notation.itely (Formatting cue + notes): use length-fraction for making stems/beams smaller. + + * lily/parser.yy (bass_figure): accept \+ \! and / as figured bass + modifications. + + * lily/new-figured-bass-engraver.cc: new property + centerFiguredBassContinuations + * Documentation/user/changing-defaults.itely (Difficult tweaks): use callbacks. diff --git a/Documentation/topdocs/NEWS.tely b/Documentation/topdocs/NEWS.tely index 4cac0ab25d..69e6e4a243 100644 --- a/Documentation/topdocs/NEWS.tely +++ b/Documentation/topdocs/NEWS.tely @@ -46,7 +46,47 @@ This document is also available in @uref{NEWS.pdf,PDF}. @itemize @bullet @item -Major internal cleanups. +Support for figured bass has been rewritten. Now it supports +continuation lines, slashed figures, and its figures, brackets, and alignments may +tuned separately. + +@lilypond[raggedright,fragment] +<< +\relative { c4 c c c } +\figures { + \set useBassFigureExtenders = ##t + <6+ 4 3> <6 4 3> <4 3+> <5/ 7/\+> +} >> +@end lilypond + +This rewrite was sponsored by Trent Johnston and John Mandereau. + +@item +Major internal cleanups: for each grob, a subproperty in +@code{callbacks} property defines the procedure which computes it. + +@verbatim +\override Beam #'callbacks #'direction + = #(lambda (grob) + (if (4 > (ly:grob-array-length (ly:grob-object 'stems))) + DOWN + UP)) +@end verbatim + +@noindent +With this code fragment, the direction of a beam is decided to be up +or down, depending on the number of stems in the beam. + +@item +Subproperties, like the @code{details} field of @code{Slur} and +@code{Tie} may now be tuned with @code{\override}. For example, + +@verbatim +\override Stem #'details #'beamed-lengths = #'(4 4 3) +@end verbatim + +@noindent +shortens the stems in beams. @item The default paper size may now be set from the command line using @@ -69,21 +109,7 @@ Beamlets may stick out of the side of beams. This feature was sponsored by Trevor Bača. -@item -Support for figured bass has been rewritten. Now it supports -continuation lines, and its figures, brackets, and alignments may -tuned separately. - -@lilypond[raggedright,fragment] -<< -\relative { c4 c c c } -\figures { - \set useBassFigureExtenders = ##t - <6+ 4 3> <6 4 3> <4 3+> -} >> -@end lilypond -This rewrite was sponsored by Trent Johnston. @item Vertical alignments of staves can now be tuned easily for individual @@ -156,10 +182,10 @@ This feature was sponsored by Aaron Mehl. @item Texts over multi measure rests can stretch the corresponding measure, -if the appropriate @code{spacing-procedure} property is set. +if the appropriate @code{spring-and-rods} callback is set. @lilypond[relative=2,fragment,raggedright] -\override MultiMeasureRestText #'spacing-procedure +\override MultiMeasureRestText #'callbacks #'springs-and-rods = #Multi_measure_rest::set_text_rods c1 R1 R1^"Very long long long text" @end lilypond diff --git a/Documentation/user/advanced-notation.itely b/Documentation/user/advanced-notation.itely index a201da7a21..42f34ba89d 100644 --- a/Documentation/user/advanced-notation.itely +++ b/Documentation/user/advanced-notation.itely @@ -1392,10 +1392,9 @@ first or second voice. @lilypond[verbatim,raggedright] smaller = { \set fontSize = #-2 - \override Stem #'length = #5.5 + \override Stem #'length-fraction = #0.8 \override Beam #'thickness = #0.384 - \override Beam #'space-function = - #(lambda (beam mult) (* 0.8 (Beam::space_function beam mult))) + \override Beam #'length-fraction = #0.8 } \addquote clarinet \relative { diff --git a/Documentation/user/changing-defaults.itely b/Documentation/user/changing-defaults.itely index a4a03db479..9af5cee059 100644 --- a/Documentation/user/changing-defaults.itely +++ b/Documentation/user/changing-defaults.itely @@ -1329,7 +1329,6 @@ of the broken tie is translated up. c1 ~ \break c2 ~ c } @end lilypond -@end ignore @noindent When applying this trick, the new @code{after-line-breaking} callback diff --git a/input/regression/figured-bass-continuation-center.ly b/input/regression/figured-bass-continuation-center.ly index 7ab4f356bc..4570709d7c 100644 --- a/input/regression/figured-bass-continuation-center.ly +++ b/input/regression/figured-bass-continuation-center.ly @@ -1,7 +1,8 @@ \header { - texidoc = "Pairs of congruent figured bass extender lines are vertically centered. - " + texidoc = "Pairs of congruent figured bass extender lines are +vertically centered if @code{figuredBassCenterContinuations} is set to +true." } @@ -18,6 +19,7 @@ } \figures { \set useBassFigureExtenders = ##t + \set figuredBassCenterContinuations = ##t <6+ 4 3>4 <6 4 3> r <6+ 4 3>4 <6 4 3> <4 3+> r } diff --git a/input/regression/figured-bass-continuation-forbid.ly b/input/regression/figured-bass-continuation-forbid.ly new file mode 100644 index 0000000000..749c875e22 --- /dev/null +++ b/input/regression/figured-bass-continuation-forbid.ly @@ -0,0 +1,14 @@ +\header { + + texidoc = "By adorning a bass figure with @code{\\!}, an extender + may be forbidden. " + +} +\version "2.7.13" +\paper { raggedright = ##t } + +\figures { + \set useBassFigureExtenders = ##t + <4 6 7> + <4\! 6 7-> + } diff --git a/input/regression/figured-bass.ly b/input/regression/figured-bass.ly index ba2aa73ea1..1cddfbabd9 100644 --- a/input/regression/figured-bass.ly +++ b/input/regression/figured-bass.ly @@ -6,10 +6,9 @@ texidoc = " Figured bass is created by the FiguredBass context which responds to figured bass events and rest events. You must enter these using the special @code{\figuremode @{ @}} mode, which allows you to -type numbers, like @code{<4 6+>}. +type numbers, like @code{<4 6+>} and add slashes and pluses. -You can also enter markup strings. The vertical alignment may also be -tuned. +You can also enter markup strings. The vertical alignment may also be tuned. " @@ -28,7 +27,7 @@ tuned. } \figures { <3 [5 7]> - <3 [5] 7 [9 11]> + <3\+ [5/] 7/ [9 11]> <3+ 5- 7!> <3 _! 5 _- 7> <3 _ 5 _ 7> diff --git a/input/test/+.ly b/input/test/+.ly index 6761780e2c..e97bccab4b 100644 --- a/input/test/+.ly +++ b/input/test/+.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" %% +.ly: Be the first .ly file for lys-to-tely.py. %% Better to make lys-to-tely.py include "introduction.texi" or %% other .texi documents too? diff --git a/input/test/add-staccato.ly b/input/test/add-staccato.ly index 841569a533..d900c693d0 100644 --- a/input/test/add-staccato.ly +++ b/input/test/add-staccato.ly @@ -1,5 +1,5 @@ -\version "2.7.10" +\version "2.7.13" \header { diff --git a/input/test/add-text-script.ly b/input/test/add-text-script.ly index fe532957ae..ed08cbfb8e 100644 --- a/input/test/add-text-script.ly +++ b/input/test/add-text-script.ly @@ -1,4 +1,4 @@ -\version "2.7.10" +\version "2.7.13" \header { texidoc= "@cindex make-music Fingering diff --git a/input/test/ambitus-mixed.ly b/input/test/ambitus-mixed.ly index 775d039c01..ef94123d5e 100644 --- a/input/test/ambitus-mixed.ly +++ b/input/test/ambitus-mixed.ly @@ -6,7 +6,7 @@ ambitus must be moved manually to prevent collisions." } -\version "2.6.0" +\version "2.7.13" \layout { raggedright = ##t diff --git a/input/test/ancient-accidentals.ly b/input/test/ancient-accidentals.ly index e5064c5583..cde3b5151e 100644 --- a/input/test/ancient-accidentals.ly +++ b/input/test/ancient-accidentals.ly @@ -6,7 +6,7 @@ are collected here. " } -\version "2.6.0" +\version "2.7.13" \relative c'' { \time 5/4 diff --git a/input/test/ancient-font.ly b/input/test/ancient-font.ly index e5245d52c3..94dc8f238b 100644 --- a/input/test/ancient-font.ly +++ b/input/test/ancient-font.ly @@ -1,4 +1,4 @@ -\version "2.7.10" +\version "2.7.13" % TODO: split ancient-font into seperate files; possibly in % different locations. \header { diff --git a/input/test/ancient-time.ly b/input/test/ancient-time.ly index bd14b805fa..2864bd31f5 100644 --- a/input/test/ancient-time.ly +++ b/input/test/ancient-time.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" % TODO: move stuff from ancient-font into here? See comment % for ancient-font.ly \header { diff --git a/input/test/bar-always.ly b/input/test/bar-always.ly index dd8050814d..fa1d1f2c07 100644 --- a/input/test/bar-always.ly +++ b/input/test/bar-always.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc = "@cindex Bars Always diff --git a/input/test/bar-lines-lyric-only.ly b/input/test/bar-lines-lyric-only.ly index c54f071212..36f9aaeb12 100644 --- a/input/test/bar-lines-lyric-only.ly +++ b/input/test/bar-lines-lyric-only.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc = "@cindex Bar line lyric only You can move @code{Bar_engraver} and @code{Span_bar_engraver} to a different engraving context, if you want, for example, bar lines @@ -23,7 +23,7 @@ on lyrics. " %% need procedure, since lyrics doesn't have a staff_sym engraver. - \override BarLine #'bar-size-procedure = #(lambda (x) 3.0) + \override BarLine #'bar-size = #3.0 } \context{ \ChoirStaff diff --git a/input/test/bar-lines.ly b/input/test/bar-lines.ly index 50d7cb2c52..f11cd38cae 100644 --- a/input/test/bar-lines.ly +++ b/input/test/bar-lines.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" \header { diff --git a/input/test/bar-number-every-five-reset.ly b/input/test/bar-number-every-five-reset.ly index 9fbb860115..bef5bf563c 100644 --- a/input/test/bar-number-every-five-reset.ly +++ b/input/test/bar-number-every-five-reset.ly @@ -1,4 +1,4 @@ -\version "2.7.10" +\version "2.7.13" \header { texidoc = "@cindex Bar Number Every Fifth Reset diff --git a/input/test/bar-number-regular-interval.ly b/input/test/bar-number-regular-interval.ly index e151da304c..3d88af7b93 100644 --- a/input/test/bar-number-regular-interval.ly +++ b/input/test/bar-number-regular-interval.ly @@ -5,18 +5,18 @@ Bar numbers can be printed at regular intervals, inside a box or a circle. " } -\version "2.6.0" +\version "2.7.13" \relative c'{ \override Score.BarNumber #'break-visibility = #end-of-line-invisible \set Score.barNumberVisibility = #(every-nth-bar-number-visible 4) \override Score.BarNumber #'font-size = #2 - \override Score.BarNumber #'print-function + \override Score.BarNumber #'callbacks #'stencil = #(make-stencil-boxer 0.1 0.25 Text_interface::print) \repeat unfold 5 { c1 } \bar "|" - \override Score.BarNumber #'print-function + \override Score.BarNumber #'callbacks #'stencil = #(make-stencil-circler 0.1 0.25 Text_interface::print) \repeat unfold 4 { c1 } \bar "|." } diff --git a/input/test/bar-number-show-all.ly b/input/test/bar-number-show-all.ly index 034f120165..47c9b003b3 100644 --- a/input/test/bar-number-show-all.ly +++ b/input/test/bar-number-show-all.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" \header{ texidoc="@cindex Bar Number Show All By default, bar numbers are printed only in the first measure. This diff --git a/input/test/beam-alternate.ly b/input/test/beam-alternate.ly index d20b040d9a..9262aca9e2 100644 --- a/input/test/beam-alternate.ly +++ b/input/test/beam-alternate.ly @@ -8,7 +8,7 @@ } -\version "2.6.0" +\version "2.7.13" wipeNote = { \once \override NoteHead #'transparent = ##t diff --git a/input/test/beam-auto-4-8.ly b/input/test/beam-auto-4-8.ly index 3ed084550f..bc57c18286 100644 --- a/input/test/beam-auto-4-8.ly +++ b/input/test/beam-auto-4-8.ly @@ -1,5 +1,5 @@ -%% \version "2.6.0" +%% \version "2.7.13" %% keep for now, although merging into beam-auto-override is a possibility. \header { diff --git a/input/test/beam-auto-override.ly b/input/test/beam-auto-override.ly index 7de434428a..621de6836a 100644 --- a/input/test/beam-auto-override.ly +++ b/input/test/beam-auto-override.ly @@ -1,6 +1,6 @@ %% ugh -%% \version "2.6.0" +%% \version "2.7.13" \header { diff --git a/input/test/beam-control.ly b/input/test/beam-control.ly index c291893ec0..45ae760db4 100644 --- a/input/test/beam-control.ly +++ b/input/test/beam-control.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" \header{ texidoc="@cindex Beam Position Control diff --git a/input/test/beam-count.ly b/input/test/beam-count.ly index 8b6f4b1a7b..73e8e599f6 100644 --- a/input/test/beam-count.ly +++ b/input/test/beam-count.ly @@ -1,5 +1,5 @@ -%%\version "2.6.0" +%%\version "2.7.13" \header{ texidoc="@cindex Beam Count diff --git a/input/test/boxed-stencil.ly b/input/test/boxed-stencil.ly index aa5776f3e1..dc412bca9e 100644 --- a/input/test/boxed-stencil.ly +++ b/input/test/boxed-stencil.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc = "@cindex Boxed Stencil @@ -10,18 +10,19 @@ grob. " } \layout{raggedright = ##t} \relative c'' { - \override TextScript #'print-function = + \override TextScript #'callbacks #'stencil = #(make-stencil-boxer 0.1 0.3 Text_interface::print) c'4^"foo" - \override Stem #'print-function = + \override Stem #'callbacks #'stencil = #(make-stencil-boxer 0.05 0.25 Stem::print) - \override Score.RehearsalMark #'print-function = + \override Score.RehearsalMark #'callbacks #'stencil = #(make-stencil-boxer 0.15 0.3 Text_interface::print) b8 - \revert Stem #'print-function + \revert Stem #'callbacks % stencil + c4. c4 \mark "F" c1 } diff --git a/input/test/caps.ly b/input/test/caps.ly index 356fee7701..98e04ebb66 100644 --- a/input/test/caps.ly +++ b/input/test/caps.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc = "@cindex Capital Letters The font can be changed to small caps. diff --git a/input/test/chord-names-jazz.ly b/input/test/chord-names-jazz.ly index f15597cd2b..ebac8c13fb 100644 --- a/input/test/chord-names-jazz.ly +++ b/input/test/chord-names-jazz.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc = " Chord names are generated from a list pitches. The diff --git a/input/test/chord-names-languages.ly b/input/test/chord-names-languages.ly index 0701d6df95..e064a1e2de 100644 --- a/input/test/chord-names-languages.ly +++ b/input/test/chord-names-languages.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc = "@cindex Chord Names German The english naming of chords (default) can be changed to german diff --git a/input/test/circle.ly b/input/test/circle.ly index 57f7fca117..e80a28e9a7 100644 --- a/input/test/circle.ly +++ b/input/test/circle.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc = "@cindex Circle @@ -18,6 +18,6 @@ c1 \mark \default c2 d^\markup{\circle \finger "2"} \override Score.BarNumber #'break-visibility = #all-visible -\override Score.BarNumber #'print-function +\override Score.BarNumber #'callbacks #'stencil = #(make-stencil-circler 0.1 0.25 Text_interface::print) } \ No newline at end of file diff --git a/input/test/compound-time.ly b/input/test/compound-time.ly index 0bf588441a..cefeec507f 100644 --- a/input/test/compound-time.ly +++ b/input/test/compound-time.ly @@ -1,5 +1,5 @@ -\version "2.5.20" +\version "2.7.13" \header { texidoc = "@cindex compound time @cindex plus @@ -24,7 +24,7 @@ compound time. \relative { %% compound time signature hack \time 5/8 - \override Staff.TimeSignature #'print-function + \override Staff.TimeSignature #'callbacks #'stencil = #(lambda (grob) (compound-time grob "2" "3" "8")) #(override-auto-beam-setting '(end 1 8 5 8) 1 4) c8 c c8 c c diff --git a/input/test/coriolan-margin.ly b/input/test/coriolan-margin.ly index 24b1b55061..7b13ac7239 100644 --- a/input/test/coriolan-margin.ly +++ b/input/test/coriolan-margin.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" % Ugh, we need to override some LaTeX titling stuff diff --git a/input/test/divisiones.ly b/input/test/divisiones.ly index 1f2547aacc..d7c8db6b53 100644 --- a/input/test/divisiones.ly +++ b/input/test/divisiones.ly @@ -9,7 +9,7 @@ Choices are @code{divisioMinima}, @code{divisioMaior}, " } -\version "2.6.0" +\version "2.7.13" \include "gregorian-init.ly" diff --git a/input/test/dynamic-extra.ly b/input/test/dynamic-extra.ly index 3c40265812..eee42603ca 100644 --- a/input/test/dynamic-extra.ly +++ b/input/test/dynamic-extra.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" % probably should be merged into refman. \header{ texidoc = "@cindex Dynamic Piu Forte diff --git a/input/test/embedded-postscript.ly b/input/test/embedded-postscript.ly index 70de21e9b1..96662eb147 100644 --- a/input/test/embedded-postscript.ly +++ b/input/test/embedded-postscript.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" \header { diff --git a/input/test/engraver-contexts.ly b/input/test/engraver-contexts.ly index 2c6db58059..648c9e35e2 100644 --- a/input/test/engraver-contexts.ly +++ b/input/test/engraver-contexts.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc ="In polyphonic notation, many voices can share a staff: In diff --git a/input/test/engraver-example.ily b/input/test/engraver-example.ily index 63ea250917..f656243cab 100644 --- a/input/test/engraver-example.ily +++ b/input/test/engraver-example.ily @@ -1,5 +1,5 @@ %% texidoc = "Include file for engraver example." -\version "2.4.0" +\version "2.7.13" topVoice = \relative c' { \key d\major es8([ g] a[ fis]) diff --git a/input/test/engraver-one-by-one.ly b/input/test/engraver-one-by-one.ly index 694f84ac6b..f8ccf6389a 100644 --- a/input/test/engraver-one-by-one.ly +++ b/input/test/engraver-one-by-one.ly @@ -1,5 +1,5 @@ -\version "2.7.6" +\version "2.7.13" \header { texidoc = "The notation problem, creating a certain symbol, diff --git a/input/test/extra-staff.ly b/input/test/extra-staff.ly index a3ad74c574..20d28fcda4 100644 --- a/input/test/extra-staff.ly +++ b/input/test/extra-staff.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" % definitely wil be renamed to something. %{ diff --git a/input/test/fret-diagram.ly b/input/test/fret-diagram.ly index 583cf4da65..50f562ed38 100644 --- a/input/test/fret-diagram.ly +++ b/input/test/fret-diagram.ly @@ -3,7 +3,7 @@ texidoc = "Frets are supported as markup commands." } -\version "2.6.0" +\version "2.7.13" \score { << diff --git a/input/test/gregorian-scripts.ly b/input/test/gregorian-scripts.ly index 81b43fa1e4..71bb9d6836 100644 --- a/input/test/gregorian-scripts.ly +++ b/input/test/gregorian-scripts.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc = "@cindex Gregorian Scripts diff --git a/input/test/header-ifelse.ly b/input/test/header-ifelse.ly index d7f47e7236..e4448af31b 100644 --- a/input/test/header-ifelse.ly +++ b/input/test/header-ifelse.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" #(if (not (defined? 'pieceTagLine)) diff --git a/input/test/hymn.ly b/input/test/hymn.ly index ed428c8ce0..1fdabc642f 100644 --- a/input/test/hymn.ly +++ b/input/test/hymn.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc = " diff --git a/input/test/instrument-name-grandstaff.ly b/input/test/instrument-name-grandstaff.ly index 5a1a4cff89..a3329b8e8b 100644 --- a/input/test/instrument-name-grandstaff.ly +++ b/input/test/instrument-name-grandstaff.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc = "@cindex Instrument Name Grandstaff You can have a name for the whole @code{GrandStaff} in addition to individual @code{Staff}s. " } diff --git a/input/test/ligature-vaticana.ly b/input/test/ligature-vaticana.ly index 3f516d92ec..416380acd6 100644 --- a/input/test/ligature-vaticana.ly +++ b/input/test/ligature-vaticana.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc = "@cindex Ancient Vaticana Vaticana ligature uses four staff lines, special clef, and diff --git a/input/test/lilypond-testpage.ly b/input/test/lilypond-testpage.ly index f70ad73502..ba5fdffee7 100644 --- a/input/test/lilypond-testpage.ly +++ b/input/test/lilypond-testpage.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" % MERGE with title.ly -gp %{ diff --git a/input/test/mensural-ligatures.ly b/input/test/mensural-ligatures.ly index 70c9a5636e..d6158ba75f 100644 --- a/input/test/mensural-ligatures.ly +++ b/input/test/mensural-ligatures.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" % TODO: % check with ancient- stuff. rename, merge, something. -gp diff --git a/input/test/mensural-note-heads.ly b/input/test/mensural-note-heads.ly index a5a4a30b33..09485c537c 100644 --- a/input/test/mensural-note-heads.ly +++ b/input/test/mensural-note-heads.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc ="@cindex Ancient Mensural Note Heads diff --git a/input/test/move-specific-text.ly b/input/test/move-specific-text.ly index a82b6bdeee..65b631b3a8 100644 --- a/input/test/move-specific-text.ly +++ b/input/test/move-specific-text.ly @@ -1,5 +1,5 @@ -\version "2.7.10" +\version "2.7.13" % possible rename to scheme- or something like that. -gp \header { texidoc = "@cindex Scheme Move Text Objects, like text, can be moved around by using some Scheme code. diff --git a/input/test/music-box.ly b/input/test/music-box.ly index 47b2cfdd18..70a47f6b36 100644 --- a/input/test/music-box.ly +++ b/input/test/music-box.ly @@ -1,4 +1,4 @@ -\version "2.7.10" +\version "2.7.13" \include "deutsch.ly" % possible rename to scheme- something. -gp % TODO: ask if it needs to have so many empty bars in the middle. -gp @@ -53,7 +53,7 @@ using Scheme functions to avoid typing work. " } -\version "2.7.10" +\version "2.7.13" pat = \transpose c c' \repeat unfold 2 { << { \context Staff = "up" {r8 e16 f g e f g } } diff --git a/input/test/music-creation.ly b/input/test/music-creation.ly index 3075eecfd4..b5fac5e960 100644 --- a/input/test/music-creation.ly +++ b/input/test/music-creation.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" % possible rename to scheme- something. -gp \header { texidoc = "@cindex Scheme Music Creation diff --git a/input/test/no-bar-lines.ly b/input/test/no-bar-lines.ly index 7cb4a6b65b..4355abdd98 100644 --- a/input/test/no-bar-lines.ly +++ b/input/test/no-bar-lines.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" % possible rename to bar-lines-foo. -gp \header{ texidoc = "@cindex Bar Lines Remove diff --git a/input/test/no-key-at-end-of-line.ly b/input/test/no-key-at-end-of-line.ly index b3fa4cd25d..d036d86e9e 100644 --- a/input/test/no-key-at-end-of-line.ly +++ b/input/test/no-key-at-end-of-line.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc = "@cindex Key Signature End of Line diff --git a/input/test/ossia.ly b/input/test/ossia.ly index 00535b076e..d73e3efa1a 100644 --- a/input/test/ossia.ly +++ b/input/test/ossia.ly @@ -2,7 +2,7 @@ \header { texidoc = "Ossia fragments can be done with starting and stopping staves. " } -\version "2.6.0" +\version "2.7.13" \paper { raggedright = ##t } << diff --git a/input/test/partial-blank.ly b/input/test/partial-blank.ly index 0b444e3fe1..d6fd42ae1a 100644 --- a/input/test/partial-blank.ly +++ b/input/test/partial-blank.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" % check with invisible-notes or blank-notes. possible rename. -gp \header{ texidoc = "@cindex Partial Blank When entering partially typeset music (i.e. for students to be diff --git a/input/test/piano-staff-distance.ly b/input/test/piano-staff-distance.ly deleted file mode 100644 index bfd2ed54f0..0000000000 --- a/input/test/piano-staff-distance.ly +++ /dev/null @@ -1,68 +0,0 @@ - -\header -{ - - texidoc = "It is possible to have different staff distances between -the staffs of a piano system, but it requires some advanced Scheme code. -Currently, this is for testing purposes. " - -} - -\version "2.6.0" - -#(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:grob-parent grob axis)) - (o (ly:grob-original a)) - (bs (if (ly:grob? o) - (ly:spanner-broken-into o) - #f)) - ) - - - (if (and (list? bs) - (< count (length bs)) - (equal? (list-ref bs count) a) - ) - (ly:grob-set-property! a 'forced-distance distance)) - - (Align_interface::fixed_distance_alignment_callback grob axis)) ) - -\score { - \relative c'' \context PianoStaff - \with { - verticalAlignmentChildCallback = #(futz-alignment-callback 20 1) - - %% Every cross staff beam will trigger - %% alignment unless autokneeing is switched off - \override Beam #'auto-knee-gap = #'() - } << - - \context Staff = "up" { - - \time 2/4 - c8[ - \change Staff = down - \once \override Stem #'direction = #UP - c8 - \change Staff = up - c c ]( - | - \break - - c8[) - \change Staff = down - \once \override Stem #'direction = #UP - c8 - \change Staff = up - c c ]( - } - \context Staff = "down" { - \skip 1 } - - >> - \layout { raggedright = ##T } -} diff --git a/input/test/preset-extent.ly b/input/test/preset-extent.ly index c608a35d04..1266112761 100644 --- a/input/test/preset-extent.ly +++ b/input/test/preset-extent.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc = " @cindex Preset Extent diff --git a/input/test/rests.ly b/input/test/rests.ly index cbcc9de4ec..987da8a86d 100644 --- a/input/test/rests.ly +++ b/input/test/rests.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc = "@cindex Rests diff --git a/input/test/reverse-music.ly b/input/test/reverse-music.ly index a0e31643bf..b267b12f9b 100644 --- a/input/test/reverse-music.ly +++ b/input/test/reverse-music.ly @@ -1,5 +1,5 @@ -\version "2.7.10" +\version "2.7.13" % possible rename to scheme-something. \header { texidoc="@cindex Scheme Reverse Music Symmetric, or palindromical music can be produced, first, by printing diff --git a/input/test/script-abbreviations.ly b/input/test/script-abbreviations.ly index 8ea4f2ba75..621cddeedd 100644 --- a/input/test/script-abbreviations.ly +++ b/input/test/script-abbreviations.ly @@ -1,7 +1,7 @@ % this chart is used in the manual too. -\version "2.6.0" +\version "2.7.13" \header { texidoc = "@cindex Script Abbreviations Some articulations may be entered using an abbreviation. diff --git a/input/test/script-chart.ly b/input/test/script-chart.ly index ccfe23055e..1a4c4337ed 100644 --- a/input/test/script-chart.ly +++ b/input/test/script-chart.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" % this chart is used in the manual too. diff --git a/input/test/slur-manual.ly b/input/test/slur-manual.ly index 51534e5225..b164ed3e62 100644 --- a/input/test/slur-manual.ly +++ b/input/test/slur-manual.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" \header { diff --git a/input/test/slur-minimum-length.ly b/input/test/slur-minimum-length.ly index a1994968bd..3dd0e4d47e 100644 --- a/input/test/slur-minimum-length.ly +++ b/input/test/slur-minimum-length.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc = "@cindex Slur Minimum Length By setting the minimum length of a slur, notes are more separated. " diff --git a/input/test/smart-transpose.ly b/input/test/smart-transpose.ly index dec010bd84..557a81c45e 100644 --- a/input/test/smart-transpose.ly +++ b/input/test/smart-transpose.ly @@ -1,5 +1,5 @@ -\version "2.7.10" +\version "2.7.13" \header { texidoc="@cindex Smart Transpose diff --git a/input/test/spacing-optical.ly b/input/test/spacing-optical.ly index c217236570..27feecd351 100644 --- a/input/test/spacing-optical.ly +++ b/input/test/spacing-optical.ly @@ -4,7 +4,7 @@ texidoc = "Stem directions and head positions are taken into account for spacin } -\version "2.6.0" +\version "2.7.13" \paper { raggedright = ##t diff --git a/input/test/staff-bracket.ly b/input/test/staff-bracket.ly index 51f6314fa3..70be25751e 100644 --- a/input/test/staff-bracket.ly +++ b/input/test/staff-bracket.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" \header{ texidoc="@cindex Nested Staff Groups Staffs can be nested in various combinations. Here, @code{StaffGroup} diff --git a/input/test/staff-container.ly b/input/test/staff-container.ly index 00c13dc796..8070e9c49f 100644 --- a/input/test/staff-container.ly +++ b/input/test/staff-container.ly @@ -1,4 +1,4 @@ -\version "2.7.6" +\version "2.7.13" \header { diff --git a/input/test/staff-lines.ly b/input/test/staff-lines.ly index 78a9a75d93..c02a2c1960 100644 --- a/input/test/staff-lines.ly +++ b/input/test/staff-lines.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" \header { diff --git a/input/test/staff-size.ly b/input/test/staff-size.ly index 633ea32f7f..8d01ad2290 100644 --- a/input/test/staff-size.ly +++ b/input/test/staff-size.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc = "@cindex Staff Size diff --git a/input/test/stem-extend.ly b/input/test/stem-extend.ly index 056d1cc8de..42fdbb452a 100644 --- a/input/test/stem-extend.ly +++ b/input/test/stem-extend.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc = "@cindex Stem Extend Extending stems to the center line may be prevented using @code{no-stem-extend}. diff --git a/input/test/tablature-hammer.ly b/input/test/tablature-hammer.ly index c478734766..00846291bf 100644 --- a/input/test/tablature-hammer.ly +++ b/input/test/tablature-hammer.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" \header {texidoc = "@cindex Tablature hammer A hammer in tablature can be faked with slurs. " } diff --git a/input/test/temporary-stave.ly b/input/test/temporary-stave.ly index dbcdd63805..09402d6830 100644 --- a/input/test/temporary-stave.ly +++ b/input/test/temporary-stave.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" \header { diff --git a/input/test/text-rotate.ly b/input/test/text-rotate.ly index f3552a30a2..b1a2190f89 100644 --- a/input/test/text-rotate.ly +++ b/input/test/text-rotate.ly @@ -16,7 +16,7 @@ output for printing of the source of this example (commenting one line). } -\version "2.6.0" +\version "2.7.13" \score { \new Staff \relative c'' { diff --git a/input/test/text-spanner.ly b/input/test/text-spanner.ly index 32d0d57320..60a3972256 100644 --- a/input/test/text-spanner.ly +++ b/input/test/text-spanner.ly @@ -1,5 +1,5 @@ -\version "2.6.0" +\version "2.7.13" \header { texidoc = "@cindex text spanner Text spanners can be used in the similar manner than markings for pedals diff --git a/input/test/time-signature-staff.ly b/input/test/time-signature-staff.ly index a58cf37a17..d5c59523f3 100644 --- a/input/test/time-signature-staff.ly +++ b/input/test/time-signature-staff.ly @@ -6,7 +6,7 @@ used contemporary pieces with many time signature changes. " } -\version "2.7.6" +\version "2.7.13" \layout { raggedright = ##T } diff --git a/input/test/unfold-all-repeats.ly b/input/test/unfold-all-repeats.ly index 153c930f17..34ffdc1dac 100644 --- a/input/test/unfold-all-repeats.ly +++ b/input/test/unfold-all-repeats.ly @@ -1,4 +1,4 @@ -\version "2.7.10" +\version "2.7.13" \header { texidoc = "Applying the standard function @code{unfold-repeats} unfolds diff --git a/input/test/version-output.ly b/input/test/version-output.ly index f92705de82..3d0a3f9e62 100644 --- a/input/test/version-output.ly +++ b/input/test/version-output.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" \header { diff --git a/input/test/vertical-extent.ly b/input/test/vertical-extent.ly index 494935c3be..fb268bb118 100644 --- a/input/test/vertical-extent.ly +++ b/input/test/vertical-extent.ly @@ -1,4 +1,4 @@ -\version "2.6.0" +\version "2.7.13" % TODO: huh? what's this file about? -gp \header { texidoc = " diff --git a/input/test/volta-chord-names.ly b/input/test/volta-chord-names.ly index 111efde1e5..dc140c9616 100644 --- a/input/test/volta-chord-names.ly +++ b/input/test/volta-chord-names.ly @@ -3,7 +3,7 @@ the @code{voltaOnThisStaff} property to true for the @code{ChordNames} context and to false for the topmost ordinary @code{Staff} context." } -\version "2.6.0" +\version "2.7.13" \score { << \new ChordNames \with { voltaOnThisStaff = ##t diff --git a/lily/grob-array-scheme.cc b/lily/grob-array-scheme.cc new file mode 100644 index 0000000000..89aba0afb9 --- /dev/null +++ b/lily/grob-array-scheme.cc @@ -0,0 +1,41 @@ +/* + grob-array-scheme.cc -- implement Grob_array bindings. + + source file of the GNU LilyPond music typesetter + + (c) 2005 Han-Wen Nienhuys + +*/ + +#include "grob-array.hh" +#include "grob.hh" + +LY_DEFINE (ly_grob_array_length, "ly:grob-array-length", + 1, 0, 0, + (SCM grob_arr), + "Return the grob_array length.") +{ + Grob_array *me = unsmob_grob_array (grob_arr); + SCM_ASSERT_TYPE (me, grob_arr, SCM_ARG1, __FUNCTION__, "Grob_array"); + return scm_from_int (me->size ()); +} + + +LY_DEFINE (ly_grob_array_ref, "ly:grob-array-ref", + 2, 0, 0, + (SCM grob_arr, SCM index), + "Retrieve the @code{index} element of @code{grob-arr}.") +{ + Grob_array *me = unsmob_grob_array (grob_arr); + SCM_ASSERT_TYPE (me, grob_arr, SCM_ARG1, __FUNCTION__, "Grob_array"); + SCM_ASSERT_TYPE (scm_is_integer (index), index, SCM_ARG2, __FUNCTION__, "integer"); + + int i = scm_to_int (index); + if (i < 0 || i >= me->size ()) + { + scm_out_of_range (NULL, scm_from_size_t (i)); + } + + return me->grob (i)->self_scm (); +} + diff --git a/lily/lexer.ll b/lily/lexer.ll index d12fea5936..b4e3697a50 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -611,6 +611,8 @@ BOM_UTF8 \357\273\277 return E_CLOSE; case '[': return E_BRACKET_OPEN; + case '+': + return E_PLUS; case ']': return E_BRACKET_CLOSE; case '~': diff --git a/lily/new-figured-bass-engraver.cc b/lily/new-figured-bass-engraver.cc index 04dae1da50..fbf0665f3a 100644 --- a/lily/new-figured-bass-engraver.cc +++ b/lily/new-figured-bass-engraver.cc @@ -32,9 +32,11 @@ struct Figure_group Item *figure_item_; Music *current_music_; + bool force_no_continuation_; Figure_group () { + force_no_continuation_ = false; continuation_line_ = 0; number_ = SCM_EOL; alteration_ = SCM_EOL; @@ -45,6 +47,7 @@ struct Figure_group { return current_music_ + && !force_no_continuation_ && ly_is_equal (number_, current_music_->get_property ("figure")) && ly_is_equal (alteration_, @@ -147,7 +150,8 @@ New_figured_bass_engraver::try_music (Music *m) && ly_is_equal (groups_[i].number_, fig)) { groups_[i].current_music_ = m; - + groups_[i].force_no_continuation_ + = to_boolean (m->get_property ("no-continuation")); continuation_ = true; return true; } @@ -208,8 +212,8 @@ New_figured_bass_engraver::clear_spanners () return; alignment_ = 0; - center_repeated_continuations(); - + if (to_boolean (get_property ("figuredBassCenterContinuations"))) + center_repeated_continuations(); groups_.clear (); } @@ -275,7 +279,8 @@ New_figured_bass_engraver::process_music () bool use_extenders = to_boolean (get_property ("useBassFigureExtenders")); if (!use_extenders) { - center_repeated_continuations (); + if (to_boolean (get_property ("figuredBassCenterContinuations"))) + center_repeated_continuations (); alignment_ = 0; for (int i = 0; i < groups_.size (); i++) { @@ -457,6 +462,7 @@ ADD_TRANSLATOR (New_figured_bass_engraver, "bass-figure-event rest-event", /* read */ + "figuredBassCenterContinuations " "implicitBassFigures " "newFiguredBassFormatter " "figuredBassAlterationDirection " diff --git a/lily/parser.yy b/lily/parser.yy index 4ddc525e55..4734db7fe3 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -350,15 +350,12 @@ or %token E_OPEN "\\(" %token E_BRACKET_CLOSE "\\]" %token E_ANGLE_OPEN "\\<" +%token E_PLUS "\\+" %token E_TILDE "\\~" %token EXTENDER "__" -/* These used at all? - %token FIGURE_BRACKET_CLOSE - %token FIGURE_BRACKET_OPEN - -parser.yy:348.8-25: warning: symbol `"\\>"' used more than once as a literal string -parser.yy:352.8-24: warning: symbol `"\\<"' used more than once as a literal string +/* +If we give names, Bison complains. */ %token FIGURE_CLOSE /* "\\>" */ %token FIGURE_OPEN /* "\\<" */ @@ -428,7 +425,7 @@ parser.yy:352.8-24: warning: symbol `"\\<"' used more than once as a literal str %type book_body %type bare_unsigned -%type bass_mod +%type figured_bass_alteration %type dots %type exclamations %type optional_rest @@ -479,6 +476,7 @@ parser.yy:352.8-24: warning: symbol `"\\<"' used more than once as a literal str %type assignment_id %type bare_number %type bass_figure +%type figured_bass_modification %type br_bass_figure %type bass_number %type chord_body_elements @@ -2187,7 +2185,7 @@ bass_number: | full_markup { $$ = $1; } ; -bass_mod: +figured_bass_alteration: '-' { $$ = -2; } | '+' { $$ = 2; } | '!' { $$ = 0; } @@ -2214,7 +2212,7 @@ bass_figure: $$ = $1; unsmob_music ($1)->set_property ("bracket-stop", SCM_BOOL_T); } - | bass_figure bass_mod { + | bass_figure figured_bass_alteration { Music *m = unsmob_music ($1); if ($2) { SCM salter = m->get_property ("alteration"); @@ -2225,9 +2223,36 @@ bass_figure: m->set_property ("alteration", scm_from_int (0)); } } + | bass_figure figured_bass_modification { + Music *m = unsmob_music ($1); + if ($2 == ly_symbol2scm ("plus")) + { + m->set_property ("augmented", SCM_BOOL_T); + } + else if ($2 == ly_symbol2scm ("slash")) + { + m->set_property ("diminished", SCM_BOOL_T); + } + else if ($2 == ly_symbol2scm ("exclamation")) + { + m->set_property ("no-continuation", SCM_BOOL_T); + } + } ; +figured_bass_modification: + E_PLUS { + $$ = ly_symbol2scm ("plus"); + } + | E_EXCLAMATION { + $$ = ly_symbol2scm ("exclamation"); + } + | '/' { + $$ = ly_symbol2scm ("slash"); + } + ; + br_bass_figure: bass_figure { $$ = $1; diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 79ecb85d40..44bdc1ee51 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -223,7 +223,8 @@ contained staves are not connected vertically." \name CueVoice \alias Voice fontSize = #-4 - \override Stem #'lengths = #'(2.5 2.5 3.0 3.0) + \override Stem #'length-fraction = #(magstep -4) + \override Beam #'length-fraction = #(magstep -4) } \context { diff --git a/python/convertrules.py b/python/convertrules.py index b098537a9c..92436d5a7d 100644 --- a/python/convertrules.py +++ b/python/convertrules.py @@ -2604,6 +2604,13 @@ def conv (str): str = re.sub(r"(override|revert)\s*([a-zA-Z.]+)\s*#'(spacing-procedure|after-line-breaking-callback" + r"|before-line-breaking-callback|print-function)", subber, str) + + if re.search ('bar-size-procedure', str): + error_file.write (NOT_SMART % "bar-size-procedure") + if re.search ('space-function', str): + error_file.write (NOT_SMART % "space-function") + if re.search ('verticalAlignmentChildCallback', str): + error_file.write ('verticalAlignmentChildCallback has been deprecated') return str conversions.append (((2, 7, 13), conv, diff --git a/scm/define-context-properties.scm b/scm/define-context-properties.scm index 95255d7895..641376fde6 100644 --- a/scm/define-context-properties.scm +++ b/scm/define-context-properties.scm @@ -209,6 +209,7 @@ another non-natural.") "extra vertical extent, same format as @var{minimumVerticalExtent}") + (figuredBassCenterContinuations ,boolean? "Whether to vertically center pairs of extender lines.") (figuredBassAlterationDirection ,ly:dir? "Where to put alterations relative to the main figure.") (followVoice ,boolean? "If set, note heads are tracked across staff diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index e13a5c5768..fd23168585 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -22,16 +22,15 @@ (avoid-slur . inside) (cautionary-style . parentheses) (callbacks . ((stencil . ,Accidental_interface::print) - (after-line-breaking . ,Accidental_interface::after_line_breaking))) - + (after-line-breaking + . ,Accidental_interface::after_line_breaking) + )) (meta . ((class . Item) (interfaces . (accidental-interface font-interface)))))) (AccidentalSuggestion - . ( - - (callbacks . ((stencil . ,Accidental_interface::print))) + . ((callbacks . ((stencil . ,Accidental_interface::print))) (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent ,Self_alignment_interface::aligned_on_self)) (self-alignment-X . ,CENTER) diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index 8d5e057a51..2eeb3fae06 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -991,6 +991,47 @@ letter 'A'." (Text_interface::interpret_markup layout props (number->markletter-string number->mark-alphabet-vector num))) + + +(def-markup-command (slashed-digit layout props num) (integer?) + "A feta number, with slash. This is for use in the context of +figured bass notation" + (let* + ((mag (magstep (chain-assoc-get 'font-size props 0))) + (thickness + (* mag + (chain-assoc-get 'thickness props 0.16))) + (dy (* mag 0.15)) + (number-stencil (interpret-markup layout + (prepend-alist-chain 'font-encoding 'fetaNumber props) + (number->string num))) + (num-x (interval-widen (ly:stencil-extent number-stencil X) + (* mag 0.2))) + (num-y (ly:stencil-extent number-stencil Y)) + (slash-stencil + (ly:make-stencil + `(draw-line + ,thickness + ,(car num-x) ,(- (interval-center num-y) dy) + ,(cdr num-x) ,(+ (interval-center num-y) dy)) + num-x num-y + ))) + + (ly:stencil-add number-stencil + (cond + ((= num 5) (ly:stencil-translate slash-stencil + ;;(cons (* mag -0.05) (* mag 0.42)) + (cons (* mag -0.00) (* mag -0.07)) + + )) + ((= num 7) (ly:stencil-translate slash-stencil + ;;(cons (* mag -0.05) (* mag 0.42)) + (cons (* mag -0.00) (* mag -0.15)) + + )) + + (else slash-stencil))) + )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; the note command. diff --git a/scm/define-music-properties.scm b/scm/define-music-properties.scm index 263c188a62..95c89a8480 100644 --- a/scm/define-music-properties.scm +++ b/scm/define-music-properties.scm @@ -29,6 +29,7 @@ TODO: consider making type into symbol") (articulation-type ,string? "key for script definitions alist. TODO: consider making type into symbol ") + (augmented ,boolean? "This figure is for an augmented figured bass (with +) sign.") (associated-context ,string? "Name of the Voice context associated with this \\newaddlyrics section") (bass ,boolean? "Set if this note is a bass note in a chord") (cautionary ,boolean? "If set, this alteration needs cautionary accidental") @@ -41,6 +42,7 @@ TODO: consider making type into symbol ") descend in the context tree.") (denominator ,integer? "denominator in a time signature") (digit ,integer? "digit for fingering") + (diminished ,boolean? "This bass figure should be slashed.") (direction ,ly:dir? "Print this up or down?") (drum-type ,symbol? "Which percussion instrument to play this note on.") (error-found ,boolean? "If true, a parsing error was found in this expression") diff --git a/scm/translation-functions.scm b/scm/translation-functions.scm index aa536c2e5c..b16768d5fd 100644 --- a/scm/translation-functions.scm +++ b/scm/translation-functions.scm @@ -61,7 +61,9 @@ (define-public (format-new-bass-figure figure event context) (let* ((fig (ly:music-property event 'figure)) (fig-markup (if (number? figure) - (markup #:number (number->string figure 10)) + (if (eq? #t (ly:music-property event 'diminished)) + (markup #:slashed-digit figure) + (markup #:number (number->string figure 10))) #f )) (alt (ly:music-property event 'alteration)) @@ -72,6 +74,9 @@ (alteration->text-accidental-markup alt)) #f)) + (plus-markup (if (eq? #t (ly:music-property event 'augmented)) + (markup #:number "+") + #f)) (alt-dir (ly:context-property context 'figuredBassAlterationDirection)) ) @@ -99,7 +104,16 @@ #:pad-x 0.2 alt-markup ))) + (if plus-markup + (set! fig-markup + (markup #:put-adjacent + fig-markup + X LEFT + #:pad-x 0.2 plus-markup))) + (if (markup? fig-markup) (markup #:fontsize -2 fig-markup) - empty-markup))) + empty-markup) + + )) -- 2.39.5