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

Envelope + (Rapidly) varying tempo give undesirable output. #3775

Open
PhysSong opened this issue Aug 24, 2017 · 3 comments
Open

Envelope + (Rapidly) varying tempo give undesirable output. #3775

PhysSong opened this issue Aug 24, 2017 · 3 comments
Labels

Comments

@PhysSong
Copy link
Member

PhysSong commented Aug 24, 2017

TempoNaN.mmp.zip

The tempo model is connected to a LFO controller. Instruments with envelope sounds weird, some notes may be skipped.
Edit: some notes may be skipped regardless of the envelope's status.
If arpeggio is enabled, it sounds more glitchy. Infs and/or NaNs are also generated.

@PhysSong
Copy link
Member Author

PhysSong commented Sep 2, 2017

NotePlayHandle::resize( const bpm_t _new_tempo ) changes m_totalFramesPlayed, so EnvTotalFrames and EnvReleaseBegin in InstrumentSoundShaping::processAudioBuffer() can have wrong values.
NotePlayHandle::resize() has introduced in 52d9ca4, which was done in 2007. I don't know why it exists and why it should be there.

@PhysSong
Copy link
Member Author

PhysSong commented Sep 6, 2017

That function is there because notes should be resized when the tempo changes. However, it shouldn't change m_totalFramesPlayed. Instead of this, left frames should be recalculated.
There are some exceptions, like notes from MIDI input or arpeggio sub-notes(if tempo-sync is disabled, at least). Creating a new variable m_shouldBeResized may be handy, in my opinion.

@zonkmachine
Copy link
Member

zonkmachine commented Oct 18, 2017

This sounds to me like another case where it would be easier to troubleshoot/test if #2606 is fixed, as some of the symptoms are overlapping. Dropped notes etc.

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