Banner
Views: 943,949,185
Time:
21 users online: Bullymario, ElderSubZero, Erik_The_Swift, HammerBrother, Hatsune_Blake, lx5, mario90, marioboy10, MarioIsTheBest1234, mateochips, Nanita, OnlySpaghettiCode, Ralshi02, rhizome,  Sayuri,  shovda, SimFan96, slakkmichael, solgaleo35, SubconsciousEye, zing - Guests: 104 - Bots: 286 Users: 52,491 (2,000 active)
Latest: zing
Tip: Entering a door or pipe, activating a P-Switch or grabbing a star, completing the level, hitting a message block, and dying will cause issues on the title screen, such as causing musical glitches, or trapping the player in an endlessly-looping level.
Not logged in.
The New Way to Port Music + A Few Custom Songs (Like Bad Apple)
Forum Index - Sunken Ghost Ship - C3 Museum - Fall 2010 - The New Way to Port Music + A Few Custom Songs (Like Bad Apple)
Pages: « 1 2 » Link

You can now listen to your custom songs before you insert them!
You can now extract the note data from SPC files!


But if those don't interest you I at least have three custom songs at the end that you can listen to.

Ladies and gentlemen, I present to you a mad scheme. I call it, "A MAD SCHEME." This new program I’ve created will allow you to listen to your custom songs before you insert them with Addmusic. How, you ask? By making use of and being able to convert a little known file format known as the MOD format. The best way to think of this format would be like a MIDI, but instead of being restricted to the instruments provided to you by default, you can make use of any sample you want. This means that you can not only play a song with Super Mario World’s samples, but any custom sample you can get your hands on. Sound awesome yet?

All you'll need to do this is A MAD SCHEME and a MOD creator. I personally recommend OpenMPT; it has an extremely simple to use interface and you can get started immediately. If you have no clue how to use this software, don’t fret, I’ll explain it to you in detail. If you do, then you can scroll down past this tutorial to find out how to convert a MOD file to a MML file.

Download Link

The first, and absolutely most important step, is to record your samples. Never skip this part; it is extremely important, but not for the reasons you may think. The reason you’re doing this is so that all of your samples are transposed to the same note value, so the only time skipping over this step can ever really be warranted is if you’re using a percussion instrument. If you don’t understand, then just let me show you. Create a new text file to insert into Addmusic. Type into it whatever samples you’re using, so it looks something like this:
Code
#0 t20 o3
@9
c1
@5
c1
@14
c1
$E5 $A0 $04
c1
$E5 $A1 $04
c1
$E5 $A2 $04
c1
$E5 $A3 $04
c1
$E5 $A4 $04
c1
$E5 $A5 $04
c1


Of course, you’ll have to change this to reflect what samples you’re using. Now insert this “song” with Addmusic and grab your favorite WAV editor. Record SMW’s output (all it should be is one note playing after the other), and when you’re done, save the entire thing. Note that you should save it at 8000 hertz. If your WAV editor does not give you an option to save at different sampling rates, you may run into problems. WavePad allows it, I don’t know about any others.

The next thing to do is to open up OpenMPT and go to File -> New -> MOD. Now select the “Patterns” tab up top. Click the open button (the one in the Patterns tab, not under the file menu!) and open for the WAV you’ve saved. In the built-in WAV editor that the program provides, edit out all but one sample by highlighting other samples and hitting the delete key. Now select a new sample number and do the same thing until you have all your samples inserted into your MOD. Note that if you did not save at 8000 hertz, you may have to press the downsample button in order to get your sample to the correct octave.

Now click the “Patterns” tab. This is where all of your note data goes. If they’re not already pressed, activate the red “record” button and the button to the far right of it that says “Hi.” Lastly, go to View -> Song Properties and then select 8 channels to change your MOD from a standard 4 channel MOD to an 8 channel one.

Now it’s time to go into a brief lesson about the MOD format. Sorry, but it’s necessary. I’ll try to keep this as quick and painless as possible. A MOD is made up of patterns, which you can think of like measures. In each pattern, you can place note data and events, such as volume and panning. A pattern can hold up to 64 notes per channel, so since very rarely are songs made up of 64 notes only, songs often have many patterns.

In the tracker, each row is called a division. One division for one channel can contain exactly one note event and one other event. The note event is pretty obvious: it means “play a note when you hit this division.” The other event is used for things like changing the volume, changing the panning volume, changing the tempo, etc. The other event is made up of 2-3 values. The first is one half of a byte and specifies the type of event. For now, know that C is volume, 8 is panning, and F is tempo. The next byte determines how that effect works. C38, for example, would change the volume for that channel to 38 (hex). The highest volume is C40. 880 would change the panning to 80, which is centered. 800 is all the way to the left and 8FF is all the way to the right. If this is confusing you, don’t worry, there a MOD at the end of this tutorial that uses all these effects so you can see how they work for yourself.

