-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path2021-09-16-wih-comments.scd
90 lines (78 loc) · 1.91 KB
/
2021-09-16-wih-comments.scd
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
(
Pdef(0,
Pbind(*[
type: \cln,
snd: \saw,
scale: Pdup(99, Pseq([
Scale.harmonicMinor.tuning_(Tuning.wcSJ),
Scale.minor.tuning_(Tuning.sept1),
Scale.melodicMinor.tuning_(Tuning.mean4),
], inf)),
degree: Plprand(0, 7), // Lowpassed random, bottom values more likely
octave: Plprand(3, 6),
dur: 1 / Pwhite(5, 11),
pan: Pmeanrand(0.0, 1.0), // Mean values more likely (the values in the middle)
amp: Pexprand(0.5, 1.0), // Exponential random, can not handle zero (0)
lpf: Plprand(20, 20000),
rel: 20,
legato: 20,
])
).play
)
(
Pdef(0,
Pseed(1, // Change the seed to get a new infinity of random values.
Pbind(*[
type: \cln,
snd: \saw,
freq: Plprand(100, 1000).round(50), // Round to nearest multiple of 50
//freq: [100, 300, 400, 700] * Pwhite(1, 5) / 2,
dur: 1 / Pwhite(5, 11),
lpf: Plprand(20, 20000),
pan: 0,
amp: Pexprand(0.5, 1.0),
rel: 20,
legato: 20,
])
)
).play;
Pdef(1, // same seed as above, so same as above.
Pseed(1,
Pbind(*[
type: \cln,
snd: \dfd,
freq: Plprand(100, 1000).round(50),
//freq: [100, 300, 400, 700] * Pwhite(1, 5) / 2,
dur: 1 / Pwhite(5, 11),
lpf: Plprand(20, 20000),
pan: Pmeanrand(0.0, 1.0),
amp: Pexprand(0.5, 1.0),
rel: 20,
legato: 20,
stretch: Pseed(0, Prand([1, 1.01], inf)), // This line has it's own seed
]) // This was necessary or else the amount of choices would not have been the same
) // between Pdef(0) and Pdef(1) and they would have sounded nothing alike.
).play
)
// Read more about Pseed in the docs: http://doc.sccode.org/Classes/Pseed.html
(
Pdef(1,
Pseed(1,
Pbind(*[
type: \cln,
snd: \dfd,
freq: Pwhite(100, 200).round(25),
amp: 1,
rel: 20,
legato: 20,
stretch: Pseed(0, Prand([1, 1.01], inf)),
])
)
).play
)
// So many scales!
Scale.directory
// And many tunings also!
Tuning.directory
// The possibilities are astounding!
// Mix and match to your heart's content!