Inserting N-SPC Sequence Data from other N-SPC games with EbMusEd

Introduction

First of all, what the heck is a N-SPC? N-SPC is one of the various sound engines used by SNES games, N-SPC basically means Nintendo-SPC and is used by many Nintendo games.
There's also Capcom-SPC, Akao-SPC (Squaresoft), Konami-SPC, Namco-SPC, Rare-SPC and many others, but we can't convert from those since Earthbound uses N-SPC and all of those are different engines.
As if that was complicated enough, N-SPC also has different versions, Earthbound uses the standard version, but, for example, Super Mario World uses a beta version of the N-SPC engine, so we can't directly import songs from that game, Tetris Attack's engine is similar to SMW's and has extra commands so we can't insert from that one, late SNES Fire Emblem games use extra commands so you can theorically insert songs from those games but some features may be missing. Kirby's N-SPC is mostly identical to the standard engine but its panning table is inverted, it's not a big issue though.
Click here for a list of games you can insert songs from.

Inserting your song

Before actually starting, you have to choose your song, Zophar or SNESmusic may help, just pick your game there and download the SPC ost. If it comes in .RSN format then just open it like a .ZIP file.
Get VGMTrans here.
First, open VGMTrans and drag your SPC on it, after dragging the file on it, double click on the song's sequence data (in my case being "Dedede") and you should get something like this:

The SPC name means Kira Kira Kizu!
After doing so, right click on your song's sequence data and click on "Save as original format".
Now open the file you saved with a hex editor, I personally use HxD. When you open the file, you'll have to manually insert the EbMusEd header, this is pretty easy though, so don't be afraid.
First, check how many bytes the sequence data has, in my case it's 7C6:

Now, get the offset of your song, in my case being 4767:

Convert those numbers to little endian and insert them at the beginning of your file:
7C6 -> 07C6 -> C607
4767 -> 6747
First input the number of bytes the file has and then the offset number, you should get something like this:

And you're done! Save your file, open EbMusEd and use the Import Song option and your song should insert successfully.
Note that you will now have to manually fix instruments commands to match those of Earthbound or as your liking, same with Percussion commands ($FA), that's up to you though.



Tutorial by Pinci