Determine positions of columns connected by springs and held apart by rods
Determine positions of columns connected by springs and held apart by rods.Generate a spacing which
- Satisfies spacing constraints (notes can't be printed through each other)
- Looks good, ie tries to conform to an ideal spacing as much as possible.
This is converted by regarding idealspacing as "springs" attached to columns. The equilibrium of one spring is the ideal distance. The columns have a size, this imposes "hard" constraints on the distances. This transforms the problem into a quadratic programming problem with linear constraints.
The quality is given by the total potential energy in the springs. The lower the energy, the better the configuration.
TODO: make item widths work per Staff.
TODO: This needs rethinking. Spacing should take optical
effects into account Should be decentralised The algorithm is taken from : John S. Gourlay. ``Spacing a Line of Music,'' Technical Report
OSU-CISRC-10/87-TR35, Department of Computer and Information
Science, The Ohio State University, 1987.
int col_id(Paper_column const *c)
Vector find_initial_solution()
bool contains_b(Paper_column const *w)
void make_matrices(Matrix &quad, Vector &lin, Real&)
void make_constraints(Mixed_qp& lp)
void Spring_spacer::add_column(Paper_column *col, bool fixed, Real fixpos)
void Spring_spacer::calc_idealspacing()
void Spring_spacer::get_ruling_durations(Array<Moment> &shortest_playing_arr, Array<Moment> &context_shortest_arr)
void Spring_spacer::handle_loose_cols()
void Spring_spacer::position_loose_cols(Vector &sol_vec)
Vector Spring_spacer::try_initial_solution()
This program documentation comes from lilypond-1.0.0.tar.gz. It was generated by <janneke@gnu.org> on Fri Jul 31 15:42:17 CEST 1998