Skip to content

Instantly share code, notes, and snippets.

@jindrichmynarz
Created March 2, 2021 10:16
Show Gist options
  • Save jindrichmynarz/473f5c61822be56b7ed20925a754e137 to your computer and use it in GitHub Desktop.
Save jindrichmynarz/473f5c61822be56b7ed20925a754e137 to your computer and use it in GitHub Desktop.
Typing the glam: a tribute to Apollo 440's Glam in Sonic Pi
# A tribute to
#
# Apollo 440: Glam
#
# Dedicated to my Dad
#
# (with whom I bought this on a CD back in the 1990s)
use_debug false
use_bpm 130
tb_mix = (ring 0.7)
snap_mix = (ring 0.5)
hihat_mix = (ring 1)
kick_mix = (ring 1)
snare_mix = (ring 0.7)
cymbal_mix = (ring 0.4)
hoover_mix = (ring 0.2)
live_loop :tb do
synth :tb303, note: :d1, amp: [0.3, 0.4].tick * tb_mix.look,
cutoff: 70, decay: 2/3.0, release: 0.05, res: 0.9, wave: 2
sleep 1
end
live_loop :tb2, sync: :tb do
synth :tb303, note: :d2, amp: (knit 0, 23, 1, 1).tick * tb_mix.look,
cutoff: 70, release: 1/3.0, res: 0.95
sleep 1/3.0
end
snap_rooms = (ramp *range(0.4, 1, 0.01), 0.4)
live_loop :snaps, sync: :tb do
with_fx :reverb, damp: 0.2, room: snap_rooms.look do
sample :perc_snap, amp: snap_mix.look * [0, 1].tick
end
sleep 1
end
hihat_pattern = (ring 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1,
0.2, 0.2, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1)
live_loop :hihat, sync: :tb do
sample :drum_cymbal_closed, amp: hihat_pattern.tick * hihat_mix.look, hpf: 110
sleep 1/3.0
end
kick_pattern = (ring 0.6, 0, 0.3, 1, 0, 0.3)
live_loop :kick, sync: :tb do
sample :bd_tek, cutoff: 80, amp: kick_pattern.tick * kick_mix.look
sleep 1/3.0
end
snare_pattern = (ring 0, 0, 0, 1, 0, 0,
0, 0, 0, 1, 0, 0,
0, 0, 0, 1, 0, 0,
0, 0, 0, 1, 0, 0.2)
live_loop :snare, sync: :tb do
sample :sn_dolf, start: 0.2, finish: 0.5, amp: snare_pattern.tick * snare_mix.look
sleep 1/3.0
end
##| in_thread do
##| sync :tb
##| buildup = (ramp *range(-2, 0, 1/48.0).map { |n| Math.exp(2 * n) })
##| with_fx :hpf, cutoff: 110 do
##| 96.times do
##| amp = buildup.tick
##| sample :sn_dolf, rate: 1.1, amp: amp
##| synth :pnoise, release: 0.4, amp: amp
##| sleep 1/3.0
##| end
##| sample :elec_filt_snare
##| end
##| end
live_loop :cymbal, sync: :tb do
sample :elec_fuzz_tom, hpf: 110, amp: (ring 0, 0, 0, 1, 0, 1).tick * cymbal_mix.look
sleep 1/3.0
end
live_loop :hoover, sync: :tb do
decay = (ring 0, 0, 0, 1/6.0, 0, 1/12.0).tick
if decay > 0 then
with_synth :hoover do
h = play :d3, amp: hoover_mix.look, decay: decay, release: 0.05, note_slide: 1/12.0
control h, note: :d4 if (stretch [false, true], 24).look
end
end
sleep 1/3.0
end
live_loop :hook, sync: :tb do
with_fx :reverb, mix: (ramp *range(0, 1, 0.1)).tick, room: 0.99 do
with_synth :hoover do
with_synth_defaults amp: 0.2, release: 0.4 do
sleep 8/3.0
s = play :d3, decay: 1/3.0, note_slide: 1/6.0
sleep 1/3.0
control s, note: :d
sleep 2/3.0
play :d, decay: 1/6.0
sleep 25/3.0
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment