lenmus / lomse

A C++ library for rendering, editing and playing back music scores.
MIT License
117 stars 28 forks source link

Tenuto bug? #390

Open HotdogFighter opened 1 year ago

HotdogFighter commented 1 year ago

Lomse version: 0.30.0 (master branch, not the release from Sep 11, 2022)

System: Windows 10 (64-bit)

Issue description: I’m new to sheet music (and music in general lol) so I wasn’t sure if this was a stylistic choice or a bug. The tenuto symbol is engraved at different locations compared to MuseScore. They sit above the staff instead of above the note:

tenuto bug report

Steps to reproduce: Compiled with Mingw-W64 on Windows Modified the tutorial 1 file for Windows by loading a preexisting mxl.

Minimal reproduction project:

Tenuto_bug_report.zip

Lomse is an awesome library, thanks for releasing it!

cecilios commented 1 year ago

Thanks for reporting. Properly placing the articulation symbols is complex when there are many notes (e.g.chords) and, currently, lomse does not does not cover all these complexity. But, certainly, in scores such as the submitted sample, it would be better to place the tenuto line as MuseScores does. I will review this and create a PR, but could take a while.

HotdogFighter commented 1 year ago

I've been reading through the source code over the past two months and want to see if I can implement a fix. Will send a PR by the end of August 🚂

cecilios commented 1 year ago

Thank you. I was looking at the bug when you reported it, but properly solving it (and other possible bad cases) require to study many cases with different combinations and to extract some rules, and I have not found yet time for this. Probably, a simpler fix for cases such as the one you reported can be easily implemented. All you have to do is to modify file lomse_articulation_engraver.cpp. I'll be glad if you can prepare a PR.