stopping count~
I am trying to use poke~ to write a small amount of samples to a buffer~, say 50, I am using count~ to provide the sample index. What I would like to do is start count~ and once it reaches 50 for it to stop automatically. Any ideas as to an object that will work alongside count~ and send out a bang when a specific number is reached? Something a bit like select, but which works with signals. I tried feeding count~ into number~ and then hooking number~'s right outlet up to a select object looking out for a 50 but I guess the number stream is coming out way to fast for it register properly. Many thanks all!
will [
Thanks for your reply mate, I did try [
what i meant was actually more like sending the output of [
To do this with native objects you could just clip~ the output of count~ to the max number of samples you want so it can't go over that number, and then use ==~ and edge~, the schedular latency of edge~ no longer an issue because your sample ramp has already stopped. Or you could have a look at Andrew Benson's shot~ and/or cshot~ externals from the share pages which will achieve the same thing with less patching and less cpu load.
Actually this is slightly more efficient: