staff
staff copied to clipboard
Music theory and score rendering library with midi, notes, chords, scales, and more.
Staff
Music theory CLI and library with midi, notes, chords, scales, and more.
Installation
cargo install staff --features=cli
Usage
Command-line interface
$ staff chord C#m7
C# F G# B
$ staff scale D dorian
D E F G A B C
Library
use staff::{midi, Chord, Pitch};
let chord = Chord::from_midi(
midi!(C, 4),
[midi!(E, 3), midi!(G, 3), midi!(C, 4)]
);
assert_eq!(chord.to_string(), "C/E");
let pitches = [Pitch::E, Pitch::G, Pitch::C];
assert!(chord.into_iter().eq(pitches));