| Crates.io | music-note |
| lib.rs | music-note |
| version | 0.3.1 |
| created_at | 2022-04-25 00:20:08.13573+00 |
| updated_at | 2022-08-10 21:26:50.899684+00 |
| description | Music theory library with midi, notes, chords, scales, and more |
| homepage | |
| repository | https://github.com/matthunz/music-theory |
| max_upload_size | |
| id | 573376 |
| size | 44,292 |
Music theory library with midi, notes, chords, scales, and more
use music_note::{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));