Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2826)

Issue 174080: Try to fix ties in midi. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 4 months ago by Reinhold
Modified:
14 years, 4 months ago
Reviewers:
Neil Puttock
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Fix the memory corruption issues I had by renaming the data structure (shadowing was causing the corruption!). Also fix the Issue found by Hu Haipeng that a note ending in one voice would terminate all ongoing ties in all other notes, since so far the code never checked whether the starting note of the tie was still going on. Also, use the correct moment comparison (remove if the end moment is lower **or equal** to the moment that has just been processed).

Patch Set 1 #

Patch Set 2 : Fix the memory corruption issues #

Patch Set 3 : use correct moment comparison #

Patch Set 4 : Remove debug output #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -26 lines) Patch
M lily/tie-performer.cc View 1 2 3 5 chunks +38 lines, -26 lines 11 comments Download

Messages

Total messages: 2
Neil Puttock
Hi Reinhold, This looks OK, but I don't think you need to use a list ...
14 years, 4 months ago (2009-12-13 20:04:09 UTC) #1
Reinhold
14 years, 4 months ago (2009-12-13 22:36:24 UTC) #2
http://codereview.appspot.com/174080/diff/1003/1004
File lily/tie-performer.cc (right):

http://codereview.appspot.com/174080/diff/1003/1004#newcode46
lily/tie-performer.cc:46: // We don't really need a list or deque here. A vector
would suffice. However,
On 2009/12/13 20:04:09, Neil Puttock wrote:
> Since the error was caused by a naming conflict for the struct, you can use a
> vector now, though it's less convenient for removing the tied heads.

Exactly, and for that reason, I now prefer a list. In fact, the new check
removed arbitrary elements from the list, which is less efficient for vectors.
Also, splice is not available for vectors, but vector joining has to be done
manually...

http://codereview.appspot.com/174080/diff/1003/1004#newcode133
lily/tie-performer.cc:133: class end_moment_passed
On 2009/12/13 20:04:09, Neil Puttock wrote:
> {
> protected:

Sigh, About everthing possible is indented with the style, just these keywords
are not :( Not very consistent.

Okay, will change.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b