chordcalc 0.1.0

Chord related utilities
Documentation
#[derive(Debug, Copy, Clone)]
pub enum Mode {
    Major,
    Minor,
    Augmented,
    Diminished,
}
impl crate::Mode for Mode {
    fn make_chord(&self, tonality: crate::MusicalNote) -> crate::Chord {
        let base = tonality;
        match self {
            Mode::Major => [base, base + 4, base + 7],
            Mode::Minor => [base, base + 3, base + 7],
            Mode::Augmented => [base, base + 4, base + 8],
            Mode::Diminished => [base, base + 4, base + 6],
        }
        .into()
    }
}