So when the tracker plays a division, it will play each note for each channel with their corresponding effects. Some effects have odd properties to them, though. For example, the volume command will change the volume for a channel, but once the next note in the channel is triggered the volume will go back to that sample’s volume. The volume for each sample can be changed in the Samples tab, by default it is always 64 (40 in hex). So for example, if you played a note with a volume of 38, the next time the note is played, it won’t be at 38 again unless either a) you specify the volume command again or b) the default volume for that sample is also 38.

Another minor thing I should note here is that MOD files have no formal “note off” command. If you want to turn off a note, set its volume to 0.

Tip: Combining channels is so amazingly easy you should never need to have sounds playing on a SFX channel if there’s another channel that’s open. Just select all the notes and events and drag them to another channel.

In summary, here's a picture.


Okay, now that you’ve had a brain meltdown from all that information, I’d recommend that you start experimenting. It’s the best way to figure out how all this insanity works. If you want to insert anything into your MOD, select the channel and division, and select the individual column for the channel. In order from left to right, each column (in Hi detail mode, which I told you to select earlier) is: Note pitch, sample number, unused in MOD files, and effect. Everything is entered with your keyboard. You can insert a note at pitch C, for example, by selecting the note column and pressing Q, A, or Z to get C at different octaves. If you need it at a higher or lower octave than what's available, you can then press one of the number keys to manually select an octave, or press Ctrl+Shift+Q to jump up an octave and Ctrl+Shift+A to jump down. Experiment and see what you come up with.

Remember how earlier I said that MODs were made up of patterns? Well eventually you’re going to run out of room, so when that happens you’ll have to insert a new pattern. Do this by right clicking on the list of patterns (a group of white boxes just above the pattern editor) and select Create New Pattern. There; you’ve got a blank new pattern waiting for you. You can rearrange patterns as well if you wish; patterns can be in any order.

By default, a pattern length of 64 means that all your songs will be in 4/4 time. What if you want a song in 3/4 time? That’s simple. Place the effect D00 on any channel on line 47. This is the “Pattern Break” event, and it will stop the current pattern after it’s played everything in its division and then jump to the next pattern. Note that values other than 00, such as D09 or D38 may not work in A MAD SCHEME correctly; I have yet to test functionality.

What if you want to have an intro in your song? As in, what if you want one part to only play once? That’s easy too. Here you’d use the BXX command, where XX is, in hex, the pattern number you want to jump to. Note that, for example, B03 means “jump to the beginning of the fourth (3+1) pattern”, not “jump to pattern number 3.” Note that the B command is also used by A MAD SCHEME to mark the end of a song. It is not required to end the song, but just note that it will not convert anything past this command.

Hopefully that’s all the basics of the MOD file. The best thing you can do is experiment your head off and see what happens. Now for a really cool secret, since you’ve read this far—the MODs that OpenMPT have almost the exact same octave restrictions as SMW. They can go one or two notes higher it seems, but other than that you’ll never be running into a situation where what you hear in the MOD is out-of-bounds in SMW. Awesome, no?


That massive information dump ends here. I'm also using this large font to break up these massive walls of text. I hope you don't mind.



Alright, so you’ve composed an epic song with OpenMPT (or any other MOD file creator). Now’s where you get to port it to SMW. Open up A MAD SCHEME and click on the Instruments tab. You should see two lists, one with a list representing all the possible MOD sample values, and one with what they will be represented as in SMW. If you wish to change one, click on the MOD sample number you wish to change, and enter the new value into the text box. In the event that you want to change every instrument to use a custom sample, use the two buttons at the bottom; $E5 is for Carol’s MORE.bin and $F3 is for AddmusicM.

Now go to the Options tab. This determines what MOD effects will appear in your MML. Note that many of them do not have a perfect SMW equivalent, the ones that are supported are checked by default. If A MAD SCHEME comes across an event, such as, for example, 0D7 (which would be an Arpeggio in the MOD file), that has no SMW representative, it will instead (in this case) insert the text “(Arpeggio D7)”. This lets you know where an effect happened so that you can come up with your own equivalent if need be. In case you’re wondering, the Misc. check box is for the EXY command, which is a strange command that can do a bunch of different things such as force a sample to play backwards (none of which are supported at the present time).

The length of note per tick list box determines how many divisions make up one line of an MML file. At 64, one pattern equals one line. 32 means that one pattern equals two lines. 1 means that every note gets its own line. Yikes. Note that the pattern break command will automatically be represented by a line break.

