Is there any demo project or complete code example available for the usage of SimpleNodePlayer and MultiThreadedNodePlayer? I could only find code snippets in the Tracktion graph presentation pdf, but a fully working example that includes proper engine initialization would be useful as a reference.
Well the best example is in TracktionNodePlayer
but it does a lot of things simple use cases won’t need. It’s also used quite extensively in the Node tests inside TestProcess
but again it’s a fairly specialised use case.
Can I ask what your use case is and perhaps what aspect you’re unsure about?
The use case is a collection of effects, implemented as nodes, connected in a graph that may be rearranged runtime, while doing realtime processing from device audio input to output. My question is about the correct way to use a node player. One possible way is to call e.g. MultiThreadedNodePlayer’s preparePlay() and process() from a specialized juce::AudioProcessor, and use the JUCE framework to initialize audio. Is there a more native way to do this while using Tracktion?
No, that would be an appropriate way. Either that or directly from a juce::AudioDeviceManager callback, depends if you’re a plugin or not.
tracktion::graph
doesn’t have anything to do with the audio devices, just the graph processing so you just have to call prepare on the player and then continuously call the process
function.