Back
Last update: 2024-10-30
FMOD
While Wwise has a wealth of on-line self-teaching resources, FMOD information isn't quite consistent. I really like the way information is presented in the Wwise Certification online lessons, so I've created some lessons in the same style to learn FMOD. I've also splitted them in two lesson sets, 101 and 201 following the Wwise style, being the 101 about sound design and basic concepts, and focusing on interactive music in the 201.
Index
We need a game to try the FMOD integration, so I've adapted Unreal's ShooterGame sample to used FMOD. This way we'll only focus on using FMOD Studio. You can download the modified Unreal projects here:
We'll also need FMOD Studio 2.2 and Unreal 5.1, you can grab them from FMOD's site and the Unreal Engine's site respectively (with Unreal you have to download the Epic Games Launcher and then download Unreal Engine from the Unreal Engine / Library section). Please, note that you'll need an FMOD account and an Epic Games account in order to download them both.
Play the game first to familiarize yourself with it. You can move using the ASDW keys, fire your current weapon with the left mouse button, jump with the space bar, run by holding the Shift key and aim with the right mouse button and change your weapon using the mouse wheel. This version only features the Highrise level.
In order to recreate the game sound in FMOD, you'll need to delete the original soundbanks, which are located at the ShooterGame FMOD\Content\FMOD\Desktop folder. You'll also need the course files you can dowlonad here:
You’ll begin by creating a new FMOD project. FMOD projects are not a single file, but a folder with a number of sub folders that collectively contain the various resource files needed to carry out the instructions of how you’ve integrated sound into a game.
- Launch FMOD Studio. FMOD will show us a Welcome Pop-Up asking whether we want to create a New project or open an existing one.
- In the lower-right corner of the Welcome Pop-Up, click New Project.
- You now see the FMOD software interface.
- Now we'll create our first event to add a sound when firing the assault rifle. Right-click the empty space within the Events tab and choose New Event > New 2D Timeline.
- We've got to name this event according to the game call. The name for the assault rifle shoot should be "Assault Rifle Shoot".
- Event paths are critical in FMOD, they're used alongside the name to indentify the event. In this case, the game will be looking for the event Weapons/Assault Rifle/Assault Rifle Shoot. Create the Weapons and Assault Rifle folders and drag the event in.
- We can see the new Timeline for this event. Here we can add the audio we want to play for this event.
- You'll find an appropiate shot sample within the Lesson 1 > Audio files folder. Drag the file to the Timeline. This will create a Single Instrument into the Timeline.
- Now we need to assign the event to the appropriate soundbank. The #unassigned tag at the right of the event name tells us it hasn't been assigned to any soundbank so far. As we're using a simple single-map game, all sound will be loaded from the Master soundbank which is created by default. Right-click the event and choose Assign to Bank > Browse then click the Master soundbank.
- We can click the Banks tab and unfold the Master soundbank. We'll see the event we've just assigned inside.
- In order to generate the new soundbank for the game, we'll setup the output folder first. Click the Edit option in the main menu and choose Preferences...
- The preferences window will open. Click the Build tab.
- Now click Browse and find the ShooterGame FMOD/Content/FMOD folder.
- We can build the soundbank for our game in the right folder. Click the File option in the main menu and choose Build or press the F7 key. The process will be fast at this point, as there's only a single small sound in the soundbank.
- A window will temporally appear while building the soundbank. Now we can swap to the Unreal editor and run the game to listen to our new shoot sound! (Note: you might get some errors due to the other FMOD events in the game missing, but you can just skip them)
Lesson 2: Using FMOD Sound Tools
Now we're going to add some additional sounds and introduce some FMOD tools for making sound richer.
- Open the project from the lessons folder or continue from the project you created in the previous lesson. We're going to create a sound for the weapon change action triggered with the Mouse Wheel. Right-click the Weapons folder at the Events tab and choose New Event > New 2D Timeline.
- We'll name this event Weapon Equip.
- Find the Weapon Equip samples within the Lesson 2 > Audio files folder and drag all them to the Timeline. This will create a Multi Instrument into the Timeline.
- Multi Instruments are Playlists. You can take a look at the Playlist and the options in the Multi Instrument panel right at the bottom. We can choose diferent play modes: Shuffle, Randomize, Sequential - Local Scope and Sequential - Global Scope. Play the event and try the different modes. Finally set a random mode (Shuffler or Randomize).
- For random modes we can also modify the probability for each sample by setting their Play Percentage value.
- We can also see the Timeline clips clearer by zooming it in. Hold the Alt key while moving the Mouse Wheel to change the time scale and ajust the view.
- Another powerful tool we can find in FMOD is the modulation. Choose the Multi Instrument, now right-click over the volume knob and choose Add Modulation > Random.
- This will add a Random section on the right. You can now set a modulation range in dB so each time the Multi Instrument is played, it will play with a slightly different volume within the specified range.
- We can do the same with the Pitch property. Right-click over the volume knob and choose Add Modulation > Random.
- This will add another knob to the Random section on the right. You can set a pitch variation range in semitones, the Multi Instrument is played, it will play with a slightly different pitch within the specified range.
Lesson 3: Connecting Game Parameters
Some game parameters of the game might affect the way we play sound. Think of the surface we're running on, the player health, the tension level... We'll see how can we define an connect different kind of parameters with the sound in FMOD.
- First we'll create the 3D event to play the foostep sounds. Right-click the Events panel and choose New Event > New 3D Timeline.
- The path of the event is Characters/Player Footstep
- We'll now add the parameter that will inform us about the surface type the player is walking or running on. In the main menu choose Create > Add parameter...
- We'll create a Labeled Parameter. Parameters in FMOD are always float numbers internally, but we can map them to labels so we'll have more clear their meaning.
- Enter the parameter name Surface Type and define the labels Tile, Metal and Grass for values 0, 1 and 2 respectively:
- A tab named Surface Type will appear over your Timeline. Change to this tab, you'll see there are 3 sections named after the labels we defined before.
- Drag all the samples for a given surface type into its corresponding section to create a Multi Instrument for each one. You can select each column to play each sample set.
Lesson 4: Creating Space
So far we've been working with 2D sounds. However, designing a 3D soundcape is very important if we want to achieve a good immersion degree. We need to spawn different 3D emitters throughout our map so we can hear all their sounds coming from the right direction. There are different ways to achieve this. 3D Timelines feature a Spatializer component that allow us testing and setting up the 3D attenuation properties of the sounds. Also this Spatializer component can be also added at any time. Let's see an example!
- First we'll create the 3D event to play the phone boxes' sounds. Right-click the Events panel and choose New Event > New 3D Timeline. The path of the event is Emitters/Phone Box.
- Drag the Phone Box sample to the Timeline.
- We'll need this sound to play looped. Usually most 3D emitters are looped sounds that play endlessly. Right-click the audio clip and choose New Loop Region. This will create a loop region fitting the selected audio clip. If you play it now, you'll be able to hear the looped clip.
- Click the Timeline and take a look at the Spatializer component, at the right side of the Timeline Fader. Here we can choose different attenuation curves, disable the overall attenuation or create a User defined attenuation envelope. Also we can use the LFE fader to adjust the send level to the LFE channel. The default settings are ok for this phone box sound.
- In order to preview the 3D spatialized sound, you can use the 3D Preview view, at the right of the event view. The emitter is represented by the arrow, originally centered in the circle, the listener is the center of the circle. You can move the emitter arrow around to listen how the sound attenuation and direction changes. By default the maximum distance is the radius of the circle. You can unlock this property and change it, if you want to hear the sound beyond the maximum distance or if you want to hear small variations in distance by setting a small value.
- The 20 unit distance is too big for this sound. We'll want the player to be able to listen the sound only when it's very close to the boxes. We can change this maximum distance by dragging the Min & Max Distance slider's right arrow to the left. You can also double-click the number and enter the desired value. We'll set a 5 units maximum distance.
Sometimes we only want to set a static panning for a given sound. For example, the Weapon Equip event is played whenever the selected weapon is changed. This happens at the right of the game's viewport, so we might want to pan this sound slightly to right and front of the sound field. For this purpose, we could just use the FMOD Panner effect.
- We can add any effect to a Timeline by right-clicking the rectangles before or after the Timeline Fader. Choose the Weapon Equip Event, right-click the post-fader area and choose Add Effect > FMOD Panner.
- We'll change the Automatic setting to Surround 5.1, so we can pan through all channels.
- Now we can simply drag the center point around the circle to pan the sound to the desired speakers. In this case, we'll drag the sound to the front-right zone until we feel it comes from the right direction.
That's it! We can now assign the Phone Box event to the Master soundbank and listen to the changes in the game.
Lesson 5: Mixing
Adjusting the mix is important in order to achieve a proper balance between all sounds and also to introduce real-time effects. Like many other sound engines, in FMOD you can create a custom mixing hierarchy so we can control all that. Let's see how we can define the appropriate reverb for the game. There are 2 zones, the big open one and wide room with a low ceiling at the bottom of the Highrise level.
- Open the lesson 5 project. You'll see we've got all the SFX of the game now.
- We can access the Mixer window in the main menu, select Window > Mixer.
- In the mixer you'll see that currently all sounds are assigned to the Master Bus.
- Now let's make a couple of groups. Right-click on the Master Bus and choose New group.
- We'll name this one Ambience.
- Create another group for SFX and drag all the Events to their group. Now we could ajust each group sound using the sliders and effect sheets on the right.
- The most common way to apply reverbs to a group of events individually is using return buses. Right-click the Master bus and choose New Return.
- We'll create 2 returns for the 2 kind of reverbs in the game: Reverb_Atrium and Reverb_Room.
- Now we need to enable 2 sends for all SFX to be able to send them the previously created returns. So we'll right-click the post-fader effect zone and add a send to the Reverb_Atrium return...
- ...and another send to the Reverb_Room return.
- Now we'll need to setup the reverb effect for each Return, so choose the Reverb_Atrium return and add a post-fader Reverb effect.
- This is an example setup for the Atrium reverb:
- Do the same with the Reverb_Room return, add a post-fader Reverb effect and set it up like this:
- Now you can manually enable sends for each return and listen to some events to check how they sound. Feel free to tweak the reverb effect values if you want.
- The game can't directly access the mixer, but it toggle between FMOD Snapshots, so click the Snapshots tab to see the snapshot list, which is currently empty. We'll have to create a couple of Overriding Snapshots, so right-click on the empty list and choose New Snapshot > New Overriding Snapshot.
- We need to use the names in the game: Reverb_Atrium and Reverb_Room again.
- Now select the Reverb_Atrium snapshot, click the Routing tab and look at the sends. You'll notice there's a dotted line in the knobs, which mean that the snapshot doesn't affect them so far.
- Fade the Reverb_Atrium send level up to 0 dB. This will be the send level for this snapshot.
- Repeat the 2 previous steps to set the Reverb_Room send level to 0 dB for the Reverb_Room snapshot.
- Now we can try the snapshot effect over the sounds. In the Snapshots tab, choose a snapshot and click the Play button. The snapshot will be now active, so you can hear the sounds with that reverb while playing them. When you click the stop button, you'll hear the normal, dry sounds again.
You can now build the soundbank and try it into the game, so you can listen both reverb versions!
Lesson 5: Optimizing Your Game
There are different settings we might want to take into account in order to reduce the memory usage:
- Soundbanks can be loaded and unloaded while playing the game. We need to distribute all events in different soundbanks so they're available when needed but can be unloaded when no longer needed. In this game we've been only using a soundbank named Master to hold all the sounds.
- Still some long sounds can take space. If you selecte the Ambience Wind sound you'll notice its size is 4.6MB.
- We can enable Vorbis compression by clicking the Compress button at the bottom of the waveform.
- Also in the Assets tab we can set the compression settings. Click the Assets tabs, select the Ambience Wind and note the blue dotted square with the "Click to add a custom platform encoding settings" caption. We can also set the loading mode to streaming at this point.
- We can now adjust the compression codec, the loading mode (Compressed in Memory, Uncompressed and Streaming) and also adjust the quality factor and the sample rate.
- We can do this for a multiple selection, so we can change the settings for a group of assets in a single action.
Also we have some settings to adjust the sound concurrency, so we keep the number of active voices under control:
- Select the Player Jump event. In this case, you'll notice its concurrency is limited to 1 voice at the same time and new sounds are discarded until the previous one is played.
- In FMOD we can't set the maximum number of active and virtual voices from the soundbanks. This control is exposed in set within the FMOD plugin used in the game. Here's an example of the Shooter Game project, setting the maximum number of active voices to 64 and the maximum number of virtual voices to 512. In the FMOD workflow, this parameter isn't expected to be controlled by the Sound Designer as opposite to Wwise, where this setting is included in the soundbanks and controlled by the Sound Designer.
101: Sound Design
Lesson 1: Random Re-sequencing
We're going to add some music to the game. We'll reuse a modified version of the Wwise 201 Cube music and will try to integrate it using FMOD tools. We'll start by randomly re-sequenced music.
- Create a Music folder and add the Gameplay event as a 2D Timeline.
- Drag the Explore-Theme to the Audio 1 track.
- We'll now set a Tempo Marker so we can inform FMOD that this track is 4/4 138 BPM. Right click at the beginning of the Logic Tracks zone and choose Add Tempo Marker.
- Write down 138 for the tempo.
- We can now change the timeline to use bars and beats instead of seconds, so we'll be able to easily see the them in the Timeline time scale and snap between beats.
- We'll add a new track to add the Explore-Arpeggio, Explore-Piano and Explore-Rythm music segments.
- Add a Multi Instrument to the track.
- Now drag the 3 audio files into the Multi Instrument or into its playlists (directly dragging over the Multi Instrument in the Timeline track might be unavailable under certain circumstances).
- Look how all tracks have a different duration. This is an issue for Multi Instruments, so we'll need to remove all possible empty spaces, thus cutting the length of the tracks. Also all tracks need to have the same pre-entry space so we can adjust the loop point correctly, so I modified the original ones a little bit so they fit well.
- Drag the right side of the Multi Instrument clip in the track until all empty space (diagonal lines at the end) is clipped out.
- Finally we can add the Explore-Bridge to our structure. Create a new audio track and drag the audio file in. Adjust it to the exit point of the Multi Instrument tracks.
- We'll want the Multi Instrument to loop randomly throughout its tracks. Right-click over the Logic Tracks space and choose Add Loop Region to create a new loop region.
- Adjust the loop region from the entry point of the Multi Instrument to its exit point. A loop region will play any clip within. Note that the Explore-Theme pre-entry will played each time the Multi Instrument loops.
- Now we'll want this loop region to randomly exit and continue with the Explore-Bridge part. Select the Multi Instrument so you can set the Probability to ON for its Transition Conditions and click the Change value and drag the mouse down until you set a 50% probability. This way, each time we reach the end of the loop, we've got a 50% probability of exiting the loop or either repeat it again.
- Finally we'll want to go back to the Explore-Theme. As it has a pre-entry bar, we'll do a small trick. Add it at the end and align its entry point with the Explore-Bridge exit point.
- Now create a new loop region. You can drag it up and down to move between Logic Tracks.
- Drag it below and adjust it so it catches all the post-exit sound of the Explore-Bridge and drag the beginning at the same point the Explore-Theme track ends. This way, we should be looping after all the Explore-Bridge decay is mixed with the Theme, then we'll continue with our playlist.
Assign the Event to the Master soundbank as usual. We can now build the soundbanks, then go to Unreal and play the map to listen to the music.
Lesson 2: Random Re-orchestration
Now we'll try re-orchestration using the Combat-A and Combat-AB-Rythm music assets.
- In order to try it, we'll rename the previous example as Gameplay Old.
- And we'll add a new Gameplay event with 2D Timeline.
- We'll start dragging all audio files from a given instrument to a single FMOD audio track. We'll create a Multi Instrument for most tracks either having variations or not. Note that track variations have the same instrument name but different numbers, like Combat-A-Bass1 and Combat-A-Bass2.
- In the Multi-Instrument we'll add a Silence Instrument. This instrument lets us add a silent track, so this we'll allow that some of them might stop in any loop. In order to use it, we'll need to adjust the durantion to, at least, the same duration of the instrument.
- In the Multi-Instrument we'll add a Silence Instrument. This instrument lets us add a silent track, so this we'll allow that some of them might stop in any loop. In order to use it, we'll need to adjust the durantion to, at least, the same duration of the instrument.
- Do the same for all tracks. Adjust the time settings by adding a Tempo Marker at the beginning (right-click the Logic Tracks zone and choose Add Tempo Marker)
- Add the rythm tracks at the end. You'll notic they're just 4 measures long, so we'll have to duplicate them by copying & pasting.
- Then we'll set up a new Loop Region that fits the 8 first measures. We can now play the event and listen to the random variations we can get each loop.
- In order to use it in the game, assign the Event to the Master soundbank as usual.
We can now build the soundbanks, then go to Unreal and play the map to listen to the new music.
Lesson 3: Random Mixed Method
We'll now try combining different loops and randomized subtracks to get random mixed-method music.
- We'll start by duplicating the rythm clips. Select all 6 clips using a rectangular selection (left click over the track and drag).
- Copy them next to the previous ones and adjust the Loop Region to fit the 16 measures.
- Now we'll add all the tracks as we did in the previous lesson. We can drag them to new tracks or use a single track. In this case, we'll have to remove the cross-fade settings which are automatically placed whenever overlapping occurs while moving a clip over another one in the same track.
- In order to complete the structure, we'll need to add the Bridge tracks. They've got 1 bar of pre-entry and 4 tracks, 3 variations for the guitar and 1 with the remaining stems. We'll add a new Loop Region to include this track.
- Finally we adjust the probability for the first loop so it can randomly exit to the bridge.
Now we can try this into the game, just rebuild the soundbank and play the map in Unreal!
Lesson 4: Interactive Re-orchestration
In this lesson we're going to use a different guitar track depending on the player health.
- Delete the current guitar tracks (Audio 3 and Audio 14 in this example).
- Add 3 audio tracks to hold the guitar tracks again.
- We'll recover now the Combat-A and Combat-B guitar tracks. We can find them in the Assets tab. Drag them to the newly created tracks and adjust their duration.
- Now add the bridge versions behind.
- We now need to create the game parameter we need to choose the tracks to be used. Click on the main menu Create option and choose Add parameter...
- The parameter is PlayerHealth and it's a continuous parameter with values between 0 and 100. Of course 100 is the default value and the scope must be set to Global.
- Now select the first guitar track and we'll create and Automation for the track fader. Right-click on the fader and choose Automation.
- Click Add curve and choose PlayerHealth.
- Now you'll see the curve editor. You can create nodes by clicking over the line and drag them wherever you want. We'll adjust the values so that volume for this track is up between 50 and 80 PlayerHealth units.
- On the right panel you'll see the game parameter. This will allow you to change it and preview the sound for any possible value. At the same time, we now find a foldable subtrack below our guitar tracks that shows the track volume according to the PlayerHealth value.
- Repeat the previous steps for the other 2 guitar tracks. We'll use track 2 for values between 20 and 50 and below 2 respectively.
Try this into the game, just rebuild the soundbank and play the map in Unreal. You can lose health by shooting the rocket launcher very close to the character. Also you have health refill pickups with a cross icon troughout the map. Listen to guitar tracks changing according to your character's health.
Lesson 5: Interactive Re-sequencing
Finally we're going to crossfade between Explore and Combat music versions, and we'll also introduce a Defeated segment to be played when our character is defeated.
- We'll first copy & paste all the Gameplay sequence back into the Gameplay Old event used by the Explore music. We'll start with the Logic Tracks and the 3 first track clips.
- Now copy the remaining tracks by selecting the full track, so we'll be also copying their Automation setup.
- Paste them below the 3 first tracks in Gameplay Old.
- And shift the tracks to adjust their starting point.
- We can get rid of the old Gameplay event.
- And restore the Gamplay Old event to its previous Gameplay status, so remove the " Old" part.
- We'll now define the parameter we'll use to decide whether our current context is Explore or Combat. Click on the main menu Create option and choose Add parameter...
- Let's define the CombatLevel parameter, which is a Global continuous parameter that ranges from 0 to 10.
- Now we'll need to create the appropiate Transition and Destination Zones so we'll jump between each depending on this parameter. Right-click the empty logic tracks space and choose Add Destination Region.
- The Region A will appear. Adjust it to the first 16 measures of the combat music.
- Now we'll create a Transition Region to this new region so we'll instruct FMOD what's the region that can jump to Region A. Right-click the empty logic tracks space again and choose Add Transition Region To > Regions > Region A.
- Adjust the Transition Region so it fits the Explore Theme and the Multi-Instrument, leaving the 1st pre-entry measure out.
- The default behavior of Transition Regions is jumping to the beginning of the Destination Region, but this music is designed with the same tempo and harmony for both Combat and Explore sections, so we'll use the Relative setting in the Transition Conditions panel.
- Now we'll need to set a condition for the transition to happen. Click the Add Condition button and choose Add Parameter Condition > CombatLevel
- Adjust the CombatLevel value range to 5.0-10.0. This means that when CombatLevel is above 5 it will jump to the combat clips.
- You can now play the event starting and the beginning and try changing the CombatLevel value using the right panel. When the value goes beyond 5, the music should skip to the combat clips. However the transition will be immediate, so it will be a bit harsh. Let's try to soften it a little bit!
- Right-click the Transition Region and choose Add Transition Timeline.
- FMOD will join the Transition Region and Destination Region with an in-between gap. Now, we can choose what to do in this transition time (and, of course, adjust this time, which at this zoom level is very long)
- We'll first adjust the Transition Timeline duration to 1 measure by dragging its right-side to the left and reducing zoom.
- Now drag the left dashed rectangle to the right and the right dashed rectangle to the left. This will create a crossfade zone between the two tracks.
- With a bit of patience, we'll do the same with all the tracks.
- We can hide this Transition Timeline, so it doesn't disturb us while we continue edition. Just right-click over the Transition Region and choose Hide Transition Timeline.
- We can also transition in the last Explore-Theme clip we left for the Bridge-Theme mixing part by the end. Copy and paste the transition we've just created and adjust it. You don't need to fit it in the loop region, we don't care about what's happening outside because we'll never reach that part. We've also copied the Transition Timeline of the Transition Region we've copied, the small circle at the top-right side of the rectangle is telling us a Transition Timeline is defined for that region.
- Now we'll have to do the same to transition from the Explore-Bridge clip to the Combat-Bridge one. Create a destination region fitting the Combat-Bridge clip and copy one of the previous transition regions. This way we'll be copying the Transition Timeline too. We just need to change the destination for the copied Transition Region.
- We can change the destination for this Transition Region by either clicking the destination option in the Transition Conditions panel and choosing Regions > Region B...
- Or by right-clicking the Transition Region and choosing Set Destination to > Regions > Region B...
- Now we need to do everything in the opposite direction. We need to transition from the Combat clips to the Explore ones when CombatLevel is below 5. I'll leave this as an exercise for you, this is how the result should look like (combat main section will directly jump to Explore-Theme and Combat-Bridge must jump to Explore-Bridge) Copying and pasting the Transition Regions will save a lot of time, you'll just need to change the destinations and the condition, CombatLevel must be in the 0.00-5.00 range:
- Finally let's see another way to transition, the Magnet Region. Magnet Regions work the opposite Transition Regions do. We can understand it as "Jump to this region if the conditions met". We'll use it to add a Defeated segment when PlayerHealth goes down to 0. Import the file into the Timeline.
- Right-click the Logic Tracks space over the clip and choose Add Magnet Region.
- Adjust the Magnet Region to fit the clip.
- Add the condition for the Magnet Region. Player Health must be 0.
- Now the Magnet Region will play looped when Player Health is 0. We can stop it by adding a Sustain Point at the end of the click. Right-click the Logic Tracks zone and choose Add Sustain Point.
- In the Sustain Point's Conditions panel add the condition of PlayerHealth being 0. This is the condition to keep the play cursor hooked in the Susatin Point. If the value was higher due to a player character respawn, then we'll get out of both the Sustain Point and the Magnet Region and follow the Timeline.
- Now we'll just need to tell what to do after the player character is respawned. We'll want to jump to the beginning of the Timeline, so we'll add a new Marker right at the beginning by right-clicking the Logic Tracks zone and choose Add Destination Marker.
- And at the end of the Death clip, we'll add a Transition To > Markers > Marker A.
Finally! We've got the resequencing behavior complete. Try this into the game, just rebuild the soundbank and play the map in Unreal. As there are no enemies in the map, I'm sending a CombatLevel value of 10 when you're using the rocket launcher and back to 0 when you use the Assault Rifle. You can lose health by shooting the rocket launcher very close to the character.