55 lines
1.1 KiB
C++
55 lines
1.1 KiB
C++
#ifndef _MUSIC_ORIENTALSCALE_HPP_
|
|
#define _MUSIC_ORIENTALSCALE_HPP_
|
|
#ifndef _MUSIC_SCALE_HPP_
|
|
#include <music/scale.hpp>
|
|
#endif
|
|
|
|
class IonianScale;
|
|
|
|
class OrientalScale : public Scale
|
|
{
|
|
public:
|
|
OrientalScale(Note root=Note::A,const String &description="OrientalScale");
|
|
OrientalScale(const IonianScale &ionianScale);
|
|
OrientalScale &operator=(const IonianScale &ionianScale);
|
|
virtual ~OrientalScale();
|
|
protected:
|
|
virtual void createScale(void);
|
|
private:
|
|
};
|
|
|
|
inline
|
|
OrientalScale::OrientalScale(Note root,const String &description)
|
|
: Scale(root,description)
|
|
{
|
|
createScale();
|
|
}
|
|
|
|
inline
|
|
OrientalScale::~OrientalScale()
|
|
{
|
|
}
|
|
|
|
inline
|
|
void OrientalScale::createScale()
|
|
{
|
|
Note root(getRoot()); // H 1-1/2 H H 1-1/2 H W
|
|
Notes::operator[](0)=root;
|
|
root+=Note::HalfStep;
|
|
Notes::operator[](1)=root;
|
|
root+=Note::WholeStep;
|
|
root+=Note::HalfStep;
|
|
Notes::operator[](2)=root;
|
|
root+=Note::HalfStep;
|
|
Notes::operator[](3)=root;
|
|
root+=Note::HalfStep;
|
|
Notes::operator[](4)=root;
|
|
root+=Note::WholeStep;
|
|
root+=Note::HalfStep;
|
|
Notes::operator[](5)=root;
|
|
root+=Note::HalfStep;
|
|
Notes::operator[](6)=root;
|
|
root+=Note::WholeStep;
|
|
Notes::operator[](7)=root;
|
|
}
|
|
#endif |