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

All time math should be based on samples, not TimeInstants #7

Open
kirbysayshi opened this issue Mar 25, 2019 · 0 comments
Open

All time math should be based on samples, not TimeInstants #7

kirbysayshi opened this issue Mar 25, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@kirbysayshi
Copy link
Contributor

There are several places where rounding errors make for tricky code and bugs. Ideally:

  • all feed calls accept a sampleIndex: number instead of renderTime: TimeInstant
  • TimeInstant can still be used for the external api, and when it makes sense to convert from Score values
  • Add a SampleTime.fromNanos(nanos:number, hz: number): number conversion utility to avoid instantiating so many TimeInstants.

TimeInstants are really useful for reading values from Scores, but should not be used as the base unit for sample math.

@kirbysayshi kirbysayshi added the enhancement New feature or request label Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant