I have a list, that can be of various lengths (less than 100 or more than 1.800.000) and I need to display all those values on a graph (a waveform) of 800 points on which I can draw.
I have tried taking a value for every step, where a step is the list length / 800. And it is the closest I can get to. I have tried taking the average value of the n surrounding of step with various n, but I can't get a waveform that satisfies me.
I know image compression work by taking an average of surrounding pixels, and I am trying to do the same with a list of values going from 0 to 200. I need to preserve the global aspect, but also the highest and lowest spikes.