A Ordinary Kanto Lover

Route 1 (Kanto)
Seen 11 Hours Ago
Posted 1 Week Ago
195 posts
3 Years
Thanks I'll try it out! My other question is where does the extra Data for the music go if it was a longer track than the old one? I know we made space for the header, but that barely takes up any bytes whereas when I insert a cry it takes from 4-8k bytes. I've checked the tracks before and after the ones i've inserted and they're fine. I'm just hoping that it's not going to overwrite some important data in the future.
Each track is a continuous sequence of bytes. As such, it always risks damaging data if it is too long (when overwriting a single existing one). If it does not, then probably the track is not as long as you expected. Check the length of the track via HEX tools such as HxD (free) or UltraEdit (paid).

The header of a song is made up of these things:
4 bytes: AA 00 00 B2 (AA stands for the number of the tracks, from 01 to 0A);
4 bytes: Pointer to the voicegroup;
4×[number of tracks] bytes: Pointers to each track.
And each track can be independently inserted in any free space (as long as its position is in the header).

In order not to damage crucial data, make sure you correctly calculate the size of the header. Never try to overwrite existing bytes unless it is mandatory (e. g. changing pointers).

You are challenged by Pokémon Trainers Red, Blue & Leaf!
Pokémon AgateRed and JadeGreen (Chapter 1 Finished, Chapter 2 In Progress)
My remixed music list: Here
My deviantART page: Here