code := 0;
-def draw_brace (expr height_sharp, width_sharp, slt_sharp) =
+def draw_brace (expr height_sharp, width_sharp, slt_sharp) =
+
save pendir, height, width, thin, thick, slt;
save penangle;
height# := height_sharp;
endchar;
enddef;
-l := 0.05pt#;
+
+
+% l is the increment.
+save stafflinethickness;
+save increment;
+
+stafflinethickness := 0.5pt#;
+increment := 0.5pt#;
y := 10pt#;
+
+
for i := 0 step 1 until font_count:
- for j := 0 step 1 until 255:
+
+ %% We can't store more than 64 (65?) height dimensions in a TFM
+ %% file, so we make small files.
+
+ for j := 0 step 1 until 63:
% message "l: "&decimal l;
% note: define_pixels (x) multiplies x by hppp,
% must never get bigger than infinity
- y := min (y + l / 2, infinity/hppp - 1);
+ y := min (y + increment, infinity/hppp - 1);
+
% x should be about one staff space, taking brace to have
% default height of 3 staffs, this yields height / 3 / 4
- x := y / 12;
+ x := y / 15;
% l should be about one stafflinethickness
- l := x / 10;
+
+ increment := x / 10;
+ stafflinethickness := min (0.5pt#, y/120 );
if i = font_count:
- draw_brace (y, x, l);
+ draw_brace (y, x, stafflinethickness);
fi
endfor;
endfor
i = \context Staff \notes\relative c''{
\context Voice=i
- \stemUp
+ \voiceOne
c8.( es16 bes4 ~ | )bes8 r c8.( bes16 | des4 c8. bes16 | c4 ~ ) c8 r |
c4( f,8. as16 | bes4 ~ )bes8 r | f8.( es16 f4 | es )f |
ii = \context Staff \notes\relative c'{
\context Voice=ii
- \stemDown
+ \voiceTwo
r8 <es as> r <des f> | r <es g> r <es as> | r <f as> r <f as> |
r <es g> r <es g> | r <es as> r <as, des> | r <des f> r <des f> |
r <cis e> r <cis e> | r <b d> r <a d> | r <g b> r <a cis> |
r <a cis> r <a cis> |
- \translator Staff=bass\stemUp
+ \translator Staff=bass\voiceOne
r <g b> r <fis a> r <fis a> | r <g bes>
- \translator Staff=treble\stemDown
+ \translator Staff=treble\voiceTwo
r <a c> r <a d> |
r <bes d> r <bes d> | r <g c> r <bes d> | r <c es> r <d g> |
}
\score {
- \context GrandStaff <
+ \context GrandStaff <
\context Staff = treble <
\global
\clef violin
\translator{ \OrchestralScoreContext }
\translator{
\VoiceContext
+ Slur \override #'attachment = #'(stem . stem)
autoBeamSettings \override #'(end 1 8 * *) = #(make-moment 1 4)
autoBeamSettings \override #'(end 1 16 * *) = #(make-moment 1 4)
}