Extend API for MusicalMode and MusicalScale to expose mode type as a member
This commit is contained in:
parent
55a0aadc74
commit
1555896d8e
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include "ardour/mode.h"
|
#include "ardour/mode.h"
|
||||||
|
|
||||||
class MusicalKey : MusicalMode
|
class MusicalKey : public MusicalMode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MusicalKey (Type t, int root) : MusicalMode (t), _root (root) {}
|
MusicalKey (Type t, int root) : MusicalMode (t), _root (root) {}
|
||||||
|
|
|
@ -68,9 +68,11 @@ class MusicalMode
|
||||||
~MusicalMode ();
|
~MusicalMode ();
|
||||||
|
|
||||||
std::vector<float> steps;
|
std::vector<float> steps;
|
||||||
|
Type type() const { return _type; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void fill (MusicalMode&, Type);
|
static void fill (MusicalMode&, Type);
|
||||||
|
Type _type;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __ardour_mode_h__ */
|
#endif /* __ardour_mode_h__ */
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include "ardour/mode.h"
|
#include "ardour/mode.h"
|
||||||
|
|
||||||
MusicalMode::MusicalMode (MusicalMode::Type t)
|
MusicalMode::MusicalMode (MusicalMode::Type t)
|
||||||
|
: _type (t)
|
||||||
{
|
{
|
||||||
fill (*this, t);
|
fill (*this, t);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user