Closed Nyrio closed 4 years ago
Also, just from a code-cleanliness point of view, you can make the search a separate function that you call in the different interpolation functions since they have that part in common. Only what you do with the indices is different and this should happen after the loop like in my code sample above.
Commit https://github.com/Aeroluna/NoodleExtensions/commit/33a2a8bb78ff9649bf64ec4509394d594ea9ad39 should hopefully implement this.
A linear search is currently used to find the relevant point index in animations. This cost might be a bottleneck with long animations (and many of the existing modcharts have pretty long animations). You could use a binary search to make this cost logarithmic wrt the list size instead of linear.
Example (disclaimer: not compiled nor tested):