3 ms·
Yeah, lerping into a lookup table is common in audio and (old school) games. A common trick to make that faster is to not use doubles and radians to represent
by munificent 5y ago
Yeah, lerping into a lookup table is common in audio and (old school) games.
A common trick to make that faster is to not use doubles and radians to represent the phase. Instead, represent phase using an integer in some power-of-two range. That lets you truncate the phase to fit in a single period using a bit mask instead of the relatively slow modulo.
- spacechild1 5y agoOr use some evil bit hackery :-) https://github.com/pure-data/pure-data/blob/18c9695ba4de543c51c2c013b45b99b8f1c35a19/src/d_osc.c#L263-L319 https://github.com/pure-data/pure-data/blob/18c9695ba4de543c...