Mod The Sims
Page 1 of 2

Mod The Sims (https://modthesims.info/index.php)
-   Modding Discussion (https://modthesims.info/forumdisplay.php?f=547)
-   -   How to decode sims 3 audio (https://modthesims.info/showthread.php?t=418050)

jonwil 27th Aug 2010 4:49 PM

How to decode sims 3 audio
 
Sims 3 audio comes in .snr and .sns files.
Go to http://www.cncmods.net/files/sims.zip and download this then you will have some things that can decode these files (depending on which codec the files use).
Also you will need a hex editor to verify which compression type the files use (in case any of them use compression types other than the 2 specific types I have managed to identify)
If you dont have a hex editor, you can download this one
http://www.handshake.de/user/chmaas...nload/xvi32.zip

Steps:
1.Use the resource tools to extract the audio you want.
2.Open the .snr file in a hex editor and look at the first byte. If the first byte is 04, that means its using the EA XAS ADPCM codec. If the first byte is 05, that means its using EALayer3 codec. If its using anything else, that means its an unknown codec.

Put the .snr and .sns files for the sound you want in a folder along with the contents of sims.zip. If the first byte is 04 (XAS ADPCM) you decode it via ffmpeg.exe. Open a command window, navigate to the folder containing the the files and type ffmpeg -f ea_cdata -i <snr file> <wav file>
This will convert the .snr file to a .wav file.
If you have a file of type 05 (EALayer3) you decode it via ealayer3.exe. Open a command window, navigate to the folder containing the the files and type ealayer3 -mc <snr file> and it will decode the .snr file to a .wav file. If there is a .sns file, you pass that instead of the .snr file.

If anyone finds a file with an codec other than 04 and 05 or if they see a file with a codec type of 04 and a matching .sns file (i.e. the .snr file is only 8 bytes), I want to know.

Please post here if you find such files (or any file that fails to convert). Or if there is anything about my instructions that are confusing or hard to follow.

The source code for ffmpeg.exe can be found at www.ffmpeg.org
The source code for ealayer3.exe can be found at http://bitbucket.org/Zenchreal/ealayer3
Both tools seem to be under a fairly liberal license so it should not be hard if someone wanted to re-use the code to add support for the audio to the resource extractor directly.

Nysha 27th Aug 2010 5:57 PM

Just some extra notes that people may find useful.

In S3PE, both sns and snr resources are listed as _AUD. All(?) audio resources can be found in FullBuild1, and I assume DeltaBuild1 (though I've only checked FB, not DB). sns resources are type _AUD 0x01EEF63A, snr are _AUD 0x01A527DB. The audtun (AUDT) resources don't seem to be needed for this process.

EALayer3 seems to be almost exclusively used for music, although there are a few SFX using it. There are also a load of resources prefixed with "sting"... they seem to relate to cutscene events, like births and birthdays, but there are also a few which aren't cutscenes, such as fulfilling a wish or completing an opportunity. There are also vehicle and rabbithole sounds using this format. Everything else is XAS ADPCM as far as I can see.

lavsm 27th Sep 2010 4:01 PM

This worked great! I was able to extract my favorite songs from the game and then convert the .wav to mp3. The only problem I had was that the zip file in the OP was corrupt, so I gathered some working files myself. Here is a link to them:
http://www.mediafire.com/?4ltn5sgy7mh6g6q

Thanks for the helpful info.

lavsm 2nd Oct 2010 11:47 AM

I was able to use EAlayer3.exe to convert all the game music to mp3 with no problems--except for a few stubborn files, which I have uploaded here:
http://www.mediafire.com/?hd66cl2d65i5r2o

These four .sns files convert to a much smaller size mp3 (2-3 KB each) and won't play in Winamp. I tried extracting as a wav and mp3 with the same results.

I would be grateful if anyone could help me with these so I can complete my collection.

zano972 3rd Oct 2010 2:05 AM

Hi all,

A big THANK YOU for Jonwil, whiterider and lavsm !!! I was trying to find how to do that without any solution and you give me the light i needed looool...

Encore BRAVO et MERCI !!!!

PS: about decoding *.snr or *.sns - file type 05 / EALayer 3 codec - only the biggest file is needed (0x01EEF63A).

lavsm 3rd Oct 2010 3:23 AM

Another tip that might be helpful...you can just drag the .sns files onto the EAlayer3.exe to convert directly to mp3, instead of opening a command window (figured this out after converting most of the files manually--derp!).

desecrate 7th Oct 2010 11:06 PM

Very interesting, is it also possible to encode mp3 or wav files into sns/snr to replace or add new sfx in the game?

Nysha 17th Oct 2010 6:21 PM

Sadly no - we can decode, but not encode.

TS3 can also play MP3s, as demonstrated by the custom music feature, but any attempts to make it do so outside of the custom music channel would be way over my head. It does seem to play the mp3s directly, rather than converting them to EALayer/XAS.

lenglel 15th Nov 2010 6:32 AM

[QUOTE=whiterider]Sadly no - we can decode, but not encode.
Then why do they call it a codec?

http://www.youtube.com/watch?v=_gWWgNgmFvQ

Hopefully someone can make sense of the above video.
My old eyes couldn't keep up. I think he used a newer
version of ealayer3.exe (0.6.2) than is linked here (0.5.0)

http://bitbucket.org/Zenchreal/ealayer3/downloads

Looks like source only, and I don't have the tools to
build it installed. Nighty-night, all.

Jamieb0486 16th Nov 2010 1:49 PM

Converting mp3's to sns using the above works for TS3 but it's bitrate needs to be 182kbps or less. If it isn't the game will crash when trying to play it.

lenglel 20th Nov 2010 7:27 PM

I think you mean 128kbps. That corresponds to 44100hz in audacity.

Since I last posted here, I've created an audio mod package with
replacements for the sims 3 background music sns resources.

Here's how:

programs you will need:

audacity 1.3
http://audacity.sourceforge.net/download/

audacity plugins
lame-mp3 codec
http://audacity.sourceforge.net/hel...tall&i=lame-mp3

ffmpeg codec
http://manual.audacityteam.org/inde...s#installffmpeg

s3pe
http://dino.drealm.info/den/denforu...php?topic=189.0

ealayer3-0.6.2-win32
http://bitbucket.org/Zenchreal/ealayer3/downloads

note: there is no pre-compiled mac version, but source code links are
posted on the same page below the windows binaries.

a batch file to convert .mp3 files to .sns
paste this text into the batch file:

"C:\Documents and Settings\no\My Documents\s3mod projects\audio\ealayer3-0.6.2-win32\ealayer3.exe" -E %1 -n -o %1.sns -v >"C:\Documents and Settings\no\My Documents\s3mod projects\audio\dia.txt"
pause

edit the paths in quotes to match the paths on your system.

notes:
the %1 is where the batch file substitutes the actual file
name of files dropped on it in windows explorer. The pause
command is so you can see the output before pressing a key
to return to windows from the batch file's command prompt.
the sample command line outputs to file dia.txt which may
be read with any text editor. "skipped empty frame" is the
usual content of dia.txt after a successful conversion on my
setup.

Step 1:
Load fullbuild1 in s3pe. Make sure the sort checkbox is checked.
(It's near the lower left corner of the s3pe program window)

Click on the [NAME] field to sort by name, then look up the
sims3_* _aud and audt resources.

For each song there is one audt and two _aud resources. Look at the
memsize field and export the _aud resource with the larger memsize.
Or check the type field. sns resources are type _AUD 0x01EEF63A,
snr are _AUD 0x01A527DB. You want the .sns resource.


step 2:
drop the exported file on ealayer3.exe to create the .mp3
file. Import this into audacity, then import the .mp3 you
want to replace it with.

Click the X in the upper left of the original soundtrack window to
close the first .mp3, this leaves its filename in audacity's title bar.

Now export the second mp3, overwriting the first. The default
value of 44100 for the bitrate will do nicely. Unless you
want it to sound like the chipmunks. In that case you
would change it to 32000.

step 3:
rename the file you just exported to match the name of the
original that was output from ealayer3.exe in the first part
of step 2. If you dropped the export on the batch file I've
suggested this is just a matter of deleting ".mp3" from the
filename.

step 4:
open a second instance of s3pe and import the .sns file into
a new package file, clicking the use resource name checkbox
to put a checkmark in it.
Make sure the imported .sns has the same name, type, group
and instance as the music you are substituting for in the
fullbuild1.package.
note:
If any of the fields are different right-click on the sns resource
in the first instance of s3pe and select details. Copy the fields
to the details window of the sns in the second instance of s3pe
until they all match.

step 5:
Save your new package to the proper mods\packages folder on your
machine naming it, for example, MyMusicMod.package. Your new
music should play in place of the old the next time you start the
sims 3.

Robodl95 28th Nov 2010 7:49 PM

Wow that's awesome! But you've gotten me so confused that it's not even funny... So I made my batch file and I dropped my replaced .MP3 on it and it says "Could not open input file '1'." what did I do wrong? Or maybe I should rephrase as "How do you take your edited .MP3 and put it back into the AUD file?" Your explanation wasn't very clear on that part

Along those same lines I got confused at step 2 and into step 3 isn't "Now export the second mp3, overwriting the first" and "rename the file you just exported to match the name of the original that was output from ealayer3.exe in the first part of step 2" telling you to do the same thing because the first MP3 you imported WAS the original you got from ealayer3.exe?

I tried... I failed

Edit: Wow I'm an idiot! I thought the quotes weren't necessary Problem solved So now I got the new music in game but it sounds like fish gurgles, I think I know how to fix that though (hopefully..)

Edit (Again): So I still have the garbling problem. I thought I knew what it was but I was wrong... The music is in game and I've obviously replaced it except it sounds like you're trying to talk underwater. So my dia.txt says "ID3 Tag size: 16", would that have anything to do with it? Any idea where I went wrong?

shorty1k 30th Nov 2010 7:17 AM

Could this same theory be used to make new piano and guitar music?

Shimrod101 30th Nov 2010 8:49 PM

Quote: Originally posted by shorty1k
Could this same theory be used to make new piano and guitar music?


Yes, it should work fine. The guitar and piano tunes are AUDT and a couple _AUD resources for each song, just like the tunes lenglel describes replacing.

lenglel 30th Nov 2010 11:45 PM

Quote: Originally posted by Robodl95
Edit (Again): So I still have the garbling problem. I thought I knew what it was but I was wrong... The music is in game and I've obviously replaced it except it sounds like you're trying to talk underwater. So my dia.txt says "ID3 Tag size: 16", would that have anything to do with it? Any idea where I went wrong?


I had the same problem with certain tunes. Has to do with the
bitrate. The bitrate in the new resource needs to be a maximum
of 128k. That's where the audacity program comes in.
1. Export original .sns with s3pe
2. Convert original to .mp3 with ealayer3
3. Import original into audacity
4. Import replacement into the same instance of audacity
5. Click the close box of the original .mp3 in audacity
6. Click export. The replacement will overwrite the original
.mp3 (the one with the s3* name) the bitrate should be
audacity's default 44,100
7. use the batch file which calls ealayer3 to convert the
new .mp3 to an .sns file which will have the same name
as the file originally exported from s3pe EXCEPT there
will be ".mp3" ahead of the .sns extension. Delete the
original and rename the replacement by deleting the ".mp3"
from the filename
8. open s3pe and import new .sns from file with "use
resource name" checked so that the replacement has
the same name as the replaced resource
9. save it as a new .package file.
10. put the new .package in the usual mods directory

If that doesn't cure the weirdness, let me know the
bitrate and length of your track, and I'll see if I can
find something similar in my collection to test with.
The tagsize might or might not have something to
do with this. Other people made the parts. I was
just in the right place at the right time to scotch tape
them together.

edit: I just happened to think, did you blank the extra
data on export? The artist name, title and all that
stuff should be blank when you export the new file
with audacity. The basic idea with using audacity
instead of just dropping the new .mp3 on the batch
file and renaming is to get the new audio to match
the old audio's settings in the .snr and audt resources
which are largely of unknown format at present.

Robodl95 1st Dec 2010 12:59 AM

That's what I've been doing :/

I've tried with 3 songs (all end up in gurgles)
Harry Potter (44,100 5:09) http://www.youtube.com/watch?v=1Li0SWlwe34
Sims 1 Theme (22,050 2:07) http://www.youtube.com/watch?v=QU2rUU0z72Y
And a song named Hell (44,100 3:09) that I don't have a link to and didn't use for any other reason then I wanted to check that the youtube to MP3 converter wasn't screwing up the files.

Those are the exact videos I got the audio off of so if you use them then you should have the same MP3.

When you say leave the stuff blank does that also mean genre? I couldn't find any way to leave that blank (All the other stuff has been blank though)

lenglel 4th Dec 2010 1:23 AM

I think the problem might be that your mp3 files are encoded with a variable bitrate
when the game needs a fixed bitrate. How do you get mp3 files from youtube?

Robodl95 4th Dec 2010 2:04 AM

I use this site: http://www.listentoyoutube.com/

lenglel 5th Dec 2010 5:46 AM

Thanks for the link. Did you try both standard and high quality versions
to see if it made any difference?

lenglel 5th Dec 2010 5:56 AM

You agree to receive promotional emails and special offers from trusted 3rd parties including DealSave.net.

Well, Robodl95 now you know why I can't test out the mp3 files you describe on my pc. When I had the
same problem I used winamp 5.04 to check the bitrate. The bitrate needs to be a constant 128 kbps,
even if you get a variable bitrate when playing an mp3 that was extracted from from an .sns

Any luck?

shorty1k 5th Dec 2010 3:43 PM

Piano and guitar music is indeed in _aud format, but it doesn't export to sns, but rather snr format, which doesn't seem to convert or work.

Edit: On the bright side, your directions worked beautifully for regular music replacements. I now have sims 1 neighborhood music in my map view, which is awesome. The only oddity is a brief millisecond of static when switching to it. Very weird but almost completely unnoticeable. It also seems to have issues progressing to the next song. Just something I thought I'd point out. Thank you so much for cracking the music situation with the Sims 3, this is an answer to many upset fans! Custom music folder be damned!

lenglel 6th Dec 2010 12:57 AM

Gee, I'm glad the guy that wrote the actual codec didn't read this.
About the .snr files, it's the same procedure, but using the ffmpeg
codec instead of ealayer3. I think. Haven't tried it myself yet.
I'm more interested in custom animations, but EA seems to move
the goalposts with every patch.

maruneko 10th Dec 2010 10:11 AM

So I'm assuming that this also involves animation sounds?

lenglel 11th Dec 2010 1:58 AM

I believe your assumption is correct, but haven't done any testing as I'm happy with the
animation sounds as they are. What were you thinking of changing?

Finxxy 22nd Jan 2011 6:55 PM

OK I hate to revive an old thread but I'm having an issue and I was wondering if anyone was having this as well. The ealayer3 I've had no problem working with. However the ffmpeg never converts for me. The error I always get is "unable to find a suitable output format for <filename>" has anyone else run into this? The files I'm working with are the .snr files and they start with 04 in the hex editor. Any suggestions?

EDIT: I'm working with windows 7 and I'm not sure what version of windows that command line was written for but I always get the
"this was unexpected blah blah blah" error when I manually direct there and put in the command prompt

lenglel 23rd Jan 2011 5:45 AM

I only tested with XP, and only with mp3 files. As for reviving an old thread,
it makes more sense to me to have all the q&a on one thread, rather than
scattered across the board. I subscribe to this thread, but only skim the
new messages.

Think I'll have a look. What resource did you start with from which file?

Infernus Animositas 2nd Feb 2011 4:06 PM

I'm trying to convert all of the .snr files to .wav

Can someone write a batch script to use with FFmpeg at all?

lenglel 2nd Feb 2011 7:10 PM

I'm working on a program to do that, since I've got a folder full of files courtesy of s3pe.
I think it'll take me about a week. I have to figure out how to chain the codecs from my
c++ ui program.

...two weeks later: I still haven't started on this, maybe tomorrow.

Infernus Animositas 23rd Mar 2011 5:02 AM

Any progress on the tool?

nodavidno 23rd Mar 2011 3:49 PM

I have created a tool to easily decode The Sims 3 Sound Files, its on my website www.thesimswebsite.co.uk

treeag 23rd Mar 2011 4:05 PM

Quote: Originally posted by nodavidno
I have created a tool to easily decode The Sims 3 Sound Files, its on my website www.thesimswebsite.co.uk


Thank you Is there a non-installer version?

nodavidno 23rd Mar 2011 4:09 PM

I can whip one up quickly, give me 10mins!

nodavidno 23rd Mar 2011 4:15 PM

Done, available on the same page. Just make sure the .exe is in the same place as the 'Resources' Folder.

treeag 23rd Mar 2011 4:55 PM

Thank you! Will play around with it in a little bit.

lenglel 26th May 2011 7:08 AM

Okay, I've decoded snr files with id 5 (mp3) using ealayer3, but have yet to
encode one for use as a sound effect in game.

I'm using ealayer3.exe" -E %1 -o %1.snr in the batch file in attempting to encode
a file decoded with ealayer3, and I get an empty output file. Is anyone else working
on this?

cmomoney 30th May 2011 5:37 PM

Quote: Originally posted by lenglel
I'm using ealayer3.exe" -E %1 -o %1.snr in the batch file in attempting to encode
a file decoded with ealayer3, and I get an empty output file.


When you say empty, do you mean 0 bytes?

lenglel 30th May 2011 8:13 PM

Yup, zero bytes. I replaced the games theme music (too pushy) and now I want to
add sound effects to use as events in custom animations.

MaNia-C 30th May 2011 8:44 PM

How did you replace the theme? I can decode the music out but cannot convert from mp3 to snr-sns. How can we actually replace the game music?

lenglel 31st May 2011 11:17 AM

see message #11 of this thread. strictly for sns resources, though.
I'm trying to figure out how to do the same with snr. I got the source
for ealayer3, but can't get it to compile

MaNia-C 31st May 2011 12:03 PM

I checked your post. Thanks for your help but now I seem to have a problem with the game crashing when the replaced audio is about to play. I made a new package with the same numbers but do I have to create the other small _AUD and AUDT files in that package too? Is that what I'm missing? It's confusing

lenglel 31st May 2011 1:52 PM

no, you only need one aud file in your default replacement package.
did you make sure your bitrate is correct? It should be fixed rate
128bps or lower, but not variable rate under any circumstances.

MaNia-C 31st May 2011 2:27 PM

The bitrate is 128kbps, Type,Group,Instance.. etc are all the same. But it does crash every time.

MaNia-C 31st May 2011 9:55 PM

I can't seem to replace it and I really want to play The Sims 1 soundtracks the Sims 3. Can anyone make a package for me with The Sims Buy/build/neighborhood music? Coz I'm really out of ideas now.

lenglel 1st Jun 2011 7:56 AM

You loaded both tracks in audacity and saved the new one over the original?

MaNia-C 1st Jun 2011 6:03 PM

Yes I did. The name and everything are the same like it should be. I can convert the replaced music to mp3 and listen to it too. So it looks correct.

Amik 4th Jun 2011 2:37 AM

So I have worked out a way to add music to an existing station, instead of just replacing the existing songs. The problem is, I'm fairly certain it requires generating BOTH the .sns and the .snr file, otherwise the game will crash shortly after starting to play the song. Obviously, the .sns is encoded from an mp3 using ealayer3.exe, but is it possible to also generate the accompanying .snr?

I can confirm that it is something directly related to the .snr file, because the game did not crash when I simply renamed a song that I extracted from FullBuild1.package and re-added it to the playlist. Specifically, it's the 3 bytes that are in bold, as those are the ONLY 3 bytes that vary between SNR files.

Code:
05 04 AC 44 40 64 DF A8


Can anybody shed some light into what these 3 bytes signify? Once I can get past this last barrier, I'll be more than happy to do a full write-up of how to add new music to existing stations (and probably even write a program to do so).

Thanks.

MaNia-C 7th Jun 2011 2:12 PM

Can somebody send me a sample package file changing a game song? Maybe I should check it out to see my mistake if that works.

lenglel 7th Jun 2011 11:49 PM

I don't think so. They're big and bulky, and tend to contain copyrighted material. sorry

ChaosMageX 17th Jul 2011 7:40 PM

TESTERS WANTED: s3pi AUDT 0x8070223D wrapper
 
1 Attachment(s)
Hello. For those of you researching in-game sounds and music, you'll be happy to know that I built a s3pi extension to process the Audio Tuner resources, AUDT 0x8070223D, by following the schema given on the wiki: http://simswiki.info/wiki.php?title=Sims_3:0x8070223D

Attached to this post is a zip file containing the DLL plugin. All you have to do is put the DLL next to the S3PE executable in order to use it in S3PE to examine and modify the Audio Tuners. Please test it for me and let me know what you think of it.

I've also included the source code for the wrapper in case anyone wants to try to improve it, or in case any errors show up.

For those who don't know, the Audio Tuner resources are the ones that are usually called from the game scripts to play sounds, by functions including Sims3.SimIFace.Audio.StartSound("sting_sound_name_unhashed").

Also, all the modders here need to get their hands on the Gothique Library's Book of Spells from The Sims 3 Store. It actually contains its own AUD 0x01A527DB and AUDT 0x8070223D resources, along with its own S3SA, JAZZ, CLIP, and even SWB resources, so it could possibly be used as a way of testing them. I also think it's the first time the EAxoids have put such a complex object in the store.

Shimrod101 20th Jul 2011 12:22 AM

The AUDT Wrapper works fine. I've successfully removed all the UI mouse-click sounds with it, so my UI is silent. There are several AUDTs that I've found that cannot be read, these are ambience sounds of some kind. There are 9 of these titled amb_birds_allday, etc., and the ambiencemanager, base_ambience; one titled modifiers and some others titled layer_blahblah.

I'm wondering if you know what all the info means when looking at these. The Entry Type choices: AUD, or UNK2 or 3, or Bool, what are these doing or referring to? And the RepCode and RepSize? Is there info posted somewhere which defines and explains all these, or possibly info from the Sims2 which would apply to some extent?

Infernus Animositas 27th Jul 2011 5:51 AM

I downloaded the latest static build of FFMPEG and some of the SNR files don't decode completely. They'll decode most of the file and then I'll get a block of static in the wave form. These are for files that have loop in the filename.

Additionally, I made a batch file for converting the SNR files using FFMPEG.

for %%i in (*.snr) DO ffmpeg.exe -f ea_cdata -i "%%i" "%%i".wav

AgentNightly 6th Aug 2011 11:25 PM

Hi I'm not very experienced with this kind of stuff but I followed the instructions in reply 11 to the letter and managed to get some imported music to play in the neighbourhood and buy mode in the game. It's all 128k, no extra info and the relevant fields are all identical. It was very easy and did not take long at all to replace all of the build, buy and CAS music. So many thanks to lenglel for being so clear with the instructions.

The problem is that with my mod the game always crashes, usually within minutes of hearing any of the imported music playing. This happens especially when swicthing between tracks, but will also happen quite randomly while a track is playing. In either case the music begins to stutter and the game crashes. So does anybody have any ideas on what might be going wrong?

Fenwick 21st Aug 2011 3:30 PM

Quote: Originally posted by AgentNightly
The problem is that with my mod the game always crashes, usually within minutes of hearing any of the imported music playing. This happens especially when swicthing between tracks, but will also happen quite randomly while a track is playing. In either case the music begins to stutter and the game crashes. So does anybody have any ideas on what might be going wrong?


I'm having roughly the same problem. I've replaced the default Ghost Hunter music while on the job with another song. The song plays fine while the job is happening, but upon completion when the game tries to fade the music out, it crashes. Been trying to figure it out for the last 4 hours or so to no avail.

Infernus Animositas 30th Aug 2011 3:43 PM

Here are the two loop tracks FFMPEG can't decode completely. Anyone got any ideas?

http://www.mediafire.com/?i2cz1ey1fuzay1b

lenglel 4th Sep 2011 4:34 AM

AgentNightly, how big is your pagefile? I was having problems like that before I ever played with sounds,
and fixed it by boosting my pagefile size. Are you using xp or 7? I'm using xp over here.

Raevynn 17th Oct 2011 6:47 AM

I know it's been a while since anyone has posted, but if someone happens to stumble across this, please help! ^_^

I was looking for one of the Music Box audios and I managed to find it in FullBuild04 of my Ambitions folder. I used the Hex editor provided and discovered in order to convert it, I'd need to use ffmpeg.

I have no problem converting the file in question, but the audio quality is horrid. It sounds like high-pitched static over the tune that plays. I've spent a few hours trying to find anything that could result in this problem, but no luck.

The .snr filed is listed as "musicbox_mummy_lp01" in S3PE when I open FullBuild04.

I'm not sure what I'm doing wrong, but if anyone could help me I'd greatly appreciate it!

Infernus Animositas 20th Oct 2011 9:24 AM

The new stinger tracks in the Pets expansion cannot be decoded by FFMPEG. It gives me an error saying:

ea_cdata unknown header 0x504: Operation not permitted.

lenglel 20th Oct 2011 6:44 PM

since ffmpeg didn't do the trick, did you try the ea-layer3 tool?

Infernus Animositas 23rd Oct 2011 9:03 AM

Well how about that. It decoded the stinger tracks.

Thank you for that

Chubbs 3rd Mar 2012 11:45 PM

I know there hasn't been activity here in awhile but I'm having some issues when trying to get this to work. When I add music to the game it replaces the default tracks but no audio plays, its just quiet. I have the latest patch, I've followed all the steps and I'm out of ideas.

I think the specific problem might have to do with step 7 on post #15. When I drag the audio file onto ealayer3 it doesn't appear to convert into an .sns file. Does anyone know why this might happen?

EDIT: So i figured out what i was doing wrong but I'm having the same problem as Robodl95 was having back on post #12, involving the music sounding like gargling noises in game. Did anyone ever find a solution for this? The bitrate is listed as 128 kbps, I'm not sure if its a constant bitrate or not though. I'm kind of a computer noob so bare with me. :p

EDIT 2: In Audacity I changed the project rate to 32000 and this got rid of the gurgling!...but now the music is drastically sped up in-game. Admittedly, it sounds pretty awesome but its not exactly the original Sims 1 music I want playing in the game. Any suggestions?

blakegriplingph 4th Mar 2012 3:27 AM

Quote: Originally posted by Fenwick
I'm having roughly the same problem. I've replaced the default Ghost Hunter music while on the job with another song. The song plays fine while the job is happening, but upon completion when the game tries to fade the music out, it crashes. Been trying to figure it out for the last 4 hours or so to no avail.


I'm also encountering the same problem when I replaced the default Buy Mode music with the one from TS1.

EDIT: Tried editing the .snr file but the game still crashes. I'm using v0.7.0 of the ealayer3 tool.

EDIT2: v0.7.0 seems to be causing problems with encoding SNS files. Downgrading to v0.6.2 seems to solve the crash issue. What I did was follow Flyby's batch file instructions like this:
SNR:
Code:
ealayer3.exe -E %1 -n -o %1.snr --single-block -v >snrlog.txt

SNS:
Code:
ealayer3.exe -E %1 -n -o %1.sns -v >log.txt


Drag the MP3 file you're intending to convert onto the batch files. Make sure that they're in the same format as Flyby posted in the thread I linked. After converting fire up your fave hex editor and open the .snr file. Delete everything but the first eight bytes, which should be similar to the one below:
Quote:
05 04 AC 44 00 76 63 80


Change the value after 44 (the 00 byte, that is) to 40, and then save your SNR file. Rename the files to the names of the original ones, and then shove them to a package file as per lenglel's instructions in the previous replies.

And another thing: 'tis may not work if the file's longer than the original; might need some more research into that one.

Sugar Rave 27th May 2012 11:05 AM

I tried the drag & drop method mentioned in an earlier post although some of them don't seem to want to work with ffmpeg or the EA one, they just don't generate an MP3 at all

Actually I'm just hoping to find the prom rabbit hole music from Generations but so far no luck, for all I know it could be in a file that doesn't give me an mp3 when I drag it over the application

chopp3r47 8th Jun 2012 4:19 AM

Can You please make a video for message #11 because I cannot understand a lot of it. please, it would help a lot

walale12 12th Jun 2012 9:55 PM

Quote: Originally posted by nodavidno
I have created a tool to easily decode The Sims 3 Sound Files, its on my website www.thesimswebsite.co.uk


You are a God among Humans, I commend you.

Zerbu 22nd Sep 2012 10:36 PM

Quote: Originally posted by lenglel
I think you mean 128kbps. That corresponds to 44100hz in audacity.

Since I last posted here, I've created an audio mod package with
replacements for the sims 3 background music sns resources.

Here's how:

programs you will need:

audacity 1.3
http://audacity.sourceforge.net/download/

audacity plugins
lame-mp3 codec
http://audacity.sourceforge.net/hel...tall&i=lame-mp3

ffmpeg codec
http://manual.audacityteam.org/inde...s#installffmpeg

s3pe
http://dino.drealm.info/den/denforu...php?topic=189.0

ealayer3-0.6.2-win32
http://bitbucket.org/Zenchreal/ealayer3/downloads

note: there is no pre-compiled mac version, but source code links are
posted on the same page below the windows binaries.

a batch file to convert .mp3 files to .sns
paste this text into the batch file:

"C:\Documents and Settings\no\My Documents\s3mod projects\audio\ealayer3-0.6.2-win32\ealayer3.exe" -E %1 -n -o %1.sns -v >"C:\Documents and Settings\no\My Documents\s3mod projects\audio\dia.txt"
pause

edit the paths in quotes to match the paths on your system.

notes:
the %1 is where the batch file substitutes the actual file
name of files dropped on it in windows explorer. The pause
command is so you can see the output before pressing a key
to return to windows from the batch file's command prompt.
the sample command line outputs to file dia.txt which may
be read with any text editor. "skipped empty frame" is the
usual content of dia.txt after a successful conversion on my
setup.

Step 1:
Load fullbuild1 in s3pe. Make sure the sort checkbox is checked.
(It's near the lower left corner of the s3pe program window)

Click on the [NAME] field to sort by name, then look up the
sims3_* _aud and audt resources.

For each song there is one audt and two _aud resources. Look at the
memsize field and export the _aud resource with the larger memsize.
Or check the type field. sns resources are type _AUD 0x01EEF63A,
snr are _AUD 0x01A527DB. You want the .sns resource.


step 2:
drop the exported file on ealayer3.exe to create the .mp3
file. Import this into audacity, then import the .mp3 you
want to replace it with.

Click the X in the upper left of the original soundtrack window to
close the first .mp3, this leaves its filename in audacity's title bar.

Now export the second mp3, overwriting the first. The default
value of 44100 for the bitrate will do nicely. Unless you
want it to sound like the chipmunks. In that case you
would change it to 32000.

step 3:
rename the file you just exported to match the name of the
original that was output from ealayer3.exe in the first part
of step 2. If you dropped the export on the batch file I've
suggested this is just a matter of deleting ".mp3" from the
filename.

step 4:
open a second instance of s3pe and import the .sns file into
a new package file, clicking the use resource name checkbox
to put a checkmark in it.
Make sure the imported .sns has the same name, type, group
and instance as the music you are substituting for in the
fullbuild1.package.
note:
If any of the fields are different right-click on the sns resource
in the first instance of s3pe and select details. Copy the fields
to the details window of the sns in the second instance of s3pe
until they all match.

step 5:
Save your new package to the proper mods\packages folder on your
machine naming it, for example, MyMusicMod.package. Your new
music should play in place of the old the next time you start the
sims 3.


I'm having a problem. The replacement seems to start and play fine, but when the music is supposed to stop, it crashes with the "Sims 3 has stopped working" error. Does anyone know what the problem could be?

brittplusfrankee 23rd Sep 2012 1:39 AM

Hi, firstly I apologise for bumping an old thread, but I've found some relevant information on how to stop the 'underwater' bitrate problem.

When saving in Audacity, what you should do is click 'Export', select MP3 file type, click the 'Options' button underneath 'Cancel', and select the following settings:
  • Bit Rate Mode: Variable
  • Quality: 3, 155-195kbps
  • Variable Speed: Standard
  • Channel Mode: Joint Stereo

Then save, convert and all the rest, and you're done.

I could never have found this out on my own (I didn't even know the 'Options' button existed until a few minutes ago) - a search lead me to this topic http://www.modthesims.info/showthread.php?t=447344 by Flyby and thankfully the instructions worked for a simple (yeah right) music swap.

Sorry if this has been discussed previously in a similar topic but I couldn't find the solution elsewhere.

Oldcustard 9th Dec 2012 5:33 AM

Okay so I know this is an old thread but I was wondering where the _AUD resources for the radio stations are. In FullBuild1 there are stereo_* AUDT resources but no _AUD ones...does anyone know where you can find them?

dthjybrf 17th Dec 2012 9:54 AM

Please, help me! I can`t open command window of ealayer3. It opens for a second and then closes automatically.

lenglel 4th Feb 2013 12:44 PM

That's why you need to use a batch file, so you can add a pause command to the batch file so you can see the output from the command.

Citysim 21st Feb 2013 2:01 AM

Anyone replaced all music yet? I replaced one of them, the Sims3_Map03, it played for a while, then just crashed to desktop.

deathdrager 20th Apr 2013 2:08 AM

You can do it on windows 7
 
Hello people, i just want to say that you know the university expansions pack for sims 3 has been released and it has some music so youll simply youll use the same type code, you just need the sns file, don't fk your mind and try to use the command thingy. just drag the sns file on the ealayer3.exe/ffmpeg.exe and release the mouse, bam you have without any mind fked thingies, thank me later.

Dujon15 14th Oct 2013 5:35 AM

found a file its the sims 3 pets loading theme music and it first byte in hex is 80 00

xahm3d 21st Oct 2013 9:28 PM

Quote: Originally posted by jonwil
Sims 3 audio comes in .snr and .sns files.
Go to http://www.cncmods.net/files/sims.zip and download this then you will have some things that can decode these files (depending on which codec the files use).
Also you will need a hex editor to verify which compression type the files use (in case any of them use compression types other than the 2 specific types I have managed to identify)
If you dont have a hex editor, you can download this one
http://www.handshake.de/user/chmaas...nload/xvi32.zip

Steps:
1.Use the resource tools to extract the audio you want.
2.Open the .snr file in a hex editor and look at the first byte. If the first byte is 04, that means its using the EA XAS ADPCM codec. If the first byte is 05, that means its using EALayer3 codec. If its using anything else, that means its an unknown codec.

Put the .snr and .sns files for the sound you want in a folder along with the contents of sims.zip. If the first byte is 04 (XAS ADPCM) you decode it via ffmpeg.exe. Open a command window, navigate to the folder containing the the files and type ffmpeg -f ea_cdata -i <snr file> <wav file>
This will convert the .snr file to a .wav file.
If you have a file of type 05 (EALayer3) you decode it via ealayer3.exe. Open a command window, navigate to the folder containing the the files and type ealayer3 -mc <snr file> and it will decode the .snr file to a .wav file. If there is a .sns file, you pass that instead of the .snr file.

If anyone finds a file with an codec other than 04 and 05 or if they see a file with a codec type of 04 and a matching .sns file (i.e. the .snr file is only 8 bytes), I want to know.

Please post here if you find such files (or any file that fails to convert). Or if there is anything about my instructions that are confusing or hard to follow.

The source code for ffmpeg.exe can be found at www.ffmpeg.org
The source code for ealayer3.exe can be found at http://bitbucket.org/Zenchreal/ealayer3
Both tools seem to be under a fairly liberal license so it should not be hard if someone wanted to re-use the code to add support for the audio to the resource extractor directly.


dude if you made a video on this it would mean a lot cuz right now its very confusing and frustrating

Srikandi 22nd Oct 2013 5:40 AM

Some things are just hard to do EA doesn't support mods for their game, so you can't assume any particular modding task is going to be easy!

If you don't know how to use a hex editor, for instance, this one is probably not for you.

LegolasFFM 29th Oct 2013 9:55 PM

Hi there,
was anyone able to convert the sims3_ep9_load_loop (university life) into mp3 ?
I always have probs to convert the load loops....no matter if I use ealayer3 or ffmpeg.

any hint for me?

cheers

mario

mcemily 5th Nov 2013 6:21 PM

Latin/Disco/Rap/Rock Songs?
 
I'm wondering if someone can point me in the right direction. I've been trying to extract all the music from the various radio stations, but have not run across any of the songs from the Latin, Disco, Rap or Rock stations. I've scoured all the FullBuild.package files found in each game's GameData\Shared\Packages folder (plus all the DeltaBuild files for the base game, just in case), but I can't find any of these songs listed (at least, not listed as they were for the other music genres, with the song title easily recognizable).

I'm not sure why I can't seem to find the Latin music, since I was able to find and convert all the other songs from the base game's FullBuild1.package just fine. More confusing to me still is the fact that from what I can see when I open the 70s, 80s and 90s Stuff FullBuild (FullBuild_p17.package) in S3PE, FullBuild_p17.package does not contain any AUD files whatsoever, and I know that is the expansion pack that gave us the Disco/Rap/Rock stations!

Anybody have any idea where I can find these elusive files? (I have all EPs and all SPs except the Katy Perry and Diesel Stuff ones, if that info is helpful.) Any help would be much appreciated.

Thanks!

LegolasFFM 14th Nov 2013 5:07 PM

You can find the music files in the following folder:

C:\Program Files\Electronic Arts\The Sims 3\GameData\Shared\DeltaPackages\p17

Hope this will help you to extract the wanted files.....(for my prob I still have no idea how to manage the decoding :-( )

Quote: Originally posted by mcemily
I'm wondering if someone can point me in the right direction. I've been trying to extract all the music from the various radio stations, but have not run across any of the songs from the Latin, Disco, Rap or Rock stations. I've scoured all the FullBuild.package files found in each game's GameData\Shared\Packages folder (plus all the DeltaBuild files for the base game, just in case), but I can't find any of these songs listed (at least, not listed as they were for the other music genres, with the song title easily recognizable).

I'm not sure why I can't seem to find the Latin music, since I was able to find and convert all the other songs from the base game's FullBuild1.package just fine. More confusing to me still is the fact that from what I can see when I open the 70s, 80s and 90s Stuff FullBuild (FullBuild_p17.package) in S3PE, FullBuild_p17.package does not contain any AUD files whatsoever, and I know that is the expansion pack that gave us the Disco/Rap/Rock stations!

Anybody have any idea where I can find these elusive files? (I have all EPs and all SPs except the Katy Perry and Diesel Stuff ones, if that info is helpful.) Any help would be much appreciated.

Thanks!

mcemily 18th Nov 2013 10:54 PM

Quote: Originally posted by LegolasFFM
You can find the music files in the following folder:

C:\Program Files\Electronic Arts\The Sims 3\GameData\Shared\DeltaPackages\p17

Hope this will help you to extract the wanted files.....(for my prob I still have no idea how to manage the decoding :-( )


Thank you so much, LegolasFFM! I'm a completionist, and it was really bothering me that I didn't have those.

As for the actual decoding process... I am considering writing up a step-by-step tutorial, since I've started to have people PM me asking for my ripped music, which I am hesitant to share based on a fear of being slapped with Copyright/Piracy complaints from EA. (Also, from a practical standpoint, it's over 1GB of music, and that makes it a pain to try to upload/share anywhere anyway.) But if I can decode these files, truly, ANYBODY can, so there should be no reason why those interested in my files couldn't just create their own.

I don't want to make light of the difficulties you and others are having decoding these files when I say "anybody can do this."

It took me several reads of the first six posts on this thread before I had any clue how to proceed. All the info on how to do so is in the first 6 posts. The problem is that there is also a lot of extra information in those posts that end up being unnecessary for the basic task of converting a Sims 3 song to an MP3 file. In the end, if you are only interested in getting the music, all you need is the ealayer3.exe decoding tool (https://bitbucket.org/Zenchreal/eal....7.0-win32.zip), and s3pe (http://sourceforge.net/projects/sim...8.exe/download). My "tutorial" would really just be gathering (and then paring down) those directions in the first 6 posts to help those of us with lower computing skills follow along more easily (probably with a copious amount of screencaps). Here is a step-by-step rundown (using the 70s, 80s & 90s Stuff Pack DeltaBuild you found) of the process I use:

1. Download and install s3pe (http://sourceforge.net/projects/sim...48.exe/download)
2. Download the ealayer codec (https://bitbucket.org/Zenchreal/eal...0.7.0-win32.zip) and extract it to your desktop (for ease of access).
3. Go to "C:\Program Files (x86)\Electronic Arts\The Sims 3\GameData\Shared\DeltaPackages\p17" (or wherever you have installed your sims games).
4. Right-click the DeltaBuild_p17.package file and choose "copy."
5. Go to your desktop, and paste DeltaBuild_p17 on the desktop (for ease of access).
6. Open s3pe. Go to "File" and "Open." Select the DeltaBuild_p17.package file on your Desktop.
7. When the package loads, click on the "Tag" column heading. This will sort the list of files by their type, which makes it easier to find the file you want, since all the AUD files will be together.

NOTE: In this particular Stuff Pack, you'll see that each AUD file has two instances (for example, you'll see the file "spring_break" is followed immediately by another "spring_break"). This is actually how you know if the AUD file(s) in question are music, or sound effects. All the music files show up as double entries like this. One is a .snr and one is a .sns file. You will need to export both of them, though you'll only interact directly with the .sns files.
NOTE TWO: In other EPs/SPs, there will be sound effect or ambient noise AUD files listed as well, so it can be a little more work sorting out the music files. One thing to remember is that sound effects and ambient noises only have ONE instance of the file name (for example from Seasons, there is only one instance of "vo_hotdog_loopbC_cb12"). Another key difference is that music files are listed simply as the song's title (such as "spring_break"), whereas the other sound files have descriptive names (such as "vo_hotdog_loopbC_cb12"). Now back to the decoding process...

8. Once you have identified a music file (2 identical instances of the file right beside each other), right-click on the first instance, and select "export," and then "to file."
9. It will ask you where you'd like to save the file. Save it in the ealayer folder on your desktop.
10. Repeat steps 8 & 9 with the second instance of the music file.
11. Open the ealayer folder on your desktop. You'll see it contains several files. The only files you actually have to worry about are ealayer3.exe and the .sns file you just saved there.
12. Left-click the .sns file, and drag it over the ealayer3.exe file. There will be a black command window that will flash briefly, then an MP3 file will generate.
13. Delete the .snr and .sns file, and rename the MP3 (if you like) to something more sensible.

Once you get the hang of the process, all it really takes is a bit of time... and the occasional piece of advice on the right folder to search for the necessary DeltaBuild file.

Now, if you are interested in decoding/converting the other sounds... the ones that require the ffmpeg codec... well, I am of no further use to you! I couldn't figure out how to successfully decode any of the audio files that required the ffmpeg.exe converter. The .wav files that were created through that process were full of static and were unusable. So, no Gypsy Wagon music for me. Fortunately, however, all of the music I was most interested in (which includes the songs found on the sims' radio stations, music from Build/Buy/CAS/Map, and also music played during the loading process and flybys over China/Egypt/France) were all in the format that used the much more user-friendly ealayer3.exe to convert them.

As for the instructions for replacing the existing music/sounds in the game with your own custom music/sounds, well... I know my limits, and know not to try to dabble in such sorcery!

pippipcheerio 28th Nov 2013 6:11 PM

Possibly stupid question....
 
Quote: Originally posted by jonwil
Sims 3 audio comes in .snr and .sns files.
Go to http://www.cncmods.net/files/sims.zip and download this then you will have some things that can decode these files (depending on which codec the files use).
Also you will need a hex editor to verify which compression type the files use (in case any of them use compression types other than the 2 specific types I have managed to identify)
If you dont have a hex editor, you can download this one
http://www.handshake.de/user/chmaas...nload/xvi32.zip

Steps:
1.Use the resource tools to extract the audio you want.
2.Open the .snr file in a hex editor and look at the first byte. If the first byte is 04, that means its using the EA XAS ADPCM codec. If the first byte is 05, that means its using EALayer3 codec. If its using anything else, that means its an unknown codec.

Put the .snr and .sns files for the sound you want in a folder along with the contents of sims.zip. If the first byte is 04 (XAS ADPCM) you decode it via ffmpeg.exe. Open a command window, navigate to the folder containing the the files and type ffmpeg -f ea_cdata -i <snr file> <wav file>
This will convert the .snr file to a .wav file.
If you have a file of type 05 (EALayer3) you decode it via ealayer3.exe. Open a command window, navigate to the folder containing the the files and type ealayer3 -mc <snr file> and it will decode the .snr file to a .wav file. If there is a .sns file, you pass that instead of the .snr file.

If anyone finds a file with an codec other than 04 and 05 or if they see a file with a codec type of 04 and a matching .sns file (i.e. the .snr file is only 8 bytes), I want to know.

Please post here if you find such files (or any file that fails to convert). Or if there is anything about my instructions that are confusing or hard to follow.

The source code for ffmpeg.exe can be found at www.ffmpeg.org
The source code for ealayer3.exe can be found at http://bitbucket.org/Zenchreal/ealayer3
Both tools seem to be under a fairly liberal license so it should not be hard if someone wanted to re-use the code to add support for the audio to the resource extractor directly.



I've found pretty much this same solution everywhere I've looked. There's just one problem: no one is mentioning where Fullbuild1 IS. I don't see it anywhere in my Sims 3 files at all, and when I search my entire laptop it turns up (very quickly) zero results for the phrase "fullbuild1".

Why does it seem like I'm the only one having a problem finding it? Is something wrong with my game?

cjbarker32 19th Jan 2014 10:47 PM

Good lord...there has to be an easier way to do this. lo Sadly...I'm sure there isn't....yet.

pinkladybug81 31st Jan 2014 10:38 PM

This is a lot of work for the few files I wanted. I just wanted a few simlish sayings to put on my phone... like having my text alerts say "Sul sul!" or something. Plus a lot of the links people posted are no longer working so I'd have to search for the tools myself as well. Anyone want to just send me a few mp3 files? lol

Digitalchaos 1st Feb 2014 3:05 PM

Quote: Originally posted by Nysha
Sadly no - we can decode, but not encode.

TS3 can also play MP3s, as demonstrated by the custom music feature, but any attempts to make it do so outside of the custom music channel would be way over my head. It does seem to play the mp3s directly, rather than converting them to EALayer/XAS.


Code:
uint mSoundHandle = 0;
string song= ""; // this would be a string 
// call StopSound() 
if(mSoundHandle  != 0) { Audio.StopSound(mSoundHandle); mSoundHandle=0;}
// call Audio.StartSoundMP3
mSoundHandle = Audio.StartSoundMP3(song);


One could use this to play specific mp3s (possibly to play songs in the custom music folder)
NOTE: you would not be able to include the mp3 files as resources in a package file, they would probably be placed in the custom music folder

you can look at some code here: My StereoMod
NOTE: that it is an unfinished script mod -- because it is difficult, if not impossible, to make it work seamlessly with a stereo object.

gamefreak130 12th Feb 2014 2:24 AM

Whenever I try to decode an .snr file with ealayer3, it says the file format could not be read (or something along the lines of that), and when I try to decode using ffmpeg, it says it "couldn't open the file". I can decode .sns files, though. Can anyone help?
Edit: I have ANOTHER question on this topic. I can't find the music that plays while loading a save game. Does anyone know what it's called?

Amichan619 2nd Apr 2014 1:07 AM

Greetings! Thank you for the "for dummies" tutorial posted above. Does anyone know where I might find the pop, and geek rock music genres? I have searched through almost all folders and I'm still lost at this point. Thanks to all!

gamefreak130 25th May 2014 4:01 AM

Quote: Originally posted by Amichan619
Greetings! Thank you for the "for dummies" tutorial posted above. Does anyone know where I might find the pop, and geek rock music genres? I have searched through almost all folders and I'm still lost at this point. Thanks to all!

The geek rock music genre is found in C:/<Wherever you have University Life installed>/Gamedata/Shared/Packages/FullBuild_p18.
The Pop genre is kind of scattered all over the different EP files, but if you're looking for just the base game pop music, it's under C:/<Wherever you have The Sims 3 installed>/Gamedata/Shared/Packages/FullBuild1.

lavsm 28th May 2014 2:35 AM

I recently rediscovered this topic after a few years and thought I'd attempt this again. So far I have been successful at converting both types of files, using the two different programs mentioned in the first post. If anyone needs help getting a particular sound file (for use as a ringtone, etc.) pm me and I can try to convert it for you.

Retarded_Pig 29th May 2014 3:24 AM

I only usually lurk around forums like this, and I've just been thinking, wouldn't one be able to create a custom voice mod with the ability to have the game play our sounds?

r_deNoube 5th Jun 2014 10:48 PM

Quote: Originally posted by Retarded_Pig
I only usually lurk around forums like this, and I've just been thinking, wouldn't one be able to create a custom voice mod with the ability to have the game play our sounds?

For a lot of us interested in audio, that would be kind of the holy grail. Unfortunately, that direction is the hard one. We can get the game's sounds out to .mp3 files with the tools described in this thread. But to make a speech or sound effect "object" that the game will pick up and use, the way it uses other CC objects -- there's no way yet found.

oleg221278 13th Feb 2015 11:29 AM

Please help me with making my own radio station. I did everything what's written here but i don't know how to make new stations wit new music.

yorrick 8th May 2015 10:40 PM

so i tested your mod @blakegriplingph and it works perfectly what keeps me puzzled though is why you didnt make 1 mod for all base game music or seperate mods that replace different songs your mod has never given me any hiccups nor did it fight with other core mods that i had installed

a87370ylgrc 14th May 2015 9:19 PM

I would like to put the sims 1 and sims 2 music into my sims3 game, not as a replacement, but as an addition, but I want them to go into their proper categories. Since EA seems to use the same encoding for their music in the sims games, could I just extract the files and plonk them in?

a87370ylgrc 14th May 2015 9:23 PM

Quote: Originally posted by pinkladybug81
This is a lot of work for the few files I wanted. I just wanted a few simlish sayings to put on my phone... like having my text alerts say "Sul sul!" or something. Plus a lot of the links people posted are no longer working so I'd have to search for the tools myself as well. Anyone want to just send me a few mp3 files? lol


If you want to do that, an easier thing would be to find some videos of sims on youtube, find one with the sound you want, use the youtube to mp3 website to download the sound from the videos, and use audacity to trim it.

lady666 26th Jul 2015 7:02 AM

Its helped me decoding .snr files. You saved me from a big headache :lovestruc
Thanks a LOT

A&W_Beer 30th Nov 2015 7:25 AM

I know this is an old post, but hopefully someone will see this and maybe help. I'm trying to convert 2 .snr files from the Into The Future EP into .mp3 format. They are, "almanac_time_loop01" and "almanac_time_loop02". There is also an "almanac_time_loop" AUDT file, but I'm not sure if that's relevant. I'm not new to extracting and converting Sims 3 music to .mp3, as I've extracted pretty much every song from every EP I own, but it's been a long time since I'd done so. I have the 2 files I want to convert in the same folder as "ealayer3.exe" and "libmpg123.dll". But when I drag and drop them onto "ealayer3.exe", no .mp3 files generate. The command window briefly pops up and goes away, then nothing else happens. I don't think I'm doing anything wrong, but I wouldn't doubt it if I did. Are those two files just unable to be converted for some reason? Has anyone else successfully converted those files? I really like the one loop--it's so catchy! So if anyone could be of help, I would greatly appreciate it! Thanks in advance!

jje1000 30th Apr 2016 5:50 AM

Does this still work?
 
1 Attachment(s)
Resurrecting an old post yet again- anyone have any luck with these programs? I'm running into the same issue where even if I drag the files onto the program icons, a command screen flashes briefly and nothing happens.

I'm looking to extract these two .snr files from World Adventures, and then replace them with two new sounds.

tizerist 1st Jun 2016 9:36 PM

I couldn't help thinking how awesome it would be if someone replaced the Oasis Landing loading music with this:
https://www.youtube.com/watch?v=pYvZ4HI-_cc

jje1000 4th Jun 2016 4:41 AM

@tizerist:

As originally posted by Wojtek here: http://modthesims.info/showthread.p...d=1#post5020035

Quote: Originally posted by Wojtek
A list of programs you have to have in order to succeed. Click on the name of the program to be redirected to the download page, where you can obtain the program.
1. s3pe - Package editor
2. Audacity - Sound editor (you may have to download a plugin to be able to export MP3 files)
3. EALayer3 - Sound decoder (download the 3-0.6.2 version)
4. cmd.exe – Windows Command Prompt (find it via the Windows search tool)
5. HxD - Hex Editor

In this tutorial you'll learn how to replace the files in a .SNR format. These are sound files containing short sounds, which are encoded using the EA XAS ADPCM codec). They're used in the Sims 3 and stored in a big FullBuild1.package file.

Part 1. Working with ѕ3рe

Step 1.1 Download and install ѕ3pe if you haven't already.

Step 1.2 Configure ѕ3рe
1.2.1 - You'll find the FullBuild file, depending on your system and where you installed the game in: […]/Electronic Arts/The Sims 3/GameData/Shared/Packages.




Quote: Originally posted by Wojtek
OR

If you want to edit the sounds from an Expansion Pack, you just open the appropriate folder of the Expansion Pack you want to take the file from, for example FullBuild_p21 from the Sims 3 Into the Future EP:




Quote: Originally posted by Wojtek
1.2.2 – Open the FullBuild file you want to export the .snr file from (either the Fullbuild from the base game or an expansion pack).
1.2.3 – Tick the 'Sort' and Display 'Names' and 'Tags' at the bottom. Now you can see the names and tags
1.2.4 – Click 'Name' (in the upper-left corner, below 'File') to put the names in the alphabetical order.




Quote: Originally posted by Wojtek
Step 1.3 Find and extract the desired .snr file (skip this step if you have the file already)
1.3.1 – You can either do it by looking at the names of the files on the list, which is time-consuming, or click the Tool/Search or Ctrl+E and type the key word between quotation marks. To narrow down the search results to .SNR files, tick the 'enable filter' and choose '_AUD 0x01A527DB', which tells the search engine that you're looking for .snr files only, and hit Enter for the search to begin. It may take a while to load a full list of files which contain the key word you typed. Double click each line after the search has finished and the program highlights the file for you. You can either close the window, if you've found what you've been looking for, or search further if you haven't.




Quote: Originally posted by Wojtek
1.3.2 – SNS and .SNR files have the _AUD tag and you have to make sure that the file you want to export is a .SNR. Once you have found the file, double click it.
1.3.3 – A windows will pop up with the resource details (TGI) of the file. The .snr files belong to 0x01A527DB Type, the one you chose when narrowing down the search results.
1.3.4 – Close the resource details window, right-click the file you selected earlier, click Export/To file...
1.3.5 – The extension of the file is .snr. Save it somewhere you can find it easily later.




Quote: Originally posted by Wojtek
Part 2. Working with Audacity

Step 2.1 Prepare the audio file
2.1.1 – Find the file you want to replace the game's default.snr file with.
2.1.2 - Your sound should be in the MP3 format and last less than 1 minute.

Step 2.2 Download and install Audacity if you haven't already

Step 2.3 Set the file up in Audacity
2.3.1 - Open Audacity and import the file there.
2.3.2 (optional) - If you're familiar with the program, you can adjust the file to your liking before exporting the final version.
2.3.3 - Make sure the project sampling (Hz) is set to 44100 and its sample format is 32-bit float (Stereo). You can edit it by clicking on the arrow, which is encircled in the picture.




Quote: Originally posted by Wojtek
Step 2.4 Once your file is ready, export it as an MP3.
2.4.1 - Make sure you've installed the LAME codec for Audacity.
2.4.2 - File/Export sound... OR Ctrl+Shift+E
2.4.3 – Type the name of the file, click 'Save as a type', choose 'MP3 files' from the list and click 'Options'.




Quote: Originally posted by Wojtek
2.4.4 – Set up the Bit Rate Mode to: Variable, Quality to: 3,155-195 kps, Variable Speed to: Standard and Channel Mode to: Joint Stereo.
2.4.5 - Now your file is ready for export. Click OK, ignore the Metadata box and save the file somewhere you can find it easily. You can replace the “old” MP3 file if you want to.




Quote: Originally posted by Wojtek
Part 3. Working with EALayer3

Step 3.1 Download and open ealayer3-0.6.2-win32.zip, extract the 'ealayer3-0.6.2-win32' folder and save it somewhere you can find it easily.
3.1.1 – Find cmd.exe (via Windows search tool) and copy it to 'ealayer3-0.6.2-win32' folder.
3.1.2 – Copy the MP3 file you exported from Audacity earlier and paste it in the 'ealayer3-0.6.2-win32' folder.
3.1.3 – Create a .txt file and paste the following code:
Code:
ealayer3 -E NAMEOFYOURMP3FILE.mp3 -o NAMEOFYOURMP3FILE.sns

3.1.4 – Replace the NAMEOFYOURMP3FILE with the name of your MP3 file. Copy the whole line
3.1.5 – Open cmd.exe and paste the line (right click/Paste NOT Ctrl+v), hit Enter and after a while a new .sns file (NAMEOFYOURMP3FILE.sns) is generated and placed in the folder where you keep cmd.exe, your MP3 file and EALayer3.exe.
3.1.6 – Repeat steps 3.1.3-3.1.5 but in this case you don't want a .sns file, but a .snr one.
Code:
ealayer3 -E NAMEOFYOURMP3FILE.mp3 -o NAMEOFYOURMP3FILE.snr

3.1.7 – Now you should have two files (.sns and .snr). They're identical in size and the only thing which makes them different is the extension.
3.1.8 – Now you need to change the name of those two files. Let's start with the .snr file. Find the original .snr file you exported from s3pe. Copy its name and paste it into the newly generated .snr file. It should look moreless like this:
S3_01A527DB_001407EC_NAMEOFTHEFILEINS3PE%%+_AUD.snr
See the 01A527DB? It indicates that it's recognized/categorized by the game as a .SNR file and _AUD type.
3.1.9 – Now change the name of the .sns file. Copy the name of the .snr file, be it the original or the one generated by EALayer3 (they're the same) and paste it into the .sns file. Now it looks exactly like the .snr file, but there's one thing you have to change in the filename.
S3_01A527DB_001407EC_NAMEOFTHEFILEINS3PE%%+_AUD.sns
Replace 01A527DB with 01EEF63A. Now it should look like this:
S3_01EEF63A _001407EC_NAMEOFTHEFILEINS3PE%%+_AUD.sns
Why change it? It's a .sns file not a .snr and that's why the game has to recognize/categorize it as such.

Part 4. Working with HxD

Step 4.1 Download and install HxD if you haven't already

Step 4.2 Opening and configuring HxD.
4.2.1 – Click Additional/Options... and in the View panel tick/check the options as I did (you can see it in the picture below)




Quote: Originally posted by Wojtek
Step 4.3 Editing the .snr file
4.3.1 – Open your .snr file in HxD and change the Offset to (h).
4.3.2 – Select and copy the first eight bytes (16 digits organized into 4 chunks). Right-click + Select all OR Ctrl+A and hit Delete. Paste the eight bytes you copied before. You deleted the sound data and left the header only.
4.3.3 – Replace the values at addresses 00-03 with 0504 AC44. At address 04 you see a number. Replace the whichever number you have there with 40. You're creating a pure header which is going to link the .snr file to the .sns file.




Quote: Originally posted by Wojtek
4.3.4 – Your .snr file is ready. Save the changes (Ctrl+S or File/Save)

Step 4.4 Editing the .sns file
4.4.1 The easy part of working with HxD is gone. Now it's time to edit the .sns file. Open the .sns file with HxD
4.4.2 – At addresses 06-07 you see the 0480 value. Replace it with 002F.
4.4.3 – Look at addresses 02-03. In our case we've got 0153. Press Ctrl+G and type in 0153 and press OK. It redirects you to the address. You usually find 0000 starting at the address you've been sent to.




Quote: Originally posted by Wojtek
4.4.4 – Download the MTS_Flyby_1211063_Tutorial_templates.rar and save the file on your Desktop. Open the archive and extract CodeBlock(C4).sns to your Desktop. Open the file with HxD.
4.4.5 – In HxD copy the whole code (Ctrl+A + Ctrl+C) and paste it (Ctrl+V) in where you were sent in step 4.4.3.
4.4.6 – The position of the cursor after pasting the code indicates the new address. You can see it as the Offset in the lower-left corner. In this case it's 217. Now replace the addresses 02-03 with the new address. The address has to have 4 digits, so we add 0 in front of the address, so it's 0217.
4.4.7 – Save the changes (Ctrl+S)




Quote: Originally posted by Wojtek
Part 5. Working with ѕ3рe

Step 5.1 Packing the .snr and .sns files with ѕ3рe
5.1.1 – Open ѕ3рe, File/New OR Ctrl+N. Right-click just anywhere, Import/from file... Choose the .snr and .sns files you edited with HxD and hit 'Open'. A window pops up. It's a good idea to select 'Replace duplicates' and check 'Compress', 'Use resource name' and 'Rename if present'. Click OK. Now your files are imported into a package. Now you can save your ready package (File/Save OR Ctrl+S). Give it your name or initials and a descriptive name of your package. Save your package into My Documents/Electronic Arts/The Sims 3/Mods/Packages/subfolders if you use any and click Save.




Quote: Originally posted by Wojtek
Part 6. Testing the sound in-game.

6.1 Now you can test your new sound in-game.
6.1.1 – Launch the game and load one of your saves or start a new game in any of the towns available.
6.1.2 – Depending on which sound you replaced, you have to figure out in which situations the sound is played. You have to somehow trigger the situation or wait for the sound to be played. It's up to you. For example, if you replaced the sound played when the Weather Stone appears, the best idea is to start a new game, choose the active family and wait for the Weather Stone to appear. If you replaced, for instance, a sound played during an interaction with an object, you have to order your sim to perform the interaction with the object in order to hear the sound and check whether it worked or not.

I tried to do my best to explain it in a comprehensible manner. If something needs further explanation or correction, just let me know. You need more pictures or examples? Let me know. I fulfilled @jje1000's request and replaced one of the two train sounds in France. I attached the .rar file with the ready package. Download it here. @jje1000, now you can test it in-game and tell me whether it worked or not. Then follow my tutorial and try to do the same with file 2.

I would like to say THANK YOU to @Flyby for his tutorial. This is where I learned it all and my tutorial is basen on this one.

Goodywood 13th Sep 2016 3:20 AM

I'm having trouble saving the snr file as a wav file. I'm not sure if I'm suppose to copy "ffmpeg -f ea_cdata -i <snr file> <wav file>" but I did and it won't save. I'm confused as to what I'm suppose to type here. I looked through thread but didn't see anyone mention it. Unless I'm missed it. If so, I'm sorry.

Goodywood 13th Sep 2016 3:45 AM

So this is probably way beyond my comprehension, but I did re-read the first post and I see the "ffmpeg" link. SO I went there and found "ffmpeg -i input.flac -id3v2_version 3 out.mp3" and used that to save to file and it worked but I couldn't open it in Windows Media Player. I'm just going to have to really take my time and read this over again. My brain already hurts from getting this far.

FeathervsFlower 10th Feb 2017 11:04 AM

Have we learned how to encode yet? i need to replace the ingame radio soundtrack lol


All times are GMT +1. The time now is 4:20 PM.
Page 1 of 2

Powered by: vBulletin Version 3.0.14 · Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.