+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.
@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}
skipBars = ##t
midiInstrument = #"french horn"
RehearsalMark \override #'font-series = #'bold
+ Stem \override #'thickness = #1.3
}
\translator { \StaffContext
MinimumVerticalExtent = #'(-4.5 . 4.5)
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"
[c (e] )g2 \grace { \longgrace f16( \endlonggrace } [)e8( d16 )c]
< d1-\trill (
- { s2. \grace { [c16 d] } } >
+ { s2 \grace { [c16 d] } } >
) c4 r r2
R1 |
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
[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-.]
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 |
[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.
)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]
--- /dev/null
+\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
+ }
+ }
--- /dev/null
+\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
+ }
+ }
"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");
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.
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))
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);
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));
}
}
}
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))
{
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_);
{
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
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,
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]
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;
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,
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#;
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;
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#);
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;
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;
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);
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;
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)}
pickup pencircle scaled hair_thick;
- lft x6 = - uitschieter;
+ lft x6 = x2l - uitschieter;
y6 = y5 ; % - 1/20 ex;
z7 = z5 + whatever*dir krul_ang;
%
fet_beginchar( "Natural", "0", "natural")
- save height;
+ save height, xcenter;
save interbeam, interstem, beamheight, beamwidth,
stemwidth;
save top_stem_thick;
(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))))
))