I have looked everywhere on the internet and could not find anything similar to what I am trying to do. I need to change the instrument of a midi file into custom .wav or .mp3 sound files, so the sound file plays for as long as the note and has the same pitch, each time there is a note. Is there a free program that lets me do this?
The most widely used standard for specifying sounds for a MIDI synthesizer is SoundFont, which contains all samples and control information in a single file.
You need some SoundFont editing tool, and some software synthesizer that can use sound fonts.