I’m wondering if I’m going about this the right way… I’m looking to process some buffers through filters etc. For example, I’d like to apply a LPF to a buffer as fast as the CPU can handle, not at audio rate.
- Is it possible to utilize ugens somehow (ie, send a buffer to a ugen or series of ugens and then get it back)?
- Or is the only approach to implement my own filters in sclang and iterate through the buffer on that side?
Just wanted to check before getting too far
Not sure what you mean… but maybe you want something like NRT Synthesis?
You might try the OfflineProcess quark - you can install using:
It’s a little bit beta and the way it works is somewhat fiddly (it was designed for a very specific use-case, so it probably needs some cleanup), but the documentation should explain how to use. Basically, you can do things like:
~proc = OfflineProcess();
Compander.ar(input, input, 0.5, 1, 1/10);
~proc.outputPath = "~/Desktop/output".standardizePath;
~output = Buffer.read(s, ~proc.resultFile(\compress));
Any/all processes you add using
putTrig will be rendered all at once, in a background process (as fast as the CPU can) to output files on disk. These can be written like regular SynthDefs.
Thanks for the pointers! NRT looks likely although the fact that it involves spinning up extra server instances makes me wonder if it’s the best for what I’m doing performance-wise. I’ll investigate further