-
Notifications
You must be signed in to change notification settings - Fork 1
/
example9.rb
66 lines (53 loc) · 1.33 KB
/
example9.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
live_loop :metro do
use_synth :beep
play :c5, amp:0.5 # as boring as a real metronome
sleep 1
end
## 1 bar = 4 beats
live_loop :bar do
sleep 4
end
live_loop :bdrum do
sync :metro
sample :bd_ada
end
live_loop :snare do
sync :bar
sleep 2
sample :drum_snare_hard
sleep 0.5
sample :drum_snare_hard
sleep 0.5
sample :drum_cymbal_open, pan: -1, amp: 0.5
# sleep 1 #
end
live_loop :hits_hats do
sync :metro
with_fx :bpf do
sample :drum_cymbal_soft
sleep 0.5
sample :drum_cymbal_soft
sleep 0.499 # less than 0.5 !
end
end
## as the loop takes 4 beats to play
## the musician behind the propher is not free to receive from the chief "the same man"
## so this live_loop will be played only every 2 bars
live_loop :player_prophet do
##| stop
sync :bar
use_synth :prophet
with_fx :reverb do
play_pattern_timed [:c2, :C3], 2, sustain: 0.5
# this is surprenant but this is how it works.
end
end
## as the loop takes less than 4 beats to play
## the musician behind the piano is free to receive from the chief "the same man !" and play
live_loop :player_piano do
##| stop
sync :bar
use_synth :piano
play_pattern_timed [:c3, :c2, :b6, :b5+0.15,
72, 72.25,72.5, :c2-0.15], 0.25, sustain: 0.1
end