System Failure - Supercollider















un mix di 5 SinOsc pannati random e modulati da LFO sinusoidali


{
Mix.ar(
Array.fill(5, // not too many values, could crash
{Pan2.ar(
SinOsc.ar(SinOsc.ar(1/10, rrand(0, 6.0), 200, 500)),
1.0.rand)}
)
)*0.02
}.play
)


(
{
var trig, out, delay;
trig = Impulse.kr(6); // trigger rate
out = Blip.ar(
TRand.kr(48, 72, trig).midicps, // range, in midi, of pitches
TRand.kr(1, 12, trig), // range of timbre
max(0, TRand.kr(-0.5, 0.4, trig)) // amplitudes
);
out = Pan2.ar(out, TRand.kr(-1.0, 1.0, trig));
out = out*EnvGen.kr(Env.perc(0, 1), trig);
out = Mix.ar({out}.dup(6))*0.2;
delay = CombL.ar(out, 2.0, 4/6, 6);
out + delay
}.play
)


Blip            band limited impulse oscillator

Blip.ar(freq, numharm, mul, add)


TRand           triggered random number generator

TRand.kr(lo, hi, trig)
TRand.ar(lo, hi, trig)

Generates a random float value in uniform distribution from lo to hi
each time the trig signal changes from nonpositive to positive values

EnvGen              envelope generator

Inherits from: Object : AbstractFunction : UGen

Plays back break point envelopes. The envelopes are instances of the Env class. See the Env for more info. The arguments for levelScale, levelBias, and timeScale are polled when the EnvGen is triggered and remain constant for the duration of the envelope.
     
*ar(envelope, gate, levelScale, levelBias, timeScale, doneAction)
*kr(envelope, gate, levelScale, levelBias, timeScale, doneAction)


*perc(attackTime, releaseTime, peakLevel, curve)

    Creates a new envelope specification which (usually) has a percussive shape.
    attackTime - the duration of the attack portion.
    releaseTime - the duration of the release portion.
    peakLevel - the peak level of the envelope.
    curve - the curvature of the envelope.
    
        Env.perc(0.05, 1, 1, -4).test.plot;
        Env.perc(0.001, 1, 1, -4).test.plot;    // sharper attack
        Env.perc(0.001, 1, 1, -8).test.plot;    // change curvature
        Env.perc(1, 0.01, 1, 4).test.plot;  // reverse envelope




Categories: Share

Leave a Reply