Last Thursday I gave a talk on embedding python as an audio scripting application at the San Francisco Public Library for the PyGameSF meet-up.
It had been a while since I’d put anything up in the community on this topic, as I’ve sort of sat down as an ambitious developer after getting totally burnt out in the music industry. But, I was reminded of how much interest there is surrounding this stuff when the attendees excitedly tossed a multitude of quality questions out as I spoke.
While the technical details of the Play engine are protected under NDA, I have posted the slides from my talk here:
The two most important points of interest from the talk were taken directly from my experience embedding Python in a commercial audio thread:
1) PyEval_EvalFrame takes up 0.4% of our audio thread’s CPU time when executing some control-rate callbacks with some rather simple looping and app logic. That’s a REALLY BIG DEAL. It means that CPython is very fast at executing the language sytax.
I mentioned that I was almost done porting our engine to use a separate python process per audio thread in order to get around the GIL. I can’t wait to write up the details of the implementation, as I think we all need to start thinking about multiple processes as a way of life.