+1.5.7
+=====
+
+* Arpeggios can now have arrows on the top or bottom to determine
+ their direction, and a chord can be bracketed to indicate no
+ arpeggio. (Chris Jackson)
+
1.5.6.jcn2
=========
American chord names, gnu-windows testing
@item @email{bjoern.jacke@@gmx.de, Bjoern Jacke}
German glossary stuff.
+@item @email{chris-lilypond@@fluffhouse.org.uk, Chris Jackson}
+ Directed arpeggios and chord brackets.
@item @email{nj104@@cus.cam.ac.uk, Neil Jerram}.
parts of Documentation/Vocab*
@item Donald Ervin Knuth, @uref{http://www-cs-staff.stanford.edu/~knuth/}
This command creates @code{Voice.Arpeggio} grobs. Cross staff arpeggios
are @code{PianoStaff.Arpeggio}.
+To add an arrow head to explicitly specify the direction of the
+arpeggio, you should set the arpeggio grob property
+@code{arpeggio-type}.
+
+@lilypond[fragment,relative,verbatim]
+ \context Voice {
+ \property Voice.Arpeggio \override #'arpeggio-type = #'up
+ <c\arpeggio e g c>
+ \property Voice.Arpeggio \override #'arpeggio-type = #'down
+ <c\arpeggio e g c>
+ }
+@end lilypond
+
+A square bracket on the left indicates that the player should not
+arpeggiate the chord.
+
+@lilypond[fragment,relative,verbatim]
+ \context PianoStaff <
+ \property PianoStaff.connectArpeggios = ##t
+ \property PianoStaff.Arpeggio \override #'arpeggio-type = #'bracket
+ \context Voice = one { <c'\arpeggio e g c> }
+ \context Voice = other { \clef bass <c,,\arpeggio e g>}
+ >
+@end lilypond
+
@refbugs
It is not possible to mix connected arpeggios and unconnected arpeggios
MAJOR_VERSION=1
MINOR_VERSION=5
PATCH_LEVEL=7
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=jcn2
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
\header{
texidoc="
Arpeggios are supported, both cross-staff and broken single staff.
+Directed arpeggios are indicated by arrows, while a square bracket
+to the left prevents arpeggiation.
"
}
-\score{
- \context PianoStaff <
- \context Staff=one \notes\relative c''{
- \context Voice < fis,-\arpeggio d a >
- %%\property PianoStaff.SpanArpeggio \override #'connect = ##t
+\score {
+ \context PianoStaff <
+ \context Staff=one \notes\relative c'{
+ \context Voice {
+ < a4 d fis-\arpeggio a >
+ \property Voice.Arpeggio \override #'arpeggio-type = #'bracket
+ < d fis-\arpeggio a d >
+ %%\property PianoStaff.SpanArpeggio \override #'connect = ##t
\property PianoStaff.connectArpeggios = ##t
- <fis,\arpeggio a c>
+ <b-\arpeggio d g b>
+ \property PianoStaff.Arpeggio \override #'arpeggio-type = #'bracket
+ <c-\arpeggio e g c>
+ \property PianoStaff.connectArpeggios = ##f
+ \property Voice.Arpeggio \override #'arpeggio-type = #'down
+ <a1-\arpeggio d fis a>
+
+ }
}
- \context Staff=two \notes\relative c{
+ \context Staff=two \notes\relative c {
\clef bass
- \context Voice < g b d-\arpeggio >
- <g\arpeggio b d>
- }
+ \context Voice {
+ r4 r
+ <d,\arpeggio a' d >
+ <d \arpeggio a' d >
+ \property Voice.Arpeggio \override #'arpeggio-type = #'up
+ <g1 \arpeggio b d g>
+ }
+ }
>
}
return SCM_EOL;
}
+ SCM s = me->get_grob_property ("arpeggio-type");
+ String arpegtype = ly_scm2string (scm_symbol_to_string (s));
+ Molecule arpegbottom = ( (arpegtype=="bracket") ?
+ Font_interface::get_default_font (me)->find_by_name ("scripts-bracebottom") :
+ ((arpegtype=="down") ?
+ Font_interface::get_default_font (me)->find_by_name ("scripts-arrowdown") :
+ Font_interface::get_default_font (me)->find_by_name ("scripts-arpeggio"))
+ );
+ Molecule arpegmiddle = ( (arpegtype=="bracket") ?
+ Font_interface::get_default_font (me)->find_by_name ("scripts-braceseg") :
+ Font_interface::get_default_font (me)->find_by_name ("scripts-arpeggio") );
+ Molecule arpegtop = ( (arpegtype=="bracket") ?
+ Font_interface::get_default_font (me)->find_by_name ("scripts-bracetop") :
+ ((arpegtype=="up") ?
+ Font_interface::get_default_font (me)->find_by_name ("scripts-arrowup") :
+ Font_interface::get_default_font (me)->find_by_name ("scripts-arpeggio"))
+ );
+
Molecule mol;
- Molecule arpeggio = Font_interface::get_default_font (me)->find_by_name ("scripts-arpeggio");
-
Real y = heads[LEFT];
- while (y < heads[RIGHT])
+
+ mol.add_at_edge (Y_AXIS, UP, arpegbottom, 0.0);
+ y+= arpegbottom. extent (Y_AXIS).length ();
+
+ Grob * stem = unsmob_grob (gh_car ( me->get_grob_property ("stems") ));
+ Grob * ss = Staff_symbol_referencer::staff_symbol_l (stem);
+
+ while (y < heads[RIGHT] - Staff_symbol::staff_space (ss))
{
- mol.add_at_edge (Y_AXIS, UP,arpeggio, 0.0);
- y+= arpeggio. extent (Y_AXIS).length ();
+ mol.add_at_edge (Y_AXIS, UP, arpegmiddle, 0.0);
+ y+= arpegmiddle. extent (Y_AXIS).length ();
}
+ mol.add_at_edge (Y_AXIS, UP, arpegtop, 0.0);
+
mol.translate_axis (heads[LEFT], Y_AXIS);
return mol.smobbed_copy () ;
draw_arpeggio;
fet_endchar;
+% Arrowhead nestles underneath / on top of the arpeggio symbol
+
+def draw_arpeggio_arrow =
+ save thinness, height, width, overshoot, se, sw, ne, nw, alpha;
+ pair ne, nw, se, sw;
+ height# = staff_space#;
+ width# = 0.8height#;
+ overshoot# = 0.25 staff_space#;
+ define_pixels (height,overshoot,width);
+ set_char_box(0, width#, 0, height#);
+ alpha := -40;
+ nw = dir (alpha+180);
+ sw = dir (alpha-90); se = dir alpha;
+
+ penpos1(rthin, alpha+90);
+ penpos2(5/4rthick, alpha);
+ penpos3(rthin, alpha);
+
+ z1 = (width/2, height) - overshoot*se; % numbering is consistent with the arpeggio symbol
+ z2 = 2[z4,(width/2,height/2)];
+ z3 = (0.5 width, 0.5 height);
+ z4 = (0.25 staff_space, rthin);
+ z6 = z2l + 1/2rthin*sw;
+ z9 = (width/2, height) + overshoot*se;
+
+ z10 = (0.5w, -0.5h);
+ z11 = (0, 0);
+ z12 = (w, 0);
+
+ fill z1l {se}..{se} z6 .. z3l .. z3r.. z9{nw} ..{nw} z1r.. cycle;
+
+ pickup pencircle scaled rthin;
+ draw z3 -- z10 -- z11;
+ draw z10 -- z12;
+ enddef;
+
+fet_beginchar("Arpeggio arrow down", "arrowdown", "arrowdown");
+ draw_arpeggio_arrow;
+fet_endchar;
+
+fet_beginchar("Arpeggio arrow up", "arrowup", "arrowup");
+ draw_arpeggio_arrow;
+ currentpicture := currentpicture scaled -1 shifted (0.8staff_space, staff_space);
+fet_endchar;
+
+
+def draw_chordbrace_end =
+ save thinness;
+ set_char_box(0, staff_space#, 0, staff_space#);
+ pickup pencircle scaled stemthickness;
+ bot rt z1 = (w, -h);
+ bot lft z2 = (0, -h);
+ top lft z3 = (0, h);
+ draw z1 -- z2 -- z3;
+enddef;
+
+fet_beginchar("Bottom of chord brace", "bracebottom", "bracebottom");
+ draw_chordbrace_end;
+ labels (1, 2, 3);
+fet_endchar;
+
+fet_beginchar("Top of chord brace", "bracetop", "bracetop");
+ draw_chordbrace_end;
+ y_mirror_char;
+fet_endchar;
+
+%% Same as a note stem, but only a staff-space long.
+fet_beginchar("chord brace segment (up)", "braceseg", "braceseg")
+ set_char_box(stemthickness#/2, stemthickness#/2, 0, staff_space#);
+ pickup pencircle scaled stemthickness;
+ bot lft z1 = (0, 0);
+ top lft z2 = (0, h);
+ draw z1 -- z2;
+fet_endchar;
+
% Extendable Trill symbol.
% Not yet used
% Rename me to Trill, rename Trill to Tr?
(X-offset-callbacks . (,Side_position_interface::aligned_side))
(direction . -1)
(staff-position . 0.0)
+ (arpeggio-type . plain)
(meta . ,(grob-description "Arpeggio" arpeggio-interface side-position-interface font-interface))
))
(grob-property-description 'arch-width number? "width of the hook of a system brace.")
(grob-property-description 'arithmetic-basicspace number? "see @ref{spacing-spanner-interface}.")
(grob-property-description 'arithmetic-multiplier number? "see @ref{spacing-spanner-interface}.")
+(grob-property-description 'arpeggio-type symbol? "Type of arpeggio.
+up: a squiggly line with upward arrow,
+down: a squiggly line with upward arrow,
+bracket: a square bracket,
+plain: a plain squiggly line (default)")
(grob-property-description 'attachment pair? "cons of symbols, '(LEFT-TYPE . RIGHT-TYPE), where both types may be alongside-stem, stem, head or loose-end.")
(grob-property-description 'stem-attachment-function procedure? "Where