I’m using the ctcsound API to control the rendering process with performKsmps(). I’m analysing every k and using the analysis to train a Pytorch model.
I would like to send the output of the ctcsound rendering to /dev/null. I basically want to achieve what –logfile=null does, but as it says in the docs, this option only works when calling Csound from the command line. Is there a way to achieve this through the ctcsound API?
I’ve tried to set sys.stdout and sys.stderr to /dev/null within a context, as suggested here. That works for pure Python code, but not for the parts that make calls to Csound.
Routing all the Python logs to /dev/null is not an option since I want to be able to log other parts of my program.