New distort plugin
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:
- "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).
- "decay": it decides how many past sample should be taken into account to generate a new prediction.
- "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.
- "reversed:" reverses decay, older samples will have more weight in the final result.
The gui is work in progress.
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.
https://github.com/user-attachments/assets/fd9bf676-6dea-48e8-b6e9-1c3e0223dd17
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.
Sorry I hope now is ok
https://github.com/user-attachments/assets/425cfeaa-8274-4389-8ef6-664f4de49571