GPU threads

Is it possible to have a gpu core for each key and then just use one core to sum all the buffers at the end ? A dedicated thread running for each note.

Juce itself does not support GPU based audio processing, so I am not sure what you mean? CPU threads? The Juce synthesiser class design does not support using multiple threads. You can of course make your own synthesiser class…Generally speaking, you shouldn’t probably use multiple threads in a plugin, though. The host already likely does multithreading for its own tracks and if you add your own threads, the end user experience isn’t necessarily going to be any better. Multiple threads based processing also isn’t really that suitable for low latency use cases.

And if you really mean the GPU: I’m currently doing some DSP on GPUs. Beneath the fact that you need special programing languages like OpenCL to perform computations on a GPU, it works quite differently compared to a CPU, you want to let all threads perform the same instruction synchronously but on different data, this is really totally different to writing multithreaded CPU code. And last but not least, data transfer from the memory your CPU accesses to the GPU memory and vice versa takes really long and performs allocation most of the time, making it nearly unusable from within the realtime callback…