Trills and other ornaments play incorrectly on tied notes

• Sep 14, 2015 - 04:08
Reported version
2.1
Priority
P0 - Critical
Type
Functional
Frequency
Many
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project
Tags

Ubuntu 14.04, GIT commit: 35b9f49

1) new score, 4/4, flute
2) measure 1, note input
3) "7 C +" to enter two tied whole notes
4) click first note
5) double click trill in Articulations palette
6) play

Result: playback is fine for the two measures, but after that the sound should stop but instead we continue to hear the top note sustained for another measure


Comments

Interestingly, it's only a problem for the trill from the articulations palette, not for the trill line - *unless* you don't extend the line fully over the whole duration.

So far, my impression is that this is a bit deeper than I thought. The code generally expects each note in a tie to have its own event(s), so you can have for example a mordent on the second note of a tie and have it play properly. But trills have all the events for the entire trill attached to the first note. And then, it seems, additional events generated for successive tied notes in the tie. So we actually may have way too many events, and somehow things are getting off. Still investigating. I'm hopng there will turn out to be an solution that doesn't involve rewriting the trill code to *not* attach all events for the entire trill to the first note.

Here's what I know thus far:

- If the trill *line* continues over multiple tied notes, then we do indeed get duplicate events. The first tied note gets events for the whole chain; the second gets events for everything from that point forward, etc. But actually, in this case, even though there are extra events, it sounds like it works - I guess the events overlap.

- If the trill *articulation* is used, or the trill line does not cover all notes, then we get a problem, because the notes not covered by the trill trigger the recursion in collectNote, and the length of the tied note gets added to the length of the main note even though the main note already has events that cover the whole duration.

- I can suppress the problem within collectNote by not doing the recursion if a note has a trill. This prevent the events from being played, but the extra events are still generated in the case where the trill line does extend. So I'm not thinking of that as a full solution.

Unassigning myself becuase I'll have little time the next few days, maybe someone else wants to look from here...

Note to self or anyone else thinking of looking at this:

Maybe the answer is to enhance enhance findFirstTrill() to trace back to the first note in any tied sequence before checking for overlapping trills, and also find trill articulations on that chord. And then when we call this function in renderChordArticulation(), check to see if the note has a tieBack(), and if so, actually generate *no* events rather than call renderNoteArticulation(), since all necessary events will already have been generated.

Interesting, my initial investigation seemed to show the issue would only affect ornaments that continued to repeat for the full duration of the note - basically, just trills. Apparently not. Well, I was not particular happy with where I was getting in trying to fix this. This problem was introduced with the fix for #66781: Trill stops after first part of tied note, and I think the current issue is worse than the case before when trills simply stopped prematurely. Perhaps we should consider rolling back that fix and eventually replacing it with a different implementation.

I've got something to add - I just download a bunch of .sfz files and uploaded them to Zerberus. They sound gorgeous. But tied trill lines - every time another 'note' in the tie is come to, the volume is increased by about 40 or so.

So Zerberus is handling the trills differently. Still incorrectly, though it sound less... the trills aren't inhumanly fast anymore. So I think that with fluid, the bug is that it'll start another trill on a tied note that is slightly out of sync with the original. Zerberus's new trills aren't out of sync, so it gets louder as you play more bars of tied trill notes.

Hi, i believe I've stumbled on this bug while transcribing a clarinet part of Orion from my harmony group. Problem get's generated at bar 105. Any workaround I could/should use ?
Best.

Attachment Size
Orion.mscz 26.6 KB

Note the tie is not technically needed on a trilled note, so if playback is more important, you could simply remove the tie, or substitute a slur.

Status PR created fixed

Fixed in branch master, commit cf73f527b6

fix #77376: don't render those tied notes which are handled on rendering previous notes.

This helps to fix playback of tied trills for which extra note play
events were created.

Priority P3 - Low P0 - Critical

Fixed in branch master, commit b0b77ba185

Merge pull request #4145 from dmitrio95/tied-trill-playback

fix #77376: don't render those tied notes which are handled on rendering previous notes