«Subtractive Synthesis Demo with QuNeo - Patch 2» by Bruno Ruviaro

on 23 Sep'13 00:10 in patternssubtractive synthesisquneowhite noise

Each QuNeo pad activates a differnt pattern of "notes" made of filtered white noise.

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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
// ************************************
// Subtractive Synthesis Demo (QuNeo)
// Patch 2 - Patterns of Filtered Noise
// Bruno Ruviaro, 2013-07-26
// ************************************

/*

Each pad activates a differnt pattern of "notes" made of filtered white noise.

*/


s.waitForBoot({

	var padsArray, patternArray, quneoChannel;

	padsArray = Array.newClear(16);
	patternArray = Array.newClear(16);
	quneoChannel = 11;

	// MIDIIn.connectAll;

	MIDIdef.freeAll;

	patternArray[0] = Pbind(
		\instrument, "noise-quneo-2",
		\freq, Pwhite(100, 5500),
		\pulseFreq, Pwhite(5, 10),
		\dur, 0.3,
		\amp, Pwhite(0.1, 0.5),
		\rq, Pwhite(0.001, 0.05));

	patternArray[1] = Pbind(
		\instrument, "noise-quneo-2",
		\degree, Pseq([0,3,5,7,9,11,14,17], inf),
		\pulseFreq, Pwhite(1, 4),
		\dur, 0.3,
		\amp, 1,
		\rq, 0.01);

	patternArray[2] = Pbind(
		\instrument, "noise-quneo-2",
		\degree, Prand([0,3,5,7,9,11,14,17], inf) - 12,
		\pulseFreq, Pwhite(1, 9),
		\dur, 0.3,
		\sustain, 0.1,
		\amp, 1,
		\rq, 0.1);

	patternArray[3] = Pbind(
		\instrument, "noise-quneo-2",
		\degree, Pxrand([0,3,5,7,9,11,14,17], inf) + 12,
		\pulseFreq, Pwhite(1, 9),
		\dur, Pseq([0.2, 0.3, 0.2, 0.4], inf) * Pwhite(2, 4),
		\sustain, 0.6,
		\amp, Pwhite(0.05, 0.2),
		\rq, Prand([0.05, 0.1], inf));

	patternArray[4] = Pbind(
		\instrument, "noise-quneo-2",
		\scale, Scale.phrygian,
		\degree, Pseq([0,3,5,7,9,11,14,17], inf),
		\pulseFreq, Pwhite(3, 6),
		\dur, 0.3,
		\amp, 0.5,
		\rq, Pwhite(0.005, 0.01));

	patternArray[5] = Pbind(
		\instrument, "noise-quneo-2",
		\scale, Scale.phrygian,
		\degree, Pseq([0,3,5,7,9,11,14,17], inf) + Pwrand([0, 1], [0.9, 0.1], inf),
		\pulseFreq, Pwhite(3, 9),
		\dur, Pseq([Pseq(0.33!8, 2), Pseq([0.1], 1)], inf),
		\amp, Pwhite(0.3, 1),
		\rq, Pwhite(0.005, 0.01));

	patternArray[6] = Pbind(
		\instrument, "noise-quneo-2",
		\scale, Scale.phrygian,
		\degree, Pseq([0,3,5,7,9,11,14,17], inf) + Pwrand([0, 1], [0.9, 0.1], inf),
		\pulseFreq, 0.5,
		\dur, Pseq( (0.1!60) ++ (0.2!8)   , inf),
		\amp, 1,
		\rq, Pwrand([0.005, 0.01], [0.95, 0.05], inf));

	patternArray[7] = Pbind(
		\instrument, "noise-quneo-2",
		\freq, Pwhite(1000, 9500),
		\pulseFreq, Pwhite(5, 10),
		\dur, 0.3,
		\amp, Pwhite(0.1, 0.2),
		\rq, Pwhite(0.001, 0.05));

	patternArray[8] = Pbind(
		\instrument, "noise-quneo-2",
		\degree, Pshuf([4,3,5,7,9,11,14,17], inf),
		\pulseFreq, Pwhite(1, 9),
		\dur, 0.3,
		\amp, Pwhite(0.4, 0.5),
		\rq, 0.01);

	patternArray[9] = Pbind(
		\instrument, "noise-quneo-2",
		\note, Prand([0,3,5,7,9,11,14,17], inf),
		\pulseFreq, Pwhite(1, 9),
		\dur, 0.3,
		\sustain, 0.1,
		\amp, 0.1,
		\rq, 0.1);

	patternArray[10] = Pbind(
		\instrument, "noise-quneo-2",
		\degree, Pxrand([0,3,5,7,9,11,14,17], inf) - 12,
		\pulseFreq, Pwhite(1, 9),
		\dur, Pseq([0.2, 0.1, 0.2, 0.4], inf) * Pwhite(1, 4),
		\sustain, 0.2,
		\amp, Pwhite(0.3, 0.6),
		\rq, Prand([0.05, 0.1], inf));

	patternArray[11] = Pbind(
		\instrument, "noise-quneo-2",
		\scale, Scale.phrygian,
		\degree, Pseq([0,5,9,3,7,11], inf),
		\pulseFreq, Pwhite(5, 11),
		\dur, 0.3,
		\amp, 1,
		\rq, Pwhite(0.005, 0.01));

	patternArray[12] = Pbind(
		\instrument, "noise-quneo-2",
		\scale, Scale.phrygian,
		\degree, Pseq([0,3,5,7,9,11,14,17], inf) + Pwrand([0, 12], [0.5, 0.5], inf),
		\pulseFreq, Pwhite(1, 12),
		\dur, 0.43,
		\amp, 0.6,
		\rq, Pwhite(0.005, 0.01));

	patternArray[13] = Pbind(
		\instrument, "noise-quneo-2",
		\scale, Scale.locrian,
		\degree, Pseq([7,8,6,5,4,3,2,1,0,4], inf) + Pwrand([0, 1], [0.9, 0.1], inf),
		\pulseFreq, 0.5,
		\dur, Pseq( (0.1!10) ++ (0.2!8)   , inf),
		\amp, 0.6,
		\rq, Pwrand([0.005, 0.01], [0.95, 0.05], inf));

	patternArray[14] = Pbind(
		\instrument, "noise-quneo-2",
		\degree, Pxrand([1,3,4,7], inf) + 24,
		\pulseFreq, Pwhite(1, 9),
		\dur, Pseq([0.2, 0.3, 0.1, 0.4], inf) * Pwhite(2, 4),
		\sustain, 0.6,
		\amp, Pwhite(0.01, 0.13),
		\rq, Prand([0.05, 0.1], inf));

	patternArray[15] = Pbind(
		\instrument, "noise-quneo-2",
		\scale, Scale.mixolydian,
		\degree, Pseq([0,7,5,3,9,11,0], inf),
		\pulseFreq, Pwhite(1, 9),
		\dur, 0.1,
		\amp, 0.3,
		\rq, Pwhite(0.001, 0.05));

	MIDIdef.noteOn(
		key: \noteOn,
		func: {arg vel, note;
			var padNumber = note - 36; // starting from 0
			// var padNote = padNumber + 60; // middle C for first pad
			padsArray[padNumber] = patternArray[padNumber].play;
				padNumber.postln;
		},
		noteNum: (36..51),
		chan: quneoChannel);

	MIDIdef.noteOff(
		key: \noteOff,
		func: {arg vel, note;
			var padNumber = note - 36;
			padsArray[padNumber].stop},
		noteNum: (36..51),
		chan: quneoChannel);

SynthDef("noise-quneo-2", {arg freq = 1000, pulseFreq = 10, amp = 0.1, rq = 0.001, att = 0.01, dec = 0.3, sus = 1, rel = 1, gate = 1;
	var snd, env;
	env = EnvGen.kr(Env.adsr(att, dec, sus, rel), gate: gate, doneAction: 2);
	snd = BPF.ar(WhiteNoise.ar(Impulse.ar(pulseFreq)), freq, Lag.kr(rq, 1));
	snd = snd * env * Lag.kr(amp, 1) * 100;
	snd = Clip.ar(snd, -0.5, 0.5);
	Out.ar(0, [snd, snd]);
	}).add;
});
raw 5190 chars (focus & ctrl+a+c to copy)
reception
comments