-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Locked Note with VeSTige While Changing Tempo #3640
Comments
Specific for one VST, or is this also the case with those that are tested? |
The only VST that I currently have is Helm, so someone else would have to test to be sure, but it appears to be an LMMS issue. (mtytel/helm#138) |
It appears that the issue lies in lmms/src/core/NotePlayHandle.cpp Lines 529 to 540 in f79c292
The product m_origFrames * m_origTempo is a signed 32-bit integer multiplication, which is liable to overflow. This always occurs when playing with a MIDI controller or the instrument window keyboard, since m_origFrames is set to typeInfo<f_cnt_t>::max() / 2 (2^30-1) and m_origTempo has a minimum value of 10. While it's unlikely that this would also occur during normal song playback, it's far from impossible: at the maximum tempo of 999bpm, and a sample rate of 44100Hz, a 100-second note will overflow here.
Using doubles for the multiplication will fix the latter case, but not the former; the conversion back to The observed issue is caused by the resulting incorrect values of lmms/src/core/NotePlayHandle.cpp Lines 222 to 229 in f79c292
The result is a note-off message with a wildly incorrect offset. In the case that the offset is negative, Helm doesn't turn off the note, but no later note-off message will be sent so note gets stuck. Other VSTi plugins and other built-in MIDI-driven instruments apply the note-off immediately, which simply results in a staccato note rather than anything stuck. |
Fixed in #5365. |
When I play a note while changing the tempo of a song, the note I played doesn't end until I have played it again (or stopped the song if it's in the song editor).
Using Windows 8.1 64-bit and LMMS version 1.2.0-rc2. I used Helm (64-bit) in VeSTige.
The text was updated successfully, but these errors were encountered: