3 unstable releases

0.3.0 Aug 30, 2023
0.2.1 Aug 30, 2023
0.2.0 Aug 30, 2023
0.1.1 Aug 28, 2023
0.1.0 Aug 28, 2023

#495 in Audio

MIT license

63KB
1.5K SLoC

resonata

A music theory library for Rust

Usage

Add this to your Cargo.toml:

[dependencies]
resonata = "0.1.0"

Example

use resonata::note::Note;
use resonata::scale::Scale;

let note = note!("C").unwrap();
let scale = Scale::major(&note);

assert_eq!(scale.to_notes(), vec![
    note!("C").unwrap(),
    note!("D").unwrap(),
    note!("E").unwrap(),
    note!("F").unwrap(),
    note!("G").unwrap(),
    note!("A").unwrap(),
    note!("B").unwrap(),
]);

Documentation

Documentation is available here.

Contributing

Contributions are welcome! Please open an issue if you have any questions or suggestions. Pull requests are welcome too. I also have no idea what I'm doing, so if you see something that could be done better, please let me know!

License

MIT

Dependencies

~2.4–4MB
~72K SLoC