I built a granulator synthdef that performs on an audio file loaded into a buffer. The synthdef is controlled by a pattern. The audio file is being recorded elsewhere, and appended with new material every few seconds.
I’m currently under the impression that patterns are effectively compiled at run-time. So, when I run my pattern, and reload the audio file into my buffer during pattern playback, it continues to perform on the original loaded buffer----> that is, all the new material that has been appended to my audio file, is not present in the output of pattern playback after I’ve reloaded the audiofile into the same buffer.
Is this impression correct? Are there any obvious strategies for having patterns play back upon a an audio buffer that is frequently changing?
I think the catch here is that you aren’t reloading the audio file into your buffer – if you’re using Buffer.read, then you’re loading it into a different buffer with a different ID. (Note also that eventually you should free old buffers – memory usage will accumulate otherwise.)