Diffstat (limited to 'noncore/multimedia/tonleiter/tonleiterdatahelper.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/tonleiter/tonleiterdatahelper.h | 86 |
1 files changed, 44 insertions, 42 deletions
diff --git a/noncore/multimedia/tonleiter/tonleiterdatahelper.h b/noncore/multimedia/tonleiter/tonleiterdatahelper.h index 94895ea..b79162a 100644 --- a/noncore/multimedia/tonleiter/tonleiterdatahelper.h +++ b/noncore/multimedia/tonleiter/tonleiterdatahelper.h | |||
@@ -5,49 +5,51 @@ | |||
5 | #include <qvaluelist.h> | 5 | #include <qvaluelist.h> |
6 | 6 | ||
7 | namespace Note | 7 | namespace Data |
8 | { | 8 | { |
9 | const QString notenames[]={"C","C#","D","D#","E","F","F#","G","G#","A","A#","B"}; | 9 | namespace Note |
10 | 10 | { | |
11 | int getOctaveOfNote(int note); | 11 | const QString notenames[]={"C","C#","D","D#","E","F","F#","G","G#","A","A#","B"}; |
12 | QString getNameOfNote(int note); | 12 | |
13 | int getNoteFromName(QString name,int octave); | 13 | int getOctaveOfNote(int note); |
14 | int octaveOfBaseNote(int base,int note); | 14 | QString getNameOfNote(int note); |
15 | }; | 15 | int getNoteFromName(QString name,int octave); |
16 | 16 | int octaveOfBaseNote(int base,int note); | |
17 | class Instrument | 17 | }; |
18 | { | 18 | |
19 | private: | 19 | class Instrument |
20 | QString name; | 20 | { |
21 | int frets; | 21 | private: |
22 | QValueList<int> strings; | 22 | QString name; |
23 | public: | 23 | int frets; |
24 | Instrument(); | 24 | QValueList<int> strings; |
25 | Instrument(QString name,int frets,QValueList<int> strings); | 25 | public: |
26 | ~Instrument(); | 26 | Instrument(); |
27 | public: | 27 | Instrument(QString name,int frets,QValueList<int> strings); |
28 | int noOfStrings(); | 28 | ~Instrument(); |
29 | int noOfFrets(); | 29 | public: |
30 | QString instName(); | 30 | int noOfStrings(); |
31 | int string(int id); | 31 | int noOfFrets(); |
32 | int noOfOctaves(); | 32 | QString instName(); |
33 | int string(int id); | ||
34 | int noOfOctaves(); | ||
35 | }; | ||
36 | |||
37 | class Scale | ||
38 | { | ||
39 | private: | ||
40 | QValueList<int> halftones; | ||
41 | QString name; | ||
42 | public: | ||
43 | Scale(); | ||
44 | Scale(QString name,QValueList<int> halftones); | ||
45 | ~Scale(); | ||
46 | public: | ||
47 | int noOfHaltones(); | ||
48 | int getHalfTone(int id); | ||
49 | QString scaleName(); | ||
50 | bool noteInScale(int base,int note); | ||
51 | }; | ||
33 | }; | 52 | }; |
34 | 53 | ||
35 | class Scale | ||
36 | { | ||
37 | private: | ||
38 | QValueList<int> halftones; | ||
39 | QString name; | ||
40 | public: | ||
41 | Scale(); | ||
42 | Scale(QString name,QValueList<int> halftones); | ||
43 | ~Scale(); | ||
44 | public: | ||
45 | int noOfHaltones(); | ||
46 | int getHalfTone(int id); | ||
47 | QString scaleName(); | ||
48 | bool noteInScale(int base,int note); | ||
49 | }; | ||
50 | |||
51 | |||
52 | #endif //TONLEITER_DATA_HELPER_H | 54 | #endif //TONLEITER_DATA_HELPER_H |
53 | 55 | ||