+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Music Hacking
Pages: [1]
Author Topic: Music Hacking  (Read 682 times)
SirSnowe
Guest
« on: December 22, 2007, 12:08:33 am »

Let's Take Castlevania 3. If i were to recreate the levels and some of the music. How can i put songs like from Castlevania 2 into Castlevania 3. Because from what i remember. I played a game called Megaman Ultra or something like that and one of the levels, which was quickman's level he had sparkman's music. So i was wondering if the same can be done for castlevania. I am learning to do rom hacking so i'd like to know what steps  can i take to change the music tracks.
Dr. Floppy
Guest
« Reply #1 on: December 22, 2007, 04:53:50 pm »

What is your current level of musical expertise?

By that, I mean can you tell a quarter note from a thirty-second rest, can you notate basic rhythms by ear, etc.? How's your pitch perception?

SirSnowe
Guest
« Reply #2 on: December 24, 2007, 02:20:36 pm »

I do not have any music experience. I am not a composer i am more of a DJ rather than a composer.
Sliver X
Guest
« Reply #3 on: December 24, 2007, 04:47:16 pm »

Then you're facing a daunting task. Most of the actual hack work for all the NES games I've worked with (musically) wasn't too hard, but this was only because I have over 17 years of musical experience under my belt.

Trying to hack music without any understanding of music speaks for itself, regarding the difficulty level.

*Edit* This is assuming that you want to make songs that aren't pure shit.
Disch
Guest
« Reply #4 on: December 24, 2007, 06:53:03 pm »

I think he might be under the mistaken impression that you can just copy and paste songs from one game into another game.

This, of course, is not how it works (except for a handful of rare cases of game which use the same engine).  Making new songs for music in a game requires you to rescore the music and put it in the game by hand.
KungFuFurby
Guest
« Reply #5 on: December 25, 2007, 07:23:53 pm »

Yup. Games use code to play music, so you need to learn the "code" to put the music in. Or something like that...
Dr. Floppy
Guest
« Reply #6 on: December 25, 2007, 07:28:32 pm »

Quote from: SirSnowe on December 24, 2007, 02:20:36 pm
I do not have any music experience. I am not a composer i am more of a DJ rather than a composer.

Then you've probably got the concept of quarter notes down pat! (Those are the solid black ones, commonly used in techno music to reveal the tempo via incessant pulsation.)

Music theory isn't so tough to learn, especially that which pertains to ROM hacking. You needn't know about plagal cadences or how Liszt would've opted to end a particular phrase using classical post-Romantic style. Forget all of that; just learn how to notate rhythm via quarter, eighth, sixteenth (etc.) notes. Modern music is rather conducive to this effort, as songs tend to contain the same two-measure drum beat through their entire three minutes of emo puling.

Once you learn to visualize (and notate) rhythms by ear, you're well on your way. Don't worry about pitch identities; very few people can name pitches by ear. Just get yourself to the point where you know that F-sharp is the same tone as G-flat, find out where middle C is located on a keyboard, etc.

Disch
Guest
« Reply #7 on: December 25, 2007, 07:54:29 pm »

Quote from: KungFuFurby on December 25, 2007, 07:23:53 pm
Yup. Games use code to play music, so you need to learn the "code" to put the music in. Or something like that...

Yes and no.  Yes games have music driving code.  No, you don't need to know any of it to edit music.

Games have music engines that play the music -- but the music data itself is stored somewhat intuitively (usually).  That is, notes/rests are assigned a tone and length, there are loop markers, etc.

The thing is each engine has its format its own way.  So music from one game might not be in the same format as music in another game.

I like to compare it to level data.  Just because two games have levels, doesn't mean you can copy/paste levels from one game into the other.  Likewise, just because both games have music doesn't mean you can copy/paste the music data over either.
SirSnowe
Guest
« Reply #8 on: December 30, 2007, 05:05:08 pm »

Thanks, so let's say i wanted to edit Megaman 3. Within that utility that edits that particular game how would i be able to do that? Or if there is a program you can recommend for me to use to edit music?
Dr. Floppy
Guest
« Reply #9 on: December 30, 2007, 06:04:30 pm »

Quote from: SirSnowe on December 30, 2007, 05:05:08 pm
Thanks, so let's say i wanted to edit Megaman 3. Within that utility that edits that particular game how would i be able to do that? Or if there is a program you can recommend for me to use to edit music?

I'm not sure which *utility* you're referring to; DataCrystal's ROM map for MegaMan 3 is totally blank, so this is going to take a little bit of effort.

I did notice, however, that MegaMan 2 has a rather spiffy ROM map posted; this is good. I recall a rumor that Capcom used a proprietary/consistent music coding sequence among their games, or at least some of the NES Megaman ones.

Your best bet is to open up the Megaman 2 ROM in your favorite hex editor (I like Translextion, but I'm in the minority) and check out the section from $35000-$3D000. (This seems to be the section which codes for sound effects, so it's a reasonable assumption that the music might be stored here as well.) If you've never done music hacking before, this will be akin to shooting in the dark, but you'll need to scan the data sequences for oft-repeating values with identical first digits. In other words, if you see something like:

Code:
87-1A-20-22-85-11-11-84-15


...it's a good bet that bytes in the 80's code for rhythm offsets and values in the 10's and 20's code for individual pitches.

This, of course, assumes that the game codes for rhythm and pitch individually. Some games code for both with a single byte, which makes it harder to spot patterns. But once you think you've found something, try altering the pitch bytes by +/- 2 or 4. Then play thru the game to see what (if any) music is affected. Once you get a lead, pound the ever-loving hell out of it until you know how the game codes for what.

...then open up the MegaMan 3 ROM and look for similar patterns. Good luck!  :angel:
SirSnowe
Guest
« Reply #10 on: January 06, 2008, 04:47:16 pm »

Thank you VERY much. I will mess around with that, I appreciate your help. I'll give you details on the progress. I already made a Megaman 3 hack where the levels are hard as sin which makes the wily levels sort of a privilage because they remain unchanged. But anyway my Megaman 3 project is to change the music and levels and if possible change the look on some of the bosses. But that's another topic on it's own. But for now i will see what i can do with the music.
Dr. Floppy
Guest
« Reply #11 on: January 06, 2008, 11:49:29 pm »

Quote from: SirSnowe on January 06, 2008, 04:47:16 pm
Thank you VERY much. I will mess around with that, I appreciate your help. I'll give you details on the progress.

No problem!  :thumbsup: I'm currently embarking upon a similar quest with Zelda 1, although full disclosure forces me to admit that it has a fair amount of music data documentation already available...

Looking forward to hearing about your progress. Music hacking can be a very rewarding endeavor.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC