Detect beats using SonicPI

You can also try slice: which is a parameter for the sample function. This will slice a sample into equal sections which you can determine with num_slices:

You can also check out this thread for more on onset: Can someone explain "Onset"