Skip to content

Instantly share code, notes, and snippets.

@yratof
Last active May 7, 2018 10:42
Show Gist options
  • Save yratof/a1b766bfaa761b830fae40d3ef1a9fe5 to your computer and use it in GitHub Desktop.
Save yratof/a1b766bfaa761b830fae40d3ef1a9fe5 to your computer and use it in GitHub Desktop.
Sonic PI ARP
# Bass line
in_thread do
live_loop :bass do
use_synth :mod_beep
play (chord :fs2, :add9, num_octaves: 2).shuffle.tick(), release: 2, amp: 0.4
sleep 2
end
end
# Staggers lead notes
in_thread do
live_loop :arp do
with_fx :slicer, phase: 0.3, mix: 1, amp: 0.5 do
use_synth :fm
play (chord :fs2, :add9, num_octaves: 3).shuffle.tick(), release: 1, amp: 0.4
sleep 0.25
end
end
end
# 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16
beat = [1, 1, 0, 0, 2, 0, 1, 0, 1, 0, 2, 0, 0, 1, 0, 0]
in_thread do
live_loop :drums do
with_fx :bitcrusher, sample_rate: 4000, mix: 1, amp: 0.8 do
with_fx :echo, decay: 0.5, mix: 0.3 do
beat.each do |p|
sample :drum_bass_soft, amp: rrand(0.5, 1) if p == 1
sample :drum_cymbal_closed, finish: 0.25, amp: rrand(0.1, 0.6)
sample :drum_snare_hard, amp: rrand(0.5, 1) if p == 2
sleep 0.125
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment