MAJOR_VERSION = 0
MINOR_VERSION = 0
-PATCH_LEVEL = 61
+PATCH_LEVEL = 62
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
+/*
+ calcideal.cc -- implement Score::calc_idealspacing()
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
#include "idealspacing.hh"
#include "score.hh"
#include "p-score.hh"
effects into account, should be local (measure wide), should check
smallest divisions.
-
+ plus, calc_idealspacing() should be called per line.
*/
void
Score::calc_idealspacing()
Col_hpositions::Col_hpositions()
{
energy = INFTY;
+ ugh_b_ = false;
}
void
typedef Array<PCol*> Line_of_cols;
struct Col_hpositions {
+ bool ugh_b_;
+ Line_of_cols error_col_l_arr_;
Line_of_cols cols;
Array<Real> config;
Real energy;
-#ifndef PROBLEM_HH
-#define PROBLEM_HH
+/*
+ linespace.hh -- declare Colinfo, Spacing_problem
+ source file of the LilyPond music typesetter
+
+ (c) 1996,1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef LINESPACE_HH
+#define LINESPACE_HH
#include "glob.hh"
#include "plist.hh"
#include "varray.hh"
#include "vector.hh"
#include "interval.hh"
+#include "pointer.hh"
/// helper struct for #Spacing_problem#
struct Colinfo {
- PCol const *pcol_;
- Real const * fixpos;
+ PCol *pcol_l_;
+ P<Real> fixpos_p_;
Interval width;
-
+ int rank_i_;
+ /// did some tricks to make this column come out.
+ bool ugh_b_;
/* *************** */
Colinfo();
- void operator=(Colinfo const&);
- Colinfo(Colinfo const&);
- ~Colinfo();
- Colinfo(PCol const *,Real const *);
+ Colinfo(PCol *,Real const *);
+
void print() const;
- bool fixed() const { return fixpos;}
- Real fixed_position()const { return *fixpos; }
+ bool fixed() const { return fixpos_p_.get_C();}
+ Real fixed_position()const { return *fixpos_p_; }
Real minright() const { return width.right; }
Real minleft() const { return -width.left; }
};
class Spacing_problem {
Array<Idealspacing const *> ideals;
Array<Colinfo> cols;
-
+ Array<Colinfo> loose_col_arr_;
+
+ /// mark column #i# as being loose.
+ void loosen_column(int i);
/// the index of #c# in #cols#
int col_id(PCol const *c) const;
/// generate the LP constraints
void make_constraints(Mixed_qp& lp) const;
+
+ void handle_loose_cols();
+ void position_loose_cols(Vector &) const;
public:
+ Array<PCol*> error_pcol_l_arr() const;
+
/** solve the spacing problem
@return the column positions, and the energy (last element)
/** add a col to the problem. columns have to be added left to right. The column contains
info on it's minimum width.
*/
- void add_column(PCol const *, bool fixed=false, Real fixpos=0.0);
+ void add_column(PCol *, bool fixed=false, Real fixpos=0.0);
void OK() const;
void print() const;
void print_ideal(Idealspacing const *)const;
+ void prepare();
};
-// the breaking problem for a score.
+/*
+ p-score.hh -- declare PScore
-#ifndef PSCORE_HH
-#define PSCORE_HH
+ source file of the LilyPond music typesetter
+
+ (c) 1996,1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef P_SCORE_HH
+#define P_SCORE_HH
#include "colhpos.hh"
#include "varray.hh"
PScore(Paper_def*);
/// add a line to the broken stuff. Positions given in #config#
- void set_breaking(Array<Col_hpositions>);
+ void set_breaking(Array<Col_hpositions> const &);
void add(PStaff *);
Line_of_score {
Pointer_list<PCol *> cols;
+ bool error_mark_b_;
// need to store height of each staff.
IPointer_list<Line_of_staff*> staffs;
PScore * pscore_l_; // needed to generate staffs
}
void
-PScore::set_breaking(Array<Col_hpositions> breaking)
+PScore::set_breaking(Array<Col_hpositions> const &breaking)
{
for (int j=0; j < breaking.size(); j++) {
- Array<PCol*> &curline(breaking[j].cols);
- Array<Real> &config(breaking[j].config);
+ const Array<PCol*> &curline(breaking[j].cols);
+ const Array<PCol*> &errors(breaking[j].error_col_l_arr_);
+ const Array<Real> &config(breaking[j].config);
Line_of_score *s_p = new Line_of_score(curline,this);
+ s_p->error_mark_b_ = breaking[j].ugh_b_;
lines.bottom().add(s_p);
for (int i=0; i < curline.size(); i++){
curline[i]->hpos = config[i];
}
+ for (int i=0; i < errors.size(); i++)
+ errors[i]->error_mark_b_ = true;
}
}
+/*
+ scoreline.cc -- implement Line_of_score
+
+ source file of the LilyPond music typesetter
+
+ (c) 1996, 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
#include "scoreline.hh"
#include "staffline.hh"
#include "dimen.hh"
Line_of_score::TeXstring() const
{
String s("\\vbox{%<- line of score\n");
+ if (error_mark_b_)
+ s+= "\\scorelineerrormark";
for (iter_top(staffs,sc); sc.ok(); sc++){
s += sc->TeXstring();
if ((sc+1).ok())
Line_of_score::Line_of_score(Array<PCol *> sv,
PScore *ps)
{
+ error_mark_b_ = 0;
pscore_l_ = ps;
for (int i=0; i< sv.size(); i++) {
PCol *p=(PCol *) sv[i];
Begin3
Title: LilyPond
-Version: 0.0.61
-Entered-date: 05/12/97
+Version: 0.0.62
+Entered-date: 05/14/97
Description: LilyPond is a program which converts a music-script (mudela) into
TeX output, or MIDI to produce multi-staff scores. Features include multiple
meters, clefs, keys, lyrics, versatile input-language, cadenzas
jan@digicash.com (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: pcnov095.win.tue.nl /pub/lilypond/
- 300k lilypond-0.0.61.tar.gz
+ 300k lilypond-0.0.62.tar.gz
Alternate-site:
Original-site:
Platform: unix/win32, GNU C++