Seen May 21st, 2020
Posted March 19th, 2019
202 posts
2.9 Years
What if I told you you've been looping sappy songs wrong all this time? That every other tutorial on here has been wasting your time? That the tedious process of manually editing into your .s file can be replaced with 1 simple addition to your MIDI? And that the ability to automatically loop a song has been built into mid2agb all this time?

I'm pretty sure it's common knowledge by this point that mid2agb is leaked Nintendo software, so it begs the question, "how did nintendo loop their songs? they had to have had a better way to loop their music than to edit the raw mid2agb output!" Well I am about to show you the way Game Freak looped their songs in-house! It literally can't get any easier than this!

You will need:
  • Anvil Studio
  • Sappy + mid2agb

Ok so open your MIDI in Anvil Studio. Then scroll all the way to the end of your song so that the blue arrow is at the end of the final measure:

Now at the top of your screen you will see a button that says "New Cue." Press it.

It will ask you to enter a name for the cue. All you should type here is "]" without quotes. Then press ok. The bracket tells mid2agb that this is the end of your loop. It should always be at the very end of your midi.

Now put your arrow at the beginning of the measure that you want the song to loop to. Make sure your arrow is at the beginning of the measure like the picture below (on the thick black line). If you loop to the middle of a measure it could cause crashes or unexpected errors in your song, so make sure the arrow is at the beginning of a measure.

Then under "cues" press "new"

... and name the new cue "[" without quotes. This will tell mid2agb that this is the beginning of your loop.

Now, your loop is all finished. Save your MIDI as normal, but before you do anything else, there is one more step to make this work. Now you have to export the midi into MIDI-0 format because for whatever reason mid2agb won't read loops with the newer, default format. Go to File > Export as MIDI-0 and save it under a different name!



You're done! Drop your new, exported midi onto mid2agb.exe and assemble it in Sappy. It will be looped automatically, and you didn't have to touch the .s file at all! Isn't technology great?

If this helped you, be sure to tell me! And if something isn't working or you have questions, just ask here and I'll help you out. Toodles!

(Oh and if you're wondering, this cue system works in DS hacking too, with smfconv and seqconv. It works exactly the same as with GBA hacking)
Binary hacking is dead, do not expect major support from anyone if you are binary hacking. If you are ready to jump ship and switch to decomp you will find that everything you want to do will be 10 times easier, customizable, and maintainable. Happy hacking!

I'm still active, but I don't check Pokécommunity for weeks or months at a time.
You can always DM me at hjk321#1337 via the pret discord.

freazy

Age 29
Male
Germany
Seen June 5th, 2020
Posted June 5th, 2020
2 posts
2 Years
Thanks a lot! It totally works! I didn't know Anvil Studio so I have two things to add which might help noobs like me:
1. In order to see the blue arrow (that hjk321 mentions above) you might click on "View" in the upmost menu bar and select "Piano Roll Editor".
2. In order to put the blue arrow at the ending on the song I played the song to the end and clicked once on the small arrow (>) next to the scroll bar (under the
upmost menu bar) so that the blue arrow is standing right over the thick black line (otherwise it was a bit before it and then my song looped a micro second
before which didn't sound good). In general the thick black lines seem to be the ending of a tact so pressing the small arrows next to the scroll bar might be the
easiest way to navigate through your song. That might be obvious to you but I've just installed Anvil Studio and had no clue.