UnwiredtecDocumentation: RingtoneCreatorServerUsing ...

Product Documentation | Page Index | Access deniedRecent Changes | Recently Commented | Users | Registration | Login:  Password:  

Using Ringtone Creator Server


After successful installation and running the server you can perform requests to it.
Each request will look like this
http://host:port/rtcreator/convert?parameter1=value1&parameter2=value2&...&parameterN=valueN
where
host is your host name or IP address
port is the port number (typically 80 or 8080)
Available parameters and their values are listed below.
Please note that you should use HTTP POST method for your requests.


RTC Server accepts the following request parameters:


parameter meaning
isalive if this parameter is set to some non-empty value, the server responds back with the word ALIVE in ISO-8895–1 encoding and closes connection. This feature is used for testing availability of Ringtone Creator Server.
filename the name of the file being converted. MUST include file extension.
Example: ringtone.mid
File names should have the following extensions:
.mid, .midi – MIDI files
.mmf – Yamaha SMAF (MMF) files
.rtttl, .rtx, .txt – RTTTL files
.imy – IMelody files
.emy – Emelody files
.sagem – Sagem mono files
.mot – Motorola files
.nokia, .bin, .ott – Nokia Smart Messaging files (8 bit)
.nokiatxt – Nokia Smart Messaging files (7 bit)
.wav – WAVE files
.mp3 – MP3 files
.amr – AMR NB files
.awb – AMR WB files
.au – AU files
.aiff – AIFF files
.aac – AAC files
.pmd – Qualcomm CMX files
.qcp – Qualcomm QCELP files
.mld – NTT DoCoMo MFi files (*)
format

format of the ringtone provided. Can take one of the following values (case-sensitive; left part represents the value to be sent, right part is the explanation):
MIDI – MIDI 0, 1, SP-MIDI
RMID – RMID
SMAF – Yamaha SMAF MA-1, MA-2, MA-3
IMELODY – IMelody 1.0, 1.2, Extended IMelody
EMELODY – Emelody
RTTTL – RTTTL, RTX 
SAGEM – Sagem mono
NOKIA – Nokia Smart Messaging (8 bit; binary)
NOKIATXT – Nokia Smart Messaging (7 bit; text)
WAVE – WAVE
MP3 – MP3
AMR – AMR NB
AMR-WB – AMR WB 
AU – AU 
AIFF – AIFF
AAC – AAC
CMX – Qualcomm CMX
QCP – Qualcomm QCELP
MFI – NTT DoCoMo MFi (*)


filename and format parameters are mutually exclusive. If both of them appear in the request, format takes precedence.

