Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

tonleiterdatahelper.h

Go to the documentation of this file.
00001 #ifndef TONLEITER_DATA_HELPER_H
00002 #define TONLEITER_DATA_HELPER_H
00003 
00004 #include <qstring.h>
00005 #include <qvaluelist.h>
00006 
00007 namespace Data
00008 {
00009     namespace Note
00010     {
00011         const QString notenames[]={"A","Bb","B","C","C#","D","D#","E","F","F#","G","G#"};
00012 
00013         int getOctaveOfNote(int note);
00014         QString getNameOfNote(int note);
00015         int getNoteFromName(QString name,int octave);
00016         int octaveOfBaseNote(int base,int note);
00017     };
00018 
00019     class Instrument
00020     {
00021     private:
00022         QString name;
00023         int frets;
00024         QValueList<int> strings;
00025     public:
00026         Instrument();
00027         Instrument(QString name,int frets,QValueList<int> strings);
00028         ~Instrument();
00029     public:
00030         int noOfStrings();
00031         int noOfFrets();
00032         QString instName();
00033         int string(int id);
00034         int noOfOctaves();
00035         int lowestNote();
00036         int highestNote();
00037     };
00038 
00039     class Scale
00040     {
00041     private:
00042         QValueList<int> halftones;
00043         QString name;
00044     public:
00045         Scale();
00046         Scale(QString name,QValueList<int> halftones);
00047         ~Scale();
00048     public:
00049         int noOfHaltones();
00050         int getHalfTone(int id);
00051         QString scaleName();
00052         bool noteInScale(int base,int note);
00053     };
00054 };
00055 
00056 #endif //TONLEITER_DATA_HELPER_H
00057 

Generated on Sat Nov 5 16:17:35 2005 for OPIE by  doxygen 1.4.2