sequence:setTempo converts inputs to integers

This behavior is not documented (Inside Playdate).

Any inputs sent to setTempo are floored to become integers, making tempos difficult to manage, especially when trying to sync them with audio files. A workaround I'm using is to calculate the lowest whole number that is the multiple of the target steps per second and expand the sequence by that length, but it adds quite a bit of difficulty when manipulating the sequence.

Oof. Don't know how I missed that. I guess because I based the implementation off .mid files and the tempo is an integer there it just didn't cross my mind. I think the fix is just a simple matter of changing all the instances of that variable from int to float, so we should be able to get this fixed in 1.13.1. Thanks for catching this!

1 Like