Are the samples in the repo?

I’m just playing with apps to detect bpm and have one (chordai, on android) that detects BPM/chords for files, YouTube vids, and url content

I wondered where the samples are stored, and whether these are accessible via urls

Any clues most welcome! Thanks :+1:

They are in the repo here:
If you click on one, on the right of the page you should see a button labelled “Raw”, if you click on it, that will link to the file - or if you right click it and “Copy link address” that will copy the url of the sample.

You can get the PBM with this line of code:

print 60/((sample_duration :loop_amen) / 4.0)

Assuming the sample is four beats long.

Thanks! I’m gonna review the loop samples, and note which are more/less/equal 4beats, but noticed whilst testing recently that whilst rate or density will affect the playback rate, increasing the bpm won’t make samples play faster… Perhaps it’s that they’re triggered more frequently.

I’m starting to wonder if sonicpi doesn’t really care much about BPM!

Previously i assumed it’s best to half and double stuff, instead of more complex calculations, but maybe the magic of the timing system makes ‘original’ or ‘intended’ bpm a little academic/unimportant, providing the figures add up (eg the relative amounts, for syncing multiple loops of differing length, for example…

Starting to run low on drawing boards

The sample command simply starts playing at the time it is called, regardless of the sample BPM.
You can make the samples loop precisely with the beat_stretch parameter.

loop do
  sample :loop_amen, beat_stretch: 4
  sleep 4