Hello,
I am working on fft analyser. And actually my analyser works great at the moment, but only when I use juce::Path::cubicTo(). And because as usual I add horizontal coordinates logarithmically calculated from my FFT bins so Paths nodes X coordinates are not spaced equally.

But now I need to draw it as bar chart. So I need points which are spaced equally. To do that I do something which is killing my CPU. The method is that I still create path with cubicTo(), but later for each equally spaced X I use: myPath[i].getClippedLine(Line<float>(x, getHeight(), x, 0.0f), false);

So to improve the efficiency I think I should create my own XY array. But then I need to interpolate Y coordinates for all equal spaced Xs by myself.
But I found out that cubic interpolation is not such simple subject so I would like to ask you if you know any good library to achieve such interpolation. I was looking at Boost Cubic B-Spline but it looks like it works only for functions with already equally spaced points, but as my FFT bins are spaced logarithmically so I think I need to find something else.

Or maybe there is anything which I missed in juce::Path But it looks like juce::Path::iterator iterates only through the nodes but not through any given X coordiates.

For any help great thanks in advance.
Best Regards.

I figured this is worth sharing: the Gin spline implementation is based on this Cubic Spline Interpolation blog post, if thereâ€™s interest in rolling your own portable spline algorithm.

The Continuity of Splines is an absolute banger when it comes to a fully fledged video about splines, but the video that actually taught me how to implement a basic spline was this one: