]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/key-def.hh
release: 1.2.4
[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 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 class Key_def
20 {
21 public:
22   Key_def ();
23   
24   Array<Musical_pitch> pitch_arr_;
25   int modality_i_;
26   bool ordinary_key_b_;
27
28   /// squash the octaves to 1
29   void squash_octaves ();
30
31   /// return number accidentals in key; ordinary key only
32   int ordinary_accidentals_i () const;
33
34   /// return number of flats in key
35   int flats_i () const;
36
37   /// return number of sharps in key
38   int sharps_i () const;
39
40   /// modality == 3
41   bool minor_b () const;
42
43   void transpose (Musical_pitch d);
44 };
45
46 #endif /* KEY_DEF_HH */