]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.25
authorfred <fred>
Sun, 24 Mar 2002 19:29:55 +0000 (19:29 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:29:55 +0000 (19:29 +0000)
14 files changed:
Variables.make
configure
hdr/keyitem.hh
init/table_sixteen.ini
init/table_twenty.ini
input/kortjakje.ly
input/twinkle.ly
lilyponddefs.tex
src/clef.cc
src/clefitem.cc
src/keyitem.cc
src/lexer.l
src/mylexer.cc
src/simplewalker.cc

index 8d7ce55b66a9ea35980c63c3640328ccb714cf8f..50263912220af3a1dfbdfd40317b5d8a6aabea05 100644 (file)
@@ -37,7 +37,7 @@ endif
 # version info
 MAJVER=0
 MINVER=0
-PATCHLEVEL=24
+PATCHLEVEL=25
 VERSION=$(MAJVER).$(MINVER).$(PATCHLEVEL)
 CXXVER=`$(CXX) --version`
 
index 603a202fe6531523786d42b1352dd7ce2cca31a3..1f7f7b52381068e462427f8ac69e1d904547c5ac 100755 (executable)
--- a/configure
+++ b/configure
@@ -11,7 +11,7 @@ else
     cd ../
     if [ ! -f $flowertar ]
     then
-       echo can't find $flowertar
+       echo "can't find $flowertar"
        exit 1;
     fi
     rm flower
index 05a6cf79c2b26b8ed0f0e3198b7533e306dc5b0c..dca7d7213567e79a48f6605ec2bd23676ae8a0e0 100644 (file)
@@ -10,6 +10,8 @@
 #include "item.hh"
 #include "varray.hh"
 
+struct Clef;
+
 /// 
 struct Keyitem : Item {
     Array<int> pitch;
@@ -22,6 +24,7 @@ struct Keyitem : Item {
     Keyitem(int cposition);
     void add(int pitch, int acc);
     void read(Array<int> k);
+    void read(const Clef& c);
 
     void preprocess();
 
index 77297efbfaa6d722971e6ac29d788c28ff8845bb..e87778753c854354729f73b266974c398f07572c 100644 (file)
@@ -40,10 +40,12 @@ symboltables {
      "clefs" = table {
             "violin"   "\violinclef"           0pt     12.8pt  -10pt   18pt
             "bass"     "\bassclef"             0pt     11.2pt  0pt     16pt
-            "viola"    "\violaclef"            0pt     12.8pt  0pt     16pt
+            "alto"     "\altoclef"             0pt     12.8pt  0pt     16pt
+            "tenor"    "\altoclef"             0pt     12.8pt  0pt     16pt
             "violin_change"    "\cviolinclef"  0pt     11.2pt  -12pt   12pt
             "bass_change"      "\cbassclef"    0pt     12.8pt  0pt     16pt
-            "viola_change"     "\cviolaclef"   0pt     11.2pt  0pt     16pt
+            "alto_change"      "\caltoclef"    0pt     11.2pt  0pt     16pt
+            "tenor_change"     "\caltoclef"    0pt     11.2pt  0pt     16pt
      }
 
      "balls" = table {
@@ -122,4 +124,4 @@ symboltables {
      }
 
 }
-default_table = symboltables { table_sixteen }
\ No newline at end of file
+default_table = symboltables { table_sixteen }
index 780e0b2e86c3475f3639f79f6fb9acb01b2bbb4e..6e2b8836a3aad92ab92768d283b7e2916c15789c 100644 (file)
@@ -25,10 +25,12 @@ table_twenty = symboltables {
     "clefs" = table {
            "violin"    "\violinclef"   0pt     16pt    -12.5pt 22.5pt
            "bass"      "\bassclef"             0pt     16pt    0pt     20pt
-           "viola"     "\violaclef"            0pt     16pt    0pt     20pt
+           "alto"      "\altoclef"             0pt     16pt    0pt     20pt
+           "tenor"     "\altoclef"             0pt     16pt    0pt     20pt
            "violin_change"     "\cviolinclef"  0pt     16pt    -12.5pt 22.5pt
            "bass_change"       "\cbassclef"    0pt     16pt    0pt     20pt
-           "viola_change"      "\cviolaclef"   0pt     16pt    0pt     20pt
+           "alto_change"       "\caltoclef"    0pt     16pt    0pt     20pt
+           "tenor_change"      "\caltoclef"    0pt     16pt    0pt     20pt
     }
 
     "balls" = table {
@@ -103,4 +105,4 @@ table_twenty = symboltables {
     }
 
 }
-default_table = symboltables { table_twenty }
\ No newline at end of file
+default_table = symboltables { table_twenty }
index 9b2054f83db8bce106f70374c779bf44966a74f9..bfcfebaeb004612cbad243c37a67231fbe458c4e 100644 (file)
@@ -52,7 +52,7 @@ bstaf = staff {
        melodic
        music { begeleiding }   % use the declared music
                commands {      % commands with Staff-wide impact.
-                       clef bass       % bass-clef
+                       clef "bass"     % bass-clef
                }
        }
 
@@ -60,7 +60,7 @@ bstaf = staff {
 vstaf = staff {
        melodic
                music { melodie }
-               commands { clef violin }
+               commands { clef "violin" }
                                % default clef is violin clef
        }
 
index 2cd786c3d6738a232cd5e45f6b0182a6eaa2a9b0..f866678bc825d26a4bf484692945e20ebb57d755 100644 (file)
@@ -83,7 +83,7 @@ text2 = music {
        @
        \textstyle "roman"
        When the bla- zing sun is gone,2
-       When he no- thing shine- s upon,2
+       When he no- thing shines up- on,2
        Then you show your lit- tle light,2
        Twin- kle, twin- kle, all the night.2
        Twin- kle, twin- kle, lit- tle star,2
@@ -96,7 +96,7 @@ text3 = music {
        \textstyle "roman"
        Then the tra- veler in the dark2
        Thanks you for your ti- ny spark;2
-       He could not see which way to_go,2
+       He_could not see which way to go,2
        If you did not twin- kle so.2
        Twin- kle, twin- kle, lit- tle star,2
        How I won- der what you are!2
@@ -106,13 +106,13 @@ text3 = music {
 mstaf = staff {
        melodic
        music { melodie }
-       commands { clef violin }
+       commands { clef "violin" }
 }
 
 bass_staf = staff {
        melodic
        music { begeleiding }
-       commands { clef bass }
+       commands { clef "bass" }
 }
 
 
index 0a1fdeef8affe773d2eb9dfaf780eb58fcfe2ee9..1ad6d5e58cfec46d35322f4f0aec7b658803febc 100644 (file)
 
 \mdef\violinclef{71}
 \mdef\bassclef{73}
+\mdef\altoclef{75}
 \mdef\cviolinclef{72}
 \mdef\cbassclef{74}
+\mdef\caltoclef{76}
 
 \mdef\deigthflag{45}
 \mdef\dsixteenthflag{46}
index 0abd26f44ae72e6bc9a0a8ea49f2bc3e46de2f62..d0fcbe09d9672c811eb20412e348388601fc095b 100644 (file)
@@ -12,6 +12,10 @@ Clef::read(Array<Scalar>args)
     clef_type = args[0];
     if (clef_type == "violin") {
        c0_pos=-2;
+    } else if (clef_type == "alto") {
+       c0_pos = 4;
+    } else if (clef_type == "tenor") {
+       c0_pos = 6;
     } else if (clef_type == "bass") {
        c0_pos = 10;
     } else
index d5237513a29a04f85f4977f8d57f22f2d231a628..8b10b60107b1d50a6ecb71901c64aa8b0e6e780e 100644 (file)
@@ -16,6 +16,10 @@ Clef_item::read(String t)
     type = t;
     if (type == "violin")
        y_off = 2;
+    if (type == "alto")
+       y_off = 4;
+    if (type == "tenor")
+       y_off = 6;
     if (type == "bass")
        y_off = 6;
 }
index 3a80c28e1f102e24440edcba33471188ca69ba88..9ae9c22289b4f333321375cd0d6ece8c17f78bca 100644 (file)
@@ -4,7 +4,10 @@
 #include "molecule.hh"
 #include "paper.hh"
 #include "lookup.hh"
+#include "clef.hh"
 
+const int FLAT_TOP_PITCH=2; /* fes,ges,as and bes typeset in lower octave */
+const int SHARP_TOP_PITCH=4; /*  ais and bis typeset in lower octave */
 
 Keyitem::Keyitem(int c)
 {
@@ -22,9 +25,20 @@ Keyitem::read(Array<int> s)
     }
 }
 
+void 
+Keyitem::read(const Clef& c)
+{
+    c_position=(c.c0_pos+70)%7;
+}
+
+
 void
 Keyitem::add(int p, int a)
 {
+    if ((a<0 && p>FLAT_TOP_PITCH) ||
+        (a>0 && p>SHARP_TOP_PITCH)) {
+      p=p-7; /* Typeset below c_position */
+    }
     pitch.add(p);
     acc.add(a);
 }
index 1d758796b2bd0b78a8e0a6834855f6fb72fca3f6..dbe775560144c3e9df01111311d7dfc2132ab5ff 100644 (file)
@@ -153,6 +153,12 @@ COMMENT            [%#].*\n
        int l = lookup_keyword(c);
        if (l != -1)
                return l;
+
+/* let's try passing tex's typesetting macros like \ss \alpha \c */
+       String* str_p = new String(YYText());
+       return STRING;  
+
+/* and skip identifiers...
        Identifier * id = lookup_identifier(c);
        if (id) {               
                yylval.id = id;
@@ -162,6 +168,7 @@ COMMENT             [%#].*\n
 
        yylval.string=sp;
        return NEWIDENTIFIER;
+*/
 }
 <lyrics>\"[^\"]*\" {
        String s (YYText()+1);
@@ -187,6 +194,12 @@ COMMENT            [%#].*\n
 }
 <lyrics>{COMMENT}              { 
 
+}
+<lyrics>[{}]   {
+       return YYText()[0];
+}
+<lyrics>[()\[\]|/.^>_-] {
+       return yylval.c = YYText()[0];
 }
 <lyrics>[ \t\n]+               {
 }
index 42da95740bddab06a26ee38b9d6f73534bdc879a..d2e4b18ff8959e58154d0a10e0fee8d18d99ac37 100644 (file)
@@ -12,7 +12,6 @@
 
 static Keyword_ent the_key_tab[]={
     "bar", BAR,
-    "bass", BASS,
     "cadenza", CADENZA,
     "clef", CLEF,
     "cm", CM,
@@ -48,7 +47,6 @@ static Keyword_ent the_key_tab[]={
     "chord", CHORD,
     "multi", MULTI,
     "unitspace", UNITSPACE,
-    "violin", VIOLIN,
     "voice", VOICE,
     "voices", VOICES,
     "width", WIDTH,
index 78ec2b00da2302fcb4a11127d0263b67101f57bd..8ac89bd2d0bc7e5e87f33f743a0abdd398e790a9 100644 (file)
@@ -17,7 +17,6 @@
 #include "debug.hh"
 #include "keyitem.hh"
 #include "clefitem.hh"
-#include "keyitem.hh"
 #include "slur.hh"
 #include "localkeyitem.hh"
 #include "textitem.hh"
@@ -98,6 +97,7 @@ Simple_walker::do_TYPESET_command(Command*com)
        return;
 
     if (com->args[0] == "KEY") {
+       ((Keyitem*) i)->read(clef_);
        if (oldkey_undo) {
            ((Keyitem*) i)->read(*oldkey_undo);
            delete oldkey_undo;