«polynom» by scornaz

on 28 Jun'19 18:27 in melody
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
(
var genPolynom = { arg depart ... l;
	var function = 
	"{arg x; %% }".format(
		depart,
		l.collect({ arg v, i;
		  " + (% * ( x div: % ))".format(v, i + 1)
	    }).join
	);
	function.compile().value;
};

var un = genPolynom.(0, 1);
var deux = genPolynom.(2, 4, 1);
var trois = genPolynom.(5, 5, -1);

a = (..20).collect({ arg i;
	[un.(i), trois.(i) ] % 7
})
)

(
Pdef(\a, 
Pbind(
	\tempo, 2,
	\degree, Pseq(a).repeat,
		\octave, [3, 5],
		\amp, [2, 1] * 0.1,
		)).play
)
raw 502 chars (focus & ctrl+a+c to copy)
reception
comments
56228375 user 28 Jun'19 20:23

jazzy