use crate::notation::zoot_allures::Notation;
use Notation::*;
mod mode;
use crate::scales::mode::Mode;
mod chordlib;
use chordlib::ChordLib;
pub struct Scale {
definition: Vec<Notation>,
values: Vec<f64>,
}
impl Scale {
fn ionian(&mut self) {
self._ionian();
}
fn dorian(&mut self) {
self._dorian();
}
fn phyrgian(&mut self) {
self._phyrgian();
}
fn lydian(&mut self) {
self._lydian();
}
fn mixolydian(&mut self) {
self._mixolydian();
}
fn aeolian(&mut self) {
self._aeolian();
}
fn locrian(&mut self) {
self._locrian();
}
}
impl Mode for Scale {
fn _ionian(&mut self) {
self.definition = vec![Z0, Z2, Z4, Z5, Z7, Z9, Y];
}
fn _dorian(&mut self) {
self.definition = vec![Z0, Z2, Z3, Z5, Z7, Z9, X];
}
fn _phyrgian(&mut self) {
self.definition = vec![Z0, Z1, Z3, Z5, Z7, Z8, X];
}
fn _lydian(&mut self) {
self.definition = vec![Z0, Z2, Z4, Z6, Z7, Z9, Y];
}
fn _mixolydian(&mut self) {
self.definition = vec![Z0, Z2, Z4, Z5, Z7, Z9, X];
}
fn _aeolian(&mut self) {
self.definition = vec![Z0, Z2, Z3, Z5, Z7, Z8, X];
}
fn _locrian(&mut self) {
self.definition = vec![Z0, Z1, Z3, Z5, Z6, Z8, X];
}
}
impl ChordLib for Scale {
fn _major() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z4, Notation::Z7]
}
fn _maj7() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z4, Notation::Z7, Notation::Y]
}
fn _dominant9() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z4,
Notation::Z6,
Notation::X,
Notation::C,
]
}
fn _dominant11() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z4,
Notation::Z7,
Notation::X,
Notation::C,
Notation::F,
]
}
fn _dominantmin9() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z4,
Notation::Z7,
Notation::X,
Notation::B,
]
}
fn _maj7sharp11() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z4,
Notation::Z6,
Notation::Y,
Notation::G,
]
}
fn _dominant7() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z4, Notation::Z7, Notation::X]
}
fn _dominant7sharp9() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z4,
Notation::Z7,
Notation::X,
Notation::D,
]
}
fn _dominant13() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z4,
Notation::Z7,
Notation::X,
Notation::C,
Notation::F,
Notation::J,
]
}
fn _maj11() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z4,
Notation::Z7,
Notation::Y,
Notation::C,
Notation::F,
]
}
fn _harmonic7() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z4,
Notation::Z7,
Notation::Z9,
Notation::C,
]
}
fn _maj6() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z4, Notation::Z7, Notation::Z6]
}
fn _maj69() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z4,
Notation::Z7,
Notation::Z6,
Notation::C,
]
}
fn _maj9() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z4,
Notation::Z7,
Notation::Y,
Notation::C,
]
}
fn _maj13() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z4,
Notation::Z7,
Notation::Y,
Notation::C,
Notation::F,
Notation::J,
]
}
fn _neopolitan() -> Vec<Notation> {
vec![Notation::Z1, Notation::Z5, Notation::Y]
}
fn _minor() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z3, Notation::Z7]
}
fn _minmaj7() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z3, Notation::Z7, Notation::Y]
}
fn _min9() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z3,
Notation::Z7,
Notation::X,
Notation::C,
]
}
fn _min7() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z3, Notation::Z7, Notation::X]
}
fn _min6() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z3, Notation::Z7, Notation::Z6]
}
fn _min69() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z3,
Notation::Z7,
Notation::Z6,
Notation::C,
]
}
fn _min13() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z3,
Notation::Z7,
Notation::X,
Notation::C,
Notation::F,
Notation::J,
]
}
fn _mediant() -> Vec<Notation> {
vec![Notation::Z4, Notation::Z7, Notation::Y]
}
fn _min11() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z3,
Notation::Z7,
Notation::X,
Notation::C,
Notation::F,
]
}
fn _dominantparallel() -> Vec<Notation> {
vec![Notation::Z4, Notation::Z7, Notation::Y]
}
fn _aug() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z4, Notation::Z6]
}
fn _aug7() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z4, Notation::Z6, Notation::X]
}
fn _aug6_italian() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z4, Notation::Z9]
}
fn _aug6_french() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z4, Notation::Z6, Notation::Z9]
}
fn _aug6_german() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z4, Notation::Z7, Notation::Z9]
}
fn _aug11() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z4,
Notation::Z7,
Notation::X,
Notation::C,
Notation::F,
]
}
fn _lydian() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z4,
Notation::Z7,
Notation::Y,
Notation::I,
]
}
fn _augmaj7() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z4, Notation::Z6, Notation::Y]
}
fn _ninthaug5() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z4,
Notation::Z6,
Notation::X,
Notation::C,
]
}
fn _ninthdim5() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z4,
Notation::Z6,
Notation::Y,
Notation::C,
]
}
fn _dim() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z3, Notation::Z6]
}
fn _dimmaj7() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z3, Notation::Z6, Notation::Y]
}
fn _dim7() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z3, Notation::Z6, Notation::Z9]
}
fn _dominant7flat5() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z4, Notation::Z6, Notation::X]
}
fn _lead_tone_triad() -> Vec<Notation> {
vec![Notation::Z2, Notation::Z5, Notation::Y]
}
fn _halfdim7() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z3, Notation::Z6, Notation::X]
}
fn _dominant() -> Vec<Notation> {
vec![Notation::Z7, Notation::Y, Notation::Z2]
}
fn _magic() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z1,
Notation::Z5,
Notation::Z6,
Notation::Y,
Notation::C,
Notation::E,
Notation::H,
Notation::J,
]
}
fn _dream() -> Vec<Notation> {
vec![Notation::Z0, Notation::Z5, Notation::Z6, Notation::Z7]
}
fn _elektra() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z7,
Notation::Z6,
Notation::B,
Notation::E,
] }
fn _farben() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z6,
Notation::Y,
Notation::E,
Notation::J,
]
}
fn _mystic() -> Vec<Notation> {
vec![
Notation::Z0,
Notation::Z6,
Notation::X,
Notation::E,
Notation::J,
Notation::ZM,
]
}
}