setSpeed function for syncing with live source