SuperCollider CLASSES (extension)

DWGPlucked2
ExtensionExtension

Plucked physical model.
Inherits from: UGen : AbstractFunction : Object

Description

Digital wave guide physical model of a plucked instrument. It has two strings which are coupled by gc parameter.

Class Methods

*ar (freq: 440, amp: 0.5, gate: 1, pos: 0.14, c1: 1, c3: 30, inp: 0, release: 0.1, mistune: 1.008, mp: 0.55, gc: 0.01)

Arguments:

freq

Sound frequency.

amp

Key pulsation strenght. Betwen 0 and 1.

gate

Releases synth when value changes from >0 to 0.

pos

Relative pluck position from 0 to 1.

c1

Inverse of DC decay time.

c3

Hight frequency loss factor.

inp

Plucking signal. Could be first part of plucked sample for doing conmuted synthesis.

release

Release time in seconds.

mistune

Factor for detuning second string.

mp

Exitation mixer. 1 is only first. 0 is only second string.

gc

Coupling string factor.

Inherited class methods

Instance Methods

Inherited instance methods

Examples

//Define pluck synthdef
(
SynthDef(\help_dwgplucked, { |out=0, freq=440, amp=0.5, gate=1, c3=20, pan=0|
    var env = Env.new([0,1, 1, 0],[0.001,0.006, 0.0005],[5,-5, -8]);
    var inp = amp * LFClipNoise.ar(2000) * EnvGen.ar(env,gate);
    var son = DWGPlucked2.ar(freq, amp, gate,0.1,1,c3,inp);
    DetectSilence.ar(son, 0.001, doneAction:2);
    Out.ar(out, Pan2.ar(son * 0.1, pan));
}).add;
)

//Use it.
(
a = Scale.new(
    #[0, 1, 3, 5, 7, 8, 10],
    12,
    Tuning.new([0, 0.75, 2, 3.5, 4, 5, 6, 7, 8, 9, 10, 11]),
    "Custom"
);

Pbind(
    \instrument, \help_dwgplucked,
    \scale ,a,
    \delta , Pseq([1,0.5,0.5,0.5,0.5,0.5,0.5,1,0.5,0.5,1,1]*0.25,inf),
    \dur , 2,
    \degree, Pseq([1,8,8,8,8,8,8,-6,Prand([9,10,11],1),1,7,8]-8, inf),
    \amp , Pwhite(0.2,0.8),
    \c3 , Pseq([Pseq([1400],24),Pseq([300],24)],inf),
    \pan , Pwhite(-1,1),
).play;
)