author | waspe <waspe> | 2003-11-16 19:31:57 (UTC) |
---|---|---|
committer | waspe <waspe> | 2003-11-16 19:31:57 (UTC) |
commit | e7a81ed5ba0dc6b996f179d1dc40d778492218a9 (patch) (unidiff) | |
tree | 62081f88e6dad4df5a2f278050cf402c2da9ed98 /noncore/multimedia/tonleiter/tonleiterdatahelper.h | |
parent | 0b0c071017298ebd189420f85b5aa8d44885c50e (diff) | |
download | opie-e7a81ed5ba0dc6b996f179d1dc40d778492218a9.zip opie-e7a81ed5ba0dc6b996f179d1dc40d778492218a9.tar.gz opie-e7a81ed5ba0dc6b996f179d1dc40d778492218a9.tar.bz2 |
first commit
Diffstat (limited to 'noncore/multimedia/tonleiter/tonleiterdatahelper.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/tonleiter/tonleiterdatahelper.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/noncore/multimedia/tonleiter/tonleiterdatahelper.h b/noncore/multimedia/tonleiter/tonleiterdatahelper.h new file mode 100644 index 0000000..94895ea --- a/dev/null +++ b/noncore/multimedia/tonleiter/tonleiterdatahelper.h | |||
@@ -0,0 +1,53 @@ | |||
1 | #ifndef TONLEITER_DATA_HELPER_H | ||
2 | #define TONLEITER_DATA_HELPER_H | ||
3 | |||
4 | #include <qstring.h> | ||
5 | #include <qvaluelist.h> | ||
6 | |||
7 | namespace Note | ||
8 | { | ||
9 | const QString notenames[]={"C","C#","D","D#","E","F","F#","G","G#","A","A#","B"}; | ||
10 | |||
11 | int getOctaveOfNote(int note); | ||
12 | QString getNameOfNote(int note); | ||
13 | int getNoteFromName(QString name,int octave); | ||
14 | int octaveOfBaseNote(int base,int note); | ||
15 | }; | ||
16 | |||
17 | class Instrument | ||
18 | { | ||
19 | private: | ||
20 | QString name; | ||
21 | int frets; | ||
22 | QValueList<int> strings; | ||
23 | public: | ||
24 | Instrument(); | ||
25 | Instrument(QString name,int frets,QValueList<int> strings); | ||
26 | ~Instrument(); | ||
27 | public: | ||
28 | int noOfStrings(); | ||
29 | int noOfFrets(); | ||
30 | QString instName(); | ||
31 | int string(int id); | ||
32 | int noOfOctaves(); | ||
33 | }; | ||
34 | |||
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 | ||
53 | |||