-
Notifications
You must be signed in to change notification settings - Fork 0
/
Techno Improvisation Snapshot.Rb
86 lines (75 loc) · 2.44 KB
/
Techno Improvisation Snapshot.Rb
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
use_bpm 70
@SAMPLES_DIR="/Users/artem/my-projects/algorave/samples/"
live_loop :chord_progression, delay: -1.0 / 32 do
chords = [chord(:a3, 'minor7', invert: 1), chord(:d3 , 'm6', invert: 1)].ring
ch = chords.tick
ch = invert_chord(ch, [1,2].choose) if one_in 4
set :chord, ch
sleep 2
end
live_loop :arpegio do
depth = [1, 2, 3, 4].ring.mirror.tick(:d)
with_fx :slicer, phase: 8, wave: 0, pulse_width: 0.75 do
with_fx :echo, phase: 0.5 + 0.125 / 2, decay: 4 do
with_fx :echo, phase: 0.125 * 3, decay: 4 do
32.times do
synth :fm, note: get[:chord].choose + 12, divisor: 2, depth: depth, release: 0.1 + rand(0.3), amp: 0.5 + rand(0.1)
sleep 0.125
end
end
end
end
end
live_loop :wawes do
with_fx :wobble, phase: 32 do
with_fx :gverb do
with_fx :echo, phase: 0.125 / 2, decay: 8 do
with_fx :panslicer, phase: 16, wave: 3, offset: rand(0.1) do
with_fx :slicer, phase: 16, wave: 3, pulse_width: 0.125 do
128.times do
synth [:cnoise, :bnoise, :bnoise, :subpulse].ring.tick, note: [:a1,:e1, :c2, :a2].choose, amp: rand(0.1), release: 1.2
sleep 0.25
end
end
end
end
end
end
end
live_loop :bass do
with_fx :reverb do
with_fx :ixi_techno, mix: 0.3 do
64.times do
i = tick
synth :subpulse, amp: 2, release: 0.8, note: get[:chord][0] - 36 if i % 4 == 2
synth :tb303, amp: 2, release: rand(0.04), note: get[:chord][0] - 36 if i % 4 == 2 or (i % 16 > 12)
sleep 0.125
end
end
end
end
live_loop :glitch1 do
with_fx :slicer do
sample :ambi_drone
sleep 8
end
end
live_loop :glitch2 do
with_fx :echo, decay: 6, phase: 0.125 do
sleep 0.125
sample :bass_drop_c, rpitch: 9, finish: 0.15, start: 0.1, rate: [-1, 1].choose
sleep 7.75 + 0.125
end
end
live_loop :drum do
8.times do
i = tick
sample :bd_tek, amp: 3, rate: 1 + rand(0.3), pan: (line -1, 1, steps: 16).tick(:p) if i % 4 == 0 and i % 32 < 24
sample :bd_tek, amp: rand(3), rate: 1 - rand(0.2) unless i % 16 < 8
sample :bd_gas, amp: 2 if i % 2 == 0
synth :dull_bell, note: :a5, amp: [2, 1].ring.tick(:b), release: 0.05 + rand(0.1) if i % 4== 2 or i % 4== 1 or (i % 16 > 10 and i % 3 ==0)
synth :cnoise, note: :a3, amp: 2, release: rand(0.1) if i % 4== 0 and i % 3 != 0
synth :bnoise, note: :a5, amp: 2, release: 0.1 if i % 8== 6
sleep 0.125
end
end