question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Chord symbols overlap with notes above stave.

See original GitHub issue

I’d like to add my support for the idea of developing a collision detection and spacing method for chord symbols.

In the first example the chord symbols overlap with most notes above the stave. In the second example I set the Y offset higher with osmd.EngravingRules.ChordSymbolYOffset = 4.0;. This avoids most collisions but it sets the chord symbol position too high. Most scores in the app I’m building don’t have notes above the stave, so in those cases it will look a bit odd to have the chord symbols this high.

Notes above stave overlapping with chord symbols

Chord symbols Yoffset = 4 0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:18 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
sschmidTUcommented, Nov 11, 2021

Chord symbol overlap is now fixed, symbols are positioned above the skyline (highest colliding point): image

You can also align the y positions of the chord symbols, either per measure or per staffline: image image

osmd.EngravingRules.ChordSymbolYAlignment = true;
osmd.EngravingRules.ChordSymbolYAlignmentScope = "staffline"; // or "measure"
// YOffset is mostly not needed anymore:
osmd.EngravingRules.ChordSymbolYOffset = 0.1;

Implementation is similar as in #1081, which made it much easier to implement now.

1reaction
sschmidTUcommented, Nov 11, 2021

It looks like staffline alignment scope should be the standard, as the measure wise alignment scope with its ups and dows of positioning looks a bit unattractive to me in the visual diffs of our samples: image

measure wise alignment: image

staffline wise alignment looks much better, and basically doesn’t use more space except maybe potentially for the composer label in some cases This sample has actually only 1 pixel more height with staffline alignment than with measure alignment. (997 vs 996)

Also, this general implementation saves space compared to before anyways, because we’re right above the skyline now, and don’t need a big default offset applied to every chord symbol. diff_chord_alignment_staffline_wise.zip diff_chord_alignment_measure_wise.zip

The staffline diffs are basically pure improvements in 7 samples. Feel free to share or test your own samples.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chord Symbols – OPEN MUSIC THEORY
Chord symbols tell you the root of the triad, the quality of the triad, any extensions to the triad, and any non- root...
Read more >
Chord symbols overlap barlines - MuseScore
I think what you are really noticing is that chord symbols used to be left-aligned by default but now they are centered (except...
Read more >
Fingering can overlap notes especially with chords ...
FingeringPosition = 0 // above or: osmd.rules. ... Fingering can overlap notes especially with chords, with FingeringPosition Above/Below # ...
Read more >
Sib. 6.2: Re-spacing notes to accommodate chord symbols
I have a few thousand measures of music with overlapping chord symbols and ... blank points in the staves, rather than to the...
Read more >
Chord diagrams overlapping staves above - Dorico
When adding chord diagrams to a Dorico 2 file opened in Dorico 3 the diagrams are overlapping the staves above in the separate...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found