3. HTTP POST Parameters
3.1. HTTP POST Basics
HTTP POST method is a convenient means for uploading large volumes of
data to a server. Unlike HTTP GET, you are no longer limited with 2048
bytes, which is ridiculously small figure compared with the average size
of a ringtone. Fortunately (
and mostly because we DO know about all
possible limitations you may encounter),
Ringtone Creator Server
handles POST requests, so you're free to rely on its capabilities to handle
really large files. (
Another question is if you want to handle large
files, but this discussion goes a bit beyond the scope of this document).
3.2. Using Ringtone Creator Server
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 |
SMAF (MMF) files |
| .rtttl, .rtx, .txt |
RTTTL files |
| .imy |
IMelody files |
| .emy |
Emelody files |
| .sagem |
Sagem mono files |
| .imy |
IMelody 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 |
|
|
| 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 |
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 |
| AMR-WB |
AMR WB |
| AU |
AU |
| AIFF |
AIFF |
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-CYCLES |
Ringtone 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.
Applicable to: IMELODY, IMELODY 10,
NOKIA, NOKIATXT.
|
| COMPACT |
Ringtone 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.
|
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 |
|
|
| 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.
|
| 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
|
|
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).
Introduction
-
Table of Contents
-
Output Codes
©
Unwiredtec, Inc. and affiliates 1999-2005, All rights reserved.