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

LMMS crackles when rendering to file #3396

Closed
PaulBatchelor opened this issue Mar 2, 2017 · 7 comments · Fixed by #4005
Closed

LMMS crackles when rendering to file #3396

PaulBatchelor opened this issue Mar 2, 2017 · 7 comments · Fixed by #4005

Comments

@PaulBatchelor
Copy link
Contributor

PaulBatchelor commented Mar 2, 2017

As the issue says, I get crackles when I render anything to file.

The test project I am working with is a default instance of Organic TripleOscillator playing a note for two bars. When I render it with the default options, I get crackles. The resulting audio file and project are zipped below:

one_note.zip

Weird thing is, I only get this sort of error on my Fedora E6530 laptop. On my Chromebox running Slackware, things run fine.

I should also note that when I try to render anything using my Sporth plugin, things flat out crash on my laptop.

@PaulBatchelor
Copy link
Contributor Author

When using my Sporth plugin, I'm getting a similar backtrace as #3207, trying my hack from there.

I should note that my segfaults happen at random points, which would suggest some sort of threading problem.

@zonkmachine
Copy link
Member

Those gaps seem to be 256 samples wide. Can you try another buffer size?

The test project I am working with is a default instance of Organic playing a note for two bars. When I render it with the default options, I get crackles. The resulting audio file and project are zipped below:

one_note.mmpz has a 3osc and not organic. There actually is a crackle issue with organic that is on my list of things to do.

When I render it with the default options,

What are your audio settings?
Have you tried rolling back some to an earlier commit?

@PaulBatchelor
Copy link
Contributor Author

Those gaps seem to be 256 samples wide. Can you try another buffer size?

LMMS was set to 256 buffer size, bumped it up to 512. Similar crackles.

What are your audio settings?

Using JACK. 44.1kHZ 256 buffer size 4 periods/buffer.

Have you tried rolling back some to an earlier commit?

Not yet, no. Will look into that.

@Umcaruje
Copy link
Member

Umcaruje commented Mar 2, 2017

Using JACK. 44.1kHZ 256 buffer size 4 periods/buffer

I'm amazed that you can even export with Jack. My LMMS instantly crashes for every project. Reported here: #2934

@PaulBatchelor
Copy link
Contributor Author

I'm amazed that you can even export with Jack. My LMMS instantly crashes for every project. Reported here: #2934

This is horrifying. Bouncing to disk shouldn't be dependent on what audio backend you use.

I've been digging around some core LMMS code, and I'm seeing a LOT of red flags here. For starters, this whole class gets me worried:

https://github.com/LMMS/lmms/blob/master/src/core/MixerWorkerThread.cpp

It gets called in the Mixer class, which I am guessing where your buffer gets rendered:

This I am assuming handles all of the polyphony and note events:

https://github.com/LMMS/lmms/blob/master/src/core/Mixer.cpp#L431

This, I am assuming, is doing all the effects processing:

https://github.com/LMMS/lmms/blob/master/src/core/Mixer.cpp#L461

I don't fully understanding what is going on, but it looks like LMMS is using QThreads to process audio on multiple threads. If this is the case (and I really really hope it's not), that's a huge problem. Unfortunately, the stack traces I've been doing, and the types of crashes and glitches I've been getting would suggest that the issues are related to threading issues.

@PaulBatchelor
Copy link
Contributor Author

Also found #2845. Same deal.

@PaulBatchelor
Copy link
Contributor Author

#3360 looks very similar as well.

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

Successfully merging a pull request may close this issue.

3 participants