[Stk] Stk and Python

Michael Gogins Michael Gogins <gogins@pipeline.com>
Thu, 3 Nov 2005 11:04:17 -0500 (EST)


I'm the author of Silence. As you may have guessed it is currently moribund.

I have moved the algorithmic composition classes from Silence into CsoundVST, which is part of Csound 5.

I have also provided Csound 5 opcodes for most instruments and effects in the STK. I use these STK instruments in pieces.

Cound5 is scriptable in Python, but not at the DSP level, only at the operation and composing level.

I have always had an interest in a new software synthesis system. The version of Silence you reference had such a system, but instruments had to be written in C++.

I am at a very slow rate working on a new system, in which intruments will be written in either Lua or Python (I would prefer Lua for its speed and ease of embedding, but with SWIG, Python classes can inherit from C++ base classes). In any event I will use the STK for unit generators.

My belief is that if the DSP graph (the framework of the synthesizer) is written in C++ and processing is done in blocks of sample frames, then instruments can be written in Python (or Lua) wrapped STK unit generators, and it will be "fast enough" -- not as fast as Csound or SuperCollider, but fast enough to use. This belief is based partly on prior experience, and partly on a report at the last Lua conference on a Lua framework (evidently based on the STK) for writing VST effects in Lua (from Adobe, for Adobe Audition).

In other words, Python or Lua would be used to set up the DSP graph, and the movement of samples and processing at run time would largely be in C++. Only the transfer of data from unit generator to unit generator would move through Python or Lua.

Right now I am trying to get the design of the framework "just right." Once I have done that I know from my previous experience that building in the unit generators and getting the system to work is actually not very much work. But the design has to be really, really good.

Aside from the joy of being able to write instruments and compositions in an easy language, Python or Lua would bring in with them enormous libraries to vastly expand the capabilities for making music, especially in mathematics and computer graphics.

Best,
Mike