Skip to main content

accidental_label_to_unicode

Function accidental_label_to_unicode 

Source
pub fn accidental_label_to_unicode(label: &str) -> String
Expand description

A label with its sharps or its flats drawn as music symbols: only one of the two, the first music21’s table has that the label holds.

use music21::graph::utilities::accidental_label_to_unicode;

assert_eq!(accidental_label_to_unicode("B-4"), "B\u{266d}4");
assert_eq!(accidental_label_to_unicode("B--4"), "B\u{266d}\u{266d}4");
assert_eq!(accidental_label_to_unicode("C4"), "C4");