Create new TextureBuffer instead of calling TextureBuffer.put every sample
otherwise this mutating the position field in Javascript (see kgl.Buffer.put)
Populate 4 frequency buckets of different periods representing low, lomid, mid, hi signals
Change interpolation to GL_NEAREST (might not be what we want, but then it gives precise values)
Change history to power of 2, as webgl prefers power-of-two-sized textures
Tested with pinkyJvm using blackhole as well to make sure this doesn't totally break jvm version
The data in the simulator looks choppy/laggy, I think that's because this is all running in a delay loop, bottlenecked by the single-threaded js on the page.
TextureBuffer.put
every sampleposition
field in Javascript (see kgl.Buffer.put)The data in the simulator looks choppy/laggy, I think that's because this is all running in a delay loop, bottlenecked by the single-threaded js on the page.
https://github.com/baaahs/sparklemotion/assets/1348691/b8d26b52-8a0e-4193-8e8f-59f8f138b362