-
Notifications
You must be signed in to change notification settings - Fork 0
/
composition sine.scd
65 lines (57 loc) · 1.76 KB
/
composition sine.scd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
TempoClock.default.tempo_(120/20);
s.options.numOutputBusChannels=12;
TempoClock.default.tempo_(120/20);
);
ServerOptions.inDevices.postln;
s.record(numChannels:2);
s.options.sampleRate =48000
s.options.device_("USB Sound Device");
s.options.memSize = 65536;
s.options.memSize
s.options.numInputBusChannels=0;
s.record(numChannels:6) ;
(
(
SynthDef.new(\id, {
arg dur;
var fund,b=1,x=1,bus=1; var y=1,theta,phi; var k,z,pos; var sig,env,s;
x=dur.cos; y=dur.sin; fund=220;
k=Complex(x,y).abs; theta=Complex(x,y).angle;
z=(((k)+theta))/(k);
s= Complex(k,z).abs; phi= Complex(z,k).angle;
env=EnvGen.ar(Env.perc(2,dur,1/s,[4,-4]),doneAction:2);
sig=SinOsc.ar(s*fund,mul: env);
Out.ar(0,PanAz.ar(2,sig*env,LFSaw.ar(phi*dur+s),width:2));
// Out.ar(0,PanAz.ar(4,LeakDC.ar(InFeedback.ar(0)*env),LFSaw.ar(theta),width:2));
// Out.ar(0,PanAz.ar(4,LeakDC.ar(InFeedback.ar(1)*env),LFSaw.ar(theta),width:2));
}).add;
);
(
SynthDef.new(\id1, {
arg dur;
var fund,b=1,x=1,bus=1; var y=1,theta,phi; var k,z,pos; var sig,env,s;
x=dur.cos; y=dur.sin; fund=440*3/2;
k=Complex(x,y).abs; theta=Complex(x,y).angle;
z=(((k)+theta))/(k);
s= Complex(k,z).abs; phi= Complex(z,k).angle;
env=EnvGen.ar(Env.perc(2,dur,1/s,[4,-4]),doneAction:2);
sig=SinOsc.ar(s*fund,mul: env);
Out.ar(0,PanAz.ar(2,sig*env,LFSaw.ar(phi*dur+s),width:2));
// Out.ar(0,PanAz.ar(4,LeakDC.ar(InFeedback.ar(0)*env),LFSaw.ar(theta),width:2));
// Out.ar(0,PanAz.ar(4,LeakDC.ar(InFeedback.ar(1)*env),LFSaw.ar(theta),width:2));
}).add;
)
)
Tdef(\sa).play;
Tdef(\sa).stop;
(
Tdef(\sa,
{
1.do({( Pdef(\1, Pbind(\instrument, \id,
\dur,Pseq([12,6,8,16],inf);
)).play(quant:1)); (0).yield});
1.do({( Pdef(\2, Pbind(\instrument, \id1,
\dur,Pseq([18,24,12,6],inf);
)).play(quant:1)); (0).yield});
})
)