]> git.donarmstrong.com Git - lilypond.git/blobdiff - src/key.cc
partial: 0.0.39-1.jcn
[lilypond.git] / src / key.cc
index 542549ddf9287c567a40d51f40aef68e7a1ddb8e..7e23464ccfec917464e06d63eeaad6f3219dca28 100644 (file)
@@ -1,14 +1,13 @@
 #include "key.hh"
-#include "notename.hh"
 
-const int OCTAVES=14;
+const int OCTAVES=14;          // ugh..
 const int ZEROOCTAVE=7;
 
 Key::Key()
 {
-    accidentals.set_size(7);
+    accidental_i_arr_.set_size(7);
     for (int i= 0; i < 7 ; i++)
-       accidentals[i] = 0;
+       accidental_i_arr_[i] = 0;
 }
 
 Local_key::Local_key()
@@ -26,7 +25,7 @@ void
 Key::set(int i, int a)
 {
     assert(a > -3 && a < 3);
-    accidentals[i]=a;    
+    accidental_i_arr_[i]=a;    
 }
 
 
@@ -37,44 +36,3 @@ Local_key::reset(Key k)
        octaves[i] = k;
 }
 
-svec<int>
-Key::read(svec<String> s)
-{
-    svec<int> newkey;
-    for (int j = 0; j < 7; j++)
-     accidentals[j] = 0;
-   
-    for (int i=0; i < s.sz(); i++) {
-       int large, small;
-       lookup_notename(large, small, s[i]);
-       accidentals[large]=small;
-
-       newkey.add(large);
-       newkey.add(small);
-    }
-    return newkey;
-}
-
-svec<int>
-Key::oldkey_undo(svec<String> s)
-{
-    svec<int> oldkey;
-    svec<int> newkey;
-    newkey.set_size(7);
-    for (int i=0; i < newkey.sz(); i++)
-       newkey[i] = 0;
-       
-    for (int i=0; i < s.sz(); i++) {
-       int large, small;
-       lookup_notename(large, small, s[i]);
-       newkey[large] = small;
-    }
-    for (int i=0; i < newkey.sz(); i++)
-       if (accidentals[i] && accidentals[i] != newkey[i]) {
-           oldkey.add(i);
-           oldkey.add(0);
-       }
-    
-
-    return oldkey;
-}