
   NAME: rtttl2nokia, imelody2nokia, nokia_icon, bmp2nokia_icon, midi2rtttl
 AUTHOR: Michael Kohn
  EMAIL: mike@naken.cc
    WEB: http://nakentone.naken.cc/
HOMPAGE: http://www.mikekohn.net/
PURPOSE: Convert your rtttl song files to nokia binary format.
         Convert your imelody (Ericsson's ringtone format) to nokia.
         Create nokia graphical icons (CLI Logos and Operator Logos)

-------------------------------------------------------------------

NOTE:  For most up to date docs please read: 
       http://nakentone.naken.cc/tools.php

       I don't always update this file very well

-------------------------------------------------------------------

rtttl2nokia

Usage: rtttl2nokia [options ] <input filename>
       -o [ Make song 1 octave higher ]
       -x [ remove //SCKL header ]
       -u [ only user-data-header (8bit) ]
       -k [ include user-data-header and //SCKL ]
       -r [ Set A440 as octave 4 (rtttl spec is octave 5) ]
       -s <sms size>  [ Maximum size of SMS message (default 140) ]
       -v <volume>    [ (1 to 15) (default 7) ]

Example: 

rtttl2nokia yngwie.rtttl
rtttl2nokia -o yngwie.rtttl

rtttl is a popular format for ringtones. If I get time 
I'll post a link to some pages with rtttl ringtones on them. 
Note that I've seen some rtttl format songs written by people 
that sound nothing like the original song, so if the ringtone 
sounds like a turd it might not be rtttl2nokia's fault.

The -r option exists because from the rtx spec I read the A440 
note is 4a while in the rtttl spec A440 is a 5a. I'm pretty sure
the rtx spec is a misprint (if it's not a misprint then whoever 
did that spec should be shot and it's a sloppy format that 
shouldn't be used). Anyway :).

-------------------------------------------------------------------

imelody2nokia

Usage: imelody2nokia [ options ] <input filename>
       -o [ Make song 1 octave higher ]
       -x [ remove //SCKL header ]
       -u [ only user-data-header (8bit) ]
       -k [ include user-data-header and //SCKL ]
       -s <sms size> [ Maximum size of SMS message (default 140)]
       -t <tempo (default: 140)>
       -a [force imelody2nokia to ignore @'s in song]

Example:

imelody2nokia usa.imelody
imelody2nokia -t 160 usa.imelody
imelody2nokia -t 160 -a usa.ems

NOTE: the -a option is because... hmmm... well, according to the
      Ericsson docs the @ symbol means nothing.  But a couple sample
      songs I downloaded had @ symbols in them so I assumed @ means
      to flat the note.  On the two songs I had that had @ symbols
      flattening the note made one song play correctly and the other
      not.  So just experiment with -a if the song sounds funky :)

-------------------------------------------------------------------

nokia_icon

Usage: nokia_icon [ options ] <input filename>
       -s <sms size> [ Maximum size of SMS message (default 140)
       -x [ remove //SCKL header ]
       -u [ only user-data-header (8bit) ]
       -k [ include user-data-header and //SCKL ]
       -w <width> [ Width of Logo (default 72) ]
       -h <height> [ Height of Logo (default 14) ]
       -l <MCC> <MNC> [ Operator Logo (requires MCC and MNC) ]

The input file must be in a text format where any space in
the file considers the pixel off and any kind of character
considers the pixel on.  For example:

             ************
            *            *
            *   *    *   *
            *      *     *
            *            *
            *    ******  *
            *            *
             ************

This would draw a face (DUH).  I'm not sure how width and height
work, but I believe there are limits.  A height of 28 pixels is
the max and 72 pixels the max width I believe, but I could be wrong.

-------------------------------------------------------------------

bmp2nokia_icon

Usage: bmp2nokia_icon [ options ] <input filename>
       -s <sms size> [ Maximum size of SMS message (default 140)
       -x [ exclude //SCKL header ]
       -u [ only user-data-header (8bit) ]
       -k [ include user-data-header and //SCKL ]
       -r [ reverse black n white ]
       -w <width> [ Width of Logo (default 72) ]
       -h <height> [ Height of Logo (default 14) ]
       -l <MCC> <MNC> [ Operator Logo (requires MCC and MNC) ]
       -m <message> Send a picture message
       -ss Send as screensaver

Everything is the same as nokia_icon except it converts bmp files
to ringtone codes.  The -r option will reverse the colors.

-------------------------------------------------------------------

Usage: midi2rtttl [ options ] <input filename>
     -c [ channel <default 0> ]
     -t [ track <default all> ]
     -o [ output filename ]
     -n [ name of song ]

This program is still very beta.

-------------------------------------------------------------------

Simply take the output and SMS it to your phone.  

Phones that work:
Nokia 3360 (TDMA)
Nokia 6210 (GSM)
Nokia 7160 (TDMA)
Nokia 8260 (TDMA)
Nokia 8290

Providers that work:
Cingular (St. Louis)
AT&T (Nation Wide)
TELE2 (Estonia aka. Kidneystonia)

Phones that don't work:
Nokia 5185i

Notes:

The -x option can be used to remove all headers.
The -u option is for sending user-data-header (8 bit tones need this I think)
The -k option will send SCKL and the user-data-header

I tested these programs on my Nokia 7160, and had some issues.
The scale 0 and scale 1 are the same notes!  I have no idea why.
This appears to be a problem on all the Nokia phones I've tested.
Anyway, I added a -o option to make the song 1 octave higher 
incase your phone has the same problem mine has (C at octave 0 
being the same as C at octave 1).





