Fix interpolating rate values, set ReTrigger reset range toggle #512
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The previous interpolation method was way wrong, I don't even know what it was trying to calculate. For effects of type
Rate
, they're represented as fractions (e.g. 1.0 > 0.0625 == 1/16).This should fix custom FX filters for ReTrigger sounding way off. In some cases they still sound off but are somewhat passable. I have a feeling it gets more inaccurate the further the chart plays, but I haven't investigated that.
Edit: Turns out KSM doesn't do linear interpolation for ranged ReTrigger/Gate effects, it uses a hardcoded list and rounds down values in certain ways that I don't think can be expressed as an algorithm easily. https://github.com/m4saka/kshootmania-v1-hsp/blob/19bfb6acbec8abd304b2e7dae6009df8e8e1f66f/src/scene/play/play_utils.hsp#L455-L470