Sonic Pi : Accelerating BPM

use_debug false
s = 42
live_loop :calc do
s = (ramp *range(10, 62, 0.2)).tick

puts s
sleep 0.5
end

define :bpm do
use_bpm s
end

live_loop :bigboom, sync: :calc do
bpm
#stop
with_fx :gverb, spread: 1, damp: 0.1, room: 200, release: 8,
ref_level: 4, tail_level: 4 do
sample :bd_tek, amp: 0.2
sleep 32
end
end
live_loop :densesnare, sync: :guitareintro do
bpm
# stop
with_fx :echo, phase: 0.25 do
with_fx :hpf, cutoff: 130 do
sample :drum_cymbal_closed, amp: 0.7
sleep 0.125
sample :drum_cymbal_soft, amp: 0.7
sleep 0.125
end
sleep 4
end
end
live_loop :bitcrushedkick2, sync: :calc do
bpm
rate = (stretch [8000, 6000, 4000], 32).tick
#stop
with_fx :lpf, cutoff: 90 do
with_fx :bitcrusher, sample_rate: rate do
synth :fm, note: :c3, amp: 0.1
sleep 0.125
end
end
end

live_loop :ambiance, sync: :calc do
bpm
#stop
with_fx :slicer, phase: 0.125, amp_min: 0.5 do
sample :bass_thick_c, attack: 0.5, rpitch: 0, amp: 0.40
sleep 2
end
end
live_loop :kick4, sync: :calc do
bpm
#stop
with_fx :distortion, distort: 0.75 do
sample :bd_808
end
sample :bd_boom
sample :elec_chime, rate: -2, start: 0.75, rpitch: -12, beat_stretch: 4 #makes for hardcore
with_fx :echo, phase: 0.125 do
sample :bass_voxy_hit_c, rate: -1, start: 0.25
end
sleep 0.5
sample :elec_hollow_kick if spread(3, 13).tick
sample :drum_heavy_kick, lpf: 80 if spread(2, 15).tick
with_fx :distortion, distort: 0.7 do
sample :bd_808
end
end
end
live_loop :snare4, sync: :calc do
bpm
#stop
with_fx :whammy do #increase
sample :drum_cymbal_closed, hpf: rrand(128, 130), amp: rrand(0.1, 0.3)
sleep [0.125, 8].choose
end
end

live_loop :intro2, sync: :calc do
bpm
stop
with_fx :wobble, phase: 0.05, cutoff_max: 75 do
with_fx :gverb, spread: 1, damp: 0.9, room: 200, release: 8 do
sample :elec_fuzz_tom, amp: 0.7, rate: -0.25, start: 0.125
sleep 16
end
end
end
live_loop :drumtops, sync: :calc do
bpm
stop
with_fx :level, amp: 0.75 do
with_fx :lpf, cutoff: 60 do
with_fx :reverb, mix: 1 do
with_fx :krush do
sample :drum_tom_hi_hard
sleep 0.125
sample :drum_tom_lo_hard
sleep 0.125
sample :drum_tom_mid_soft
sleep 0.25
sample :drum_tom_hi_hard
sleep 0.125
sample :drum_tom_lo_hard
sleep 0.25
sample :drum_tom_mid_hard
sleep 0.125
sleep 4
end
end
end
end
end
live_loop :ambiance2 do
bpm
stop
with_fx :reverb, mix: 1 do
with_fx :krush, gain: 5 do
sample :ambi_soft_buzz, rate: rrand(0.100, 0.125)
sleep 4
end
end
end
with_fx :reverb, mix: 0.5 do

live_loop :calm_intro, sync: :calc do
bpm
stop
density 1 do
with_fx :reverb, mix: 0.1, room: 1, damp: 0.9 do
use_synth :hollow
use_synth_defaults noise: 4, res: 0.95
play_pattern_timed [:c1, :ab2, :f1, :c2, :ab2], [0.5, 1, 0.5, 1.5, 0.5], amp: 0.50
sleep 4
end
end
end
live_loop :highpitch, sync: :calc do
stop
with_fx :reverb, mix: 1, damp: 1 do
with_fx :slicer, phase: 0.25, mix: 0.125 do
synth :tech_saws, note: :c7, amp: 0.1, release: 16, attack: 4
sleep 16
end
end
end

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *