]> git.donarmstrong.com Git - lilypond.git/commit
Implements consistent beam slopes across line breaks.
authorMike Solomon <mike@apollinemike.com>
Fri, 21 Oct 2011 07:03:43 +0000 (09:03 +0200)
committerMike Solomon <mike@apollinemike.com>
Fri, 21 Oct 2011 07:03:43 +0000 (09:03 +0200)
commit1d9a73b13ee576d28c0f41f5b243f2ebb1ff9fcf
treedc3e8d01ac2ead3644e360fda32c3132f86a40fa
parent458fd4607f01a2ef304db3ba65921f488f4016e5
Implements consistent beam slopes across line breaks.

This is a mostly an internal reorganization of the beam code that
has several concrete impacts on the way beam slopes are calculated:

* ly:beam::calc-least-squares-positions, ly:beam::calc-slope-damping,
  and ly:beam::shift-region-to-valid are now all instance methods of
  Beam_scoring_problem and thus no longer open to the users.
* by being internal methods, these functions all use the same information
  (x positions of stems, stem infos, etc.) stored in private variables.
* this sharing of information allows for broken beams to share information
  between their parts, which leads to the consistent slope calculation

Additionally, ly:beam::quanting, which used to take the arguments of
a grob and a pair of positions, now only takes the grob, as it is
the sole generator of positions.  All of the functions in layout-beam.scm
that relied on multiple Scheme callbacks being chained now only use this
function.

To turn on this feature, use \override Beam #'consistent-slope = ##t.
14 files changed:
Documentation/changes.tely
input/regression/beam-concave-chord.ly
input/regression/beam-concave.ly
input/regression/beam-consistent-broken-slope.ly [new file with mode: 0644]
input/regression/beam-default-lengths.ly
input/regression/beam-shortened-lengths.ly
lily/beam-quanting.cc
lily/beam.cc
lily/include/beam-scoring-problem.hh
lily/include/beam.hh
ly/music-functions-init.ly
scm/define-grob-properties.scm
scm/define-grobs.scm
scm/layout-beam.scm