ADPCM looping

From the documentation:


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.

Depending on the value

of the SamplesPerBlock parameter of the compression preset you are

using, you may have more or less resolution with which to align the end

of the wave data and/or loop points.

If you attempt to

apply compression to a non-aligned wave, you will either get an error

or a warning, depending on whether the wave is being used in any

looping Play events.


Sound Forge doesn't seem have sample block alignment functionality, and it seems to be the industry standard.

What other programs are available that have this functionality?

Thanks!

[1285 byte] By [ReneC] at [2008-2-11]
# 1

Hi ReneC,

In more recent DirectX SDKs, the XACT GUI added support for automatically fixing loop points (or in the case of looping entire waves, fixing the length of the full wave) using both padding (for actual alignment) and a fairly sophisticated resampler (to ensure the loop region's overally duration is a multiple of the alignment) that should maintain the coherency of loop regions. Of course, if you're looping a sine wave that's 127 samples and your ADPCM is set to be 128-sample aligned, you likely will hear some pitch shifting - but that's a pretty pathological case.

As to programs that support block aligned looping, that's likely a good question to pose to the Game Audio Pro or other industry newsgroups. But as XACT does the fix-up now in tool, it's likely less necessary to hunt down a separate tool unless you notice XACT adding artifacts and such.

-Scott

ScottSelfon-MSFT at 2007-8-31 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Audio / XACT...
# 2
Hi Scott.

That's great to hear. I'm running the August DirectX release and

XACT 2.0 right now. I haven't seen this functionality mentioned

in the documentation, nor have I run across it in the program.

Does it happen automatically? Are there paramaters that I can set?

thanks!

ReneC at 2007-8-31 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Audio / XACT...
# 3

Hi Rene,
The basic loop point fix-up functionality was first added in the August DX SDK, though I believe they made some refinements (in particular a much more sophisticated resampler to replace the initial simple decimation/interpolation) that should be in the next DirectX release. Yes, it happens automatically -- where the GUI used to complain that a wave wasn't properly aligned to loop and would disallow it, it now works and fixes the loop points for you. As to parameters, you can still set the ADPCM block size, which will in turn affect how the loop points are manipulated (e.g. what boundaries they are told to land on). Loop points are read from PCM waves that use one of the standard loop chunks (I believe SMPL and WSMP) or AIFF loop chunks.

-Scott

ScottSelfon-MSFT at 2007-8-31 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Audio / XACT...