«Melody» by unknown

on 03 Oct'16 03:41 in
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
147
148
149
150
151
152
153
154
(
SynthDef(\kick, {
    |out = 0, pan = 0, amp = 0.3|
    var body, bodyFreq, bodyAmp;
    var pop, popFreq, popAmp;
    var click, clickAmp;
    var snd;

    bodyFreq = EnvGen.ar(Env([261, 120, 51], [0.035, 0.08], curve: \exp));
    bodyAmp = EnvGen.ar(Env.linen(0.005, 0.1, 0.3), doneAction: 2);
    body = SinOsc.ar(bodyFreq) * bodyAmp;
    popFreq = XLine.kr(750, 261, 0.02);
    popAmp = EnvGen.ar(Env.linen(0.001, 0.02, 0.001)) * 0.15;
    pop = SinOsc.ar(popFreq) * popAmp;
    clickAmp = EnvGen.ar(Env.perc(0.001, 0.01)) * 0.15;
    click = LPF.ar(Formant.ar(910, 4760, 2110), 3140) * clickAmp;

    snd = body + pop + click;
    snd = snd.tanh;

    Out.ar(out, Pan2.ar(snd, pan, amp));
}).add;
)

(
SynthDef(\hihat, {
    |out = 0, pan = 0, amp = 0.3|
    var click, clickAmp;
    var noise, noiseAmp;
    var snd;

    noiseAmp = EnvGen.ar(Env.perc(0.001, 0.3, curve: -8), doneAction: 2);
    noise = Mix(BPF.ar(ClipNoise.ar, [4010, 4151], [0.15, 0.56], [1.0, 0.6])) * 0.7 * noiseAmp;

    snd = noise;

    Out.ar(out, Pan2.ar(snd, pan, amp));
}).add;
)

(
SynthDef(\snare, {
    |out = 0, pan = 0, amp = 0.3|
    var pop, popAmp, popFreq;
    var noise, noiseAmp;
    var snd;

    popFreq = EnvGen.ar(Env([3261, 410, 160], [0.005, 0.01], curve: \exp));
    popAmp = EnvGen.ar(Env.perc(0.001, 0.11)) * 0.7;
    pop = SinOsc.ar(popFreq) * popAmp;
    noiseAmp = EnvGen.ar(Env.perc(0.001, 0.15), doneAction: 2);
    noise = BPF.ar(WhiteNoise.ar, 810, 1.6) * noiseAmp;

    snd = (pop + noise) * 1.3;

    Out.ar(out, Pan2.ar(snd, pan, amp));
}).add;
)

(
SynthDef("nespulse2", {arg att = 0.001, sus = 0.1, rel = 0.03, vibspeed = 0, vibdepth = 0, benddepth = 0, freq = 440, benddur = 0.1, wdt = 0.5, amp = 0.3, gate = 1;
	var env, vib, freqbend, snd;
	env = Env.adsr(att, 0, 1, rel).kr(doneAction: 2, gate: gate);
	vib = SinOsc.kr(freq: vibspeed, mul: vibdepth);
	freqbend = Line.kr(freq - benddepth, freq, benddur);
	snd = LFPulse.ar(freqbend + vib, 0, wdt, env * amp)!2;
	Out.ar(0, snd );
}).add;
)

//play here

(

{

t = TempoClock(128/60);
	
Pbind(
	\instrument, \kick,
	\freq, 60,
	\dur, Pseq([2, 2, 2, 2, 1, 1, 1, 1, 0.5, 0.5, 0.5, 0.5, 0.25, 0.25, 0.25, 0.25, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.0625, 0.0625, 0.0625, 0.0625, 0.0625, 0.0625, 0.0625, 0.0625]),
	\legato, 0.25,
	\amp, 0.6
).play(t);

	7.75.wait;

Pbind(
	\instrument, \snare,
	\degree, 0,
	\dur, Pseq([ 1]),
	\legato, 0.25,
	\amp, 1,
).play(t);

	Pbind(
	\instrument, \snare,
	\degree, 0,
	\dur, 2,
	\legato, 0.2,
	\amp, 0.60
).play(t);

Pbind(
	\instrument, \kick,
	\freq, 60,
	\dur, 1,
	\legato, 0.25,
	\amp, 0.50
).play(t);

Pbind(
	\instrument, \kick,
	\freq, 40,
	\dur, 1,
	\legato, 0.25,
	\amp, 0.50
).play(t);

Pbind(
	\instrument, \hihat,
	\degree, 0,
	\dur, 0.25,
	\legato, 0.1,
	\amp, 0.25
).play(t);

Pbind(
	\instrument, "nespulse2",
	\midinote, Pseq([ 65, 65, 65, 70, 69, 69, 69, 70, 69, 67, 67, 67, 67, 65, 62, 63, 63, 65, 67], inf),
	\dur, Pseq([ 0.75, 0.75, 0.50, 0.50, 0.75, 0.75, 0.75, 0.50, 0.50, 0.75, 0.75, 0.75, 0.50, 0.50, 0.75, 0.75, 0.50, 0.50, 0.50], inf),
	\legato, 0.75,
	\amp, 0.2,
	\ctranspose, 0,
).play(t);

Pbind(
	\instrument, "nespulse2",
	\midinote, Pseq([ 65, 65, 65, 70, 69, 69, 69, 70, 69, 67, 67, 67, 67, 65, 62, 63, 63, 65, 67], inf),
	\dur, Pseq([ 0.75, 0.75, 0.50, 0.50, 0.75, 0.75, 0.75, 0.50, 0.50, 0.75, 0.75, 0.75, 0.50, 0.50, 0.75, 0.75, 0.50, 0.50, 0.50], inf),
	\legato, 0.75,
	\amp, 0.05,
	\ctranspose, -12,
).play(t);

Pbind(
	\midinote, Pseq([ [58, 62, 65], [58, 62, 65], [58, 62, 65], [58, 62, 70], [60, 65, 69], [60, 65, 69], [60, 65, 69], [60, 65, 70], [60, 65, 69], [58, 63, 67], [58, 63, 67], [58, 63, 67], [58, 63, 67], [58, 62, 65], [55, 58, 62],[55, 58, 63], [55, 58, 63], [55, 58, 65], [55, 58, 67]], inf),
	\dur, Pseq([ 0.75, 0.75, 0.50, 0.50, 0.75, 0.75, 0.75, 0.50, 0.50, 0.75, 0.75, 0.75, 0.50, 0.50, 0.75, 0.75, 0.50, 0.50, 0.50], inf),
	\legato, 0.5,
	\amp, 0.6
).play(t);
}.fork;
)
raw 4109 chars (focus & ctrl+a+c to copy)
reception
comments