New Pianoroll Editor: uniform cutoff-time advance of notes in a selection range?

• Nov 20, 2018 - 23:12

I just downloaded MuseScoreNightly-201811202009-master-487dd5f-x86_64.AppImage and I've been playing with it - I like the new pianoroll editor UI look. One thing I've been asking for since whenever is to make it possible to change the operation of the "length" input so that it advances the cutoff of the note - or ALL notes within a selection - by a fixed-time amount, expressed e.g. as a fraction of a beat, so as to introduce a uniform spacing between successive notes. As it is, one needs to tediously modify each note individually, changing the length from 1000 to e.g. 900 for a quarter, 800 for an eighth, 967 for a dotted half, etc. so as to express the (fixed) cutoff advance (here 1/10 of a quarter) in terms of the full duration of each note. The uniform cutoff advance is useful to give a realistic effect of tonguing for wind instruments, as opposed to the current default which is equivalent to slurring successive notes. Is there a reason why this was not included in the new PR editor UI?


Is there a reason why this was not included in the new PR editor UI?
Probably a combination of lack of time and not working through this scenario by the volunteer who contributed the changes.

I've notified blackears of this topic, but as always in voluntary projects: no guarantees that he'll be able to pick up on the request or that when he does it'll still be accepted on time for a 3.0 release.

In reply to by blackears

my understanding from OP is that the request is the exact opposite:

Currently you change the length by 0.1% of a duration (whichever that duration is). What the OP is looking for (imo) is to be able to select a range of notes (mixed durations) and change the playback length on each of them
(shorten) by the duration of a 1/32nd (for example) which would leave an equal amount of silence gap between each consecutive note in absolute time; regardless of the base duration of that note.

So a 1/4th is now played back as 7/32 and the 1/2th which was selected in the same operation now has a playback duration equalling 15/32

In reply to by blackears

I think jeetee has it right. There are actually 2 parts to this:
1) to shorten the note by a fixed time amount independently of the notation length - the shortening amount to be expressed as e.g. a certain fraction of a beat, or even as an absolute time interval (say 0.1 sec), INSTEAD OF as a fraction of the notation length as at present;
2) to be able to apply this to all notes selected as a group.
Is it possible to implement this, in terms of the structure of the code? (i.e., does the editor have access to parameters besides those for the current note, such as the beat duration?)

In reply to by blackears

The UI for this could be something like:

Advance note cutoff by [] of [ yyy |^]

[ ] is a numeric entry box
[ |^] represents a multiple-choice dropdown
yyy is text, possible choices might be:
1) its notational duration (as in the current case)
2) one beat
3) one second (absolute time)

to shorten the note by (respectively) 1) a fraction of its notational duration; 2) a fixed fraction of a beat; 3) a fixed absolute time interval.

I gather that the current 1-to-1000 value is the "native" duration parameter in the internal data structure for a note. All the above choices would amount to replacing this value by 1000 * (1 - x) where x (0 to 1) is the fraction by which the note is to be shortened. Taking 2), if e.g. a quarter note gets one beat, and we want to shorten a note by, say, 1/10 of a beat regardless of its notational duration, then
x = 0.1 * (duration of quarter)/(duration of current note)
Thus if the current note is a eighth, x = 0.1 * 1/.5 = 0.2
and 1000 * (1 - x) = 1000 * (1 - 0.2) = 1000 * 0.8 = 800
and if the note is a dotted quarter, x = 0.1 * 1/1.5 = 0.0666...
and 1000 * (1 - x) = 1000 * (1 - .0666...) = 1000 * 0.9333... = 933

I respect the fact that @blackears has gone to the trouble of creating a PR, but I don't think the solution proposed here is the best one.

Cutoff is a property of each individual note, like velocity. When trying to make notes louder, you wouldn't select a whole bunch of them and make their velocity louder; you'd just add a dynamic. You need something like a dynamic marking but for cutoff.

Let's remind ourselves why the OP originally requested this feature:

> The uniform cutoff advance is useful to give a realistic effect of tonguing for wind instruments

So what you really want to do here is alter the gateTime property of the whole staff/instrument, not individual notes. You want the cutoff to be absolute rather than relative.

Or maybe you don't want to do this for the entire staff (e.g. maybe you want tonguing to change halfway through a score). The way to solve this would be to add an ability to control gateTime via staff text.

Maybe these suggestions are too much work and altering the cutoff is the only viable way to do it. If that's the case then it would be best handled by a plugin rather than by extending the UI.

In reply to by shoogle

