Skip to content

Instantly share code, notes, and snippets.

@NoUsername
Created November 13, 2016 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NoUsername/ca7d8c669fc6efbab0127db0130916c7 to your computer and use it in GitHub Desktop.
Save NoUsername/ca7d8c669fc6efbab0127db0130916c7 to your computer and use it in GitHub Desktop.
playing around with sonic-pi
use_bpm 120
kicks = [1,0,0,0, 1,0,0,0, 1,0,0,0, 1,0,0,0].ring
snares = [1,0,1,0, 1,0,0,1, 0,0,1,0, 0,0,1,0].ring
drum = [0,0,0,0, 0,0,0,1, 0,0,0,0, 0,0,0,0].ring
drum2 = [1,0,1,0, 0,0,1,0, 0,0,1,0, 0,0,1,0].ring
live_loop :drums do
pos = tick
if kicks[pos] == 1 then
sample :bd_haus, rate: 1
end
if snares[pos] == 1 then
sample :sn_dolf, rate: 1, amp: 0.5
end
if drum[pos] == 1 then
sample :drum_cowbell, amp: 0.3
end
if drum2[pos] == 1 then
sample :perc_snap
end
sleep 0.25
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment