Crates.io | staff |
lib.rs | staff |
version | 0.11.0 |
source | src |
created_at | 2022-08-10 21:27:27.749607 |
updated_at | 2023-09-18 05:36:54.300866 |
description | Music theory library with midi, notes, chords, scales, and more |
homepage | https://staff-rs.github.io |
repository | https://github.com/staff-rs/staff |
max_upload_size | |
id | 642905 |
size | 95,393 |
Music theory and score rendering library with midi, notes, chords, scales, and more.
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));
render
: Enable render
module
svg
: Enable rendering to SVGsynth
: Enable synth
module forserde
: Impl Deserialize and Serialize for many crate types