xNul / drop

A LÖVE visualizer and music player
MIT License
20 stars 2 forks source link

Add visualization metadata saving option #28

Closed xNul closed 6 years ago

xNul commented 6 years ago

Now that Love is adding compression functions, it may be efficient to just save visualization data to the disk after going through the fft. That way, the fft only needs to be run once on each song. The resulting file storage may not be worth it though. It all depends on the compression algorithms.

xNul commented 6 years ago

In the most optimal scenario, without compromising cpu usage, and investing an insane amount of time, the spectrum data of each song would take ~4mb at 256 ticks at 60 fps. With 100 songs, this would mean 400mb of data taken up right then and there. In the more likely, more cpu efficient, but memory deficient scenario, the spectrum data of each song would take ~30mb at 512 ticks at 80 fps. And with 100 songs, this would mean about 3gb of data which is ridiculous.

Even with these added costs, it's not guaranteed that there will be less cpu usage in the end due to the sheer amount of data which has to be read and the fact that it's being done in Lua, not C. On top of that the benefit it would provide to the user is so minimal (a slight decrease in cpu usage) that I dont think it is even worth attempting.

Therefore, I will close this issue.