-
Notifications
You must be signed in to change notification settings - Fork 0
/
SonicPi Code?
76 lines (67 loc) · 1.38 KB
/
SonicPi Code?
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
use_bpm 30
define :basic do
play :C4, release: 0.75
sleep 0.75
play :B3, release: 0.25
sleep 0.25
play :G3, release: 0.75
sleep 0.75
play :E3, release: 0.25
sleep 0.25
play :A3, release: 0.75
sleep 0.75
play :C4, release: 0.25
sleep 0.25
play :B3, release: 1
sleep 1
end
live_loop :echo do
use_synth :saw
use_synth_defaults amp: 1.25
with_fx :lpf, cutoff: 80 do
with_fx :reverb do
basic
end
end
end
live_loop :bass do
use_synth :mod_saw
use_synth_defaults mod_range: 12, mod_phase: 0.25, mod_invert_wave: 1, amp: 1.5
with_fx :nrlpf, cutoff: 60 do
play :C2, release: 0.5, sustain: 1
sleep 1
2.times do
play :C2, release: 0.25, sustain: 0.5
sleep 0.5
end
end
end
live_loop :blah do
[2,0,1,0,1,0,1,1].each.with_index do |i|
sample :elec_blip, amp: 2 if i == 1
with_fx :slicer, phase: 0.25 do
sample :ambi_lunar_land, amp: 0.75 if i == 2
end
sleep 0.5
end
end
live_loop :bd do
[1,2,1,2,1,2,3,2].each.with_index do |i|
sample :bd_haus, lpf: 70, amp: 5 if i == 1
sample :sn_dolf, amp: 2.5 if i == 2
if i == 3
density 4 do
sample :bd_haus, lpf: 70, amp: 5
sleep 0.5
end
else
sleep 0.5
end
end
end
live_loop :hats do
[1,0,1,1].each.with_index do |i|
sample :drum_cymbal_closed, hpf: 110, amp: 2 if i == 1
sleep 0.25
end
end