lilypond-0.1.16
[lilypond.git] / lily / note.cc
blob78e64294731e26f6cb536b580142b9a46beedb11
1 /*
2 could use cleanup
3 */
4 #include <ctype.h>
6 #include "my-lily-lexer.hh"
7 #include "string.hh"
8 #include "real.hh"
9 #include "debug.hh"
10 #include "musical-request.hh"
11 #include "command-request.hh"
12 #include "music-list.hh"
13 #include "identifier.hh"
14 #include "varray.hh"
15 #include "text-def.hh"
16 #include "parseconstruct.hh"
20 String *
21 get_scriptdef (char c)
23 String s;
24 switch (c)
26 case '^' : s = "marcato";
27 break;
28 case '+' : s = "stopped";
29 break;
30 case '-' : s = "tenuto";
31 break;
32 case '|': s = "staccatissimo";
33 break;
34 case 'o' : s = "";
35 break;
36 case '>' : s = "accent";
37 break;
38 case 'v' : s = "";
39 break;
40 case '.' : s = "staccato";
41 break;
42 default:
43 assert (false);
45 return new String (s);
48 Request*
49 get_script_req (int d , General_script_def*def)
51 Musical_script_req* script_req_p = new Musical_script_req;
52 script_req_p->dir_ =(Direction)d;
53 script_req_p->scriptdef_p_=def;
54 return script_req_p;
61 Request*
62 get_grouping_req (Array<int> i_arr)
64 Measure_grouping_req * mr_p = new Measure_grouping_req;
65 for (int i=0; i <i_arr.size();)
67 mr_p->elt_length_arr_.push (Moment (1, i_arr[i++]));
68 mr_p->beat_i_arr_.push (i_arr[i++]);
70 return mr_p;