Read thousands of peek~ values from a buffer in no time


    Aug 26 2015 | 2:18 pm
    Hi there!
    I need to read a big number of values from a buffer at specific intervals. I need around 262,144 or more, assuming of course that the number of samples in the buffer is >= than the number of values I need.
    I tried to bang the buffer with a uzi set at 2500 (way less than I need). It works but it's so slow that it made me think I'm not using the right approach. I feel like there must be a way to print out all the values of a buffer easily but I can't find it.
    Any ideas?

    • Aug 26 2015 | 2:42 pm
      I'd say that your single biggest "bottleneck" is the fact that you are redrawing the matrix in the window on every single number. There's no need for that. Remove that and see if that improves your speed sufficiently. I see other ways you could probably improve efficiency, but that's the big one, so you should fix that first.
    • Aug 26 2015 | 3:43 pm
      Well I guess that tells a lot about how much I know about jitter : ) I tried id with and uzi at 242144 and it works great! I've attached the updated patch for reference.
      Thank you so much Christopher.
    • Aug 26 2015 | 6:10 pm
      jit.catch~ will be helpful here.
    • Aug 26 2015 | 7:01 pm
      I'm glad it helped! Here's a version of your patch with a couple things done a little differently. Not necessarily any better than what you did, just slightly different ways of doing the same things.
    • Aug 28 2015 | 2:55 pm
      Yeah I think your version is more elegant Christopher. I think I'll adopt it for my project. Thank you for sharing.