]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.19
authorfred <fred>
Sat, 21 Dec 1996 12:27:39 +0000 (12:27 +0000)
committerfred <fred>
Sat, 21 Dec 1996 12:27:39 +0000 (12:27 +0000)
dimen.tex
lilyponddefs.tex
src/texbeam.cc

index 962ec5d5b7227b501164cb65d229b74d135dda41..f1c9bad68672f9b4c6569d3524cd9d1a0f838e6d 100644 (file)
--- a/dimen.tex
+++ b/dimen.tex
@@ -1,4 +1,4 @@
-\font\musicfnt=musix16
+\font\musicfnt=musix20
 \font\slurfont=xslhu20
 \def\thefont{\musicfnt}
 
index 5f42c07c51fd6b3ca185b18439abbb7e66eb9336..0c70462bc0a87a8c7b14816fde2e75ddbf2f3299 100644 (file)
@@ -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
 }
 
        \advance\interstaffrule by-\staffrulethickness
        \divide\interstaffrule by 4
        \advance\interstaffrule by -\staffrulethickness
+       \notewidthhalf=\notewidth
+       \notewidthdouble=\notewidth
+       \divide \notewidthhalf by 2
+       \multiply \notewidthdouble by 2
 }
 
 
        }}
 
 \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
 \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}
 
 
 
index 87967119b1a098e2469b299a74a90f0a2ed059e6..5c082be66992d5eea6fe644ee8f4f19edbd95850 100644 (file)
@@ -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;