The simplest thing you can do is changing the sampling rate in the header of the file. The effect is like playing a tape/record at lower or higher speed.
Do not change bits per sample, that will result in garbage.
If you want to change effects independently, you'll have to do terrible maths. Sorry I do not find the publication where the algorithm is described anymore, some of the hits of Google when searching for "audio similarity algorithm" might help to get to the theory.
But an open source program which can do those effects might help you more: audacity http://audacity.sourceforge.net/