Importing Custom Music: Difference between revisions

From Zenith
Jump to navigation Jump to search
Content added Content deleted
m (Change wording)
(small rewording, formatting and other tweaks)
Line 1: Line 1:
This guide will teach you everything you may need for importing custom music for your mod.
This guide will teach you everything you may need for importing custom music into the game.


==Prerequisites==
==Prerequisites==
Line 6: Line 6:
*[https://www.audacityteam.org/download/ Audacity]
*[https://www.audacityteam.org/download/ Audacity]


=== Important notes before starting ===
* Citric Composer is very buggy and has been unmaintained for some time. You may experience frequent crashes.
* '''The entire BFSAR cannot go above the original file size.''' Since the game loads this entire file into memory, it allocates a specific size for it. The file size can always go lower, but if it goes above it will cause issues (likely crash the game).
** If you need to free up space, replace the Yoshi and Baby Yoshi tracks that correspond with whatever track is being replaced or any unused tracks with this [https://static.miraheze.org/zenithwiki/9/9c/Empty.wav empty wav] (courtesy of Baron).
==Preparing the audio file==
==Preparing the audio file==
[[File:normalizeeffect.png|thumb|420x420px|Setting project sample rate and applying normalize effect.]]
First, open your audio file in Audacity. It is preferred to use a FLAC, MP3, or WAV file.
First, open your audio file in Audacity. It is preferred to use a '''FLAC''', '''MP3''', or '''WAV''' file.

Set the '''Project rate''' to '''32000''' Hz (This can be found in the bottom left corner of the window)


Set the '''Project Rate''' to '''32000''' Hz (This can be found in the bottom left corner of the window)
Now, apply the '''normalize''' effect. This will make the audio as loud as possible (To match the game's audio) without causing distortions to the music.


Now, apply the '''Normalize''' effect. This will make the audio as loud as possible (To match the game's audio) without causing distortions to the music.
[[File:normalizeeffect.png|510x510px]]


If a window opens, you can leave the settings as default and press '''OK'''.
If a window opens, you can leave the settings as default and press '''OK'''.
Line 21: Line 24:
First, set the playback rate to measure in samples.
First, set the playback rate to measure in samples.


[[File:Audacity Y2vnQWH9HP.png]]
[[File:Audacity Y2vnQWH9HP.png|300x300px]]
[[File:Audacity_ribmeJnQ6d.png|thumb|577x577px]]


Next, find two similar groups of audio that we can use.


Next, find two similar groups of audio that we can use. (See image on the right)
[[File:Audacity_ribmeJnQ6d.png|774x774px]]


To create a loop, right click the timeline and select "Loop On/Off". When you do this you'll note the looping region in the timeline.
To create a loop, right click the timeline and select "'''Loop On/Off'''". When you do this you'll notice the looping region in the timeline.
[[File:Audacity_XncifpnsBP.png|left|343x343px]]
Now drag on the timeline to create loop points.


When you find your loop points, you can press play to preview them.
[[File:Audacity_XncifpnsBP.png]]


To get a perfect loop you should not be able to tell that the song looped, and it should sound as if the song just continued playing.
Now drag on the timeline to create loop points.

When you find your loop points, you can press play to preview them. To get a perfect loop you should not be able to tell that the song looped, and it should sound as if the song just continued playing.


Now, select the looping area in your audio.
Now, select the looping area in your audio.
Line 44: Line 47:


== Exporting our file ==
== Exporting our file ==
Export as a WAV file.
Export as a '''WAV''' file.


[[File:exportwav.png]]
[[File:exportwav.png]]


== Importing into Citric ==
== Importing into Citric ==
First, open the game's bfsar. This file is located in [[Filesystem/content/CAFE/sound/cafe redpro stream|/content/CAFE/sound/cafe_redpro_sound.bfsar]] and holds all audio used in the game. You can open it with '''File''' -> '''Open'''.
First, open the game's '''BFSAR'''. This file is located in [[Filesystem/content/CAFE/sound/cafe redpro stream|/content/CAFE/sound/cafe_redpro_sound.bfsar]] and holds all audio used in the game. You can open it with '''File''' -> '''Open'''.


[[File:openbfsar.png|770x770px]]
[[File:openbfsar.png|770x770px]]


In this tutorial the music being replaced will be the desert music, you can change this for any other music of your choice.
=== Important notes before starting ===


All music tracks are found inside '''Wave Archives'''. You can open the dropdown menu to reveal them.
* Citric Composer is very buggy as it has been unmaintained for some time. You may experience frequent crashes.
* The entire BFSAR cannot go above 243205816 bytes, the original file size. Since the game loads this entire file into memory, it allocates a specific size for it. The file can always go below it, but if it goes above it will cause issues. If you need to free up space, replace the Yoshi and Baby Yoshi tracks that correspond with whatever track is being replaced or any unused tracks with this [https://static.miraheze.org/zenithwiki/9/9c/Empty.wav empty wav] (courtesy of Baron).


The desert theme is '''WARC_13_GUESS_GROUP_BGM_SABAKU''', so double-click to open that Wave Archive (or the alternative one you have chosen to replace).


Once you are in the ''War Brewer'', it is advised to NOT use the sound player on the side. It will likely cause a crash.


You can click to expand the waves inside the archive.
In this tutorial I will be replacing the desert music.


[[File:warbrowser.png|767x767px]]
All music tracks are found inside Wave Archives. You can open the dropdown menu to reveal them.


Double-click the first wave in the list. This will usually hold the base track of the music we are trying to replace.
The desert theme is '''WARC_13_GUESS_GROUP_BGM_SABAKU''', so open that Wave Archive. You can do this by double clicking on it.


'''NOTE:''' Track display or storage order is not necessarily guaranteed to be ordered, "first" here refers to the track with a '''0''' (zero) in the name, NOT necessarily the first track you see displayed on the list.
Once you are in the war browser, we suggest you do not use the sound player on the side. It will likely cause a crash.


'''NOTE (2):''' If there is only one track, the name or "being first" doesn't matter, just open the singular track.
You can click to expand the waves inside the archive.

[[File:warbrowser.png|767x767px]]

Double click the first wave in the list. This will usually hold the base track of the music we are trying to replace.


Now you can import the wav file that was exported from Audacity in the last section with '''Edit''' -> '''Import file'''.
With the wave open in ''Isabelle Sound Editor'', you can then import the '''WAV''' file that was exported from Audacity in the last section with '''Edit''' -> '''Import file'''. (or ''Ctrl + Shift + I'')


[[File:importfile.png|768x768px]]
[[File:importfile.png|768x768px]]
Line 88: Line 88:
[[File:addloopinfo.png|766x766px]]
[[File:addloopinfo.png|766x766px]]


After clicking on Update Project Info, also be sure to select '''Eliminate Loop Static''' and then '''Update Project Info''' once again. This will slightly change the loop points so that they function correctly in-game without the loop resulting in loud, distorted audio.
After clicking on '''Update Project Info''', also be sure to select '''Eliminate Loop Static''' and then '''Update Project Info''' once again. This will slightly change the loop points so that they function correctly in-game without the loop resulting in loud, distorted audio.

You can see what the loop will sound like by checking '''Loop Playback''' on the right side of the window and then playing the audio, skipping to a spot in the track before the red bar. If the track loops without noticeable issues, you're now ready to save!


Press ''Ctrl + S'' or '''File''' -> '''Save''' to save the file.
You can see what the loop will sound like by checking '''Loop Playback''' on the right side of the window and then playing the audio, skipping to a spot in the track before the red bar. If the track loops without noticeable issues, you're now ready to save! Press '''Ctrl+S''' or '''File''' -> '''Save''' to save the file.


If there is an issue, then it is likely due to the loop points shifting too much after selecting Eliminate Loop Static. If this happens, go back to Audacity and find a slightly different looping area, then try again with the new loop info.
If there is an issue, then it is likely due to the loop points shifting too much after selecting '''Eliminate Loop Static'''. If this happens, go back to Audacity and find a slightly different looping area, then try again with the new loop info.


Once you have saved, go back to the War Browser.
Once you have saved, go back to the ''War Brewer''. (By closing the ''Isabelle Sound Editor'' window)


Set the internal wave version to 1 1 0, then click '''Force Internal Wave Version'''.
Set the internal wave version to 1 1 0, then click '''Force Internal Wave Version'''.
Line 100: Line 102:
[[File:war version.png]]
[[File:war version.png]]


Now save the file in War Browser, and save it in Citric Composer.
Now save the file in ''War Brewer'', close it, and then save the whole BFSAR in Citric Composer's main window.


You are done! You can now preview the file in-game.
You can now preview the file in-game.


[[Category:Guides]]
[[Category:Guides]]

Revision as of 13:38, 5 May 2023

This guide will teach you everything you may need for importing custom music into the game.

Prerequisites

Important notes before starting

  • Citric Composer is very buggy and has been unmaintained for some time. You may experience frequent crashes.
  • The entire BFSAR cannot go above the original file size. Since the game loads this entire file into memory, it allocates a specific size for it. The file size can always go lower, but if it goes above it will cause issues (likely crash the game).
    • If you need to free up space, replace the Yoshi and Baby Yoshi tracks that correspond with whatever track is being replaced or any unused tracks with this empty wav (courtesy of Baron).

Preparing the audio file

Setting project sample rate and applying normalize effect.

First, open your audio file in Audacity. It is preferred to use a FLAC, MP3, or WAV file.

Set the Project Rate to 32000 Hz (This can be found in the bottom left corner of the window)

Now, apply the Normalize effect. This will make the audio as loud as possible (To match the game's audio) without causing distortions to the music.

If a window opens, you can leave the settings as default and press OK.

Getting loop points

In this section you will find loop points so that the music will be able to repeat while playing. (You can skip this section if the track you are importing won't loop)

First, set the playback rate to measure in samples.


Next, find two similar groups of audio that we can use. (See image on the right)

To create a loop, right click the timeline and select "Loop On/Off". When you do this you'll notice the looping region in the timeline.

Now drag on the timeline to create loop points.

When you find your loop points, you can press play to preview them.

To get a perfect loop you should not be able to tell that the song looped, and it should sound as if the song just continued playing.

Now, select the looping area in your audio.

To prevent clicks in the audio after selecting the looping area, be sure to select at zero crossings with Select -> At Zero Crossings.

After you have done that, keep note of the selection sample size. You will need this later when importing the audio into Citric.

Exporting our file

Export as a WAV file.

Importing into Citric

First, open the game's BFSAR. This file is located in /content/CAFE/sound/cafe_redpro_sound.bfsar and holds all audio used in the game. You can open it with File -> Open.

In this tutorial the music being replaced will be the desert music, you can change this for any other music of your choice.

All music tracks are found inside Wave Archives. You can open the dropdown menu to reveal them.

The desert theme is WARC_13_GUESS_GROUP_BGM_SABAKU, so double-click to open that Wave Archive (or the alternative one you have chosen to replace).

Once you are in the War Brewer, it is advised to NOT use the sound player on the side. It will likely cause a crash.

You can click to expand the waves inside the archive.

Double-click the first wave in the list. This will usually hold the base track of the music we are trying to replace.

NOTE: Track display or storage order is not necessarily guaranteed to be ordered, "first" here refers to the track with a 0 (zero) in the name, NOT necessarily the first track you see displayed on the list.

NOTE (2): If there is only one track, the name or "being first" doesn't matter, just open the singular track.

With the wave open in Isabelle Sound Editor, you can then import the WAV file that was exported from Audacity in the last section with Edit -> Import file. (or Ctrl + Shift + I)

Once you have imported your file, select Project Info.

First, make sure the checkbox for Loop is checked, as this will allow the track to loop in-game.

Now you can enter the loop info you found before. Once you have entered it, click Update Project Info, then you can listen to it at the top.

You may need to expand the Citric window if you cannot see the Update Project Info button.

After clicking on Update Project Info, also be sure to select Eliminate Loop Static and then Update Project Info once again. This will slightly change the loop points so that they function correctly in-game without the loop resulting in loud, distorted audio.

You can see what the loop will sound like by checking Loop Playback on the right side of the window and then playing the audio, skipping to a spot in the track before the red bar. If the track loops without noticeable issues, you're now ready to save!

Press Ctrl + S or File -> Save to save the file.

If there is an issue, then it is likely due to the loop points shifting too much after selecting Eliminate Loop Static. If this happens, go back to Audacity and find a slightly different looping area, then try again with the new loop info.

Once you have saved, go back to the War Brewer. (By closing the Isabelle Sound Editor window)

Set the internal wave version to 1 1 0, then click Force Internal Wave Version.

Now save the file in War Brewer, close it, and then save the whole BFSAR in Citric Composer's main window.

You can now preview the file in-game.