MIDI Converted RTX Ringtone File Specifications v0.3 (first revision)
(compliant with the RTX Ringtone specification v0.1)

1. Header Chunk

The Standard “Header Chunk” for a midi file begins with the hexidecimal codes:

3d 54 68 64 00 00 00 06 ff ff nn nn dd dd

The ascii equivalent of the first 4 bytes is “MThd” .. After the “MThd” comes the 4-byte size of the header. This will always be 00 00 00 06, because the actual header information will always be 6 bytes.

ff ff is the file format. This value will always be equal to 00 00.

nn nn is the number of tracks in the midi file. This value will always be equal to 00 01.

dd dd is the number of delta-time ticks per quarter note. This will always be equal to 00 60.

So the standard “Header Chunk” will always be the following:

3d 54 68 64 00 00 00 06 00 00 00 01 00 60

This will always appear at the beginning of every translated MIDI file from RTX to MIDI.

2. Translating the control section of an RTX file.

Information from the control section of a standard RTX file will be held in the “Track Chunk” of the MIDI file. The beginning of the “Track Chunk” will always begin with the following:

4d 54 72 6b

The ascii equivalent of the first 4 bytes is “MTrk”.

Following the “MTrk” is a four byte section the is equal to the length of the track.

ll ll ll ll

It would most likely be easiest to calculate this value last and insert it after the rest of the track has been formulated, as the length of the track will be dependant on how long the song itself lasts.

Following the length property is the delta-time. This value for all intents and purposes should be equal to zero, unless a slight delay before the beginning of the song is desired. It is a variable length property, but it requires at least one byte of information to be present if no delta-time is required.