• 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!

How to Create Custom HPS Music Files Using MeleeHPS (Includes BRSTM File Conversion Guide!)

Zumbach

Smash Rookie
Joined
Jan 21, 2014
Messages
22
Location
Washington
3DS FC
1736-1505-4150
where would i go about finding dspadpcm.exe? i can't find it anywhere :(

edit: it's not in the folder, and when i try to load my 2 mono files (left and right) using run.bat in /MeleeHps/dps/ it says that it cannot open them for reading. there is nothing inside the tool folder (in the meleehps/dps/ folder)

edit#2: FIXED, files were .mp3 instead of .wav. went into audacity and converted them and it worked!
 
Last edited:

Akli LT

Smash Rookie
Joined
Oct 29, 2015
Messages
13
I have a problem. so I made some hps song and they work fine most of the time but sometimes they just doesn't play at all on wii, they work perfectly on dolphin. this also happens with the hps songs from the melee music compendium thread . so I am sure I didn't screw up making the songs. I also replaced the mvhowto file en the mvsomething15 file to make space. I am using a pal iso with texture mods. I am running the game trouth dios mios.
 
Last edited:

BARKLEYBIGHOTSLAMJAM

Smash Rookie
Joined
Sep 20, 2015
Messages
2
Is it possible for someone to make a video guide for this? I tried very hard to add music, but keep getting stumped around the hex editor part.
 

Godwin_Point

Smash Cadet
Joined
May 25, 2014
Messages
70
I can't promise anything(Exam week right now) but I'll try to record it, or at least use step by step screenshots

(If you mean to add music throught the 20xx playlist mode)
 

Gehis514

Smash Apprentice
Joined
Jul 25, 2015
Messages
119
Switch FC
SW 4004 9260 8249
I've been making .hps files for a long time now, but just recently, whenever i select build.bat at the end of the process, it says "error opening list file." What could this be?
 

EZPZ

Smash Apprentice
Joined
Jan 18, 2014
Messages
92
What should I do if I tried normalizing and amplifying a file but it is still too quiet in game? Just try to find a different file?
 
Last edited:

DruP

Smash Rookie
Joined
Feb 3, 2015
Messages
15
Location
Seattle, WA | Chicago, IL
Okie.
Amplifying and Normalizing. These are two things you'll get a feel for if you've ever messed with audio files.
It's pretty simple, so...

LETS GO:
Pick out the audio file you want to use. Anything will do.
Download Audacity if you don't have it already: http://web.audacityteam.org/

Once you've got both of those, install and open Audacity and drag and drop your music file into the program. It can be a variety of formats, WAV, MP3, FLAC, it doesn't matter as long as Audacity can open it. Some audio files are way to loud to be used in Melee. If these audio files are to loud, they can make the music sound trashy and have static blips, along with drowning out the sfx. You can fix these problems by normalizing your audio files/amplifying them so they are at the right volume in the game at all times.


NORMALIZING AUDIO (do this first):
First off, all normalizing does is set the correct DC offset (Usually setting it to 0.0 is fine. Removing it defaults to this in Audacity. The maximum amplitude should be -1.) and adjust multiple audio channels to the same peak level, removing any level disparity between them. This is good because it makes quieter parts in a file louder, and louder parts quieter. That way songs don't suddenly 'boom' on you.

Highlight the wavelength of your entire audio file. The entire thing.
Go to the 'effect' tab.
Click on 'normalize'. It's about halfway down the list.
Make sure the first two check boxes are checked. The last one doesn't have to be checked.
You're done normalizing your audio. :3


AMPLIFYING AUDIO (do this second):
Amplifying audio allows you to change the level of one or more tracks or channels by the same amount, preserving the balance between them. You can amplify up or down depending on your track's wavelength. DO NOT LET THE AUDIO CLIP. MAKE SURE ALLOW CLIPPING IS NOT CHECKED. Make sure none of the peaks of the audio cross the top or bottom of the spectrum.

Highlight the wavelength of your entire audio file. Again, the entire thing.
Go to the 'effect' tab.
Click on 'amplify'. You can't miss it.
Make sure the 'allow clipping' box is unchecked.
Adjust the amplification slider slightly left or right depending on how loud your audio needs to be (left = softer, right = louder). This is something you'll need to get a feel for. You don't want the audio to be to loud or to quiet ingame. Here's around what your audio's wavelength should look like:

