XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Tue Oct 23, 2018 12:42 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Sun Mar 05, 2006 9:07 pm 
Offline
VIP member
VIP member

Joined: Tue Dec 14, 2004 11:28 am
Posts: 18
Has thanked: 0 time
Have thanks: 0 time














You can make the ads go away by registering

Right, I've just confirmed that the script on the Wiki is the correct one, and that the sound files in SRFs are macintosh SFIL files (which means that they may need endian swapping)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 05, 2006 9:19 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 15, 2003 6:45 pm
Posts: 4025
Location: Dungeons of Doom
Has thanked: 416 times
Have thanks: 564 times
Ah thanks! ;)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 18, 2006 11:55 pm 
Offline
ultra-n00b

Joined: Mon Sep 18, 2006 11:44 pm
Posts: 3
Has thanked: 0 time
Have thanks: 1 time
I solved the problem with the confusing soundfiles!

Sorry for my broken english but I am from germany. As mentioned here in the forum it is hard to find a way to play the soundfiles which are extracted of the srf-files. I figured out what it is and how to play these files under win os. Even better: I can also convert them to normal WAVE files.

I don't want to write it twice. So under http://free.prohosting.com/jellyvis/cgi-bin/YaBB/YaBB.cgi?board=news;action=display;num=1100006413;start=17 you can find a short description on how to play/convert the files yourself. This is too difficult for you? Then write a short mail to me and I can send you a small (german ;-) ) program which takes a srf, extracts every resource it knows (graphics too) and converts ima4 to wave. All in one step.

Thanks for the information in this thread which made my program possible.

Greetings from germany!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 19, 2006 8:39 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 15, 2003 6:45 pm
Posts: 4025
Location: Dungeons of Doom
Has thanked: 416 times
Have thanks: 564 times
Quote:
Hello folks and sorry for my broken english (i am from germany)!

I have made it!
I worked two days on hacking the soundfiles of ydkj and now i can play them under win os. I used the german version of ydkj but wikipedia says that the english version will work too.

So okay, here is what i figured out:
Extract the soundresources like mentioned above. Do so with MultiEx or other tools. MultiEx really does a bad job for this. Better write your own tool or use mine.
You'll get an ima4 encoded file but WITH a header. I do not understand the header so I deleted it. The header has a constant size of 84 bytes in every soundfile. Without the header the data must be a multiple of 34 - othernwise it is not an ima4.
Now add a new header in front of the data (for details see the AIFC description). Just use mine:
46 4F 52 4D XX XX XX XX 41 49 46 43 46 56 45 52
00 00 00 04 A2 80 51 40 43 4F 4D 4D 00 00 00 16
00 01 YY YY YY YY 00 10 40 0D AF C8 00 00 00 00
00 00 69 6D 61 34 53 53 4E 44 ZZ ZZ ZZ ZZ 00 00
00 00 00 00 00 00
You have to calculate the values for X, Y and Z in big endian.
X = the total filesize (data+header) - 8 Bytes
Y = size of data / 34 Bytes
Z = size of data + 8 Bytes
Rename the file to an extension ".aifc". With this you can (and should) play it with Quicktime. You can also convert it with a tool aifc2wav. Google for it. My application uses the code of this project to convert the ima4 to wave (ima4 is a really easy codec by the way). But there seems to be a problem: The wavefiles sound cropped. Maybe something wrong in the decoding.

Realize that the musicloops are not ima4 encoded. You can see this in the 84 bytes header at adress 0x3C. There is a "ima4" or 00 00 00 00. In case it is not ima4 encoded it is just plain pcm wave. use it with 22,5kHz 16bit and 1 channel.

You can get a compiled (german) tool which extracts srf to aifc and wave. Just ask me. But I am not going to make the source public for several reasons a) with aifc2wav it is almost trivial b) it is programmed under "stress" - no errorchecks c) legal issues.

Greetings from germany!


I took the liberty to post your comments on that board at this one.

You say "MultiEx does a bad job", what do you mean? It doesn't save a header? I'd have preferred you'd said "MultiEx doesn't add a header, so you have to add one yourself" . MultiEx extracts the files as they are saved in the archive. It's an extractor.

You also might have credited El Condor for pointing you in the right direction.

Oh and greetings from The Netherlands.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 19, 2006 10:53 am 
Offline
ultra-n00b

Joined: Mon Sep 18, 2006 11:44 pm
Posts: 3
Has thanked: 0 time
Have thanks: 1 time
Hello again!

I've downloaded MultiEx in the latest version (with the scripts included there) and it works for the question resourcefiles well. But with the bigger (and more interesting) files like intro1.srf I had problems. MultiEx quits the open command to these files with an errormessage and you can do nothing against it.
Sorry I don't wanted to blame it on MultiEx. Of course MultiEx extracts the resources only and this is done quite good for the questionfiles. You can then delete the confusing header and replace it by mine.

Enjoy the Intro1, Intro2 and USD.srf - they are really funny ;-)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 19, 2006 10:59 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 15, 2003 6:45 pm
Posts: 4025
Location: Dungeons of Doom
Has thanked: 416 times
Have thanks: 564 times
taraquedo wrote:
Hello again!

