paulrosen / abcjs

javascript for rendering abc music notation
Other
1.91k stars 282 forks source link

Overlapping symbols #921

Open nbruley opened 1 year ago

nbruley commented 1 year ago

I thought this was submitted already but I don't see it... seems like a relatively major issue in creating a professional appearance so wanted to make sure it is out there somewhere.

Example:

image

Then again, possibly this is only an issue when using multiple voices... I haven't checked.

paulrosen commented 1 year ago

That bug is just for multiple voices - for a single voice it moves one of the accidentals earlier.

I'm not sure about a workaround other than putting in a special case and moving one of the symbols earlier right after rendering.

Thanks for reporting.

nbruley commented 1 year ago

You were able to fix the issue of notes overlapping with multiple voices, could similar logic be used to correct this? image

paulrosen commented 1 year ago

By "this", you mean the misplacement of the slurs?

I'm sure I can recreate it, but can you post the ABC for that line?

Where do you expect the slurs to be? Outside the bar but using the same arc or attached to the notes and with the arc going the opposite direction?

nbruley commented 1 year ago

Sorry to be confusing. What I meant is you were able to change the position of the notes when they were a second apart with multiple voices, so maybe the same logic could be used to move one of the accidentals.

image

nbruley commented 5 months ago

Also, you are already adjusting the accidental position like this, so it seems whatever code you are using here you could just also check to see if there is an accidental on that note? image