lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FiguredBass: Extenders for figures of different width should still s


From: reinhold . kainhofer
Subject: Re: FiguredBass: Extenders for figures of different width should still stop at the same position (issue3280042)
Date: Thu, 25 Nov 2010 15:38:49 +0000

Reviewers: carl.d.sorensen_gmail.com, Neil Puttock,

Message:
On 2010/11/24 18:05:42, Neil Puttock wrote:
ly_string2scm("0"));
ly_string2scm ("0")

Fixed and pushed.


Description:
FiguredBass: Extenders for figures of different width should still stop
at the same position

FB extenders use the extent of the hidden figure grob, so extenders of
different figures might stop at different positions. Ideally, the note
of the associated staff should be retrieved and used as the position to
stop the extender. However, FB can also exist standalone without any
attached staff.
So, as a workaround, this patch simply sets the text of all (hidden)
ending figures to 0, so they all have the same extent and all extenders
will stop at the same position

Please review this at http://codereview.appspot.com/3280042/

Affected files:
  A input/regression/figured-bass-continuation-end-position.ly
  M lily/figured-bass-engraver.cc


Index: input/regression/figured-bass-continuation-end-position.ly
diff --git a/input/regression/figured-bass-continuation-end-position.ly b/input/regression/figured-bass-continuation-end-position.ly
new file mode 100644
index 0000000000000000000000000000000000000000..3456b3cc2f7975a7da3812607765106766da20ef
--- /dev/null
+++ b/input/regression/figured-bass-continuation-end-position.ly
@@ -0,0 +1,18 @@
+\version "2.13.41"
+
+\header {
+ texidoc = "Figured bass extender for figures of different width (e.g. with
+alteration or two-digit figures) should still stop at the same position."
+
+}
+
+\figures {
+  \set useBassFigureExtenders = ##t
+  \set figuredBassAlterationDirection = #RIGHT
+  <6 5+ 3>4.
+  <6 5+ 2>4.
+  r4
+  <12 5>4.
+  <12 5>4.
+  r4
+}
\ No newline at end of file
Index: lily/figured-bass-engraver.cc
diff --git a/lily/figured-bass-engraver.cc b/lily/figured-bass-engraver.cc
index 3f173c99866e618d918325a604f116a1f840e27c..3a4a59832fc809cbff80c573caffe0c3e96f297d 100644
--- a/lily/figured-bass-engraver.cc
+++ b/lily/figured-bass-engraver.cc
@@ -459,8 +459,12 @@ Figured_bass_engraver::create_grobs ()
         {
           /*
             UGH should connect to the bass staff, and get the note heads.
+            For now, simply set the hidden figure to a default value to
+ ensure the extenders of different figures always end at the same
+            position, e.g. in <12 5> <12 5>
           */
           group.figure_item_->set_property ("transparent", SCM_BOOL_T);
+          group.figure_item_->set_property ("text", ly_string2scm("0"));
           group.continuation_line_->set_bound (RIGHT, group.figure_item_);
         }






reply via email to

[Prev in Thread] Current Thread [Next in Thread]