You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AI-assisted (disclosure block included as described in AGENTS.md)
Current Behavior
Note
AI-authored disclosure (alphatab-ai-authored-v1)
Portions of this content were authored by an AI agent. The agent has read AGENTS.md and the human submitter accepts responsibility for
compliance with the rules in that document.
In a key with flats, a note whose pitch is <step>F</step><alter>1</alter>
(F sharp) is drawn as G flat unless that particular <note> carries an <accidental>sharp</accidental> element. Notation programs only write the <accidental> element where a sign is actually printed, so this hits:
the second and later F sharps within the same bar (the sign is only printed
on the first), and
a note tied over a bar line (the sign is never reprinted on the tied note).
Example 1 (F major, bar: F# quarter with accidental, F# quarter without, G
half) renders as ♯F, ♭G, ♮G: three different note heads, the second F#
sits on the G line with a flat, and the following G then gets a natural sign.
Example 2 (F major, whole-note F# with accidental tied to a whole-note F#
without) renders as ♯F tied to ♭G: the tie visibly connects two different
staff lines, which reads as a pitch change.
Playback is correct in both cases (MIDI 66); only the notation is wrong.
Expected Behavior
Example 1: ♯F, F, G, all three on their own lines, with one accidental.
Example 2: ♯F tied to F on the same line, no accidental in bar 2.
For the tie case we can work around it by adding the omitted <accidental>
to the tied note before loading, and alphaTab then draws no extra sign. For the
same-bar case there is no clean workaround from outside, since the source
deliberately omits the element.
Is there an existing issue for this?
I have read the contribution rules
AI authorship
AI-assisted (disclosure block included as described in AGENTS.md)
Current Behavior
Note
AI-authored disclosure (
alphatab-ai-authored-v1)Portions of this content were authored by an AI agent. The agent has read
AGENTS.md and the human submitter accepts responsibility for
compliance with the rules in that document.
In a key with flats, a note whose pitch is
<step>F</step><alter>1</alter>(F sharp) is drawn as G flat unless that particular
<note>carries an<accidental>sharp</accidental>element. Notation programs only write the<accidental>element where a sign is actually printed, so this hits:on the first), and
Example 1 (F major, bar: F# quarter with accidental, F# quarter without, G
half) renders as ♯F, ♭G, ♮G: three different note heads, the second F#
sits on the G line with a flat, and the following G then gets a natural sign.
Example 2 (F major, whole-note F# with accidental tied to a whole-note F#
without) renders as ♯F tied to ♭G: the tie visibly connects two different
staff lines, which reads as a pitch change.
Playback is correct in both cases (MIDI 66); only the notation is wrong.
Expected Behavior
Example 1: ♯F, F, G, all three on their own lines, with one accidental.
Example 2: ♯F tied to F on the same line, no accidental in bar 2.
In MusicXML the spelling of a note is defined by
<step>and<alter>;<accidental>only says which sign is printed(https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/pitch/ ,
https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/accidental/).
MuseScore renders both examples as expected. The problem is very common in
choral music: any leading note in a minor key with flats (C# in D minor, F#
in G minor) is affected whenever the accidental is not reprinted.
Steps To Reproduce
Save example 1 as
same-bar.musicxml:Save example 2 as
tie.musicxml(same header, two bars):(or unzip the included repro.zip)
Load each with
api.load(...)and look at the rendering.Observe the flat G (and the natural on the following G) in example 1, and
the tie between two different lines in example 2.
repro.zip
Link to jsFiddle, CodePen, Project
No response
Version and Environment
Platform
Web
Anything else?
For the tie case we can work around it by adding the omitted
<accidental>to the tied note before loading, and alphaTab then draws no extra sign. For the
same-bar case there is no clean workaround from outside, since the source
deliberately omits the element.