Skip to content

Note heads should be placed according to diatonic scale #2511

@Danielku15

Description

@Danielku15

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

See #2510

The placement of note heads currently does not respect key signature specifics on which variant of notes should be taken. e.g. with a E#3 and F3 being the same pitch, we prefer a F3 display over a E#3 in a F# key signature.

Expected Behavior

We should respect key signature specific influences to the note placements.

Steps To Reproduce

\ks f#
:4
2.4 4.4 1.3 2.3 4.3 1.2 3.2 4.2 | 
3.2 1.2 4.3 2.3 1.3 4.4 2.4.2

Link to jsFiddle, CodePen, Project

No response

Version and Environment

alphaTab 1.8.0

Platform

Web

Anything else?

There are some tricky aspects to the note placement: Clefs, key signatures and preferred accidentals all influence the placement.

We used to have a "lookup table" for such cases. But there should be better ways to calculate the staff line. Especially as key signatures could also be defined in a custom fashion we might want to avoid lookup tables. (see #1990 )

Maybe there are some good "standard" algorithms we can implement from a reference. Let's check what Behind Bars mentions and look at some open source implementations of this problem.

Metadata

Metadata

Assignees

Labels

area-renderingEverything related to the renderingplatform-allAffects all platformsstate-acceptedThis is a valid topic to work on.

Type

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions