# Audio Length (Advanced Guide)

<p class="callout info">See [Extracting Game Audio](https://wiki.eternalmods.com/books/beginners-guide-how-to-create-mods/page/extracting-game-audio) &amp; [Creating Audio Mods](https://wiki.eternalmods.com/books/beginners-guide-how-to-create-mods/page/creating-sound-mods) before proceeding.</p>

<p class="callout warning">This is an **Advanced Guide**, you are expected to have a decent understanding of how audio (primarily music) flows in DOOM Eternal.</p>

### Backup your PCK files

Find the location of whichever **PCK** file you want to edit - **mus**, **sfx**, **vo\_english**, etc.  
( ex: **C:\\Program Files (x86)\\Steam\\steamapps\\common\\DOOMEternal\\base\\sound\\soundbanks\\pc** )

Copy them over to a safe location, this will be the file that you will edit.  
You may copy an additional **PCK** file if you want to backup the original.

### Fusion Tools

Fusion Tools is an advanced sound editor. For the case of DOOM Eternal, you will use it to export/import the **BNK** that allows you to edit music length and their start/stop positions.

**Fusion Tools - [Download](https://www.nexusmods.com/site/mods/1812)**

### Exporting the BNK file (Into the XML Format)

Extract the contents of Fusion Tools and put **FusionTools.exe** somewhere safe.

- Launch **FusionTools.exe**
- **Wwise Editor**
- **File options** (top left of the window)
- **Open File**
- Navigate to where you copied the **PCK** file that you want to edit  
    ( You may get a warning that the **PCK** file does not have any WEMs, just select okay and ignore it )
- **Show BNKs embedded in the file** (3rd option on the top bar)
- In the new window, right click any option available -&gt; **Edit BNK** (**mus.pck** only has 1 Embedded BNK)
- In the new Window, select: **Export/Import HIRC section to/from an XML file** (4th option on the top bar)
- **Export HIRC** (Export it somewhere safe, do not change the name of the file)

### Editing Sound Properties

<p class="callout warning">Proceed after your sound files are in the proper, inject-able format.</p>

<p class="callout info">Save a copy of the XML file if you want to reference the unmodded piece.</p>

Open the XML file in any XML viewer. **Notepad++** works just fine - [Download](https://notepad-plus-plus.org/downloads/)

- Find the sound IDs that appear at the end of each extracted sound file.  
    For music, you will see 2 of them, they are the **SourceID**.
- The parent ID, or just **ID**, encompasses the entire track.
- There are 2 locations where the **SourceDuration** is held for each track. The duration is measured in milliseconds.
- Each can be changed to the desired amount, but for simplicity's sake, they should be identical.

[![image-1638748762303.png](https://wiki.eternalmods.com/uploads/images/gallery/2021-12/scaled-1680-/image-1638748762303.png)](https://wiki.eternalmods.com/uploads/images/gallery/2021-12/image-1638748762303.png)

[![image-1638762286636.png](https://wiki.eternalmods.com/uploads/images/gallery/2021-12/scaled-1680-/image-1638762286636.png)](https://wiki.eternalmods.com/uploads/images/gallery/2021-12/image-1638762286636.png)

- **PlayAt** determines when the track actually starts. For the most part, this is unnecessary,  
    so it should be changed to 0. It is measured in milliseconds.
- **BeginTrimOffset** &amp; **EndTrimOffset** determine when the track plays and when it cuts off.  
    The negative amounts means it triggers from the end of the duration to the specified location.  
    It is recommended to set both of those values to 0. They are measured in milliseconds.
- **MusicMarkers** are what determines when the current track starts and when the next track will start.  
    Change their positions to the appropriate amounts. They are measured in milliseconds.

<p class="callout info">ID **43573010** is when the current track starts  
ID **1539036744** is when the next track starts (the current track ends)</p>

<p class="callout warning">Keep in mind that **MusicMarkers** do not cut off the music. The **BeginTrimOffset** &amp; **EndTrimOffset** do that.</p>

- **AutomationItems** cause the music to fade in or fade out.  
    For most instances, they are unnecessary and can be removed. They are measured in seconds.

[![image-1638749697816.png](https://wiki.eternalmods.com/uploads/images/gallery/2021-12/scaled-1680-/image-1638749697816.png)](https://wiki.eternalmods.com/uploads/images/gallery/2021-12/image-1638749697816.png)

Change the contents from the image above to the one below.

[![image-1638763871545.png](https://wiki.eternalmods.com/uploads/images/gallery/2021-12/scaled-1680-/image-1638763871545.png)](https://wiki.eternalmods.com/uploads/images/gallery/2021-12/image-1638763871545.png)

<p class="callout info">It might be helpful to keep **AutomationItems** and alter them based on the modded track.</p>

To modify music volume, go to the **MusicSequence** object that contains the **DirectParentID** for each **MusicTrack** and find "Prop".

[![image-1640138456000.png](https://wiki.eternalmods.com/uploads/images/gallery/2021-12/scaled-1680-/image-1640138456000.png)](https://wiki.eternalmods.com/uploads/images/gallery/2021-12/image-1640138456000.png)

Change the field type to **"float"**, from **"uint32"** and the value to an existing value of a different number.  
The higher the value, the louder the track, and vice versa.

[![image-1640138501204.png](https://wiki.eternalmods.com/uploads/images/gallery/2021-12/scaled-1680-/image-1640138501204.png)](https://wiki.eternalmods.com/uploads/images/gallery/2021-12/image-1640138501204.png)

The following are valid float values for Prop (from quietest to loudest):

**1056964608**  
**1065353216**  
**1073741824**  
**1077936128**  
**1080033280**  
**1082130432**  
**1083179008**  
**1084227584**  
**1086324736**  
**1090519040**  
**1093664768**  
**1094713344**  
**1098907648**  
**1099431936**

If there are no Props or it is set to 0, you can add it. Here is a sample you can copy and paste into your XML file.

```
                <list type="Prop" name="Properties" count="1">
                    <object type="Prop">
                        <field type="byte" name="ID" value="0" />
                        <field type="float" name="Value" value="1086324736" />
                    </object>
                </list>
```

<p class="callout success">Music IDs are organized by category (Ambient, Light, Heavy, etc).  
They are measured alphabetically, in the same format as File Explorer if organized by name.</p>

<p class="callout info">It is up to your best judgment to listen by ear if you want to match the length &amp; music markers accurately.</p>

### Importing the XML file into PCK

- After changes are made to the exported XML file, save it, then go back to the last Fusion Tools window.
- **Export/Import HIRC section to/from an XML file** (4th option on the top bar)
- **Import HIRC**
- Go to the first **Wwise Editor - Ready** window -&gt; **File options**
- **Save file** -&gt; Save as the same name as the PCK file that was edited  
    ( ex: **mus.pck** )

<p class="callout danger">As of current time, the [Eternal Mod Injector](https://gamebanana.com/tools/7475) does not support **PCK** files.  
The modded **PCK** file must be manually switched between the vanilla file.</p>

<p class="callout success">Alternatively, the [Eternal PCK Installer](https://drive.google.com/drive/folders/17tOqQzR4_dV7IraBJJDlZ9ESCHJos9_P) script can be used for easier .pck file replacement/restoration.</p>

### See Also

- [HIRC Objects (Advanced Guide)](https://wiki.eternalmods.com/books/beginners-guide-how-to-create-mods/page/hirc-objects-advanced-guide)