Python scripted generative Plugin? Looking for feedback, collaborators

I think it would be more useful if the scripting side can process audio data as well. I did a quick hack to use Lua for example to create a mixer and an echo:

You can even create your own input/output knobs and labels from within the Lua script. Needs still knobs, but then you could prototype full modules. Lua is fast enough for running in the audio thread, the echo example needs less time than a fundamental VCO module.

Python is fast enough as well, if you process the data in blocks and use fast libraries like NumPy. This will add a little bit of latency, but shouldn’t be a problem for most modules. But Python can even create audio in realtime. See this example:

It needs about 12% CPU usage on my PC for creating a FM modulated signal, without much optimization, calling the “sample” function for each sample. I guess with something like PyPy it would need much less time and might be possible to implement the “process” call even for more complex modules all in Python.

2 Likes