Initial
This commit is contained in:
56
music/AlteredScale.hpp
Normal file
56
music/AlteredScale.hpp
Normal file
@@ -0,0 +1,56 @@
|
||||
#ifndef _MUSIC_ALTEREDSCALE_HPP_
|
||||
#define _MUSIC_ALTEREDSCALE_HPP_
|
||||
#ifndef _MUSIC_SCALE_HPP_
|
||||
#include <music/scale.hpp>
|
||||
#endif
|
||||
|
||||
class IonianScale;
|
||||
|
||||
class AlteredScale;
|
||||
typedef AlteredScale DiminishedWholeToneScale;
|
||||
|
||||
class AlteredScale : public Scale
|
||||
{
|
||||
public:
|
||||
AlteredScale(Note root=Note::A,const String &description="AlteredScale(DiminishedWholeToneScale)");
|
||||
AlteredScale(const IonianScale &ionianScale);
|
||||
AlteredScale &operator=(const IonianScale &ionianScale);
|
||||
virtual ~AlteredScale();
|
||||
protected:
|
||||
virtual void createScale(void);
|
||||
private:
|
||||
};
|
||||
|
||||
inline
|
||||
AlteredScale::AlteredScale(Note root,const String &description)
|
||||
: Scale(root,description)
|
||||
{
|
||||
createScale();
|
||||
}
|
||||
|
||||
inline
|
||||
AlteredScale::~AlteredScale()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
void AlteredScale::createScale()
|
||||
{
|
||||
Note root(getRoot());
|
||||
Notes::operator[](0)=root;
|
||||
root+=Note::HalfStep;
|
||||
Notes::operator[](1)=root;
|
||||
root+=Note::WholeStep;
|
||||
Notes::operator[](2)=root;
|
||||
root+=Note::HalfStep;
|
||||
Notes::operator[](3)=root;
|
||||
root+=Note::WholeStep;
|
||||
Notes::operator[](4)=root;
|
||||
root+=Note::WholeStep;
|
||||
Notes::operator[](5)=root;
|
||||
root+=Note::WholeStep;
|
||||
Notes::operator[](6)=root;
|
||||
root+=Note::WholeStep;
|
||||
Notes::operator[](7)=root;
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user