Tempo (time-stretch): Changes the sound to play at faster or slower speed than original, without affecting the sound pitch. Here without affecting the sound pitch means the pitch of the signal intact while changing its speed (tempo).
Pitch: Changes the sound pitch, without affecting the sound tempo or speed.
For changing the tempo, you have to resampling the original signal appropriately and for this you need an algorithm. The basic idea is that you have to first calculate the whole pitch periods in a processing buffer and repeat the period of pitch to lower or delete inorder to increase the tempo.
For changing the pitch which often called Pitch Shifting, is a way to change the pitch of a signal without changing its length.Typically, good algorithms allow pitch shifting up to 5 semitones on average or stretching the length by 130%.[TheDSPDimension].
For more about Time Stretching And Pitch Shifting visit following links -