No, this would be extremely useful. "Hey, MuseScore is a notation engine, not a performance engine" is ignored by the hundreds of people who craft performances here every day, and note articulation, most usually cutoff, is one of the most basic controls available to control performance. The 3.0 advances in the Piano Roll Editor (PRE) comprise a sea change in this situation. Controlling exactly how much "cutback", to the midi-tick, 128th note, or whatever unit, is the way of implementing phrasing, and doing so in a musicianly fashion mades the difference between scores that sound like clockwork and those that sound like informed performance. The nuances of phrasing are almost never indicated in scores; they are the performer's charter. Being able to impose a given phrasing, a specific degree of detaché/legato on multiple notes at a time, would be a great leap forward. If the PRE is going to exist at all, this is consistent with its mission.

In reply to by shoogle

I am the OP, and what I requested is the ability to alter the cutoff on one or a group of notes on one staff, but not necessarily to alter the properties of an entire staff corresponding to one instrument. For a wind instrument this would correspond to making ALL notes tongued, where I might want to have some notes slurred (essentially the current default). I recall another discussion, re slurring in the score, in which it came out that at present it has no effect in playback and amounts to merely a decoration. (Actually, if it were possible to make tongued articulation the default for an instrument, and have the addition of a slur symbol give a 100% duration for the notes under the slur, this might be a more ideal solution.)

In reply to by dhfx

