SuperCollider : ExErcices

SuperCollider :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
(
SynthDef(
  \passage,
  {
    arg freq=440, volume=2;
   
    var sin, bruit, niv, result;

    sin = SinOsc.ar(freq, 0);
    bruit = Resonz.ar(WhiteNoise.ar(20), freq, 0.01);
    niv = MouseX.kr(0,1);

    // niv = LFNoise2.kr;
 
    result = ((sin * niv) + ( bruit * (1-niv)))* volume;
    // Out.ar([0,1], result!2)
    Out.ar(0, [(sin * niv),( bruit * (1-niv))]);

}).send(s)
)
   
Synth(\passage, [\freq, 200])


  1. // la Old School

    (
    SynthDef("sinus",{|_freq,_bus| Out.ar(bus,SinOsc.ar(_freq,0,0.5));}).send(s);

    SynthDef("Noise",{|_freq,_bus| Out.ar(bus,BPF.ar(PinkNoise.ar(0.5),_freq));}).send(s);

    SynthDef("Mix",{|_in1,_in2|
                var xf,sig;
                xf = EnvGen.kr(Env.new([1, 0], [10.0]));
                sig = (In.ar(_in1)*xf)+(In.ar(_in2)*(1-xf));
                Out.ar(0,sig!2);
                }).send(s);
    )

    (
        x = Synth.new("sinus",[\_freq, 278,\_bus, 20 ]);
        y = Synth.after(x,"Noise",[\_freq, 278,\_bus,22 ]);
        z = Synth.after(y,"Mix",[\_in1, 20, \_in2, 22]);
    )

    // la JITLib

    n = ProxySpace.push(s);

    n.fadeTime_(10);

    ~out.play;

    ~out = {SinOsc.ar([278,230],0,0.5)!2;}

    ~out = {BPF.ar(PinkNoise.ar(0.5),278)!2;}

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.3
Page was generated in 0.0922 seconds