From 678cf0124c3be00a0db9c852c8299e1eaeb17ceb Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:31:44 +0000 Subject: [PATCH] lilypond-0.0.32 --- src/key.cc | 49 ++++--------------------------------------------- 1 file changed, 4 insertions(+), 45 deletions(-) diff --git a/src/key.cc b/src/key.cc index 232ce9a94f..7e23464ccf 100644 --- a/src/key.cc +++ b/src/key.cc @@ -1,13 +1,13 @@ #include "key.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() @@ -25,7 +25,7 @@ void Key::set(int i, int a) { assert(a > -3 && a < 3); - accidentals[i]=a; + accidental_i_arr_[i]=a; } @@ -36,44 +36,3 @@ Local_key::reset(Key k) octaves[i] = k; } -Array -Key::read(Array s) -{ - Array newkey; - for (int j = 0; j < 7; j++) - accidentals[j] = 0; - - for (int i=0; i < s.size(); ) { - int large = s[i++]; - int small = s[i++]; - accidentals[large]=small; - - newkey.push(large); - newkey.push(small); - } - return newkey; -} - -Array -Key::oldkey_undo(Arrays) -{ - Array oldkey; - Array newkey; - newkey.set_size(7); - for (int i=0; i < newkey.size(); i++) - newkey[i] = 0; - - for (int i=0; i < s.size(); ) { - int large = s[i++]; - int small = s[i++]; - newkey[large] = small; - } - for (int i=0; i < newkey.size(); i++) - if (accidentals[i] && accidentals[i] != newkey[i]) { - oldkey.push(i); - oldkey.push(0); - } - - - return oldkey; -} -- 2.39.5