kord
A music theory binary and library for Rust (capability playground).
Binary Usage
Install
Windows:
iwr https://github.com/twitchax/kord/releases/latest/download/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):
Linux:
Cargo:
Help Docs
)
)
Describe A Chord
Play A Chord
)()
Loop Through Chord Changes
Guess A Chord
)
)()
)()
)()
)()
Guess Notes / Chord From Audio
Using the deterministic algorithm only:
Using the ML algorithm:
Library Usage
Add this to your Cargo.toml:
[]
= "*" #choose a version
Examples
use KnownChord;
use Degree;
use *;
use *;
// Check to see what _kind_ of chord this is.
assert_eq!;
use crateParsable;
use *;
use *;
// Parse a chord from a string, and inspect the scale.
assert_eq!;
use *;
use *;
// From a note, create a chord, and look at the chord tones.
assert_eq!;
Feature Flags
The library and binary both support various feature flags. Of most important note are:
default = ["cli", "analyze", "audio"]cli: enables the CLI features, and can be removed if only compiling the library.analyze = ["analyze_mic", "analyze_file"]: enables theanalyzesubcommand, which allows for analyzing audio data (and the underlying library features).analyze_mic: enables theanalyze micsubcommand, which allows for analyzing audio from a microphone (and the underlying library features).analyze_file: enables theanalyze filesubcommand, which allows for analyzing audio from a file (and the underlying library features).analyze_file_mp3: enables the features to analyze mp3 files.analyze_file_aac: enables the features to analyze aac files.analyze_file_alac: enables the features to analyze alac files.
ml = ["ml_train", "ml_infer"]: enables themlsubcommand, which allows for training and inferring with ML (and the underlying library features).ml_train: enables theml trainsubcommand, which allows for training ML models (and the underlying library features).ml_infer: enables theml infersubcommand, which allows for inferring with ML models (and the underlying library features).-
NOTE: Adding the
analyze_micfeature flag will enable theml infer micsubcommand, which allows for inferring with ML models from a microphone. -
NOTE: Adding the
analyze_filefeature flag will enable theml infer filesubcommand, which allows for inferring with ML models from a file.
-
ml_gpu: enables the features to use a GPU for ML training.
wasm: enables the features to compile to wasm.plot: enables the features to plot data.
Test
License
MIT