From b6a556495b4dbdc1d8c658ad0ec5825951d31101 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 6 Oct 1996 23:57:12 +0000 Subject: [PATCH] lilypond-0.0.1 --- score.hh | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 score.hh diff --git a/score.hh b/score.hh new file mode 100644 index 0000000000..3e65d50d99 --- /dev/null +++ b/score.hh @@ -0,0 +1,83 @@ +#ifndef SCORE_HH +#define SCORE_HH + +#include "vray.hh" +#include "cols.hh" +#include "mtime.hh" +#include "command.hh" + +struct Score_column { + PCol * pcol; + svec durations; + Mtime when; + + /// + bool musical; + + + Score_column(Mtime when); + + static int compare(Score_column & c1, Score_column &c2) { + return sgn(c1.when - c2.when); + } + void set_breakable() { + pcol->set_breakable(); + } + bool used(); + void print() const; +}; +/** + + When typesetting hasn't started on PScore yet, the columns which + contain data have a rhythmical position. Score_column is the type + with a rhythmical time attached to it. The calculation of + idealspacing is done with data in these columns. (notably: the + #durations# field) + + */ + +instantiate_compare(Score_column&, Score_column::compare); + + +/// the total music def of one movement +struct Score { + /// staffs_ and commands_ form the problem definition. + PointerList staffs_; + PointerList commands_; + + /// "runtime" fields for setting up spacing + PointerList cols_; + PScore *pscore_; + + /****************************************************************/ + + /// add #Idealspacings# to #pscore_# + void calc_idealspacing(); + void process(); + + /// construction + void add_staff(Staff *st); + + void distribute_commands(); + /** add the score wide commands (bars, breaks) to each staff so + they can process (typeset) them if needed */ + void OK() const; + Score_column *find_col(Mtime,bool); + void do_pcols(); + void add(Command *); + void add(Staff*); + void output(String fn); + PCursor create_cols(Mtime); + void print() const; + void do_miscs() ; + Mtime last() const; + void clean_cols(); + void clean_commands(); + + void do_connect(PCol *c1, PCol *c2, Real d); + void connect_nonmus(PCol* c1, PCol *c2, Real d); +}; +/** + + */ +#endif -- 2.39.5