Skip to content
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

Consider more consistent and precise time handling in converter/song #101

Open
yupferris opened this issue Apr 18, 2023 · 0 comments
Open

Comments

@yupferris
Copy link
Member

So far we've been a bit sloppy and sometimes use samples and sometimes seconds, whichever is convenient. However, this leads to tiny differences due to imprecision when we change code sometimes, and even though these differences are neglible from a musical perspective, it's still a source of unpredictability and a nuisance when running/updating tests.

Since we're working with musical data, times could probably be expressed in terms of something more musical. Off the top of my head, a bar_index: uint, time_offset: rational_notes pair is probably sufficient and not prone to rounding errors.

It might even make sense to take this structure all the way to the player code in cases where it's needed, or just flatten to a single representation (likely sample counts) at the end (similar to what we currently do, but since it would always be the last thing we did, then changing things like operation order wouldn't affect the final output).

This is somewhat of a deep change that requires investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant