Hello, I've been messing around with smf and bsc files a bit and this is what I found out. First of all you'll need a hex editing program. This is what I used: http://www.chmaas.handshake.de/delph...vi32/xvi32.htm Note: If you never used XVI before practice a bit first to grasp how the basic functions like copy paste delete, insert etc work.
1. What are .smf files and how to convert .mp3 to .smf?
Smf files are mp3 files with a simple hex string added at the beginning of the mp3 file. So you really don't need a converter, although it may be faster, one present on this site only converts from wav to smf what takes a lot more space what is undesirable. So open up your mp3 with Hex editor and insert this hex line (go to edit->insert string and choose hex string): 6673736D0100000002000000. Voila now you have a genuine smf file!![]()
2. What are .bsc files and how to edit them?
Bsc files direct certain element/event of the game to specific smf files and manages various properties of smf files like volume etc. (Note: I used this to change main Menu music only so far but I guess everything else should be similar to this.) Open up frontend.bsc from data\sound\music\ folder and you will see a lot of gibberish (note every bit is important so be careful not to delete anything by accident, make a backup before editing preferably).
You'll want to link this file to your newly created smf files which contains your music file. You will see references to 10 smf files here (use any except opening_ambience_with_birds and write name of your smf file which you placed inside your mods data\sound\wav\music\frontend). Now only one thing is left if name of file you just wrote is the same as the name of the file you overwritten then every thing is ok, but if it's shorter or longer you'll need to edit the forth hex space before path name so it's decimal value will match length of path you've just changed. That's it!
Look at the pic below: count the number of letters marked in red and compare it to decimal value of selected hex place which is marked red here. They must match or you'll bsc file won't work and it will probably cause the game to crash.
p.s. If anyone is interested here is a bit more but I haven't yet figured out what it all means so this part is useless so far:
More
SO basically every new sound file entry in frontend.bsc start like this:
HEXCODE:
01 11x00 01 11x00 01 3x00 0B (this is hex value for number of letters in "ReleaseTime" which is 11) followed by 3x00 and hex values for this phrase: "ReleaseTime"
After that comes:
01 3x00 03 9x00 followed by the line which I don't know what it stands for but it's always the same for these files: 80 3F 21 C8 83 40 BB 0A F9 3E 00 00 A0 40 4X00
Next hex place represent the number of the track (smf file) what determines when it is played i believe (since we have values from 0 to 8 in this bsc file). Don't change this!
Next we have:
3x00 10 (dec values if 16, guess what's this is for again) 3x00 followed by phrase "Default:efault" written in hex.
Next comes: 00 01 00 then usually 32 (or 0A) followed by 3x00 the we have 4 place with various hex numbers usually ended by 3F I suspect this could be reference to a particular hex place (written in backwards, I've seen this before) within another file but it may be something else entirely.
And finally we have 00 00 80 3F 6x00 80 3F 6x00 01 followed by our number line we edited in first part of this how to XX then 3x00 and path to particular smf written in hex code.
That's it, if you can figure something out of this i.e. how to regulate volume or what all this code stands for please notify me but as far my needs go so far this isn't necessary but still it would be good to know.
EDIT: number written in italics represent numbers of repetitions





