Created
July 10, 2019 22:03
-
-
Save findscode/a059ecb670fa21a6433b8a966b7385fa to your computer and use it in GitHub Desktop.
Sonic Pi: function that helps with sample BPM counting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define :getBpm do |samp, beats| | |
t = sample_duration samp | |
bps = t/beats | |
beatsPerMin = 60/bps | |
return beatsPerMin | |
end | |
puts getBpm(:loop_amen, 4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment