PCM Ringtones
PCM stands for Pulse Code Modulation. So PCM Ringtones are the ringtones that consist of sound waves. Currently the most widespread PCM format is mp3.
Formats
| Format | Extension | Stereo/Mono |
| WAVE | .wav, .wave | both |
| AU | .au, .snd | both |
| AIFF | .aiff | both |
| MP3 | .mp3 | both |
| AAC | .aac | both |
| Qualcomm QCELP | .qcp | mono only |
| AMR NB | .amr | mono only |
| AMR WB | .awb | mono only |
Yamaha SMAF MA-2, Yamaha SMAF MA-3, Qualcomm CMX 3.X and 4.X, NTT DoCoMo MFi ringtones are mixed formats ringtones. They contain both waves and notes. They are not listed here though they have all the features of PCM ringtones. To read more on them go here.
Operations
public Ringtone changeBitsPerSample(int bitsPerSample);
Change bit representation of the wave.
- bitsPerSample is the new bits per sample value
public Ringtone changeChannels(int channels);
Change wave channel count. Is used to transform mono waves to stereo and back.
- channels is the new number of channels (1 for mono, 2 for stereo)
public Ringtone changeChannels(int channels, String mixingMethod);
Change wave channel count. Is used to transform mono waves to stereo and back.
- channels is the new number of channels (1 for mono, 2 for stereo)
- mixingMethod the method of getting mono signal from stereo signal can be one of
- *OPTION_LEFT_CHANNEL, OPTION_RIGHT_CHANNEL and OPTION_MIX_CHANNELS**
public Ringtone resample(int frequency);
Change sampling rate of the wave.
- frequency is the new sampling rate
public Ringtone filterNoise();
Remove background noise effect from the melody.
public Ringtone filterPhoneFrequencies();
Remove frequencies below 120 Hz and above 8 kHz (because of the phones speakers' limitations).
public Ringtone limitFrequency(int lowestRange, int highestRange);
Removes frequencies above or below the given frequency range
- lowestRange is the lowest frequency being passed
- highestrange is the highest frequency being passed
Individual Format Options
| Format | Format Constant | Applicable Options |
| WAVE | RingtoneConstants.FORMAT_WAVE | RingtoneConstants.OPTION_MONO Save ringtone as mono
RingtoneConstants.OPTION_STEREO Save ringtone as stereo
RingtoneConstants.OPTION_MIX_CHANNELS Mix all channels into one (in stereo to mono conversions)
RingtoneConstants.OPTION_LEFT_CHANNEL Take the left channel (in stereo to mono conversions)
RingtoneConstants.OPTION_RIGHT_CHANNEL Take the right channel (in stereo to mono conversions)
RingtoneConstants.OPTION_8_BITS Use 8 bits per sample
RingtoneConstants.OPTION_16_BITS Use 16 bits per sample
RingtoneConstants.OPTION_MULAW Encode samples according to ITU Mu-law algorithm
RingtoneConstants.OPTION_ALAW Encode samples according to ITU A-law algorithm
RingtoneConstants.OPTION_IMA_ADPCM Encode samples according to 4-bit mono IMA ADPCM algorithm
RingtoneConstants.OPTION_G726_24_KBITS Encode samples according to 24 kbps ITU G.726 ADPCM algorithm
RingtoneConstants.OPTION_G726_32_KBITS Encode samples according to 32 kbps ITU G.726 ADPCM algorithm
RingtoneConstants.OPTION_G726_40_KBITS Encode samples according to 40 kbps ITU G.726 ADPCM algorithm
RingtoneConstants.OPTION_FREQUENCY_8000
RingtoneConstants.OPTION_FREQUENCY_11025
RingtoneConstants.OPTION_FREQUENCY_16000
RingtoneConstants.OPTION_FREQUENCY_22050
RingtoneConstants.OPTION_FREQUENCY_44100
RingtoneConstants.OPTION_FREQUENCY_48000 Set sample rate for the ringtone (in Hz)
|
| AU | RingtoneConstants.FORMAT_AU | RingtoneConstants.OPTION_MULAW Encode samples according to ITU Mu-law algorithm
RingtoneConstants.OPTION_ALAW Encode samples according to ITU A-law algorithm
RingtoneConstants.OPTION_IMA_ADPCM Encode samples according to 4-bit mono IMA ADPCM algorithm
RingtoneConstants.OPTION_G726_24_KBITS Encode samples according to 24 kbps ITU G.726 ADPCM algorithm
RingtoneConstants.OPTION_G726_32_KBITS Encode samples according to 32 kbps ITU G.726 ADPCM algorithm
RingtoneConstants.OPTION_G726_40_KBITS Encode samples according to 40 kbps ITU G.726 ADPCM algorithm
RingtoneConstants.OPTION_FREQUENCY_8000
RingtoneConstants.OPTION_FREQUENCY_11025
RingtoneConstants.OPTION_FREQUENCY_16000
RingtoneConstants.OPTION_FREQUENCY_22050
RingtoneConstants.OPTION_FREQUENCY_44100
RingtoneConstants.OPTION_FREQUENCY_48000 Set sample rate for the ringtone (in Hz)
|
| AIFF | RingtoneConstants.FORMAT_AIFF | RingtoneConstants.OPTION_MONO Save ringtone as mono
RingtoneConstants.OPTION_STEREO Save ringtone as stereo
RingtoneConstants.OPTION_MIX_CHANNELS Mix all channels into one (in stereo to mono conversions)
RingtoneConstants.OPTION_LEFT_CHANNEL Take the left channel (in stereo to mono conversions)
RingtoneConstants.OPTION_RIGHT_CHANNEL Take the right channel (in stereo to mono conversions)
RingtoneConstants.OPTION_8_BITS Use 8 bits per sample
RingtoneConstants.OPTION_16_BITS Use 16 bits per sample
RingtoneConstants.OPTION_MULAW Encode samples according to ITU Mu-law algorithm
RingtoneConstants.OPTION_ALAW Encode samples according to ITU A-law algorithm
RingtoneConstants.OPTION_IMA_ADPCM Encode samples according to 4-bit mono IMA ADPCM algorithm
RingtoneConstants.OPTION_G726_24_KBITS Encode samples according to 24 kbps ITU G.726 ADPCM algorithm
RingtoneConstants.OPTION_G726_32_KBITS Encode samples according to 32 kbps ITU G.726 ADPCM algorithm
RingtoneConstants.OPTION_G726_40_KBITS Encode samples according to 40 kbps ITU G.726 ADPCM algorithm
RingtoneConstants.OPTION_FREQUENCY_8000
RingtoneConstants.OPTION_FREQUENCY_11025
RingtoneConstants.OPTION_FREQUENCY_16000
RingtoneConstants.OPTION_FREQUENCY_22050
RingtoneConstants.OPTION_FREQUENCY_44100
RingtoneConstants.OPTION_FREQUENCY_48000 Set sample rate for the ringtone (in Hz)
|
| MP3 | RingtoneConstants.FORMAT_MP3 | RingtoneConstants.OPTION_MONO Save ringtone as mono
RingtoneConstants.OPTION_STEREO Save ringtone as stereo
RingtoneConstants.OPTION_8_KBITS
RingtoneConstants.OPTION_16_KBITS
RingtoneConstants.OPTION_24_KBITS
RingtoneConstants.OPTION_32_KBITS
RingtoneConstants.OPTION_48_KBITS
RingtoneConstants.OPTION_56_KBITS
RingtoneConstants.OPTION_64_KBITS
RingtoneConstants.OPTION_80_KBITS
RingtoneConstants.OPTION_96_KBITS
RingtoneConstants.OPTION_112_KBITS
RingtoneConstants.OPTION_128_KBITS
RingtoneConstants.OPTION_160_KBITS Set bitrate to the given number of kbps (kilobit per second)
RingtoneConstants.OPTION_AVERAGE_BITRATE Use ABR (average bitrate) instead of CBR (constant bitrate) – often significantly decreases the size of the ringtone leaving its quality untouched
RingtoneConstants.OPTION_ID3V1_TAG Disable ID3v1 tag
RingtoneConstants.OPTION_ID3V2_TAG Disable ID3v2 tag
|
| AAC | RingtoneConstants.FORMAT_AAC | RingtoneConstants.OPTION_8_KBITS
RingtoneConstants.OPTION_16_KBITS
RingtoneConstants.OPTION_24_KBITS
RingtoneConstants.OPTION_32_KBITS
RingtoneConstants.OPTION_48_KBITS
RingtoneConstants.OPTION_56_KBITS
RingtoneConstants.OPTION_64_KBITS
RingtoneConstants.OPTION_80_KBITS
RingtoneConstants.OPTION_96_KBITS
RingtoneConstants.OPTION_112_KBITS
RingtoneConstants.OPTION_128_KBITS
RingtoneConstants.OPTION_160_KBITS Set bitrate to the given number of kbps (kilobit per second)
RingtoneConstants.OPTION_MPEG4_CONTAINER Insert AAC into the MPEG-4 container
RingtoneConstants.OPTION_3GP_CONTAINER Insert AAC into the 3GP container
RingtoneConstants.OPTION_ID3V1_TAG Disable ID3v1 tag
RingtoneConstants.OPTION_ID3V2_TAG Disable ID3v2 tag
|
| AMR NB | RingtoneConstants.FORMAT_AMR | RingtoneConstants.OPTION_MR_475 – 4.75 kbps
RingtoneConstants.OPTION_MR_515 – 5.15 kbps
RingtoneConstants.OPTION_MR_59 – 5.9 kbps
RingtoneConstants.OPTION_MR_67 – 6.7 kbps
RingtoneConstants.OPTION_MR_74 – 7.4 kbps
RingtoneConstants.OPTION_MR_795 – 7.95 kbps
RingtoneConstants.OPTION_MR_102 – 10.2 kbps
RingtoneConstants.OPTION_MR_122 – 12.2 kbpsSet bitrate to the given number of kbps (kilobit per second)
|
| AMR WB | RingtoneConstants.FORMAT_AMRWB | RingtoneConstants.OPTION_WB_MR_66 – 6.6 kbps
RingtoneConstants.OPTION_WB_MR_885 – 8.85 kbps
RingtoneConstants.OPTION_WB_MR_1265 – 12.65 kbps
RingtoneConstants.OPTION_WB_MR_1425 – 14.25 kbps
RingtoneConstants.OPTION_WB_MR_1585 – 15.85 kbps
RingtoneConstants.OPTION_WB_MR_1825 – 18.25 kbps
RingtoneConstants.OPTION_WB_MR_1985 – 19.85 kbps
RingtoneConstants.OPTION_WB_MR_2305 – 23.05 kbps
RingtoneConstants.OPTION_WB_MR_2385 – 23.85 kbpsSet bitrate to the given number of kbps (kilobit per second)
|
| Qualcomm QCELP | RingtoneConstants.FORMAT_QCP | RingtoneConstants.OPTION_QCP_VFR Use variable full rate
RingtoneConstants.OPTION_QCP_VHR Use variable half rate
RingtoneConstants.OPTION_QCP_FFR Use fixed full rate
RingtoneConstants.OPTION_QCP_FHR Use fixed half rate
|
See also information on mixed formats