]> git.donarmstrong.com Git - lilypond.git/commitdiff
* Documentation/user/instrument-notation.itely (Figured bass):
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 7 Oct 2005 09:50:22 +0000 (09:50 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 7 Oct 2005 09:50:22 +0000 (09:50 +0000)
demonstrate extenders, update seealso links.

* scm/titling.scm (marked-up-headfoot): change tagline
handling. tagline = ##f will blank the tagline as well.

ChangeLog
Documentation/user/instrument-notation.itely
input/regression/figured-bass.ly
lily/figured-bass-continuation.cc
lily/horizontal-bracket.cc
lily/lyric-hyphen.cc
scm/define-context-properties.scm
scm/define-grobs.scm
scm/titling.scm

index 9e278a1f27d85e8bdfb3ea601dd04b73909c692b..581aa1d5b183e24a5fb7dddcc78d1e055fb0bc17 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2005-10-07  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * 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 6ebcbd776d130cad768fc1554fb4b62053ee3a4d..c36fc98bc5d6f12e96ad5adae6b40e1e56a714e4 100644 (file)
@@ -3986,7 +3986,7 @@ Program reference: @internalsref{Accidental_engraver} engraver and the
 @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 @@ strings and text markups, see @ref{Overview of text markup commands}.
 \figuremode { < [4 6] 8 [_! 12] > < 5 \markup{ + \number 6 } > }
 @end lilypond
 
+It is also possible to use continuation lines for repeated figures,
+
+@lilypond[verbatim,relative=1]
+<<
+  \new Staff { c4 c }
+  \figures {
+    \set useBassFigureExtenders = ##t 
+    <4 6> <3 6> <3 7>
+  }
+>>
+@end 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 @@ vertical spacing of the figures may be set with @code{baseline-skip}.
 
 @seealso
 
-Program reference: @internalsref{BassFigure} object,
+Program reference: @internalsref{NewBassFigure},
+@internalsref{BassFigureAlignment}, @internalsref{BassFigureLine},
+@internalsref{BassFigureBracket}, and
+@internalsref{BassFigureContinuation} objects and
 @internalsref{FiguredBass} context.
 
 @refbugs
index 85ba15eba0cab6792e377e88524f35046943dc2e..5a4dd4aec06f35b85c7c9c685bb49da66d542cc8 100644 (file)
@@ -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 766dc49818f80db1bb37100343dcdd9a480971fb..1969cf30d557be06ca99f3af942d8dd7168d0fe2 100644 (file)
 
 #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 8c206bb7292a06e518414eb6a7890db688dab1df..f3abaa5e6148419f4e27ff24b4fd02c8815c4be6 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  horizontal-bracket.cc -- implement  Horizontal_bracket
+  horizontal-bracket.cc -- implement Horizontal_bracket
 
   source file of the GNU LilyPond music typesetter
 
 #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 @@ Horizontal_bracket::make_bracket (Grob *me, Grob *common,
   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 @@ Horizontal_bracket::print (SCM smob)
       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 8e78407d88f84e148d624c98fd830f0d0e5846b6..17fefa0923e3c10697e90b0824714fa6d8290807 100644 (file)
 #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 @@ Hyphen_spanner::set_spacing_rods (SCM smob)
 }
 
 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 c7da88a6495cd3da8a680af99be36cf2deb13724..1452221f3db1a13b4b5983d75592c983c553907b 100644 (file)
    `(
 
      ;; 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 @@ returns whether the corresponding bar number should be printed")
 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 @@ another non-natural.")
                          "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 @@ context Voice \\times 2/3 @{
 @@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 c15d080aa47fa4a4cde40ede80ab48edcb500448..23c3322f1a5f78129ca0ece4509ee81fba7f65a7 100644 (file)
                                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 ab429c85f9739d362eed303e54dc1ec84888a7b5..3e7d55601855f8890053ac5355489fbe48a81e31 100644 (file)
@@ -49,7 +49,7 @@ page:last?, page:page-number-string and page:page-number
                       (list pgnum-alist)
                       prefixed-alists
                       (layout-extract-page-properties layout))))
-         (display prefixed-alists)
+         
          (interpret-markup layout props potential-markup))
 
        empty-stencil))