Can I use midi files with my own samples as instruments?

Currently making a game and I was wondering if I can use midi files as background music using my own samples as instruments? If I provide 1 sample, will it pitch it to the right note? Or do I have to provide all notes myself?

The reason I'm asking is because I want to do a similar thing that Banjo-Kazooie did when you go into the water in any level and it removes all other instruments except the main melody that becomes a flute or a xylophone.

EDIT: I'm just wondering if anyone already messed around with the sound part of things.

Yes. Have you tried replacing the samples in the MIDI demo included in the SDK Examples folder?

I have not. I'm going to put in my samples and see how it goes.

Interesting, but the example doesn't have an instrument. It uses a new synth. I want to use my own instrument (not kick drum, snare or any 1 shot sound...etc..) by using 1 sample of a piano key for example and it pitches it to the other notes automatically.

This is what the MIDIPlayer example has for the instrument part.
image

I don't have the SDK with me to check so I may be misremembering. I recall a folder of samples. I'll take a look when I can.

The sample does have a sampled instrument: the drums. Notice there are .aif files in there: this is a mac-os file format for wav audio; but regular wav files work just as well. adpcm sound is not compatible though.

You are correct. But if I sampled a piano or a flute, would I be able to pitch it to another tone/note (C or E or G)? Or do I have to create a synth to play notes?