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.
There are several places where rounding errors make for tricky code and bugs. Ideally:
feedcalls accept asampleIndex: numberinstead ofrenderTime: TimeInstantSampleTime.fromNanos(nanos:number, hz: number): numberconversion 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.