Changing pitch or tempo of audio files, require an algorhym. Slight changes are not too noticeable. Generally the The audio is broken up into extremely small grains, and these are shortened or more of them are played to accommodate tempo changes, playback speed of the grains will deal with pitch changes. Small changes are not to bad, but More drastic ones, generally result in sound changes, which some will find unacceptable..one might describe these changes a watery sounding.
Midi files are data only, so extreme pitch and tempo changes can be made with no issue.