Is it possible to run more than one audio thread in Elk OS? Can you assign multiple audio threads to different cores? I wanted to explore an idea of using multiple threads with different block sizes for granular synthesis. Can anyone advise on whether such an approach is possible with Elk OS or in general using Linux?
Hi Shossa3. Elk itself doesn’t have any limitation on the number of threads. Sushi can run as many audio processing threads as there are cores in the cpu. Run Sushi with the multicore option (-m) to specify how many audio threads to use (default is 1). By default, multiple tracks will be processed in parallell on different cores, so you need to split the processing on to multiple tracks to benefit from the multicore setting.
If you want to use multicore processing within a single plugin, there’s also the option of using the threadpool from the Twine library directly (which is what Sushi is using internally). Though the worker threads from twine need to synchronise their start and stop points, and need to finish within a single audio interrupt, it could prove to be difficult to use different block sizes if their workload differs a lot between them.
Gustav, thanks so much for your very helpful response. I was thinking of using some kind of “buffering up” class to be able to use block sizes that are divisible/share a common factor. So I think sharing start and stops is not an issue. I will looking into Twine as well as playing around with multiple tracks.