persichetti

Crates.iopersichetti
lib.rspersichetti
version0.2.0
sourcesrc
created_at2021-04-04 00:48:10.487706
updated_at2021-05-09 19:28:41.85686
descriptionFoundational elements of western classical harmony, and tools to analyze them
homepage
repositoryhttps://github.com/kyle-silver/persichetti
max_upload_size
id378567
size56,359
Kyle Silver (kyle-silver)

documentation

README

Persichetti

Persichetti is a crate that provides primitives for reasoning about harmonic concepts in western classical and contemporary music. It is named after Vincent Persichetti, composer and author of 20th Century Harmony. Some of the concepts in that book are realized here.

Features

Name an interval, given the two notes that make it up

let b_flat = note!("Bb")?;
let g_sharp = note!("G#")?;
assert_eq!(Interval::new(Sixth, Augmented(1))?, Interval::from_notes(&b_flat, &g_sharp));

Add intervals together

let major_second = Interval::new(Second, Major)?;
let perfect_fourth = Interval::from_str("p4")?;
assert_eq!(Interval::new(Fifth, Perfect)?, major_second + perfect_fourth);

Combine notes and intervals

let f_sharp = note!("f#")?;
let major_third = ivl!("M3")?;
assert_eq!(note!("a#")?, f_sharp + major_third);

Other tools include:

  • Inverting intervals
  • Scientific pitch and MIDI note conversion
  • Generating serial tone matrixes

Work-in-progress tools include:

  • Chord identification
  • Extended / jazz harmony
  • Neo-Remannian transformations (PLR / NSH)
  • Slonimsky melodic sequences (Infrapulation, Interpolation, Ultrapolation)
  • Modes of limited transposition
Commit count: 29

cargo fmt