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

Ability to turn off the anti-distortion filter. #7555

Open
1 task done
sergeirocks100 opened this issue Oct 22, 2024 · 5 comments
Open
1 task done

Ability to turn off the anti-distortion filter. #7555

sergeirocks100 opened this issue Oct 22, 2024 · 5 comments

Comments

@sergeirocks100
Copy link

sergeirocks100 commented Oct 22, 2024

Enhancement Summary

I was trying out the latest experimental build of LMMS recently, and i noticed that not only was there some sort of compression/anti distortion filter applied on top of the sound output, but that there was no apparent way to turn it off.

This isn't good for the kind of music i make, as a lot of it uses clipping/distortion as a deliberate creative choice.

To demonstrate, here's what the waveform of one of my projects looks like in LMMS 1.2.2:

Image

Screenshot_198

And here's what it looks like in gb8b1dae40 (The experimental version i was using):

Image

Screenshot_197

I recorded these waveforms with Audacity. Nothing has changed between them except for the version of LMMS they were played back on.

While i don't mind if there's an anti-distortion filter included, or even if it's turned on by default, i think that you should have the ability to turn it off if you don't want it.

Therefore, i think that there should be a way to let you do so.

I don't believe this is a duplicate request, but the nature of this made it difficult to search for. Apologies if this has been requested before.

I'm using Windows 10 1909 64 bit, if that matters.

Implementation Details / Mockup

I imagine that there would be a checkbox somewhere in the settings, likely under the "Audio" tab, labeled "Enable anti-distortion filter" or something to that effect.

Here's a mockup for a possible way to do this:

Image

mockup

Please search the issue tracker for existing feature requests before submitting your own.

  • I have searched all existing issues and confirmed that this is not a duplicate.
@Rossmaxx
Copy link
Contributor

Rossmaxx commented Oct 22, 2024

There's isn't supposed to be any difference between the waveforms as backward compatibility is given prime importance whenever PRs are merged. This is an unusual situation. Mind sending the project over here. Zip the project before sending so that GitHub can post it properly.

@Rossmaxx Rossmaxx reopened this Oct 22, 2024
@sergeirocks100
Copy link
Author

sergeirocks100 commented Oct 22, 2024

There's isn't supposed to be any difference between the waveforms as backward compatibility is given prime importance whenever PRs are merged. This is an unusual situation. Mind sending the project over here. Zip the project before sending so that GitHub can post it properly.

While it would be impractical for me to upload the entire project i used, i did quickly put something together that should demonstrate the issue just as well.

Be warned; this has been made incredibly loud on purpose to induce clipping/distortion, so you should probably turn the volume down on your headphones/speakers. I'd recommend just turning it all the way down, and turning it up until it's at a tolerable level:

clippingdemo.zip

@michaelgregorius
Copy link
Contributor

@sergeirocks100, if you want to introduce distortion and clipping then it would be much better to use clipper and distortion plugins. These give you much more flexibility with regards to the sound they produce and they also help you to keep the levels at a sane value. When you use these type of effects you can introduce distortion without having the master or any channel go over 0 dbFS but giving the same (or very similar) effects.

The attached project has a master that peaks at 22.8 dbFS. Sending the bass through a mixer channel gives a peak readout of 14.1 dbFS:

7555-Heavy Clipping

This is much too loud and I can't really imagine working like that. Of course you are free to use the software however you like but I would advise against working that way.

@michaelgregorius
Copy link
Contributor

I have checked and it's not caused by the clamping that's done in MixHelpers:

currentFrame.clamp(sample_t(-1000.0), sample_t(1000.0));

I have added some temporary code that would hit a break point if the clamping would have an effect:

else
{
	currentFrame.clamp(sample_t(-1000.0), sample_t(1000.0));

	const auto & l = currentFrame.left();
	const auto & r = currentFrame.right();
	if (l < -1000.0 || l > 1000.0 || r < -1000.0 || r > 1000.0)
	{
		// Set a break point here...
		int i = 0;
	}
}

It makes sense that this code is not responsible because the master peaks at 22.8 dbFS whereas the clamping becomes active at 60 dbFS.

I wonder if it is really something that's caused by LMMS internal code or if it might be caused by the third party code that writes the .wav files.

@michaelgregorius
Copy link
Contributor

Exporting as MP3 also yields different results, i.e. an MP3 exported with master and an MP3 exported with LMMS 1.2.2 do not cancel out each other when the phase is inverted on one of the files.

This might point to an internal problem/change in LMMS itself.

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

No branches or pull requests

3 participants