GPU Delay - A delay plugin running on a graphics card

VST, AU, AAX, CLAP, etc. Plugin Virtual Effects Discussion
Post Reply New Topic
RELATED
PRODUCTS

Post

Thanks to your suggestions I was able to create my first CUDA gain VST plugin. It works ok.
Now I wanted to ask why isn't it possible to allocate memory on the device only once, when the plugin is initialized, instead of allocating memory each time. This would save a lot of time at each cycle.
I'm sorry but I don't think I have really undestood the "thread" matter. What do you mean by thread in this case? Could you explain briefly please?

Simon

Post

i'm hopeing 2009 will bring some interesting GPU/CUDA vst's

Nils has opened a exciting can of worms (made me go buy a GeForce 9500 :) )

8)

Post

Please answer to my previous questions...

Simon

Post

Threads can't be explained in a forum, if you ask me to explain it briefly, it sounds like you've never worked with it. You need to learn such things like multithreading and semaphores/signals first to be able to start CUDA <=> VST development.

A thread is something that runs independent of another program, think of it as you would have two main() functions main() and main2() in your program, they are executed both at the same time. main() is the first thread, main2() is the second one.

You have to put all CUDA code to be executed in exactly one thread. Because hosts call process() from another thread, you have to use signals to tell your CUDA thread that new data is available.
https://k1v.nilsschneider.de - Kawai K1 emulated as VSTi/AU
https://heatvst.com - Android Synthesizer with full VST integration
https://gpuimpulsereverb.de - Use your GPU as reverberation DSP

Post

Simon82 wrote:Thanks to your suggestions I was able to create my first CUDA gain VST plugin. It works ok.
Now I wanted to ask why isn't it possible to allocate memory on the device only once, when the plugin is initialized, instead of allocating memory each time. This would save a lot of time at each cycle.
I'm sorry but I don't think I have really undestood the "thread" matter. What do you mean by thread in this case? Could you explain briefly please?

Simon
The sequence should be something like:

- Host initialises your plugin, right away you create a win32 thread (not a trivial task if you've never done it before, so read the MSDN docs)
- When your thread starts up, do all your GPU and ring buffer memory allocations in there (do not allocate GPU memory in processReplacing or the plugin constructor)
- When you get a call to processReplacing add the samples to your ring buffer, when it's full you need to notify your thread that the data is in the ring buffer, the thread then will transfer it onto the GPU and do the GPU based processing. When the GPU has finished you can put your processed samples back into the output ring buffer and then back into the output samples of processReplacing. This requires some careful thread synchronisation work to get it working efficiently.
- At destructor time, make sure the thread isn't processing anything and then tell the thread to terminate, at which point you can deallocate all cuda and ring buffer memory

Matt

Post

Thank you very much guys, you made it much clearer now!
I'll ask you again if I have problems.

Simon

Post

Simon82 wrote:Thank you very much guys, you made it much clearer now!
I'll ask you again if I have problems.

Simon
Out of interest, what kind of plugin are you trying to do (after you've mastered the gain plugin)?

Post

I've been able to create a round pan plugin using CUDA and now I'm trying to create a delay effect. Then, if I'll find any other vst plugin that is easily modifiable in parallel, I'll try it out (maybe you could suggest me any).
The problem was that I needed to allocate memory at each process() call. Now I'll try to implement your suggestions (if I can :) ).

Thanks

Post

Simon82 wrote:I've been able to create a round pan plugin using CUDA and now I'm trying to create a delay effect. Then, if I'll find any other vst plugin that is easily modifiable in parallel, I'll try it out (maybe you could suggest me any).
The problem was that I needed to allocate memory at each process() call. Now I'll try to implement your suggestions (if I can :) ).

Thanks
Finding stuff that works well in parallel is a challenge as a lot of common audio processing tasks use algorithms where the next sample depends on a small number of the previous ones (e.g. IIR filters). Convolution reverb is an obvious candidate though.

Post

This topic really excites me - so much that I registered with KVR just to post a reply here. I love the idea of taking the load on the CPU - maybe we'll see more people producing and mixing at high resolution sample rates and depths.
Finding stuff that works well in parallel is a challenge as a lot of common audio processing tasks use algorithms where the next sample depends on a small number of the previous ones (e.g. IIR filters). Convolution reverb is an obvious candidate though.
Correct me if I'm wrong, but wouldn't granular effects and synthesis be a perfect candidates for all that parallel processing power? Granulab brings my computer to its knees when the grain density gets above 10 or so.

One more question: could these effects be easily distributed across multiple graphics processors? Could I load my PC up with a bunch of NVIDIA graphics cards and create an IR reverb super computer?

Post

Dear friends,

Does anyone have the Chorus and Delay plugin available for download? The original links are dead. Thanks!

BTW, check out this free GPU EQ, and convolution reverb: http://www.liquidsonics.com/software.htm

Regards,
-Brian

Post

Reverberate doesn't sound as good as SIR1 for some reason. The stereo image isn't quite right.

Post

:nutter:

Post

Are you referring to the full version of Reverberate?

Post

awwwww, it uses cuda instead of OpenCL :( My AMD 5770 card cant run that...

Both AMD Stream and CUDA are single platform. OpenCL instead would be nice :)

Post Reply

Return to “Effects”