Skip to content

Instantly share code, notes, and snippets.

Avatar

Xavier Riley xavriley

View GitHub Profile
View gist:c1c0d255e6f2f40dcdb4
#########################################
## Sonic Pi Drum Machine
## coded by Darin Wilson
## changed by Xavier Riley
##
use_bpm 95
in_thread(name: :drum_machine) do
View retune-dnb.rb
# Live coding example for Retune conference 2014
# 1) Press Run (Cmd+R) to start
# 2) Make changes (e.g. comment in/out various lines in :beats & :amen)
# 3) Press Run again (changes will only be audible from next queue point)
# compute loop length (4 bars), bar & quarter note durations
dur = sample_duration :loop_compus
bar = dur / 4
quart = dur / 16