StkGlobals:
Filter:
Classes (extension) | UGens > PhysicalModels

StkGlobals : UGen : AbstractFunction : Object
ExtensionExtension

Wrapping Synthesis toolkit.
Source: StkInst.sc

Description

Wrapping of Synthesis toolkit physical model instruments https://ccrma.stanford.edu/software/stk/index.html

Class Methods

StkGlobals.ar(showWarnings, printErrors, rawfilepath)

Arguments:

showWarnings

Let Stk showWarnings, 0 for false 1 for true.

printErrors

Let Stk printErrors, 0 for false 1 for true.

rawfilepath

Tells Stk where to look for its audio files.

Inherited class methods

Instance Methods

Inherited instance methods

Examples

//a instrument that uses waveforms///////////////////
//first set rawfilepath to let Stk know where to look
{StkGlobals.ar(1,1,Platform.userExtensionDir ++"/SC3Plugins/StkInst/rawwaves")}.play;

//Define mandolin synthdef
(
SynthDef(\helpMandolin,{arg out=0,freq=220,gate=1,amp=1;
    var sig,env;
    env = EnvGen.kr(Env.asr(0,1,0.1),gate,doneAction:2);
    sig = StkInst.ar(Stk.at("Mandolin"),freq, gate, amp, 0.5)*env;
    Out.ar(out, sig.dup);
}).add;
)

//Use it.
(

Pbind(
    \instrument, \helpMandolin,
    \dur , 0.25,
    \degree, Pseq([1,5,7+3], inf),
    \amp , Pseq([0.9,0.7,0.5],inf),
).play;
)