Chapter 6: Adding Sound to the Bouncing Ball

Basic Sounds

Adding sounds to a movie requires several parts: adding a sound Attribute, mixing the sound track with the movie, and turning on the speaker control (to hear the sound in the Active Camera window.)

To add sound to a movie, go to the time frame where you want the sound to start. Choose the desired sound from the Sound list item in the Attributes box. Then drag the sound item into the object's property box.
Note: Attributes added at other times will not show up in the current time frame.

For the bouncing ball, the Script window indicates a series of green circles where the ball contacts the floor. (See Chapter 5: Adding Collisions) Place the time indicator at the time of one of the circles (image 6-1 shows the first bounce at 1.02 seconds) and open the object's properties box. When the properties box is closed, the green circle in the Script window will become a red square indicating the addition of an Attribute.

Sound attributes and ball information 
boxes.
Figure 6-1. This image shows the Attributes box with the Sound options. I have placed a Sound item called "Drum Thump" in the Blue Ball's properties box.

Next, the sound needs to be incorporated into the movie. This is accomplished by choosing the "Mix Sound Tracks" item from the Action menu. A progress box will then briefly appear on the screen adding the sound to the movie. You will need to Mix the Sound Tracks before playing the movie so that the new changes can be incorporated.

Finally, to listen to the new sounds in the Active Camera window, there is a control that turns on and off the speakers. Click on the button between the speakers to toggle them. When on, there will be sound indicators as shown in figure 6-2. Clicking on a speaker will toggle only that one (left or right.)

Sound attributes and ball information 
boxes.
Figure 6-2. To listen to the sounds in the Active Camera movie preview, turn the speakers on.

Simple Stereo Control

3DJoy has the capability to produce and control stereo sounds. The simplest way to provide basic control over how a sound is played is to click on the sound item Attribute in the object's properties box. A dialog box appears (figure 6-3) allows you to listen to the sound and to control which speaker the sound is played through via a pull down menu. The options are: Mono (both speakers), Stereo left (left speaker), and Stereo right (right speaker). Additionally, there is a Volume box so you can adjust the sound intensity. A sound played at a later time can have different speaker and volume settings from the same sound played at an earlier time.

Sound dialog box.
Figure 6-3. Adjust a sound's properties from it's dialog box. Call the box by clicking on the sound Attribute icon in an object's properties box.

Advanced stereo techniques involve using microphones to simulate "ears." This is an advanced topic and will not be covered here. See the 3DJoy manual for information about using microphones to control sounds.

Once the all the sounds are how you want them (Mix the Sounds and play in the Active Camera window,) you can generate the fully rendered movie with sound by clicking on the Movie Camera icon. When saving the movie, make sure that the dialog box contains Mixed Audio, and the sound quality that you want (higher sound quality increases the movie file size.)

Save dialog box.
Figure 6-4. Make sure there is sound in the final movie.

Here is a movie of the ball bouncing with sound. Note how the three bounce sounds are different. The movie's file size is 1.2 MB.


Next: Adding More Balls

Last: Bounce a Ball

Back to the index.

©1999 Steven Sahyun - sahyuns@ucs.orst.edu