Of course, specific notes in a specific range on one staff. I have used articulation control (via devious means because the MS2 PRE was so buggy) in music for all kinds of instruments and forces. Two curious facts that are little known: first, instruments have "default cutoffs", specified in the instruments.xml and copied into scores (where it can be altered only by xml editing); some are less than legato (not that legato is universally appropriate). Secondly, some instrument cutoffs seem too short, so that even 100% gives a détaché effect, the violoncello in particular. In my latest posted score (don't want to get it included here, take a look/listen) (as some earlier cello scores), I set the default cutoff for cello to 110% to achieve the default legato I need. Neither issue can be addressed without breaking carefully-customized scores.

In reply to by [DELETED] 1831606

To be clear, I fully support giving the ability to select and edit multiple notes at once in the pianoroll editor. I also support having an option to edit the cutoff in absolute units rather than relative units.

What I do not support is creating a new dialog to automate the task of going through a score note-by-note and overwriting their individual properties en masse. This is the kind of behaviour that will result in "breaking carefully-customized scores", so it is best left to a plugin rather than becoming an internal feature.

In reply to by shoogle

I don't understand why relegating a (proposed) feature to a plugin makes it more or less good, bad, or dangerous. I would also like to emphasize the distinction between breaking extant scores (involuntarily) by incompatible software changes (what I meant) and breaking scores by user sloppiness or mis-application of powerful tools.

In reply to by [DELETED] 1831606

It doesn't make it any more or less good, bad or dangerous, but it does mean that it is the responsibility of the plugin author to maintain and support it rather than MuseScore's developers.

It's all very well to say that misusing powerful tools is the user's own fault, but you don't have to deal with the complaints when somebody's score gets corrupted or data is unexpectedly overwritten (I don't have to deal with it either, but I am mindful of those that do). We have a responsibility to protect users from themselves by default, but the plugin mechanism is there for those that want to take matters into their own hands.

MuseScore is already a big program and we can't afford to implement everybody's pet favourite feature. However, I have already pointed out ways that this feature can be implemented that cause minimal disruption to the existing program:

  1. The pianoroll editor should allow changes to be made to multiple notes at once.
  2. The user should be able to choose between relative and absolute units when making changes to the cutoff time.

My issue is specifically with the PR that adds a whole new "note tweak" dialog for something that only requires a checkbox to be added to the existing UI. I don't want to sound too critical and I am grateful that @blackears took the time and effort to implement this on his (or her?) own, especially after the great work they put in on the Mixer, but I hope that this will serve as a useful learning experience that sometimes the first solution proposed is not necessarily the most appropriate, and that it can be worth running ideas past people who deal with the wider context before investing too much effort in a particular implementation.

In reply to by shoogle

I'm getting the impression that you think that the current editor will change the values of all notes. This is not the case. It only affects selected notes in the staff the PR is currently editing. Options could be added, though, for richer behavior. This is why I went with the windowed design rather than a checkbox - more flexibility.

As for making it a plugin, I know nothing of the new plugin system. Perhaps it could be redesigned as that later?

In reply to by blackears

Re "I'm getting the impression that you think that the current editor will change the values of all notes." - no, not from my side at least. I only expect to work on the note (or notes) in the current selection, on the one staff being edited. As far as multiple notes are concerned, it's just that it's very tedious to do it on each note individually, when the same thing could be done simultaneously on many notes if they are all part of one selection - namely, shorten them all by the same time interval, expressed either as a fraction of a second or as a fraction of a beat, rather than as a fraction of the note duration as is the case presently (hope that isn't too long-winded).

In reply to by dhfx

> "I'm getting the impression that you think that the current editor will change the values of all notes."

I think that was directed at me, but I am also fully aware that @blackears' PR (and @dhfs's original feature request) was only intended to operate on the selection and not the full staff. However, I got the impression that @dhfs was planning on using the feature on quite large selections, and that these selection might sometimes be so large that they do in fact encompass all notes in a staff.

  • In cases where you want to modify the cutoff for all notes in a staff, I suggested you modify a single property of the staff rather than a property of each and every note in the staff.
  • In cases where you only want to modify a range of notes (i.e. not the whole staff), I suggested that it would be more appropriate to implement some kind of "tonguing" text or symbol that would change the cutoff property of all subsequent notes in the same way that a dynamic modifies the velocity of all subsequent notes.

The cutoff is a property of an individual note. Individual note properties are there to locally override an established trend, not to establish a trend. You would only modify the velocity of individual notes, and the same should be true for cutoff.

However, I accept that there is currently no equivalent of dynamics for tonguing, so you have no choice but to modify the cutoff value of a range of notes. I simply think that this should be made possible within the current pianoroll editor, like this:

  1. Open the pianoroll editor
  2. Select a range of notes
  3. Click in the "Len"/Length box and enter a value less than 1000.

Now I know that doesn't solve the relative vs. absolute part of the problem, but that is the only implementation that I think will have even a remote a chance of being accepted before the release of MuseScore 3.

(By the way, there is no need to rush this just to have it ready for MuseScore 3. Updates have been slow in the past because MuseScore didn't have an automatic update mechanism and the developers didn't want to support multiple versions at once. MuseScore 3 has automatic updates so you can expect to see new minor releases happen every few months, and probably even more often than that to begin with as they iron out the bugs. This being the case, I can safely say that there is pretty much zero chance the PR will be accepted before the release of 3, but it might make it in an update soon afterwards.)

In reply to by shoogle

Re "... I got the impression that @dhfs was planning on using the feature on quite large selections, and that these selection might sometimes be so large that they do in fact encompass all notes in a staff.":

No, that is NOT the case. I was thinking in terms of several MEASURES at a time, certainly NOT ALL notes in a staff at one time. Typically it would be used on wind parts, and wind instruments (especially brass) do not normally play continuously (except perhaps for Christmas carols :-) ).

I mentioned, as an alternative to the scheme being discussed, the idea of changing the default articulation for a given instrument so that the notes are cut off a bit early, so as to give a tonguing articulation between notes, and then making an exception for slurred notes where the duration would be 100%; I also mentioned that (according to another discussion I recall seeing) slurring currently has no effect in playback, amounting to no more than a decoration. So there might be a place for implementing this alternative scheme.

I would also agree with not hurrying this mod just to get it into the initial MS3.0.0 release. IIRC lots of new things in MS2 were delayed until an update release.

In reply to by dhfx

MuseScore already has a mechanism for defining a default cutoff for an instrument (as a %, which is not always right), but it is not exposed in the user interface. The .mscx file will be seen to contain < Articulation > elements that define precisely this, which it copies from instruments.xml. One can (I have) edit it by sneaking in there. Ditto the articulation % association with articulation marks, which absolutely should be adjustable in the inspector for each such mark.

In reply to by [DELETED] 1831606

I'm still looking for a solution to this issue. Would it be possible to specify a default cutoff advance for each instrument as a fixed time increment (possibly as a % of a beat), rather than as a % of the note duration? Example - I just downloaded from the transcription of the Bach Contrapunctus XIV and tried an instrument change from organ to a brass quartet, and everything came out slurred, including the tuba, because apparently brasses have a default cutoff advance of 0. This also happens with the Bach Brandenburg 2 excerpt that is distributed with MS as an example, making for a very unreal-sounding "performance."

It would make sense to be able to go into instruments.xml (or, better yet, the Preferences GUI - I'm using the Linux AppImage) and set a uniform cutoff advance for each instrument? And of course the cutoff advance should be null for slurred notes - i.e., slurs should be more than just decoration, as IIRC someone once remarked that they were.

In reply to by dhfx

In version 3.5, the window on the bottom lets you set the duration of notes. If you select the Duration option, the duration value you set will be measured in thousandths of a whole note. This should let you provide an even cutoff for all your notes.

In reply to by dhfx

OK, so I got the wrong impression about how many notes you wanted to include in the selection, but that doesn't invalidate any of the above arguments. If you want to apply an effect to more than a single note then individual note properties are not the way to it. Still, it should at least be possible to change the properties of more than one note at a time, even it is not the ideal solution.

I've changed the PR so that now setting the note cutoff time is an extra option in the dataview dropdown (combo in bottom left quad of PR)). I've also added a button there so that the user can manually enter a value and press 'set' and all selected notes will have their data value set to that type.

Do you still have an unanswered question? Please log in first to post your question.