20. 5synthdef using filters controlled with Ugens

//5synthdef using filters controlled with Ugens
//1
(
SynthDef(“filt1”,
        {|freq,mul0,mul,out|
        var in1;
        in1 = RHPF.ar(LFNoise2.ar(SinOsc.kr([10,50],0,mul0,(mul0+mul0)),0.5),freq.rand+100,XLine.kr(0.01,2,10,doneAction:2),mul);
        Out.ar(out,Pan2.ar(in1))
        }
        ).send(s)
)
a=Synth(“filt1”,[freq,5000,mul0,300,mul,0.8,out,0])
.a.free

//2
AbstractFunction
(
SynthDef(“filt2”,
        {|mul,out|
                var in1;
                in1 = BRF.ar(WhiteNoise.ar(0.5),LFTri.kr(2,0,1000,2500),LFTri.kr(2,0,0.9,1),mul);
                Out.ar(out,Pan2.ar(in1))
        }
                  ).send(s)
)
a=Synth(“filt2”,[mul,0.9,out,0])
a.free
//3
(
SynthDef(“filt3”,
                {|freq,mul,rq,out |
                var in1;
                in1 = Resonz.ar(Mix.fill(5,
                                                        {Dust.ar(freq+freq.rand,mul)}*1/5),LFTri.kr(1.0.rand,0,300,650),rq,mul);
//*** rrand(0.1,1.0).round(0.01)
                //in2 = Ringz.ar(Impulse.ar(Dust.kr(freq+freq.rand,mul),0,0.5),LFTri.kr(1.0.rand,0,300,650),rq,mul);
                Out.ar(out,Pan2.ar(in1))
                }
                ).send(s)
)

a=Synth(“filt3”,[freq,1000,mul,0.9,rq,2.0.rand,out,0])
a.free

//4
(
SynthDef(“filt4”,
                {|den,freq,mul,add,min,max|
                var in1,in2;
                in1=Mix.fill(8,
                                {RLPF.ar(Saw.ar(200+2000.rand,0.2),XLine.kr(mul,add,8),0.5)}*(0.4)/8);
                in2=Array.fill(8,
                                {Resonz.ar(Dust.ar(500,den),SinOsc.kr(freq.rand,0,mul,add),exprand(min,max),0.5)}*(0.4)/8);
                Out.ar(0,Pan2.ar(in1+in2))
                }
                ).send(s)
)
//****RLPF.ar(Mix)
a=Synth(“filt4”,[den,0.4.rand,freq,exprand(0.1,1.0),mul,1000,add,2500,min,1.0,max,2.0])
a.free

//5
(
SynthDef(“filt5”,
        {|freq,mul,freq2,q|
                var in1, in2;
                in1=Array.fill(8,
                                {RHPF.ar(Crackle.ar(XLine.kr(1,2,5),mul),freq2.rand,q,0.5)}*0.5/8);
                in2=RHPF.ar(Mix.fill(8,{Saw.ar(freq+freq.rand,0.8)}*0.5/8),SinOsc.kr(2.0.rand,0,freq2,((freq2*2)+100)),LFTri.kr(0.1,0,0.3,0.6,1.3),0.9) ;
                Out.ar(0,Pan2.ar(in1,in2))
                }
                ).send(s)
)
a=Synth(“filt5”,[freq, 1500, mul, 1, freq2,exprand(1500,4000),q,exprand(0.1,2.0)])
a.free

//6

(
SynthDef(“filt6”,
        { |freq1,freq2,q,den,start,end,dur |
        var in1, in2;
        in1=Array.fill(10,
                                                {RLPF.ar(Saw.ar(Dust.kr(50,freq1,freq2),0.5),XLine.kr(start,end,dur,doneAction:2),q,0.8)}*0.5/10) ;
        in2=Array.fill(10,
                                                {Resonz.ar(WhiteNoise.ar(den),XLine.kr(start,end,dur,doneAction:2),q,0.9)}*0.8/10) ;
        Out.ar(0,Pan2.ar(in1,in2))
        }
        ).send(s)
)

a=Synth(“filt6”,[freq1,300.rand+100,freq2,500.rand+600,q,exprand(0.01,2),den,exprand(0.1,0.8),start,500,end,1000,dur,5])
a.free

//7

(
SynthDef(“filt7”,
        { |freq1,freq2,q,den,start,end,dur |
        var in1, in2;
        in1=Array.fill(10,
                        {RLPF.ar(Saw.ar(Dust.kr(50,freq1,freq2),0.5),XLine.kr(start,end,dur,doneAction:2),q,0.8)}*0.1/10) ;
        in2=Mix.fill(10,
                        {Resonz.ar(SinOsc.ar(LFNoise0.kr([20,35],400,800),0,0.5),XLine.kr(start,end,dur,doneAction:2),q,0.9)}*0.1/10) ;
        Out.ar(0,Pan2.ar(in1,in2))
        }
                 ).send(s)
)

a=Synth(“filt7”,[freq1,300.rand+100,freq2,500.rand+600,q,exprand(0.01,2),den,exprand(0.1,0.8),start,500,end,1000,dur,8])

//——————————————
http://csound.x-y.net
Ji Youn Kang,
Csound Max Community

Leave a Comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.