typename Notes::iterator next = n;
++next;
- if (!(*n)->length()) {
+ if ((*n)->end_time() == std::numeric_limits<Temporal::Beats>::max()) {
switch (option) {
case Relax:
break;
return;
}
- NotePtr note(new Note<Time>(ev.channel(), ev.time(), Time(), ev.note(), ev.velocity()));
+ /* nascent (incoming notes without a note-off ...yet) have a duration
+ that extends to Beats::max()
+ */
+ NotePtr note(new Note<Time>(ev.channel(), ev.time(), std::numeric_limits<Temporal::Beats>::max() - ev.time(), ev.note(), ev.velocity()));
+ assert (note->end_time() == std::numeric_limits<Temporal::Beats>::max());
note->set_id (evid);
add_note_unlocked (note);