It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Thank you for the script. With this I was able to figure out which battle-music was annoying me.
So I could copy and rename mus_bat_300.wav to mus_bat_100.wav so the old _100 is gone.

The original _100 has a very distinct melody that got on my nerves.
avatar
shmerl: Enjoy: https://gist.github.com/shmerl/2cec6273ba25dd1486dd

You can also put the author (Jeremy Soule) in the tags yourself.
Proper track names can be found here:

[url=http://starwars.wikia.com/wiki/Star_Wars:_Knights_of_the_Old_Republic_%28soundtrack%29]http://starwars.wikia.com/wiki/Star_Wars:_Knights_of_the_Old_Republic_%28soundtrack%29[/url]
Came to these forums looking for this exact information. I played this in disc form through the big collection that released some ten years or more back, and then got them again through a big SW Humble Bundle a few years back. I'm planning on play through them again because I adore the first one and, while I didn't much care for the second, Obsidian has rocketed to being one of my favorite devs ever thanks to the Pillars of Eternity series and I feel like I should give KotOR II a chance. Anyway, would these work with Steam and how, exactly, do I use them? I'm savvy enough for basic trouble shooting and so forth but this is a little beyond me. :)

Edit: I did a little research after following the link you posted to the CD. Apparently it came as part of a collector's edition of KotOR. I found a copy on Amazon but it's $80, unfortunately. It's really nice looking and thus really tempting, though :P

Edit 2: Nevermind, upon closer examination that was a collector's soundtrack set for The Old Republic MMO. Still, I loved the music, settings, lore, and story of the MMO and might splurge on that if it's still hanging around come tax time...
Post edited December 30, 2019 by PyreBall
avatar
PyreBall: Anyway, would these work with Steam and how, exactly, do I use them? I'm savvy enough for basic trouble shooting and so forth but this is a little beyond me. :)
I don't have the Steam versions, but I assume they are using the same audio resources, so the scripts should work for them as well. You need some environment where to run Bash to use them.
Post edited December 30, 2019 by shmerl
avatar
PyreBall: Anyway, would these work with Steam and how, exactly, do I use them? I'm savvy enough for basic trouble shooting and so forth but this is a little beyond me. :)
avatar
shmerl: I don't have the Steam versions, but I assume they are using the same audio resources, so the scripts should work for them as well. You need some environment where to run Bash to use them.
Time to further show how illiterate I am to this kind of thing: What is Bash?
avatar
PyreBall: Time to further show how illiterate I am to this kind of thing: What is Bash?
Shell and command line language.

en.wikipedia.org/wiki/Bash_(Unix_shell)

It's pre-installed on Linux, but on Windows (if you happen to use it), you'd need to install it. Something like this: https://itsfoss.com/install-bash-on-windows/
Post edited December 31, 2019 by shmerl
avatar
PyreBall: Time to further show how illiterate I am to this kind of thing: What is Bash?
avatar
shmerl: Shell and command line language.

en.wikipedia.org/wiki/Bash_(Unix_shell)

It's pre-installed on Linux, but on Windows (if you happen to use it), you'd need to install it. Something like this: https://itsfoss.com/install-bash-on-windows/
Oh lord, yeah, I was forced to use Linux for a few months some years back. The only computer in the house was my dad's and he managed to contract a nasty virus. My brother nuked it and decided to try Linux instead of Windows and it just...kicked my ass. Thanks for all the help, man.
Thanks for this!

Also, for any Windows users like me who don't have a lot of Linux experience, once you get bash installed, you can just run the shell script from good ol windows command prompt. Just navigate to the right directory and type "bash script_name.sh".
Post edited April 02, 2021 by Snargelfargen
avatar
Snargelfargen: Thanks for this!

Also, for any Windows users like me who don't have a lot of Linux experience, once you get bash installed, you can just run the shell script from good ol windows command prompt. Just navigate to the right directory and type "bash script_name.sh".
Glad it worked! Just as a note, on Windows besides bash you'd need to get some tools like dd and xxd. Depending on the method of installing bash they might come with it or not.
Post edited April 06, 2021 by shmerl
Hey shmerl, thank you for writing the scripts to make these playable. I was reading the notes for the KOTOR 2 script and I was wondering what you mean by this:

[i]# Note: Some files don't have Xing, and should be handled individually.
# mus_kriea.wav - uses regular Info instead of Xing
# mus_s_kreiaevil.wav - uses regular Info instead of Xing
# mus_a_main.wav - uses regular Info instead of Xing
# mus_a_kreiadark.wav - uses regular Info instead of Xing
# bed_950mal.wav - weird case (neither Xing nor Info).
# Chop off 58 bytes, similar to KoTOR I.
# *** Fixing method (for Xing/Info case):
# 1. Get position of first Xing/Info in the binary.
# 2. Chop everything before Xing/Info and Xing/Info itself (+4 after the position).
# 3. Prepend binary mp3 header to the result.[/i]

I can open these in Sublime to take a look, but how do you know what data to remove? I am totally new reading binaries (or is it bytes?) so its all Greek to me. Any help would be greatly appreciated.
Post edited June 03, 2021 by BulletWasp
avatar
BulletWasp: Hey shmerl, thank you for writing the scripts to make these playable. I was reading the notes for the KOTOR 2 script and I was wondering what you mean by this:
I mean how to locate in the binary some marker that would match to a similar position in a normal mp3 binary. If you encode something for example with lame mp3 encoder, you'll notice a string "Info" there. It matches to string "Xing" in many of these obfuscated files which allows you to determine at what position to chop data off.

Unless you want to do it all manually, you can just run the script - it will do it for you. It's not only about removing a chunk of garbage, you also need to prepend the result with a proper mp3 header.
Post edited June 03, 2021 by shmerl
avatar
BulletWasp: Hey shmerl, thank you for writing the scripts to make these playable. I was reading the notes for the KOTOR 2 script and I was wondering what you mean by this:
avatar
shmerl: I mean how to locate in the binary some marker that would match to a similar position in a normal mp3 binary. If you encode something for example with lame mp3 encoder, you'll notice a string "Info" there. It matches to string "Xing" in many of these obfuscated files which allows you to determine at what position to chop data off.

Unless you want to do it all manually, you can just run the script - it will do it for you. It's not only about removing a chunk of garbage, you also need to prepend the result with a proper mp3 header.
Yeah, I did run the script last night and saw that it did fix those as well. I thought at first that notation meant it had to be done manually, thankfully not lol. Thanks again for those scripts! I have the K1+2 OSTs but they have way fewer tracks than the streammusic folders.
avatar
BulletWasp: Thanks again for those scripts! I have the K1+2 OSTs but they have way fewer tracks than the streammusic folders.
You're welcome!
Another quick question, I noticed that some files (not sure how many to be exact, haven't looked through all of them) display incorrect duration times (e.g. a song says its 1:16 long, but it really is only about 43 seconds) in some music players (I use MusicBee specifically) - is this a byproduct of the junk header data or something unrelated? I've used MP3Diag before to fix some other music files, but I was mostly just curious as to how that can show up.
avatar
BulletWasp: Another quick question, I noticed that some files (not sure how many to be exact, haven't looked through all of them) display incorrect duration times (e.g. a song says its 1:16 long, but it really is only about 43 seconds) in some music players (I use MusicBee specifically) - is this a byproduct of the junk header data or something unrelated? I've used MP3Diag before to fix some other music files, but I was mostly just curious as to how that can show up.
What is the file name for such example? I can check it with something like mpv.
Post edited June 10, 2021 by shmerl
So is there a copy of the soundtrack I can buy anywhere? I feel like I'd almost rather do that than messing around with game files or whatever to get the music...