Home > Articles > Networking > Wireless/High Speed/Optical

  • Print
  • + Share This
Like this article? We recommend

Making a Custom Ring Tone

You now have the knowledge to create a custom ring tone using RTTTL. You know the format for creating notes; now it's just a matter of stitching the notes together into a melody. The only question that remains is what melody you're going to create.

This is where the fun comes in!

Using the RTTTL Player

To help you learn to write RTTTL melodies, I created a Java application using the Wireless Toolkit. The application is called RTTTL Player, and is available in a zip file that you can download from my web site.

This section shows you how to use the RTTTL Player to play your melodies after you create them. You need to put your RTTTL files on a web server—either one on the Internet or running on your desktop computer under Localhost. The RTTTL player is hard-coded to get files from an HTTP URL.

CAUTION

The RTTTL format is fairly strict. For example, using an octave indicator on a pause will cause an error, as will misplacing the period when trying to write a dotted rhythm in a duration-pitch-octave group (both of which I've done many times). Pay attention to the details of the format. The best thing to do is to download one of the sample files that I provide for this article and dabble with the existing melody to get new variations. With a little trial-and-error you'll come up with interesting music. Once you get a solid understanding of the format, you'll create ring tones that will amaze your friends and impress your in-laws.

Installing the RTTTL Player

Typically, the Java Wireless Toolkit installs by default into the directory C:\WTK20 on a Windows system. The Toolkit installs a subfolder (C:\WTK20\APPS) containing the sample apps that ship with it. After you download the zip file, follow these steps:

  1. Extract the zip file into a folder called C:\WTK20\APPS\RTTTLPlayer.

  2. TIP

    If you use the Extract to Here option in WinZip, the program will create the RTTTL folder for you automatically, as shown in Figure 17.

    Figure 17Figure 17 Extracting the RTTTL Player.

  3. The zip file contains two files, RTTTLPlayer.jar and RTTTLPlayer.jad, which will be copied into the C:\WTK20\APPS\RTTTLPlayer folder. After extracting the files, invoke the Run MIDP Application utility that ships with the Wireless Toolkit. (It's located in the J2ME program group by default, as shown in Figure 18.)

  4. Figure 18Figure 18 Running the MIDP application.

  5. This Java application takes a few moments to get up and running. When you invoke the application, it opens a file-browsing dialog box that points to the Wireless Toolkit folder. Navigate to \WTK20\apps\RTTTLPlayer (see Figure 19).

  6. Figure 19Figure 19 Navigating to the RTTTLPlayer folder.

  7. Select the Java description file RTTTLPlayer.jad and click the Run button (see Figure 20).

  8. Figure 20Figure 20 Selecting the Java description file.

    If the toolkit has been installed properly and the RTTTLPlayer files have been extracted correctly, the Wireless Toolkit cell phone emulator will open, showing the RTTTL Player app as an item in the cell phone's launch list, as shown in Figure 21. Click the Launch button on the emulator. This button is at the right of the cell phone, above the keypad. This will invoke the RTTTL Player in the emulator.

    Figure 21Figure 21 Click the Launch button to start the RTTTLPlayer.

  9. Now all you need to do is enter a URL for an RTTTL file (see Figure 22).

  10. TIP

    Don't try to cut-and-paste the URL. The cell phone emulator doesn't respect the Windows cut-and-paste functionality. You must enter URLs directly using your computer's keyboard or by using your mouse to click keys on the keypad; the text-entry technique that's commonly used on a cell phone allows one numeric key to accommodate up to three alphabetic characters.

    Figure 22Figure 22 Enter the URL for the RTTTL file you want.

Using the Sample Files

I've created many sample files that illustrate all the points that I've covered in this article. The individual files are listed below; if you prefer, you can download all the RTTTL files created for this article.

After you feel comfortable working with the sample files that I've provided, you can make your own RTTTL files and run them under a web server on the Internet or on your local computer. All you need to do is put the files in a place where the RTTTL Player can find them via a URL that you enter into the cell phone emulator.

  • + Share This
  • 🔖 Save To Your Account