I've downloaded MultiEx in the latest version (with the scripts included there) and it works for the question resourcefiles well. But with the bigger (and more interesting) files like intro1.srf I had problems. MultiEx quits the open command to these files with an errormessage and you can do nothing against it.
Sorry I don't wanted to blame it on MultiEx. Of course MultiEx extracts the resources only and this is done quite good for the questionfiles. You can then delete the confusing header and replace it by mine.

Enjoy the Intro1, Intro2 and USD.srf - they are really funny ;-)


Then it must mean that there are multiple SRF formats, and MultiEx supports one of them. It's not MultiEx's fault then, the other SRF format may simply not be supported. I would need to have examples of a file that works and a file that doesn't. To compare.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 26, 2006 8:22 pm 
Offline
VIP member
VIP member

Joined: Tue Dec 14, 2004 11:28 am
Posts: 18
Has thanked: 0 time
Have thanks: 0 time
Sorry to bring this up again, but is the script on the XentaXWiki the same as the one in MultiEx, as the one on the wiki appears to work for the more 'interesting' SRFs.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 26, 2006 9:40 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 15, 2003 6:45 pm
Posts: 4025
Location: Dungeons of Doom
Has thanked: 416 times
Have thanks: 564 times
elcondor wrote:
Sorry to bring this up again, but is the script on the XentaXWiki the same as the one in MultiEx, as the one on the wiki appears to work for the more 'interesting' SRFs.


Hmm, it's not, so I checked. Damn, how's that possible.

Anyway, the new script is here in BMS form:


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 26, 2006 2:22 pm 
Offline
ultra-n00b

Joined: Mon Sep 18, 2006 11:44 pm
Posts: 3
Has thanked: 0 time
Have thanks: 1 time
Hi!

In a few hours you can download the SRF to WAVE Extractor I have made under
http://srfextra.sourceforge.net

It uses the GPL - so feel free to download the source and reuse it in your projects or to get a hint on how the srf files work. In a few hours you can download the source and a compiled binary for use under Win32 there. Enjoy!

Greetings from Germany!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 5:01 am 
Offline
Site Admin
User avatar

Joined: Mon Sep 13, 2004 1:55 am
Posts: 706
Location: The wiki.
Has thanked: 107 times
Have thanks: 124 times
hmm... might I ask why you didn't just start a new topic for it? :P

_________________
Welcome to Xentax!

Rules | Requests | Wiki

If you run across a post that breaks the rules, please PM Craptain, Mr.Mouse, or myself - we will handle it from there.


Top
 Profile  
 
 Post subject: Re: Scripting Help (from Troubleshooting forum)
PostPosted: Wed Jul 01, 2009 7:20 pm 
Offline
ultra-n00b

Joined: Wed Jul 01, 2009 5:30 pm
Posts: 1
Has thanked: 2 times
Have thanks: 0 time
Apologies for the thread necro..

I've made a patch which fixes the audio clipping in the resulting .wav files in taraquedo's project above.

I've tried to contact taraquedo directly, but I suspect after three years he may be inactive on the project, so i'm posting it here to help anyone who might come accross this.

I've also uploaded a patched binary here for those who are not comfortable with patching source code, but please, always remember that downloading executable files from untrusted sources is risky. I can personally guarantee that the executable linked above is safe, but you have no reason to trust me.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.



Top
 Profile  
 
 Post subject: Re: Scripting Help (from Troubleshooting forum)
PostPosted: Sun Sep 16, 2018 1:34 am 
Offline
ultra-n00b

Joined: Sun Sep 16, 2018 12:28 am
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
I want to replace YDKJ3's question numbers with custom audio. Is this possible?


The SRFExtra program presented in this thread extracts music data from game files, but has no functionality to encode them AFAIK. To draw the whole pipeline:
SRF --SRFExtra--> AIFC (Apple audio) --SRFExtra--> WAV (Windows audio)
SRF <--???-- AIFC <--???-- WAV

So far I've downloaded and ran SRFExtra from https://sourceforge.net/projects/srfextra/files/, but as I said, that only allows me to extract audio, not encode it.
Since the file format seems to be known, writing an encoder should be possible, right?

I can't even find the C++ source for SRFExtra! Has this just vanished?


Thus I can't apply the patch posted by IntimidatedAgain. Is this even needed? Wouldn't any other aifc2wav program work? I tried using the BMS files that everyone posted and downloaded quickbms. This produced files with no file extensions that had the same sizes as the AIFC files produced by SRFExtra, so I thought it must be them. But then I ran a program called aifc2wav from http://sed.free.fr in a command line to convert them and it said "bad sound file, can't load".

Windows Media Player fails to play both the SRFExtra and quickbms versions of the AIFC files, although the SRFExtra file works in VLC Player. Only the old script from the wiki (29 July 2005) produces somewhat sensible output, the current one (4 August 2005) produces files garbage files with garbage names. The WAV files from SRFExtra work fine, although they are (as previously stated) cropped at the end and some contain crackling (e.g. QNUMBERS.SRF.1004.wav or QNUMBERS.SRF.2003.wav from YDKJ3)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group