Hi forum,
I am trying to figure out how to build a circular buffer in order to granulate and pitch shift live input. I would like the incoming signal to be stored in an Array and have the read index follow behind the write index. I specifically want to use an Array for this and not a delay line.
The problem is obviously that the read index cannot overtake the write index since there will be a glitch in audio, and with pitch shifting and randomization this would be inevitable.
Through some research I'm thinking that this sort of implementation can maybe be done with wrap~ and some kind of delay line on the read index, but I'm not sure how to build it. I've seen examples of circular buffers in other languages but with very little concrete explanation of how the code works.
I'm hoping someone here might be able explain to me in detail how I should approach this.
Thanks in advance!!
j