-
Notifications
You must be signed in to change notification settings - Fork 3k
Import tef fix measure issues #30808
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
Import tef fix measure issues #30808
Conversation
|
|
||
| // Fill one gap (tstart - tend) in this track in this measure with rest(s). | ||
|
|
||
| static void fillGap(Measure* measure, track_idx_t track, const Fraction& tstart, const Fraction& tend) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Measurehas a methodfillGap, maybe you can use that, but you do need to add a parameter to make the rests invisible- If you prefer using a dedicated static function, then you could perhaps still benefit from the
toRhythmicDurationListutility, or maybe justtoDurationList, both are indurationtype.h.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer not to use a dedicated function, but could not find a suitable one ... Note that I do not consider rest visibility important in gaps.
|
|
||
| // Fill gaps in first voice of every staff in this measure for this part with rest(s). | ||
|
|
||
| static void fillGapsInFirstVoices(Measure* measure, Part* part) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this method doesn't really depend on part, so maybe it's also possible to just iterate over all staves of the score in one go, instead of per part?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course.
|
Hi Casper, thanks for reviewing. Function Measure::fillGaps() cannot be used as-is, as it is private. I tried to use Measure::checkMeasure) instead which is public. This leads to tuplets failing, which I do not yet understand. Pushed the change anyway to get feedback. Leon. |
|
Sorry for not noticing I notice Anyway, let's use a dedicated method again, but perhaps with |
…imported as corrupt
a56cad6 to
f641449
Compare
|
Reworked using toDurationList(), as that is somewhat simpler to use. Indeed it seems Measure::check() does not work correctly for truplets. |
Resolves: #30806
Resolves: #30807
Fix various forms of corrupted measures resulting from importing common TablEdit files.