Skip to content

New distort plugin #7902

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

szeli1
Copy link
Contributor

@szeli1 szeli1 commented May 22, 2025

This PR adds a new distortion plugin to lmms. I call it "Prediction Distortion".

A few days ago I was looking at the lmms vectorscope and I thought "What if I tried to predict where the line goes?" So I made this plugin that uses a second degree polynomial function custom fitted to 3 samples to try to predict the 4th sample in audio.

The plugin has 4 controls:

  1. "mix": it is basically a wet / dry knob, but depending on the decay can result in different sounds between 0.01 and 0.8 (it adjusts the weights of the decay setting).
  2. "decay": it decides how many past sample should be taken into account to generate a new prediction.
  3. "range": it decides how wide should the window (that is used for the prediction algorithm) be. Higher values will increase the distance between the sample points.
  4. "reversed:" reverses decay, older samples will have more weight in the final result.

The gui is work in progress.

@szeli1 szeli1 marked this pull request as draft May 22, 2025 22:07
@firiox
Copy link

firiox commented May 23, 2025

Pretty cool thought but I find It kinda doing is thing betweeen 0.02-0.18 with max decay and range and with the reverse toggle on off that range is plain.

Testing.mp4

@szeli1
Copy link
Contributor Author

szeli1 commented May 23, 2025

Pretty cool thought but I find It kinda doing is thing betweeen 0.02-0.18 with max decay and range and with the reverse toggle on off that range is plain.

Thanks for the testing, the video seems corrupt and doesn't want to play for me.
I intentionally kept 0.02 and 0.18 with max decay in, because it makes an interesting sound I think. Also the mix is about 0.3 - 0.45, and max decay and 0 range produces a unusual "low pass filter" like sound. I'm more interested in seeing why reverse doesn't really change the output when mix is 1.

@firiox
Copy link

firiox commented May 23, 2025

Sorry I hope now is ok

Testing.mp4

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 this pull request may close these issues.

2 participants