Last active
August 23, 2020 08:10
-
-
Save samaaron/afd10a7326739a23328c to your computer and use it in GitHub Desktop.
Derivative Drum and Bass
This file contains hidden or 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
# Super simple drum and bass | |
# Coded by Sam Aaron w/ Sonic Pi | |
# To play: download Sonic Pi from the link below, paste the code in and hit Run | |
# http://sonic-pi.net | |
use_bpm 100 | |
live_loop :amen_break do | |
p = [0.125, 0.25, 0.5].choose | |
with_fx :slicer, phase: p, wave: 0, mix: rrand(0.7, 1) do | |
r = [1, 1, 1, -1].choose | |
sample :loop_amen, beat_stretch: 2, rate: r , amp: 2 | |
end | |
sleep 2 | |
end | |
live_loop :bass_drum do | |
sample :bd_haus, cutoff: 70, amp: 1.5 | |
sleep 0.5 | |
end | |
live_loop :landing do | |
bass_line = (knit :e1, 3, [:c1, :c2].choose, 1) | |
with_fx :slicer, phase: [0.25, 0.5].choose, invert_wave: 1, wave: 0 do | |
s = synth :square, note: bass_line.tick, sustain: 4, cutoff: 60 | |
control s, cutoff_slide: 4, cutoff: 120 | |
end | |
sleep 4 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment