projectM-visualizer / projectm

projectM - Cross-platform Music Visualization Library. Open-source and Milkdrop-compatible.
https://discord.gg/mMrxAqaa3W
GNU Lesser General Public License v2.1
3.22k stars 365 forks source link

Scale and smooth samples for non-custom waveforms #782

Closed dpw13 closed 4 months ago

dpw13 commented 4 months ago

Partially fixes Benjam and Zylot - Tie-Dye Supernova - prophecies - subconscious feednowhere applets nz+. The issue was that the default waveform is scaled so that it colors the center of the window, which is then zoomed in to produce an outflowing of somewhat random color. Without the amplitude set high enough, the waveform never reaches the center so you only get a black screen.

kblaschke commented 4 months ago

Those default waveform modes still mostly use the original projectM code, including the "maximize color" stuff etc., so there's quite a good chance that the code does many things wrong. This was one of the few parts I didn't refactor much since the 3.x releases.

You could have a look at the original implementation and cross-check/rewrite any code that's much different from the original. Since it's just calculating a few vertex coordinates, we should be able to get this function to behave nearly identical to Milkdrop.