A library for musical pitch conversions!
pitch_calc
provides functions and methods for converting between frequency, midi-step and letter-octave.
It looks like this.
Rust
assert!(Hz(440.0).letter_octave() == (A, 4))
Add the following to your Cargo.toml.
[dependencies.pitch_calc]
git = "https://github.com/RustAudio/pitch_calc"
See the example for a simple demonstration.