How does it know each sample's note?
It reads the root note a sampler saved in the WAV or AIFF file first. If there isn't one, it looks for a note name in the file name, such as Piano_C4.wav or bass-f#2.wav (middle C is C4). Failing that, it listens for the pitch. You can change any of them in the list before you make the SoundFont.