2003-06-15 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ * input/regression/beam-quanting-horizontal.ly: update texidoc
+
+ * scm/define-grobs.scm (all-grob-descriptions): set
+ beamed-extreme-minimum-free-lengths to 1.25 for 32nd beams.
+ This fixes 32nd beams for noteheads in spaces quants.
+
* scripts/lilypond-book.py (process_lilypond_blocks): opps.
2003-06-15 Heikki Junes <hjunes@cc.hut.fi>
like this:
-@c newlines in intertext choke on lilypond.org?
-@lilypond[fragment,verbatim, relative 1, intertext="produces this:"]
+@lilypond[fragment,verbatim, relative 1, intertext="produces this:
+
+"]
\key c \minor r8 c16 b c8 g as c16 b c8 d | g,4
@end lilypond
\version "1.7.18"
\header{
-texidoc = "Test beam quant positions for horizontal beams."
+
+ texidoc = "Test beam quant positions for horizontal beams. Staff
+lines should be covered in all cases. For 32nd beams, the free stem
+lengths are between 2 and 1.5."
+
}
\score{
a,-[ a] c-[ c]
d,8-[ d] g'-[ g]
g,-[ g] d'-[ d]
- c,16-[ c c c] a''-[ a a a]
- a,-[ a a a] c-[ c c c]
+ c,16-[ c] a''-[ a]
+ a,-[ a ] c-[ c]
\break
- c,32-[ c c c c c c c] a''-[ a a a a a a a]
- f,-[ f f f f f f f] e'-[ e e e e e e e]
+ c,32-[ c] a''-[ a]
+ f,-[ f] e'-[ e]
+ c,64-[ c] a''-[ a]
+ f,-[ f] e'-[ e]
\break
}
}
\score {
<
- \property Score.TimeSignature = \turnOff
\context GrandStaff <
\context Staff=upper \notes\relative c'' {
\time 1/4
\clef bass
\property Staff.instrument = "Bass"
\property Staff.instr = "B"
-% \property Staff.VoltaBracket = \turnOff
\time 4/4 f,2 ( f,8-) r8 f8 e8
\repeat volta 2
beam_count, ldir, rdir);
}
- ; /* silly gdb thinks best_idx is inside for loop. */
+ // ; /* silly gdb thinks best_idx is inside for loop. */
for (int i = qscores.size (); i--;)
if (qscores[i].demerits < reasonable_score)
{
qscores[i].yl, qscores[i].yr);
}
- ; /* silly gdb thinks best_idx is inside for loop. */
+ // ; /* silly gdb thinks best_idx is inside for loop. */
int best_idx = best_quant_score_idx (qscores);
me->set_grob_property ("positions",
gh_cons (gh_double2scm (qscores[best_idx].yl),
}
Real
-Beam::score_stem_lengths (Link_array<Grob>stems,
- Array<Stem_info> stem_infos,
- Array<Real> base_stem_ys,
- Array<Real> stem_xs,
+Beam::score_stem_lengths (Link_array<Grob> const &stems,
+ Array<Stem_info> const &stem_infos,
+ Array<Real> const &base_stem_ys,
+ Array<Real> const &stem_xs,
Real xl, Real xr,
bool knee,
Real yl, Real yr)
count[d] ++;
}
-
- if(count[LEFT])
- score[LEFT] /= count[LEFT];
- if(count[RIGHT])
- score[RIGHT] /= count[RIGHT];
+
+ Direction d = DOWN;
+ do
+ {
+ if(count[d])
+ score[d] /= count[d];
+ }
+ while (flip (&d) != DOWN);
return score[LEFT]+score[RIGHT];
}
DECLARE_SCHEME_CALLBACK (shift_region_to_valid, (SCM));
DECLARE_SCHEME_CALLBACK (quanting, (SCM));
static Real score_slopes_dy (Real, Real, Real, Real, bool);
- static Real score_stem_lengths (Link_array<Grob>,
- Array<Stem_info>,
- Array<Real>, Array<Real>,
- Real, Real, bool, Real, Real);
+
+ static Real score_stem_lengths (Link_array<Grob> const &stems,
+ Array<Stem_info> const &stem_infos,
+ Array<Real> const &base_stem_ys,
+ Array<Real> const &stem_xs,
+ Real xl, Real xr,
+ bool knee,
+ Real yl, Real yr);
static Real score_forbidden_quants (Real, Real,
Real, Real, Real, Real,
int, Direction, Direction);
/* Simple standard stem length */
+ SCM lengths = me->get_grob_property ("beamed-lengths");
Real ideal_length =
- gh_scm2double (robust_list_ref
- (beam_count - 1,
- me->get_grob_property ("beamed-lengths")))
+ gh_scm2double (robust_list_ref (beam_count - 1,lengths))
+
* staff_space
/* stem only extends to center of beam */
- 0.5 * beam_thickness;
-
/* Condition: sane minimum free stem length (chord to beams) */
+ lengths = me->get_grob_property ("beamed-minimum-free-lengths");
Real ideal_minimum_free =
- gh_scm2double (robust_list_ref
- (beam_count - 1,
- me->get_grob_property ("beamed-minimum-free-lengths")))
+ gh_scm2double (robust_list_ref (beam_count - 1, lengths))
* staff_space;
;; looking at Baerenreiter examples) for a number of common
;; boundary cases. Subtracting half a beam thickness fixes
;; this, but the bug may well be somewhere else.
- (beamed-lengths . (3.26))
-
+ (beamed-lengths . (3.26 3.26 1.5))
+
;; [Wanske] lists three sets of minimum lengths. One
;; set for the nomal case, and one set for beams with `der
;; Balkenendpunkt weiter "uber bzw. unter die Systemgrenze
;; and the extreme minima as abolute minimum length.
;; The 'normal' minima
- (beamed-minimum-free-lengths . (2.5 2.0 1.5))
-
- ;; The 'far outside staff' minima, not used
- ;(beamed-far-minimum-free-lengths . (1.83))
+ (beamed-minimum-free-lengths . (2.5 2.0 1.0))
;; The 'extreme case' minima
- (beamed-extreme-minimum-free-lengths . (1.83 1.5))
+ (beamed-extreme-minimum-free-lengths . (1.83 1.5 1.25))
(X-offset-callbacks . (,Stem::off_callback))
(X-extent-callback . ,Stem::dim_callback)