Borrowed a little code from the Aphex Twin post simply because it
sounds nice. Many thanks.
Eli…
use_bpm 120
use_random_seed 667766
set_volume! 5
$notes1 = (ring :a3, :g3,:d3, :f3, :a3, :g3,:a3, :d3, :g3, :f3, :e3)
key = scale(:a3, :minor_pentatonic, num_octaves: 5)
$sleeps1 = [0.5, 0.5, 0.5, 0.25, 0.5, 0.5, 0.5, 0.25,
0.25, 0.5, 0.25, 0.5, 0.5, 0.5, 0.25, 0.25,
0.25, 0.5, 0.25, 0.25, 0.75, 0.5, 0.25, 0.25,
0.5, 0.25, 0.25, 0.5, 0.5, 0.25, 0.5, 0.75,
0.5, 0.5, 0.25, 0.25, 0.5, 0.5, 0.25, 0.75,
0.5, 0.5, 0.5, 0.25, 0.25, 0.5, 0.5, 0.25,
0.5, 0.75, 0.5, 0.5, 0.5, 1.5, 0.25, 0.25,
0.25, 1.25, 0.5, 0.5, 1.5, 0.5, 0.5, 0.5,
0.25, 0.25, 0.5, 0.25, 0.25, 0.5].ring
sample2="C:/samples/hey yer soft h2.wav"
sample3="C:/samples/ooh yeah soft h2.wav"
this_sample = (ring sample3,:elec_chime, sample2,:elec_chime)
repeater = [8,8,10]
sleeper = [0.5, 0.25, 0.2]
set :repeating, 0
define :repeat do
set :repeating, 1
tick_reset
repeater.each do |x|
tick
x.times do
sample :bd_fat,amp: 3
sample :bd_ada,amp: 2 if x < 10
sample :bd_fat,amp: 3
sample :bd_ada,amp: 3 if x < 10
sample :sn_dolf, sustain: 0, release: 0.08, hpf: 80,amp: 1
sleep sleeper.look
end
end
with_fx :reverb do
with_fx :flanger do
sleep 0.5
this_sample = [sample3, sample2, :elec_chime].choose
sample this_sample, amp: 1
sleep sample_duration this_sample
sleep 0.5
end
end
set :repeating, 0
end
live_loop :beats do
sleep 1
end
live_loop :bar do
sync :beats
sleep 4
end
with_fx :level,amp: 1 do |v|
live_loop :tune, sync: :bar do
mute = get :repeating
if mute == 0 then
use_synth [:supersaw, :blade, :fm].choose
if rand < 0.65 then
$notes1 = (ring :a3, :g3,:d3, :f3, :a3, :g3,:a3, :d3, :g3, :f3, :e3)
else
$notes1 = $notes1.shuffle
end
with_fx :reverb, room: 0.99999 do
with_fx :distortion, distort: 0.99 do
$notes1.each do
play key[$notes1.tick(:one)+2], amp: 0.01, release: 0.15
sleep $sleeps1.tick(:two)
end
end
end
else
sleep 0.25
end
end
live_loop :drums, sync: :bar do
with_sample_defaults amp: 4, sustain: 4,release: 6 do
p = rand
if p < 0.6 then
sync :bar
3.times do
3.times do
sample :bd_ada
sleep 0.75
end
sleep 0.25
sample :bd_ada
sleep 1.5
end
else
4.times do
sync :bar
use_synth :piano
with_synth_defaults amp: 4, attack: 0.0, release: 2 do
play [:c4, :e4, :g4].choose
sleep 1
if one_in(4) then
play (chord :c4, :M7)
else
play (chord :d4, :M7)
end
sleep 1
end
end
end
end
sync :bar
7.times do
sample :bd_ada,amp: 5
sleep 1
sample :bd_ada,amp: 3
sample :sn_dolf, sustain: 0, release: 0.08, hpf: 80,amp: 1
sleep 1
end
p = rand
if p > 0.75 then
repeat
end
end
with_fx :distortion do
live_loop :rim, sync: :bar do
mute = get :repeating
if mute == 0 then
sleep 0.5
sample :elec_blip, sustain: 0.02, cutoff:110, rate: 1,amp: 0.25
sleep 0.25
sample :elec_blip, sustain: 0.005, cutoff:110, rate: 0.8,amp: 0.25 if one_in(5)
sleep 0.25
else
sleep 0.25
end
end
end
with_fx :rhpf, res: 0.85, cutoff: 118, amp: 0.7 do
live_loop :hats, sync: :bar do
mute = 0 #get :repeating
if mute == 0 then
synth :chipnoise, sustain: 0, release: 0.09, freq_band: 15,amp: 0.125
sleep 0.25
if rand(1) < 0.5 then
synth :chipnoise, sustain: 0, release: 0.09, freq_band: 15,amp: 0.125
end
else
sleep 0.25
end
end
end
live_loop :pads, sync: :bar do
mute = get :repeating
if mute == 0 then
sync :bar
use_synth :tri
with_synth_defaults sustain: 3, release: 2.5, amp: 0.25, cutoff: 70 do
play chord(:a5, :m)
play chord(:a4, :m)
sleep 6
play chord(:a4, :m6)
play chord(:a3, :m6)
end
else
sleep 0.25
end
end
sleep 256
control v,amp: 0.6
sleep 8
control v,amp: 0.4
sleep 8
control v,amp: 0.2
sleep 8
control v,amp: 0.0
end