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
######################################### | |
## Sonic Pi Drum Machine | |
## coded by Darin Wilson | |
## changed by Xavier Riley | |
## | |
use_bpm 95 | |
in_thread(name: :drum_machine) do |
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
# 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 |