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 @@ -6,47 +6,49 @@ -namespace Note +namespace Data { - const QString notenames[]={"C","C#","D","D#","E","F","F#","G","G#","A","A#","B"}; - - int getOctaveOfNote(int note); - QString getNameOfNote(int note); - int getNoteFromName(QString name,int octave); - int octaveOfBaseNote(int base,int note); -}; - -class Instrument -{ -private: - QString name; - int frets; - QValueList<int> strings; -public: - Instrument(); - Instrument(QString name,int frets,QValueList<int> strings); - ~Instrument(); -public: - int noOfStrings(); - int noOfFrets(); - QString instName(); - int string(int id); - int noOfOctaves(); + namespace Note + { + const QString notenames[]={"C","C#","D","D#","E","F","F#","G","G#","A","A#","B"}; + + int getOctaveOfNote(int note); + QString getNameOfNote(int note); + int getNoteFromName(QString name,int octave); + int octaveOfBaseNote(int base,int note); + }; + + class Instrument + { + private: + QString name; + int frets; + QValueList<int> strings; + public: + Instrument(); + Instrument(QString name,int frets,QValueList<int> strings); + ~Instrument(); + public: + int noOfStrings(); + int noOfFrets(); + QString instName(); + int string(int id); + int noOfOctaves(); + }; + + class Scale + { + private: + QValueList<int> halftones; + QString name; + public: + Scale(); + Scale(QString name,QValueList<int> halftones); + ~Scale(); + public: + int noOfHaltones(); + int getHalfTone(int id); + QString scaleName(); + bool noteInScale(int base,int note); + }; }; -class Scale -{ -private: - QValueList<int> halftones; - QString name; -public: - Scale(); - Scale(QString name,QValueList<int> halftones); - ~Scale(); -public: - int noOfHaltones(); - int getHalfTone(int id); - QString scaleName(); - bool noteInScale(int base,int note); -}; - - #endif //TONLEITER_DATA_HELPER_H |