As explained in what is MIDI, different mobile phones vary considerably in the playback capacity they have in terms of polyphony and sound quality. At one end of the spectrum, a phone may only be able to play four notes at a time, while at the other end another may be able to handle 128, and there will be phones with varying abilities inbetween.
So, lets look at a typical MIDI ringtone in terms of instruments and polyphony. The programmer gives the song a listen, decides on the section thats best suited to do and decides to arrange the ringtone using:
Percussion / 2
Bass Guitar / 1
Piano / 4
Strings / 3
Sax (for vocal melody) / 1
Trumpet (for harmony vocals) /1
The numbers after the instruments represent the maximum amount of notes played by that instrument at any one point. If we add up all the numbers, we have a maximum polyphony of 12. For a modern phone with a polyphony of over 100 this is no sweat at all, but what about phones with less? Ringtone suppliers need tones that work on as many phones as possible, and ringtone creators can't go to the trouble of creating too many versions, as time is money for them.
Around 2001, a special MIDI standard came into use called Scaleable Polyphonic MIDI, or SP-MIDI. There was already another standard aimed at mobile devices called General MIDI Lite (which requires a fixed 16-note polyphony), but SP-MIDI proved to be most popular due to its flexibility.
An SP-MIDI file is a standard MIDI file (SMF) but one that contains some extra information that tells the device its being played on how to prioritize the notes being played.
Lets take the example above and treat it as a 'normal' (not an SP-MIDI) MIDI file and imagine we have just had this sent to our phone, a venerable old Nokia with a polyphony of 4 notes. What we will hear on playing this ringtone is notes dropping off pretty much at random as the polyphony is exceeded. If the ringtone sticks to 4 or less notes, it will play just fine in these sections, but by and large the music will sound crap and may be unrecognizable as the original song, as the phone has no way of knowing what parts of the ringtone are the musically important parts and may decide to play sustained string parts rather than the catchy vocal melody, hooky horn line or killer bassline that makes the song what it is (though some of the crap I've had to program in the past has been sadly lacking in any of those).
If we now take the same ringtone but run it through software to convert it to the SP-MIDI format we have a different story. What we do when we format a MIDI file for SP-MIDI is to prioritize the different channels (and hence instruments, as we use one channel per instrument unless we are getting fancy and change the instrument patch partway through) in order of musical importance.
For this song, the minimum we can get away with and retain musical integrity (the primary aim of a ringtone programmer - to make the ringtone reconizable as the song its meant to represent) is vocal melody, bass guitar and percussion, making a maximum polyphony of 4 notes at any one time, so we prioritize the channels holding these instruments in that order. After that, and depending very much on the musical importance of a particular part, we may arrange vocal harmony, strings and piano in descending priority. So, if we then try this ringtone on a phone with an 8 note polyphony, we get all the previous parts plus harmony vocal and strings. A 32 note phone will play all the parts.
One interesting thing is that if a part exceeds the maximum polyphony at *any time*, it is dropped in whole from the playback, so if for most of the ringtone the piano fits in the limit but exceeds it for just one chord, it won't get played back at all.
So, combined with the musical arrangement ability of the ringtone programmer, SP-MIDI allows us to generate a single ringtone that will auto arrange itself to playback on the widest possible range of platforms while retaining its musical integrity as much as possible.