https://github.com/RustAudio/pitch_calc
A library for musical pitch conversions! Provides functions and methods for converting between frequency (hz), midi-step, letter-octave and mels.
https://github.com/RustAudio/pitch_calc
Last synced: 3 months ago
JSON representation
A library for musical pitch conversions! Provides functions and methods for converting between frequency (hz), midi-step, letter-octave and mels.
- Host: GitHub
- URL: https://github.com/RustAudio/pitch_calc
- Owner: RustAudio
- Created: 2014-11-29T13:45:54.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2025-03-09T16:38:04.000Z (4 months ago)
- Last Synced: 2025-03-09T17:27:22.858Z (4 months ago)
- Language: Rust
- Homepage:
- Size: 81.1 KB
- Stars: 68
- Watchers: 16
- Forks: 13
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-open-synth - pitch_calc
README
# pitch_calc [](https://travis-ci.org/RustAudio/pitch_calc) [](https://crates.io/crates/pitch_calc) [](https://docs.rs/pitch_calc/)
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))
```Types
------ [**Hz**](http://en.wikipedia.org/wiki/Hertz): "times per second".
- [**LetterOctave**](http://en.wikipedia.org/wiki/Letter_notation): musical letter notation.
- [**Mel**](http://en.wikipedia.org/wiki/Mel_scale): a perceptual scale of pitches judged by listeners to be equal in distance from one another.
- **Perc**: Percentage of the average human hearing range (20hz - 20khz).
- **ScaledPerc**: Scaled percentage of the human hearing range.
- [**Step**](http://en.wikipedia.org/wiki/Semitone): MIDI semitone steps.