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 @@ +#ifndef TONLEITER_DATA_HELPER_H +#define TONLEITER_DATA_HELPER_H + +#include <qstring.h> +#include <qvaluelist.h> + +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); +}; + + +#endif //TONLEITER_DATA_HELPER_H + |