Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Audio software and OpenCL

I can't help but feel there's a great opportunity here for Audio software to relieve the CPU somewhat and send DSP-type tasks to the GPU using OpenCL in Snow Leopard.

Does anyone know whether the latest Logic Pro/Express/GB will be able to use the GPU for compressors/filters/EQs/Amp sims etc?

Anyone know of any third party plug-ins prepped to take advantage of OpenCL?

Thanks,

Glyn

MacBook Pro 2.4GHz C2D, 2GB DDR3, Mac OS X (10.5.7)

Posted on Aug 26, 2009 5:24 AM

Reply
12 replies

Aug 26, 2009 7:10 AM in response to GlynC

I don't see this happening in general. OpenCL is not suitable for realtime audio, for many reasons. And most audio algorithms are not sufficiently data parallel to take advantage of OCL anyway. Native processing is also enormously fast these days, there's hardly a need for openCL in audio. What kind of advantage would you expect?

Cheers,

Jazz

Aug 30, 2009 9:59 PM in response to GlynC

For examples...

Nice to know other users are interested in audio software and OpenCL development. It is possible to process audio with CUDA or OpenCL, but software developers must write specific CUDA and/or OpenCL versions of their software. While Google searching, I found this VST plug-in I know of that supports CUDA, "Nebula 3":

http://www.acusticaudio.net/modules.php?name=Downloads&cid=86

http://www.acusticaudio.net/modules.php?name=Products&file=nebula3

**VST Plugin: Convolution Reverb on NVidia GPUs**
http://www.nilsschneider.de/cms/index.php?option=com_content&task=view&id=29&Ite mid=1

**GPUFFTW: High Performance Power-of-Two FFT Library using Graphics Processors**
http://gamma.cs.unc.edu/GPUFFTW/

**CUDA and AUDIO ACCELERATION, Is this possible? Can it be done?**
http://forums.nvidia.com/index.php?showtopic=79410

**Finally a GPU reverb**
http://www.gearslutz.com/board/new-product-alert/344436-finally-gpu-reverb.html

**Convolver plugin**
http://www.driverheaven.net/effects-dsp/84898-convolver-plugin.html

Sep 1, 2009 5:57 AM in response to GlynC

Graphics chips are not like conventional general purpose DSP chips. They are *highly specialised* for the particular graphics processing that they need to do.

Wether or not they will be able to run audio plugins depends on whether you can get the data throughput (both in and out) that audio requires, and whether plugin algorithms can be written to run on them, with the particular (specialised) resources that these chips have.

Some developers have had some (limited) success in this area, but we do not know as yet what OpenCL will or won't be able to do. Until we see real product, it's all speculation at this stage.

I'd love to be able to run audio plugins on my graphics card, but this may or may not be a practical reality. If anyone is going to do it, I would expect it in Logic first before any other DAW, simply because they have had such a head start and have Apple's resources at their disposal.

If it doesn't come (at some point) to Logic, they've probably found it isn't practical for audio processing in general.

We'll see...

Sep 1, 2009 6:20 AM in response to Priviledged Info

The convolution reverb (which is probably also hidden inside Nebula 3 after reading their description) is probably the plug-in that comes to mind, where a GPU can potentially help:

- the data set is very large (the impulse response can be several megabytes large)
- low latency is not necessary, so a latency of several hundred ms doesn't matter. It can be compensated by the host.

But most plug-ins are different: their data set is small (measured in a few samples), which makes them really inefficient for the GPU, because the transfer of audio data to the GPU and back is slow (much slower, than it would take the CPU to just do the math itself). And the reason why small data sets are used, is to keep the latency as low as possible.

On the other hand: if you follow common sense and keep the convolution reverb on a bus, the CPU load is usually not a big issue: you probably only use one, maybe two anyway. If you put the reverb into an instrument channel strip, the GPU reverb wouldn't work, because of the latency the GPU creates.

And while for playback the latency can be compensated (you could also freeze the track to have no CPU load at all), in live mode or recording the latency can not be compensated. Who want to hit a note at a keyboard or sing into a mic just to hear the result several hundred ms later?

BTW: A similar thing applies to Grand Central Dispatch, but in GC you can't predict the latency, which is really bad for anything real-time.

BTW2: A sampler is an example where a plug-in has a very very large data set. But a sampler also doesn't cost any significant CPU anyway and is often played live.

Sep 5, 2009 1:15 AM in response to Bee Jay

Graphics chips are not like conventional general purpose DSP chips. They are highly specialised for the particular graphics processing that they need to do.


While this might be true for ASICs (such as the codec chip in your mobile phone, or the chip in your USB hub), programmable DSPs and GPUs fall under another category. How is an nVidia GPU rendering video any different than a SHARC DSP rendering audio? In both cases, the application (DirectX, Scope, UAD, whatever) uploads the "program" to the hardware and runs data through it.

OpenCL opens up GPU processing for general purpose use. On most systems (including both Desktops and Laptops) OpenCL benchmark results show a 10x or greater improvement over the CPU. Granted, this is an OpenCL benchmark - so it assumes OpenCL code (which may or may not be the most optimized strategy for an audio or video developer.) However, don't rule it out just yet - any improvement in performance or capacity would be welcome by many content creators.

Sep 9, 2009 4:58 AM in response to HamNCheese

The other point to consider is the off-loading of work away from the CPU. I can only imagine that any processing transferred the GPU will be at least the same as the CPU, then that's great since it's an extra resource in the computer. Might mean that I can have extra live tracks during a headphone jam session with my band, or having to lock fewer tracks when mixing.

Audio software and OpenCL

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.