Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.

Reply
 
Thread Tools
  #1    
Old December 4th, 2012 (8:01 PM). Edited December 7th, 2016 by Incineroar.
Incineroar's Avatar
Incineroar Incineroar is offline
the spirit of the fighter
  • Moderator
  • Platinum Tier
  • Developer
 
Join Date: May 2009
Location: Iki Town
Age: 22
Gender: Male
Nature: Brave
Posts: 13,450
I discovered how to loop music a while back, 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:



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, "]":



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, "[":



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!
__________________
Reply With Quote

Relevant Advertising!

  #2    
Old December 5th, 2012 (4:07 PM).
Diegoisawesome's Avatar
Diegoisawesome Diegoisawesome is offline
Oh god the bees
  • Silver Tier
 
Join Date: Dec 2007
Location: :noitacoL
Age: 20
Gender: Male
Nature: Naive
Posts: 1,032
...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!
__________________


My other resources:
My Website
diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
diegoisawesome's Miscellaneous Finds
The Ruins of Alph Puzzles
Diego's Miscellaneous Patches
GBA Intro Manager
The Secret Sauce: Triple-Layer Tiles
Reply With Quote
  #3    
Old December 5th, 2012 (4:22 PM).
giradialkia's Avatar
giradialkia giradialkia is offline
  • Crystal Tier
 
Join Date: Apr 2009
Location: Ireland
Age: 23
Gender: Male
Nature: Timid
Posts: 1,563
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
__________________

I'm working on an album of Pokémon-inspired music. Check out the Soundcloud link if you're interested!


This is my Soundcloud | | This is my bandcamp
Reply With Quote
  #4    
Old December 5th, 2012 (4:37 PM).
hinkage's Avatar
hinkage hinkage is offline
Everyone currently in an argument with this member: I really suggest you stop.
  • Gold Tier
 
Join Date: Aug 2010
Age: 21
Posts: 378
The commands are built-in... And no one ever bothered to look? O_o
Reply With Quote
  #5    
