author | waspe <waspe> | 2003-11-16 19:31:57 (UTC) |
---|---|---|
committer | waspe <waspe> | 2003-11-16 19:31:57 (UTC) |
commit | e7a81ed5ba0dc6b996f179d1dc40d778492218a9 (patch) (side-by-side diff) | |
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 @@ +#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 + |