local paused = false local playbackRate = 1.0 function updateBox() local change, aChange = playdate.getCrankChange() if paused then if change<0 then change = 0 end song:setRate(change*0.03) else playbackRate += change*0.001 if playbackRate < 0.2 then playbackRate = 0.2 end song:setRate(playbackRate) end if playdate.buttonJustPressed(playdate.kButtonA) then if paused == true then paused = false else paused = true end playbackRate = 1.0 end if playdate.buttonJustPressed(playdate.kButtonB) or playdate.buttonJustPressed(playdate.kButtonLeft) then createMenu(songlist) song:stop() end end