Header Sep
Latest News
My Rating Score
Login to rate page

March 23, 2007
New tutorial, creating game music for Java ME phones

[Back]

 

Adding to our developer tutorial series, the new "Creating game music and sound for Sony Ericsson phones" tutorial describes how to make music optimized for the Java ME CLDC platform.

Authored by computer scientist and musician Roald Strauss, also known as Mr Lou/Dewfall Productions, this tutorial introduces the subject area of music and sound in mobile gaming, gives an overview of the MIDI file format and MIDI creation tools, and using an arcade-style Java ME game example, guides you through how to create and use an accompanying MIDI track.  

Download creating game music and sound tutorial>>

Here's an overview:

Music and sound in gaming
On top of game play and graphics, there is a third variable which plays an important role in gaming: music and sound. Music and sound make it easy to add twists and variation and can change the mood of the player while still keeping the fundamental game style, helping engage the player in the game.

When developing for the Java ME platform, it is important to keep file size and memory usage to a minimum, and to support as many different mobile phones as possible. A game file size of 200kb is considered to be quite large for the platform and many developers try to keep their games below 100kb, Music and sounds are obvious candidates when it comes to reducing file size.

MIDI file format background
MIDI files contain, in contrast to sampled audio files such as WAV, MP3 and AMR, a note-by-note description of how a piece of music should be played. There is no audio data present in a MIDI file, only a definition. The actual audio data is present in a soundbank on the mobile phone used for playback. This makes the MIDI format very attractive for Java ME CLDC content as it simply serves as a reference to resources stored on the phone, giving the potential for very small music file sizes.

Roald Strauss explains that in this tutorial the focus is on the Standard MIDI File format (SMF) as all modern phones support this format and as it has been around since 1991, there is a large number of composing tools available. He then presents an overview of:

  • MIDI channels
  • Instrument and percussion maps
  • Effects
  • MIDI creation tools

This information is taken a step further by giving tips on file size management, polyphony support on mobile phones, things to remember when composing for the Java ME platform and special effects options.

Tutorial example: creating MIDI music for a Java ME game
Putting all this information into practice, Roald Strauss then gives you an example to try. Sort'em is a Java ME arcade-style game developed by LuBlu Entertainment and is used here as a step-by-step walk through of the processes involved in creating music for a Java ME game.

The steps involved in creating a MIDI track are:

  • Creating an instrument
  • Making music
  • Exporting the track to MIDI
  • Playing MIDI in the game using a Player object implemented from JSR 135, the Mobile Media API (MMAPI)

 

 Sort'em by LuBlu Entertainment.


 Other tutorials currently available include:

If you have a suggestion for another tutorial subject area, please login and add your idea to the "Add comment" option at the end of this article.

More information:

 

My Rating Score
Login to rate page