CVSROOT: /cvsroot/lilypond Module name: lilypond Branch: Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/10/07 09:50:22
Modified files: . : ChangeLog Documentation/user: instrument-notation.itely input/regression: figured-bass.ly lily : figured-bass-continuation.cc horizontal-bracket.cc lyric-hyphen.cc scm : define-context-properties.scm define-grobs.scm titling.scm Log message: * Documentation/user/instrument-notation.itely (Figured bass): demonstrate extenders, update seealso links. * scm/titling.scm (marked-up-headfoot): change tagline handling. tagline = ##f will blank the tagline as well. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.4159&tr2=1.4160&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/user/instrument-notation.itely.diff?tr1=1.57&tr2=1.58&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/input/regression/figured-bass.ly.diff?tr1=1.36&tr2=1.37&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/figured-bass-continuation.cc.diff?tr1=1.2&tr2=1.3&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/horizontal-bracket.cc.diff?tr1=1.26&tr2=1.27&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/lyric-hyphen.cc.diff?tr1=1.23&tr2=1.24&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/define-context-properties.scm.diff?tr1=1.53&tr2=1.54&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/define-grobs.scm.diff?tr1=1.240&tr2=1.241&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/titling.scm.diff?tr1=1.18&tr2=1.19&r1=text&r2=text Patches: Index: lilypond/ChangeLog diff -u lilypond/ChangeLog:1.4159 lilypond/ChangeLog:1.4160 --- lilypond/ChangeLog:1.4159 Fri Oct 7 09:12:01 2005 +++ lilypond/ChangeLog Fri Oct 7 09:50:21 2005 @@ -1,5 +1,10 @@ 2005-10-07 Han-Wen Nienhuys <[EMAIL PROTECTED]> + * lily/enclosing-bracket.cc (struct Enclosing_bracket): new file. + + * Documentation/user/instrument-notation.itely (Figured bass): + demonstrate extenders, update seealso links. + * scm/titling.scm (marked-up-headfoot): change tagline handling. tagline = ##f will blank the tagline as well. Index: lilypond/Documentation/user/instrument-notation.itely diff -u lilypond/Documentation/user/instrument-notation.itely:1.57 lilypond/Documentation/user/instrument-notation.itely:1.58 --- lilypond/Documentation/user/instrument-notation.itely:1.57 Mon Sep 12 12:40:39 2005 +++ lilypond/Documentation/user/instrument-notation.itely Fri Oct 7 09:50:22 2005 @@ -3986,7 +3986,7 @@ @c TODO: musicological blurb about FB -LilyPond has limited support for figured bass +LilyPond has support for figured bass @lilypond[quote,raggedright,verbatim,fragment] << @@ -4037,12 +4037,23 @@ \figuremode { < [4 6] 8 [_! 12] > < 5 \markup{ + \number 6 } > } @end lilypond +It is also possible to use continuation lines for repeated figures, + [EMAIL PROTECTED],relative=1] +<< + \new Staff { c4 c } + \figures { + \set useBassFigureExtenders = ##t + <4 6> <3 6> <3 7> + } +>> [EMAIL PROTECTED] lilypond Although the support for figured bass may superficially resemble chord -support, it works much simpler. The @code{\figuremode} mode simply -stores the numbers and @internalsref{FiguredBass} context prints -them as entered. There is no conversion to pitches and no -realizations of the bass are played in the MIDI file. +support, it is much simpler. The @code{\figuremode} mode simply +stores the numbers and @internalsref{FiguredBass} context prints them +as entered. There is no conversion to pitches and no realizations of +the bass are played in the MIDI file. Internally, the code produces markup texts. You can use any of the markup text properties to override formatting. For example, the @@ -4050,7 +4061,10 @@ @seealso -Program reference: @internalsref{BassFigure} object, +Program reference: @internalsref{NewBassFigure}, [EMAIL PROTECTED], @internalsref{BassFigureLine}, [EMAIL PROTECTED], and [EMAIL PROTECTED] objects and @internalsref{FiguredBass} context. @refbugs Index: lilypond/input/regression/figured-bass.ly diff -u lilypond/input/regression/figured-bass.ly:1.36 lilypond/input/regression/figured-bass.ly:1.37 --- lilypond/input/regression/figured-bass.ly:1.36 Thu Aug 18 22:01:01 2005 +++ lilypond/input/regression/figured-bass.ly Fri Oct 7 09:50:22 2005 @@ -1,34 +1,43 @@ -\version "2.6.0" +\version "2.7.12" + \header { - texidoc = " -Figured bass is created by the FiguredBass context which responds to -figured bass requests and rest-requests. You must enter these using -the special @code{\figuremode @{ @}} mode, which allows you to type -numbers, like @code{<4 6+>}. -You can also type letters by entering quoted strings, which is shown in the -last bass figure. -" } -\layout { raggedright = ##t } + 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+>}. + +You can also enter markup strings. The vertical alignment may also be +tuned. + +" + +} + + +\paper { raggedright = ##t } + + << - \figures { - <3 [5 7]> - \once \override BassFigure #'direction = #down - <3 [5 7]> - <3 [5] 7 [9 11]> - <3+ 5- 7!> - <3 _! 5 _- 7> - <3 _ 5 _ 7> - <"V7" ["bla" 6] \markup{ \musicglyph #"rests.2"} > - - } - \context Voice { - \clef bass - c 4 - c c c c c - g8 - } + \context Voice { + \clef bass + c 4 + c c c c c + g8 + } + \figures { + <3 [5 7]> + <3 [5] 7 [9 11]> + <3+ 5- 7!> + <3 _! 5 _- 7> + <3 _ 5 _ 7> + <"V7" ["bla" 6] \markup{ \musicglyph #"rests.2"} > + + \once \override BassFigureAlignment #'stacking-dir = #UP + <3 [5 7]> + + } >> Index: lilypond/lily/figured-bass-continuation.cc diff -u lilypond/lily/figured-bass-continuation.cc:1.2 lilypond/lily/figured-bass-continuation.cc:1.3 --- lilypond/lily/figured-bass-continuation.cc:1.2 Thu Oct 6 13:12:57 2005 +++ lilypond/lily/figured-bass-continuation.cc Fri Oct 7 09:50:22 2005 @@ -19,60 +19,6 @@ #include "horizontal-bracket.hh" -struct Figured_bass_bracket -{ - static bool has_interface (Grob*); - -public: - DECLARE_SCHEME_CALLBACK(print, (SCM)); -}; - - -ADD_INTERFACE(Figured_bass_bracket, - "figured-bass-bracket-interface", - "Brackets alongside bass figures.", - - /* props */ - - /* ugh: should make bracket interface. */ - "bracket-flare " - "shorten-pair " - "edge-height " - "padding " - "thickness " - "elements " - ); - -MAKE_SCHEME_CALLBACK (Figured_bass_bracket, print, 1); -SCM -Figured_bass_bracket::print (SCM grob) -{ - Grob *me = unsmob_grob (grob); - extract_grob_set (me, "elements", elements); - if (elements.is_empty ()) - { - me->suicide (); - return SCM_EOL; - } - - Grob *common_x = common_refpoint_of_array (elements, me, X_AXIS); - Interval xext = Axis_group_interface::relative_group_extent (elements, common_x, X_AXIS); - - Stencil left_br = Horizontal_bracket::make_bracket (me, me, elements, - Y_AXIS, LEFT); - Stencil right_br = Horizontal_bracket::make_bracket (me, me, elements, - Y_AXIS, RIGHT); - - xext.widen (robust_scm2double (me->get_property ("padding"), 0.25)); - left_br.translate_axis (xext[LEFT], X_AXIS); - right_br.translate_axis (xext[RIGHT], X_AXIS); - - left_br.add_stencil (right_br); - left_br.translate_axis (-me->relative_coordinate (common_x, X_AXIS), X_AXIS); - return left_br.smobbed_copy (); -} - - struct Figured_bass_continuation { static bool has_interface (Grob*); Index: lilypond/lily/horizontal-bracket.cc diff -u lilypond/lily/horizontal-bracket.cc:1.26 lilypond/lily/horizontal-bracket.cc:1.27 --- lilypond/lily/horizontal-bracket.cc:1.26 Wed Oct 5 13:05:44 2005 +++ lilypond/lily/horizontal-bracket.cc Fri Oct 7 09:50:22 2005 @@ -1,5 +1,5 @@ /* - horizontal-bracket.cc -- implement Horizontal_bracket + horizontal-bracket.cc -- implement Horizontal_bracket source file of the GNU LilyPond music typesetter @@ -12,27 +12,18 @@ #include "directional-element-interface.hh" #include "output-def.hh" #include "staff-symbol-referencer.hh" -#include "tuplet-bracket.hh" // ugh. -#include "horizontal-bracket.hh" // ugh. - -/* - TODO: - - This doesn't look very elegant: should support winged edges. - - Support texts on the brackets? -*/ +#include "tuplet-bracket.hh" +#include "horizontal-bracket.hh" +#include "axis-group-interface.hh" Stencil -Horizontal_bracket::make_bracket (Grob *me, Grob *common, - Link_array<Grob> grobs, Axis a, Direction dir) +Horizontal_bracket::make_bracket (Grob *me, Grob *refpoint, + Link_array<Grob> grobs, + Axis a, Direction dir) { Axis other = other_axis (a); - - Grob *cx = common_refpoint_of_array (grobs, common, a); - - Interval ext = grobs.top ()->extent (cx, a); - ext.unite (grobs[0]->extent (cx, a)); + Grob *common = common_refpoint_of_array (grobs, refpoint, a); + Interval ext = Axis_group_interface::relative_group_extent (grobs, common, a); Drul_array<Real> edge_height = robust_scm2interval (me->get_property ("edge-height"), Interval (1.0, 1.0)); @@ -47,22 +38,32 @@ Interval empty; Offset start; start[a] = ext.length (); + + /* + ugh, Tuplet_bracket should use Horizontal_bracket, not the other way around. + */ Stencil b = Tuplet_bracket::make_bracket (me, other, start, edge_height, empty, flare, shorten); - b.translate_axis (ext[LEFT], a); + b.translate_axis (ext[LEFT] - refpoint->relative_coordinate (common, a) + , a); return b; } + +/* + TODO: + + Support texts on the brackets? +*/ + MAKE_SCHEME_CALLBACK (Horizontal_bracket, print, 1); SCM Horizontal_bracket::print (SCM smob) { Grob *me = unsmob_grob (smob); - Spanner *sp = dynamic_cast<Spanner *> (me); - extract_grob_set (me, "columns", gs); if (!gs.size ()) { @@ -70,13 +71,7 @@ return SCM_EOL; } - Grob *cx = me->common_refpoint (sp->get_bound (LEFT), X_AXIS); - cx = cx->common_refpoint (sp->get_bound (RIGHT), X_AXIS); - - Stencil b = make_bracket (me, cx, gs, X_AXIS, get_grob_direction (me)); - - b.translate_axis (- sp->get_bound (LEFT)->relative_coordinate (cx, X_AXIS), X_AXIS); - + Stencil b = make_bracket (me, me, gs, X_AXIS, get_grob_direction (me)); return b.smobbed_copy (); } Index: lilypond/lily/lyric-hyphen.cc diff -u lilypond/lily/lyric-hyphen.cc:1.23 lilypond/lily/lyric-hyphen.cc:1.24 --- lilypond/lily/lyric-hyphen.cc:1.23 Fri Oct 7 09:12:03 2005 +++ lilypond/lily/lyric-hyphen.cc Fri Oct 7 09:50:22 2005 @@ -14,8 +14,11 @@ #include "paper-column.hh" #include "moment.hh" -MAKE_SCHEME_CALLBACK (Hyphen_spanner, print, 1) - SCM +/* + TODO: should extract hyphen from the font. + */ +MAKE_SCHEME_CALLBACK (Hyphen_spanner, print, 1); +SCM Hyphen_spanner::print (SCM smob) { Spanner *me = unsmob_spanner (smob); @@ -128,6 +131,13 @@ } ADD_INTERFACE (Hyphen_spanner, "lyric-hyphen-interface", - "A centred hyphen is a simple line between lyrics used to divide syllables", - "padding thickness height dash-period minimum-length length"); + "A centered hyphen is a simple line between lyrics used to divide syllables", + + /* props */ + "padding " + "thickness " + "height " + "dash-period " + "minimum-length " + "length"); Index: lilypond/scm/define-context-properties.scm diff -u lilypond/scm/define-context-properties.scm:1.53 lilypond/scm/define-context-properties.scm:1.54 --- lilypond/scm/define-context-properties.scm:1.53 Fri Oct 7 09:12:03 2005 +++ lilypond/scm/define-context-properties.scm Fri Oct 7 09:50:22 2005 @@ -24,10 +24,7 @@ `( ;; TODO FIXME - (useBassFigureExtenders ,boolean? "") - (figuredBassAlterationDirection ,ly:dir? "") - (newFiguredBassFormatter ,procedure? "") - + (aDueText ,string? "Text to print at a unisono passage.") (alignBelowContext ,string? "Where to insert newly created context in vertiical alignment.") (alignAboveContext ,string? "Where to insert newly created context in vertiical alignment.") @@ -110,9 +107,13 @@ for the down staff of PianoStaff. Used by @code{\\autochange}") (trebleStaffProperties ,list? "Alist of property settings to apply for the up staff of PianoStaff. Used by @code{\\autochange}") + + (newFiguredBassFormatter ,procedure? "Routine generating a markup +for a bass figure.") (bassFigureFormatFunction ,procedure? "Procedure that is called to produce the formatting for a @code{BassFigure} grob. It takes a list of @code{BassFigureEvent}s, a context, and the grob to format.") + (beatLength ,ly:moment? "The length of one beat in this time signature.") (beatGrouping ,list? "List of beatgroups, e.g., in 5/8 time @code{'(2 @@ -208,6 +209,8 @@ "extra vertical extent, same format as @var{minimumVerticalExtent}") + (figuredBassAlterationDirection ,ly:dir? "Where to put +alterations relative to the main figure.") (followVoice ,boolean? "If set, note heads are tracked across staff switches by a thin line") @@ -411,6 +414,10 @@ @@end lilypond @end example .") + + (useBassFigureExtenders ,boolean? "Whether to use extender lines +for repeated bass figures") + (verticalAlignmentChildCallback ,procedure? "What callback to add to children of a vertical alignment. It determines what procedure is used on the alignment itself.") Index: lilypond/scm/define-grobs.scm diff -u lilypond/scm/define-grobs.scm:1.240 lilypond/scm/define-grobs.scm:1.241 --- lilypond/scm/define-grobs.scm:1.240 Thu Oct 6 13:12:57 2005 +++ lilypond/scm/define-grobs.scm Fri Oct 7 09:50:22 2005 @@ -215,7 +215,7 @@ bass-figure-interface font-interface)))))) (BassFigureBracket - . ((print-function . ,Figured_bass_bracket::print) + . ((print-function . ,Enclosing_bracket::print) (edge-height . (0.2 . 0.2)) (meta . ((class . Item) (interfaces . (figured-bass-bracket-interface)) )) Index: lilypond/scm/titling.scm diff -u lilypond/scm/titling.scm:1.18 lilypond/scm/titling.scm:1.19 --- lilypond/scm/titling.scm:1.18 Fri Oct 7 09:12:03 2005 +++ lilypond/scm/titling.scm Fri Oct 7 09:50:22 2005 @@ -49,7 +49,7 @@ (list pgnum-alist) prefixed-alists (layout-extract-page-properties layout)))) - (display prefixed-alists) + (interpret-markup layout props potential-markup)) empty-stencil)) _______________________________________________ Lilypond-cvs mailing list Lilypond-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-cvs