]> git.donarmstrong.com Git - lilypond.git/blob - notename.cc
release: 0.0.6
[lilypond.git] / notename.cc
1 #include "glob.hh"
2 #include "string.hh"
3
4
5 /// change this along with lex file for other notenames.
6 const char *notetab[] = 
7 {
8 "ceses", "ces", "c", "cis", "cisis",
9 "deses", "des", "d", "dis", "disis",
10 "eses", "es", "e", "eis", "eisis",
11 "feses", "fes", "f", "fis", "fisis",
12 "geses", "ges", "g", "gis", "gisis",
13 "ases", "as", "a", "ais", "aisis",
14 "beses", "bes", "b", "bis", "bisis",
15 0
16 };
17
18 void
19 lookup_notename(int &large, int &small, String s)
20 {
21     int i;
22     for (i =0; notetab[i]; i++)
23         if (s == notetab[i]) 
24             {
25             large = i /5;
26             small = i %5 - 2;
27             return;         
28             }
29     assert(false);    
30 }