Open Sawuare opened 7 years ago
It looks like minor overseight.
Does it happen on piano views on instrument windows?
Does it happen on piano views on instrument windows?
Yes.
@Sawuare if you magnify to max, are the notes
-or are they
@musikBear The notes are snapped.
I think it's not hard to fix. I think it would be work correctly if we set the state based on the number of running keys instead of MIDI events.
It seems to be sufficient just to move m_piano.setKeyState
into the if
statement here:
https://github.com/LMMS/lmms/blob/0f3b41f590ed8d573ce3891f6502f211d1be176a/src/tracks/InstrumentTrack.cpp#L411-L420
Seems fixed on master and 1.2.0.
This was fixed by @DomClark in https://github.com/LMMS/lmms/pull/4908.
The bug certainly seems to have disappeared, but I'd hesitate to call that PR a proper fix for this issue.
Prior to it, note-on messages were sent when NotePlayHandle
s were constructed during track processing, and then cancelled out by note-off messages sent from old NotePlayHandle
s during play handle processing. Now that the note-on messages are also sent during play handle processing, they don't get cancelled out since the new NotePlayHandle
s get put at the end of the list of play handles to process. However, the processing of play handles is handled by multiple threads, so it is technically possible for one of these later handles to send its note-on before the note-off of a previous handle, which would trigger the bug again.
Since this doesn't seem to happen in practise, and this is only a visual bug, I'm happy for this to stay closed, but anyone wanting to fix this properly should look at the suggestions mentioned earlier in this issue.
Reopening because #6025 recently reported what I think is the same bug.