Third Party Node + Offline processing?
-
Do third party nodes when loaded into hardcoded effect slots allow offline processing via the regular dsp network calls?
If not, what's the easiest way to process an IR through a third-party node? Something like:
const myCoolThirdPartyNode = Synth.getEffect("myCoolThirdPartyNode"); // or const myCoolThirdPartyNode = Synth.getSlotFX("myCoolThirdPartyNode"); inline function offlineProcess() { local impulseSize = 1024; myCoolThirdPartyNode.prepareToPlay(44100.0, impulseSize); local buffer = Buffer.create(impulseSize); buffer[0] = 1.0; // Dirac delta local channels = [buffer, buffer]; // process through third party node somehow here // then save the modified buffers as a stereo IR file or do other processing after }
-
If by offline, you mean doing a heavy process without freezing the program / spiking cpu, you can create a new thread and run the process on that thread / chunk the process into blocks and do a chunk at a time.
-
@griffinboy Yeh I just mean running an audio file (dirac delta impulse) through a single hardcoded FX module and saving the output as a .wav (while ignoring any other incoming audio signal)
I've been doing it with a AudioLoopPlayer, MIDI Sequence and
Engine.renderAudio()
but it's a bit clunky. I could also do it inside the C++ node but that involves global cable shenanigans and potential race conditions. -
Ah right right. I think this is a question for Christoph then! However he did answer something similar very recently. And I think global cables was the answer he gave
-
a buffer can be sent via cable data or external data (and maybe received by cable data only, as I don't know if an external data is bidirectional).
This might allow offline processing -
@ustk You can generate the buffer inside the node without needing to pass anything in, the global cable would be used to pass the export filepath since C++ nodes don't support strings or file objects.
Best case scenario for me would still be using
DspNetwork.processBlock()
but I'm not sure if it works in a hardcoded FX module, I think it's a pretty old method.