-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathstart.orc
94 lines (71 loc) · 2.16 KB
/
start.orc
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
;; reset_clock()
start("ReverbMixer")
set_tempo(120)
set_scale("min")
;; callback instrument for csound-live-code
instr P1
hexplay("90",
"Claves", p3,
in_scale(-1, 0),
fade_in(6, 128) * ampdbfs(-12))
hexplay("8",
"BD", p3,
in_scale(-1, 0),
fade_in(5, 128) * ampdbfs(-3))
hexplay("0808080c",
"Clap", p3,
in_scale(-1, 0),
fade_in(5, 128) * ampdbfs(-12))
hexplay("2",
"CHH", p3,
in_scale(-1, 0),
fade_in(6, 128) * ampdbfs(-12))
hexplay("0200",
"Sub5", p3,
in_scale(2, 2),
fade_in(7, 128) * ampdbfs(-12))
endin
;; custom instruments
instr Up
indx = 0
istart = int(random:i(-4, 4))
irange = 12
while (indx < irange) do
schedule("Sub5", ticks(indx), ticks(1), in_scale(-1, istart + indx), ampdbfs(-12 - indx))
indx += 1
od
endin
;; temporal recursion process
instr Run
irange = 8
ibase = int(random(-irange, irange))
schedule("Sub1", 0, ticks(1), in_scale(0, ibase), ampdbfs(-12))
schedule("Sub5", 0, ticks(1), in_scale(0, xcos(phsm(4), ibase, 8)), ampdbfs(-12))
if(choose(0.3) == 1) then
schedule("Sub4", 0, ticks(1), in_scale(1, xcos(phsm(2.5), ibase, 4)), ampdbfs(-12))
endif
if(choose(0.5) == 1) then
schedule("SynBrass", 0, ticks(2), in_scale(1, ibase + rand(array(0,2,4))), ampdbfs(-12))
endif
if(choose(0.25) == 1) then
schedule("Sub1", 0, ticks(1), in_scale(0, ibase + 2), ampdbfs(-12))
endif
if(choose(0.15) == 1) then
schedule("Up", 0, 1)
endif
schedule(p1, next_beat(rand(array(1,2,4,8)) * 0.25), 1)
endin
;; starts the process, be careful not to evaluate multiple times for this example
schedule("Run", 0, 1)
;; temporal recursion process
instr Run2
if(choose(0.7) == 1) then
isd = random(-8, 8)
schedule("Sub3", 0, beats(random(6,8)), in_scale(2, isd), ampdbfs(-22))
schedule("Sub3", 0, beats(random(6,8)), in_scale(2, isd + 4), ampdbfs(-22))
endif
schedule("FM1", 0, ticks(1), in_scale(-2, rand(array(0,2,4))), ampdbfs(-18))
schedule(p1, next_beat(rand(array(1,2,4,8))), 1)
endin
;; starts the process, be careful not to evaluate multiple times for this example
schedule("Run2", 0, 1)