Skip to content

Commit

Permalink
Fix stuck notes with Helm VSTi
Browse files Browse the repository at this point in the history
  • Loading branch information
DomClark authored and JohannesLorenz committed Jan 8, 2020
1 parent 8d51d1d commit cfd78ec
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/core/NotePlayHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,15 @@ void NotePlayHandle::processMidiTime( const MidiTime& time )

void NotePlayHandle::resize( const bpm_t _new_tempo )
{
if (origin() == OriginMidiInput ||
(origin() == OriginNoteStacking && m_parent->origin() == OriginMidiInput))
{
// Don't resize notes from MIDI input - they should continue to play
// until the key is released, and their large duration can cause
// overflows in this method.
return;
}

double completed = m_totalFramesPlayed / (double) m_frames;
double new_frames = m_origFrames * m_origTempo / (double) _new_tempo;
m_frames = (f_cnt_t)new_frames;
Expand Down

0 comments on commit cfd78ec

Please sign in to comment.