BPM finder, implemented in a button
- How to convert to BPM?
- 1 Minute = 60 seconds = 60,000 ms.
- We can divide that by our interval to get BPM
- Sadly we get a really long number with a misleading amount of precision.
- Apart from manually clamping, is there a way to protect the significant digits?
- Answer: javascript numbers have a built in "toPrecision()" that does what we need,
- apart from returning a string for some weird reason.