]> git.donarmstrong.com Git - lilypond.git/commitdiff
''
authorhanwen <hanwen>
Fri, 29 Mar 2002 01:07:09 +0000 (01:07 +0000)
committerhanwen <hanwen>
Fri, 29 Mar 2002 01:07:09 +0000 (01:07 +0000)
17 files changed:
ChangeLog
Documentation/regression-test.tely
input/mozart-hrn-3.ly
input/mozart-hrn3-allegro.ly
input/mozart-hrn3-rondo.ly
input/regression/spacing-note-flags.ly [new file with mode: 0644]
input/regression/spacing-rest.ly [new file with mode: 0644]
lily/multi-measure-rest.cc
lily/note-spacing.cc
lily/spacing-spanner.cc
lily/stem.cc
mf/feta-banier.mf
mf/feta-eindelijk.mf
mf/feta-generic.mf
mf/feta-schrift.mf
mf/feta-toevallig.mf
scm/grob-description.scm

index f08663ac0dbe94d3084e78554c0a9eaea1f7a42e..c8d2c8506497fcb51d0818766cbae0b6d2295984 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2002-03-29  Han-Wen  <hanwen@cs.uu.nl>
+
+       * input/regression/spacing-note-flags.ly: new file
+
+       * input/regression/spacing-rest.ly: new file
+
+       * mf/feta-eindelijk.mf: make bbox of quarter rest tighter.
+
+       * lily/spacing-spanner.cc (note_spacing): make note spacing after
+       all grace notes tight (not only the column directly following a
+       grace note).
+
+       * scm/grob-description.scm (all-grob-descriptions): don't make
+       mm-rests larger than normal.
+
+       * mf/feta-banier.mf: make upflag narrower. Make end of flag more
+       curved. Remove white space at the right of flags.
+
 2002-03-28  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * ports/ports.make: Bugfix: ignore CVS directories.
index 4b1531f563db068367f631012cc78eb8ceda6ff1..141cbd18b5d2c9231f8c9749b0e73f76eb4ddd3c 100644 (file)
@@ -255,6 +255,10 @@ Grace note do weird things with timing. Fragile.
 
 @lilypondfile[printfilename]{spacing-individual-tuning.ly}
 
+@lilypondfile[printfilename]{spacing-note-flags.ly}
+
+@lilypondfile[printfilename]{spacing-rest.ly}
+
 @lilypondfile[printfilename]{lyrics-bar.ly}
 
 @lilypondfile[printfilename]{spacing-knee.ly}
index 9c2fc28ff6d177cd5d141f816a68343b75f5494e..6543c0813d3d73c4737cd17653d1d6da948fb6b3 100644 (file)
@@ -43,6 +43,7 @@ ritenuto = \textscript #'(italic  "rit.")
        skipBars = ##t
        midiInstrument = #"french horn"
        RehearsalMark \override #'font-series = #'bold
+       Stem \override #'thickness = #1.3
   }
  \translator { \StaffContext
               MinimumVerticalExtent = #'(-4.5 . 4.5)
index 7c4de9cc58fcdd9bad2b5ec41488aeb393957b58..fcead2faa74cd44e7db27a2df0a3c49d504dbcd3 100644 (file)
@@ -55,7 +55,8 @@ allegro =
        d4. [e16 fis] [g () fis e d] [c() b a g]
        \endcresc
        < a1(-\trill
-         { s2. \grace{ [g16 a] } } >
+1        { s2 \grace{ [g16 a] } } >
+       \mark "C"
        )g4 r r2
        R1*15
        \mark "D"
@@ -125,7 +126,7 @@ allegro =
        [c (e] )g2 \grace  { \longgrace f16(  \endlonggrace }  [)e8( d16 )c]
 
        < d1-\trill (
-         { s2. \grace { [c16 d] } } >
+         { s2 \grace { [c16 d] } } >
        
        ) c4 r r2
        R1 |
@@ -137,11 +138,11 @@ allegro =
        g4 r8 g'\f [a b c d]|
 
        < d1(-\trill
-         { s2. \grace { [c16 d] } }  >
+         { s2 \grace { [c16 d] } }  >
        )c4 r r2
        R1*3
 
-       c4._"Cadenza ad lib." () d8 d4.-\trill ( [c16 )d] 
+       c4.^\fermata_"Cadenza ad lib." () d8 d4.-\trill^\fermata ( [c16 )d] 
        c4 r r2
        R1*8
        r4 [c8.^"tutti"-\f c16] c4 c
index 8f2c1754734d6fd339e40e2e300152fd89999e35..5aee2407f10efa38c8434d8d4165f6d7b72d48d0 100644 (file)
@@ -76,7 +76,7 @@ rondo = \notes        \relative c'
        [b () e d] [c b a]
        \mark "C"
        g4 r8 r4 r8
-       r2. |
+       R2. |
        %
        r8 [g g] [g( )b b]
        [b()d d-.] [d()g g-.]
@@ -102,7 +102,7 @@ rondo = \notes      \relative c'
        r4 r8 r4 c'8
        b4()c8 b4()c8
        bes4. ~ bes4 g8
-       a4 c8 [f () d b]
+       a4 c8 [f () d b!]
        d4. () c8 r r
        \mark "E"
        R2.*9  |
@@ -110,11 +110,11 @@ rondo = \notes    \relative c'
        [c8 c' c] c4.~
        [c8 c d] [e e fis] 
        g4 r8 r4 r8
-       r2.
+       R2.
        r8 [g, g] [g g g] |
        es'4. ~ [es8 d c]
        b4 r8 r4 r8
-       r2. |
+       R2. |
        r8 [g g] [g g g]
        es'4. ~ [es8 d c]
        \cresc b4.  c4. d4. e4.
@@ -155,7 +155,7 @@ rondo = \notes      \relative c'
        
        )c4 r8 r4 r8
        R2.*5
-       r8 r8-\fermata d8\p [d e f]
+       r8 r8^\fermata d8\p [d e f]
        [g ()e c] [d()e d]
        \cresc [c  c c] [d e f]
        [g()e c] [d()e d]
diff --git a/input/regression/spacing-note-flags.ly b/input/regression/spacing-note-flags.ly
new file mode 100644 (file)
index 0000000..a558cd4
--- /dev/null
@@ -0,0 +1,17 @@
+\header {
+
+texidoc = "The flags of 8th notes take some space, but not
+    too much: the space following a flag is less than the space
+    following a beamed 8th head"
+
+}
+
+\score { \notes \relative c'' \context Staff {
+    \property Voice.noAutoBeaming = ##t
+    [a8 a8 a8 a8] a8 a8 a8 a8
+}
+\paper {
+%stafflinethickness = 0.0
+linewidth = -1
+    }
+     }
diff --git a/input/regression/spacing-rest.ly b/input/regression/spacing-rest.ly
new file mode 100644 (file)
index 0000000..a5aee6c
--- /dev/null
@@ -0,0 +1,15 @@
+\header {
+    texidoc = "Rests get a little less space, since they are narrower.
+However, the feta quarter rest is relatively wide, causing this effect to be
+very small.
+"
+    }
+\score { \notes \relative c'' \context Staff {
+    \time 12/4
+    r4 c4 c4 c4 r4 r4 c4
+}
+\paper {
+%stafflinethickness = 0.0
+linewidth = -1
+    }
+     }
index d3f9e812210e60220acc86fc2efd421420820703..1549cf727c2e0c505be70cb7b79722c439dfbf47 100644 (file)
@@ -327,7 +327,6 @@ ADD_INTERFACE (Multi_measure_rest,"multi-measure-rest-interface",
   "A rest that spans a whole number of measures.  For typesetting the
 numbers, fields from font-interface may be used.
 
-padding is the space between number and rest. Measured in staffspace.
 
 ",
-  "thickness measure-count expand-limit padding");
+  "thickness measure-count expand-limit");
index cd05e16f5b031dd8d9533e2a959f05ef5189e252..9126fc728ad667756e3a40fedb55d1b2a3af2d06 100644 (file)
@@ -34,17 +34,19 @@ Note_spacing::get_spacing (Grob *me, Item* right_col,
   Direction d = LEFT;
   Direction col_dir =  right_col->break_status_dir ();
   Drul_array<Interval> extents;
+
+  Interval left_head_wid; 
   do
     {
       for (SCM  s = props[d]; gh_pair_p (s); s = gh_cdr (s))
        {
          Item * it= dynamic_cast<Item*> (unsmob_grob (gh_car(s)));
-
+         
          if (d == RIGHT && it->break_status_dir () != col_dir)
            {
              it = it -> find_prebroken_piece (col_dir);
-           }
 
+           }
          /*
            some kind of mismatch, eg. a note column, that is behind a
            linebreak.
@@ -52,7 +54,8 @@ Note_spacing::get_spacing (Grob *me, Item* right_col,
          if (!it)
            continue; 
 
-         if (d == RIGHT && right_col != it->column_l ())
+         Item *it_col = it->column_l ();
+         if (d == RIGHT && right_col != it_col)
            continue;
          
          if (Separation_item::has_interface (it))
@@ -60,8 +63,19 @@ Note_spacing::get_spacing (Grob *me, Item* right_col,
              extents[d].unite (Separation_item::my_width (it));
              continue;
            }
+
+         if (d == LEFT)
+           {
+             SCM r = it->get_grob_property ("rest");
+             Grob * g = unsmob_grob (r);
+             if (!g)
+               g =  Note_column::first_head (it);
+
+             if (g)
+               left_head_wid = g->extent(it_col, X_AXIS);
+           }
          
-         extents[d].unite (it->extent (it->column_l (), X_AXIS));
+         extents[d].unite (it->extent (it_col, X_AXIS));
          if (d == RIGHT)
            {
              Grob * accs = Note_column::accidentals (it);
@@ -69,7 +83,7 @@ Note_spacing::get_spacing (Grob *me, Item* right_col,
                accs = Note_column::accidentals (it->get_parent (X_AXIS));
              
              if (accs)
-               extents[d].unite (accs->extent (it->column_l (), X_AXIS));
+               extents[d].unite (accs->extent (it_col, X_AXIS));
            }
        }
 
@@ -78,8 +92,18 @@ Note_spacing::get_spacing (Grob *me, Item* right_col,
     }
   while (flip (&d) != LEFT);
 
-  *fixed = (extents[LEFT][RIGHT] >? increment);
-  *space = (base_space - increment) + *fixed ;
+
+  /*
+    We look at the width of the note head, since smaller heads get less space
+    eg. a quarter rest gets almost 0.5 ss less horizontal space than a note.
+
+    What is sticking out of the note head (eg. a flag), doesn't get
+    the full amount of space.
+  */
+  *fixed = left_head_wid.empty_b () ? increment : left_head_wid[RIGHT];
+  *space = (base_space - increment) + *fixed +
+    (extents[LEFT][RIGHT] - left_head_wid[RIGHT])/ 2;
+    ;
 
   if (*space - *fixed < 2 * ((- extents[RIGHT][LEFT]) >? 0))
     {
index 674681f44f00e74fea46748f5f03f98da54a904c..fd9585f1352e2b8dfe2af52a136b3cacbe2c7b0e 100644 (file)
@@ -700,11 +700,14 @@ Spacing_spanner::note_spacing (Grob*me, Grob *lc, Grob *rc,
       programming_error ("can't find a ruling note at " + Paper_column::when_mom (lc).str ());
       shortest_playing_len = 1;
     }
-  
-  Moment delta_t = Paper_column::when_mom (rc) - Paper_column::when_mom (lc);
+
+  Moment lwhen = Paper_column::when_mom (lc);
+  Moment rwhen =  Paper_column::when_mom (rc);
+
+  Moment delta_t = rwhen - lwhen;
   Real dist = 0.0;
 
-  if (delta_t.main_part_)
+  if (delta_t.main_part_ && !lwhen.grace_part_)
     {
       dist = get_duration_space (me, shortest_playing_len, shortest.main_part_, expand_only);
       dist *= (double) (delta_t.main_part_ / shortest_playing_len.main_part_);
index 91fe78c888f2994e9d6b7d8ca6d6ce029d84e96c..79823a10923942f0212c7e8c62b50cac4a369883 100644 (file)
@@ -229,15 +229,6 @@ Stem::add_head (Grob*me, Grob *n)
     {
       Pointer_group_interface::add_grob (me, ly_symbol2scm ("heads"), n);
     }
-  else
-    {
-      /*
-       Apparently, this is never used.
-       */
-#if 0
-      me->set_grob_property ("rest", n->self_scm ());
-#endif
-    }
 }
 
 bool
index 93ab0682f12cb44dfa9acec214cbb57473df9318..d15a6b7cf02344095c41399ae9e0c47d968e6274 100644 (file)
@@ -5,13 +5,14 @@
 fet_begingroup("flags")
 save outer_path;
 path outer_path;
+
 % Flags pointing down overlap with  the notehead (in x-direction), so 
 % the down-flag can be bigger
-upflag_width# = .750 black_notehead_width# + stemthickness#/2;
+upflag_width# = .650 black_notehead_width# + stemthickness#/2;
 downflag_width# = .833 black_notehead_width# + stemthickness#/2;
 
-right_upflag_space# = .2 upflag_width#;
-right_downflag_space# = .2 downflag_width#;
+right_upflag_space# = .0 upflag_width#;
+right_downflag_space# = .0 downflag_width#;
 
 %
 % Flags pointing down cannot overlap with the notehead in y-direction,
@@ -25,7 +26,7 @@ right_downflag_space# = .2 downflag_width#;
 
 save hip_thickness, foot_thickness;
 hip_thickness# = 1.3 stemthickness#;
-foot_thickness# =  hip_thickness#;
+foot_thickness# =  1.0 hip_thickness#;
 
 %
 % Inspired by Adobe Sonata and [Wanske]
@@ -35,22 +36,23 @@ foot_thickness# =  hip_thickness#;
 def draw_flag(expr center, flare, 
        dims, hip_depth, foot_wid, hip_thickness, foot_thickness)=
        clearxy;
-
+       save c ;
+       c = 0.7;
        penpos1(flare, 90);
        penpos2(whatever, 0);
        x2r - x2l = hip_thickness;
-       penpos3(foot_thickness, 0) ;
+       penpos3(foot_thickness, 0.0) ;
 
        z1r  = center;
        z2r = center + (xpart dims, -ypart(dims) * hip_depth);
        z3r = center + (xpart(dims) * foot_wid, -ypart dims);
 
-       outer_path := z3r{curl 0} .. z2r{up} .. {up}z1r;
+       outer_path := z3r{curl c} .. z2r{up} .. {up}z1r;
 
        penlabels(1, 2, 3);
        fill z1l{curl 0}
                ..tension 1.1 .. z2l{down} .. 
-               {curl 0} simple_serif(z3l, z3r, 80) &
+               {curl c} simple_serif(z3l, z3r, 80) &
                outer_path & z1r -- cycle;
 enddef;
 
@@ -107,7 +109,7 @@ fet_beginchar("8th Flag (up)", "u3", "eighthflag")
        foot_depth# =  3 staff_space#;
 
        set_char_box(stemthickness# /2, hip_width# 
-               + stemthickness#/2 + right_upflag_space#, 
+               + stemthickness#/2 + right_upflag_space#, 
                 foot_depth# + foot_thickness#/2, stemthickness#/2)
 
        define_pixels(flare, hip_width, hip_thickness,
index 2a3bb4fa776c89df7064299bcdd155e59282ee5c..e2709e6d388d7cf32cae965f2a6d39edbf8832ed 100644 (file)
@@ -38,6 +38,10 @@ ball_crook_balldiam =flare;
 
 save block_rest_y, block_rest_x;
 
+save breve_rest_y, breve_rest_x;
+
+breve_rest_y# =  staff_space#;
+breve_rest_x# = 3/5 staff_space#;
 block_rest_y# = 5/8 staff_space#;
 block_rest_x# = 3/2 staff_space#;
 
@@ -88,21 +92,18 @@ fet_beginchar("half rest (outside staff)", "1o", "outsidehalfrest");
 fet_endchar;
 
 
-save breve_rest_y, breve_rest_x;
-
-breve_rest_y# =  staff_space#;
-breve_rest_x# = 3/5 staff_space#;
 
 define_pixels(breve_rest_y, breve_rest_x, multi_rest_x, multi_beam_height);
 
-fet_beginchar("breve rest", "-1", "breverest");
-       set_char_box(0, breve_rest_x#, 0, breve_rest_y#);
-       draw_block ((0,0), (breve_rest_x, breve_rest_y));
-fet_endchar;
 
 fet_beginchar("longa rest", "-2", "longarest");
        set_char_box(0, breve_rest_x#, breve_rest_y#, breve_rest_y#);
-       draw_block ((0,-breve_rest_y), (breve_rest_x, breve_rest_y));
+       draw_block ((0,-floor (breve_rest_y)), (breve_rest_x, floor (breve_rest_y)));
+fet_endchar;
+
+fet_beginchar("breve rest", "-1", "breverest");
+       set_char_box(0, breve_rest_x#, 0, breve_rest_y#);
+       draw_block ((0,0), (breve_rest_x, floor (breve_rest_y)));
 fet_endchar;
 
 tracingvariables := 1;
@@ -114,9 +115,10 @@ fet_beginchar("Quarter rest","2","quartrest");
        yshift# = -1.25 staff_space#;
        height# = 2.8125 staff_space#;
        define_pixels (yshift, height);
-
+       save xcenter;
+       xcenter = -0.1 staff_space;
        
-       set_char_box(0, 27/25staff_space#,
+       set_char_box(0, 0.95 staff_space#,
          -yshift#,
          yshift# + height#);
        
@@ -141,15 +143,15 @@ fet_beginchar("Quarter rest","2","quartrest");
        z13=z2r+1/2rthin*ne+1/2rthin*nw;
 
        y1r = h;
-       x1l=1/3staff_space;
+       x1l=xcenter +  1/3staff_space;
        z2r=z1+staff_space*se;
        z3=1/2[z2,z4];
-       x4=3/8staff_space;
+       x4= xcenter + 3/8staff_space;
        y4= 0;
        z5=z4l+1.3staff_space*se;
        x6l=x4l;
        y6l=y4r;
-       x7=2/5staff_space;
+       x7= xcenter + 2/5staff_space;
        y7= -d;
        
        fill z1l{se}..{se}z10..z3l..z11{se}..{se}z5l..z5r{nw}..{nw}z12..z3r..z13{nw}..{nw}z1r.. cycle;
index b00d089e27a34b4cbbbc2c3bd98557c4d399a41b..a670f7194275857ca79e018c5e406d170960ceb5 100644 (file)
@@ -39,8 +39,8 @@ if test = 0:
        input feta-solfa;
        
 else:
-%      input feta-bolletjes;   
-%      input feta-banier;
+       input feta-bolletjes;   
+       input feta-banier;
 %      input feta-eindelijk;
 %      input feta-klef;
 %      input feta-toevallig;
index 98ade6dbf9a15a2524c97d3b02947d880978c8e5..1d6c1e68510df2ce75312391a94b90acfb92dc78 100644 (file)
@@ -166,7 +166,7 @@ fet_endchar;
 
 fet_beginchar("portato/single tenuto", "tenuto", "tenuto")
        save thick;
-       thick# = 1.4 stafflinethickness#;
+       thick# = 1.6 stafflinethickness#;
        define_whole_pixels(thick);
 
        set_char_box(.6 staff_space#, .6 staff_space#, thick#/2,thick#/2);
@@ -452,16 +452,20 @@ fet_beginchar("Trill (`tr')","trill","trill")
        currenttransform := currenttransform slanted slant shifted (- staff_space, 0)  ;
 
        y1 = ascender;
-       x1l = 0;
-       x1r = t_fatness;
+
+       % try to position in such a way that the center is the visual
+       % center
+
+       x1l = 0.2 staff_space;
+       x1r - x1l = t_fatness;
        penpos1(start_nib_wid, start_nib_angle);
        
        z2 = (x1, 7/18 ex);
        penpos2(start_nib_wid, start_nib_angle);
 
-       z3l = (0.5 t_width, - t_overshoot);
+       z3l = (x2l + 0.5 t_width, - t_overshoot);
 
-       z4l = (t_width, 0.23 ex);
+       z4l = (x2l + t_width, 0.23 ex);
        penpos4(whatever, 200);
        x4l - x4r = hair_thick;
 
@@ -473,7 +477,7 @@ fet_beginchar("Trill (`tr')","trill","trill")
        save t_p, krul_p;
        path t_p, krul_p, r_p;
 
-       z5 = (t_fatness/2, 2/3 ex);
+       z5 = (x2l + t_fatness/2, 2/3 ex);
 %      penpos5(hair_thick, ); 
 
        t_p := z1r{dir (angle(z1l-z1r) + 30)} .. z1l{-dir (angle(z1r-z1l) - 45)}
@@ -491,7 +495,7 @@ fet_beginchar("Trill (`tr')","trill","trill")
 
        pickup pencircle scaled hair_thick;
        
-       lft x6 = - uitschieter;
+       lft x6 = x2l - uitschieter;
        y6 =  y5 ; % - 1/20 ex;
 
        z7 = z5 + whatever*dir krul_ang;
index cd57e956fe82c783101ae35e980f2329cf9abad6..4d6dd6199634b4e50718331533149b24a83100de 100644 (file)
@@ -96,7 +96,7 @@ fet_beginchar("Sharp" , "1", "sharp");
 %
 
 fet_beginchar( "Natural", "0", "natural")
-       save height;    
+       save height, xcenter;
        save interbeam, interstem, beamheight, beamwidth, 
        stemwidth;
        save top_stem_thick;
index 72438a926d3bf9c3e7abfeff0b8b3d238449c634..6425e2e749c637dd8e5ee191ac6d2c0c3160c225 100644 (file)
        (molecule-callback . ,Text_item::brew_molecule)
        (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
        (self-alignment-X . 0)
-
        (no-spacing-rods . #t)
        (script-priority . 100)
        (font-series . bold)
        (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
        (staff-position . 0)
        (expand-limit . 10)
-       (width . 5.5)
        (thickness . 6.6)
-       (padding . 1.5) ; staffspace
        (font-family . number)
-       (font-relative-size . 1)
        (meta . ((interfaces . (multi-measure-rest-interface rest-interface font-interface staff-symbol-referencer-interface))))
        ))