8000 Fix rounding errors causing incorrect twinning by LumpBloom7 · Pull Request #703 · LumpBloom7/sentakki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix rounding errors causing incorrect twinning #703

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

LumpBloom7
Copy link
Owner
@LumpBloom7 LumpBloom7 commented Jun 17, 2025

Due to floating point imprecision, pairs of notes may not to be considered twins, even though their differences are insignificant.

This changes the twinning criteria to be based on time differences rather than naively using absolute time. More specifically, any two notes within 1ms of each other are considered twins.

I am aware that this introduces potential degeneracy when > 2 notes are within 1ms of the previous/next note, causing all of them to be twinned, even though the maximal difference can be greater than 1ms. I have elected to ignore this, because that is just BS anyway, and it's better than not twinning when it is expected.

HitObject lines have got a similar treatment, and in such a scenario the line will adopt the median start time. Same degeneracy scenario applies and ignored.

PS: I wonder if anyone would notice if the HitObject lines are suddenly gone... 🤔

Due to floating point imprecision, pairs of notes not to be considered twins, even though their differences are minor.

This changes the twinning criteria to be based on time differences rather than naively using absolute time. More specifically, any two notes within 1ms of each other are considered twins.

I am aware that this introduces potential degeneracy when > 2 notes are within 1ms the previous / next, causing all of them to be twinned, even though the maximal difference can be greater than 1ms. I will elect to ignore this, because that is just BS anyways, and it's better than not twinning when it is expected.

HitObjectLines have gotten a similar treatment, but and in such a scenario the line will adopt the *median* start time. Same degeracy scenario applies and ignored.
@LumpBloom7 LumpBloom7 added the tweak A minor change to an existing feature label Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tweak A minor change to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0