Don't drop the first notes of phrases when playing in sequence mode.

This commit is contained in:
Jonathan Moore Liles 2012-02-26 22:38:51 -08:00
parent 6ce2d2051c
commit 614fea7343
2 changed files with 9 additions and 14 deletions

View File

@ -178,14 +178,10 @@ phrase::play ( tick_t start, tick_t end )
if ( start > _end )
{
WARNING( "attempt to play a phrase that has ended (%lu, %lu)", start, _end );
_playing = false;
return;
}
else
if ( start < _start )
// not ready yet
return;
if ( start < _start )
start = _start;
@ -226,10 +222,10 @@ try_again:
if ( tse > start )
{
pattern *p = pattern::pattern_by_number( 1 + note_to_y( e->note() ) );
if ( ! p->playing() )
p->trigger( ts, offset + e->link()->timestamp() );
p->trigger( ts, tse );
p->play( start, end );
}
}

View File

@ -209,16 +209,15 @@ sequence::play ( tick_t start, tick_t end ) const
tick_t pend = offset + p->length();
// this phrase seems to be current.
if ( pend > start )
if ( pend > start && pstart <= end )
{
// FIXME: don't really need to trigger more than once!
p->trigger( pstart, pend );
_playing = p->number();
_index = start;
p->trigger( pstart, pend );
p->play( start, end );
break;
}
offset = pend;