Faulty vertical alignment of accidentals at chords

Project:MuseScore
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:active
Description

In the attached MuseScore example the program aligns the upper natural and the sharp and sets the lower natural to the left. MuseScore should instead align the naturals and put the sharp to the left like in the other example attached.

AttachmentSize
Accidentals at chords in MuseScore.PNG122.96 KB
Accidentals at chords.PNG43.04 KB
#1
Priority:normal» minor

In this case MuseScore is following the correct alignment rules but most scorewriters (including LilyPond).give the accidentals a larger margin which forces the different arrangement.

Probably MuseScore should give larger margins for accidentals since it looks like some of these accidentals are overlapping.

#2

David! Would you like to give a reference to or formulate the alignment rule MuseScore is following in this case?

#3

I reworked the accidental layout in rev. 1722. Two new style parameters are now available to adjust the distance between accidentals-notes and accidentals-accidentals. I found some infos for accidental layout from J.Gedan at http://www.pian-e-forte.de/texte/index.htm and changed the layout algorithm to match the given examples (well, mostly).

AttachmentSize
accidental3.png 115.36 KB
#4

Many thanks, Werner. Chord number 13 in your example is however incorrectly set according to both me and J Gedan, which of course affects the accidental placement; see attachment and page 17 in http://www.pian-e-forte.de/texte/pdf/notenschreiben01.pdf. For chords number 14 and 15 I would prefer what's in my version of the example for those chords though the difference is not big. As usual I made my example with Igor Engraver, but it took some editing to get the attached result.

AttachmentSize
Accidentals at chords.PNG 51.79 KB
#5

The (now old) implementation was based on http://mpa.org/music_notation/standard_practice.pdf.
J.Gedan talks about "exceptions" from his base rule but does not explain them. The last chord example seems to be such an exeption but i cannot see a rule/algorithm which i can implement.

#6

I have now read Standard Music Notation Practice and I can agree with almost everything in that text. The rule mentioned for accidentals at chords was clear, I think. A little elaborated, but probably not sufficient for an algorithm, it is something like this:
1. The highest accidental in normal position next to its notehead if it does not encroach on a note.
2. The first lower accidental that does not encroach vertically on the highest accidental is vertically aligned with it.
3. The second lower accidental that does not encroach vertically on the accidental in number 2 is vertically aligned with it (and the highest).
4. The other accidentals are displaced to the left starting with the first lower accidental from the top one that encroaches vertically on it.
Can this be refined and translated into computer language and be understood by a machine?

Syndicate content