This crate provides basic functionality for working with and reasoning about the harmony common in western classical and contemporary music. Included are basic building blocks such as notes and intervals, and tools for identifying and generating more advanced structures.
use persichetti::primitives::*; let b_flat = Note::from_str("Bb")?; let g_sharp = Note::from_str("G#")?; assert_eq!(Interval::from_str("A6")?, Interval::from_notes(&b_flat, &g_sharp));
This module provides notes and intervals for use in more complex applications, as well as macros for quickly initializing them.
The number of distinct pitches in a chromatic scale spanning one octave
In MIDI’s encoding scheme, this number represents the pitch corresponding to C0 in scientific pitch notation
The number of notes in a diatonic scale