• All episodes of the new Smash Brothers documentary 'Metagame' are available on Vimeo! Get Metagame Here

  • Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

  • Support Smashboards and get Premium Membership today!

BRSTM Rate Converter v1.0

libertyernie

Smash Ace
Joined
Oct 5, 2009
Messages
929
Location
Eau Claire, WI
I hacked together a script to lower a .brstm's sample rate. This is useful for lowering the size of the .brstm; of course, it also lowers the quality.
By default, the script will make an out.brstm where the bitrate is cut in half (i.e. 44100Hz --> 22050Hz, or 32000Hz --> 16000Hz.) You can also run it from the command line and tell it which bitrate you want, but if you enter a rate that's not a multiple of the one it was at before, the loop will be messed up a little bit.

Download here (v1.0.1)
The .zip contains a README.txt which you should read, because it says how to use the program. (Or, just drag and drop a .brstm onto RateConv.bat and it will make out.bat for you.)

The script uses a bunch of .exe files; some are the programs that actually make .brstms (I grabbed those from BCSM-GUI) and some are Cygwin programs. sox.exe is a program that can change the sample rate of a WAV file. SoX and Cygwin are both open-source under the GPL. Again, see the README.txt.
 

Segtendo

Smash Hero
Joined
Dec 1, 2009
Messages
5,021
Location
Illinois
NNID
Segtend0
3DS FC
2552-4940-9357
Hmm, I'll try this.

EDIT: Got an error message
Code:
'sh.exe' is not recognized as an internal or external command, operable program or batch file.
Press any key to continue . . .
 

Segtendo

Smash Hero
Joined
Dec 1, 2009
Messages
5,021
Location
Illinois
NNID
Segtend0
3DS FC
2552-4940-9357
Thanks a ton. File size is smaller, and I don't notice a decrease in quality. This can be useful for converting my 44100 sample rate BRSTMs.
 

Wiscus

(◕ω◕✿)
Joined
Mar 27, 2009
Messages
4,414
3DS FC
3840-5663-0679
Worked like a charm with 5 out of 6 that I tried last night.
Thanks a ton! ♥
 

Shadic

Alakadoof?
Joined
Dec 18, 2003
Messages
5,695
Location
Olympia, WA
NNID
Shadoof
Any chance you could look into something that would normalize and/or change the audio volumes to match Brawl's existing BRSTMs?

Probably a lot more difficult, but worth a shot. Cool program, as well.
 

Hozu

Smash Journeyman
Joined
Dec 11, 2009
Messages
347
Sounds very useful for those that don't make their own BRSTMs, or those that don't know how to change the sample rate through their audio editing program. Or if the BRSTM is already made I guess.
 

libertyernie

Smash Ace
Joined
Oct 5, 2009
Messages
929
Location
Eau Claire, WI
In case you have a 44100Hz BRSTM that someone made and you want to know what you can divide it by evenly:
44100 = 2*2*3*3*5*5*7*7
So you can divide it by 2, 3, 4, 5, 6, or 7. But eventually the quality drop becomes quite noticeable.

If you wanted the BRSTM to be 1/3 the size, you could run in the command line:
Code:
RateConv.bat [brstm file] 14700
Because 44100/3 = 14700.

I have the script default to half because it's the most reasonable option, and because both 44100 and 32000 (used by Wii games) can be divided by 2.
 

mofo_

Smash Ace
Joined
Jan 12, 2009
Messages
931
Location
The 808 State
wow this is really useful! id like to see this incorporated into BCSM-GUI along with :
- select output folder
- .brstm name stays the same after converting
- conversion queue for multiple brstms
 

Jimmyi

Smash Rookie
Joined
Aug 11, 2010
Messages
12
Good job.

But nsmb wii brstm can't work with this tool... Please check it.
 

libertyernie

Smash Ace
Joined
Oct 5, 2009
Messages
929
Location
Eau Claire, WI
I don't have any way to fix that, unless someone has a different command-line program (besides revb.exe) to extract and decode .brstm audio.
 

Jimmyi

Smash Rookie
Joined
Aug 11, 2010
Messages
12
W: H:\123\STRM_BGM_BONUS.brstm has sample rate 32000.
It might be from a retail game.
W: This software cannot always read newer .brstm files.
I: Converting H:\123\STRM_BGM_BONUS.brstm
I: New bitrate: 16000 samples/sec
E: Conversion was not successful.
 

libertyernie

Smash Ace
Joined
Oct 5, 2009
Messages
929
Location
Eau Claire, WI
The warning "This software cannot always read newer .brstm files." I put in myself, because I noticed that .brstms from Wii Sports Resort did not work either.
Ideally, a program like this would use BrawlLib, but that's far beyond what I can pull off.
 
Top Bottom