Game Development Reference
In-Depth Information
other two close to when the
Play
and
Settings
buttons start to appear. Refer to
Figure 11-4
for the final result.
To actually have the keyframes play back a sound effect, you have to double-click each
one to edit the keyframe's properties. The popover menu is shown in
Figure 11-3
.
From
the popover menu, select an audio file. The leftmost keyframe should use the
Audio/
splat2.wav
file, while the other two keyframes should use
Audio/splat3.wav
.
Figure 11-3
.
Assigning an audio file to a Sound effects keyframe
Feel free to play with the
Pitch
,
Pan
, and
Gain
settings. A pitch of 1.0 means the audio
file will be played back at its original pitch (frequency). Choose a value between 0.01 and
1.0 to lower the sound's pitch, which will also increase its duration. Use a value above 1.0
to increase the pitch and shorten its duration. A pitch of 2.0 will play back the effect at
twice its original speed.
Pan is in the range of -1.0 and 1.0, where -1.0 plays the sound effect entirely on the left
speaker and 1.0 plays it only on the right speaker. The default panning value of 0.0 plays
the sound equally on both speakers. Panning has no effect on stereo files; only mono au-
dio files can be panned.
The
Gain
setting increases the sound's volume. It's not quite the same as volume though.
If you increase
Gain
by too much, it will add distortion to the sound. But, generally, it can
be used to level out some sounds that would otherwise be 10 to 20% quieter or louder than
other sounds. A value of 1.0 means the volume is unchanged. Lower values reduce the
volume, while higher values increase it.
Once you've moved the keyframes to the desired locations and assigned the audio files,
the result will resemble
Figure 11-4
.
Notice that the audio file waveforms may run past
the end of the Timeline, indicating that the audio plays longer than the Timeline. Whether
this is or isn't a problem depends on the situation. Here it doesn't matter.
Search WWH ::
Custom Search