January 2018

MonTueWedThuFriSatSun
1234567
891011121314
15161718192021
22232425262728
293031    

Calendar Calendar


    Editing Sound in GTOS / SF

    Share
    avatar
    hnbdgr

    Posts : 14
    Join date : 2014-11-26

    Editing Sound in GTOS / SF

    Post by hnbdgr on Wed Nov 26, 2014 1:59 pm

    Hi guys,

    First off, this is my first post here. sorry if I posted it in the wrong section. I reckon there are many similarities between GTOS and SF as far as the game structure so my hope is someone knows an answer to this.

    is there anybody here who has experience in modding speech files for this game?

    The mod manual omits the speech category completely. It is important to distinguish between sound ans speech. Sounds - and how to convert them are covered in the manual very well and they seem to work for other people. But speech doesn't.

    The reason for this is because according to my findings the speech files originate from ADPCM encoded WAV's. Nowhere does it say what type of ADPCM encoding it is (there are many), neither what sample rate is used for them, though by playing the raw ".sound" files back through audacity and other programs I'd swear they ought to be 44.1 khz anyway since that's when I can hear the speech.

    So simple question - what ADPCM codec is used, and what sample rate?

    many thanks!

    Badger

    www.4shared.com/rar/-sVlVTZdba/Sound_Mod_Guide.html
    avatar
    lockie
    TSF Member
    TSF Member

    Posts : 3825
    Join date : 2014-07-24
    Age : 50
    Location : Ukraine, Kyiv

    Re: Editing Sound in GTOS / SF

    Post by lockie on Wed Nov 26, 2014 2:32 pm

    hnbdgr wrote:Hi guys,
    First off, this is my first post here.
    Welcome on a board, Badger!

    is there anybody here who has experience in modding speech files for this game?
    I'm Smile

    It is important to distinguish between sound ans speech.
    No. I`d say it is important to distinguish sound and music.
    Sound usually has format sample 44k(22,5)kHz, 16bit, stereo/mono. Extension is PCM *.wav
    Music must be in *.ogg format(container). Bitrate 128kbit, 44kHz, 16bit

    So simple question - what ADPCM codec is used, and what sample rate?
    ADPCM (adaptive discretion) is more advanced format to keep *.wav, but SF use only PCM format.
    In case ADPCM use - there is 100% CTD.
    So, for speech there in no need special codec/utility. I'm using oldy/trusty CoolEdit. Sometimes SoundForge. Just u've to save in PCM *.wav format.

    For the music u've to make conversion from wav->ogg (bitrate 128kB is enough). For this purpose, it has been accustomed for me to using Advanced WMA Workshop. It's a very handy and simple program.
    avatar
    hnbdgr

    Posts : 14
    Join date : 2014-11-26

    Re: Editing Sound in GTOS / SF

    Post by hnbdgr on Wed Nov 26, 2014 2:40 pm

    Hi Lockie, thank you for the fast reply!

    But it didn't work for me last time i tried it.... I will try again today. Just to be sure - you reckon this is the same with Graviteam operation star?
    avatar
    lockie
    TSF Member
    TSF Member

    Posts : 3825
    Join date : 2014-07-24
    Age : 50
    Location : Ukraine, Kyiv

    Re: Editing Sound in GTOS / SF

    Post by lockie on Wed Nov 26, 2014 3:02 pm

    Oh, u meant GTOS? No, I didn't have experience with that game, but I may try. So, what exactly u'd like to do? Replace speech of soldier or add a new one?
    avatar
    hnbdgr

    Posts : 14
    Join date : 2014-11-26

    Re: Editing Sound in GTOS / SF

    Post by hnbdgr on Wed Nov 26, 2014 3:22 pm

    Yes replacing speech files, the ones in there are frankly not the best.

    I started with german voices - these are packed in SteamApps\common\Graviteam Tactics Operation Star\data\k43t\dev_updates\shared\packed_dataspeech_rep.flatdata
    those are the ones the game uses.

    there is an unpacker called unflat.cmd located in SteamApps\common\Graviteam Tactics Operation Star\docs\modwork\flatwork You need to run it as administrator

    Then you need to find the relevant files I started with all "safe" "ger" files so speech files that are used by german infantry when idle or "safe", because they are screwed up. They are actually panic-type speech.
    The files look like this: safe_ger_01_01.loc_def.sound

    Next you will find you cannot play that sound back. the only way it works is as raw import, dialogic ADPCM, 44.1khz. Audition or Audacity or Vox Studio from Xentec will do it. Even then you've got a lot of noise in the file. You can't import it in a 16 bit format it won't work.

    So I tried creating WAV's that were ADPCM encoded and then converted them using the wav2aaf utility. SteamApps\common\Graviteam Tactics Operation Star\docs\modwork\asets\wav2aaf.cmd

    It will work on some types of ADP.CM, not on others - i think it works with MS ADPCM generated WAV's only. The utility does work on any other 16 bit WAV of course. But ADPCM is "4" bit encoded. Then I renamed them to safe safe_ger_0x_0y.loc_def.sound files. There are 25 files I used the a.f.rename utility to rename them.

    Then I packed it all back up using the mklfat.cmd using the flatlist command. I replaced the original packed_dataspeech_rep.flatdata with mine, started the game and listened to the infantry. All I hear is hissing sounds. No speech.

    EDIT:

    to pack files - you ought to copy mkflat.cmd somewhere(I created a folder under users and called it modwork, then another called flatwork) and put the following into it:
    Code:

    cd ..\..\..
    starter.exe  root\programs\mkflat.progpack, users\modwork\flatwork\speech_rep.flatdata, users\modwork\flatwork\speech_rep\speech_rep.!flatlist

    as you can see to pack the files you only target the speech_rep.!flatlist or other !flatlist - that's the file that has all the other filenames in it.

    to use wav2aaf, create an empty myprogram.cmd in the root GTOS folder and put this into it:

    Code:


    starter.exe wav2aaf, users\modwork\ogg\44khz\MS11.wav, users\modwork\ogg\MS11.sound


    Obviously path's will differ but it's always a ".wav" to ".sound" conversion.

    Also it's nothing to do with an actual AAF file. it's a Graviteam proprietary file I think. You can't open the ".sound" (AAF) in any DAW editor I know. The header is wrong.


    Last edited by hnbdgr on Wed Nov 26, 2014 3:44 pm; edited 1 time in total
    avatar
    lockie
    TSF Member
    TSF Member

    Posts : 3825
    Join date : 2014-07-24
    Age : 50
    Location : Ukraine, Kyiv

    Re: Editing Sound in GTOS / SF

    Post by lockie on Wed Nov 26, 2014 3:29 pm

    Sounds a bit complicate Smile But I'll have a look.
    avatar
    hnbdgr

    Posts : 14
    Join date : 2014-11-26

    Re: Editing Sound in GTOS / SF

    Post by hnbdgr on Wed Nov 26, 2014 3:47 pm

    Yes it is a bit complicated.... I wonder If I made a mistake somewhere. I'd be grateful if you could try it out and let me know what you found out.

    Thank you lockie!

    Badger
    avatar
    lockie
    TSF Member
    TSF Member

    Posts : 3825
    Join date : 2014-07-24
    Age : 50
    Location : Ukraine, Kyiv

    Re: Editing Sound in GTOS / SF

    Post by lockie on Wed Nov 26, 2014 4:47 pm

    OK, I see. That's a very complicate system to edit sound. Well, may be it was done deliberately to cut off as more users/modmen as possible. That's a first idea, which occurred to my mind. As I know same situation with another game SABOW.

    I tried to make a back conversion from *.sound to *.wav and there is no problem for the good goalkeeper Smile
    Here we`re. I took sound gwound_01_03.loc_def.sound
    As I've understood he shout smth. "Oh, crap, I wounded!" Very Happy
    It is in the wav format:
    w ww.mediafire.com/?xfo57zbeyd5sp
    It is in the raw(pcm) format:
    w ww.mediafire.com/?b62gd25q2ct846x


    Then I picked up similar speech and made conversion from *.wav(PCM, 44kHz, 16bit, mono) in *.sound format
    Here it is original file:
    w ww.mediafire.com/?2awb5p50228dxlb
    Converted in *.sound:
    w ww.mediafire.com/?27609bpghs8k8zj

    Check it out, coz I don't know how to do that in the game. I don't like tactics and even don't have idea how to start the game. Or u may upload er files somewhere and give me a link. Then I'll make conversion. And we shall see what we shall see Smile

    PS
    remove space between w ww. I made it to avoid annoying advertisement ad.fly
    avatar
    hnbdgr

    Posts : 14
    Join date : 2014-11-26

    Re: Editing Sound in GTOS / SF

    Post by hnbdgr on Wed Nov 26, 2014 6:35 pm

    Hi Lockie,

    thanks for looking into this. Where did you get that sound from? I checked sounds_replace.flatdata and it's not there.

    By the way I can play the sounds from that flatpack that is not a problem, I can import them as 16bit mono 44.1khz raw data and they play.

    But I can't get the speech to play properly. That's the problem Smile

    I believe there is a distinction between sound ans speech wav's in GTOS. Sounds like those from the above mentioned flatpack are fine. speech from speech_rep.flatdata is the problem.

    sounds are encoded with WAV PCM 16 bit 44.1khz mono

    speech is encoded with WAV ADPCM (which one?) ?Khz mono

    here is an example file: goo.gl/SS4tXg

    insert the http and www  if you find you need it, apparently I'm not allowed to post url links in the first 7 days after registration.

    You can barely hear what he's saying when you import it as raw data, Dialogic ADPCM, 44.1khz. He's saying Ziel gesichted (Target sighted)
    avatar
    lockie
    TSF Member
    TSF Member

    Posts : 3825
    Join date : 2014-07-24
    Age : 50
    Location : Ukraine, Kyiv

    Re: Editing Sound in GTOS / SF

    Post by lockie on Thu Nov 27, 2014 2:54 am

    hnbdgr wrote:Where did you get that sound from? I checked sounds_replace.flatdata and it's not there.
    I took it from the folder with game installation.
    ...data\k43t\shared\packed_data\speech_ger\


    By the way I can play the sounds from that flatpack that is not a problem, I can import them as 16bit mono 44.1khz raw data and they play.
    OK, so we're both on the right way Wink

    But I can't get the speech to play properly. That's the problem Smile
    It's a very strange, but I may play any speech sound. i.e. u've written:
    The files look like this: safe_ger_01_01.loc_def.sound
    Here it is:
    w ww.mediafire.com/download/psa6af5r5kfypgb/safe_sound.rar

    And this is the kit of such speeches, starting from gsafe_01_01.loc_def.sound to gsafe_02_14.loc_def.sound U may point me out on any speech from this kit and I'll give u a converted *.wav file.
    I.e. this is converted gsafe_01_01.loc_def.sound into *.wav PCM
    w ww.mediafire.com/?yj5ipw1ehce8xxa

    speech from speech_rep.flatdata is the problem.
    I don't have such file.

    speech is encoded with WAV ADPCM (which one?) ?Khz mono
    I'm not sure, but try 22,5kHz

    here is an example file: goo.gl/SS4tXg
    Oh, this example I could not read Sad That's interesting. Suppose, we've a dif. type of the game. My is a very old 2010. No any patches applied. (No wonder, coz I never played it)
    avatar
    hnbdgr

    Posts : 14
    Join date : 2014-11-26

    Re: Editing Sound in GTOS / SF

    Post by hnbdgr on Thu Nov 27, 2014 9:24 am

    Hi Lockie,

    I think you are right, we've got different version of the game. Mine is here:



    I got the steam version with 4.16 update - in that version the sounds are drawn from SteamApps\common\Graviteam Tactics Operation Star\data\k43t\dev_updates and not SteamApps\common\Graviteam Tactics Operation Star\data\k43t\shared

    well that's that it seems, back to square one Sad

    avatar
    lockie
    TSF Member
    TSF Member

    Posts : 3825
    Join date : 2014-07-24
    Age : 50
    Location : Ukraine, Kyiv

    Re: Editing Sound in GTOS / SF

    Post by lockie on Thu Nov 27, 2014 9:52 am

    Why don't u replace new speeches kit on mine old ones and see what happen?
    avatar
    hnbdgr

    Posts : 14
    Join date : 2014-11-26

    Re: Editing Sound in GTOS / SF

    Post by hnbdgr on Thu Nov 27, 2014 9:54 am

    I can try... can you upload all of your speech files somewhere like dropbox? I can create a shared folder that you can upload to if you like, PM me your email for that.
    avatar
    lockie
    TSF Member
    TSF Member

    Posts : 3825
    Join date : 2014-07-24
    Age : 50
    Location : Ukraine, Kyiv

    Re: Editing Sound in GTOS / SF

    Post by lockie on Thu Nov 27, 2014 9:56 am

    I've already uploaded, did u try this link? Smile
    w ww.mediafire.com/download/psa6af5r5kfypgb/safe_sound.rar
    avatar
    hnbdgr

    Posts : 14
    Join date : 2014-11-26

    Re: Editing Sound in GTOS / SF

    Post by hnbdgr on Thu Nov 27, 2014 9:59 am

    Yes the test ones, I'll give those a try. Could you also upload the whole speech flatpack? I would find it very useful.
    avatar
    lockie
    TSF Member
    TSF Member

    Posts : 3825
    Join date : 2014-07-24
    Age : 50
    Location : Ukraine, Kyiv

    Re: Editing Sound in GTOS / SF

    Post by lockie on Thu Nov 27, 2014 10:07 am

    Here we're:
    w ww.mediafire.com/download/aydka1w13baw6g0/speech_ger.flatdata
    avatar
    hnbdgr

    Posts : 14
    Join date : 2014-11-26

    Re: Editing Sound in GTOS / SF

    Post by hnbdgr on Thu Nov 27, 2014 10:09 am

    thank you Smile
    avatar
    hnbdgr

    Posts : 14
    Join date : 2014-11-26

    Re: Editing Sound in GTOS / SF

    Post by hnbdgr on Sat Dec 20, 2014 2:39 pm

    So everything I've tried so far didn't lead me anywhere.... but 2 days ago...by golly I've done it!!!!

    After weeks of on and off trying I finally managed to import and play speech files!!!!
    Why wasn't it done before? Because the mod manual lies, they all lie! Razz

    Short and sweet you have to download the microsoft directx SDK (any version)

    Under utilities there is a file called AdpcmEncode.exe. move it to a safe place. This is the only file in the entire galaxy that will encode audio into the correct ADPCM WAV format (not audacity, not audition, not goldwave, nothing else will do it)

    take your source audio file(ogg,flac etc.) and convert it to a 44khz 16 bit PCM WAV file in any program that will do it (Audacity for instance)

    Then place the WAV and AdpcmEncode.exe in the same folder. Next, Do a cmd line: AdpcmEncode.exe file1.wav file2.adpcm

    Then convert the file2.adpcm into ".sound" (or AAF as the manual refers to it) using starter.exe wav2aaf utility. This process is outlined in the mod manual and it works fine.

    voila - you've got a file that's readable and playable by the game.

    Next problem is the dynamic pitch makes some soldier's speech sound comical as it's too high. not moddable i'm afraid but hoping for a retroactive patch that will take care of it.

    That's all!  Cool
    www.4shared.com/rar/-sVlVTZdba/Sound_Mod_Guide.html

    Sponsored content

    Re: Editing Sound in GTOS / SF

    Post by Sponsored content


      Current date/time is Wed Jan 17, 2018 4:25 am