-
Notifications
You must be signed in to change notification settings - Fork 24
/
Stasis
74 lines (71 loc) · 1.68 KB
/
Stasis
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
#Stasis
#Coded by Davids Fiddle
#https://youtu.be/JOEtaBEBG7M
c0 = 0
c1 = 0
c2 = 0
c3 = 0
a0 = 0
a1 = 0
a2 = 0
a3 = 0
use_real_time
root = :a3
harm = (chord root, '7sus4', num_octaves: 2)
use_synth_defaults sustain: 600, note: root, amp: 0
with_fx :reverb do
#Soft
v0 = synth :tri
v1 = synth :sine
#Hard
v2 = synth :blade
v3 = synth :fm
#Harmonic
v4 = synth :tb303
v5 = synth :tech_saws
#Chaotic
v6 = synth :growl
v7 = synth :dark_ambience
#Synth Control
live_loop :control_knobs do
key,val = sync "/midi/*/*/*/control_change"
if key == 48
a0 = val / 128.0
elsif key == 49
a1 = val / 128.0
elsif key == 50
a2 = val / 128.0
elsif key == 51
a3 = val / 128.0
elsif key == 52
c0 = val / 128.0
elsif key == 53
c1 = val / 128.0
elsif key == 54
c2 = val / 128.0
elsif key == 55
c3 = val / 128.0
end
control v0, amp: a0 * (1 - c0)
control v1, amp: a0 * c0
control v2, amp: a1 * (1 - c1)
control v3, amp: a1 * c1
control v4, amp: a2 * (1 - c2)
control v5, amp: a2 * c2
control v6, amp: a3 * (1 - c3)
control v7, amp: a3 * c3
end
live_loop :control_pads do
key,vel = sync "/midi/apc_key_25/0/1/note_on"
if key <= 40
control v0, note: harm[key / 8] if key % 8 == 0
control v1, note: harm[key / 8] if key % 8 == 1
control v2, note: harm[key / 8] if key % 8 == 2
control v3, note: harm[key / 8] if key % 8 == 3
control v4, note: harm[key / 8] if key % 8 == 4
control v5, note: harm[key / 8] if key % 8 == 5
control v6, note: harm[key / 8] if key % 8 == 6
control v7, note: harm[key / 8] if key % 8 == 7
end
end
end