From: fred Date: Sat, 21 Dec 1996 12:27:39 +0000 (+0000) Subject: lilypond-0.0.19 X-Git-Tag: release/1.5.59~6523 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=cd69f74df2b45ec8adcd50aa9c7300ff2929424c;p=lilypond.git lilypond-0.0.19 --- diff --git a/dimen.tex b/dimen.tex index 962ec5d5b7..f1c9bad686 100644 --- a/dimen.tex +++ b/dimen.tex @@ -1,4 +1,4 @@ -\font\musicfnt=musix16 +\font\musicfnt=musix20 \font\slurfont=xslhu20 \def\thefont{\musicfnt} diff --git a/lilyponddefs.tex b/lilyponddefs.tex index 5f42c07c51..0c70462bc0 100644 --- a/lilyponddefs.tex +++ b/lilyponddefs.tex @@ -8,6 +8,9 @@ \newdimen\interlinedist \newcount\n \newdimen\balkhoog + \newdimen\notewidth + \newdimen\notewidthhalf + \newdimen\notewidthdouble \newdimen\staffrulethickness \newdimen\interstaffrule @@ -21,6 +24,7 @@ \font\hslurhfont=xslhz20 \font\musicfnt=musix20 \balkhoog=20pt + \notewidth=6pt \staffrulethickness=0.4pt \musixcalc @@ -36,7 +40,7 @@ \font\musicfnt=musix16 \balkhoog=16pt \staffrulethickness=0.4pt - + \notewidth=5pt \musixcalc } @@ -45,6 +49,10 @@ \advance\interstaffrule by-\staffrulethickness \divide\interstaffrule by 4 \advance\interstaffrule by -\staffrulethickness + \notewidthhalf=\notewidth + \notewidthdouble=\notewidth + \divide \notewidthhalf by 2 + \multiply \notewidthdouble by 2 } @@ -119,9 +127,9 @@ }} \def\toplines#1{ % why space needed here? - \vbox to 0pt{\hbox{\kern-6pt\lines{#1}{12pt}}\vss}} + \vbox to 0pt{\hbox{\kern-\notewidth\lines{#1}{\notewidthdouble}}\vss}} \def\botlines#1{ % idem ditto - \vbox to 0pt{\vss\hbox{\kern-6pt\lines{#1}{12pt}}}} + \vbox to 0pt{\vss\hbox{\kern-\notewidth\lines{#1}{\notewidthdouble}}}} % % a staffsymbol with #1 lines, width #2 @@ -140,9 +148,9 @@ \def\csixteenthrest{\vcenter\sixteenthrest} \def\cthirtysecondrest{\vcenter\thirtysecondrest} -\def\lsingledot{\kern-6pt\singledot} -\def\ldoubledot{\kern-6pt\doubledot} -\def\ltripledot{\kern-6pt\tripledot} +\def\lsingledot{\kern-\notewidth\singledot} +\def\ldoubledot{\kern-\notewidth\doubledot} +\def\ltripledot{\kern-\notewidth\tripledot} diff --git a/src/texbeam.cc b/src/texbeam.cc index 87967119b1..5c082be669 100644 --- a/src/texbeam.cc +++ b/src/texbeam.cc @@ -66,31 +66,32 @@ Lookup::beam(Real &slope, Real width) int sidx = slope_index(slope); if (!slope) return rule_symbol(convert_dimen(2,"pt"), width); - - Real w = width; + if (width < convert_dimen(2,"pt")) + error("Beam too narrow. " ); + Real elemwidth = convert_dimen(64,"pt"); int widx = 5; Molecule m; - Real dy=0; - Real minwid =convert_dimen(2,"pt"); - assert(w > minwid); - while (w > minwid) { - while (elemwidth > w) { - widx --; - elemwidth /= 2.0; - } - - Atom a(beam_element(sidx, widx, slope)); - a.translate(Offset(0, dy)); - m.add_right(a); - dy += elemwidth*slope; - w -= elemwidth; + + while (elemwidth > width) { + widx --; + elemwidth /= 2.0; } - - widx = 0; - Atom a(beam_element(sidx, widx, slope)); - a.translate(Offset(width -minwid, (width-minwid) * slope)); + Real overlap = elemwidth/4; + Real last_x = width - elemwidth; + Real x = overlap; + Atom elem(beam_element(sidx, widx, slope)); + Atom a(elem); + m.add(a); + while (x < last_x) { + a=elem; + a.translate(Offset(x-overlap, (x-overlap)*slope)); + m.add(a); + x += elemwidth - overlap; + } + a=elem; + a.translate(Offset(last_x, (last_x) * slope)); m.add(a); Symbol ret;