if (str == "||:")
str = "|:";
+ if (str == "|S" || str == "S|")
+ str = "S";
+
if (str == "")
{
Stencil empty = Lookup::blank (Box (Interval (0, 0), Interval (-h / 2, h / 2)));
/*
should align to other side? this never appears
on the system-start?
- */
m.add_at_edge (X_AXIS, RIGHT, thin, 0);
m.add_at_edge (X_AXIS, RIGHT, thin, thinkern);
+ */
+ m.add_at_edge (X_AXIS, LEFT, thin, thinkern / 2);
+ m.add_at_edge (X_AXIS, RIGHT, thin, thinkern / 2);
+ }
+ else if (str.find ("S") != NPOS || str == "|._.|")
+ {
+ // Handle all varsegno stuff
+ Stencil segno;
+ segno.add_at_edge (X_AXIS, LEFT, thin, thinkern / 2);
+ segno.add_at_edge (X_AXIS, RIGHT, thin, thinkern / 2);
+ segno.add_stencil (Font_interface::get_default_font (me)->find_by_name ("scripts.varsegno"));
+
+ if (str == "S")
+ {
+ m.add_stencil (segno);
+ }
+ else if (str == "S|:" || str == ".S|:")
+ {
+ m.add_at_edge (X_AXIS, RIGHT, thick, 0);
+ m.add_at_edge (X_AXIS, RIGHT, thin, kern);
+ m.add_at_edge (X_AXIS, RIGHT, colon, kern);
+ m.add_at_edge (X_AXIS, LEFT, segno, thinkern);
+ }
+ else if (str == ":|S" || str == ":|S.")
+ {
+ m.add_at_edge (X_AXIS, LEFT, thick, 0);
+ m.add_at_edge (X_AXIS, LEFT, thin, kern);
+ m.add_at_edge (X_AXIS, LEFT, colon, kern);
+ m.add_at_edge (X_AXIS, RIGHT, segno, thinkern);
+ }
+ else if (str == ":|S|:" || str == ":|S.|:")
+ {
+ m.add_at_edge (X_AXIS, LEFT, thick, 0);
+ m.add_at_edge (X_AXIS, LEFT, thin, kern);
+ m.add_at_edge (X_AXIS, LEFT, colon, kern);
+ m.add_at_edge (X_AXIS, RIGHT, segno, thinkern);
+ m.add_at_edge (X_AXIS, RIGHT, thick, thinkern);
+ m.add_at_edge (X_AXIS, RIGHT, thin, kern);
+ m.add_at_edge (X_AXIS, RIGHT, colon, kern);
+ }
+ else if (str == "|._.|") // :|S|: or :|S.|: without segno and colon
+ {
+ // get the width of the segno sign
+ Real segno_width = segno.extent (X_AXIS).length ();
+ m.add_at_edge (X_AXIS, LEFT, thick, 0);
+ m.add_at_edge (X_AXIS, LEFT, thin, kern);
+ m.add_at_edge (X_AXIS, RIGHT, thick, segno_width + 2 * thinkern);
+ m.add_at_edge (X_AXIS, RIGHT, thin, kern);
+ }
+ // end varsegno block
}
else if (str == ":")
{
" is a string which specifies the kind of bar line to print."
" Options are @code{|}, @code{:|}, @code{|:}, @code{:|:}, @code{:|.|:},"
" @code{:|.:}, @code{.}, @code{||}, @code{|.}, @code{.|}, @code{.|.},"
- " @code{|.|}, @code{:}, @code{dashed} and @code{'}.\n"
+ " @code{|.|}, @code{:}, @code{dashed}, @code{'} and @code{S}.\n"
"\n"
"These produce, respectively, a normal bar line, a right repeat, a left repeat,"
" a thick double repeat, a thin-thick-thin double repeat,"
" a thin-thick double repeat, a thick bar, a double bar, a start bar,"
" an end bar, a thick double bar, a thin-thick-thin bar,"
- " a dotted bar, a dashed bar, and a tick."
- " In addition, there is an option"
+ " a dotted bar, a dashed bar, a tick as bar line and a segno bar.\n"
+ "\n"
+ "In addition, there is an option"
" @code{||:} which is equivalent to @code{|:} except at line"
" breaks, where it produces a double bar (@code{||}) at the"
" end of the line and a repeat sign (@code{|:}) at the"
" beginning of the new line.\n"
"\n"
+ "For segno, @code{S} produces a segno sign except at line breaks,"
+ " where it produces a double bar (@code{||}) at the"
+ " end of the line and a segno sign at the beginning of the new line."
+ " @code{|S} is equivalent to @code{S} but produces a simple bar line"
+ " (@code{|}) instead of a double bar line (@code{||}) at line breaks."
+ " @code{S|} produces the segno sign at line breaks and starts the following"
+ " line without special bar lines.\n"
+ "\n"
+ "@code{S|:} and @code{:|S} are used for repeat/segno combinations that are"
+ " separated at line breaks. Alternatively, @code{.S|:} and @code{:|S.}"
+ " may be used which combine repeat signs and segno at the same line in"
+ " case of a line break. @code{:|S|:} is a combination of a left repeat"
+ " (@code{:|}), a segno (@code{S}) and a right repeat @code{|:} which"
+ " splits before the segno at line breaks; @code{:|S.|:} splits after"
+ " the segno sign.\n"
+ "\n"
"If @var{bartype} is set to @code{empty} then nothing is"
" printed, but a line break is allowed at that spot.\n"
"\n"
penlabels (range 1 thru 8);
fet_endchar;
+fet_beginchar ("Varied Segno", "varsegno");
+ save ht, wd, loopdist, loopangle;
+ save thin, med, thick;
+ save bulbradius;
+
+ ht# = 8 staff_space#;
+ wd# = 2.5 staff_space#;
+
+ set_char_box (wd# / 2, wd# / 2, ht# / 2, ht# / 2);
+ %set_char_box (0, 0, ht# / 2, ht# / 2);
+
+ loopdist = 4/3 staff_space;
+ loopangle = 35;
+
+ thick = 1/2 staff_space;
+ med = 1/4 staff_space;
+ thin = 1/10 staff_space;
+
+ x1 = staff_space;
+ y1 = 13/4 staff_space;
+ penpos1 (med, 210);
+
+ z2l = (0, 4 staff_space);
+ penpos2 (med, 270 - loopangle);
+
+ x3 = -x1;
+ y3 = y1 + 1/4 staff_space;
+ penpos3 (med, 270 + loopangle);
+
+ pair center;
+ center = (0, 2 staff_space);
+ z4 = (3/4 staff_space, 2 staff_space) rotatedabout (center, 180 - loopangle);
+ z5 = 2[z4,center];
+ x9 = x4; y9 = y4 - 2 loopdist;
+ x10 = x5; y10 = y5 - 2 loopdist;
+ penpos4 (thick, 90 - loopangle);
+ penpos5 (thick, 90 - loopangle);
+ penpos9 (thick, 90 - loopangle);
+ penpos10 (thick, 90 - loopangle);
+
+ z6 = (4/3 staff_space, 4/3 staff_space) rotatedabout (2/3 center, -loopangle);
+ x11 = x6; y11 = y6 - 2 loopdist;
+ penpos6 (thin, -loopangle);
+ penpos11 (thin, -loopangle);
+
+ z7 = 1/3 center;
+ penpos7 (thick, 270 - loopangle);
+
+ z8 = (4/3 staff_space, 0) rotated (180 - loopangle);
+ penpos8 (thin, -loopangle);
+
+ z12 = -center;
+ penpos12 (thick, 270 - loopangle);
+
+ z1' = 4/3[z1l,z1r];
+ bulbradius = length ( z1l - z1');
+ pickup pencircle scaled 2 bulbradius;
+ drawdot z1';
+
+ penstroke z1e
+ .. z2e
+ .. z3e
+ .. z4e{dir (-loopangle)}
+ .. z5e{dir (-loopangle)}
+ .. z6e
+ .. z7e
+ .. z8e
+ .. z9e{dir (-loopangle)}
+ .. z10e{dir (-loopangle)}
+ .. z11e
+ .. {dir (180 - loopangle)}z12e;
+ addto currentpicture also currentpicture scaled -1;
+
+ penlabels (1, 1', 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
+ %draw_staff (-2, 2, 0);
+fet_endchar;
+
+
fet_beginchar ("Coda", "coda");
save stickout, thin, thick, codawidth, codaheight;