Lastly is the Transposition tab, which allows you to shift notes up or down per sample. Useful if you are a bad person and skipped the first and most important step like I told you to never ever do. It is very similar to the Instruments tab, but in this case, the notes will be shifted by however many semitones you enter. A negative number shifts a note down, and a positive number shifts a note up. 12 is one octave up, -12 is one octave down.

When all the setup work is done, go to the Convert tab and click the Load MOD File button. Then select your File. The result will be displayed in the textbox below. To select everything at once, right click and press “Select All.” Naturally, the more complicated your song is the more you’ll have to fiddle with it a bit after it’s been created, E.G. adding fine tuning commands and such. But for the most part, all the drudge work has been done for you.


Here's where you learn how to port SPCs.



Alright, now I mentioned that you can now rip the note data from SPC files. Here’s how you do it. Go here and extract the files. Now place your SPC file in the same directory as the program, along with a copy of cmd.exe. Now in cmd.exe type in “openspc.exe –i songname.spc” where, obviously, songname.spc is your song. Now wait until your song has looped (it will likely sound rather static-ey) and press any key to exit. It will create an IT file, which is like a MOD file, but with almost no documentation available about its data format. :P You can open it with OpenMPT, and from there you have your note data! Happiness for all!

And…uh…I think that’s it…oh wait! I almost forgot! I have three examples of what you can easily create with this program. Here’s the first; BAD Apple!! from Touhou 4. I'll even give you the MOD file that I used. The other two are Theme 2-3 from Shadow of the Beast II and Japonesse from Phoenix Rising.

Oh, and you’re wondering what A MAD SCHEME stands for? “Amiga MOD Altering Device for Song Creation in a Hugely Easy Manner, Eh?”

If you have any questions, post them here and I'll get back to you, if not immediately, then later today, since I'll be out for a little bit. Similarly, I rushed this a bit in order to finish before I left, so if there are any errors, point them out and I'll fix them after I get back. Enjoy easier music porting!
I should get a new layout.

Probably won't, though.
HELL YEA, cant wait to try this, you have made a heavy jump forward
Welp. This one is quite the time saver. Thanks for making it :)

--------------------

Warning: Opinions expressed by Lexie or others in this post do not necessarily reflect the views, opinions, or position of Lexie himself on the matter(s) being discussed therein.


Yoshi's Island Disassembly C3 Thread
SPASM - LevelASM for Yoshi's Island!
Yoshi's Island Disassembly Data Dump Wiki
So I'm in a very hyper, TL;DR mood right now which probably isn't much good for C3, but just to clarify: You CAN use this to create sampleless songs, right? How much of that crap can you cut out to use it without samples?
For a very long time I've been waiting for a program to simplify music creating and now it's finally here. Therefore, you, my friend, win the awesomeness prize. Good job, Kipernal!

--------------------
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
Are you going to release this port of Bad Apple ?
I want it so hard now that I listened to it.
Originally posted by Maruhai
Are you going to release this port of Bad Apple ?
I want it so hard now that I listened to it.



HINT: Open the MOD file in A MAD SCHEME.

--------------------
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
I got back sooner than I thought. :D

Originally posted by omegazeroINFI
HELL YEA, cant wait to try this, you have made a heavy jump forward
Originally posted by DJSecret
Welp. This one is quite the time saver. Thanks for making it :)
Originally posted by RPG Hacker
For a very long time I've been waiting for a program to simplify music creating and now it's finally here. Therefore, you, my friend, win the awesomeness prize. Good job, Kipernal!


You're very welcome. :)

Originally posted by sacredfire059
So I'm in a very hyper, TL;DR mood right now which probably isn't much good for C3, but just to clarify: You CAN use this to create sampleless songs, right? How much of that crap can you cut out to use it without samples?


Absolutely. The only difference is that when recording your samples, instead of doing, say,
Code
#0 t20 o3 
@0 c1 
@1 c1
etc. 
$E5 $A2 $04 c1 
$E5 $A3 $04 c1
etc.


you'd do
Code
#0 t20 o3 
@0 c1 
@1 c1 
etc.

Since you only need the samples you are going to use, there's no reason to, well, grab samples you won't use.

Originally posted by Maruhai
Are you going to release this port of Bad Apple ?
I want it so hard now that I listened to it.


Yes, but I'd like to finish tweaking a few things first. Specifically I cheated a bit here and used echo with Romi's addmusic, so I'm going to create an extra version that works with AddmusicM first. I'll release both versions, but the Romi version will have to have echo disabled.

Originally posted by RPG Hacker
Originally posted by Maruhai
Are you going to release this port of Bad Apple ?
I want it so hard now that I listened to it.



HINT: Open the MOD file in A MAD SCHEME.


