«mission 8» by grirgz

on 26 Sep'11 19:25 in

This is one of the first piece of code I written when i began to learn SC (precisely, the piece number 8)

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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
(
SynthDef("piou", {
	arg out=0, amp=1, sustain=0.5;
	var ou;
	ou = SinOsc.ar(
		XLine.kr(500, 50, sustain)*SinOsc.kr(9)+1,
		XLine.kr(000, 10, sustain)
	) * EnvGen.kr(Env.linen(0.1,0.5,0.1), timeScale:sustain, doneAction:2);
	Out.ar(out, ou * amp)
}).store;
 
SynthDef("fm1", {
	arg out=0, amp=1, sustain=0.5, freq=440, modf=9;
	var ou;
	ou = SinOsc.ar( SinOsc.kr(modf)+1*freq)
	* EnvGen.kr(Env.linen(0.1,0.5,0.1), timeScale:sustain, doneAction:2);
	Out.ar(out, ou * amp)
}).store;
 
SynthDef("fm2", {
	var out=0, amp=1, sustain=0.5, freq=500, modf=200, modbpf=900;
	var ou;
	ou = SinOsc.ar( SinOsc.kr(modf)+1*freq)
	* EnvGen.kr(Env.linen(0.1,0.5,0.1), timeScale:sustain, doneAction:2);
	ou = BPF.ar(ou, SinOsc.kr(SinOsc.kr(1)+1*900)+1*freq);
}).store;
 
SynthDef("shh", {
	arg out=0, amp=1, sustain=0.5, freq=440, modf=9, noise=0.5;
	var ou;
	ou = WhiteNoise.ar(noise);
	ou = LPF.ar(ou, SinOsc.kr(modf)+1*freq)
	* EnvGen.kr(Env.perc(0.001,sustain), doneAction:2);
	Out.ar(out, ou * amp)
}).store;
SynthDef("kickTrig1", { arg levK=1, t_trig=0, sustain=0.125, f1=36.7, f2=73.4, amp=1, out=0;
	var kEnv, ou;
	var kickEnv;
	kickEnv = Env.linen(0.001, 1.9, 0.099, 1);
	kEnv=EnvGen.ar(kickEnv,1, doneAction:2, timeScale: sustain, levelScale: levK);
	ou =Pan2.ar(Decay2.kr(t_trig, 0.005, 0.45, 
	FSinOsc.ar(f1, 0.4)+FSinOsc.ar(f2, 0.2)),0);
 
	Out.ar(out, ou * kEnv * amp);
}).store;
SynthDef("snTrig1", { arg levSn=1, t_trig=0, sustain=0.125, panPos=0, amp=1,
	out=0;
	var snEnv, ou;
	var snareEnv;
	snareEnv = Env.linen(0.001, 1.9, 0.099, 1);
	snEnv=EnvGen.ar(snareEnv,1, doneAction:2, timeScale: sustain, levelScale: levSn);
	ou =Pan2.ar(Decay2.kr(t_trig, 0.005, 0.25, FSinOsc.ar(38.midicps, 0.3)+ 		BrownNoise.ar(0.4)),panPos);
 
	Out.ar(out, ou*snEnv * amp);
}).store;
)
 

(
TempoClock.default.tempo = 2;

~piou2 = Pbind(
	//\freq, Pseq([600*Pseg(Pseq([0.2,1.0],inf),Pseq([9.5],inf))],inf),
	\freq, Pstutter(4,Pseq([1,2,4,6,2,8],inf))*0200,
	\modf, Pstutter(4*2,Pseq([1,2,3,4,5,6],inf)),
 
	\amp, Pseq([
		Pn(0,8),
		Pseq([
			Pn(Pseq([1,0]),3),
			Pn(1,6),
			Pseq([1,0,1,1,0]),
		],inf)
	],inf)*0.4,
	//\dur, Ptrace(PdurStutter(Pseq([7,2],inf),Pseq([4,0.5],inf))),
	\dur, Pseq([Pn(4,8)],inf),
	//\legato, Pseq([Pseg(Pseq([0.2,1.0],inf),Pseq([9.5],inf))],inf),
	\sustain, Pseq([Pn(1.5,16),Pn(0.75,8),Pn(3.8,4)],inf),
	\instrument, "fm1"
);
~bass1 = Pbind(
	\octave, Pseq([4],inf),
	\degree, Pseq([
		Pseq([0,1],4*(16+8)),
		Pseq([0,1,5,9],2*16),
	],inf),
	\modf, Pstutter(4*4,Pseq([4,5,6]+2,inf))*10,
	\scale, [0,3,5,6,7,10],
 
	\amp, Pseq([
		Pseq([0,0,0,0,0,0,0,0],4),
		Pseq([1,0,0,0,1,0,0,0],6),
		Pseq([
			Pseq([1,1,1,1,1,1,1,1],6),
			Pseq([1,0,0,1,1,0,0,1],2),
			Pseq([1,0,1,0,1,0,1,0],2),
			Pseq([0,0,0,0,0,0,0,0],1),
		],inf)
	],inf)*0.6,
	\dur, Pseq([Pn(0.5,8)],inf),
	\sustain, Pseq([Pn(0.5,16+8),Pn(0.28,32)],inf),
	\instrument, "fm1"
);
~hihat = Pbind(
	\noise, 5,
	\freq, Pseq([100,210,300],inf)+100,
	\modf, Pstutter(4*4,Pseq([0.1,7,2,3,4,5,6],inf)),
	\amp, Pseq([
		Pseq([0,0,0,0,0,0,0,0],1),
		Pseq([0,0,1,0,0,0,1,0],1),
		Pseq([1,0,1,0,1,0,1,0],1),
	],inf)*0.8,
	\dur, Pseq([Pn(0.5/2,8)],inf),
	\sustain, Pseq([Pn(0.1,8*8),Pn(0.6,8),Pn(0.1,8*8),Pn(0.8,8)],inf),
	\instrument, "shh"
);
~kick = Pbind(
	\dur, 0.5/2,
	\levK, 5,
	\amp, Pseq([
		Pseq([
			Pseq([1,0,1,0,1,0,1,0],1),
			Pseq([1,0,0,0,0,0,0,0],1),
		],2),
		Pseq([
			Pseq([1,0,1,0,1,0,1,0],8),
			Pseq([1,1,1,1,0,0,0,0],1),
			Pseq([1,0,1,0,1,0,1,0],8),
			Pseq([1,0,0,0,0,0,0,0],1),
		],inf)
	],inf)*0.8,
	\instrument, "kickTrig1"
);
~snare = Pbind(
	\dur, 0.5/2,
	\levSn, 5,
	\amp, Pseq([
		Pseq([0,0,0,0,1,0,0,0],8),
		Pseq([0,0,0,0,1,0,1,0],1),
	],inf)*0.8,
	\instrument, "snTrig1"
);

Ppar([ ~bass1, ~kick, ~snare, ~hihat, ~piou2 ]).play;

)
descendants
«CenUncole» by anonymous (private)
«oneminoavaisy» by anonymous (private)
full graph
raw 3875 chars (focus & ctrl+a+c to copy)
reception
comments
chanof user 17 Jun'15 14:33

Where i can find the others seven before? thanks

grirgz user 19 Jun'15 13:39

I'm sorry, I can't find them anymore. But the others ones was a lot worst that this one, or was broken, or needed samples that I don't have anymore. I'm glad that you apreciate it and ask for more, this motivate me to share more code, thanks =)