-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect beaming when mixing notes and chords and stems are down #161
Comments
@dfober I believe I have a fix for this (and starting to understand the logic in GRBeams). Will PR soon. In short: It seems like the Polygon points in GRBeam are set only using the first and last events in a Beam. In the above example, the middle events should affect the position of the first point of the polygon (which by itself will lead to new stem lengths etc). |
I have some doubts about this hypothesis : if you replace the last chord |
Interesting.. in my fix, once the p0.y is set, I browse associated notes, look at their Stem Start Position and decide whether the initial decision was good or not (based on Direction). This works... but we might just be looking over a bug related to Or maybe in case of chords the refEvent (which seems to be a SingleNote) is not chosen correctly?!? 🤷🏻♂️ |
am looking at #154 right now which is somehow related to p0 initialisation.. will check this hypothesis |
as far as I remember and in case of chords, a shared stem is used (GRGlobalStem) instead of a simple stem (GRStem). This might be something to check. |
You are absolutely right! my initial solution solves this special case but creates regressions elsewhere. Investigating further... . |
@dfober I believe I have found the cause: Chords seem to send Is that a bug or is there a reason for this? This explains why removing the chord at the end makes it work. |
I confirm, after testing that the correct solution is to find a suitable way of avoiding I can see elsewhere that this is also mentioned in the code (*). How would you suggest avoiding Empty for chords in the context? (*) guidolib/src/engine/graphic/GRSlur.cpp Line 144 in bb00ffe
|
Or maybe simply the current definition of isEmpty used in guidolib/src/engine/graphic/GRBeam.cpp Line 869 in 6d1fb44
instead of bool empty = (sn->isEmpty() && !sn->getDuration()); ?
Once again: I confirm that this potentially closes the issue. |
Chord encoding in guido is very special. A chord does not really exist as an object, it is represented in a similar way to gmn syntax, framed by
will be represented in AR by
This is why it's necessary to distinguish between 'real' empty and those which frame chords. Regarding the proposed change with the empty computation, I'll have a look as soon as I'll be back home. Did you checked that it works in any case with the validation tests ? |
fixed.
Was a bit more complex than just changing the test (this was breaking the solved issue #146) |
…o-develop * commit 'd16a038a072e1801841d38acbef03cb0a42df007': issue 161 validation process: add documentation fine tuning (multi voices note collisions) fix incorrect beaming (issue grame-cncm#161) propagate ARNote auto flag to GREmpty add auto flag to empty manage auto flag for empty notes remove useless include remove obsolete trajectory proll from validation
Issue when Stems are down only (up is fine).
Example:
The text was updated successfully, but these errors were encountered: