A counter~ that stops at the end


    Aug 10 2013 | 9:49 am
    I'm looking for something like counter~ with the added feature of having it stop when it reaches the upper limit.
    I'm trying to record little audio snippets after they're passed through a VST. I'm using counter~ and poke~ to move the audio into a buffer, and it's working other than the fact that the only way I have to stop counter~ is not at signal rate, so there's some indeterminacy in when it actually gets stopped, consequently the beginnings sometime get overwritten because counter~ loops.
    p.s. It would be nice if the forum software would not return results for counter, given a search term of counter~

    • Aug 10 2013 | 3:01 pm
      Something like this will work if you're willing to give up the first sample of your buffer as a holding place for all the stuff you don't want to poke. (When gate~ is closed it sends out 0.)
    • Aug 12 2013 | 9:08 pm
      Thanks for that, Christopher. I had something pretty similar, only it used selector to deliver -1 to poke~ when it wasn't writing. I think that my original thing was working fine, and that that wasn't really the problem with my patch. I was miscalculating the latency through my signal chain.