-
I have 4 rendering processes that I would like to run at the same time. However, when I try this with python's |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
I’m going to test this more once I update libfaust, which has been taking a while. Does your code work if the number of threads is limited to just one? Could you share an MRE to help us get started debugging? I’m also curious if it helps to use the multiprocessing module with Queues. I think there are subtle differences with the threading module. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply. I created a (not-so-minimal) MRE that I'd like to share. In this example, I'm trying to render a synthesized midi for drums and render a loop with effects for the melody asynchronously. However, the script gets stuck after only having printed "Rendering synth...".
|
Beta Was this translation helpful? Give feedback.
-
I just wanted to update you with my current workaround. Even after making changes to the source code to allow asynchronous rendering, python multithreading was just as fast as no multithreading at all. For this reason, I created a simple multithreaded render function in C++ and bound it to python. The function accepts the engines to render, as well as the corresponding durations, and renders each engine asynchronously via C++ multithreading. This worked like a charm, but I wouldn't portray it as the cleanest possible solution, to say the least. Just thought I'd let you know. |
Beta Was this translation helpful? Give feedback.
-
For those subscribed here, we now have two examples for multiprocessing synthesizers: https://github.com/DBraun/DawDreamer/tree/main/examples/multiprocessing_plugins (made for .fxp presets such as Serum) |
Beta Was this translation helpful? Give feedback.
Did the commits clear everything up @bnku? Just in case they didn't, these two commits should do the trick:
Fix for multithreaded rendering in general: psuskin@2d3aaa8
Custom multithread class implementation: psuskin@5bdb09e