I recently congratulated myself heartily for coming up with the idea of storing variable values in the samples of a buffer with poke and then recalling them when needed with peek. This allowed me to clean up my code immensely, getting rid of many [history]s ( which complicate things with their 1 sample delay) and well as [latch]s (which can't "store" 0 easily, etc). But around this time i began to get dropouts in my audio and had to raise my signal vector size from 32 to 64 to alleviate it, and feel like things maybe have slowed down a bit in general. Is it generally inadvisable to use this method? It's so much simpler as a way to actually get a variable 1) to update immediately, 2) stick around sample after sample without having to be set again and 3) be accessible from outside gen. There are some places in my code where I have to do something like
var1 = stats.peek(x);
every sample, though i try to avoid it. Is there some better way?