Could you help me to assign the voices from the PSR SX900 to a MIDI file, please.
It's not at all clear what you are trying to do here, you'll need to explain a bit more.
Remember that if you record a MIDI file on the PSR SX900, it will only play back using the same voices if you use the file on another SX900, or another Yamaha keyboard which provides the exact same voices. If you play back on another keyboard model, that keyboard will substitute something else. All that is stored in the MIDI file is a kind of "index number" for the voice - nothing more. (OK there may be SYSEX that modify it, but you need to start with the right base voice).