Transposes melodies or chords from one key to another, calculating the necessary interval adjustments.