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