Any way to get "loop-able" ADPCM track?

This section is now closed.
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.1.x version.

The final version of Audacity for Windows 98/ME is the legacy 2.0.0 version.
Locked
RoccoRolo
Posts: 4
Joined: Sat Sep 24, 2011 4:53 am
Operating System: Please select

Any way to get "loop-able" ADPCM track?

Post by RoccoRolo » Sat Sep 24, 2011 5:13 am

Hi,

When you save a track in ADPCM format (Microsoft wave) it appends a little section of silence at the end. This has something to do with block alignment and filling in an unfinished block at the end.

Per this little blurb:

"Because ADPCM uses sample 'blocks' that are aligned one after the other, a wave compressed with ADPCM may have an unfinished, 'partial' block at its end. The ADPCM decoder generates silence for the remainder of this partial block which will cause the wave to not loop seamlessly.

"To properly loop waves using ADPCM compression in XACT, the wave length and any loop points in the wave data must be aligned to the sample block size. Many wave authoring packages allow you to sample block align wave lengths and loop points."

(source: http://social.msdn.microsoft.com/Forums ... 9b952a301/)


This is a problem when you're dealing with short tracks intended to be looped. You can delete or "truncate silence" but Audacity always re-adds the little section of silence, as long as you use the ADPCM wave file format. Is there a method or option for getting Audacity to "allow you to sample block align wave lengths and loop points" as it says in the above quote? Or any other technique that will allow a "clean" ADPCM track that will loop without that obtrusive hiccup?

Thanks in advance.

kozikowski
Forum Staff
Posts: 69384
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Any way to get "loop-able" ADPCM track?

Post by kozikowski » Sat Sep 24, 2011 1:01 pm

One music is inside Audacity, you should be able to trim and down to the individual PCM sample. Then it's a simple process to Copy the music track and End-Paste your brains out. Export the final looped track.

Koz

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Any way to get "loop-able" ADPCM track?

Post by steve » Sat Sep 24, 2011 2:05 pm

ADPCM is a really old, low quality format. Do you have to use that format?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

RoccoRolo
Posts: 4
Joined: Sat Sep 24, 2011 4:53 am
Operating System: Please select

Re: Any way to get "loop-able" ADPCM track?

Post by RoccoRolo » Sat Sep 24, 2011 5:55 pm

Hi,

No matter how much you trim, cut-and-paste, etc., once you save in the ADPCM file format, it always "corrects" the file to accommodate the block-alignment "rules," by placing some period of silence at the end. I have to figure that there are some software and/or sound-editing techniques that take care of this, because there are definitely loop-able ADPCM files out there.

As for ADPCM being old and outdated, I have to agree, but that's what I am forced to deal with for a particular application.

I'll be honest, although I am an (at this point amateur) musician, in this instance I am using Audacity for the rather mundane task of modding a computer video game, and am trying to add better home-made sound effects. The game will only process waves of the MS ADPCM variety. Anything else and you get silence. The tracks sound surprisingly good in-game, low bit-rate and all -- except for the horrendous "hiccup" every time the track loops around. (Like I said, you can trim and cut and "truncate silence" and rinse and repeat, but as soon as you save as ADPCM, the silence is reinstated at the end.)

Any hope?

RoccoRolo
Posts: 4
Joined: Sat Sep 24, 2011 4:53 am
Operating System: Please select

Re: Any way to get "loop-able" ADPCM track?

Post by RoccoRolo » Sat Sep 24, 2011 8:36 pm

Hi again,

Never mind, I discovered a solution using another sound-editing program, which saves 4-bit ADPCM's cleanly after editing. I will refrain from posting its full name here as I assume it's rival software -- but in case anybody wishes a hint, its name begins with a "W" and it's adware.

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Any way to get "loop-able" ADPCM track?

Post by Gale Andrews » Sun Sep 25, 2011 12:59 am

You can certainly mention the name of other software (without giving links) if it provides a solution that Audacity can't. Is it Wavepad? Is its solution that it is automatically truncating the file on export so that it's the correct length for the sample blocksize (and thereby cutting off some intended audio)?

The only "solution" in Audacity I can see is to choose "Raw" Header and VOX ADPCM encoding (which I doubt your software accepts as the files won't be WAV headered); or export your loop, reimport it then use that length including the extra silence at the end to work with. If you export WAV/MS ADPCM at that exact length, there will be no added silence. At 44100 Hz it looks like the MS ADPCM blocksize is 4084 samples.



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

RoccoRolo
Posts: 4
Joined: Sat Sep 24, 2011 4:53 am
Operating System: Please select

Re: Any way to get "loop-able" ADPCM track?

Post by RoccoRolo » Sun Sep 25, 2011 10:52 pm

Hi,

Thanks for the reply and for encouraging open exchange. It is WavePad. As for actually chopping off intended audio, that's an excellent question. I hadn't noticed anything just by ear.

With this question in mind I ran a very simple and obvious test. What I did was, I took an original sample (it's a pretty small sample, only around 33 KB) that had been in 4-bit ADPCM wave format. I then opened it in WavePad and applied an amplification effect (around +20 percent). I then saved it as a separate file as a 4-bit ADPCM wave. I then imported the original sample (not the WavePad version, but the same "baseline" original) in Audacity and applied a similar amplification effect (around +2 decibels -- the WavePad effect adjuster was showing percentage and the one in Audacity was in db, shouldn't make any difference for this purpose -- although the amplitudes of the two modified waves are a little different as you can see). Then, I imported all three into Audacity and zoomed really close to the end of the waveforms.

From this indicator it does not appear WavePad is removing any of the track, but Audacity always tags that silence at the end.

Here are the results:

Image

Locked