A system, method and computer readable medium for adjusting volume levels of a
Musical Instrument Digital Interface (MIDI) sound file for optimizing play on a
sound device. The method on an information processing system includes calculating
a first set of loudness levels for each instrument in a MIDI sound file and calculating
a second set of loudness levels corresponding to an audio output range of a sound
device. The method further includes generating a mapping between the first set
of loudness levels and the second set of loudness levels corresponding to the audio
output range of the sound device. The method further includes generating a gain
term for each note in the MIDI sound file and modifying the MIDI sound file using
the second set of loudness levels and the gain term for each note in the MIDI sound file.