User:BAPACop/Music

From Dragon Age Toolset Wiki
Jump to: navigation, search

This tutorial does not cover the creation of new wav files. It will be assumed that you have sounds ready to add to a project. This is not a very hard tutorial, but it will be long and involved, and I will try to be clear and simple in what is needed. Alot of the specifics of setting up the sound events I still don't know and I am learning every day. I will try to keep the tutorial updated as I discover which specific parameters work best and precisely how to flag events. What I have discovered will allow you to get your custom battle music, main theme and chargen music into the game in just a few days work. My hope is that this will be useful and others can build on what I have learned. So please, bear with me. I make no claim to know everything.

This tutorial will require FMOD to produce your files. Please note that you MUST use the version of FMOD that shipped with Dragon Age:Origins. If you have a newer version of FMOD, DO NOT USE it because your music will not work in the game. I learned this the hard way.

Getting Started

Careful planning is essential when attempting to change the music because the folder structure and naming in your FMOD project file must be specific where noted in this tutorial. If you do not create the proper structure or do not use the naming conventions listed below, then your sounds will not be called by the engine.

Prep

Let's begin by setting up our Music Source and Build Directory. I know that alot of people don't like to clutter up their Desktop, but if you do not mind navigating endlessly for every single sound file, then who am I to stop you. I recommend setting up your folders on your desktop, but anywhere is fine.

  • Create a working folder: ie: My_Music (or whatever) This is where you will do all of your work. It is also where FMOD will look for your music and sounds, and it will also contain your build directory.
  • Create your Music Source folder inside your working folder.
  • Create your Build Directory folder also inside your working folder. Note: You may wish to create more than one build directory and a backup folder is always a good idea.

Sound Resource Setup

It's safe to say that having all this ready to go will save you a ton of time and frustration later. Gather together all your music files and place them in a seperate folder inside your 'Music Source'. A good name would be My Sounds. Naming of the files doesn't matter, however, they must be WAV or MP2. This is where Music differs from VO, as VO must be mono 16 bit 24000hz PCM. Your music can be stereo and virtually any preset so long as it is WAV or MP2. FMOD will compress it to MP3 when you build the project.

Once you have your folders setup, you will need some files. Grab the Core_FDP files and an FSB Extractor.

You will only need one file from the Core_FDP zip. Find the music.fdp, and copy it to your Build Directory. Then you will want to extract the FSB_Ext folder to your Music Source folder.

Work Folder.jpg

Next you will need to navigate to your C:\Program Files\Dragon Age\packages\core\audio\sound folder. Main game install. Find and copy the following to your Music Source folder:

  • music_bank_strm_new.fsb
CoreFSB.jpg

Sound Extraction

Unfortunately, FMOD will want to have access to two sounds in the above listed Core music.fdp. I tried many ways to get around this, a few were successful to an extent... but it is just simpler to do it this way. Who knows? You might want to have all the Dragon Age sounds available to you, so feel free to copy and extract more than just the single FSB listed.

We are looking for two sounds in particular that we will need only for FMOD to find. We wont need any other DA sounds unless you want them, but you will still have access to all the DA sounds in the toolset. We are making a new FDP and will later merge it with the core music.fev (FDP).

  • DA_m_pre_kwilds_a_02.wav
  • DA_m_pre_kwilds_a_04.wav

I like to make a new folder inside my Music Source to house all the DA sounds, but its up to you as you only have to set a path to them once. Take each of the three core fsb's and drag/drop them on the FSB_Ext.exe. The sound will unpack into the Music Source folder where you have the FSB's. They can really clutter up the folder, so I suggest that you create another folder inside called DA Sounds. Drag them all into this folder and delete the FSB's (to save space).

All the DA sounds contained in those files will extract as MP3. We need to convert them to WAV. Goldwave and Audacity have batch conversion capability. Use whatever you can find. I am afraid this step is necessary, FMOD will look for these sounds and must be able to find them. When prompted, you will navigate to this folder, but the sounds will not be used. More on that later.

MusicSource.jpg

Creating a Project

Creating a new FMOD project requires only opening up FMOD.exe and hitting the "new project" button under "File". However, we are NOT going to do it that way. Instead, we are going to open the core music.fdp and edit it, then save it under the name my_music.fdp. The reason we will do this is that we want to keep the exact same structure and parameters of the original as we will be merging them later in this tutorial.

FMOD Basics

I won't go into too much detail about how to use FMOD except where it applies to this tutorial. A lot of key information elsewhere on this wiki is lacking, or simply wrong. I don't fault the authors, they got out enough information to use the utility and get some sounds into the game. This tutorial will go into much greater detail where it applies directly to music and sounds for your own modules.

Main article: FMOD

Editing the FDP

Now we get to the 'meat' of the tutorial. Creating our own music project file. This is tedious and time consuming, so will try to be brief but not move too quickly. We will start by opening the music.fdp that we have placed into our Build Directory. FMOD can be found in your main game install folder: C:\Program Files\Dragon Age\tools\FMOD Designer. You can either run that, or you can simply double-click on your music.fdp. We will now do four quick steps and then save this project under a new name.

