Arpeggiator - Cut off trailing short notes (#5523)
Prevent triggering of extra notes at the end by not counting trailing notes shorter than one fifth of the notes arp_frames. This value being arbitrarily found by trial and error.
This commit is contained in:
@@ -388,8 +388,10 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n )
|
||||
while( frames_processed < Engine::mixer()->framesPerPeriod() )
|
||||
{
|
||||
const f_cnt_t remaining_frames_for_cur_arp = arp_frames - ( cur_frame % arp_frames );
|
||||
// does current arp-note fill whole audio-buffer?
|
||||
if( remaining_frames_for_cur_arp > Engine::mixer()->framesPerPeriod() )
|
||||
// does current arp-note fill whole audio-buffer or is the remaining time just
|
||||
// a short bit that we can discard?
|
||||
if( remaining_frames_for_cur_arp > Engine::mixer()->framesPerPeriod() ||
|
||||
_n->frames() - _n->totalFramesPlayed() < arp_frames / 5 )
|
||||
{
|
||||
// then we don't have to do something!
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user