Lmms: Glitch with layered sustained notes

Created on 26 Aug 2017  路  7Comments  路  Source: LMMS/lmms

Got one more glitch with recording sustain that I unfortunately missed when testing. Some layered notes seem to finish early and the lost length is added to the following note. True both for chords and single notes played multiple times when under sustain.

Example. C-maj played struck twice:
sustain

Should have been:
sustain2

@serdnab

bug

All 7 comments

https://github.com/LMMS/lmms/blob/v1.2.0-rc3/src/gui/editors/PianoRoll.cpp#L3486
The if clause compares only the notes' keys, not their positions. So lengths can be mixed.

I can't replicate this. May have been fixed in https://github.com/LMMS/lmms/commit/81966fa1a68293a5dfa37408da993bc95ac8402d . Need to test this more though.

https://github.com/LMMS/lmms/blob/v1.2.0-rc3/src/gui/editors/PianoRoll.cpp#L3486
The if clause compares only the notes' keys, not their positions. So lengths can be mixed.

If it can be replicated I guess a fix then would be as easy as changing this line from:
https://github.com/LMMS/lmms/blob/afd22c8b74e23f6a89f2fac9ae596dd16979f4f7/src/gui/editors/PianoRoll.cpp#L3486

to:

 if (it->key() == n.key() || it->pos() == n.pos())

if (it->key() == n.key() || it->pos() == n.pos())

Shouldn't it be &&?

That is what I meant. Tried it and it didn't record anything. :-o

InstrumentTrack::processInEvent() doesn't save the time offset in NotePlayHandles when received MidiNoteOn, that's why the && doesn't work.
I think the fix is from #3803. One problem is that it assumes notes in a Pattern is always sorted by position. It might be fine because Pattern::addNote() always ensure that, at least for now.

OK. I think we're fine closing this then.

Was this page helpful?
0 / 5 - 0 ratings