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

Arpeggiator sometimes trigger one note too many #4342

Closed
zonkmachine opened this issue May 5, 2018 · 4 comments · Fixed by #4355
Closed

Arpeggiator sometimes trigger one note too many #4342

zonkmachine opened this issue May 5, 2018 · 4 comments · Fixed by #4355
Labels

Comments

@zonkmachine
Copy link
Member

zonkmachine commented May 5, 2018

As reported on our Discord support channel.
Test project by Discord member Half-Gray/7E7E7E
bass_test.mmp.zip

The arpeggiator sometimes triggers one arpnote to many at the end of a note with some settings.
Try turning up sustain a bit to trigger it.

The issue is there already in lmms-1.0.3 but not as obvious. In the test project you'll see a spike in the audio (mixer LEDs) when switching to a new held note. This goes away if you turn the Sustain and Release down to zero. The latest change happened in 67e9371 where the glitch becomes more prominent.

Edit: Superfluous bisect report moved to gist:
https://gist.github.com/zonkmachine/40e7000c2f93c68f0c55de2693ce27b0

@zonkmachine zonkmachine added the bug label May 5, 2018
@PhysSong
Copy link
Member

This goes away if you turn the Sustain and Release down to zero.

if( _n->origin() == NotePlayHandle::OriginArpeggio ||
_n->origin() == NotePlayHandle::OriginNoteStacking ||
!m_arpEnabledModel.value() ||
( _n->isReleased() && _n->releaseFramesDone() >= _n->actualReleaseFramesToDo() ) )
{
return;
}

It looks like the logic uses (note length + release frames) instead of the real length. I think there's no reason to check release frames here.

@PhysSong
Copy link
Member

Seems like LMMS plays arpeggio for released note and multiply release envelope value to new notes' volume. I don't know why/if we should...

if( _n->isReleased() )
{
vol_level = _n->volumeLevel( cur_frame + gated_frames );
}

@zonkmachine
Copy link
Member Author

zonkmachine commented May 10, 2018

Personally I haven't seen this problem a lot and thought that it had been solved simply because I've grown into the habit of using the same staccato like envelope with all of my arpeggios that wouldn't trigger the issue.

It looks like the logic uses (note length + release frames) instead of the real length. I think there's no reason to check release frames here.

Yes. Just changing

( _n->isReleased() && _n->releaseFramesDone() >= _n->actualReleaseFramesToDo() ) ) 

to

_n->isReleased() )

seem to fix this.

@zonkmachine
Copy link
Member Author

if( _n->isReleased() )
{
vol_level = _n->volumeLevel( cur_frame + gated_frames );
}

Right, you've got good eyes. This decay is for the releaseFrames (post above) giving a sort of pseudo delay end to an arpeggio with a long decay. I think it should just be removed along with the other change above (which makes it never execute anyway).

zonkmachine added a commit that referenced this issue May 17, 2018
An arpeggio master note shouldn't trigger new notes while it's decaying.

#fixes #4342
sdasda7777 pushed a commit to sdasda7777/lmms that referenced this issue Jun 28, 2022
An arpeggio master note shouldn't trigger new notes while it's decaying.

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

Successfully merging a pull request may close this issue.

2 participants