We will start off step by step.
What is an AST-file? This filetype includes soundtracks for several Wii games; also Super Mario Galaxy and Super Mario Galaxy 2 have them. Sometimes only one soundtrack plays during a mission, and sometimes the soundtarck changes. You may be wondering why Nintendo does not use common music-file-extensions like MP3 or WAV for their soundtrack. The answer is simple:
Nintendos soundtrack-files always have the advantage of being looped.
"But I can also play my MP3 files with loop, where is the difference?" The difference is in the terms "Loop" and "Repeat". What you mean is that you can repeat your MP3 file, but you cannot loop it.
The words "loop" and "repeat" should be common to you. Maybe in some cases they don't have a different meaning, but in videogame hacking they have!
Repeating means that you have your audio-file and play it all over and over again; from the very beginning to the very end, and again.
Imagine you have a soundtrack with a length of 2:19 minutes. Repeating this soundtrack would mean you play it from 0:00 to 2:19, then jump to 0:00 again and play it over to 2:19 again, and probably again, and again...
You might now loops from your old HotWheels. You have noticed everything needs speed to pass through a loop, except for Chuck Norris. Once your car got enough speed to pass the first loop, it was able to pass a second and third loop as well.
And this is the same precedure as with a soundtrack. You play your soundtrack from 0:00 to 2:19 at first, but now majic happens. Your soundtrack does not jump to 0:00, but to 0:12 or 0:27 or whatever spot and plays to 2:19 like usual.
Common filetypes like MP3 and WAV can probably repeat, but they cannot loop, as they don't have the setting for loops. Nintendos and also other companys soundtrack-files have the preset for a loop.
This is the difference between repeating and looping soundtracks. Keep that in mind as you read through this article.
Both Super Mario Galaxy games are knowen and also rewarded for their great orchestral soundtrack. Probably you are new to the hacking community or you're coming from another hacking community like MKW or SSBB and want to try something new. If so, welcome to Neo Mario Galaxy!
The easiest thing to start with SMG hacking are probably soundtrack edits, as they require software which is easy to handle.
Out there are many good programs that convert your audio-file to an AST-file. But I noticed that when it comes to looped AST-files there are audible errors when testing the file ingame.
This tutorial is about creating a loop-point in your AST-file, but soon there will be a section about setting up your soundtrack to create a good AST-file.
I want to have said that the following article is yet not really properly written. If you desire any changes and further explanations, please let me know.
· Your custom soundtrack (preferably as WAV file @ 32000hz)
· astConverter 2.0 by Anthe (Download)
· Audacity (Download)
· A HEX-Editor
· Windows-Calculator (or anything else that can convert between Decimal and HEX)
STEP 1 - YOUR CUSTOM SOUNDTRACK
As you may know, your soundtrack has to end right were the loop is going to begin. So you want to open your soundtrack in Audacity at first and then look for the point where your soundtracks loop shall begin, once the entire audiotrack is played all over. On the bottom toolbar is a small screen that displays the time where you have put your cursor on the audiotrack. There are different ways to display this. I recommend changing it from regular time to samples:
Now find your loop-point in your audiotrack; take your time and do this as precise as possible. It's important to be precise here. If you have found your perfect loop point, note down the amount of samples displayed in the bottom toolbar.
Tip: you can test the preciseness of your loop-point just by marking two or three seconds of your audiotrack right behind the loop-point, copy and paste it at the end of your audiotrack. Now listen whether you hear any clicks or ticks when the playback passes the loop point. If it sounds all-right, don't forget to undo your last action. Now export your audiotrack as a WAV-file.
STEP 2 - CONVERSION
I prefer astConverter 2.0 over any other because...
Open up astConverter 2.0 and load the WAV-file you just exported. astConverter 2.0 gives you the opportunity to set a loop-point, but we are going to ignore that. So leave the box that says "Enable Custom Loop?" unchecked!
When you hit "Convert" astConverter 2.0 will export the converted WAV-file as an AST-file in the same directory as your WAV-file is located. Now you have an AST-file which will not loop but repeat when you test it ingame.
STEP 3 - FIND THE LOOP-POINT
You may not believe, but it is possible to open up an AST-file in Audacity. Do so with your AST-file. Now, when zooming closer into the end of the audiotrack, you will notice some blank space which has not been there before:
Don't worry, that always happens when creating an AST-file. You hopefully still have your note with the loop-point from the first step. Find that sample again in your audiotrack, to make sure it is still the same; sometimes it happens that your initial loop-point has moved one sample back or forth. If that happend, note down the new loop-point.
But now we will also need a loop-end-point. In fact this is just the second last sample of your audiotrack.
Ingame your track will play from the very beginning to the very end at first. The "very end" is the LoopEnd Sample. If this sample is reached, your track will not repeat from the very beginning, but from the LoopStart Sample, the sample you have been noting down.
The Last Sample is the first silent sample, so it is out of use for us.
Every sample between the LoopStart Sample and the LoopEnd Sample is considered a Next Sample, but we don't need to discuss their use.
If you noticed any changes in your audiotrack, note down your new LoopStart Sample and LoopEnd Sample. You can close Audacity without saving.
STEP 4 - SET THE LOOP-POINT
Take your notes again and open up your Windows-Calculator in Programming-Mode (Alt+3).
While "Dez" is set type your LoopStart Sample and press "Hex". Now you got your LoopStart Sample in HEX-format. Do so with your LoopEnd Sample as well, and note both down.
Next open up your AST-file in a HEX-Editor.
We want to set the LoopStart Sample, and probably also change the LoopEnd Sample.
You will notice that Offset 0x18 (length of 8 bytes) is 00 00 00 00, since your AST-file has no loop-point yet. Right there type your LoopStart Sample in HEX-format.
You might notice that Offset 0x14 and Offset 0x1C has one more sample than your initial LoopEnd Sample. If so, replace both with your LoopEnd Sample. Now save and overwrite your AST-file.
Your AST-file is ready to be tested ingame.
STEP 5 - TESTING AST-FILES
This section will describe how you can test your soundtracks ingame on a Wii (not emulator!)
Make sure that you have Riivolution installed on your Wii or Wii U. If not yet, just search for it on the internet. Setting it up is really simple! If you have Riivolution already installed, I recommend downloading the newest version, if not already done.
As you may know from other games, you can use a XML-patch with Riivolution that loads custom files from your SD Card over the games original files while playing.
I have created a XML-file for this purpose already (Download SMG2 XML - SMG1 XML coming soon) but it should only work for PAL (Europe) yet.
Now take your SD Card. It needs a special arrangement of folders and foldernames:
If you use my XML, you will need to name your folder "SMG2Testing". You can change that with some XML-editing for sure.
Since we only want to test AST-files, we just need a folder called "Stream" inside a folder called "AudioRes" in your "SMG2Testing" (same for both games); there you have to put your AST-files.
Of course your file will need a specific filename, otherwise the patch won't load your file. So here are ALL the AST-filenames for SMG and SMG2.
Green Star (STRM1) & Green Star - Space Bass (STRM2)
World 1 & 2 (STRM1) & World 1 & 2 - Space Bass (STRM2)
World 6 (STRM1) & World 6 - Space Bass (STRM2)
World 5 (STRM1) & World 5 - Space Bass (STRM2)
Don't forget the file extension *.ast at the end of your file.
Then put your SD Card in your Wii and load the game with your patch.
If you were precise enough, you should hear a very smooth loop in your soundtrack when testing it ingame.
In the "Sound" directory there is a "WSYS" format.
A WSYS file kind of works with a BMS file. The BMS file knows what sounds to play in a specific sequence, and the WSYS file knows where these sounds are located (probably from AW files).
I would say it's necessary to tell that THP files contain video AND audio. I saw people believeing that AST files play along with THP files, which is not true (and turns out that two more ASTs in SMG remain unused). Also worth to meantion that SMGs THP files all run at 59.94 FPS, but not necessary for the list.
And maybe some more names?
TPL stands for Texture PaLette.
BRLAN stands for Binary Revolution Layout AnimatioN.
Alright people. I have rewritten many parts of the tutorial for a better understanding and clearer definitions.
Also put new sections in the tutorial:
- AST explanation
- Loop definitoon
- Step 5 - Testing AST-files
In hope that this tutorial helps new users gaining more understanding about music hacks.
When I played the file in the ast player, and when it came to the loop point, it kept repeating one little section of the song.
Unfortunately the AST-Player does not work when it comes to loops. I believe this player is only meant to play your AST-File all over for just once. But you can try to convert your AST-File back to WAV with VGStream. VGStream applys ONE loop to your soundtrack, so you can check whether it is properly looped or not.
Okay okay. That file-structure-procedure is really complicated when trying it the first time. Just do the following with you title track:
On your SD-Card create a folder that is corresponding to the XML-File you are using. If you use the XML-File I was offering as download in this tutorial, then the folder should be named "SMG2Testing". Inside SMG2Testing you have to create a folder named "AudioRes". Inside AudioRes you have to create a folder named "Stream". Inside Stream you put your AST-File with the correct name.
I'd also say that the other AST tutorial here is a bit better since it uses demonstrating images, paragraphs and a not-copy-pasted table of SMG and SMG2 AST-filenames.
But instead of being mean I should please you to read through the mentioned tutorial and suggest changes and improvements. I don't think the board needs multiple tutorials for a single issue
EDIT: And for BMG editing I really, really recommend the BMG-Editor which is included in the CTools pack by Chadderz. People who have been hacking Mario Kart Wii know and love this software.
Well, now you know how to get the extractor and files for Super Mario Galaxy. In Super Mario Galaxy Modding Manual #2, we're gonna learn how to edit levels using a visual level editor called "Whitehole" and playtest your custom mod with the help of a SMG Toolpack. See ya then!
I totally love this section in your tutorials. Feels like an ongoing TV-show
We are happy to see how the interest into SMG modding has raised in the past. The section CUSTOM LEVELS AND PROJECTS is the perfect place to show others the levels you have created. But sometimes it happens that a user just has a great idea, starts a thread, and then leaves it behind in hope of another person realizing his or her idea. To prevent this and to save some A Presses, there are just a few additive rules to this section of the NMG board. We expect every user to read and understand these before posting a new thread.
★ RULES CONSIDERING IMAGES
There are three types of threads we distinguish:
- Project (an entire hack with at least two custom levels)
- Level (one complete level/galaxy)
- Model (custom planet/object, texture hack, etc.)
Every thread requires a particular amount of previews to show off. Previews can be made either as screenshot directly from the console, from the editor, or as photo taken from any device. The following table shows which amount of images is required per thread:
Type of thread
Required amount of images
If you cannot provide the required amount of images for any specific reason you may use drawings or sketches showcasing your ideas as placeholders for real material. Please know that logos DO NOT count to previews.
Also, if your thread does not include the required amount of images after four days (or 100 hours) your thread will be deleted. We do not want that to happen, so please make sure you can provide previews before posting a thread.
★ RULES CONSIDERING CONTENT
In addition to images, please put some formal information and a description about your mod into the thread. Formal language is highly appreciated.
★ RULES CONSIDERING COMMENTS
Offer your help to others if you can provide necessary knowledge or skills
★ RULES CONSIDERING MOTIVATION
Have fun. The staff wishes you successful modding!
Alright, I bothered to look into it right now and here's something strange. The game DOES NOT load the title screen music from the AST file in the Stream directory. It's actually found in one of the AW files, but we can't edit this stuff right now. So the title screen music file in the Stream directory is actually an unused duplicate.
I don't believe this. Remember when Mario posted all the sequenced soundtracks as midi in the Discord group? I was hearing through all of them, even noticed that the Fire Flower, Ice Flower and Red Star themes are dublicated, but there was no midi sounding like the title theme. Although, the File Select Beat was in the midis.
Sierra, your're really making us break our heads xD
Why don't you try replacing another soundtrack to convince yourself how AST-replacing works?
I checked your AST. It's properly set up, you've done a good job. But seemingly the title screen music is one of the sequenced soundtracks. Sequenced soundtracks are pretty complicated to figure out. As said before, the Fire Flower, Ice Flower and Red Star themes are sequenced soundtracks for example. I am sorry Sierra. Still, try replacing any other AST-file which isn't listed as "unused" in my tutorial, that shall work!
These lists are already featured in the AST creation tutorial but seem a bit unfitting there. Even though, due to some weird recent discovery made by Aurum and Sierra - SMG2_title_strm.ast being an unused file - it's now likely necessary to check precisely which tracks are unused. Also other notes can be made.
Names marked red are knowen to be unused.
Names marked green are knowen to be used.
Names marked without special color are supposed to be used ingame, but not yet concretely documented.