timeStretch function for tempo change