lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MIDI: intelligently combine overlapping notes. (issue4520050)


From: md5i . mail
Subject: Re: MIDI: intelligently combine overlapping notes. (issue4520050)
Date: Thu, 12 May 2011 00:01:08 +0000

On 2011/05/11 23:12:08, Keith wrote:

http://codereview.appspot.com/4520050/diff/9001/flower/include/pqueue.hh#newcode110
flower/include/pqueue.hh:110: void del (vsize i)
Rather than change the 'flower' library to support deletion from the
heap, I
suggest we continue to use the ignore_ flag on items we would delete.

The formerly-used "lazy deletion" technique seems appropriate for the
note-of
queue, because deletions are rare.

Makes sense to me. I don't recall if "_ignore" existed when I originally
wrote the patch, several years ago now.

http://codereview.appspot.com/4520050/diff/9001/lily/midi-walker.cc
File lily/midi-walker.cc (right):


http://codereview.appspot.com/4520050/diff/9001/lily/midi-walker.cc#newcode94
lily/midi-walker.cc:94: if (now_ticks == stop_note_queue[i].val.first
The use of the .first field to cache the note-on-time was difficult
for me to
understand.

I suggest following pointers as was done to find now_ticks:
int queued_ticks =
  stop_note_queue[i].val.second->audio_->audio_column_->ticks ()

Good call, in my opinion.  I was never happy with the Pair.


http://codereview.appspot.com/4520050/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]