PDA

View Full Version : [Tutorial] GBA/NDS: Looping! Never touch a text editor ever again!


Team Fail
December 4th, 2012, 08:01 PM
So, after downloading a special program called "NITRO-SoundMaker", which is an in-house tool to develop music for the NDS, I discovered how to loop, and it was stupidly simple. Following on a hunch, I decided to ask someone to send me a MIDI, I added the needed data to it, send it back, and have him insert it. But, there was one condition: do not touch the .s file. And my hunch was correct: the file did loop. So, this tutorial is killing two birds with one stone, as the same official tools for converting MIDI files for use on the GBA use the exact same command to loop as the official NDS tools. And it's been overlooked for many years, so it's beyond me how this was totally missed. Anyways, let's get started.

You will need:
1. Your MIDI file
2. Anvil Studio
3. Official NDS/GBA conversion tools (Based on what system you want to use)
-MID2AGB and Sappy for GBA
-smfconv, and seqconv for NDS

Oh, and don't ask me where to find the Nintendo programs. I will not link to them.

Now, as I said, it's stupidly simple to loop, and I'm not kidding. These commands are built into both MID2AGB and smfconv, but they've been overlooked until today. Here's how to tap into the hidden potential:

1. Open your MIDI file in Anvil Studio, and view your MIDI in the Piano Roll Editor (View -> Piano Roll Editor)

Now, to start, go right to the end of the song, and head to the top of the window. Look for a button called "New cue" and click on it:

http://i.imgur.com/InTIV.png

Now, since we're at the end of the file, we're going to add one special character to the box that shows up, simply, "]":

http://i.imgur.com/elR5b.png

Now, here comes the hardest part, and it's not even that hard. In the piano roll editor, place the marker arrow at the point in the song you want the game to loop it to, then go back up to the top and add a new cue, "[":

http://i.imgur.com/pkco6.png

And that's all! Now, export your MIDI file (MIDI-Format 0 File) with no spaces (Remember: MID2AGB doesn't like spaces in the filename!), and compile it using your choice of tools (mid2agb for GBA, or smfconv + seqconv for NDS), and insert. Don't even touch your .s file, as there is no need to, well, unless you need to adjust something. Have fun looping music!

diegoisawesome
December 5th, 2012, 04:07 PM
...Are you kidding me? All it took to loop it was THIS? Wow, and I've been breaking my back over this for a while now! Thanks!

giradialkia
December 5th, 2012, 04:22 PM
Wait, what?

I can do that. This is brilliant, thanks very much for sharing this, however stupidly simple it seems to be. This just made things millions of times easier for me (and a lot of other people, no doubt). Great stuff :D

hinkage
December 5th, 2012, 04:37 PM
The commands are built-in... And no one ever bothered to look? O_o

Chaos Rush
December 5th, 2012, 04:56 PM
Oh my god...haha

I used to do it the classic way, which was to separate every track in AnvilStudio and manually loop it with Notepad. Then I started doing it a slightly easier way, using a program I found called SFileEditor, which makes it so you don't have to separate each track, but you still have to manually choose every loop point for every track (but it automatically types it in for you, which was slightly helpful).

But now...we have this :) Thank you.

Team Fail
December 5th, 2012, 05:28 PM
...Are you kidding me? All it took to loop it was THIS? Wow, and I've been breaking my back over this for a while now! Thanks!
It's definitely not easy work, I'll admit. So no problems! Anything to make hacking easier will be beneficial to many.
Wait, what?

I can do that. This is brilliant, thanks very much for sharing this, however stupidly simple it seems to be. This just made things millions of times easier for me (and a lot of other people, no doubt). Great stuff :D
Thanks :D
The commands are built-in... And no one ever bothered to look? O_o
My thoughts exactly. I heard it was in the documentation, but I cbf to look lol. I just did a bit of research.
Oh my god...haha

I used to do it the classic way, which was to separate every track in AnvilStudio and manually loop it with Notepad. Then I started doing it a slightly easier way, using a program I found called SFileEditor, which makes it so you don't have to separate each track, but you still have to manually choose every loop point for every track (but it automatically types it in for you, which was slightly helpful).

But now...we have this :) Thank you.
Oh man, that'd be hard. But yeah. Even having to manage the .s file was painful. Now, you barely have to even touch it, as all the loop commands are inserted automatically :D Isn't it wonderful?

MrAPT1
December 5th, 2012, 07:15 PM
You sir, are a real life saver. I always found looping to be an incredible hassle in the past, but now I can do it in under 2 minutes. This is so awesome! Thanks!

mewmasterify
December 5th, 2012, 07:57 PM
umm i got a Error when i used this tutorial: http://i1114.photobucket.com/albums/k521/mewmasterify/untitled.png

Team Fail
December 5th, 2012, 08:06 PM
Make sure all that's in the cue editor is either a [ or a ] at the proper position. Other than that, make sure it's using a valid filename. That's all I can think of.

shinyabsol1
December 6th, 2012, 04:40 PM
Awesome, this saves so much time! Thanks for sharing this!

阴魂君
December 6th, 2012, 07:33 PM
OMG it's more easier than other ways.

tajaros
December 7th, 2012, 02:39 PM
What The-?

This made things more freaking easier thanks TF for sharing this! :3

Air Lock
December 11th, 2012, 05:30 AM
Holy crap

