Explicitly include a boost "windows" folder even on linux
[supercollider.git] / HelpSource / Classes / Pluck.schelp
blobe56cd9bb1cef5440133befabe537a7060589f17a
1 class:: Pluck
2 summary:: A Karplus-Strong UGen
3 categories:: UGens>Delays
5 description::
6 A Karplus-Strong UGen
8 classmethods::
9 method:: ar
11 argument:: in
12 an excitation signal.
13 argument:: trig
14 upon a negative to positive transition, the excitation signal will be fed into the delay line.
15 argument:: maxdelaytime
16 the max delay time in seconds (initializes the internal delay buffer).
17 argument:: delaytime
18 delay time in seconds.
19 argument:: decaytime
20 time for the echoes to decay by 60 decibels. Negative times emphasize odd partials.
21 argument:: coef
22 the coef of the internal OnePole filter. Values should be between -1 and +1 (larger values will be unstable... so be careful!).
24 examples::
25 code::
26 s.boot;
28 // excitation signal is WhiteNoise, triggered twice a second with varying OnePole coef
30         {Pluck.ar(WhiteNoise.ar(0.1), Impulse.kr(2), 440.reciprocal, 440.reciprocal, 10,
31                 coef:MouseX.kr(-0.999, 0.999))
32         }.play(s)
34 s.quit;
35 // a group of angry fretless mandolin players
37         {
38                 var freq, numparts;
39                 numparts = 50;
40                 freq = SinOsc.kr(Array.fill(numparts, {Rand(0.05, 0.2)}),
41                         Array.fill(numparts, {Rand(0, 1.0)})).range(1000, 3000);
42                 LeakDC.ar(
43                         Pan2.ar(
44                                 Pluck.ar(
45                                         WhiteNoise.ar(0.1).dup(numparts),
46                                         Impulse.kr(Array.fill(numparts, {Rand(10, 12)})),
47                                         100.reciprocal, freq.reciprocal, 2, Rand(0.01, 0.2), mul: 1),
48                                 Array.fill(numparts, {Rand.new(-1.0, 1.0)}))
49                         .sum
50                         );
51                 }.play(s);