Creating Sounds

Most sound effects start with a natural recorded sound and then are edited to add effects. For example, in the original Star Wars movie, the engine sound of one of the starships was the sound of a lion roar played backward. Start with an organic sound of things around you, such as a car starting, a door shutting, someone sneezing, or a bathtub draining. When recording, be sure not to record at too high of a level, or the sound will clip and sound distorted. Try to record at a good midrange level—not too loud and not too quiet. Also, make use of a noise-reduction filter using your sound tool. This will help eliminate background noises and make up for cheap, lo-fi microphones. When you've got your recorded sound, apply filters and effects to make the sound interesting, or try combining two or more separate organic sounds. You'll probably want to avoid "fake" sounds, such as a sound effect that is obviously a person trying to imitate a gunfire noise. Remember, in many sound tools, filters are "destructive," meaning the audio samples themselves are modified. Keep a copy of the original sound, in case you've applied so many filters that you need to revert back to it. Of course, sound effects don't have to originate from an organic, recorded sound. You can also use waveform generation in many sound tools to create artificial sounds. Finally, make sure your sounds start and end with zero amplitude to eliminate popping, as in Screenshot. Don't add too much of a delay at the beginning, though, or there will be a longer delay before your sound is heard.

Screenshot Make sure the sounds start and end with zero amplitude.

Java graphics 17fig02.gif


Here are a few examples of how sounds were created for this tutorial:

  • In , the "boop" sound was a recording of me opening a mailing tube.
  • Also in , the "fly buzz" sound was me imitating a fly, with the pitch turned up a little.
  • In , "Creating a 2D Platform Game," the "prize" sound was completely generated in software using waveforms and effects.

Another good example of creating sound effects is from one of the first Java games I created, a 3D first-person shooter called Scared. This was a standard first-person shooter in which the player runs around a maze, opening doors, finding keys, and advancing to the next level. Here are a few examples from that game:

  • The door closing is a recording of my old door closing with extra bass.
  • The laser guns are a recording of me imitating a laser gun, but with the pitch and everything else messed with.
  • The player "grunt" and "die" sounds are recordings of me grunting and (dramatically) dying.
  • The "growl" of the power generator is a recording of my old window air-conditioning unit with extra bass.
  • The "swoosh" sound of an opening door is a recording of me opening a 20 oz bottle of Dr Pepper.
  • The "shh-click" sound when the player picks up a key is a recording of me opening a 12 oz can of Dr Pepper played backward.
  • The "crunch" sound played when an enemy is destroyed is a recording of me crunching a 12 oz can of Dr Pepper in a can cruncher.

Come to think about it, most of the sounds for that game were inspired by Dr Pepper.

Sound File Formats

We discussed sound file formats back in , but we rehash this topic a bit here. Basically, the Java Sound API can read three formats: AIFF, AU, and WAV. Additionally, you can install other format readers from third parties, such as an OGG decoder. For the tutorial, we used 16-bit, mono, 44,100Hz WAV files, which is CD quality, but mono instead of stereo.



   
Comments