Skip to content
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

Fix note collisions for 3.0 #3548

Merged
merged 2 commits into from
Nov 14, 2018

Conversation

mirabilos
Copy link
Contributor

Same as #3514 for master.

Please test first, I do not currently have a development environment for master (will do after 2.2.0 is released).

@mirabilos mirabilos force-pushed the fix-note-collisions-3.0 branch 2 times, most recently from 6de3cc0 to b8b582b Compare March 17, 2018 00:42
@mirabilos
Copy link
Contributor Author

Merged #3551 and squashed all commits into one since @lasconic seems to prefer that

@lasconic
Copy link
Contributor

Let's used the approach in #3560 for now.

@mirabilos mirabilos mentioned this pull request Mar 28, 2018
@mirabilos
Copy link
Contributor Author

mirabilos commented Mar 30, 2018

• Rebased on current master (as of today)
• used the approach in #3560 over #3551 for now, but in a second commit, easily git revertable later once we do provide channel assignment
• master will need #3588 for exactly the time the #3560 approach is used (i.e. commit “merge the restriking patch” is not reverted); after that, the commit from #3588 will also need to be reverted (ideally, just before the other one is reverted, as that will make “git revert” behave)
• master will also need #3579 (once it’s added to 2.2.1)

I’ll update this PR as the others will be merged into 2.2.1, to make it easier to keep track of things.

@lasconic
Copy link
Contributor

lasconic commented Apr 3, 2018

So we need #3579 and #3588 in this PR to be on par with 2.2.1 / 2.3

@mirabilos
Copy link
Contributor Author

@lasconic rebased onto latest master and merged the two PRs into the respective correct commits (first commit to stay, second commit to be git reverted later when we switch back from restriking)

@anatoly-os
Copy link
Contributor

@mirabilos could you please rebase the PR?

@mirabilos
Copy link
Contributor Author

@anatoly-os sure, but give me a couple of days or so.

With our without the restriking part?

@mirabilos
Copy link
Contributor Author

Rebased against latest master, keeping the split into two commits (so the second one can later easily be reverted), check second commit against #3797 and remove one useless/unused variable.

mtest/libmscore/midi/tst_midi.cpp Outdated Show resolved Hide resolved
};

/* track info for each channel (on the heap, 0-initialised) */
struct channelInfo *info = (struct channelInfo *)calloc(_highestChannel + 1, sizeof(struct channelInfo));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we avoid c-like allocations using C++11 style instead like using new() operator or even std::unique_ptr? The last is known to work without side effects on memory allocation.

libmscore/rendermidi.cpp Show resolved Hide resolved
@anatoly-os
Copy link
Contributor

@mirabilos I left few comments on this PR. Sorry, I absolutely forgot we need to correctly process such kind of notes collisions. Let's finish this PR so that it could be merged.

@mirabilos
Copy link
Contributor Author

mirabilos commented Nov 1, 2018 via email

@mirabilos mirabilos force-pushed the fix-note-collisions-3.0 branch 2 times, most recently from 3801d0f to c7d4f17 Compare November 2, 2018 16:43
@anatoly-os
Copy link
Contributor

AppVeyor was not even triggered. Could you push some small changes?

@mirabilos
Copy link
Contributor Author

mirabilos commented Nov 2, 2018 via email

Also adjust MIDI testcases: the reference output did
hardcode the old behaviour of not refcounting.
This brings master to the same state as v2.3.2 wrt. the MIDI issues;
*this* commit can later easily be reverted once we switch away from
restriking again as @lasconic indicated in:
https://musescore.org/en/node/270562#comment-826020
@mirabilos
Copy link
Contributor Author

@anatoly-os is there anything holding off merging this? I had to rebase it again

@anatoly-os
Copy link
Contributor

My last question is not addressed yet. My last concern is about possible performance drop in playback time due to introducing fixupMIDI() method.

@mirabilos
Copy link
Contributor Author

We analysed this before the patch was accepted in 2.x and all involved people agreed that the performance impact was neglegible.

@anatoly-os anatoly-os merged commit 6fd1008 into musescore:master Nov 14, 2018
@mirabilos mirabilos deleted the fix-note-collisions-3.0 branch November 14, 2018 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants