Jump to content

Tutorial Forum
Welcome to our Tutorials and Guides section!

Here you will find all guides written by our members. The guides can also be found in the Tutorial and Guides index and will temporarily be listed on our front page.

If you have used a guide, please don't forget to rate it (open the topic and use the stars on the top right)!

  • Please log in to reply
* * * * - 1 votes

Nintendo DS Music Hacking [LOOPING INCLUDED, FULLY EXPLAINED]

(Go to first unread post)

Poll: In regards to this tutorial... (13 member(s) have cast votes)

Is this tutorial easy to follow and are the instructions clear?

  1. Yes (10 votes [76.92%])

    Percentage of vote: 76.92%

  2. No (3 votes [23.08%])

    Percentage of vote: 23.08%

Vote Guests cannot vote
Team Fail Post #1 Posted 15 August 2011 - 11:14 PM

    It's like polo. With Chainsaws.


  • Group: Members
  • Posts: 1,403
  • Member No.: 261,213
  • Joined: 01-September 10

  •  

The Nintendo DS is a file-based system that can be modified easily if you understand what is happening. I will attempt to get this all into something that is easy to understand, even if you are beginning the Nintendo DS Music scene.

My tutorial will be separated into several parts. Each part will be explained in-depth.

Part One- Accessing The Song You Wish To Modify
This program will require the use of VGMTrans. You can find it in the Music Hack Pack. There is a link at the end of the tutorial. Note- The program is rather unstable and can crash. It is normal and will not damage your computer. You can find other copies and builds of VGMTrans by searching on Google.

Getting the MIDI and DLS files
These are files that are the heart and soul of this tutorial. A MIDI file is a set of sequenced sounds that can be played as a song. A DLS file contains wave samples that are used in conjunction with MIDI files to play these samples with certain instruments to generate sounds that MIDIs by themselves cannot generate. You'll get the idea later on. To get these files, there are two ways. I'll give you the best way because it will save you heartache later on. Open CrystalTile (In Music Hack Pack) and open your Nintendo DS rom image. From here, at the top, click on the third icon from the Right (The little DS Icon). It will open up a list of files. Now, click "View a List Of" and click on "Directory". Now, you will want to look for the .SDAT file within the game. Keep in note that some games have more than one. It will have an icon of a speaker. Right-click on it and click on "Export". Save it to a location of your desire. Now, open VGM Trans. Minimize CrystalTile because you won't need it until much later. Take your newly-extracted .sdat file and drag it on the VGMTrans window. You CANNOT use the "Open" command from the file menu, as the program is not complete. This stage will most likely be the most painful, as the program is rather unstable. It may take a minute to open the sdat file, and it may even quit responding. Just be patient, it will eventually open it and grant you access to it's controls. From here, browse the list of songs to extract. Note that the songs will not loop in the program, but you can simulate a loop in FL Studio. You can click on the song and press play at the top, but who's lazy? I know I am. You can use the arrows on the keyboard and the spacebar to choose a song and play it. How convenient? Once you choose a song of your liking, you have a few options here. Your best option is to right-click on the song and select "Export as MIDI and DLS". Save those to a location of your liking as well. You can now close VGMTrans, but this is optional. It's best to, though. Now, you have your .dls and your .midi files. Now, what will you do with those?

Part Two- Modifying Music- and knowing what it will sound like
This part of the tutorial has a little-known trick I found and I thought it would be nice to explain the process.

FL Studio
For this tutorial, you will need the program FL Studio. I have a download link in the Music Hack Pack at the end of the tutorial. You will want to download it and let install the programs, including ASIO4ALL. It is a MIDI driver- required for FL Studio to work.

FL Studio- Importing and Editing music
This is the easier part that requires use of the imagination. Open FL Studio. Keep in mind you cannot save as projects in the Demo. You can, however save files as MIDI to get around that. Or, find a crack on Google. It's up to you. Click and drag the midi file to the program (You can also use File... Open) and import all the tracks, by pressing OK on the window that will pop up with the numbers 1 through 16. Now, you have your midi open! But, there is one problem, no, wait. Two problems. How will you know what it will sound like? And how will I simulate a loop? It's easy. I have included images to assist you.

When you import a midi file, it will open an additional window called Fruity LSD.

I have opened up the file SEQ_ROAD_SNOW_D, but that's besides the point. In the image, there is a folder button. Click on that. From here, browse to the .dls file you extracted with VGMTrans. Open it, then press play. Ta-da! It sounds... Game-ish! Now, there is a little restriction. Not all 126 instruments are used. If you need an extensive tutorial on how to use FL Studio, click here. It also explains looping.

From here, you can do all your editing. You can modify many of the game's song's aspects, like panning, volume, patch and whatnot. This is done through the Piano Roll in the program (Click the bar with the lines.) Do note, though, that you cannot insert bytes for loops in FL Studio, but you CAN insert note placeholders to indicate where you want to have your loop. Look at Looping (Preliminary) for more info on how to use note placeholders.

FL Studio- Exporting the final product
Now, you've finished, eh? Click on File and go to Save As... . Now, save as the type .midi and name it. When it's done, you can close FL Studio. You've exported it, and it's almost ready to be inserted!

Part Three- Inserting the song
This part of the tutorial will use a NEW version of MIDI2SSEQ that is much better than the original. Click here to download it.

Looping
For this, you will need Anvil Studio. Open the MIDI and view any track in the Piano Roll editor. It will make it far easier if you use a track in which you know where the loop point is. Right after the final note plays, place the marker there and the program will record the time at which the marker is. Click EDIT -> Insert MIDI Event... . Under Kind Of Event, make sure both boxes have a check mark beside them, then look for "Marker" in the drop-down list. After you find it, you will just have a blank text box. Type "loopEnd" (This is case sensitive. Just don't use the "".) Now, this is the slightly difficult part. Go to the point in the song where it loops to, and select it. Now, go to EDIT -> Insert MIDI Event... . Make sure you are using marker, BUT, look at the time. You need to peel off one frame so the loop will sound correctly.

How do I do that?

When looking at the time, It will go 29:30 (29 seconds, 30 frames.) to 30:00. Meaning that there are 30 frames in 1 second. So, if your time for the loop point is on an exact second, go to the previous second, and use 29 frames.

Now, use the Marker "loopStart". Remember that it is case sensitive. Keep in mind that you only have to do this on ONE track, and it saves you time. The revised MIDI2SSEQ is smart enough to place the loop point correctly on all tracks. Now, go FILE -> Export MIDI-Format 0 File... and save it to a directory. IT IS RECOMMENDED that you save it in the C:\Users\[Name] along with MIDI2SSEQ because you WILL NEED to use a command line to convert it. You can now close Anvil Studio.

NOTE! When looping, the program will NOT insert events at loop point to fix tempo and patch number to what it is supposed to be. Those must be applied manually during the MIDI editing process. If you don't fix them, the song may play incorrectly after it loops.

Converting
The revised MIDI2SSEQ uses a command line and is very easy. Now, you might be asking, why am I supposed to save the song to C:\Users\[NAME]? That is because you won't have to type a very long file address when using the command. MIDI2SSEQ also must be in the same place as the MIDI too. Note, you CANNOT drag-and-drop, because it will be missing an argument that it requires to convert. Open a Command Prompt window and type "midi2sseq nameofmidi.mid nameofsseq.sseq" without the quotes. You'll be telling the program to take the file nameofmidi.mid (nameofmidi will change, obviously) and convert it using the named program into nameofsseq (which is defined by you). When done, it will spit out a .sseq file. Don't worry about any errors on tempo. It's normal. The SSEq will be saved in the same directory that the midi is in.


Inserting
There are 2 ways to insert, but I'll make it simple for you. Open your .SDAT in both CrystalTile and VGMTrans. Find the song in VGMTrans that you want to replace. Now, find that song in CrystalTile. Right-click on it and click "Import" and browse to the MIDI that we just made. Double-click on it and it will attempt to insert it. IF it gives you an error, that means that the file is too large, and CrystalTile cannot repoint files. Therefore, you will need to make it smaller. It is possible to repoint files, but I am unsure as to how yet. Then, save the .sdat file and import it to your game. Test it in an emulator or a flashcard.

If you have followed all the steps correctly, you can make some good music. Like my song, for instance:
vILvXGhur9Q

Hack Pack link: http://www.box.net/files/0/f/0/1/f_581072414 and http://www.megaupload.com/?d=65A88ARG
If this worked for you, then good job. If not, keep reading. If something is unclear, don't hesitate to ask! I thank you for your time. If you want to repost this tutorial, please PM me or VM me.

Edited by Team Fail, 23 August 2011 - 10:49 PM.



Team Fail Post #2 Posted 23 August 2011 - 10:51 PM

    It's like polo. With Chainsaws.


  • Group: Members
  • Posts: 1,403
  • Member No.: 261,213
  • Joined: 01-September 10

  •  

I've added a new video that shows what can be done using the latest techniques I have found.


TheDreamLord Post #3 Posted 27 August 2011 - 11:07 PM

    GBAtemp Fan

  • PipPipPipPip

  • Group: Members
  • Posts: 484
  • Member No.: 279,888
  • Joined: 08-June 11
  • Location: Ireland

  •  

is it possible to change a .mp3 to midi or midi to mp3?


gbatempfan1 Post #4 Posted 27 August 2011 - 11:12 PM

    GBAtemp Regular

  • PipPipPip

  • Group: Members
  • Posts: 120
  • Member No.: 266,286
  • Joined: 02-November 10

  •  

QUOTE(TheDreamLord @ Aug 27 2011, 05:07 PM) <{POST_SNAPBACK}>
is it possible to change a .mp3 to midi or midi to mp3?


midi to mp3 is just recording the audio output as the computer plays the note information from the midi file and compressing it. mp3 to midi isn't so simple, as midi is actualy just a bunch of notes, instruments, and timing and a computer can't recognize such things well in enough variety of circumstances to disect the mp3's audio stream automatically.

Edited by gbatempfan1, 27 August 2011 - 11:13 PM.


Team Fail Post #5 Posted 28 August 2011 - 07:23 AM

    It's like polo. With Chainsaws.


  • Group: Members
  • Posts: 1,403
  • Member No.: 261,213
  • Joined: 01-September 10

  •  

QUOTE(TheDreamLord @ Aug 27 2011, 04:07 PM) <{POST_SNAPBACK}>
is it possible to change a .mp3 to midi or midi to mp3?

No. MP3 is streaming audio and MIDI is sequences. I think, if I am correct, you can make custom soundbanks and split the song into many, many pieces and do that, but I am unsure how to do that yet.


Gintoki Sakata Post #6 Posted 28 January 2012 - 12:08 AM

    Advanced Member

  • PipPip

  • Group: Newcomers
  • Posts: 74
  • Member No.: 293,089
  • Joined: 27-December 11
  • Location: Edo

  •  

View PostTeam Fail, on 27 January 2012 - 07:07 AM, said:

View PostGintoki Sakata, on 27 January 2012 - 06:59 AM, said:

I have an issue. I tried to replace the battle music from Nostalgia DS with the battle music from Golden Sun Dark Dawn. I did all the steps from the tutorial but the inserted Golden Sun battle music sounds horrible in Nostalgia. What did I do wrong? And why do we need the SBNK file of the music we want to replace? Isn't it better to use the SBNK file of the Golden Sun music in my case?

Does an easier way exist to replace music from a DS game with music from another DS game?

There is. Look here. It needs to be updated, but it's quite up-to-date as is.


Your tutorial has a flaw. It does describe how to MODIFY an existend soundtrack of a DS game,but it does not describe how to REPLACE a soundtrack with a soundtrack of ANOTHER DS GAME.

This is what I understood so far:

* In order for a midi file to sound like in the game, a separate sound bank file (dls) is needed
* You cannot assign a midi file to a foreign dls file (actually you can do it, but then there will be no sound)

Your tutorial does not describe what to do with the dls file of the music you want to insert/replace with.

So my question is, how can I put midi+dls together and insert them in a ROM/replace them with an old midi/dls?


Team Fail Post #7 Posted 28 January 2012 - 06:50 AM

    It's like polo. With Chainsaws.


  • Group: Members
  • Posts: 1,403
  • Member No.: 261,213
  • Joined: 01-September 10

  •  

View PostGintoki Sakata, on 28 January 2012 - 12:08 AM, said:

View PostTeam Fail, on 27 January 2012 - 07:07 AM, said:

View PostGintoki Sakata, on 27 January 2012 - 06:59 AM, said:

I have an issue. I tried to replace the battle music from Nostalgia DS with the battle music from Golden Sun Dark Dawn. I did all the steps from the tutorial but the inserted Golden Sun battle music sounds horrible in Nostalgia. What did I do wrong? And why do we need the SBNK file of the music we want to replace? Isn't it better to use the SBNK file of the Golden Sun music in my case?

Does an easier way exist to replace music from a DS game with music from another DS game?

There is. Look here. It needs to be updated, but it's quite up-to-date as is.


Your tutorial has a flaw. It does describe how to MODIFY an existend soundtrack of a DS game,but it does not describe how to REPLACE a soundtrack with a soundtrack of ANOTHER DS GAME.

This is what I understood so far:

* In order for a midi file to sound like in the game, a separate sound bank file (dls) is needed
* You cannot assign a midi file to a foreign dls file (actually you can do it, but then there will be no sound)

Your tutorial does not describe what to do with the dls file of the music you want to insert/replace with.

So my question is, how can I put midi+dls together and insert them in a ROM/replace them with an old midi/dls?

You can do the first few steps with another DS game. It doesn't necessarily have to be the same game.


Gintoki Sakata Post #8 Posted 28 January 2012 - 07:19 AM

    Advanced Member

  • PipPip

  • Group: Newcomers
  • Posts: 74
  • Member No.: 293,089
  • Joined: 27-December 11
  • Location: Edo

  •  

View PostTeam Fail, on 28 January 2012 - 06:50 AM, said:

View PostGintoki Sakata, on 28 January 2012 - 12:08 AM, said:

View PostTeam Fail, on 27 January 2012 - 07:07 AM, said:

View PostGintoki Sakata, on 27 January 2012 - 06:59 AM, said:

-snip-

-snip-


-snip-

You can do the first few steps with another DS game. It doesn't necessarily have to be the same game.


You mean I can use the sound bank file of music X with a midi file of music Y? I did that, but that resulted in no sound output.

I have done some research. Sound only works if you have a sseq file (midi), snbk file (dls) and an swar file (wave archive). Your tutorial completly ignores the swar file of the music you want to replace with. If those wave files are missing, no wonder why the music sounds messed up or don't work at all.

Now I did the following: I extracted from Golden Sun's sdat file the battle musics sseq, snbk and swar files and did rename them like the sseq/snbk/swar files of Nostalgia's shitty battle music. Then I tried to edit the sound_data.sdat of Nostalgia by importing Golden Sun's file but unfortunately the swar file is too big.

Then I tried the same with the epic battle music of Chrono Trigger. This time every file was inserted correctly. I repacked Nostalgia with the edited sdat file and hoped that it will work but the music was messed up all over the place. Sigh, it is really that difficult to replace music files of DS games? :(


Team Fail Post #9 Posted 28 January 2012 - 08:00 AM

    It's like polo. With Chainsaws.


  • Group: Members
  • Posts: 1,403
  • Member No.: 261,213
  • Joined: 01-September 10

  •  

View PostGintoki Sakata, on 28 January 2012 - 07:19 AM, said:

View PostTeam Fail, on 28 January 2012 - 06:50 AM, said:

View PostGintoki Sakata, on 28 January 2012 - 12:08 AM, said:

View PostTeam Fail, on 27 January 2012 - 07:07 AM, said:

View PostGintoki Sakata, on 27 January 2012 - 06:59 AM, said:

-snip-

-snip-


-snip-

You can do the first few steps with another DS game. It doesn't necessarily have to be the same game.


You mean I can use the sound bank file of music X with a midi file of music Y? I did that, but that resulted in no sound output.

I have done some research. Sound only works if you have a sseq file (midi), snbk file (dls) and an swar file (wave archive). Your tutorial completly ignores the swar file of the music you want to replace with. If those wave files are missing, no wonder why the music sounds messed up or don't work at all.

Now I did the following: I extracted from Golden Sun's sdat file the battle musics sseq, snbk and swar files and did rename them like the sseq/snbk/swar files of Nostalgia's shitty battle music. Then I tried to edit the sound_data.sdat of Nostalgia by importing Golden Sun's file but unfortunately the swar file is too big.

Then I tried the same with the epic battle music of Chrono Trigger. This time every file was inserted correctly. I repacked Nostalgia with the edited sdat file and hoped that it will work but the music was messed up all over the place. Sigh, it is really that difficult to replace music files of DS games? :(

That's the DLS you extract. I could rewrite that part later seeing as I have to add a new part to the tutorial.


Gintoki Sakata Post #10 Posted 28 January 2012 - 06:00 PM

    Advanced Member

  • PipPip

  • Group: Newcomers
  • Posts: 74
  • Member No.: 293,089
  • Joined: 27-December 11
  • Location: Edo

  •  

The dls file from your tutorial is only used in FL Studio for cosmetic purposes. Apart from that it's completly useless. It doesn't do anything to the midi you created via FL Studio.

Shitty midi + dls → Shitty midi

You can't "patch" a midi with a dls file. The DS doesn't know what dls files are. You need snbk files.

I found a tutorial that explains it correctly: http://jul.rustedlog...ead.php?id=7518
But still the music sounds messed up.


Gintoki Sakata Post #11 Posted 01 February 2012 - 09:12 PM

    Advanced Member

  • PipPip

  • Group: Newcomers
  • Posts: 74
  • Member No.: 293,089
  • Joined: 27-December 11
  • Location: Edo

  •  

@Team Fail: You don't have a solution for me, do you?

Edited by Gintoki Sakata, 01 February 2012 - 09:13 PM.


BlueLink_146446 Post #12 Posted 08 February 2012 - 04:01 AM

    Newbie


  • Group: Newcomers
  • Posts: 1
  • Member No.: 296,729
  • Joined: 08-February 12

I'm running into a similar problem. I've trying to take some of the Kanto region music from Soul Silver and Platinum's Team Galactic battle themes and put them into White, but so far they seem to mess up. I'm testing just exporting the sseq straight from the game and importing it into the other game, but I'll see what happens.







Users browsing this topic

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users