ringtone a BASE64-encoded ringtone. It can be a MIDI file or an Imelody file or whatever file you want to convert; in both cases, it must be BASE64-encoded (it's not the same as URL-encoded).
options

one or several applicable conversion options, affecting the resulting ringtone. Options are space-separated. The list of applicable options for each format follows:


FIND-CYCLESRingtone Creator tries to locate cycles in the ringtone and potentially increase the amount of music information stored in the given number of bytes.
Applicable to: RTTTL, NOKIA, NOKIATXT, IMELODY


SCALE-ALWAYS – put scale numbers for each note; don't assume that the scale once being set remains in effect for the subsequent notes. For IMELODY formats default notes(4th octave) have not sclae numbers.
Applicable to: IMELODY, IMELODY 10, NOKIA, NOKIATXT


PERSISTENT-SCALE – put scale number for note if there is changing between octaves;
Applicable to: IMELODY, IMELODY 10


SCALE-ALWAYS+PERSISTENT-SCALE – put scale numbers for each note besides default notes(4th octave). In changing to 4th octave it puts scale number to first 4th octave note. Using both option is default.
Applicable to: IMELODY, IMELODY 10


COMPACTRingtone Creator tries to compact a ringtone by dropping out all the extra information (not affecting the sound quality, though). For certain ringtones, the compact ratio reaches up to 40%.
Applicable to: IMELODY, MIDI 0, MIDI 1, MIDI SP, EMELODY


FORBID-SAVE – Disallow saving a ringtone once it's being downloaded to the client's mobile phone (Preview Mode).
Applicable to: SMAF MA1, SMAF MA2, SMAF MA3


MONO, STEREO – Set number of channels in the produced wave. MONO can be used in conjunction with mixing mode settings (see below).
Applicable to: WAVE, MP3


LEFT-CHANNEL, RIGHT-CHANNEL, MIX-CHANNELS – mixing mode for STEREO to MONO conversions.
Applicable to: WAVE


SAVE-TRIPLETS – saves triplets in output iMelody file. Some terminals recognize “;" character and other don't.
Applicable to: IMELODY


FREQUENCY-4000 – Set sampling rate
FREQUENCY-8000
FREQUENCY-11025
FREQUENCY-16000
FREQUENCY-22050
FREQUENCY-24000
FREQUENCY-44100
FREQUENCY-48000
Applicable to: WAVE,AAC,MP3


8-BITS – Set bit depth (number of bits per sample)
16-BITS
Applicable to: WAVE


IMA-ADPCM, ALAW, ULAW, G726 – sound encoding methods
Applicable to: WAVE, AU (except for IMA-ADPCM)


Bitrate options:


8 – 8 kbps
16 – 16 kbps
24 – 24 kbps
32 – 32 kbps
40 – 40 kbps
48 – 48 kbps
56 – 56 kbps
64 – 64 kbps
80 – 80 kbps
96 – 96 kbps
112 – 112 kbps
128 – 128 kbps
144 – 144 kbps
160 – 160 kbps
Applicable to: MP3, AAC


MR475 – 4.75 kbps
MR515 – 5.15 kbps
MR59 – 5.9 kbps
MR67 – 6.7 kbps
MR74 – 7.4 kbps
MR795 – 7.95 kbps
MR102 – 10.2 kbps
MR122 – 12.2 kbps
Applicable to: AMR NB


WB_MR66 – 6.60 kbps
WB_MR885 – 8.85 kbps
WB_MR1265 – 12.65 kbps
WB_MR1425 – 14.25 kbps
WB_MR1585 – 15.85 kbps
WB_MR1825 – 18.25 kbps
WB_MR1985 – 19.85 kbps
WB_MR2305 – 23.05 kbps
WB_MR2385 – 23.85 kbps
Applicable to: AMR WB


CMX1X – CMX v1.x
CMX2X – CMX v2.x
CMX30 – CMX v3.0
CMX31 – CMX v3.1
CMX40 – CMX v4.0
CMX41 – CMX v4.1
CMX43 – CMX v4.3
Applicable to: CMX


SCKL – Append Nokia text header and port to the message in hex format.
Applicable to: NOKIATXT


Options can be mixed, for example, you can choose to set the SCALE-ALWAYS option for your IMelody ringtone, but at the same time to reduce it's size using COMPACT and FIND-CYCLES option. Options are separated with a single space:
SCALE-ALWAYS COMPACT FIND-CYCLES

outformat The format you need to convert your ringtone to. Takes one of the following values:
MIDI 0 – MIDI 0
MIDI 1 – MIDI 1
MIDI SP – SP-MIDI
SMAF MA1 – SMAF MA-1
SMAF MA2 – SMAF MA-2
SMAF MA3 – SMAF MA-3
IMELODY – IMelody 1.2
IMELODY 10 – IMelody 1.0
EMELODY – Emelody
RTTTL – RTTTL, RTX 
SAGEM – Sagem Proprietary
NOKIA – Nokia Smart Messaging (8 bit; binary)
NOKIATXT – Nokia Smart Messaging (7 bit; text)
WAVE – WAVE
AMR – AMR NB 
AMR-WB – AMR WB 
MP3 – MP3
AU – AU 
AIFF – AIFF
AAC – AAC
CMX – Qualcomm CMX
QCP – Qualcomm QCELP
MFI – NTT DoCoMo MFi (*)
actions

this parameter is very important as it allows performing modifications to the ringtones and retrieving extra information. The list of modifying actions follows:


TP – truncate maximum instant polyphony of a ringtone. For example, you may get a 16-channel file with instant polyphony of 4.
Example: TP4


TC truncate the number of channels in a polyphonic ringtone. For example, if a recipient's phone supports only 4 channels and the source ringtone contains 14 channels, you will have to perform this operation.
Example: TC4
TC1 produces a monophonic ringtone.


Truncate Channels and Truncate Polyphony should always come in pair and in the following order: TC first and then TP.


SN – set the song name. Long names are allowed, but be aware that some phones have certain limitations on the length of the song name. For example, it's a really bad practice to give a monophonic song a name longer than 15 characters.
Example: SNMy Muzikk


LT – limit the duration of a ringtone to fit or to get as close as possible to the given number of milliseconds. For polyphonic ringtones, it affects all channels.
Example: LT30000
This instruction sets a limit of 30 seconds.
It is also possible to extract middle part of the melody. In this case you need to specify start point and end point in milliseconds delimited by the colon. You can also omit any of the points. If start point is omitted the melody is extracted from the beginning. If end point is omitted the melody is extracted up to the end.
Examples: LT10000:20000 extracts melody from 10th to 20th second, LT10000: extracts melody from 10th second up to the end


LI – limit the number of notes in a ringtone. With polyphonic ringtones, it first modifies the leading track and then all other tracks accordingly.
Example: LI20
set the number of notes to 20.


LS – set the maximum file size of a resulting ringtone. Extremely useful when you deal with ringtones transmitted over SMS.
Example: LS128
ensure that the output ringtone size will not exceed 128 bytes.


VO – adjust the relative volume of a ringtone. Byte. Takes a value in a range of -127 to +127. -127 means silence and +127 – maximum loudness.
Example: VO30
increase the volume by 30 volume units (100% is 127 units)


GD0 – get duration of a ringtone. The important thing to know is that this method returns just the result code + status code + duration of a ringtone (in ms). All other processing parameters are ignored if this parameter is specified.
Example: GD0


FT – adds fade out effect to silence during last milliseconds
Example: FT1000
Explanation: Output ringtone will have fade out effect to silence during last 1 second


FI – adds fade in effect to volume of ringtone in time specified as parameter during first milliseconds
Example: FI2000
Explanation: Output ringtone will have fade in effect to volume of ringtone in 2nd second during first 2 seconds


Actions can be combined using a pipe sign like this: TC4|TP4|LS16384


There's one more inquiry operation available in Ringtone Creator Server:
SAMPLE=n. Get the n-th PCM sample from the given ringtone.


General considerations:


– Spaces are not allowed between instructions.
– All parameter values must be URL encoded (in Java it's called URLEncode and is shown in the example available for download from http://www.ringtonecreator.info).


(*) MFi support is in early beta. Please don't use this format in production!


 
There are no files on this page. [Display files/form]
There is no comment on this page. [Display comments/form]