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