-
Notifications
You must be signed in to change notification settings - Fork 42
Creating Custom Music for your Board
- Prerequisites
- Getting Started
- Working with Music in Audacity
- Conversion to .brstm with BrawlCrate
- Conversion to .brstm with OpenRevolution
- Adding Music to your Descriptor File
- Descriptor Music Key Reference
- Next Steps
This guide uses Audacity, which can be downloaded for all platforms at https://www.audacityteam.org/download
However, we split by Operating System at the .brstm
level. This is because Windows users can use a nice GUI method, whereas Mac and Linux users have to get their hands dirty with the command-line. This guide covers both scenarios, so grab whichever file is relevant to your setup.
- OpenRevolution: https://github.com/ic-scm/openrevolution
Note
OpenRevolution must be built from source, and this process is covered in the Building OpenRevolution section. The OpenRevolution team has stated that they plan to one day have a GUI frontend, so this guide may eventually be able to be re-written to use it on all platforms.
Custom music is an important aspect in making new boards and backgrounds feel new. In the original game, arcade, auction, stockbroker, and venture card music tracks were global, but CSMM has now enabled these (and many other) music tracks to be set on a per-board or per-background basis. CSMM also now allows a single board to use multiple varying tracks for different switch states! Therefore, you can now set many tracks for a single board if you want to. Though this guide focuses largely on the creation of a single track, we list the various different tracks that are possible to set in your board's descriptor file in the Descriptor Music Key Reference section below.
Warning
Please be mindful of music copyright when creating music for your board. Distributing licensed music is a no-no, so please refrain from doing so. Irrespective of legality, people who want to stream to platforms like Twitch will not appreciate having sections of their VODs muted because you used a copyrighted song. So please keep this in mind when configuring music for your board.
The steps to import, convert, trim, and implement music into your board bundle are listed in this guide, but we begin by conceptualizing the workflow. This is the 40,000ft overview that familiarizes you with how it works more generally. Many people find that this helps them understand more easily, but if you just want to get to the technical stuff, you're welcome to skip straight to the next section, Importing a Track to Audacity.
We are going to perform the following steps in this section:
Task | Purpose |
---|---|
Import a track to Audacity | The start of the workflow. |
Normalize the track's volume | Ensure volume levels do not differ dramatically between songs. |
Trim the song | We're only going to loop a small portion, so it is helpful to begin by narrowing our scope. |
Find the sample at the end of the loop | This way, the end of the loop is always the end of the file. Efficiency at its finest. |
Delete everything after Loop End | When the loop ends, it restarts. So there is no reason to have any music data after this point. |
Find the sample at the start of the loop | By having the start of the loop be further into the song, you can have an intro that plays only once. |
To be clear -- we will be cutting out everything after the loop, so the only "loop point" we will have will be the start of the loop. This is partially why I wanted to conceptualize it here -- some programs, including BrawlCrate, allow you to pass in a Loop End sample number. If you have traditionally thought about your editing that way, then this will be a little bit of a shift for you conceptually. But it will not result in a large shift in your workflow overall.
Note
When a program allows you to pass in a Loop End sample number, it's doing what we're doing here behind the scenes -- taking that sample number and deleting everything after it.
Let's finally get to creating a track! For this guide, I'll use a personal favorite of mine. If you want to follow this guide in a 1:1 fashion, grab Rigil Kent System from the Star Cruiser for Sharp X68000 soundtrack over at KHInsider. Otherwise, you are welcome to use whatever music you would like, being sure to follow this guide only generally as specifics pertaining to the song will not apply to you.
Save the song somewhere (.flac
and .mp3
files are both fine), then open it in Audacity. If you're trying to open it from within Audacity, you'll need to go to File > Import > Audio.
Tip
Notice how the counters at the bottom of your Audacity window have arrows next to them. These arrows allow you to change how they display time. This means you can change them all to samples if you'd like to work natively in the unit of measurement that BrawlCrate and OpenRevolution do.
Press Ctrl + A to select the entirety of the waveform, then go to Effect > Normalize and set Normalize peak amplitude to 0.0 dB, then click OK.
Now that the track is imported, we're ready to start trimming our song. Select All with Ctrl + A, and click Play. Listen to the first two minutes of the track and think about how this would sound looped. For a small challenge, see if you can pinpoint the approximate time when this song repeats before reading to the next section! You probably can. I give you the answer in just a second, but being able to do this is the first step.
Tip
Keyboard and mouse users can zoom by holding Ctrl and using the scroll wheel to zoom in and out.
Mac OS trackpad users can use gestures in Audacity, and pinch-and-zoom will zoom in and out. Two-finger swiping can navigate the track by time, but be sure the mouse is hovered over the track and not one of the toolbars, otherwise your gestures may apply to it instead.
The song repeats right around 1:49. But, in order to make our music loop nicely, we need to be a little more specific with that. Zoom back out, and click a second or two after 1:49, then press Shift + J to select the area from the start of the track to your cursor. Now, press the following shortcuts in order:
- Ctrl + X (Cut)
- Ctrl + A (Select All)
- Ctrl + V (Paste)
This should more-or-less crop the song to the relevant portion so we can get more specific with our loop.
Zoom in toward the end of the song, and try to find the exact sample where the song loops. This song makes it pretty obvious, but if you need the answer, it you can see around where it is in the following screenshot:
Once you are satisfied that you've found it, press Shift + K to select the region between your cursor and the end of the track, and press DELETE on your keyboard to get rid of it.
Now, zoom in and scroll toward the beginning of the song. This song doesn't have an intro, so we just want to get the sample where the music actually begins. If your song has an intro, you would do more-or-less the same thing you did in the last section here, but you find the start of the loop instead. Only this time, we're not deleting anything.
Tip
You can actually speed up the process of navigating to the start or end of the track by pressing the HOME or END keys to snap to the front or the end of the song.
Since Macs do not ship with full-sized keyboards, Mac OS users can use the following shortcuts:
shortcut | command |
---|---|
⌘ + ← | HOME |
⌘ + → | END |
Fn can be used instead of ⌘, if you prefer it. These are actually global bindings for Macs; any application that needs these buttons on Mac OS will use these bindings! The more you know!
When you have found the sample you're looking for, take note of its sample number, and copy or type it somewhere. We will need it in the next section when we load the song into BrawlCrate or OpenRevolution. If you are following this guide verbatim and need help with this part, the answer is 479
as shown in the following screenshot:
Once your sample number has been stored somewhere, press Shift + K to select everything between the cursor and the end of the song. With this selected, you can hear your loop by playing in Looping mode with Shift + Space.
Depending on your version of Audacity and your operating system, the Project Sample Rate can be found in different places.
One possibility that is most likely if you are using a newer version of Audacity is that it could be under the Audio Setup -> Audio Settings menu as shown here:
Another possibility that is more likely if you're using an older version or are on Linux -- it could be shown at the bottom of the main window:
If it doesn't seem to be in either of the above places, it could still yet be found on the File > Export > WAV panel. If it's none of these places, please take a screenshot and post it in the Custom Street Discord so we can add it to this guide.
When you're ready, go to File > Export Audio. Make sure Format is set to WAV (Microsoft), and set Sample Rate to 32000Hz. If you are following this guide verbatim, save the file somewhere with the filename rigil_kent.wav
. Otherwise, name the file however you please and click OK on the metadata screen -- metadata does not matter for our purposes.
Important
Please set your music to a maximum sample rate of 32000Hz to help us keep download times short. The Wii does support higher sample rates, but we find that the quality delta is not great enough for most players to notice, and the enhancement is certainly not worth the increase in file size.
Note
Lower sample rates are fine, but using a sample rate lower than 32000Hz may degrade audio quality.
Now, move onto the next section for your platform.
Create a new .brstm file by going to File > New > BRSTM Audio Stream.
This option will open an Open File dialog. Find and open the .WAV file you just exported.
On this screen, our objective will be to configure a seamless loop that will play forever without being obvious to the player that it is looping. This is simple enough: try to set the start and end keyframes to the same beat on either side. Once they are lined up well enough, the loop will be ready to save and load into Fortune Street. The below is an overview of the BrawlCrate music window:
Thankfully, we've done this part in Audacity already. You should have a single value -- place that in the Loop Start box. Set Loop End to the very end of the song. If you are following this guide verbatim, the loop value of sample 479
will provide the seamless loop that we are looking for.
Check the Loop box in the lower-left corner for looping BGM, or leave it off for non-looping BGM, then move the playback marker somewhere between the start and end values. Click Play, and you can test the loop for yourself. If you are satisfied with the result, click Okay!
Note
Please note whether the track you're putting into the game is looping or non-looping. Looping music includes the main board theme, the stocks theme, the auction theme, etc. Non-looping music includes the promotion theme, the Slurpodrome End theme, the Buyout theme, etc. If you're unsure, just think about whether or not that type of music usually loops in game or not!
This is honestly easier than it sounds, but you will need to get your hands dirty with the Terminal. To set up OpenRevolution:
- Open the Terminal of your choice. On Mac, you can simply press ⌘ + Space and type Terminal, then press enter.
- Clone the OpenRevolution GitHub repository by pasting in
git clone [email protected]:ic-scm/openrevolution.git
and pressing enter. - Type
cd openrevolution
to enter the repository. - Type
./build.sh
to build OpenRevolution.
From here you can use OpenRevolution commands in your Terminal.
Tip
You might want to move this folder somewhere you'll be able to keep track of it, then open a new Terminal in that location. This way, you won't have to reconfigure OpenRevolution when you want to make music in the future! It's out of scope for this guide, but if you add this directory to your system's PATH, you'll be able to call brstm_converter
from anywhere, not just its directory.
With your terminal in the same path as the previous step, perform the following steps:
- Type
./brstm_converter
followed by a space. - Drag the .wav file you exported into the Terminal
- Type a space, followed by
-o
followed by another space. - Drag the exported
.wav
file into the Terminal again, but this time change the extension on it to.brstm
. - Type another space, followed by the looping flag
-l
, followed by one more space. - Finally, type loop point sample number you stored back in Finding the sample at the start of the loop. If you are using the same file as in the example, this value will be
479
.
In all, your command should look something like this:
./brstm_converter /path/to/file/rigil_kent.wav -o /path/to/file/rigil_kent.brstm -l 479
This command will take your input .wav
file and export it to a .brstm
file next to where your .wav
file is saved.
Note
The above command specifies the loop flag -l 479
. If your music is a track that is not intended to loop (such as a Take-A-Break theme), be sure to omit this.
So how do we test that this file sounds OK and is looping correctly on Mac and Linux? It turns out, there is a web-based .brstm
player called Nikku that can help us with this.
Go to the Nikku .brstm player page (https://kenrick95.github.io/nikku/) and upload your new .brstm
file. How does it sound? Does it work? Does it loop correctly? Even if things are slightly off, you now have the skills necessary to go back and fix them!
Now that you have a .brstm
music file, it's time to add it to your board's descriptor file. Thankfully, this is really easy! The file in the previous sections of the guide was intended to be a map theme, so the last thing we need to do before we can add it to our descriptor file is set its volume.
While the .brstm
format does support setting volume, CSMM actually takes this information from the .brstm
filename. By default, CSMM will assume a BRSTM music file is at "50" volume. To adjust this, append the number you want to the end of the brstm file name. For example, rigil_kent.25.brstm will have a volume that's half the default amount, while rigil_kent.100.brstm will have a volume that's double the default amount. If you're unsure, feel free to leave the file name unchanged, and you can come back and adjust this later after you've tested how it sounds in-game.
Take the above filename, minus the .brstm
file extension and add it to your descriptor like so, adding the music
and map
keys if they are not already present:
music:
map: rigil_kent.80
Important
Note that this entry does NOT include the .brstm file extension!
If you want to set a different theme for each board state, you can do so using the .yaml array syntax:
music:
map:
- rigil_kent.80
- some_other_song.75
- ...etc
There are a plethora of different keys you can set music for, too. Please see the next section, Descriptor Music Key Reference, for more details.
The keys you can specify in your descriptor file are as follows:
Key | Type | What is it? |
---|---|---|
download | single or list | The music archive download link(s). |
map | single or list | The main board BGMs. If specified as a list, the themes will represent each switch state. |
auction | single | Plays during Auctions. |
badVentureCard | single | Plays when venture cards 13 and 103 are drawn. |
bankruptcy | single | Plays when a player becomes bankrupt. |
dartOfGold | single | Plays during Dart of Gold. |
domination | single | Plays when a player purchases all shops in a district. |
forcedBuyout | single | Plays when a player forcibly buys another player's shop. Also plays for venture cards 65, 79, 98. |
guestAppear | single | Plays when a guest (Goodybag, Healslime, or Lakitu) arrives. |
guestLeave | single | Plays when a guest (Goodybag, Healslime, or Lakitu) leaves. |
memoryBlock | single | Plays during Memory Block. |
promotionMario | single | Plays when a Mario-based character gets a promotion. |
promotionDragonQuest | single | Plays when a Dragon Quest-based character gets a promotion. |
promotionMii | single | Plays when a Mii-based character gets a promotion. |
roundTheBlocks | single | Plays during Round the Blocks. |
roundTheBlocks777 | single | Plays when a player wins at least one row of 777s in Round the Blocks. |
roundTheBlocksWin | single | Plays when the player wins a non-jackpot prize in Round the Blocks. |
slurpodromeRace | single | Plays during the Slurpodrome race. |
slurpodromeSelect | single | Plays while players are able to select their Slimes in Slurpodrome. |
slurpodromeStart | single | The starting fanfare of the race in Slurpodrome. Plays between Select and Race. |
slurpodromeWin | single | Plays at the end of the Slurpodrome Race, regardless of who wins. |
stock | single | The stockbroker theme. Plays on the Buy/Sell stock screen. |
takeAbreak | single | The Take-A-Break theme. Plays when a player lands on a Take-A-Break square or pulls cards 9 or 34. |
targetMet | single | Plays when a player has reached the Target Amount, but has not yet returned to the bank. |
ventureCards | single | Plays while the Venture Card Selection screen is activated. |
win | single | The game's ending fanfare. Plays both during the congratulations screen and the statistics screens that follow. |
Keys marked as type single
can only ever accept a single value, whereas keys that can also be a list can accept multiple values using the .yaml
array syntax.
music:
download:
- https://nikkums.io/cswt/BGM/WiiU.music.zip
- https://drive.google.com/u/0/uc?id=1k1fRXR2gTyD35G93W3bANxKB4UTQv__6&export=download&confirm=1
If you need help with anything, feel free to reach out! The best place to reach out is on Discord: there are several active communities that can help with the various aspects of mod-making.
- Custom Street on Discord: https://discord.gg/DE9Hn7T
- Brawl Knowledge Compendium (for help with BrawlCrate): https://discord.gg/s7c8763
- For the latest Fortune Street modding tools: https://github.com/FortuneStreetModding