«Crap jazz» by badnumbersmusic

on 26 May'17 19:49 in jazzalgorithmic

A bassline with a randomish jazz thing over the top.

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
(
w=1;h=0.5;q=0.25;e=0.125;
c = TempoClock.default;
c.tempo = 2.3;
m = (
	scale: Scale.dorian,
	chord: 0,
	scaleChord: {
		|self,voicing|
		var notes = self.chord + voicing;
		Scale(self.scale.degrees.wrapAt(notes).sort);
	},
	bar: 0,
	bb: 3
);
)

(
SynthDef(\bandpass,
	{
		|freq=200,amp=0.1,out=0,pan=0,gate=1,sawCutoff=1000,cutoffSpread=1,masterCutoff=10000,filterGain=2|
		var audio,env;
		env = EnvGen.kr(Env.perc,gate,amp,doneAction:2);
		audio = Mix.ar(
			(1..5).collect({
				|num|
				var sawFreq = freq + (freq * LFNoise1.kr(0.2,0.01));
				var saw = Saw.ar(sawFreq);
				BPF.ar(saw, sawCutoff + (sawCutoff * LFNoise1.ar(0.2,cutoffSpread)));
			})
		);
		audio = MoogFF.ar(audio,masterCutoff,filterGain);
		audio = audio.tanh * env;
		audio = Pan2.ar(audio,pan);
		Out.ar(out,audio);
	}
).add;
SynthDef(\glorious,
	{
		|freq=200,amp=0.1,out=0,pan=0,gate=1,width=0.6,ffreq=5000,res=0.5|
		var audio,env;
		env = EnvGen.kr(Env.perc,gate,amp,doneAction:2);
		audio = VarSaw.ar(freq,0,width,env);
		audio = MoogLadder.ar(audio,ffreq,res);
		audio = Pan2.ar(audio,pan);
		Out.ar(out,audio);
	}
).add;
)

(
Pdef(\structure).quant = [6 * h, 0, 0.1];
Pdef(\structure,
	Ppar([
		Pbind(
			\type,\rest,
			\list,Pseq((0..35),inf),
			\item, Pkey(\list).collect({|x|m.bar=x}),
			\dur, m.bb
		),
		Pbind(
			\type,\rest,
			\list,Pseq([0,2,0,3,0,1,0,1,3,4],inf),
			\item, Pkey(\list).collect({|x|m.chord=x}),
			\dur, Pseq([4,4,4,4,4,4,4,4,2,2]*m.bb,inf)
		)
	])
).play;
)

(
Pdef(\bandpass).quant = [6 * h, 0, 0];
Pdef(\bandpass,
	Pbind(
		\instrument, \bandpass,
		\scale, Pfunc({m.scaleChord([0,2,4])}),
		\octave, 3,
		\degree, Pswitch([
			Pseq([0,1,2]),
			Pseq([0,1,3]),
			Pseq([0,1,2,3,2,1]),
		],Pfunc({m.bar%3})),
		\dur, h,
		\sawCutoff, Pbrown(800,1400,100,inf),
		\cutoffSpread, Pbrown(1.0,1.03,0.03,inf),
		\masterCutoff, Pbrown(500,3000,200,inf),
		\amp, Pseq([0.3,0.1,0.2,0.1,0.24,0.1],inf),
		\pan,-0.2
	)
).play;
)
Pdef(\bandpass).stop;

(
Pdef(\highbandpass).quant = [6 * h, 0, 0];
Pdef(\highbandpass,
	Pbind(
		\instrument, \bandpass,
		\scale, Pfunc({m.scaleChord([0,2,4])}),
		\octave, 5,
		\base, Pfunc({m.bar%3}),
		\degree, Pseq([0,1,2,3,4,3],inf)-Pkey(\base),
		\dur, q,
		\sawCutoff, Pbrown(800,1400,100,inf),
		\cutoffSpread, 1,
		\masterCutoff, Pexprand(500,25000,inf),
		\filterGain, 3,
		\amp, 0.07,
		\pan,Pwhite(-0.8,0.03,inf)
	)
).play;
)
Pdef(\highbandpass).stop;

(
Pdef(\glorious,
	Pbind(
		\instrument, \glorious,
		\type, Pswitch([\note,\rest],Pbrown(0.0,1.3,0.1).floor),
		\scale, Pfunc({m.scaleChord([0,2,4,6])}),
		\octave, 5,
		\ctranspose, Pwrand([0,Pstutter(Pwhite(1,4),Pseq([-1]))],[0.95,0.05],inf),
		\base, Pstutter(Pwhite(1,8),Pbrown(1,4,1,inf)),
		\degree, Prand([
			Pseq([0,1,[1,2,3,4]],inf),
			Pseq([0,1,[1,2,3,4]],inf),
			Pseq([0,1,[1,2,4]],inf),
			Pseq([0,1,[1,2]],inf),
			Pseq([0,1,2,1],inf),
			Pseq([0,1,[1,2,3]],inf),
		],inf) + Pkey(\base),
		\dur, Pswitch([
			Pseq(w!3),
			Pseq(h!6),
			Pseq(q!12),
			Pseq([q,h,q],2),
			Pseq([h,q,q,h],2)
		],Pfunc({m.bar%5})),
		\amp, 0.15,
		\width, Pbrown(0.6,0.9,0.05,inf),
		\ffreq, Pbrown(1000,20000,1000,inf),
		\res,Pbrown(0,0.9,0.07,inf),
		\pan,Pbrown(0.1,0.9,0.1,inf),
		\timingOffset, Pbrown(0,1,0.1,inf).linexp(0,1,0.0001,0.1)
	)
).play;
)
Pdef(\glorious).stop;
raw 3425 chars (focus & ctrl+a+c to copy)
reception
comments