Also Mmz4SA.ogg. The original song (Megaman Zero 4: Straight Ahead) is a 3 minute song (at least according to youtube), so why would you put a 20 minute looped version into your game? MZX supports ogg looping tags, so you want to use those instead. Plus, listening to this song on youtube, even the 3 minute version sounds looped. I bet we can get away with just about a minute or two.
Pull that shit into Audacity:
Now, get your good headphones on, play the song and listen. We're looking for a nice clean looping point. It's not necessarily at the start- a lot of songs like to sort of 'fade into' loops.
Like, here I found the point where the song loops back to the start (at about 1:12), but this isn't the place to cut because it's still playing some other stuff over the loop.
So we have to keep listening. The waveform helps you here- the "beats" kinda stick up out of it. By 1:21 we are thoroughly back to the start, so we will be looking to make a cut around here.
It's a little tricky finding exactly where we are, so I like to look for something that stands out. In this case there's a couple of these sections where a new instrument is introduced, and it stands out a lot. We can hear one at 1:36, and the nice thing is that the waveform sticks out a bit down the bottom, meaning we can find its partner at the start easily enough:
We can also hear the same thing at 0:24, so we know our loop is going to be approximately 1:12 in length, with a bit of an intro. We could loop here, but I think the spot around 1:21 is a better position, so I'm going to 'count back' about 5 of these spikes in the waveform and make this bit my looping point. It's at about 1:21. I find its counterpart at the start of the song about 9 seconds in. Now that we've established that, I'm going to cut the entire song off from about 1:22. Just select and delete everything past that. We now have a ~1:22 song.
We have our song, but we still need to find the perfect loop point (and we may cut off a little at the end later.) Now onto the tricky part. I like to find a little bit of waveform that stands out in both areas. Because whatever we find at the end of our newly-trimmed song will also be at the start, that is where I am going to look. So I zoom into the end of the song and I just look for something. Here's what I found. To me, this stands out:
Now I'm going to go back to around the 9 second mark and look for the same thing... and, lo and behold, this looks familiar!
Now I'm going to copy a bit of this waveform and paste it on the end so I can begin trying to line them up. First I need to work out what I am going to copy. I personally like to pick an area with a nice round sample # (if you don't have audacity showing you the selection in samples at the moment, now would be the time to configure that.) I'm going to select an area 411,000 samples in, and make my selection 3000 samples long. This should be long enough to work with. That's this area:
As you can see I got the bit where the waveform changes so this should be easy to pick out. The reason I picked 411,000 samples in is because this will be my loop start. I'm going to cut the song off at the end so that it loops back to 411,000 samples and then add loop tags.
Now, copy that selection, then find that same waveform at the end of the song. It's at about 1:21.340. Then I like to create a 2nd track and paste my waveform from earlier in there:
As you can see, it's not quite right, but we will now fix that manually. Start moving the waveform on the 2nd track around by cutting and pasting it. Zoom in as much as you need to and make them line up
exactly.
Once I'm very close, I like to zoom into the sample level, find two points that stick out a little, then measure the distance between the point in the two tracks, like this:
They're only 5 samples apart, as I can tell from the selection length. So I cut my 2nd track and then paste it 5 samples later. Now the two tracks line up exactly.
So now I zoom out, find the start of the 2nd track in its new position, and this is where I will cut everything off. For me this is 3,587,120 samples in. Just select it all and delete.
Now you can remove the 2nd track. You now have a 3,587,120 sample song that you know loops back to the 411,000 sample mark. So now you can export as OGG:
Add the LOOPSTART and LOOPEND tags that correspond to those numbers and save. Then open it up in MZX and listen to your perfectly looped song that is now only 1:21 long and a fraction of the filesize compared to before.
Then do the same thing for the other massive OGG.