7

I experimenting with making music on Pico-8. One thing I'm confused about is the speed value. How does that Number translate into BPM (Beats per Minute)?

P#32014 2016-10-29 10:37 ( Edited 2016-10-29 21:23)

8

The speed is the amount of "ticks" each note lasts, so a speed of 1 means 1 tick per note and a speed of 16 means 16 ticks per note. Exactly how long a tick is is undocumented, but from my own testing I think it's approximately one 120th of a second (if someone knows the exact value please let me know!).

If you want to convert the speed to BPM you first need to decide how many notes you consider to be a beat (usually 4 or 8). Then you could use the following formula:

bpm = 60 / (speed / (120 / notes_per_beat))

Or as Pico-8 code:

 ```function speed_to_bpm(speed, notes_per_beat) return 60 / (speed / (120 / notes_per_beat)) end print(speed_to_bpm(15, 4)) -- output: 120 ```

Hope this helps!

P#32020 2016-10-29 11:39 ( Edited 2016-10-29 19:19)

Excellent. Thank you so much!

P#32038 2016-10-29 17:23 ( Edited 2016-10-29 21:23)
4

I was measuring the tick duration when exporting audio via command line (such as "export music.wav"). The sample rate of exported audio is 22,050 Hz. It looks like 1 tick is 183 samples. 1 quarter note was 10,980 samples. That's 120.4918 BPM.

P#79335 2020-07-14 21:59
1

thank you very much! Very helpful for my sequencer :)

P#96560 2021-08-28 09:21