Extra hint: You'll have to to a bit of fine tuning ($EE $XX) to the trumpet, strings, and high piano samples to get it to work correctly. But I'll be releasing it soon enough anyway, so no need to worry. Actually, Here's the version I have currently. It's completely unlooped and very large, but if you absolutely can't wait then it's yours.

Thank you for the responses, everyone!
I should get a new layout.

Probably won't, though.
Originally posted by RPG Hacker
HINT: Open the MOD file in A MAD SCHEME.

I'm just a lazy guy.

@Kipernal : If you don't finished it, I let you finish it; I just guessed it was finished and you forgot to inlude the txt.

Dear god, this is amazing! This can have some use whenever I try to get into porting!
...sadly, I cannot be assed to even get back into SMW hacking. ._.
Nothing to put here at the time being.
Thanks to Tom Servo for the awesome new layout!
This has to potential to revolutionize the way we create music to add to our hacks. Awesome stuff!
I'll be trying this out.
As soon as I can figure out how to get WavePad to record from my laptop's speaker, and not my laptop's microphone, I'm trying this ASAP.

--------------------
It would be better if it were IT.

--------------------
________________________________________________________
Mario the Gaul
Originally posted by RedToonLink
As soon as I can figure out how to get WavePad to record from my laptop's speaker, and not my laptop's microphone, I'm trying this ASAP.


I think the setting you want is "Windows Record Mixer". If you're using Windows, of course.



Originally posted by ggamer77
It would be better if it were IT.


I agree completely, however, that's not a reasonable option for a few reasons. In order of importance:
  1. There's almost no data on the format of IT files, like I mentioned above. I can't convert them if I can't find out how they work...
  2. MOD files have the same octave restrictions as SMW, making them extremely convenient
  3. From what little information I could find on IT files, they seem to be compressed, and me being a very lazy person, would be much less likely to want to work with a format like that. But that just means that it would likely take longer, not that I wouldn't do it at all.


Also, I forgot to mention that I made a minor adjustment to the tutorial; I pointed out that the maximum volume is C40, since that's kind of important information to have. :)
I should get a new layout.

Probably won't, though.
Man, I'm stuck with the IT files. So I converted an SPC- to an IT-file and it sounds pretty good in OpenGT, but whenever I convert it to a MOD-file it looks it's tempo. Even when I set the tempo in the first division it doesn't seem to have any effect. Then again that might only be because I have absolutely no experience with music and don't know what I'm doing in the first place. Can you help me out a bit? Everyting I want to do is converting the IT-file to a MOD-file that sounds similiar to it.

--------------------
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
Originally posted by RPG Hacker
Man, I'm stuck with the IT files. So I converted an SPC- to an IT-file and it sounds pretty good in OpenGT, but whenever I convert it to a MOD-file it looks it's tempo. Even when I set the tempo in the first division it doesn't seem to have any effect. Then again that might only be because I have absolutely no experience with music and don't know what I'm doing in the first place. Can you help me out a bit? Everyting I want to do is converting the IT-file to a MOD-file that sounds similiar to it.


Whoops...I forgot to explain MOD tempo. It's controlled by the F command, like I said before. But depending on the value you give it, it will have a different effect. If the value is 33 or above, it will set the BPM, just like in a normal MIDI file. If it is below, however, it will set the ticks per division. By default it is 6. If you set it to 3 the tempo will double. At 12 the tempo will be halved. You can set both "types" of the F command on the same division, as long as you put them on different channels, obviously.

Also, you should really only rip the note data from IT files. OpenSPC, shall we say, only gives you a format that you would want to convert to MOD, not convert to MML. It's difficult to explain. Essentially, I'd highly recommend just using the IT file to get the note data, and then recomposing the file in a MOD.
I should get a new layout.

Probably won't, though.
Originally posted by Kipernal
Also, you should really only rip the note data from IT files. OpenSPC, shall we say, only gives you a format that you would want to convert to MOD, not convert to MML. It's difficult to explain. Essentially, I'd highly recommend just using the IT file to get the note data, and then recomposing the file in a MOD.


So... How does one go about that? Copy & Paste everything note by note? #w{=(}

--------------------
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
Does this allow you to create custom music entirely?
Originally posted by RPG Hacker
So... How does one go about that? Copy & Paste everything note by note? #w{=(}


Kinda...yeah. But the main advantage here is that you know the exact information used, instead of porting by ear or using a MIDI...that was ported by ear. It takes time, but it ensures a maximum-accuracy result.

Originally posted by Blue_Raven
Does this allow you to create custom music entirely?


That's the goal, yep.
I should get a new layout.

Probably won't, though.
Pages: « 1 2 » Link
Forum Index - Sunken Ghost Ship - C3 Museum - Fall 2010 - The New Way to Port Music + A Few Custom Songs (Like Bad Apple)

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2021 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy
  • sm64romhacks