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

Issue 7108043: fix handling of grace notes to shorten preceding tied notes correctly

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 3 months ago by adam.spiers
Modified:
11 years, 3 months ago
Reviewers:
Keith, benko.pal
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

fix handling of grace notes to shorten preceding tied notes correctly In Note_performer::process_music(), when a grace note was encountered, the immediately preceding Audio_note (or Audio_notes if the grace note followed a chord) was/were shortened, but it failed to check whether the Audio_note is part of a tie. Ensure that any note being shortened in this way is the head of a tie, if it is part of a tie. https://code.google.com/p/lilypond/issues/detail?id=3091 The following refactorings were also done in separate commits: - extract new Audio_note::tie_head() method This makes it easy to retrieve the first note in a tie, and will be used in the fix for issue #3091. - use Audio_note::get_column() rather than directly accessing the member field This adheres to the principle of encapsulation. Finally, I implemented Audio_note::to_string() which came in handy whilst I was debugging, and I thought it would be worth keeping this for future debugging even though it's not used by the new code.

Patch Set 1 #

Total comments: 2

Patch Set 2 : Revised patch set using Keith's suggested text for the texidoc string. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -7 lines) Patch
A input/regression/midi-grace-after-tie.ly View 1 1 chunk +17 lines, -0 lines 0 comments Download
M lily/audio-item.cc View 1 chunk +29 lines, -3 lines 0 comments Download
M lily/include/audio-item.hh View 1 chunk +2 lines, -0 lines 0 comments Download
M lily/midi-walker.cc View 1 chunk +2 lines, -1 line 0 comments Download
M lily/note-performer.cc View 1 chunk +6 lines, -3 lines 0 comments Download

Messages

Total messages: 4
Keith
Congratulations on finding the cause of the problem, through the maze of objects implementing MIDI ...
11 years, 3 months ago (2013-01-15 04:30:52 UTC) #1
benko.pal
2013/1/15 <k-ohara5a5a@oco.net>: > https://codereview.appspot.com/7108043/diff/1/lily/include/audio-item.hh#newcode90 > lily/include/audio-item.hh:90: virtual string to_string () const; > It seems fine ...
11 years, 3 months ago (2013-01-15 09:00:54 UTC) #2
Keith
Okay. The class 'Audio_note' is a sub-class of 'Audio_item', which has virtual functions itself, so ...
11 years, 3 months ago (2013-01-16 05:35:28 UTC) #3
adam.spiers
11 years, 3 months ago (2013-01-26 21:13:08 UTC) #4
Revised patch set using Keith's suggested text for the texidoc string.
Sign in to reply to this message.

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