Community Forums Archive

Go Back

Subject:Audio Compression Manager for batch conversion
Posted by: roblesinge
Date:8/3/2010 5:30:43 PM

I'm trying to build a script that does a batch ACM conversion. I've been digging all over MSDN and think I have a grasp of how to use the ACM, I just can't figure out how to include it in the script. I think I need to use msacm32.dll in my project, however, Visual C# won't let me add a reference to it. Is this just a problem with VC# and the SF script compiler won't have trouble with the reference? I'd hate to have to build the script without the aid of the autocomplete functionality in VC#, but I might not have a choice, it seems.

The MSDN documentation on the audio compression manager is one of the few instances where there is absolutely no sample code available as far as a working program example goes (at least not in c#).

Any pointers on this one?

--Rob.

Subject:RE: Audio Compression Manager for batch conversion
Reply by: roblesinge
Date:8/10/2010 6:59:02 AM

I thought I'd give this a bump. At this point, I'm having to use a third-party conversion tool to access the ACM codecs. Everything I've read, leads me to believe I need to use something called P/Invoke. I'm reading up on that, but progress is slow.

I'm assuming I'll either need to use some magic in C# or pick another language to gain access to the ACM.

Rob.

Subject:RE: Audio Compression Manager for batch conversion
Reply by: ExSonyTJ
Date:8/10/2010 10:23:24 AM

What is it you are trying to do? Even if you do manage to send some data though an ACM codec, you can't put the compressed back into a filehost.

The way you use ACM compressors in Sound Forge is via the WAV renderer.
It can use ACM compressors as part of the process of saving a file. You choose a template that selects and configures a specific ACM codec, and then render a filehost with that template.

In theory, you could create templates for the WAV renderer in a script, but that isn't supported, you would have to reverse engineer the template format.

All of this sounds like a lot of work, so the question comes back to - What is it that you are trying to do here? maybe there is an easier way to do it than to talk directly to ACM codecs.

Message last edited on8/10/2010 10:25:43 AM byExSonyTJ.
Subject:RE: Audio Compression Manager for batch conversion
Reply by: roblesinge
Date:8/10/2010 11:47:59 AM

Yeah, this is confirming my suspicions. I think I've finally convinced my colleagues that the ACM is not anything special, and that SF can create all of the same files.

You see, we used to keep a copy of Cool Edit Pro around just for this conversion to ACM (PCM, 8KHz, 16bit, linear, 15kbps and CCITT, Mu-Law, 8KHz, 8bit, 7kbps). CEP had a separate file format called "ACM Waveform, .wav," which is where we would access the ACM codecs specifically. I have convinced everyone that ACM is not a format, but instead just the way Windows manages compression schemes, and that a standard PCM 8K, 16b, wav file is the same thing. I think it's the "15kbps" bit that gets everyone. I ran a side-by-side comparison, and convinced everyone that SF made the same kind of wav file.

I'm not sure about the Mu-Law since the results for them side-by-side are quite different (the ACM file sounds worse than the standard Windows PCM wav mu-law, but our clients want consistency over quality). Basically, I was just trying to mimic the way CEP allowed us access to the ACM codecs, which I can do with the dB Poweramp converter. Just not sure why SF doesn't have that access built in. Granted, the only DAW I've ever seen it in is CEP (Audition).

I guess I just haven't found a clear-cut explanation of those ACM codecs (believe me, I've read everything Microsoft has on them), and how they correlate to formats in SF.

--Rob.


Go Back