
kord
A music theory binary and library for Rust.
Binary Usage
Install
Windows:
iwr https://github.com/twitchax/kord/releases/download/v0.1.1/kord_x86_64-pc-windows-gnu.zip
Expand-Archive kord_x86_64-pc-windows-gnu.zip -DestinationPath C:\Users\%USERNAME%\AppData\Local\Programs\kord
Mac OS (Apple Silicon):
curl -LO https://github.com/twitchax/kord/releases/download/v0.1.1/kord_aarch64-apple-darwin.zip
unzip kord_aarch64-apple-darwin.zip -d /usr/local/bin
chmod a+x /usr/local/bin/kord
Linux:
curl -LO https://github.com/twitchax/kord/releases/download/v0.1.1/kord_x86_64-unknown-linux-gnu.zip
unzip kord_x86_64-unknown-linux-gnu.zip -d /usr/local/bin
chmod a+x /usr/local/bin/kord
Cargo:
$ cargo install kord
Help Docs
$ kord -h
A tool to easily explore music theory principles.
Usage: kord [COMMAND]
Commands:
describe Describes a chord
play Describes and plays a chord
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help information
-V, --version Print version information
Describe A Chord
$ kord describe Cmaj7
Cmaj7
major 7, ionian, first mode of major scale
C, D, E, F, G, A, B
C, E, G, B
Play A Chord
$ kord play Bb7#9#11
B♭7(♯9)(♯11)
dominant sharp 9, altered, altered dominant, super locrian, diminished whole tone, seventh mode of a melodic minor scale, melodic minor up a half step
B♭, C♭, D♭, E𝄫, F♭, G♭, A♭
B♭, D, F, A♭, C♯, E
Library Usage
Add this to your Cargo.toml:
[dependencies]
kord = "0.1"
Examples
use klib::known_chord::KnownChord;
use klib::modifier::Degree;
use klib::note::*;
use klib::chord::*;
assert_eq!(Chord::new(C).augmented().seven().known_chord(), KnownChord::AugmentedDominant(Degree::Seven));
assert_eq!(Chord::parse("Cm7b5").unwrap().scale(), vec![C, D, EFlat, F, GFlat, AFlat, BFlat]);
assert_eq!(C.into_chord().augmented().major7().chord(), vec![C, E, GSharp, B]);
Test
cargo test
License
MIT