Skip to main content

fixup_chord_atom

Function fixup_chord_atom 

Source
pub fn fixup_chord_atom(atom: &str) -> String
Expand description

A figure as music21 reads one: music21’s fixupChordAtom, which reads the lab’s x as a diminished chord, its h as a half-diminished one and, on a minor degree, its a as an augmented one.

use music21_rs::romantext::clercq_temperley::fixup_chord_atom;

assert_eq!(fixup_chord_atom("iix"), "iio");
assert_eq!(fixup_chord_atom("viih7"), "vii/o7");
assert_eq!(fixup_chord_atom("iia"), "ii+");