olofson / audiality2

A realtime scripted modular audio engine for video games and musical applications.
http://audiality.org/
zlib License
79 stars 5 forks source link

Subtle pitch accuracy issue #288

Open olofson opened 7 years ago

olofson commented 7 years ago

Having solved #272, there is still one remaining issue, although very subtle: Octave spaced notes will still drift ever so slightly, as a result of the rounding errors scaling with pitch. This shouldn't be a real issue in normal use cases, but it is perfectly possible to demonstrate the problem if desired.

Now that we're using 64 bit phase accumulators, it might be an option to sacrifice some of this new (overkill) accuracy in order to achieve absolutely pure octaves. One would have to truncate earlier, so that the octave with the worst precision dictates the frequencies within the octave, and then leave the least significant bits 0 for the remaining octaves, which now use those bits for additional accuracy.