Skip to content
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

Glitch with layered sustained notes #3777

Closed
zonkmachine opened this issue Aug 26, 2017 · 7 comments
Closed

Glitch with layered sustained notes #3777

zonkmachine opened this issue Aug 26, 2017 · 7 comments
Labels

Comments

@zonkmachine
Copy link
Member

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

@PhysSong
Copy link
Member

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.

@zonkmachine
Copy link
Member Author

I can't replicate this. May have been fixed in 81966fa . Need to test this more though.

@zonkmachine
Copy link
Member Author

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:

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

to:

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

@PhysSong
Copy link
Member

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

Shouldn't it be &&?

@zonkmachine
Copy link
Member Author

zonkmachine commented Nov 27, 2020

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

@PhysSong
Copy link
Member

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.

@zonkmachine
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants