]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/key-def.hh
release: 1.3.34
[lilypond.git] / lily / include / key-def.hh
1 /*   
2   key-def.hh -- declare Key_def
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1999--2000 Jan Nieuwenhuizen <janneke@gnu.org>
7   
8  */
9
10 #ifndef KEY_DEF_HH
11 #define KEY_DEF_HH
12
13 #include "array.hh"
14 #include "musical-pitch.hh"
15
16 /**
17   Universal key definition (Should rename class Key to 'Accidentals'?)
18
19   FIXME: merge key.hh and key-def.hh classes.
20  */
21 class Key_def
22 {
23 public:
24   Key_def ();
25   
26   Array<Musical_pitch> pitch_arr_;
27   int modality_i_;
28   bool ordinary_key_b_;
29
30   /// squash the octaves to 1
31   void squash_octaves ();
32
33   /// return number accidentals in key; ordinary key only
34   int ordinary_accidentals_i () const;
35
36   /// return number of flats in key
37   int flats_i () const;
38
39   /// return number of sharps in key
40   int sharps_i () const;
41
42   /// modality == 3
43   bool minor_b () const;
44
45   void transpose (Musical_pitch d);
46 };
47
48 #endif /* KEY_DEF_HH */