From 8ff3ecdb5f5b662e6849ff08b4e2f90bdcf4f8ca Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Tue, 5 Jan 1999 01:52:04 +0100 Subject: [PATCH] patch::: 1.1.18.jcn2: gaap pl 18.jcn2 - bf: stem-length algorithm - bf: beam direction algorithm - bf's: wtk1-fugue2.ly --- NEWS | 7 ++++++- VERSION | 2 +- init/params.ly | 8 +++++++- input/test/beam-dir.fly | 1 + input/test/beam-slope.fly | 1 + lily/beam.cc | 7 +++++++ lily/stem-info.cc | 7 +++++-- mutopia/J.S.Bach/wtk1-fugue2.ly | 34 ++++++++++++++++++++++----------- 8 files changed, 51 insertions(+), 16 deletions(-) create mode 100644 input/test/beam-dir.fly create mode 100644 input/test/beam-slope.fly diff --git a/NEWS b/NEWS index fff6375172..819de03114 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,11 @@ +pl 18.jcn2 + - bf: stem-length algorithm + - bf: beam direction algorithm + - bf's: wtk1-fugue2.ly + pl 18.jcn1 - stepmake update - - small fixes: spacing.ly, wtk1-fugue2-ly, violino-viola duet. + - small fixes: spacing.ly, wtk1-fugue2.ly, violino-viola duet. pl 17.jbr2 - Documentation/README-W32: Brought my stuff up to date diff --git a/VERSION b/VERSION index 113d0ef748..313548784a 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=1 PATCH_LEVEL=18 -MY_PATCH_LEVEL=jcn1 +MY_PATCH_LEVEL=jcn2 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/init/params.ly b/init/params.ly index 449c3c7aa5..cb4cf24aef 100644 --- a/init/params.ly +++ b/init/params.ly @@ -38,7 +38,13 @@ forced_stem_shorten = 1.0 * \interline; % % enum Dir_algorithm { DOWN=-1, UP=1, MAJORITY=2, MEAN, MEDIAN }; % -beam_dir_algorithm = 2.0; +DOWN = -1.0; +UP = 1.0; +MAJORITY = 2.0; +MEAN = 3.0; +MEDIAN = 4.0; +% [Ross]: majority +beam_dir_algorithm = \MAJORITY; % % diff --git a/input/test/beam-dir.fly b/input/test/beam-dir.fly new file mode 100644 index 0000000000..a5fcefbb8e --- /dev/null +++ b/input/test/beam-dir.fly @@ -0,0 +1 @@ +[b''16 a] diff --git a/input/test/beam-slope.fly b/input/test/beam-slope.fly new file mode 100644 index 0000000000..216b300dbc --- /dev/null +++ b/input/test/beam-slope.fly @@ -0,0 +1 @@ +[c''16 b] [a b] diff --git a/lily/beam.cc b/lily/beam.cc index ec41c7a964..f365889c4f 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -160,10 +160,17 @@ Beam::set_default_dir () } while (flip(&d) != DOWN); +#if 0 + /* + urg? consider [b''16 a]: will get stem down! + i'll leave this 'fix' commented-out in case something breaks. + jcn + */ do { if (!total[d]) count[d] = 1; } while (flip(&d) != DOWN); +#endif /* [Ross] states that the majority of the notes dictates the diff --git a/lily/stem-info.cc b/lily/stem-info.cc index 1f17c945dc..35e67136f5 100644 --- a/lily/stem-info.cc +++ b/lily/stem-info.cc @@ -86,8 +86,11 @@ Stem_info::Stem_info (Stem const *s) miny_f_ += min_stem2_f; } - // stems in unnatural (forced) direction are shortened - if (s->dir_ != s->get_default_dir ()) + /* + stems in unnatural (forced) direction are shortened + central line is never 'forced' + */ + if (((int)s->chord_start_f ()) && (s->dir_ != s->get_default_dir ())) idealy_f_ -= shorten_f; // lowest beam of (UP) beam must never be lower than second staffline diff --git a/mutopia/J.S.Bach/wtk1-fugue2.ly b/mutopia/J.S.Bach/wtk1-fugue2.ly index 25cc1598c3..108c83c819 100644 --- a/mutopia/J.S.Bach/wtk1-fugue2.ly +++ b/mutopia/J.S.Bach/wtk1-fugue2.ly @@ -18,8 +18,9 @@ \include "nederlands.ly" % for correct parsing of note names global = \notes { + \key c \minor; \time 4/4; - \keysignature bes es as; + \property Staff.timeSignatureStyle = "C" \skip 1*31; \bar "|."; | } @@ -89,8 +90,8 @@ comes = \notes \relative c'' { %%10 [f f16 e] [f8 c8] d4 r8 d | [es8 es16 d] [es8 bes ] [c es16 d] [es8 f] | - \stemboth [bes, es16 d] [es8 f] [as,16 bes ] c4 [bes16 as ] | - [g16 es f g] [as bes c d] [es d c d] [es f g a] | + [bes, es16 d] [es8 f] [as,16 bes ] c4 [bes16 as ] | + \stemboth [g16 es f g] [as bes c d] [es d c d] [es f g a] | [bes f, g as] [bes c d e] [f es d es] [ f g a b] | %%15 \stemup [c8 b16 a] [g f! es d] [c8 es d c] | @@ -152,12 +153,15 @@ bassdux = \notes \relative c' { g4 r4 r16 [g a b] [c d es f] | [g f as g] [f es d c] [b8 c16 b] [c8 g] | [as c16 b] [c8 d] [g, c16 b] [c8 d] | - [f16 g] as4 [g16 f] es4 r8 es | - [d c g g] + [f,16 g] as4 [g16 f] es4 r8 es' | + [d c g' g,] %%30 + %urg + %using only \type Staff or \voiceone/two don't work anymore? + %moreover, the ties are not fooled by this anymore \type Staff < - { \stemup c2 ~ | c1 ~ | c1 } - { \stemdown c,2 ~ | c1 ~ | c1 } + {\voiceone c2 ~ | c1 ~ | c1 } + {\voicetwo c,2 ~ | c1 ~ | c1 } > } @@ -177,11 +181,19 @@ bassdux = \notes \relative c' { > \paper { - gourlay_maxmeasures =5.; -% castingalgorithm = \Wordwrap; + gourlay_maxmeasures = 4.; % current default for 16pt -> three pages - % arithmetic_multiplier = 4.8\pt; - arithmetic_multiplier = 4.4\pt; + % hmm, too tight already, better more vsize! + arithmetic_multiplier = 4.8\pt; + % arithmetic_multiplier = 4.4\pt; + + % Breitkopf; unlike B\"arenreiter rule + % really looks a lot better? + % should have an array of min/ideal lengths (scheme) + % and check B\"arenreiter rules again -- make testcase + beam_multiple_break = 2.0; + + % beam_dir_algorithm = \MEDIAN; } \midi { -- 2.39.5