-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Plugin API: add support for tuplets, add Cursor.addRest() #6085
Conversation
9346ef1
to
41abc27
Compare
Hi, I am delighted to see this PR, thanks for creating it! I built and ran dmitrio95:plugin-api-rests-tuplets, and I think I found a bug.
Result: EXC_BAD_ACCESS (code=1, address=0x28). See screenshots. I am running MuseScore from XCode 11.4.1, OS: macOS 10.15, Arch.: x86_64, MuseScore version (64-bit): 3.5.0, revision: github-musescore-musescore-41abc27 |
Hi I think I found another bug in this PR.
Result: the score looks wrong. See screenshot.
Result: error message: the score is corrupted. I am running MuseScore from XCode 11.4.1, OS: macOS 10.15, Arch.: x86_64, MuseScore version (64-bit): 3.5.0, revision: github-musescore-musescore-41abc27 |
41abc27
to
e7d7c7e
Compare
Hi @markshepherd, thanks for reporting these issues! I added a check which prevents the second case from happening: MuseScore doesn't support cross-measure tuplets at the moment so plugins shouldn't be able to add such tuplets either. However I wasn't able to reproduce the first issue with a crash on clicking a tuplet. Does this happen when clicking a tuplet which was not created by this plugin, and does this happen if running an installed version of plugin instead of using a Plugin Creator? I suspect there is something MacOS-specific here, and it is also quite likely to be unrelated to this pull request. But it would be good to know a way to reproduce the issue if it exists. |
@dmitrio95 I'm glad you found an easy fix for the 2nd issue. Regarding the 1st issue: it happens only if i follow exactly the instructions and do nothing else. For example, if after step 3 I close the Plugin Creator, the problem doesn't happen. Or if I switch to another app and then switch back, it doesn't happen. Or if I toggle between windows. Regarding your questions.. yes, the crash happens if I install the plugin and invoke it from the Plugins menus. And yes, it happens if I click on a tuple that I created manually using cmd-3 in the score. I made another tiny plugin crash2.qml.zip that does NOT create a tuple, and the crash still happens ...
Result: Same crash as before. I tried these steps on MuseScore 3.5, MuseScore 3.5 alpha, MuseScore nightly from May 12, my private debug build of plugin-api-rests-tuplets, and my own release build of plugin-api-rests-tuplets. The crash only occurs on the plugin-api-rests-tuplets builds. Too bad this is not happening for you, it may well be macos specific. LMK if there is anything else I can do to help track it down. |
Does the crash occur if you build |
Hi, I found that the crash occurs when I
I think this means it's not a bug in your PR, and it's not specific to your repo, and it's not new. Sorry about that. Since the problem only seems to happen on builds that I make, and not in the published builds, I don't know if I should open a musescore issue. What do you think? (FWIW, my dev environment was freshly installed according to the MuseScore docs just a week or two ago, and I have made no changes to anything). |
I think creating an issue in the tracker would be good anyway. It is certainly not the most important issue for now but it may be related to Qt version or something like that which may become important later. As I mentioned that, which Qt version do you use in your builds? I tested this only with Qt 5.9.8 which is used by release builds which may also explain why I wasn't able to reproduce the issue. |
Sure, I'll open an issue. I have installed QT 5.12.8. |
Accordingly to what has been discussed in the Telegram chat some time ago, this PR provides an access to
Tuplet
objects from plugins. In addition to what has been discussed, it also adds a way to enter tuplets with aCursor
. Therefore plugins should be able both to enter tuplets and access properties of already existing tuplets. To complement all this, this PR adds an ability to add rests in a similar way withCursor
(similarly to what has been proposed in #1264 (comment)) which should makeCursor
a more feature-complete way to programmatically edit musical content of scores from plugins.