-
Notifications
You must be signed in to change notification settings - Fork 1
/
example2.rb
64 lines (53 loc) · 1.14 KB
/
example2.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
##| use_synth :tb303
four_notes = (ring :C, :G, :A, :F)
##| 4.times do
##| play four_notes.tick
##| sleep 0.5
##| end
##| 4.times do
##| play four_notes.tick, release: 0.1
##| sleep 0.5
##| end
##| use_random_seed 300
##| 4.times do
##| play four_notes.choose
##| sleep 0.5
##| end
##| use_random_seed 400
##| 4.times do
##| play four_notes.choose
##| sleep 0.5
##| end
##| 4.times do
##| sample :ambi_piano
##| sleep 0.5
##| end
##| 4.times do
##| rates = [0.9, 2.1, 3.4, 4]
##| sample :ambi_piano, rate: rates.tick
##| sleep 0.5
##| end
##| 4.times do
##| pans = [-1, 1, 0, 0]
##| play four_notes[0], pan:pans.tick
##| sleep 0.5
##| end
##| use_random_seed 2
##| 4.times do
##| play rrand_i(60,72)
##| sleep 0.5
##| end
##| 10.times do
##| sample :perc_bell, rate:rrand(0.125,1.8)
##| sleep rrand(0.1,1.2)
##| end
##| play hz_to_midi(200)
effects = [:bitcrusher, :slicer, :echo, :whammy,:tremolo, :ping_pong, :krush, :distortion]
effects.length.times do
with_fx effects.tick do
4.times do
play four_notes.tick
sleep 0.50
end
end
end