(Don't make it too loud or too quiet!)
After you're all done fixing your audio file, your audio is... almost ready to go! Follow the steps listed in the main post for more stuff.


OTHER STUFF:
When you export your audio, don't be alarmed if your WAV file is like 50mb. That's fine.

I would additionally like to recommend the program WinAmp and the plugin in_cube that allows you to test your HPS files without having to inject them into the game. It can help sometimes :p

How do I know when an hps file works or not if I play it in winamp?
 

jmlee337

Smash Journeyman
Joined
May 8, 2008
Messages
303
Slippi.gg
LEE#337
As of 2016/04/13, the latest version and information about dsp2hps is available at https://github.com/jmlee337/dsp2hps

I heavily reworked MeleeHps to be way more user friendly and produce slightly better results
seriously, it now literally takes 5 seconds to go from audiofile.anyformat to audiofile.hps

Download

changelog v3 (2016/04/13):
  • rewrote the conversion from DSP to HPS in C++
  • since this is sufficiently removed from what MeleeHps was, I'm calling my tool 'dsp2hps'
  • calculates all block header values correctly to remove all pops from the final audio. to my knowledge, this is the only tool to write the correct P/S, hist1, and hist2 values in the HPS block headers
  • I've uploaded my code to github: https://github.com/jmlee337/dsp2hps
changelog v2 (2016/04/01):
  • you can convert files in batch! Just drag them all onto run.bat
  • here's a vid
changelog v1 (2016/03/31):
  • no more opening with audacity and clicking and saving to format the file correctly
  • no more fiddling with hex editors
  • no more copy pasting samples-this and blocks-that
  • drag-and-drop or invoke from the command line
  • more accurate block headers mean fewer/smaller pops during playback
  • parameterized output file names let you do a bunch in a row without overwriting your output
How do I use this?
how to use (video form):
how to use (text form):
  1. move your audio file (in any format) to the MeleeHps folder
  2. drag it onto 'run.bat'
  3. that's it.
  4. you can also invoke from the command line: run.bat myaudiofile.ogg
That's so easy! What's the catch??
  • you still have to make sure your source audio file loops correctly
  • this only works for 'normal' loops, not 'custom' loops
How'd you do it??? (technical details)
  • audacity
    i included ffmpeg, which can convert from any format to 16bit WAV 32000 kHz from the command line

  • hex editors
    i configured main.asm to automatically add the correct padding. I discovered that DSP data must be 32-byte aligned! 16-byte alignment also seemed to work for me, but all the stock HSPs are 32-byte aligned. This must be why achilles sometimes found that adding a pad in a hex editor didn't always work the first time.

  • samples/blocks
    well simply, that data is all calculable from the DSP files themselves. I had to do a horrendous hack to make it work though (the batch file replaces the first line of main.asm, that's why SampleLength is defined there)

  • drag and drop
    since you don't have to edit the DSPs or main.asm before running the assembler, the whole conversion process can be done in one batch script

  • more accurate block headers
    the original main.asm used the first block header in the file for every single block. I made it use the correct block header, but there's two values (hist1 and hist2) that actually require decoding the DSP block to set correctly. This makes any audible pops fewer and smaller, but does not solve the problem completely. I included the most complete documentation I could assemble for the format of HSP audio files in main.asm

  • output file names
    just a small quality of life edit. the output file now has the format [inputfilename].hps, so songname.mp3 would produce songname.mp3.hps as the output. This means you can run a bunch in a row and move out all your hps files once you're done
what are you working on next?
  • rewriting all the main.asm + assembler business in an actual programming language to make the world a little more sane
  • further parameterizing so you'll be able to drag all the files onto run.bat and convert all of them in one go
  • writing hist1 and hist2 in the HSP headers correctly to remove popping all together
  • Adding support for custom loops (loop points at any arbitrary sample, not just block boundaries)
 
Last edited:

jmlee337

Smash Journeyman
Joined
May 8, 2008
Messages
303
Slippi.gg
LEE#337
Deconimus Deconimus also posted an improved MeleeHps! It has a GUI and can do batches of files, the only catch is you have to have java installed. Check it out here: http://smashboards.com/threads/melee-audio-converter-aka-hps-builder.434288/

I also answered a couple questions about my program in that thread:
Mine defaults to a block size of 0x00010000, same as the built-in audio files. This value is configurable (see main.asm)
The input audio files are always converted to 16-bit 32000 Hz WAV

As Deconimus Deconimus said, custom loops are mostly just a matter of UI. There's also no reason we can't set the loop point to any arbitrary sample. (No more 'pick the closest block start and pad your file with silence at the beginning')
EDIT: I added batching support! See the original post above!
 
Last edited:

Decipio-Carmen

Smash Apprentice
Joined
Apr 2, 2010
Messages
88
jmlee337 jmlee337 ... I had just made my own automated MeleeHPS tool and didn't realize that you made this LOL

My version is slightly different but it supports custom loops. For basic loops, yours is superior.

Here's my version:

http://www.mediafire.com/download/2wdfxzc27h08e1c/MeleeHps.zip

How to use:

1. Download and extract MeleeHPS.zip

2. Follow the beginning steps in the Achilles' OP to generate LEFT.wav and RIGHT.wav
***IMPORTANT NOTE: Use the "Offsets.txt" that I provided to figure out which block number to loop to. I use a certain blocksize (0x8000) for these offsets. For info on why I do this, read:
http://smashboards.com/threads/fixi...-of-silence-when-used-with-nintendont.434039/

3. Copy LEFT.wav and RIGHT.wav into the /dsp/ folder

4. double click generatehps.bat in MeleeHPS, wait for it to ask what block number to loop to:


5. Type in your block number and then hit enter. If you're doing a basic loop, just use 1 for your block number.

6. Wait for it to close. output.hps is your new HPS file.

So far, I have tested this in Windows 8.1 and Windows 7. I used it to create ~50 songs for the new 20XX 4.05, and I checked each one to make sure it looped correctly.
 
Last edited:

jmlee337

Smash Journeyman
Joined
May 8, 2008
Messages
303
Slippi.gg
LEE#337
big update.
  • rewritten in c++
  • 100% pop-free audio
  • github repo

As of 2016/04/13, the latest version and information about dsp2hps is available at https://github.com/jmlee337/dsp2hps

changelog v3 (2016/04/13):
  • rewrote the conversion from DSP to HPS in C++
  • since this is sufficiently removed from what MeleeHps was, I'm calling my tool 'dsp2hps'
  • calculates all block header values correctly to remove all pops from the final audio. to my knowledge, this is the only tool to write the correct P/S, hist1, and hist2 values in the HPS block headers
  • I've uploaded my code to github: https://github.com/jmlee337/dsp2hps

what are you working on next?
  • rewriting all the main.asm + assembler business in an actual programming language to make the world a little more sane
  • writing hist1 and hist2 in the HSP headers correctly to remove popping all together
  • Adding support for custom loops (loop points at any arbitrary sample, not just block boundaries)
 
Last edited:

Decipio-Carmen

Smash Apprentice
Joined
Apr 2, 2010
Messages
88
big update.
  • rewritten in c++
  • 100% pop-free audio
  • github repo

As of 2016/04/13, the latest version and information about dsp2hps is available at https://github.com/jmlee337/dsp2hps

changelog v3 (2016/04/13):
  • rewrote the conversion from DSP to HPS in C++
  • since this is sufficiently removed from what MeleeHps was, I'm calling my tool 'dsp2hps'
  • calculates all block header values correctly to remove all pops from the final audio. to my knowledge, this is the only tool to write the correct P/S, hist1, and hist2 values in the HPS block headers
  • I've uploaded my code to github: https://github.com/jmlee337/dsp2hps

what are you working on next?
  • rewriting all the main.asm + assembler business in an actual programming language to make the world a little more sane
  • writing hist1 and hist2 in the HSP headers correctly to remove popping all together
  • Adding support for custom loops (loop points at any arbitrary sample, not just block boundaries)
Do you plan on asking for time in seconds as input to create custom loops? I think that would probably be the most convenient way to add support for custom looping points.
 

jmlee337

Smash Journeyman
Joined
May 8, 2008
Messages
303
Slippi.gg
LEE#337
Do you plan on asking for time in seconds as input to create custom loops? I think that would probably be the most convenient way to add support for custom looping points.
I do plan to add support for custom looping points
 

SleekSheik

Just Who the Hell Do You Think I Am?
Joined
Jan 21, 2015
Messages
28
Location
Sterling, Virginia
Can anyone help me change the titles for the music files in the 20XX 4.05 hack pack debug menu. I have no idea how to do it
 

Doq

Smash Lord
Joined
Dec 28, 2012
Messages
1,037
Location
The Lab, Sweet Home, OR
Idunno. I tried to make it as stupidly simple as possible. Find music, click music note, doneski.

I also despise Java as a programming language.
 
Last edited:

Deconimus

Smash Cadet
Joined
Feb 24, 2015
Messages
26
Can anyone help me change the titles for the music files in the 20XX 4.05 hack pack debug menu. I have no idea how to do it
Might want to have a look at this.

If you only want to change the titles though, you could also do this by hand with a hex-editor, to do so, either have a look at the "How it works" section in the thread I linked, or this comments tree on reddit.
 

jmlee337

Smash Journeyman
Joined
May 8, 2008
Messages
303
Slippi.gg
LEE#337
Custom Loops (aka MeleeHps is 100% obsolete) Achilles1515 Achilles1515

https://github.com/jmlee337/dsp2hps/releases/tag/v5

  • No calculating blocks
  • No more torturing your source audio file so that your loop point lines up on a block boundary
  • You can loop to any arbitrary timestamp, down to a precision of 0.00175 seconds
How to custom loop:
  1. setup your source audio file
  2. set the loop point (in seconds) in custom_stereo.bat and save
  3. drag your source audio file onto custom_stereo.bat
Here's a screenshot showing where to set the loop point: http://imgur.com/wdnPyoc
 

Attachments

hotdogturtle

Smash Master
Joined
Feb 15, 2007
Messages
3,503
I haven't touched Melee mods since last year (when I posted), and just this week I was thinking of coming back and converting another song. I just haven't gotten around to it yet. So now that you've posted this I can test it out and save myself a ton of time.
 

Doq

Smash Lord
Joined
Dec 28, 2012
Messages
1,037
Location
The Lab, Sweet Home, OR
Custom Loops (aka MeleeHps is 100% obsolete) Achilles1515 Achilles1515

https://github.com/jmlee337/dsp2hps/releases/tag/v5

  • No calculating blocks
  • No more torturing your source audio file so that your loop point lines up on a block boundary
  • You can loop to any arbitrary timestamp, down to a precision of 0.00175 seconds
How to custom loop:
  1. setup your source audio file
  2. set the loop point (in seconds) in custom_stereo.bat and save
  3. drag your source audio file onto custom_stereo.bat
Here's a screenshot showing where to set the loop point: http://imgur.com/wdnPyoc
brb updating d2hgui
 

LunarySSF2

Smash Rookie
Joined
Apr 8, 2015
Messages
20
Location
Mons, Belgium
2 out of my 3 hps files (with a normal loop) crashes before looping. I created at least two lines of 00 (once 3).
Do you have any idea why it just crashes sometimes? Or should I do the process again and test it?

(Hi Doqk)
 
Last edited:

jmlee337

Smash Journeyman
Joined
May 8, 2008
Messages
303
Slippi.gg
LEE#337
2 out of my 3 hps files (with a normal loop) crashes before looping. I created at least two lines of 00 (once 3).
Do you have any idea why it just crashes sometimes? Or should I do the process again and test it?

(Hi Doqk)
Your DSP files need to be padded to 32 bytes (the address of the last 0 should end in 1F, 3F, 5F, 7F, 9F, BF, DF, FF)

Or you could use a tool that's actually meant to be used by real people: http://smashboards.com/threads/melee-audio-converter-aka-hps-builder-v1-1c-update-2016-04-14.434288/
https://github.com/jmlee337/dsp2hps/releases/tag/v5
 
Last edited:

LunarySSF2

Smash Rookie
Joined
Apr 8, 2015
Messages
20
Location
Mons, Belgium
Or you could use a tool that's actually meant to be used by real people
I installed Java but whenever I use Melee Audio Converter I get this nonsense :
----Processing-"PLAY SSF2 GUYS stereo.wav":----

Converting and splitting music file.. done
Copying channels.. done
Converting to DSP files.. done
Padding DSP files.. done
Packing DSP files into HPS (using dsp2hps).. done
Cleaning a bit.. done

java.nio.file.NoSuchFileException: C:\Users\Elie\Documents\20XX\Melee Audio Converter\meleehps\output.hps
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileCopy.move(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.move(Unknown Source)
at java.nio.file.Files.move(Unknown Source)
at visionCore.util.Files.moveFileUsingOS(Files.java:270)
at main.Main.main(Main.java:105)
And whenever I use dsp2hps, I get a MSCVP140.dll error. When I download that file and put it in the dsp2hps folder, I then get a 0xc00007b error.
I'm too lazy to fix this crap so I'm sticking with HPS Helper and whatnot. But hey it is still really easy to use! You just need copy paste stuff you don't understand and that's it !

BUT around 1 hour ago I've been having a huge problem that I can't go around.
My HPS file automatically loops from the 19th block to the 67th (values from the freshly downloaded zip), even though I hadn't touched anything. It makes a custom loop for no reasons.
So I thought "what if I custom loop from block 0 to [last block number]?" well nope, it crashes.
What if I loop from block 1 to [last block number] ? Still crashes.
Therefore I'm stuck with loops which start at the beginning BUT end at the penultimate block which make me cringe really hard.

What should I do? Should I just add a silent block at the end of my wav files? Should I fix those errors anyway? Do you have any miracle solutions that I probably won't understand but work anyway? Please tell me.
 
Last edited:

LunarySSF2

Smash Rookie
Joined
Apr 8, 2015
Messages
20
Location
Mons, Belgium
I can't install Visual C++ because the installation just never ends. (windows7_msu_x64...)
I've been trying to fix this since you told me but I don't know, I'm just gonna keep searching.
Actually, just adding one block of silence is not that much of a pain but I haven't tested it yet. It might even solve all crashings
 
Last edited:

TGE

Smash Rookie
Joined
May 10, 2014
Messages
20
Location
Netherlands
I can't install Visual C++ because the installation just never ends. (windows7_msu_x64...)
I've been trying to fix this since you told me but I don't know, I'm just gonna keep searching.
Actually, just adding one block of silence is not that much of a pain but I haven't tested it yet. It might even solve all crashings
Try installing Visual Studio 2015. Even if you're no programmer, it comes with every dependency you'd ever need.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
I installed Java but whenever I use Melee Audio Converter I get this nonsense :
----Processing-"PLAY SSF2 GUYS stereo.wav":----

Converting and splitting music file.. done
Copying channels.. done
Converting to DSP files.. done
Padding DSP files.. done
Packing DSP files into HPS (using dsp2hps).. done
Cleaning a bit.. done

java.nio.file.NoSuchFileException: C:\Users\Elie\Documents\20XX\Melee Audio Converter\meleehps\output.hps
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileCopy.move(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.move(Unknown Source)
at java.nio.file.Files.move(Unknown Source)
at visionCore.util.Files.moveFileUsingOS(Files.java:270)
at main.Main.main(Main.java:105)
And whenever I use dsp2hps, I get a MSCVP140.dll error. When I download that file and put it in the dsp2hps folder, I then get a 0xc00007b error.
I'm too lazy to fix this crap so I'm sticking with HPS Helper and whatnot. But hey it is still really easy to use! You just need copy paste stuff you don't understand and that's it !

BUT around 1 hour ago I've been having a huge problem that I can't go around.
My HPS file automatically loops from the 19th block to the 67th (values from the freshly downloaded zip), even though I hadn't touched anything. It makes a custom loop for no reasons.
So I thought "what if I custom loop from block 0 to [last block number]?" well nope, it crashes.
What if I loop from block 1 to [last block number] ? Still crashes.
Therefore I'm stuck with loops which start at the beginning BUT end at the penultimate block which make me cringe really hard.

What should I do? Should I just add a silent block at the end of my wav files? Should I fix those errors anyway? Do you have any miracle solutions that I probably won't understand but work anyway? Please tell me.
Delete that mscvp140.dll file you downloaded. Follow the link jmlee posted for visual studio. Download the 32 bit version instead of the 64 bit version. Thats what fixed the same error for me.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Custom Loops (aka MeleeHps is 100% obsolete) Achilles1515 Achilles1515

https://github.com/jmlee337/dsp2hps/releases/tag/v5

  • No calculating blocks
  • No more torturing your source audio file so that your loop point lines up on a block boundary
  • You can loop to any arbitrary timestamp, down to a precision of 0.00175 seconds
How to custom loop:
  1. setup your source audio file
  2. set the loop point (in seconds) in custom_stereo.bat and save
  3. drag your source audio file onto custom_stereo.bat
Here's a screenshot showing where to set the loop point: http://imgur.com/wdnPyoc
Decipio-Carmen Decipio-Carmen , do the custom loop HPS files using the above method function properly on your Nintendont setup?
Deconimus Deconimus do you plan on updating your music tools with this new version of dsp2hps that has full custom loop support?

jmlee337 jmlee337 I've only tried this out on one song so far but it seemed to work amazing. I'm thrilled.
 
Last edited:

dandeto

Smash Apprentice
Joined
Feb 19, 2015
Messages
108
Location
Medieval castle
This is an amazing guide, great job!

One question, you posted the file names for all of the stages in vanilla melee, could you please do the same for 20XX? they appear to be named differently, and I couldn't figure out which ones were which.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
This is an amazing guide, great job!

One question, you posted the file names for all of the stages in vanilla melee, could you please do the same for 20XX? they appear to be named differently, and I couldn't figure out which ones were which.
I'm assuming you are asking to please do the same for the music files for 20XX? Just go to Debug Menu --> Music Codes --> and as you change the track preview, it gives you the file name.

This guide is basically not needed anymore.
http://smashboards.com/threads/how-...-conversion-guide.401142/page-2#post-21115391
 
Top Bottom