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)?
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!
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.
I simplified the equation
BPM=7200/(Notes*Speed)
And here's one for BPM to Speed
Speed=7200/(Notes*BPM)
Using @AdamJ's more precise value of 22,050/183 instead of 120, the simplified formulae are
BPM=7229.50819/(Notes_per_beat*Speed)
Speed=7229.50819/(Notes_per_beat*BPM)
Yes, it's a quibble, but if you are syncing sound and graphics, the 7200 value will cause things to drift out of sync faster. Can also be a factor if you are using PCM as a fifth channel for your music.
Edited. Thanks for the correction @0xFFFF967F.
@bikibird @AdamJ @0xFFFF967F Thank you all for reviving this topic and for the precision quibble. I adjusted my 5ch demo and the sync still isn't great, but it's slightly better now!
Hello all, I'm new to Pico8 and trying to figure this out.
If I understand it correctly then the tempo jumps are pretty big. Fore example, if I'm using 8 notes per beat (IE 32nd note resolution), I could use speed 9 to get a tempo of 100 BPM. But then if I wanted it slightly faster, I would have to use speed 8 and the BPM would increase to 112 BPM. Which is quite a lot faster.
Am I correct in this? And if so, is this just a limitation of Pico8, or are there other ways to reach the BPMs in between 100 and 112 (without sacrificing note resolution)?
Hi, @CZ75,lesson 8 of my music theory tutorial for PICO-8 includes a tempo calculator that you may fine helpful.
Hi @bikibird, thanks, I see that your calculator uses the same formula mentioned in this thread so I'm getting the same results. I guess that means that it is indeed impossible to have a tempo in between 100 and 112 bpm, at least with 32nd note resolution?
Your tutorial looks fantastic by the way, I'm already pretty well-versed in music theory myself, but this seems like a great way to learn!
@CZ75, thanks, If I'm thinking about this right, your beat is a quarter note, i.e., there are 4 beats per measure, then 32nd note resolution requires 8 tubs per beat and tick duration of 8 or 9 to hit 113 or 100 beats per minute.
@bikibird, yes exactly, so tempo adjustments will be a lot coarser than what I'm used to from other sequencers/daws, but I think it makes sense to me now and I guess this is part of the charm of Pico 8. Thanks for clarifying!
[Please log in to post a comment]