Game Audio: Creating a Realistic Rate of Fire for Automatic Weapons Using Logic

From Halo to Call of Duty, shooters are a popular genre of video game. David Earl takes to the battlefield and uses Logic Pro to create realistic automatic gun effects.  

Never thought that Logic and automatic weapons had something in common, did you? I’ve had the pleasure of working on sound design for some games and various other media in the past. Friends of mine think that I’m crazy for using Logic, (Pro Tools through and through for most sound designers), but I have some tricks up my sleeve that even they reluctantly dig.


Automatic weapons in games

Implementing audio for weapons in video games is done in a myriad of ways. In this technique, we are going to focus on a 3-stage automatic weapon design. The weapon will have a ‘ramp up’ stage, a ‘loop’ stage, and a ‘ramp down’ stage. The ‘Ramp up’ is when the player presses their fire button. The ‘Loop’ sound happens for the duration that the player holds down the fire button. The ‘Ramp Down’ happens when the player lets go. 

When firing an automatic rifle, the ramp up can be very small. The ramp down may just be a natural release. Longer ramps are needed when the weapon is larger. Very large ride-on weapons usually have this kind of behavior.


What kind of weapon are we dealing with?

We are going to pretend that we just got the job to create sci-fi weapons. Usually the game developer will provide a quicktime movie to get an idea of what a weapon looks like and how it behaves. Down the road, we may have a development unit that will show us a build of the game running with our sound banks installed. For now, we are just going to focus on timing our weapon to a movie.

It’s important to consider the size, shape, and caliber of the weapon before starting. The more input you get from the developer the better. Many developers will design weapons that are based off of existing weapons, and that can put us quickly in the right direction. Others will leave it up to us. In this case, we are working with a pretty standard assault rifle.


Rate of fire - why is it important?

Many rookies will play a movie frame-by-frame, and assign an individual burst of gunfire to each muzzle flash they see on screen. They’ll spend 30 minutes painstakingly assigning the sounds, only to find that when they are done, the gun sounds like it’s a stammering, stuttering idiot of a weapon. This is because the weapon does not have a realistic rate of fire. Our eyes and ears will forgive us if the sounds of a weapon firing are ever-so-slightly off from what we are seeing. The important thing it to emulate the mechanical, predictable rate of fire of an automatic weapon. 

In this case, we are going to model our weapon’s rate of fire after an M16 assault rifle.


Finding the right weapon

Ok, first we need a nice, relatively clean recording of an M16. Use this address to download a free sample:

http://www.freesound.org/people/Julien%20Nicolas/sounds/133799

Pic 1


(I can’t use my personal library for legal reasons, but this is a great site!)


Now we can begin!


Step 1 - Starting off

Open Logic, and Save As... from a blank template

Make sure to include your EXS instrument and sample files!


Step 2 - Import the M16 audio file into the arrange window

Importing by dragging the file into the arrange window should work just fine. The Sample is at 48 kHz Sample Rate, which is pretty standard for working in games, (at least in the beginning.. it may get squashed into a lower sample rate later).

Pic 2.


Step 3 - Strip Silence

Select the region in the Arrange window, and select ‘Strip Silence’ from the ‘audio’ drop-down menu.

Pic 3.


We need to select an amplitude threshold that most accurately captures the individual shots of the instrument. Try 46% to Start.

This is pretty draconian as far as amplitude goes, but we can stretch out the individual regions once they are pulled out. We are trying to find the highest transients, and get rid of the ambience for now.


Step 4 - Choose the loop and create a sampler instrument

Find the set of regions that is closest to continuous fire. The area between Bar 1 and 1.3 seems like it might be best. Select them, and choose ‘Set locators by regions’

My favorite key command! Use Command+E, or under the audio menu choose ‘Convert to Sampler track’. When the option to use regions or transient markers pops up, select ‘regions’. Choose your keyboard range, and name the instrument ‘M16_rate_of_fire’

Cut out unnecessary MIDI notes in the Piano Roll editor to get the triggers dead on.


Step 5 - Replace the samples

Open the EXS Sample Editor. Now we can add our own sounds in place of the M16 samples. First use this single shot:

http://www.freesound.org/people/GoodSoundForYou/sounds/138583/

Pic 4.


...and add it to the EXS by dragging it in. Delete all of the other ones in the EXS, and turn the pitch of this new sample off. Turn ‘one shot’ on. 


Step 6 - Layer new sounds

Now we can start adding other sounds to our instrument. I have weird genius friends that will layer anything from pig squeals to lightning to air hammers into their instruments. Feel free to experiment by repeating the step above.


Step  7 - Use the MIDI to trigger another instrument

I love the ESP, So I’ll use the MIDI from the EXS instrument to trigger the ESP, which I will have set to only the noise oscillator. Feel free to use a synth of your choise to add a bit more sci-fi to the mix. You can also change the notes of the copied MIDI region so that they all play the same pitch.

Now it’s all lazer-y. Cheesy, but effective.


Step 8 - Shells

If the weapon used is ejecting spent cartridges, Create another EXS24 instrument that is made up of only shell casings. Use the MIDI from our rate-of-fire instrument to get the speed of the shells as they impact the ground. Offset the shells slightly from the weapon fire. Turn them down so they do not distract.

Pic 5.



Step 9 - Speed up, loop, and slowdown

Now we can Bounce this conglomeration in place if we like, saving the session for edits later. Bounce all of the regions in place together and call the file ‘loop_end’. In the sample editor, select the area to loop, and under the edit menu choose ‘selection to sample loop’. Now we have a file that will loop until it is released, which will then die out.

Now if we need a ramp up and down rate of fire, we can copy the regions further into the session and use tempo changes to create a rate of fire that speeds up and slows down.

In the session I have provided, There are examples of the audio files for ramp in, loop, and ramp out.

Rate of Fire

Have a blast with this! 


Pic 6.





David writes music for all media including advertising, branding, movies, television, and games. He works for such clients as Sega, LucasArts, Microsoft Game Studios, Landor and Associates, Beyond Pix, Rich Pageant, and Nextel. He also teaches at an Apple Certified training facility in San Francisco called Pyramind and has long bee... Read More

Discussion

Want to join the discussion?

Create an account or login to get started!