2 key.cc -- implement Key, Octave_key
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
14 const int OCTAVES=14; // ugh..
15 const int ZEROOCTAVE=7;
17 Octave_key::Octave_key()
19 accidental_i_arr_.set_size(7);
20 for (int i= 0; i < 7 ; i++)
21 accidental_i_arr_[i] = 0;
26 multi_octave_b_ = false;
27 octaves.set_size(OCTAVES);
33 return octaves[i+ZEROOCTAVE];
38 Octave_key::set(int i, int a)
40 assert(a > -3 && a < 3);
41 accidental_i_arr_[i]=a;
45 Key::set(int o, int n , int a)
47 octaves[o + ZEROOCTAVE].set(n,a);
51 Key::set (int n, int a)
53 for (int i= 0; i < OCTAVES ; i++)