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
......@@ -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 "") {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment