JSFX Autocorellation
*EDIT* This is pretty much working now, making this the everything autocorellation thread!
Hi everyone, new to the JS forums but been messing about in JSFX for a good while now and am becoming comfortable with it. I am currently trying to implement an algorithm that accumulates total energy across a certain timespan. To do this efficiently, it needs to add the latest sample, and subtract that sample's value back out later using a delay line.
In trying to get this working, I am seeing some drifty numerical wackiness, which I am blaming on the inaccuracies that result from adding tiny floating point numbers to the rather large accumulated one.
As far as I can tell, JS uses exclusively 64-bit floats for everything. Is there some way I can force it to a use a certain fixed precision for this?
Last edited by noouch; 01-14-2021 at 12:37 AM.
|