Show pause property for breath and casesura

• Mar 5, 2016 - 13:28
Reported version
2.2
Type
Functional
Severity
S5 - Suggestion
Status
closed
Project

Marc Sabatella fixed breath and caesura in https://github.com/musescore/MuseScore/pull/1707 .
This issue is to track adding the property in the UI.


Comments

Note that for breath, the proper behavior is *not* to add a pasue, but rather, to subtract from the length of the previous note. That is, dotted half note, breath, quarter note should sound more or less like half note, quarter rest, quarter note. Any customization should affect how much the previous note is shortened.

That isn't to say there couldn't *also* be a way to have breaths add a pause - there are unusual special situations where this would be appropriate - but it would be more important to get the standard playback effect first.

For caesuras, exposing the pause parameter should be totally sufficient. Probably belongs in Inspector.

Well, the length of the note for playback is controlled in rendermidi.cpp, when we generate the "events" for it. Probably the place to affect this would be in one of the renderChordArticulation() or renderNoteArticulation() functions, which is also where we apply the rules for staccato etc. The flow is a bit convoluated through there - several similarly named functions and/or use of recursion, I think. Stepping through with a debugger would probably help. I think ultimately, the staccato etc currently gets processes in updateGateTime(), but by the time we've reached that function, it's probably too late to check for a breath. So you'd want to do something similar but a little further upstream.

Status (old) patch (code needs review) active

Looking at the code a good place to add this logic would be Score::createPlayEvents(Chord* chord). What would be the best way to check from a Chord object if the next element is a breath sign?

After talking with Jojo-Schmitz we got a few ideas on how to implement breath signs :
- Breath will have another property percentage of last note and it's pause will be a maximum between the pause property and the percentage of the last note.
- Default will still be 0 and users will be able to change it to whatever they want.

We also discussed about a good way to warn users that their breath sign is inappropriate or will not play at all (eg. inside a slur, or after a very fast note). We came up with :
- mark the breath sign in red color
- show a warning in the inspector
- not allow the user to add the breath sign at all

I guess a breath should sound (and internally be dealt with) like a staccato? Just with an adjustable setting in Inspector rather than via instruments.xml and ist fixed gateTime values.
Maybe we can even extend this one day to staccato and friends, make them changable as well