Synthesis ToolKit Actor

last updated: Geoffrey Zheng and Ken Chen, December 6, 1999


STK is a set of audio signal processing C++ classes and instruments for music synthesis, developed by Perry Cook et al. over the years. For detailed description of STK, refer to its website.

The STK Actor is an interface to STK instruments from VSS. To use it, load stk.so and create an actor of type StkActor.


StkActor messages

The StkActor does not take any additional message besides those messages understood by all generator actors.

StkActor handler messages


A common message sequence to use an STK instrument is:

a = Create StkActor;
h = BeginSound a;
SetInstrument h "<instrument name>"; // or SetInstrumentNum h <instrument number>;
SetControl h <int control number>, <float control value>, <transition time>;
<Message name> h <control value>, <transition time>;
NoteOn h <frequency> <amplitude>;
NoteOff h <amplitude>;
You have to assign an instrument to a handler before you can do anything with it. Available instrument names and their corresponding numbers are:
Physical Models: Plucked 0
Bowed 1
BowedBar 2
Mandolin 3
Brass 4
Clarinet 5
Flute 6
Stochastic Event Models: Shakers 7
Modal/Formant: Marimba 8
Vibraphn 9
AgogoBel 10
VoicForm 11
FM: HeavyMtl 12
PercFlut 13
Rhodey 14
Wurley 15
TubeBell 16
BeeThree 17
FMVoices 18
Sampling: Moog1 19
DrumSynt 20

The names are kept the same as those used for STK's syntmono. All instruments can be controlled by SetControl, NoteOn, and NoteOff messages. Note that transition time may not have any effect on some controls. Each valid control number for a particular instrument corresponds to an instrument-specific message, listed in the tables afterwards. The following messages are equivalent:
 
SetInstrument h "Bowed";
SetControl h 4, 100.5, 5.3;
 
SetInstrumentNum h 1;
SetBowPosition h 100.5, 5.3;



Test Case

The usual testcase.aud and testcase.ap pair is created for all STK instruments. It has 10 presets:
 
Preset Instruments Comment
PhysMod 0 Plucked
1 Bowed
2 Brass
3 Clarinet
4 Flute
First choose a type
BowedBar BowedBar Click Init to SetInstrument
Mandolin Mandolin No place for Init, so the sound is always there
Shakers Shakers First choose a type
Modal 0 Marimba
1 Vibraphn
2 AgogoBel
First choose a type
VoicForm VoicForm Click Init to SetInstrument
FM 0 HeavyMtl 
1 PercFlut 
2 Rhodey 
3 Wurley 
4 TubeBell 
5 BeeThree
First choose a type
FMVoices FMVoices Click Init to SetInstrument
Moog1 Moog1 Click Init to SetInstrument
DrumSynt DrumSynt Click Init to SetInstrument


Changes made to STK