Don't drop the first notes of phrases when playing in sequence mode.
This commit is contained in:
parent
6ce2d2051c
commit
614fea7343
|
@ -178,13 +178,9 @@ phrase::play ( tick_t start, tick_t end )
|
||||||
|
|
||||||
if ( start > _end )
|
if ( start > _end )
|
||||||
{
|
{
|
||||||
WARNING( "attempt to play a phrase that has ended (%lu, %lu)", start, _end );
|
_playing = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
if ( start < _start )
|
|
||||||
// not ready yet
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ( start < _start )
|
if ( start < _start )
|
||||||
start = _start;
|
start = _start;
|
||||||
|
@ -228,7 +224,7 @@ try_again:
|
||||||
pattern *p = pattern::pattern_by_number( 1 + note_to_y( e->note() ) );
|
pattern *p = pattern::pattern_by_number( 1 + note_to_y( e->note() ) );
|
||||||
|
|
||||||
if ( ! p->playing() )
|
if ( ! p->playing() )
|
||||||
p->trigger( ts, offset + e->link()->timestamp() );
|
p->trigger( ts, tse );
|
||||||
|
|
||||||
p->play( start, end );
|
p->play( start, end );
|
||||||
}
|
}
|
||||||
|
|
|
@ -209,16 +209,15 @@ sequence::play ( tick_t start, tick_t end ) const
|
||||||
tick_t pend = offset + p->length();
|
tick_t pend = offset + p->length();
|
||||||
|
|
||||||
// this phrase seems to be current.
|
// 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();
|
_playing = p->number();
|
||||||
|
|
||||||
_index = start;
|
_index = start;
|
||||||
|
|
||||||
p->trigger( pstart, pend );
|
|
||||||
p->play( start, end );
|
p->play( start, end );
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
offset = pend;
|
offset = pend;
|
||||||
|
|
Loading…
Reference in New Issue