Hi, with the high level Lua API it is very basic.
I'm using the playdate.sound.sampleplayer:setRate(rate) method that I call in playdate.update(). I compute the rate according to the average crank speed derived from the playdate.getCrankChange() change value.