If people don't use this tutorial to insert music, now that it's been made easier than ever, then I'll cry. Seriously, this is awesome!

VERGUNDAI
December 13th, 2012, 07:18 PM
Holy crap

If people don't use this tutorial to insert music, now that it's been made easier than ever, then I'll cry. Seriously, this is awesome!

What's more awesome is that imagine if you can make a program that does all of this.

Team Fail
December 13th, 2012, 07:21 PM
What's more awesome is that imagine if you can make a program that does all of this.

If you have to get a program that does something that's this easy, then my head could not hit a desk hard enough. This is about as easy it will get and requires minimal effort.

Team Fail
January 2nd, 2013, 04:46 PM
Took some advice from Chaos Rush and edited in the "(MIDI-Format 0 File)" export option in the post. If you're having issues with converting, check it out once more and see if it's working for you. c:

Dylanrockin
January 11th, 2013, 02:50 PM
So I don't need to break up the tracks in the song at all? Or do I still have to do that?

Team Fail
January 13th, 2013, 08:29 AM
So I don't need to break up the tracks in the song at all? Or do I still have to do that?

Nope. You just open the MIDI as is with all the tracks. MID2AGB will automatically place the loop commands in each track for you.

destinedjagold
February 2nd, 2013, 11:52 PM
Well, goodbye with the old, and hello to the new~ :D

Thanks for sharing this, as this will be a very big help in editing music. ^^

PKMN Trainer S
March 24th, 2013, 11:20 AM
Hey, anybody knows how to make some tracks sound right? I know you can import instruments but...

Eren Jaeger
April 23rd, 2013, 05:58 AM
So this is how it's done? I'm having hard time looping.. well, thanks for sharing this! I'm a music hacker that's why it's a big big big thanks!

xGal
April 25th, 2013, 09:54 AM
So, after downloading a special program called "NITRO-SoundMaker", which is an in-house tool to develop music for the NDS, I discovered how to loop, and it was stupidly simple. Following on a hunch, I decided to ask someone to send me a MIDI, I added the needed data to it, send it back, and have him insert it. But, there was one condition: do not touch the .s file. And my hunch was correct: the file did loop. So, this tutorial is killing two birds with one stone, as the same official tools for converting MIDI files for use on the GBA use the exact same command to loop as the official NDS tools. And it's been overlooked for many years, so it's beyond me how this was totally missed. Anyways, let's get started.

You will need:
1. Your MIDI file
2. Anvil Studio
3. Official NDS/GBA conversion tools (Based on what system you want to use)
-MID2AGB and Sappy for GBA
-smfconv, and seqconv for NDS

Oh, and don't ask me where to find the Nintendo programs. I will not link to them.

Now, as I said, it's stupidly simple to loop, and I'm not kidding. These commands are built into both MID2AGB and smfconv, but they've been overlooked until today. Here's how to tap into the hidden potential:

1. Open your MIDI file in Anvil Studio, and view your MIDI in the Piano Roll Editor (View -> Piano Roll Editor)

Now, to start, go right to the end of the song, and head to the top of the window. Look for a button called "New cue" and click on it:

http://i.imgur.com/InTIV.png

Now, since we're at the end of the file, we're going to add one special character to the box that shows up, simply, "]":

http://i.imgur.com/elR5b.png

Now, here comes the hardest part, and it's not even that hard. In the piano roll editor, place the marker arrow at the point in the song you want the game to loop it to, then go back up to the top and add a new cue, "[":

http://i.imgur.com/pkco6.png

And that's all! Now, export your MIDI file (MIDI-Format 0 File), and compile it using your choice of tools (mid2agb for GBA, or smfconv + seqconv for NDS), and insert. Don't even touch your .s file, as there is no need to, well, unless you need to adjust something. Have fun looping music!

yo TeamFail thanks man but i wanna tell you something...

It didn't work to me, 'til i changed the song groups (in sappy) to 1: 300 2: 300

You gotta write that if you want :P

Team Fail
April 27th, 2013, 07:01 AM
yo TeamFail thanks man but i wanna tell you something...

It didn't work to me, 'til i changed the song groups (in sappy) to 1: 300 2: 300

You gotta write that if you want :P

That's kinda given. This is just for looping, not inserting.

The_Show
January 22nd, 2014, 05:56 PM
Make sure all that's in the cue editor is either a [ or a ] at the proper position. Other than that, make sure it's using a valid filename. That's all I can think of.

Hello Team Fail, I am experiencing the same problem as the good sir above.

I have put the "] and [" in the right places. What do you mean it's a valid filename, other than the obvious? I've changed the filename twice and have made absolute sure its an .S file. What should I do?



EDIT: I figured it out, sort of. I just went back and "re-did" the whole process, and it came out fine. Btw, great job Team Fail. *thunderous applause"

Team Fail
January 25th, 2014, 09:33 AM
Hello Team Fail, I am experiencing the same problem as the good sir above.

I have put the "] and [" in the right places. What do you mean it's a valid filename, other than the obvious? I've changed the filename twice and have made absolute sure its an .S file. What should I do?



EDIT: I figured it out, sort of. I just went back and "re-did" the whole process, and it came out fine. Btw, great job Team Fail. *thunderous applause"

Yeah. I added a small portion to the tutorial. Your problem was because you had a space in the filename.