Browse Source

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

tags/non-sequencer-v1.9.4
Jonathan Moore Liles 13 years ago
parent
commit
614fea7343
2 changed files with 9 additions and 14 deletions
  1. +5
    -9
      src/phrase.C
  2. +4
    -5
      src/sequence.C

+ 5
- 9
src/phrase.C 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 );
}
}


+ 4
- 5
src/sequence.C 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;


Loading…
Cancel
Save