I'm working on a score where I'd like to create a cross-staff vertical
bracket, which I have LilyPond engrave as a bracket-style arpeggio. This
was not possible because spanned arpeggios always used the default
stencil - the NR alludes to this in 1.3.3 under "Known issues and
warnings," where the following note is included: "The parenthesis-style
arpeggio brackets do not work for cross-staff arpeggios. " The note is
accurate, but not complete, as the parenthesis style isn't the only one
that doesn't work.
Wanting a solution, I figured this could be a good place for me to make
my first code contribution to LilyPond. The solution I came up with was
for the Span_arpeggio_engraver to copy the stencil property from one of
the included arpeggios. On some levels it feels slightly hack-ish
(perhaps because the patch ended up adding only one line of code - quite
the result after hours of work<g>), but the functionality seems quite
elegant.
I've attached the patch according (I hope) to the standards set forth on
the LilyPond web site. Feedback (both code- and process-wise) would be
greatly appreciated. Thank you.
--
Chris Snyder
Adoro Music Publishing
1-616-828-4436 x800
http://www.adoromusicpub.com
>From 49ed7b275a9c83154e70dca0a32496d0ba3793fd Mon Sep 17 00:00:00 2001
From: Chris Snyder <csny...@adoromusicpub.com>
Date: Thu, 18 Dec 2008 14:49:00 -0500
Subject: [PATCH] Altered spanned arpeggios to inherit the stencil property of an included arpeggio
(it isn't very smart - it just gets the property from the first arpeggio it finds)
---
lily/span-arpeggio-engraver.cc | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lily/span-arpeggio-engraver.cc b/lily/span-arpeggio-engraver.cc
index 07958a8..adbd0b0 100644
--- a/lily/span-arpeggio-engraver.cc
+++ b/lily/span-arpeggio-engraver.cc
@@ -61,6 +61,7 @@ Span_arpeggio_engraver::process_acknowledged ()
{
span_arpeggio_ = make_item ("Arpeggio", SCM_EOL);
span_arpeggio_->set_property ("cross-staff", SCM_BOOL_T);
+ span_arpeggio_->set_property ("stencil", arpeggios_[0]->get_property_data (ly_symbol2scm ("stencil")));
}
}
--
1.5.6.3
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel