Manipulating buffers (or jit.buffers~) through jit.gl.lua?


    Oct 29 2020 | 10:52 am
    Hi all,
    Is it possible to manipulate the contents of buffers via jit.gl.lua? I see that you can spawn new jitter objects with jit.new, so is it possible to create/destroy and reference jit.buffers~ in this way? Perhaps an easier approach would be to operate on jitter matrices and then turn those into buffers once processing is incomplete. Ideally, I could deal with the data of a buffer directly in some way.
    Thanks!
    James

    • Oct 29 2020 | 3:53 pm
      jit.buffer~ is a special jitter object due to the requirements of working in both the audio and jitter domains, and therefore can not be instantiated inside of JS / jit.gl.lua. Your second approach of working on matrices in lua and then outputting to a jit.buffer~ in the patch seems correct.
    • Oct 29 2020 | 6:29 pm
      Cool thanks @Rob. I'll just work on the matrices.
      J