Skip to content

Music Replacement

Scott Zimmerman edited this page Jun 10, 2026 · 20 revisions

How to Insert Custom Music

Starting with v1.7.5 it is now possible to replace the music with OGG files. This page explains how to implement custom music with looping tracks.

The process is simple:

  • Reference the track numbers here:
  • Name the file to the track you want to replace (example: "1.ogg", "2.ogg", etc).
  • Drop it into the mods folder.
    • Desktop: ..\GameFolder\Mods\Music
    • Android: Storage:\Android\data\com.zelda.ladxhd\files\Mods\Music
  • When the game plays the track number, it will load the OGG instead.

Identifying Tracks

The wiki page with the track indexes is not the best reference.

  • I highly suggest downloading Audio Overload.
  • Drag/drop the file: ..\GameFolder\Data\Music\awakening.gbs
  • This lets you listen to the tracks inside the GBS file.
  • Most other GBS Players fail to play some of the tracks!

Note that the song index in Audio Overload is +1 to what the game recognizes. Song 9 (Mysterious Woods) in Audio Overload is Index 8 in the game for example. So to replace Mysterious Woods music, you would name the file to "8.ogg".

Volume Manipulation

Depending on how the tracks were created, they may end up either louder or quieter than the rest of the game's audio. To globally override the volume of all tracks at once, a "volume.txt" file can be created in the "..\Mods\Music" folder alongside the custom audio tracks. This only needs to be a single line text file with the desired volume on line 1 as a percentage. The value can exceed 100 to make tracks louder than normal or be less than 100 to make them quieter than normal. Track volume can also be manipulated on a track by track basis via OGG tags which is explained below.

Custom Looping Tracks

  • Custom looping is optional. The game will automatically loop after the track ends.
  • There is two methods to custom looping: Ogg Vorbis Tags vs. a "track.loop" file.
  • Tags allow custom looping without additional files, but is a bit more complex to set up.
  • A track.loop file is a bit simpler, but requires having a second file.
  • The trade off is single file vs. ease of use.

Description of OGG Tags

  • There is three tags that can be used to loop: LOOPSTART, LOOPLENGTH, and LOOPEND.
    • LOOPSTART: The position in samples of where to start looping from.
    • LOOPLENGTH: The number of samples to play from LOOPSTART.
    • LOOPEND: The position in samples of where to end the song (alternative to LOOPEND).
    • VOLUME: Overrides the volume as a percentage. Can exceed 100 to make track louder.
  • All tags are optional, and only two looping tags should ever be used in a single track.
  • If LOOPSTART is not used, the track will loop from the beginning.
  • LOOPLENGTH and LOOPEND should never be used together. Choose one or the other
  • You can use VOLUME to "normalize" the track with the rest of the game's audio.

Custom Looping via OGG Tags

  • Find where in the song you want to loop using something like Audacity or Tenacity.
  • To calculate the LOOPSTART position, multiply start duration * sampling rate.
  • If start position is 0.876 and sampling rate is 44100 => 0.876 * 44100 = 38631.
  • To calculate the LOOPEND position, multiply end duration * sampling rate.
  • If end position is 8.554 and sampling rate is 44100 => 8.554 * 44100 = 377231.
  • To calculate the LOOPLENGTH position, subtract LOOPEND - LOOPSTART.
  • Using the values above for LOOPSTART and LOOPEND => 377231 - 38631 = 338600
  • Now these tags need to be entered into the metadata of the OGG file.
  • This tutorial will use foobar2000, another valid option is MP3Tag.
  • Add the OGG file to foobar2000 by drag/drop onto the playlist.
  • Right click the track and click the "Properties" option.
  • On the "Metadata" tab, look for the field (+ add new). Click it.
  • Enter your desired LOOPSTART, LOOPLENGTH, and LOOPEND tags and values.

In the example below, I am using the Sonic the Hedgehog 2 invincibility theme. Further examples of that in the "track#.loop" section. The image below shows what it looks like to add a tag to the file via foobar2000.

image

Description of "track#.loop" File

  • Simple to set up. Just uses a 1 or 2 line text document with ".loop" extension.
  • The first line is when the track starts as a duration (example: 0.876).
  • The second line is when the track ends as a duration (example: 8.554).

Custom Looping via a "track#.loop" File

  • Find where in the song you want to loop using something like Audacity or Tenacity.
  • Create a ".loop" file from a text document with the track name (example: 1.loop).
  • In the text document, enter the point in time you want to loop from (example: 0.876).
  • And that is it. When the song ends, it will restart from the point in the loop file.

In the example below, I am using the Sonic the Hedgehog 2 invincibility theme for title screen music.

image

This means in the Mods\Music folder, I have two files:

  • 12.ogg
  • 12.loop
image

And inside the loop file, I have 0.876 entered.

image

The result is that when the music is finished playing, it will restart 0.876 seconds in.

2026-04-13.01-59-50.mp4

πŸ“š Documentation Index

🏠 Home

βš™οΈ Engine Reference

πŸ›οΈ File & Data Reference

🎧 Audio Reference

πŸ’Ύ Modification

Clone this wiki locally