Storing chosen events in a coll object
Hello
I would like to know if this patch is a good way to store chosen events in a coll object :
I would like to launch the counter and then press the bang button to store the counter time of the hit in a coll object.
Any suggestions or a better way to do this ?
Have a nice day,
Mathieu
There are many ways one might do that sort of thing, but I'd recommend timer (as shown in the example below). Your way has three disadvantages I can see: 1) It's doing a lot of excess work even when no hits are occurring, 2) it has a precision limited to the nearest 100 ms, and 3) if two hits were to occur within the same 100 ms interval, one might not get recorded.
I can't improve on this; what you've done is pretty concise; I wanted to do something, so I added the ability to allocate each hit an index number, using pack -> coll.
Brendan
Thanks for the advice Christopher, I didn't realise that it would have been a problem with the 100ms precision and you are all the more right that my events are triggered by gestures so the application has to be as precise as possible.
But can you explain to me where the 100 ms precision comes from ? In fact my acceleration values (which are acting on the counter) are 200 Hz sampled so one value every 5 ms. Is the 100 ms precision coming from the coll object itself ?
Thanks for your upgrade Brendan, its a good way to get index and hits !
Mathieu