Open elsewhere37 opened 7 months ago
Huh. I thought I had that fixed. I'll have a look at this issue and the other one this week and try and have something by the weekend.
I struggled with this myself (but experience info overload and forget easily). See:
https://musescore.org/en/project/fill-chosen-voices-selection-chosen-tuplet
Internal voices 2-4 do not have prefilled segments, so some workaround is required. First each measure of each voice gets a whole note rest. Then they first get a rest of the required length, and then the tuplet. This is (as far as I gather) because addtuplet does not advance the cursor (and leaves it in limbo) while addRest (and addnote) advance the cursor, thereby creating the next needed segment.
I take that back. Does not seem needed here... But another minor point: the message "Nothing selected" from previous versions has disappeared...
I think the problem is that you don't remove tuplets consisting of rests!!!
Well, I figured out what was causing the tuplet rests issue. But I'm still getting a glitched out retrograde in voice 2 tuplets even with the fix I have. The console gives me an error "cannot add cross-measure tuplet" for a simple measure retrograde. So there's something else going on somewhere in the rewrite part of the process.
Okay, I think I found the problem. I pushed 3.0.8 up. Give it a try.
The local test looks good now. By adding the line
throw new Error("message");
after the remove section I can confirm that all tuplets are removed.
I also get the addtuplet error at measure 5 with the test.mscz file (from the other issue), but not if I run the plugin on measure 5 alone. I’ve had similar issues, but don’t remember exactly what fixed it. My impression is that the cursor.tick is messed up. Always check that cursor.next() worked, e.g.
var flag = true while (flag == true && cursor.segment && cursor.tick < endTick) { ... flag = cursor.next(); }
And ditto for addRest, addNote addTuplet… see details in TupletFill.qml
I also notice that the voice 2 quarter rest tuplet of measure 2 does not appear in the retrograde (but again running this measure alone it does). There is a clue there…
P.S. If you have other file specific problems try & reply via email: that should allow attachments...
Enter the tuplet shown above, select measure 1. Result in measure 2.