]> git.donarmstrong.com Git - lilypond.git/blob - src/scores.cc
2788fe062a958eecbd40c0117d1a49f8aae82da8
[lilypond.git] / src / scores.cc
1 #include "main.hh"
2 #include "inputscore.hh"
3 #include "score.hh"
4 #include "string.hh"
5
6 static Array<Input_score*> score_array_global;
7
8 static String outfn="lelie.out";
9
10 // todo: check we don't overwrite default output.
11 void
12 do_scores()
13 {
14     for (int i=0; i < score_array_global.size(); i++) {
15         Score * s_p = score_array_global[i]->parse();   
16         delete score_array_global[i];
17         s_p->print ();
18         s_p->process();
19         s_p->output(outfn);
20         s_p->midi();
21         delete s_p;
22     }
23     score_array_global.set_size(0);
24 }
25
26 void
27 add_score(Input_score * s)
28 {
29     score_array_global.push(s);
30 }
31
32 #if 0
33 Input_score*
34 current_iscore_l()
35 {
36     if ( score_array_global.size() )
37         return score_array_global.top(); // UGH
38     else
39         return 0;
40 }
41 #endif
42
43 void
44 set_default_output(String s)
45 {
46     outfn = s;
47 }
48