Modding Music: Difference between revisions

From PMDOWiki
IDK (talk | contribs)
raw add
IDK (talk | contribs)
Images and formatting
Line 1: Line 1:
This page goes through the process of how to add new music to a PMDO mod.
This page goes through the process of how to add new music to a PMDO mod.


Adding Files
== Adding Files ==
Add music by placing the file in the Content/Music folder of your mod.  It must be an OGG file:
Add music by placing the file in the Content/Music folder of your mod.  It must be an OGG file:


It will appear in the music list on the next refresh:
[[File:ModdingMusic_Folder.png|frameless]]


It will appear in the music list of the Map or Ground Editor on the next refresh:


[[File:ModdingMusic_MapEditor.png|frameless]]


Looping
== Looping ==
If you added an ogg, chances are it’s not set up to loop properly.  You can set the loop points by editing the tags of the file.  Use an editing software like MP3Tag.
If you added an ogg, chances are it’s not set up to loop properly.  You can set the loop points by editing the tags of the file.  Use an editing software like [https://www.mp3tag.de/en/ MP3Tag].


[[File:ModdingMusic_Looping.png|frameless]]


You will need to edit the extended tags to include a LOOPSTART and LOOPLENGTH:


[[File:ModdingMusic_LoopPoints.png|frameless]]


LOOPSTART specifies the start of the song’s loop in samples.  (Samples are the smallest unit of time for an OGG)


LOOPLENGTH specifies the length of the song’s loop in samples.  This is actually optional if the music file itself stops at the loop’s end.


You can find these loop points by opening the song in [https://www.audacityteam.org/ Audacity], playing through it and carefully pinpointing the times you want to loop together.


 
[[File:ModdingMusic_Audacity.png|frameless]]
 
 
 
 
 
 
 
 
 
You will need to edit the extended tags to include a LOOPSTART and LOOPLENGTH:
 
LOOPSTART specifies the start of the song’s loop in samples.  (Samples are the smallest unit of time for an OGG)
LOOPLENGTH specifies the length of the song’s loop in samples.  This is actually optional if the music file itself stops at the loop’s end.
 
You can find these loop points by opening the song in Audacity, playing through it and carefully pinpointing the times you want to loop together.


This can be an imperfect and laborious process.  If the song you’re trying to use is popular enough, chances are it’s on Smas Custom Music.  Using songs from this site makes the process much easier.
This can be an imperfect and laborious process.  If the song you’re trying to use is popular enough, chances are it’s on Smas Custom Music.  Using songs from this site makes the process much easier.


Looping BRSTMs with Smash Custom Music  
== Looping BRSTMs with Smash Custom Music ==
Smash Custom Music is a site that hosts popular custom songs from various games.  It’s particularly useful because it comes with loop points listed on the song page itself:
[https://smashcustommusic.net/ Smash Custom Music] is a site that hosts popular custom songs from various games.  It’s particularly useful because it comes with loop points listed on the song page itself:


[[File:ModdingMusic_SmashCustomMusic.png|frameless]]


What’s even more convenient is that there exists programs to convert BRSTMs to OGGs while fully preserving the loop points in the tags.  One such tool is found here.
What’s even more convenient is that there exists programs to convert BRSTMs to OGGs while fully preserving the loop points in the tags.  One such tool is found [https://www.lakora.us/brawl/brstm/old.html here].




Download and run the program, and you should see the following UI:


[[File:ModdingMusic_Converter.png|frameless]]


Choose to output as Looping OGG and select any downloaded BRSTM:


[[File:ModdingMusic_BRSTM.png|frameless]]


Once converted, you will get a .logg file in the output folder:


 
[[File:ModdingMusic_logg.png|frameless]]
Download and run the program, and you should see the following UI:
 
Choose to output as Looping OGG and select any downloaded BRSTM:
 
Once converted, you will get a .logg file in the output folder:


You can rename the extension to .ogg and it will work just fine.
You can rename the extension to .ogg and it will work just fine.




If you inspect the tags, you’ll find them automatically generated:
If you inspect the tags, you’ll find them automatically generated:


[[File:ModdingMusic_AutoLoopPoints.png|frameless]]


Additional Data
== Additional Data ==
If you speak to Kriketune and open the music menu, you may find that your song is missing data for its Title, Origin, and Artist, unlike the other songs:
If you speak to Kriketune and open the music menu, you may find that your song is missing data for its Title, Origin, and Artist, unlike the other songs:


 
[[File:ModdingMusic_Menu.png|frameless]]
 




In order to remedy this, simply add the data to the Title, Album, and Artist fields, respectively.
In order to remedy this, simply add the data to the Title, Album, and Artist fields, respectively.


[[File:ModdingMusic_Metadata.png|frameless]]


== Spoilers ==
Sometimes, you don’t want a song to be playable in the menu until the player has reached a certain point in the game.  You can spoiler your music track by adding the SPOILER tag to the oggs, and give it a name you want to track:


Spoilers
[[File:ModdingMusic_SpoilerTag.png|frameless]]
Sometimes, you don’t want a song to be playable in the menu until the player has reached a certain point in the game. You can spoiler your music track by adding the SPOILER tag to the oggs, and give it a name you want to track:


As a result, the track will be hidden from the music menu when accessed.
As a result, the track will be hidden from the music menu when accessed.


To make it such that the song is unlocked, you will need to pass in the string to the function call used to open the music menu, likely by a condition checking a save variable.  For example:
To make it such that the song is unlocked, you will need to pass in the string to the function call used to open the music menu, likely by a condition checking a save variable.  For example:
<pre>
   local unlocks = {}
   local unlocks = {}
   if SV.temporal_pinnacle.ExpositionComplete then
   if SV.temporal_pinnacle.ExpositionComplete then
Line 84: Line 80:
   end
   end
   UI:ShowMusicMenu(unlocks)
   UI:ShowMusicMenu(unlocks)
 
</pre>






[[Category:Modding Assets]]
[[Category:Modding Assets]]

Revision as of 00:18, 4 October 2022

This page goes through the process of how to add new music to a PMDO mod.

Adding Files

Add music by placing the file in the Content/Music folder of your mod. It must be an OGG file:

It will appear in the music list of the Map or Ground Editor on the next refresh:

Looping

If you added an ogg, chances are it’s not set up to loop properly. You can set the loop points by editing the tags of the file. Use an editing software like MP3Tag.

You will need to edit the extended tags to include a LOOPSTART and LOOPLENGTH:

LOOPSTART specifies the start of the song’s loop in samples. (Samples are the smallest unit of time for an OGG)

LOOPLENGTH specifies the length of the song’s loop in samples. This is actually optional if the music file itself stops at the loop’s end.

You can find these loop points by opening the song in Audacity, playing through it and carefully pinpointing the times you want to loop together.

This can be an imperfect and laborious process. If the song you’re trying to use is popular enough, chances are it’s on Smas Custom Music. Using songs from this site makes the process much easier.

Looping BRSTMs with Smash Custom Music

Smash Custom Music is a site that hosts popular custom songs from various games. It’s particularly useful because it comes with loop points listed on the song page itself:

What’s even more convenient is that there exists programs to convert BRSTMs to OGGs while fully preserving the loop points in the tags. One such tool is found here.


Download and run the program, and you should see the following UI:

Choose to output as Looping OGG and select any downloaded BRSTM:

Once converted, you will get a .logg file in the output folder:

You can rename the extension to .ogg and it will work just fine.


If you inspect the tags, you’ll find them automatically generated:

Additional Data

If you speak to Kriketune and open the music menu, you may find that your song is missing data for its Title, Origin, and Artist, unlike the other songs:


In order to remedy this, simply add the data to the Title, Album, and Artist fields, respectively.

Spoilers

Sometimes, you don’t want a song to be playable in the menu until the player has reached a certain point in the game. You can spoiler your music track by adding the SPOILER tag to the oggs, and give it a name you want to track:

As a result, the track will be hidden from the music menu when accessed.

To make it such that the song is unlocked, you will need to pass in the string to the function call used to open the music menu, likely by a condition checking a save variable. For example:

  local unlocks = {}
  if SV.temporal_pinnacle.ExpositionComplete then
    table.insert(unlocks, "FINAL_BATTLE")
  end
  UI:ShowMusicMenu(unlocks)