if you have FL studio or an MPC with tap tempo, all you need to do is have your sample playing in the background and pull up the tap tempo. just play along to the beat on your midi controller or by clicking the center button and the tempo should be right. I usually hit it until it is on the same tempo for 4 or 5 hits.