2 summary:: Sine oscillator bank
3 related:: Classes/Klank, Classes/DynKlang
4 categories:: UGens>Generators>Deterministic
7 Klang is a bank of fixed frequency sine oscillators. Klang is more
8 efficient than creating individual oscillators but offers less
16 argument::specificationsArrayRef
17 A link::Classes/Ref:: to an link::Classes/Array:: of three Arrays:
20 ## frequencies: || An Array of filter frequencies.
21 ## amplitudes: || an Array of filter amplitudes, or nil. If nil, then amplitudes default to 1.0.
22 ## phases: || an Array of initial phases, or nil. If nil, then phases default to 0.0.
26 A scale factor multiplied by all frequencies at initialization time.
29 An offset added to all frequencies at initialization time.
32 The parameters in code::specificationsArrayRef:: can't be changed after it has been started.
33 For a modulatable but less efficient version, see link::Classes/DynKlang::.
39 play({ Klang.ar(`[ [800, 1000, 1200],[0.3, 0.3, 0.3],[pi,pi,pi]], 1, 0) * 0.4});
41 play({ Klang.ar(`[ [800, 1000, 1200], nil, nil], 1, 0) * 0.25});
43 play({ Klang.ar(`[ Array.rand(12, 600.0, 1000.0), nil, nil ], 1, 0) * 0.05 });
51 Pan2.ar(Klang.ar(`[ Array.rand(12, 200.0, 2000.0), nil, nil ], 1, 0), 1.0.rand)
52 * EnvGen.kr(Env.sine(4), 1, 0.02, doneAction: 2);