Crate persichetti[−][src]
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.
Example: Interval Naming
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));
Modules
primitives | This module provides notes and intervals for use in more complex applications, as well as macros for quickly initializing them. |
serialism |
Macros
civl | Initialize a |
ivl | Initialize an |
note | Initialize a |
pnote | Initialize a |
Constants
CHROMATIC_SCALE | The number of distinct pitches in a chromatic scale spanning one octave |
C_ZERO_MIDI | In MIDI’s encoding scheme, this number represents the pitch corresponding to C0 in scientific pitch notation |
DIATONIC_SCALE | The number of notes in a diatonic scale |