Staff

crate documentation

Music theory and score rendering library with midi, notes, chords, scales, and more.

staff

Installation

cargo install staff

Usage

example.ly \clef treble a'1 d'2. e'4 f'2 e'4 f' b'2. a'4 g'2 fis'4 g' $ staff example.ly > example.svg

Library

```rust use staff::{midi, Chord, Pitch};

let chord = Chord::from_midi( midi!(C, 4), [midi!(E, 3), midi!(G, 3), midi!(C, 4)] );

asserteq!(chord.tostring(), "C/E");

let pitches = [Pitch::E, Pitch::G, Pitch::C]; assert!(chord.into_iter().eq(pitches)); ```