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

×
high rated
I was looking for the soundtrack for the game (by Jeremy Soule), but couldn't find it anywhere as an add-on. The game contains actual audio files (found in <game-dir>/streammusic directory) for both ambient sounds and music, however for some weird reason they are prepended with some format obfuscating garbage which makes audio players choke on them.

Just looking at the files though reveals their true nature. If you clean the garbage in the beginning, you get a bunch of pretty standard WAV and mp3 files.

Example:

al_nt_undrwtrbed.wav

If you remove 470 bytes of garbage in the beginning, you'll get a valid WAV file with ADPCM encoding (for a nice underwater ambient sound), which mpv describes as:
adpcm_ima_wav
4100Hz stereo 2ch s16.

Same goes for all other al_*.wav files found there.

Other files on the other hand are mp3 encoded with some garbage in the beginning.

For instance 34.wav has 58 garbage bytes before the valid mp3 header. Though 01b.wav looks different, but if you remove same 58 bytes, mpv still recognizes it as an mp3.

Files like mus_*.wav also need removing 58 bytes of garbage from the beginning to get valid mp3.

For example mus_theme_rep.wav is a nice theme which plays during character creation.

No idea who came up with such weird way of obfuscating those files, but instead they could just release the proper soundtrack. I might write some script a bit later to produce proper files from the originals.

_______________________
UPDATE:

* Script for extracting music from KoTOR I: https://gist.github.com/shmerl/2cec6273ba25dd1486dd
* Script for extracting music from KoTOR II: https://gist.github.com/shmerl/30412cda5a5107132a1f
Post edited May 09, 2016 by 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]
Post edited May 03, 2018 by shmerl
Thanks a lot! :-) I really love (t)his music...
avatar
mashppps: Thanks a lot! :-) I really love (t)his music...
Glad it helped you :)
Script for extracting music from KoTOR II: https://gist.github.com/shmerl/30412cda5a5107132a1ff
Post edited March 21, 2016 by shmerl
Nice work, Gilrond-i-shmerl! ^^
avatar
shmerl: Script for extracting music from KoTOR II: https://gist.github.com/shmerl/30412cda5a5107132a1ff
You should add this link to your opening post ;)
Great work by the way, as usual!
Interesting. How did you figure/find this out?
avatar
rotorde: Interesting. How did you figure/find this out?
By looking inside the files and analyzing them ;) You can easily see patterns which will show you that they aren't real WAV files. Also, WAV files for audio of corresponding length would be significantly larger. You can notice various mp3 header elements in them. The rest was just figuring out how to reconstruct the proper mp3 file from that obfuscated mess.
Post edited April 04, 2016 by shmerl
Thank you very much for those scripts! I've been looking for KotOR II soundtrack of sufficient quality for days. It's nice to know I can get it directly from the game files. What remains is fixing the tags and then memories from this great game are back.
avatar
Chloris6: Thank you very much for those scripts! I've been looking for KotOR II soundtrack of sufficient quality for days. It's nice to know I can get it directly from the game files. What remains is fixing the tags and then memories from this great game are back.
You're welcome! As far as I know, the soundtrack never came out in any other form, so game audio is the best source we have.

One of my favorite tracks: mus_bat_230.mp3 (Telos Battle).
Post edited December 31, 2017 by shmerl
avatar
shmerl: You're welcome! As far as I know, the soundtrack never came out in any other form, so game audio is the best source we have.

One of my favorite tracks: mus_bat_230.mp3 (Telos Battle).
This game did not have much luck with publishing indeed. At least we've got the Restored Content Mod thanks to the TSLRCM group and mostly 128 kpbs mp3s of soundtrack thanks to you. ^^

One of your favourite tracks, I understand. They're so good it's really hard to have a favourite. Especially when you remember you jedi guardian jumping from enemy to enemy dealing justice swiftly when diplomacy fails. :)
https://www.discogs.com/Jeremy-Soule-Star-Wars-Knights-Of-The-Old-Republic-Video-Game-Soundtrack/release/3926862

The soundtrack has apparently been released on CD? I don't know what the "Promo" and "Unofficial Release" do together...
avatar
African_wildlife: https://www.discogs.com/Jeremy-Soule-Star-Wars-Knights-Of-The-Old-Republic-Video-Game-Soundtrack/release/3926862

The soundtrack has apparently been released on CD? I don't know what the "Promo" and "Unofficial Release" do together...
Interesting. Is it possible to buy it in FLAC anywhere?

UPDATE: I see it's labeled "Unofficial Release". I wonder what it means.
Post edited April 04, 2019 by shmerl
Since I missed mentioning it before, the soundtrack for KoTOR II was composed by Mark Griskey.