-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DSP Node Hierarchy and Parallel Rendering. #10
Comments
The problem is that there are many ways to do this. You can use native threads, green threads or a work queue. We would have to think carefully before choosing a direction. |
I wonder how much performance matters. It is usually good enough if the sound is generated in real time. |
I'm happy to spend a lot of time refining the performance on this to make it as transparent as possible - The generative music engine I'm working on currently consumes most of the cpu (normally running between 20 and 100 oscillators / sometimes more depending on the song), and it's not even doing effects processing / automation yet :/ . I can defs look into pre-rendering parts, but to get it all happening contextually responsive in real-time will take some considering |
perhaps at least it would be nice to think about audio on another thread, at least; its an easy self-contained chunk of processing where the game doesn't take results.. fire and forget, update control parameters.. audio does have its own needs with concurrency... genuinely realtime |
@dobkeratops the audio processing should be able to be easily threaded atm if you spawn your SoundStream type on it's own task and set up your own channels (we're still thinking about ways that could make this easier) but agreed, any steps in performance gain are worth considering |
Currently, the node system works as a large hierarchy. Each node holds a vector of input nodes. When
This way, the rendering of every input to a node may occur in parallel, meaning a tree of inputs like this:
could be processed in parallel across ~225 tasks. |
Closing in favour of #89 |
The DSP non-cyclical Node graph should allow us to consider rendering our audio in parallel (a task per node). This would be a great feat. in dsp if we could pull it off. There is perhaps a lot of potential for gain in performance with parallel audio, though this would require a lot of benchmarking and fiddling, and probably won't occur until after the main framework of rust-dsp is mostly complete.
The text was updated successfully, but these errors were encountered: