Skip to content
Snippets Groups Projects
Commit d91f5830 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

For explicitly notated accidentals, also create a <accidental> for the visual appearance

parent 8c21a279
No related branches found
No related tags found
No related merge requests found
......@@ -519,6 +519,8 @@ sub parse_note {
# Determine graphic notehead:
print OUT notehead ($dur, $dot);
# If we have an explicit accidental on the note, print the <accidental> tag
print OUT accidental_explicit ($acc);
print OUT $addition;
......@@ -588,6 +590,17 @@ sub alter {
return "";
}
sub accidental_explicit {
my ($acc) = @_;
my %accidentals = ("xx", "double-sharp", "x", "sharp", "n", "natural", "b", "flat", "bb", "flat-flat");
my $this_acc = $accidentals{$acc};
if ($this_acc) {
return "\t\t\t\t<accidental>$this_acc</accidental>\n";
} else {
return "";
}
}
sub notehead {
my ($duration, $dots) = @_;
if ($duration.$dots ne "") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment