Detect beats using SonicPI

Hi. I’m trying to detect beats in wav file using Sonic Pi. I want the beats to accurately slice them into smaller samples to further use.
Is it possible in sonic pi?

Have a look at the onset option when using samples. I have used this in one or two programs and you should find referece to them if you search for onset on this site.
Basically it looks at sample and determines when there are large changes in amplitude from zero. So if you have a percussion instrument on each beat then these can be detected. It can’t detect beats directly, but may be of some use.

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"