Music FMOD.jpg

Build Directory

Clear the Build Directory entry under properties. It will say this: C:\tag\main\build\packages\core\override. This is something left over from a developer. We have no such directory.

Audio Source Directory

Browse to your DA Sounds folder that we extracted earlier and set that path. C:\Users\owner\Desktop\My_Music\Music Source\DA_Sounds

Clean House

In the Hierarchy tab under Events, delete everything below Human_noble_origin. Yes, you read that right... DELETE IT! Now expand the Human_noble_origin folder and delete the last four events shown, leave the rest. What you are deleting are: bhn100_father, bhn100_dog, bhn_door_stinger_new, and bhn_dog_lp. One more thing while we are in here; change credits_df name to simply credits.

FDPClean.jpg

Save

Now you can File: Save Project As... a new file. Call it my_music.fdp and save to your Build Directory. You will notice that what is left has very generic names; main, precache, chargen, credits, and Death. DO NOT change any of these. That is how we will override the main music for our module. We will need to re-assign which wav is assigned to them a bit later on.

Build Directory.jpg

FDPClean2.jpg

Creating Events and Hierarchy

We are only making one Event entry for this tutorial, but you could add as many as you like. We will next be re-naming the 4th event in the hierarchy: Human_noble_origin will now be changed to My_mod_music. You can change names of events on the right side in the lower property screen. DO NOT TOUCH the name on the top/right property screen. It should read as music regardless of what you named your FDP. That name: music is the name of the .FEV that is called by the engine for sound events we want to change. We are overwriting DA sounds and adding sounds for our module, and this FDP will create the music.fev.

Folder Structure

Just to be clear, our single folder that we changed the name will contain all of our module's sounds. It will also be a music preset when selected in the toolset for an area property. This is where we will reassign main, combat and Death sounds to be sounds used in our level(s). We are going to change the presets temporarily. Add an underscore in front of each of the events in the top 3 groups (and ONLY the top three groups, leave your custom named folder events named as they are). For Example: main becomes _main. This way when we merge our project with the core FDP our events will appear seperate and we can delete them then once we have re-assigned the core sounds. If we do not change them now, our names will overwrite the core events and we dont want to do that yet. Within this folder we can add other folders that will contain specific sound events.

My_mod_music will become a Music Preset that you can assign to an area(s). If you wish to have more than one Music Preset, then just don't delete as many folders in the main hierarchy and rename them also. You will understand more about this later in the tutorial when we build our sound files.

Let's go ahead and add a few more folders inside our My_mod_music folder. To do this, right click on our folder and select Add Event Group. Then you will be prompted to give it a name. We have named it Level_1, and we can also add other folders as seen in the picture.

FoldStruct.jpg
  • Don't forget to save your project often. Get in this habit. FMOD has been known to crash.

Events

Still working in Events/Heirarchy: Now we can add events to our folders. The folder structure is the way it will show in the toolset under the music folder in Sounds. Let's start with our Level_1 event group and add an event (by right clicking on the folder) we will call Fireplace, since we may have a fireplace in the area and will want that sound as an ambient or as a placeable. You can choose "no template" as we will further adjust the sounds when we actually add them.

Events.jpg

Moving and Organizing

This next step is purely optional, but it will help to keep track of your events. We now go to the Categories tab of Events. We will add a new category folder and drag/drop our events into that folder. Won't spend any more time on that, but recommended if you have alot of events and more than one event category.

Categories.jpg

Sound Definitions

Time to move to another tab in our project. Go to the Sound Definitions tab. You will see a red folder called music_ingame, and a bunch of folders beneath it. Delete everything except the music_ingame top folder.

Delete.jpg

We won't be using any DA sounds in our sound banks, so they are not needed.

Sound Banks

Now go to the Wave Banks tab. If you have followed the directions up to this point, then the wav banks in this tab will be empty with the exception of two sounds in music_bank_strm_new. Select that bank, and on ther right/bottom you will see the two sounds. These are the two we extracted at the beginning under Getting Started. Drag/Drop these two files into the music_bank_strm_death bank, thus emptying the top two sound banks.

Sound1.jpg

Now that the sounds have been moved. We are going to rename the existing top two banks for our use. The reason we want to do it this way is that these two sound banks are already set up for streaming and loading sounds and are configured. We could surely make our own blank sound banks and use either of these as templates, but for this tutorial we only need the two banks. Sound Bank naming style is entirely up to you, the names don't matter. I have renamed them for clarity:

  • my_music_notstrm_sting
  • my_music_strm_new
Sound2.jpg

We have finished getting evrything setup for our new sounds. It is time to add our sounds.

  • One more reminder to SAVE OFTEN.

Adding Sounds

Since I haven't created 'tutorial' sounds, will have to use what I have. This is a shameless plug for BG2 Redux, but I have those sounds ready to be added. You will be using the sounds you have ready. We will start with the DA presets which are main, combat and Death.

