Created
November 9, 2021 17:44
-
-
Save mbutz/d04bf41f57f9409acf6fa8e0f2f18e0d to your computer and use it in GitHub Desktop.
Beethoven (Sonic Pi)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Beethoven | |
use_bpm 120 | |
live_loop :beat do | |
sleep 4 | |
end | |
live_loop :bell, sync: :beat do | |
stop | |
ptn = (ring | |
0, 0.5, 0, 1, 1, 0.5, 0, 0, | |
1, 0, 0, 0, 1, 0, 1.5, 0) | |
with_fx :sound_out_stereo, output: 3 do | |
s = sample samples + "mb/lvb", 5, attack_level: 8, | |
start: (ring 0.7, 0.8, 0.9).choose, finish: (ring 0.7, 0.9).choose, | |
amp: ptn.tick * 3, rpitch: -5, hpf: 70, rate: -1 | |
sleep 0.25 | |
end | |
end | |
live_loop :kick, sync: :beat do | |
stop | |
with_fx :sound_out_stereo, output: 3 do | |
at (ring 0, 1, 2, 3, 3.75) do | |
sample blips, 20, start: 0.035, rpitch: 10, attack_level: 5, amp: 1 | |
end | |
end | |
sleep 4 | |
end | |
live_loop :oscilla, sync: :beat do | |
stop | |
with_fx :sound_out_stereo, output: 5 do | |
with_fx :rhpf, res: 0.85, cutoff: (line 50, 80, steps: 12).mirror.tick do | |
with_fx :slicer, phase: (ring 1.25, 0.75).choose, mix: 0.5 do | |
with_fx :slicer, amp: (ring 0.75, 1, 0.25, 0.5).choose do | |
sample samples + "mb/lvb", 21, beat_stretch: 2, amp: 1, rpitch: (knit 2.5, 12, (ring 4.5, 7.5).choose, 4).look, release: 0.25 | |
end | |
end | |
end | |
end | |
sleep 1 | |
end | |
# clap beat | |
live_loop :bass, sync: :beat do | |
stop | |
use_synth :fm | |
use_synth_defaults depth: 2, divisor: 1, cutoff: 50, attack_level: 2, amp: 1 | |
with_fx :sound_out_stereo, output: 3 do | |
play :e1, release: 0.5 | |
sleep 0.5 | |
play :e1, release: 5, attack_level: 4, amp: 1.5 | |
sleep 3.5 | |
play :b1 | |
sleep 3.75 | |
play :e2, release: 0.25, attack_level: 4, amp: 1.5 | |
sleep 0.25 | |
end | |
end | |
live_loop :drums, sync: :beat do | |
stop | |
with_fx :sound_out_stereo, output: 3 do | |
in_thread do | |
2.times do | |
sample jungle, 10, beat_stretch: 16, start: 0.5, amp: 2, hpf: 110 | |
sleep 8 | |
end | |
end | |
in_thread do | |
4.times do | |
#sample jungle, 2, beat_stretch: 4, amp: 1 | |
sleep 4 | |
end | |
end | |
in_thread do | |
2.times do | |
#sample jungle, 31, beat_stretch: 8, amp: 1, rate: 2 | |
sleep 8 | |
end | |
end | |
end | |
sleep 16 | |
end | |
live_loop :bordun, sync: :beat do | |
stop | |
use_synth :fm | |
use_synth_defaults attack: 3, release: 48 | |
c = (ring 93, 91, 88) # 98 100 | |
with_fx :sound_out_stereo, output: 7 do | |
s = play c, cutoff: 90, amp: 1 # 1 | |
sleep 12 | |
control s, note: c + 2, note_slide: 1 | |
sleep 6 | |
control s, note: c - 2, note_slide: 0.5 | |
sleep 8 | |
control s, note: c, note_slide: 0.5 | |
sleep 1 | |
control s, note: c, note_slide: 0.75, amp: 0.5, amp_slide: 2 | |
sleep 2 | |
control s, note: c - 0.25, note_slide: 0.5, amp: 0.5 | |
sleep 2 | |
control s, note: c, note_slide: 0.5, amp: 1, amp_slide: 4 | |
end | |
sleep 64 | |
end | |
live_loop :flitter, sync: :beat do | |
stop | |
use_synth :rodeo # :tri | |
use_synth_defaults attack: 0.025, release: 0.25, attack_level: 0.25, amp: 0.5/2.0, use_compressor: 0, cutoff: 60 | |
ptn = (ring :r, :d5, :g5, :r, :a5, :r, :e5, :r, :b4, :r) + (ring :fs5, :r, :b5, :a4, :a5, :d5, :r) | |
with_fx :sound_out_stereo, output: 9 do | |
play ptn.mirror.tick | |
sleep 0.5 | |
play ptn.mirror.look | |
end | |
sleep (ring 0.25, 0.5, 0.75, 1.5, 2.5).choose | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment