Sure no worries.
beat section is below:
define :beats_section do
#in_thread(name: :beats) do
live_loop :bass_drums do
vol = rrand(0.5,1)
#amp = 0.5
amp = vol -0.5
puts ":bass_drums and vol #{vol} "
if (spread 7, 8).reverse.tick
sample :bd_haus, rate: 1, attack: 0.01, release: 0.25, amp: amp
sleep 0.5
sync
else
sample :drum_bass_hard, rate: rrand_i(1, 3), attack: 0.025, sustain: 0.5, release: 0.1, amp: amp
sleep 0.09
sample :bass_hit_c, rate: rrand_i(5, 10),attack: 0.025, sustain: 0.05, release: 1, amp: amp
sleep 0.41
end
end#rate: rrand_i(5, 10),
define :beats_section2 do
#use_bpm get(:bpm) #gets 60
with_fx :reverb, room: 0.8, mix: 0.5 do
#bpm
live_loop :drums do
# amp = 0.8
vol = rrand(0.2,1)
amp = vol -0.2
sample :drum_cymbal_closed, rate: 0.9, attack: 0.01, sustain: 0.01, release: 0.05, amp: amp
if (spread rrand_i(1, 6), 8).tick
sample :drum_cowbell, rate: [0.4, 0.8, 0.9, 1.8, 1.9].choose, attack: 0, sustain: 0, release: 0.1, amp: amp
sleep 0.125
else
sample :bd_tek, rate: [3, 5, 7].choose, attack: 0, sustain: 0, release: 0.25, amp: amp
sleep 0.25
end
puts ":drums amp #{amp} and vol #{vol} "
end
live_loop :drums2 do
use_synth :pluck
vol = rrand(0.3,1)
amp = vol -0.3
puts ":drums2 amp #{amp} and vol #{vol} "
if (spread 3, 8).tick
sample :drum_cymbal_closed, rate: [3, 4, 5].choose, attack: 0, sustain: 0, release: 0.05, amp: amp
sleep 0.25
else
sample :drum_cymbal_closed, rate: [1, 2].choose, attack: 0, sustain: 0, release: 0.08, amp: amp
sleep 0.125
end
end
live_loop :melody do
use_synth :pluck
vol = rrand(0.1,1)
amp = vol -0.1
amp = 1
puts ":melody amp #{amp} and vol #{vol} "
with_fx :echo, decay: 6 do
with_fx :lpf, cutoff: (line 40, 130, steps: 20).tick do
##| play (scale :c2, :mixolydian).choose, attack: 0.0, sustain: 0.0, release: 0.05, amp: amp + 0.5
play (scale :c3, :mixolydian).choose, attack: 0.0, sustain: 0.0, release: 0.05, amp: amp + 0
play (scale :c4, :mixolydian).choose, attack: 0.0, sustain: 0.0, release: 0.05, amp: amp + 0
##| play (scale :c6, :mixolydian).choose, attack: 0.0, sustain: 0.0, release: 0.05, amp: amp + 1.5
sync :processnote
end
end
sleep 0.125
end
live_loop :deep_saws do
use_synth :saw
vol = rrand(0.2,1)
amp = vol -0.2
release = 8
attack = rrand_i(1, release / 2)
puts ":deep_saws amp #{amp} and vol #{vol} "
notex = [:c1, :g1, :d1, :f1, :g1].tick
with_fx :lpf, cutoff: 50 do
play notex, attack: attack, sustain: 0, release: release, amp: amp
play notex + 12, attack: attack, sustain: 0, release: release, amp: amp
play notex + 12 * 2, attack: attack, sustain: 0, release: release, amp: amp
play notex + 12 * 3, attack: attack, sustain: 0, release: release, amp: amp
##| play note + 12 * 4, attack: attack, sustain: 0, release: release, amp: amp
end
sleep release
end
end
end
end