Jump to content
We promise no intrusive ads, Please help keep the community alive
Consider supporting us by disabling your ad blocker / add to whitelist / purchasing VIP.

Question

Posted

ย ย  Hello, Snake here! So i was making another sound mod as usual when suddenly a problem that happened before occured me, everytime i export a sound loop for a car sound file it leaves a silence gap at the end of the loop which obviously breaks the whole mod experience, i was using the audacity to make those sounds, i tried to use wavepad as one suggested and other programs even using online converter and nothing has changed, so i think it maybe has nothing to do with software issue to that format, other formats works fine, only the adpcm one does that.

Also i'm noticing also everytime i loop it sounds like a click at the end of the audio, i trimmed it a bit to see if the resolves but no sucess, don't know if it's the audio file i'm using or something in my system doing that, i really would be glad if someone could help in this. Thanks for reading.

6 answers to this question

Recommended Posts

  • 1
Posted

I don't really know about the silence gap, so I just extracted a bunch of .wav from RS4_audio.bnk and loaded all of them in imhex (an hexadecimal editor) and upon opening it told me that the "RIFF/WAVE/PCM (.wav)" pattern was compatible, and I applied it, basically meaning it recognized the file looks like a .wav file and told me there's a thing I can load to tell me what all those values in the files mean.

Anyways using that I can tell you all the file had:

  • "WaveFormatType" of "MS_ADPCM"
  • 1 Channel
  • 44100 samples per second
  • block aligned at 1024
  • 4 bits per sample
  • extended data size of 32
  • 2036 samples per block

Now 1 Channel, 44.1K samples and 4 bits per sample I understand, but "MS_ADPCM" seems to be refering to how sample data is stored as another possible value for "WaveFormatType" is "IEEEFloatingPoint" (I suppose depending on the value of that field amplitude could be stored either as integer or floating point values) and as for the rest of that idk what it means but I don't think it's important and I don't know how to export in that exact format anyways.

I reckon either the silence gap is due to user (or software) error or due to file format and that is the exact format the game use so hopefully this helps you export it correctly, probably dig around in audacity's setting or the internet.


As for the click at the end of the audio, that's because you want the amplitude of the first and last sample in your loop to be at 0 or at least the same value, so cut it such that it ends and begin at a "zero crossing".

The reason being that if you loop start with an amplitude value of +1 (meaning the speaker membrane is all the way out) assuming no sound is playing (so the current speaker membrane position is at 0) when you start to play the sample the membrane will suddenly (in 1/44100 of a second) jump from the resting position (0) to all the way out (+1) pushing out a bunch of air that you will hear as a "click", if the sample ends at an amplitude of -1 (membrane all the way in) the same thing will happen when it loops back but even worse since the amplitude change is now double (ends at -1 -> +1 in 1/44.1K of a second).

Also for what it's worth listen to it in-game because when I looped one of the RS4 sounds in vlc it clicked, yet I never heard a click in-game (maybe because the loop begins and end at the same amplitude but in vlc there was a tiny delay before it looped allowing the speaker membrane to go back to rest (amplitude 0) and then it jumped back when it started again).

ย 

Anyways, sorry for the wall of text hope this helps

  • 0
Posted
On 8/24/2025 at 2:02 AM, I8aqfa896z4gedsq89gf7zef said:

I don't really know about the silence gap, so I just extracted a bunch of .wav from RS4_audio.bnk and loaded all of them in imhex (an hexadecimal editor) and upon opening it told me that the "RIFF/WAVE/PCM (.wav)" pattern was compatible, and I applied it, basically meaning it recognized the file looks like a .wav file and told me there's a thing I can load to tell me what all those values in the files mean.

Anyways using that I can tell you all the file had:

  • "WaveFormatType" of "MS_ADPCM"
  • 1 Channel
  • 44100 samples per second
  • block aligned at 1024
  • 4 bits per sample
  • extended data size of 32
  • 2036 samples per block

Now 1 Channel, 44.1K samples and 4 bits per sample I understand, but "MS_ADPCM" seems to be refering to how sample data is stored as another possible value for "WaveFormatType" is "IEEEFloatingPoint" (I suppose depending on the value of that field amplitude could be stored either as integer or floating point values) and as for the rest of that idk what it means but I don't think it's important and I don't know how to export in that exact format anyways.

I reckon either the silence gap is due to user (or software) error or due to file format and that is the exact format the game use so hopefully this helps you export it correctly, probably dig around in audacity's setting or the internet.


As for the click at the end of the audio, that's because you want the amplitude of the first and last sample in your loop to be at 0 or at least the same value, so cut it such that it ends and begin at a "zero crossing".

The reason being that if you loop start with an amplitude value of +1 (meaning the speaker membrane is all the way out) assuming no sound is playing (so the current speaker membrane position is at 0) when you start to play the sample the membrane will suddenly (in 1/44100 of a second) jump from the resting position (0) to all the way out (+1) pushing out a bunch of air that you will hear as a "click", if the sample ends at an amplitude of -1 (membrane all the way in) the same thing will happen when it loops back but even worse since the amplitude change is now double (ends at -1 -> +1 in 1/44.1K of a second).

Also for what it's worth listen to it in-game because when I looped one of the RS4 sounds in vlc it clicked, yet I never heard a click in-game (maybe because the loop begins and end at the same amplitude but in vlc there was a tiny delay before it looped allowing the speaker membrane to go back to rest (amplitude 0) and then it jumped back when it started again).

ย 

Anyways, sorry for the wall of text hope this helps

Hi, good afternoon. sorry for the delay.

First i would like to thank you for your patience for answering me, that's means a lot, even on audacity community didn't gave me that much of information i could rely on.

Second it took me a while to know what you're talking because i'm kinda new in audio mixing terms XD, sorry if i don't get it, but i will try to clarify what i tried to do:

Never used HEX program to see if a wav file was compatible with those on bnk, never knew it was even a thing, what i used since the beginning was tdu modding tools, which was faster and the only source i knew

i used the same setting you mentioned above, except from block allign, i already have that problem before but didn't know what i did to stop it from happen, i remember i had to set all the samples at 2,22 seconds to be synced correctly.

So what really helped a lot was the amplification db at 0, didn't know amplication db cause that trouble at wav files, of course it reduced some of the audio impact but i prefer that over a broken loop, and the zero crossing saved a lot, i already read about the zeroing thing but didn't know i have to export that part instead of cropping it. Now the loop is better although it's not perfect but it reduced the gap a lot and it's far less noticible thanks to you. I'm trying to make it better by making it seamless as i intend to be.

Again thank you very much, you saved my projects from certain death of my trashbin, i don't know how i will spell your username but i will give the credits for helping me out, god bless you. I will maintain it in case someone have the same problem as me. Peace.

ย 

ย 

  • 0
Posted
6 hours ago, sucahyo said:

I found the answer.ย  You must trimย  to 4084 boundary.ย 

for example, an exact 5 second video is 220259 samples, trim it toย ย 216452 which is multiplication of 4084. in audacity, selection start is 0, selection end isย 216452, trim. export to ms adpcm. import it again. no added silence at the end.

whoah, i will certainly try it later, the other answer already help me out even it still leaving a silence at the end but not perceptive, but it is worth of looking forward, thanks

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

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

×   Your previous content has been restored.   Clear editor

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



ร—
ร—
  • Create New...