STK Opcodes

[Note] Note

These opcodes are an optional component of Csound5. You can check if they are installed by using the command 'csound -z' which lists all available opcodes.

The STK opcodes can be built in several ways. If you are already building Csound, simply follow the directions at the top of the Opcodes/stk/stkOpcodes.cpp file.

If you do not wish to build all of Csound, you can still build the STK opcodes as an opcode plugin (shared library). You can adapt the example from the Csound GIT repository in the pluginSDK directory. Replace the pluginSDK/examplePlugin.c file with the opcodes/stk/stkOpcodes.cpp file, and change the name of this file in the SConstruct build file. Then use scons to build the opcodes. Be sure to use the scons command-line option useDouble=0 if you have single-precision (32 bit) Csound, and useDouble=1 if you have double-precision (64 bit) Csound.

You must also either add all the STK source code files and include path to the SConstruct file, or you must add a prebuilt STK library and include path to the SConstruct file. The STK source files would go near line 296 in the SConstruct file:

makePlugin(pluginEnvironment, 'stkOpcodes', Split('''
    ... STK source files ...

The STK family of opcodes wraps:

For more information about the STK opcodes, visit The Synthesis ToolKit in C++ (STK) web site at


This implementation of the STK unit generators was written by Perry R. Cook and Gary P. Scavone.

The opcodes were further adapted as a plugin for Csound 5 by Michael Gogins.