]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/score.hh
release: 0.1.8
[lilypond.git] / lily / include / score.hh
1 /*
2   score.hh -- declare Score
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9
10 #ifndef SCORE_HH
11 #define SCORE_HH
12
13 #include "varray.hh"
14 #include "lily-proto.hh"
15 #include "plist.hh"
16 #include "moment.hh"
17 #include "assoc.hh"
18 #include "string.hh"
19 #include "input.hh"
20 #include "lily-proto.hh"
21
22 /// the total music def of one movement
23 class Score: public Input {
24 public:
25     /// paper_, staffs_ and commands_ form the problem definition.
26     Paper_def *paper_p_;
27     Midi_def *midi_p_;
28     Music * music_p_;
29     Paper_score *pscore_p_;
30     Audio_score* audio_score_p_;
31
32     int errorlevel_i_;
33     
34     /* *************************************************************** */
35
36     /// construction
37     Score();
38     Score (Score const&);
39     ~Score();    
40
41     /// do everything except outputting to file
42     void process();
43     
44     /// output to file
45     void output (String fn);
46
47     ///
48     void set (Midi_def* midi_p);
49     ///
50     void set (Paper_def* midi_p);
51
52     void print() const;
53
54 private:
55     void run_translator (Global_translator*);
56     void midi_output();
57     void paper_output();
58
59     /// do midi stuff
60     void midi();
61
62     /// do paper stuff
63     void paper();
64
65     // utils:
66     PCursor<Score_column*> create_cols (Moment, PCursor<Score_column*> &last);
67
68     /**
69       make the pcol_l_ fields of each Score_column point to the correct PCol,
70       remove any unnecessary Score_column's
71      */
72     void do_cols();
73
74     /// remove unused cols
75     void clean_cols();
76     
77     /// add #Idealspacings# to #pscore_#
78     void calc_idealspacing();
79 };
80 #endif