Skip to main content

convert_harm_to_roman

Function convert_harm_to_roman 

Source
pub fn convert_harm_to_roman(token: &str) -> Option<String>
Expand description

The figure a **harm token stands for, or nothing where it is no token: music21’s convertHarmToRoman.

use music21_rs::humdrum::harm::convert_harm_to_roman;

assert_eq!(convert_harm_to_roman("V7b").as_deref(), Some("V65"));
assert_eq!(convert_harm_to_roman("Gnd").as_deref(), Some("Ger2"));
assert_eq!(convert_harm_to_roman("x"), None);