Vexflow: bad slash position(y) for Grace note chords

Created on 17 Nov 2017  路  7Comments  路  Source: 0xfe/vexflow

All 7 comments

The issue is Line 54 of gracenote.js:
https://github.com/0xfe/vexflow/blob/04d15d1ab16e5b8c6b88f8f36a91bd65dc7f984d/src/gracenote.js#L54

Where the slash position is calculated as a fraction of the stem height. With grace note chords the stem will be longer, hence the odd positioning. Should be calculated as a fraction of the space-between-stave-lines from the outer Y of a stem.

I'll get to this when I can -- but it should be a pretty easy fix if someone else would like to tackle it.

FYI: 'Behind Bars' Page 126:

The diagonal line should intersect the tail of beam without colliding with the notehead:

Ensure that a grace note on ledger lines has a sufficiently long stem for the diagonal stroke not to obscure a ledger line: ....
Place the diagonal stroke so that, ideally, white space shows through between the stem, the tail or beam and the diagonal.

PLACING DIAGONAL LINES ON GRACE-NOTE GROUPS
Place the line at the beginning of a group, and diagonally to the beam:

With double-stemmed beams(stems extending in both directions from a beam), the stem direction of the first note determines the position of the diagonal line. The direction of the diagonal is the same as for the single grace note of the same stem direction:

  • finale25:
    image

image
image

more finale25 examples.

  • for default stem length, slash y position is same for all duration.
  • slash y position may resolve relative to the default(8th) logical stem end (flag side). (?)

image

more finale25 examples.

https://usermanuals.finalemusic.com/Finale2012Win/Content/Finale/Grace_notes3.htm

 Document > Document Options > Grace Notes. The Grace Note options appear.
  • The slash is scaled by the size of the grace note.

https://github.com/0xfe/vexflow/blob/04d15d1ab16e5b8c6b88f8f36a91bd65dc7f984d/src/gracenote.js#L44

since slash line width is not specified slash line width is depend on the previous ctx.setLineWidth operation.

  • default slash line width(thickness) value?
  • depends on #656?

fixed by #661 (with some FIXMEs).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rowild picture rowild  路  5Comments

dinukadesilva picture dinukadesilva  路  5Comments

graciano picture graciano  路  4Comments

compilelife picture compilelife  路  4Comments

CrystalShardz picture CrystalShardz  路  4Comments