Staff
Music theory and score rendering library with midi, notes, chords, scales, and more.
Installation
cargo install staff --features=cli
Usage
use ;
let chord = from_midi;
assert_eq!;
let pitches = ;
assert!;
Music theory and score rendering library with midi, notes, chords, scales, and more.
cargo install staff --features=cli
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));