Before you begin, know what type of sounds you will be adding. Are they single-shots? Streaming music? Stingers? Streaming sounds like music you will want in your my_music_bank_strm_new, since that bank is configured for streaming sounds already. Single shots and stingers will go in the my_music_bank_notstrm_sting, since they can be loaded into memory. So go to the Sound Banks tab and select the appropriate bank, right-click and set as the Set as current bank.

Set Bank.jpg

Now in your my_music.fdp, go to the Events tab/Hierarchy. Go to the top folder, _EndOfGameCredits. Double-click on the event main and add sound by right-clicking inside the big grey box on the right.

Editor1.jpg

Select a New Wavetable..., then browse to the sound you want to use for your End Credits. I have chosen BG2_Main for my end credits.

Editor2.jpg

Do the same thing for each of the presets that we didnt add ourselves: _main, _precache, _main, _chargen, _credits in the top three event folders. The main, combat and Death and stingers we will assign our level specific music.

Each time you assign a new sound to an event, a new Sound Definition will appear in that tab as a folder. You can organize these also if you wish, but I have not seen a need.

New Definition.jpg

Verify your work

You should have all your events assigned with wavs from your Music Source folder. It will be tedious, but in the end you will be glad you took the time to setup everything in an organized manner. I am going to switch gears and show a picture of the finished hierarchy for my module.

Redux.jpg

Remember, the folder setup you use in the Event/Hierarchy will be the folder setup in the toolset. Although, once you know how to do this, its not that hard to re-do just about any part. Time for the final steps. Save your project and make a backup.

Project Merging

This is the step that will allow us to get our custom music into Dragon Age under the music tab in the toolset. That is how the sounds can be assigned to areas or placeables... or used in cutscenes without having to resort to the dialogue VO technique for stingers.

How to Merge

You should now have in your My_Music/Build Directory folder 2 FDP's: music.fdp and my_music.fdp.

  • Open up music.fdp in FMOD.
  • Goto: File --> Merge Project...
  • Select my_music.fdp and open
  • When prompted, browse to any DA sounds you forgot to remove, or events you forgot to re-assign
  • If prompted, browse to any of your customs sounds
  • Look at Events -> Hierarchy, you will see your new event(s) category at the bottom.
  • Look in the Wave banks, you will see your new banks.
  • Change Build Directory again to blank. Reset your Audio Source Directory.
  • Save music.fdp to your Build Directory
Post Merge.jpg

Re-assigning Main and Chargen

Now we need to go back through the top 3 Event Categories and re-assign main, credits, chargen, etc. Double-click on each event one at a time. Starting with _EndOfGameCredits / main. Right-click on the sound and choose: Replace Sound. Now browse to the sound you chose before, it should already have a sound definition folder to choose. Do this for each that were in YOUR FDP that you assigned an underscore to the name. When finished, you can delete your underscored events.

Replace Sound.jpg

This step isnt really necessary if you choose to leave the original names intact during your FDP building, but I am not sure how that will affect the regular game. It will overwrite the DA sounds for the entire single player game, I believe, and for a module we don't want to do that. This is still unexplored at the moment.

FDP Cleanup

Do any last minute FDP cleanup you wish to do. Moving sounds around to different banks or organizing folder structure.

Building Your Project

Switching again as I didn't really create the tutorial FDP to completion for this excercise, will demonstrate by building my module FDP. Remember to double-check your FDP to make sure the Build Directory is blank. FMOD will build in the FDP path by default which is where we want it to go.

  • Goto --> Wave banks tab
  • Right-click on the new bank(s) and select Build. You can choose multiple banks by Ctrl + select. You can also simply hit the Build button at the top of the screen in FMOD and deselect any banks you don't wish to build. But I like to see just what I am making.
Build1.jpg

Build2.jpg

Select the bank to build, hit build and then follow the directions. You may be asked to navigate to wav locations. Just do whatever it says. Double-check your Build Directory in the FDP. This is what you should have where you built the files:

Build3.jpg

Placing Files

Home stretch. Now copy out the following files:

  • music.fev
  • my_music_bank_strm_new.fsb
  • my_music_bank_notstrm_sting.fsb (if you built this one)

Place them in your Addins - Module folder. ie: C:\Users\owner\Documents\BioWare\Dragon Age\AddIns\bgr_b21_dev\module\override\Sound

Save your FDP and exit out of everything. Open up your DA Toolset

Toolset Access and Usage

In the toolset, open your module and an area. You can now assign sound events or music presets.

Presets.jpg

Final Notes

You can always opt to skip changing music, and just use this method for area presets, cutscene sounds, stingers, whatever you need to add in the realm of sounds.

I hope this tutorial has been helpful. Will try to add more detail in the future concerning sound definitions and events parameters and flags.

Written by Cuvieronius, a member of the Baldur's Gate Redux Team.
Original Tutorial