Polyphonic Ringtones
Formats
| Format | Extension | Max. Polyphony |
| MIDI (SP-MIDI) | .mid, .midi, .rmi | unlimited1 |
| Yamaha SMAF MA-1 | .mmf | 4 |
| Qualcomm CMX (prior to v3.0) | .pmd | 3 or 162 |
| Sagem v2.1 | .ems | unlimited1 |
1 Individual phone models restrict the capabilities of the format and play only fixed number of simultaneous notes
2 CMX 1.X is limited to 3-voice polyphony and CMX 2.X to 16 voices
Yamaha SMAF MA-2, Yamaha SMAF MA-3, Qualcomm CMX 3.X and 4.X, NTT DoCoMo MFi ringtones are mixed formats ringtones and are not listed here though they have all the features of polyphonic ringtones. To read more on them
go here.
Operations
public Ringtone truncateChannels(int channelsCount, int allowedRhythmPolyphony);
Truncate the ringtone leaving only first channelsCount mono channels by priority
- channelsCount is the number of channels to leave
- allowedRhythmPolyphony is the number of simultaneously playing notes allowed on rhytm(drum) channel
public Ringtone truncateChannels(int channelsCount);
Truncate the ringtone leaving only first channelsCount mono channels by priority. Treat rhythm channel as monophonic.
- channelsCount is the number of channels to leave
public Ringtone truncateTracks(int polyphony, int[] tracks, int allowedRhythmPolyphony);
Truncate the ringtone leaving only first channelsCount mono channels by priority given by tracks array
- polyphony is the number of channels allowed, if equals -1 no polyphony restriction is used
- allowedRhythmPolyphony is the number of simultaneously playing notes allowed on rhytm(drum) channel, if equals -1 there're no limitations
- tracks is the priority of the tracks (only these tracks are used)
public Ringtone truncateTracks(int polyphony, int[] tracks);
Same as truncateTracks(polyphony, tracks, -1);
public Ringtone truncateTracks(int[] tracks);
Same as truncateTracks(-1, tracks, -1);
public Ringtone truncateTracks(int[] tracks, int allowedRhythmPolyphony);
Same as truncateTracks(-1, tracks, allowedRhythmPolyphony);
public int getPolyphonyLevel();
Get the maximal number of notes played simultaneously in the ringtone (ringtone polyphony)
public Ringtone truncatePolyphonyLevel(int polyphony);
Truncate the ringtone so that not more than
polyphony notes are played simultaneously
- polyphony is the max polyphony level
public Ringtone truncateParts(int maxCount);
Truncate the ringtone so that not more than
maxCount parts is used
- maxCount is the max part number
public int getTracksCount();
Get the number of tracks in the ringtone
public int getTrackNotesCount(int track);
Get the number of notes on the given track of the ringtone.
If there's no track with the given number 0 is returned.
public int getInstantPolyphony(int time);
Return the number of simultaneously sounding notes at the given time (in ms).
If time exceeds getDuration() value, return 0.
public Ringtone reducePolyphony(int channelCount, int maxPolyphony, int drumPolyphony);
Reduce number of channels of the ringtone to the given value.
- channelCount is the number of channels to leave
- maxPolyphony is the polyphony allowed
- drumPolyphony is the drums polyphony
public Ringtone truncateTracks(int maxPolyphony);
Limit the ringtone so that
- it's polyphony doesn't exceed maxPolyphony
- the tracks are either the same as in the source ringtone or are not present in the target ringtone
Pay attention to MIP table if it's present. Otherwise use natural order of tracks.
- maxPolyphony is the polyphony range
public Ringtone append(Ringtone appendedRingtone);
Appends ringtone to the end of current
- appendedRingtone is the ringtone to be appended to this one
public void substituteInstrument(Instrument oldInstrument, Instrument newInstrument) throws Incorrect Instrument Exception
Substitute all occurences of one instrument with the other.
Note that you can't substitute percussion instrument with the melodic or vice verse.
Only instruments of the same nature can be substituted.
- oldInstrument id the old instrument to be replaced
- newInstrument is the new instrument
public void substituteInstruments(Map instrumentSubstitution) throws Incorrect Instrument Exception;
Substitute all occurences of the set of instruments with the instruments from the other set.
Note that you can't substitute percussion instrument with the melodic or vice verse.
Only instruments of the same nature can be substituted.
- instrumentSubstitution sets the substitution elements (oldInstrument -> newInstrument)
Individual Format Options
| Format | Format Constant | Applicable Options |
MIDI
(MIDI 0, MIDI 1, SP-MIDI) | RingtoneConstants.FORMAT_MIDI_0,
RingtoneConstants.FORMAT_MIDI_1,
RingtoneConstants.FORMAT_SPMIDI | RingtoneConstants.OPTION_COMPACT
Make ringtones less in size by omitting unnecessary information
RingtoneConstants.OPTION_START_WITH_TEXT
Shift all text metaevents to the beginning of the track
RingtoneConstants.OPTION_FORBID_SPECIAL_NOTES
Don't include special notes (like vibra or lights)
RingtoneConstants.OPTION_NORMALIZE_VIBRA
Make vibrachannel volume as small as possible to eliminate effects on devices that are not capable of distinguishing vibra
RingtoneConstants.OPTION_INSERT_VIBRATION
Generate vibrachannel and insert it to the ringtone
RingtoneConstants.OPTION_DISALLOW_INSTRUMENT_CHANGES
Forbid changing the instrument in the middle of the channel. Is necessary for Nokia Series 40 devices.
|
| Yamaha SMAF MA-1 | RingtoneConstants.FORMAT_SMAF_MA1 | RingtoneConstants.OPTION_FORBID_SAVE
Set content read only (not savable)
RingtoneConstants.OPTION_FORBID_TRANSMISSION
Set content not transferrable
RingtoneConstants.OPTION_FORBID_EDIT
Set content not ediatble
RingtoneConstants.OPTION_NO_CRASH_CYMBAL
Replace Crash Cymbal with another instrument (useful for some phone models)
|
Qualcomm CMX
(CMX 1.X, CMX 2.X) | RingtoneConstants.FORMAT_CMX +
RingtoneConstants.OPTION_CMX_CMX1X,
RingtoneConstants.FORMAT_CMX +
RingtoneConstants.OPTION_CMX_CMX2X | RingtoneConstants.OPTION_COPYRIGHTED
Set copyright flag for the ringtone to true
RingtoneConstants.OPTION_NO_COPYRIGHT
Set copyright flag for the ringtone to false
RingtoneConstants.OPTION_DOWNLOADED_FROM_NET
Set content origin to downloaded from net
RingtoneConstants.OPTION_MOBILE_ORIGINATED
Set content origin to mobile originated
RingtoneConstants.OPTION_FROM_DESKTOP
Set content origin to desktop
|
| Sagem 2.1 | RingtoneConstants.FORMAT_SAGEM_21 | No options applicable |
See also information on mixed formats