summaryrefslogtreecommitdiff
path: root/noncore/multimedia/tonleiter/tonleiterdatahelper.h
Unidiff
Diffstat (limited to 'noncore/multimedia/tonleiter/tonleiterdatahelper.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/tonleiter/tonleiterdatahelper.h4
1 files changed, 3 insertions, 1 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
@@ -1,18 +1,20 @@
1#ifndef TONLEITER_DATA_HELPER_H 1#ifndef TONLEITER_DATA_HELPER_H
2#define TONLEITER_DATA_HELPER_H 2#define TONLEITER_DATA_HELPER_H
3 3
4#include <qstring.h> 4#include <qstring.h>
5#include <qvaluelist.h> 5#include <qvaluelist.h>
6 6
7namespace Data
8{
7namespace Note 9namespace Note
8{ 10{
9 const QString notenames[]={"C","C#","D","D#","E","F","F#","G","G#","A","A#","B"}; 11 const QString notenames[]={"C","C#","D","D#","E","F","F#","G","G#","A","A#","B"};
10 12
11 int getOctaveOfNote(int note); 13 int getOctaveOfNote(int note);
12 QString getNameOfNote(int note); 14 QString getNameOfNote(int note);
13 int getNoteFromName(QString name,int octave); 15 int getNoteFromName(QString name,int octave);
14 int octaveOfBaseNote(int base,int note); 16 int octaveOfBaseNote(int base,int note);
15}; 17};
16 18
17class Instrument 19class Instrument
18{ 20{
@@ -38,16 +40,16 @@ private:
38 QValueList<int> halftones; 40 QValueList<int> halftones;
39 QString name; 41 QString name;
40public: 42public:
41 Scale(); 43 Scale();
42 Scale(QString name,QValueList<int> halftones); 44 Scale(QString name,QValueList<int> halftones);
43 ~Scale(); 45 ~Scale();
44public: 46public:
45 int noOfHaltones(); 47 int noOfHaltones();
46 int getHalfTone(int id); 48 int getHalfTone(int id);
47 QString scaleName(); 49 QString scaleName();
48 bool noteInScale(int base,int note); 50 bool noteInScale(int base,int note);
49}; 51};
50 52};
51 53
52#endif //TONLEITER_DATA_HELPER_H 54#endif //TONLEITER_DATA_HELPER_H
53 55