-
Notifications
You must be signed in to change notification settings - Fork 2.6k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Exchange voices command is available with a single or list selection but does nothing #23330
Comments
Happy to fix either way, though the "actually work" option would take somewhat longer than the others. There's no message currently for "Please select a range" (or similar), so would require translation etc. |
There should have been
|
Not sure what reading the handbook has to do with expected behaviour. No command should ever be available and active but do nothing with no information about why nothing happened |
The handbook is still recommended; quoting:
So it was my misreading of your description (plus some false memories). As for your suggestion, Tools - Voices item could be disabled if selection is not full/multiple measures. |
Then the handbook is still wrong because it works fine if you select a range that's not a full measure too (though I haven't done extensive testing to see if it handles all scenarios). |
If a partial measure is selected, the command still operates on the full measure. That’s how it handles all scenarios. It’s easy with full measures, often next to impossible otherwise. So, the handbook is accurate that it only operates on full measures. it just leaves out the detail that it automatically expands to the full measure if you mistakenly select a partial measure. |
I'd say that's a separate bug then, though I'd fix at the same time |
It’s not a bug, it’s by design as the consensus choice (as of some years ago) from among the several possible ways of handling partial measures. Certainly, though, alternative designs for the handling of partial measures could potentially be proposed, discussed, agreed upon, implemented, and documented. |
My proposal: Otherwise, use existing algorithm. |
As discussed in Discord, it's just not that simple. If the voices don't start or end at the same time position, there is no guarantee that you'll be able to do the moves, and you'll end up either doing nothing for some of the notes, or stuck in places where some note has nowhere to go. Here was one example I noted: Just one of many many possible cases to consider. Your algorithm above will leave the third selected "C" nowhere to go, except maybe back where it started (try it using voice 3 as the temp voice and see). Or you can modify the rhythm to chop the start/end notes up and only move the portions they have in common, but there is no reason to suppose a user would actually expect that either. I'm not saying it's hard to do something, but almost anything you choose is going to be surprising and almost impossible to document. And not obviously better than the current solution. So as I said, alternative designs for the handling of partial measures could potentially be proposed, discussed, agreed upon, implemented, and documented, but acknowledging the complexity of the problem I(from a user understanding perspective - not from a code perspective) is definitely part of that. |
Ok so that brings up another piece of (to me) very unexpected behaviour, that probably deserves a separate bug report, but currently if you do select a note in, say, voice 2 and there's also a note at the same place already in voice 1, then using "Ctrl+Alt+1" or clicking on "voice 1" button in the toolbar does nothing at all with no explanation. I'd prefer to fix that first (again, it's simple in principle - it should delete material to make room for the note, same as changing a note duration etc.). |
This too is by design, the consensus choice as to the best way of handling such cases. Again, it’s possible to propose, discuss, agree upon, implement, and document a new design. |
As a fun fact, some OCR/PDF converters actually managed to create voices longer than time signature defines. |
Also, I took your example from above, changed the time signature to 3/8, used exchange voices on the 3 selected notes, then changed back to 4/4: Not that it proves anything, but does demonstrate that the current solution is not necessarily ideal. (The extra F at the end was something I'd added accidentally before changing time signature) |
IInitial selection with two quarters in lower voice you converted to quater and eighth. |
Exactly, you shouldn't have to resort to that to try to get a useful result. Not that I ever would try to use exchange voices on such a selection. But it's definitely a command that would be useful to use on selections that aren't entire measures. I'm happy to put up a PR so you can play around with it, will probably have to wait till tomorrow or the next day though. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Issue type
UX/Interaction bug (incorrect behaviour)
Bug description
If you select one or more notes in a list selection (using ctrl+click etc.), the various "exchange voices" commands from Tools|Voices are all enabled but do nothing.
Either the command should be disabled, a message should appear explaining why it can't be used, or they should work as expected (ideally the latter!).
Steps to reproduce
Expected: either 3. should not be possible because command is disabled, or an appropriate error message shown, or better, it should work.
Screenshots/Screen recordings
No response
MuseScore Version
4.3.1
Regression
I don't know
Operating system
Windows 11
Additional context
Apparently it's even weirder - if you select a range that's not a full measure then the command works, but affects notes you haven't selected elsewhere in the measure. It may make sense to fix it so it can work on any range but still be disabled for single/list selection. Otherwise I would think it should given a warning message if the current selection is anything other than 1 or more complete measures.
The text was updated successfully, but these errors were encountered: