legitimatebusiness

How to swap out music

Recommended Posts

So I am trying to swap out music in K1 and eventually in K2. After researching online I read that you need to remove the track in question out of the Streammusic folder and replace it with an .mp3 of your choosing of the same name. I tried it and it did not work. I also followed this guide that had me download Audacity, convert the mp3 to mono, and reduce it to 22k Hz which made the track sound like garbage and still didn't work in game. I believe I am selecting the right track name because when I load into the area to test it there is no music at all, not even the default music. Is there an additional step I am missing? Do I need to make sure the mp3 file has certain properties? Any help would be appreciated!

Share this post


Link to post
Share on other sites

Not an expert, but as you can see all the files have the extension .wav. I think all the music files are mp3s but with the .wav file extension (Yes, quite odd, I think sound effect files are real wave/.wav files).
So yeah, experiment with that, simply rename the mp3 to wav. I'm not sure about the forms of mp3s working or not working. You might get some clues with certain audio programs if you open vanilla files, but I would first try your full quality versions.

Share this post


Link to post
Share on other sites

Here's a relevant answer from another similar thread --

Just let us know at what part you need help to understand, and --

On 9/26/2021 at 1:42 PM, legitimatebusiness said:

...convert the mp3 to mono, and reduce it to 22k Hz which made the track sound like garbage...

Nope, you don't want that setup for background-music/BGM [unless you want to go back to 40/50's, hahah].

Mono channel at 22050Hz is only for sound-effects/SFX. With BGM you'll always want it as Stereo channel at 44100Hz.

 

P.S. Be advised that all of this was written with GOG version in mind. I'm not sure about the others though.

  • Thanks 1

Share this post


Link to post
Share on other sites

I just wanted to say thanks for pointing me to that thread. Sith Codec really made it simple. After I got the music I wanted in .mp3 format I threw it into the Sith Codec to encode it and now it works. I've changed the background and battle music for the Peragus to give it a spookier atmosphere using music from the Mass Effect 2 soundtrack and it really enhances the vibe. I appreciate you taking the time to respond!

  • Like 1

Share this post


Link to post
Share on other sites
10 hours ago, legitimatebusiness said:

I've changed the background and battle music for the Peragus to give it a spookier atmosphere using music from the Mass Effect 2 soundtrack and it really enhances the vibe.

Post a preview video or a link to the said tune -- I'd like to see/hear one! :cheers:

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, legitimatebusiness said:

Let me know what you think!

It has that "Alien" vibes, sounds cool. Though I can't say about its implementation with Peragus 'cause honestly I haven't gotten myself out from there, lol. So I'm still going to give the vanilla a chance, and see about using your idea another time.

I was only curious about your choosing for the music -- that's all, and honestly say that is quite an interesting one!

Share this post


Link to post
Share on other sites
15 hours ago, Todd Hellid said:

If I try to change the music to Stereo 44100Hz with Sith Codec, will it work?

I did a test not long after my post above, input and output had those specs, that worked fine.

Share this post


Link to post
Share on other sites

Uh, I thought it was linked somewhere above, anyway:

Extract the files somewhere.
It can be a bit technical if you're not as old as me (I grew up with DOS and command line prompts).
However, JC included some shortcuts for that, place your mp3 in the "in" folder, double click "encode_music.bat", that should process/convert what's in that folder.
The output/converted file will appear in the "music" folder.
Next you can rename that converted file to a filename that the game uses, make a backup of the original file in the "streammusic" folder (for if you ever want to undo things, for example add "bak" to the filename).
Now move the converted file to the "streammusic" folder, test things in game.
In my experiment I replaced mus_area_cant1.wav and mus_area_cant2.wav of KotOR 1; the 2 variations of cantina tunes.

How to know what the original files sound like, in order to pick something you want to replace?
It looks like you can probably also use SithCodec to decode things the other way around and play the music in more modern audio players, I haven't looked into that myself.
What I do is copy a file (or all if you're up for that) from the "streammusic" folder, rename the/all file extensions from wav to mp3. Most modern music players don't like the format you have now, but you can use an old one. For example WinAmp (free), who apparently doesn't care about the extra KotOR info in the files. I have v5.66, I'm sure other versions will also do the job. https://winamp-full.en.uptodown.com/windows/versions

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.