Old December 5th, 2012 (4:56 PM).
Chaos Rush's Avatar
Chaos Rush Chaos Rush is offline
     
    Join Date: May 2007
    Gender: Male
    Posts: 1,297
    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.
    __________________
    Reply With Quote
      #6    
    Old December 5th, 2012 (5:28 PM).
    Incineroar's Avatar
    Incineroar Incineroar is offline
    the spirit of the fighter
    • Moderator
    • Platinum Tier
    • Developer
     
    Join Date: May 2009
    Location: Iki Town
    Age: 22
    Gender: Male
    Nature: Brave
    Posts: 13,450
    Quote:
    Originally Posted by diegoisawesome View Post
    ...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.
    Quote:
    Originally Posted by giradialkia View Post
    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
    Quote:
    Originally Posted by hinkage View Post
    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.
    Quote:
    Originally Posted by Chaos Rush View Post
    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?
    __________________
    Reply With Quote
      #7    
    Old December 5th, 2012 (7:15 PM).
    MrAPT1's Avatar
    MrAPT1 MrAPT1 is offline
    That one guy who does stuff
       
      Join Date: Dec 2008
      Location: Under the truck
      Age: 20
      Gender: Male
      Posts: 65
      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!
      __________________
      My Youtube channel. http://www.youtube.com/user/MrAPT1
      Reply With Quote
        #8    
      Old December 5th, 2012 (7:57 PM).
      mewmasterify's Avatar
      mewmasterify mewmasterify is offline
      Actual Mew
         
        Join Date: Apr 2011
        Location: Faraway Island
        Age: 17
        Gender: Male
        Nature: Quiet
        Posts: 71
        umm i got a Error when i used this tutorial:
        __________________
        Reply With Quote
          #9    
        Old December 5th, 2012 (8:06 PM).
        Incineroar's Avatar
        Incineroar Incineroar is offline
        the spirit of the fighter
        • Moderator
        • Platinum Tier
        • Developer
         
        Join Date: May 2009
        Location: Iki Town
        Age: 22
        Gender: Male
        Nature: Brave
        Posts: 13,450
        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.
        __________________
        Reply With Quote
          #10    
        Old December 6th, 2012 (4:40 PM).
        shinyabsol1's Avatar
        shinyabsol1 shinyabsol1 is offline
        Pokemon DarkJasper!?
           
          Join Date: Aug 2010
          Gender: Male
          Nature: Calm
          Posts: 330
          Awesome, this saves so much time! Thanks for sharing this!
          Reply With Quote
            #11    
          Old December 6th, 2012 (7:33 PM).
          阴魂君's Avatar
          阴魂君 阴魂君 is offline
          _(:зゝ∠)_ so busy i am…
             
            Join Date: Nov 2012
            Location: China
            Age: 21
            Gender: Male
            Nature: Brave
            Posts: 22
            OMG it's more easier than other ways.
            Reply With Quote
              #12    
            Old December 7th, 2012 (2:39 PM).
            tajaros's Avatar
            tajaros tajaros is offline
            Hi I'm dawg
               
              Join Date: Apr 2012
              Location: Philippines
              Age: 18
              Gender: Male
              Nature: Timid
              Posts: 857
              What The-?

              This made things more freaking easier thanks TF for sharing this! :3
              __________________
              Reply With Quote
                #13    
              Old December 11th, 2012 (5:30 AM).
              Skystrike's Avatar
              Skystrike Skystrike is offline
              Dark Shadow
              • Silver Tier
               
              Join Date: Sep 2008
              Location: internet
              Gender: Male
              Nature: Quiet
              Posts: 1,537
              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!
              __________________

              I lack toast and am tolerant
              Reply With Quote
                #14    
              Old December 13th, 2012 (7:18 PM).
              VERGUNDAI's Avatar
              VERGUNDAI VERGUNDAI is offline
              RomHacker, Unity 3D Maker
                 
                Join Date: Dec 2009
                Location: Pokemon Universe :)
                Age: 21
                Gender: Male
                Nature: Quiet
                Posts: 109
                Quote:
                Originally Posted by Final Destination View Post
                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.
                __________________
                Vergundai_ace_gailon
                Reply With Quote
                  #15    
                Old December 13th, 2012 (7:21 PM).
                Incineroar's Avatar
                Incineroar Incineroar is offline
                the spirit of the fighter
                • Moderator
                • Platinum Tier
                • Developer
                 
                Join Date: May 2009
                Location: Iki Town
                Age: 22
                Gender: Male
                Nature: Brave
                Posts: 13,450
                Quote:
                Originally Posted by VERGUNDAI View Post
                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.
                __________________
                Reply With Quote
                  #16    
                Old January 2nd, 2013 (4:46 PM).
                Incineroar's Avatar
                Incineroar Incineroar is offline
                the spirit of the fighter
                • Moderator
                • Platinum Tier
                • Developer
                 
                Join Date: May 2009
                Location: Iki Town
                Age: 22
                Gender: Male
                Nature: Brave
                Posts: 13,450
                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:
                __________________
                Reply With Quote
                  #17    
                Old January 11th, 2013 (2:50 PM).
                Dylanrockin's Avatar
                Dylanrockin Dylanrockin is offline
                That guy
                   
                  Join Date: May 2011
                  Age: 21
                  Gender: Male
                  Nature: Timid
                  Posts: 277
                  So I don't need to break up the tracks in the song at all? Or do I still have to do that?
                  Reply With Quote
                    #18    
                  Old January 13th, 2013 (8:29 AM).
                  Incineroar's Avatar
                  Incineroar Incineroar is offline
                  the spirit of the fighter
                  • Moderator
                  • Platinum Tier
                  • Developer
                   
                  Join Date: May 2009
                  Location: Iki Town
                  Age: 22
                  Gender: Male
                  Nature: Brave
                  Posts: 13,450
                  Quote:
                  Originally Posted by Dylanrockin View Post
                  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.
                  __________________
                  Reply With Quote
                    #19    
                  Old February 2nd, 2013 (11:52 PM).
                  destinedjagold's Avatar
                  destinedjagold destinedjagold is offline
                  Oh Hai Thar~
                  • Silver Tier
                   
                  Join Date: May 2007
                  Location: Philippines
                  Age: 26
                  Gender: Male
                  Nature: Careful
                  Posts: 8,507
                  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.
                  __________________


                  FC: 0061-1111-6462
                  TSV: 1364(X), 0790(OR)

                  Reply With Quote
                    #20    
                  Old March 24th, 2013 (11:20 AM).
                  PKMN Trainer S PKMN Trainer S is offline
                     
                    Join Date: Feb 2013
                    Gender: Male
                    Posts: 14
                    Hey, anybody knows how to make some tracks sound right? I know you can import instruments but...
                    __________________
                    Why , you ask? Cause.
                    Reply With Quote
                      #21    
                    Old April 23rd, 2013 (5:58 AM).
                    Eren Jaeger's Avatar
                    Eren Jaeger Eren Jaeger is offline
                    Pianoist
                       
                      Join Date: Apr 2013
                      Location: EARTH
                      Gender: Male
                      Nature: Serious
                      Posts: 154
                      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!
                      __________________
                      Music is art
                      Reply With Quote
                        #22    
                      Old April 25th, 2013 (9:54 AM).
                      xGal xGal is offline
                      Mhm
                         
                        Join Date: Nov 2011
                        Location: A tree
                        Gender: Other
                        Nature: Relaxed
                        Posts: 243
                        Quote:
                        Originally Posted by Team Fail View Post
                        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:



                        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, "]":



                        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, "[":



                        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
                        __________________
                        Reply With Quote
                          #23    
                        Old April 27th, 2013 (7:01 AM).
                        Incineroar's Avatar
                        Incineroar Incineroar is offline
                        the spirit of the fighter
                        • Moderator
                        • Platinum Tier
                        • Developer
                         
                        Join Date: May 2009
                        Location: Iki Town
                        Age: 22
                        Gender: Male
                        Nature: Brave
                        Posts: 13,450
                        Quote:
                        Originally Posted by galooloo View Post
                        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.
                        __________________
                        Reply With Quote
                          #24    
                        Old January 22nd, 2014 (5:56 PM). Edited January 22nd, 2014 by The_Show.
                        The_Show The_Show is offline
                        Banned
                           
                          Join Date: Jan 2012
                          Location: Carracosta Rock, Akmin Region
                          Gender: Male
                          Nature: Sassy
                          Posts: 43
                          Quote:
                          Originally Posted by Team Fail View Post
                          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"
                          Attached Images
                          File Type: png Capture.PNG‎ (21.8 KB, 6 views) (Save to Dropbox)
                          Reply With Quote
                            #25    
                          Old January 25th, 2014 (9:33 AM).
                          Incineroar's Avatar
                          Incineroar Incineroar is offline
                          the spirit of the fighter
                          • Moderator
                          • Platinum Tier
                          • Developer
                           
                          Join Date: May 2009
                          Location: Iki Town
                          Age: 22
                          Gender: Male
                          Nature: Brave
                          Posts: 13,450
                          Quote:
                          Originally Posted by The_Show View Post
                          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.
                          __________________
                          Reply With Quote
                          Reply
                          Quick Reply

                          Sponsored Links
                          Thread Tools

                          Posting Rules
                          You may not post new threads
                          You may not post replies
                          You may not post attachments
                          You may not edit your posts

                          BB code is On
                          Smilies are On
                          [IMG] code is On
                          HTML code is Off

                          Forum Jump


                          All times are GMT -8. The time now is 1:35 AM.