Don't drop the first notes of phrases when playing in sequence mode.
This commit is contained in:
parent
6ce2d2051c
commit
614fea7343
14
src/phrase.C
14
src/phrase.C
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue