A CPU sets an application of music sound generation to each of plural
ports, and a priority to the set application, and further sets the
maximum number of channels that assign an arbitrary sound source to each
port from plural kinds of sound sources and produce sounds. When a new
sound generation request is supplied to a certain port in which all sound
generation channels of the port are currently generating sounds, and when
the sound generation channels to be used for the sound generation are in
short, the CPU supplies the sound generation request to a channel not
producing a sound currently in other port to which the application of the
same priority is set.